From 56e5fca5012de062042e0b12851509cb3d6f57d6 Mon Sep 17 00:00:00 2001 From: Elizabeth Figura Date: Wed, 2 Oct 2024 23:39:15 -0500 Subject: [PATCH] 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. --- libs/vkd3d-shader/spirv.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index b52f5379..a2771b62 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -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;