diff options
author | Roland Scheidegger <[email protected]> | 2014-11-18 22:46:00 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2014-11-19 18:35:30 +0100 |
commit | 4b6d6642d2c64ce67d65ead480fb99104a7e2d3a (patch) | |
tree | acea1eac94a65c073a4545c0a15960d524a14b21 /src/gallium/auxiliary/tgsi | |
parent | 9460cd39e8c74a6a8aba7e5c57bb4929ab135c29 (diff) |
draw: fixes for vertex shaders outputting layer or viewport index
Mostly add a couple cases so we don't just check gs for this.
There's only one gotcha, the built-in vp transform in the llvm vs can't
handle it (this would be fixable though non-trivial due to vp index being
non-constant for the SoA outputs, but we don't use it if there's a gs
neither - the whole clip/vp transform integration there is suboptimal).
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 42bc61eeb4c..a23bb4067aa 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -232,6 +232,12 @@ tgsi_scan_shader(const struct tgsi_token *tokens, info->num_written_culldistance += util_bitcount(fulldecl->Declaration.UsageMask); } + else if (semName == TGSI_SEMANTIC_VIEWPORT_INDEX) { + info->writes_viewport_index = TRUE; + } + else if (semName == TGSI_SEMANTIC_LAYER) { + info->writes_layer = TRUE; + } } if (procType == TGSI_PROCESSOR_FRAGMENT) { @@ -248,15 +254,6 @@ tgsi_scan_shader(const struct tgsi_token *tokens, info->writes_edgeflag = TRUE; } } - - if (procType == TGSI_PROCESSOR_GEOMETRY) { - if (semName == TGSI_SEMANTIC_VIEWPORT_INDEX) { - info->writes_viewport_index = TRUE; - } - else if (semName == TGSI_SEMANTIC_LAYER) { - info->writes_layer = TRUE; - } - } } } } |