diff options
author | Marek Olšák <[email protected]> | 2017-05-30 02:04:29 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-05 18:29:42 +0200 |
commit | 4b1e6ed49a2840e4aca2a177fe3a1c1b4e710c90 (patch) | |
tree | d6145ad0f4795092f3016e6467573316d4ed391c | |
parent | 708664159e18487b6676fd5b4c33f52003f81d9e (diff) |
tgsi/scan: fix scanning fragment shaders with PrimID and Position/Face
Not relevant to radeonsi, because Position/Face are system values
with radeonsi, while this codepath is for drivers where Position and
Face are ordinary inputs.
Reviewed-by: Brian Paul <[email protected]>
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 847f4fce28f..018ca4b5bd4 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -557,13 +557,16 @@ scan_declaration(struct tgsi_shader_info *info, /* Vertex shaders can have inputs with holes between them. */ info->num_inputs = MAX2(info->num_inputs, reg + 1); - if (semName == TGSI_SEMANTIC_PRIMID) - info->uses_primid = TRUE; - else if (procType == PIPE_SHADER_FRAGMENT) { - if (semName == TGSI_SEMANTIC_POSITION) - info->reads_position = TRUE; - else if (semName == TGSI_SEMANTIC_FACE) - info->uses_frontface = TRUE; + switch (semName) { + case TGSI_SEMANTIC_PRIMID: + info->uses_primid = true; + break; + case TGSI_SEMANTIC_POSITION: + info->reads_position = true; + break; + case TGSI_SEMANTIC_FACE: + info->uses_frontface = true; + break; } break; |