diff options
Diffstat (limited to 'src/compiler/glsl/link_varyings.cpp')
-rw-r--r-- | src/compiler/glsl/link_varyings.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp index 2555cc94176..003b9d46abc 100644 --- a/src/compiler/glsl/link_varyings.cpp +++ b/src/compiler/glsl/link_varyings.cpp @@ -631,6 +631,10 @@ tfeedback_decl::init(struct gl_context *ctx, const void *mem_ctx, strcmp(this->var_name, "gl_ClipDistance") == 0) { this->lowered_builtin_array_variable = clip_distance; } + if (ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].LowerCombinedClipCullDistance && + strcmp(this->var_name, "gl_CullDistance") == 0) { + this->lowered_builtin_array_variable = cull_distance; + } if (ctx->Const.LowerTessLevel && (strcmp(this->var_name, "gl_TessLevelOuter") == 0)) @@ -691,6 +695,9 @@ tfeedback_decl::assign_location(struct gl_context *ctx, case clip_distance: actual_array_size = prog->LastClipDistanceArraySize; break; + case cull_distance: + actual_array_size = prog->LastCullDistanceArraySize; + break; case tess_level_outer: actual_array_size = 4; break; @@ -911,6 +918,9 @@ tfeedback_decl::find_candidate(gl_shader_program *prog, case clip_distance: name = "gl_ClipDistanceMESA"; break; + case cull_distance: + name = "gl_CullDistanceMESA"; + break; case tess_level_outer: name = "gl_TessLevelOuterMESA"; break; |