summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/linker.cpp
diff options
context:
space:
mode:
authorTobias Klausmann <[email protected]>2016-05-08 22:44:05 +0200
committerDave Airlie <[email protected]>2016-05-14 08:28:07 +1000
commitad355652c20b245f5f2faa8622e71461e3121a7f (patch)
tree9bd401adde19138d616d4accd941451dce1bcfe2 /src/compiler/glsl/linker.cpp
parentdd3390e12fa8c8fa127013a9fc7c83069747aad2 (diff)
glsl: Extend lowering pass for gl_ClipDistance to support other arrays (v4)
This will come in handy when we want to lower gl_CullDistance into gl_CullDistanceMESA. [airlied: drop separate APIs for clip/cull - just use single API to call both passes.] v3: reexamine my sanity, this was pretty broken, the new code creates one copy of gl_ClipDistanceMESA, as the clip distance varying and lowers everything into that in two passes, one for clips one for culls. v4: rework using the passes in clip/cull sizes, instead of the array sizes. 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/linker.cpp')
-rw-r--r--src/compiler/glsl/linker.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 2a520bc0013..a85072d7de5 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -4561,7 +4561,9 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
goto done;
if (ctx->Const.ShaderCompilerOptions[i].LowerCombinedClipCullDistance) {
- lower_clip_distance(prog->_LinkedShaders[i]);
+ lower_combined_clip_cull_distance(prog->_LinkedShaders[i],
+ (uint8_t)prog->LastClipDistanceArraySize,
+ (uint8_t)prog->LastCullDistanceArraySize);
}
if (ctx->Const.LowerTessLevel) {