OSDN Git Service

spirv: fill info.gs.input_primitive too
authorAlejandro Piñeiro <apinheiro@igalia.com>
Mon, 23 Oct 2017 15:19:34 +0000 (17:19 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Mon, 13 Aug 2018 10:56:51 +0000 (12:56 +0200)
info.gs.output_primitive was already being filled. Not sure why this
is not needed on Vulkan, but we found to be needed for
ARB_gl_spirv. Specifically, this is needed to get the following test
passing:

KHR-GL45.gl_spirv.spirv_validation_builtin_variable_decorations_test

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/spirv/spirv_to_nir.c

index 32ebdd7..b5ec2de 100644 (file)
@@ -3690,6 +3690,8 @@ vtn_handle_execution_mode(struct vtn_builder *b, struct vtn_value *entry_point,
          vtn_assert(b->shader->info.stage == MESA_SHADER_GEOMETRY);
          b->shader->info.gs.vertices_in =
             vertices_in_from_spv_execution_mode(b, mode->exec_mode);
+         b->shader->info.gs.input_primitive =
+            gl_primitive_from_spv_execution_mode(b, mode->exec_mode);
       }
       break;