mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader: Compute XfbOffset for the slot of the specified element.
Fixes NVIDIA HairWorks GPU crash on Metro Exodus, and test failures in test_line_tessellation(). Based on a vkd3d-proton patch by Hans-Kristian Arntzen. Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8860c4d077
commit
b01104e47d
@ -4136,13 +4136,15 @@ static void vkd3d_dxbc_compiler_decorate_xfb_output(struct vkd3d_dxbc_compiler *
|
||||
xfb_element = e;
|
||||
break;
|
||||
}
|
||||
|
||||
offset += 4 * e->component_count;
|
||||
}
|
||||
|
||||
if (!xfb_element)
|
||||
return;
|
||||
|
||||
for (i = 0; xfb_element != &xfb_info->elements[i]; ++i)
|
||||
if (xfb_info->elements[i].output_slot == xfb_element->output_slot)
|
||||
offset += 4 * xfb_info->elements[i].component_count;
|
||||
|
||||
if (xfb_element->component_index || xfb_element->component_count > component_count)
|
||||
{
|
||||
FIXME("Unhandled component range %u, %u.\n", xfb_element->component_index, xfb_element->component_count);
|
||||
|
@ -28503,13 +28503,11 @@ static void test_line_tessellation(void)
|
||||
data = get_readback_data(&rb, i + 2048 / (2 * sizeof(*data)), 0, 0, 2 * sizeof(*data));
|
||||
expected = &expected_data[3 * i + 1];
|
||||
bug_if(is_nvidia_device(context.device))
|
||||
todo_if(i != 6)
|
||||
ok(compare_vec4(data, expected, 1),
|
||||
"Got color {%.8e, %.8e, %.8e, %.8e}, expected {%.8e, %.8e, %.8e, %.8e} at %u.\n",
|
||||
data->x, data->y, data->z, data->w, expected->x, expected->y, expected->z, expected->w, i);
|
||||
++data;
|
||||
expected = &expected_data[3 * i + 2];
|
||||
todo
|
||||
ok(compare_vec4(data, expected, 1),
|
||||
"Got primitive ID {%.8e, %.8e, %.8e, %.8e}, expected {%.8e, %.8e, %.8e, %.8e} at %u.\n",
|
||||
data->x, data->y, data->z, data->w, expected->x, expected->y, expected->z, expected->w, i);
|
||||
|
Loading…
x
Reference in New Issue
Block a user