diff options
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.cpp | 12 | ||||
-rw-r--r-- | src/compiler/spirv/vtn_variables.c | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 90aa21f3149..09599e4cee7 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -353,6 +353,12 @@ nir_visitor::visit(ir_variable *ir) ir->data.location == VARYING_SLOT_TESS_LEVEL_OUTER)) { var->data.compact = ir->type->without_array()->is_scalar(); } + + if (shader->info.stage > MESA_SHADER_VERTEX && + ir->data.location >= VARYING_SLOT_CLIP_DIST0 && + ir->data.location <= VARYING_SLOT_CULL_DIST1) { + var->data.compact = ir->type->without_array()->is_scalar(); + } } break; @@ -363,6 +369,12 @@ nir_visitor::visit(ir_variable *ir) ir->data.location == VARYING_SLOT_TESS_LEVEL_OUTER)) { var->data.compact = ir->type->without_array()->is_scalar(); } + + if (shader->info.stage <= MESA_SHADER_GEOMETRY && + ir->data.location >= VARYING_SLOT_CLIP_DIST0 && + ir->data.location <= VARYING_SLOT_CULL_DIST1) { + var->data.compact = ir->type->without_array()->is_scalar(); + } break; case ir_var_uniform: diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index ecdfd0c735f..f6b458b7e78 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1444,6 +1444,8 @@ apply_var_decoration(struct vtn_builder *b, switch (builtin) { case SpvBuiltInTessLevelOuter: case SpvBuiltInTessLevelInner: + case SpvBuiltInClipDistance: + case SpvBuiltInCullDistance: var_data->compact = true; break; case SpvBuiltInFragCoord: |