diff options
Diffstat (limited to 'src/compiler/spirv/vtn_variables.c')
-rw-r--r-- | src/compiler/spirv/vtn_variables.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 7e8a090adde..11d2aabac8c 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1187,6 +1187,10 @@ vtn_get_builtin_location(struct vtn_builder *b, *mode = nir_var_shader_in; else if (b->shader->info.stage == MESA_SHADER_GEOMETRY) *mode = nir_var_shader_out; + else if (b->options && b->options->caps.shader_viewport_index_layer && + (b->shader->info.stage == MESA_SHADER_VERTEX || + b->shader->info.stage == MESA_SHADER_TESS_EVAL)) + *mode = nir_var_shader_out; else vtn_fail("invalid stage for SpvBuiltInLayer"); break; @@ -1194,6 +1198,10 @@ vtn_get_builtin_location(struct vtn_builder *b, *location = VARYING_SLOT_VIEWPORT; if (b->shader->info.stage == MESA_SHADER_GEOMETRY) *mode = nir_var_shader_out; + else if (b->options && b->options->caps.shader_viewport_index_layer && + (b->shader->info.stage == MESA_SHADER_VERTEX || + b->shader->info.stage == MESA_SHADER_TESS_EVAL)) + *mode = nir_var_shader_out; else if (b->shader->info.stage == MESA_SHADER_FRAGMENT) *mode = nir_var_shader_in; else |