diff options
author | Marek Olšák <[email protected]> | 2016-11-13 18:41:43 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-11-21 21:44:35 +0100 |
commit | ed3190b3f3a776fc8c75b1e6130a88079166d115 (patch) | |
tree | d91eb6553426550e1488f36445c83b143b7162f1 /src/gallium/drivers/radeonsi/si_shader.c | |
parent | d984a324bf8702adde68c006f1c3454233871e1c (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.c | 6 |
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: |