diff options
author | Tobias Klausmann <[email protected]> | 2016-05-08 22:44:06 +0200 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-05-14 08:28:08 +1000 |
commit | d656736bbf926c219b6bcbc0ad59132fc82a7382 (patch) | |
tree | a23cf6a705eec5b42acb4218ee9e7387e7b818a4 /src/compiler/glsl/link_varyings.cpp | |
parent | ad355652c20b245f5f2faa8622e71461e3121a7f (diff) |
glsl: Add arb_cull_distance support (v3)
v2: make too large array a compile error
v3: squash mesa/prog patch to avoid static compiler errors in bisect
Signed-off-by: Tobias Klausmann <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
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; |