vkd3d-shader/spirv: Always write the point size in vertex shaders.

Vulkan requires that point size be written.

There should be no backwards compatibility concern here, since the vertex shader
supplies point size with the lowest priority.
This commit is contained in:
Elizabeth Figura 2024-10-02 23:39:15 -05:00 committed by Henri Verbeet
parent f0e31dd6b3
commit 56e5fca501
Notes: Henri Verbeet 2024-10-10 23:00:15 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1146

View File

@ -2662,8 +2662,6 @@ static struct spirv_compiler *spirv_compiler_create(const struct vsir_program *p
if ((shader_interface = vkd3d_find_struct(compile_info->next, INTERFACE_INFO)))
{
compiler->xfb_info = vkd3d_find_struct(compile_info->next, TRANSFORM_FEEDBACK_INFO);
compiler->emit_point_size = compiler->xfb_info && compiler->xfb_info->element_count
&& compiler->shader_type != VKD3D_SHADER_TYPE_GEOMETRY;
compiler->shader_interface = *shader_interface;
if (shader_interface->push_constant_buffer_count)
@ -2690,6 +2688,11 @@ static struct spirv_compiler *spirv_compiler_create(const struct vsir_program *p
}
}
if (compiler->shader_type == VKD3D_SHADER_TYPE_VERTEX)
compiler->emit_point_size = true;
else if (compiler->shader_type != VKD3D_SHADER_TYPE_GEOMETRY)
compiler->emit_point_size = compiler->xfb_info && compiler->xfb_info->element_count;
compiler->scan_descriptor_info = scan_descriptor_info;
compiler->phase = VKD3DSIH_INVALID;