summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_shader.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-11-13 18:41:43 +0100
committerMarek Olšák <[email protected]>2016-11-21 21:44:35 +0100
commited3190b3f3a776fc8c75b1e6130a88079166d115 (patch)
treed91eb6553426550e1488f36445c83b143b7162f1 /src/gallium/drivers/radeonsi/si_shader.c
parentd984a324bf8702adde68c006f1c3454233871e1c (diff)
radeonsi: don't export ClipVertex and ClipDistance[] if clipping is disabled
This is the first user of optimized monolithic shader variants. Cull distances can't be disabled by states. Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 5e57bb3b664..a80d9c375b0 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -2294,9 +2294,15 @@ handle_semantic:
param_count++;
break;
case TGSI_SEMANTIC_CLIPDIST:
+ if (shader->key.opt.hw_vs.clip_disable) {
+ semantic_name = TGSI_SEMANTIC_GENERIC;
+ goto handle_semantic;
+ }
target = V_008DFC_SQ_EXP_POS + 2 + semantic_index;
break;
case TGSI_SEMANTIC_CLIPVERTEX:
+ if (shader->key.opt.hw_vs.clip_disable)
+ continue;
si_llvm_emit_clipvertex(bld_base, pos_args, outputs[i].values);
continue;
case TGSI_SEMANTIC_PRIMID: