diff options
author | Marek Olšák <[email protected]> | 2016-11-14 07:56:57 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-11-21 21:44:35 +0100 |
commit | 7e76f9a7a8041e2fe6aa557f1520358f1c323553 (patch) | |
tree | c361d9957be28dbff8ca584d0ed8625ac38e8c5e /src/gallium/drivers/radeonsi/si_shader.c | |
parent | c7f3e5c647cce64899ed464755ce69a7d2226eca (diff) |
radeonsi: record information about all written and read varyings
It's just tgsi_shader_info with DEFAULT_VAL varyings removed.
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 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 8b564593084..2b432244331 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -141,6 +141,28 @@ unsigned si_shader_io_get_unique_index(unsigned semantic_name, unsigned index) } } +unsigned si_shader_io_get_unique_index2(unsigned name, unsigned index) +{ + switch (name) { + case TGSI_SEMANTIC_FOG: + return 0; + case TGSI_SEMANTIC_LAYER: + return 1; + case TGSI_SEMANTIC_VIEWPORT_INDEX: + return 2; + case TGSI_SEMANTIC_PRIMID: + return 3; + case TGSI_SEMANTIC_COLOR: /* these alias */ + case TGSI_SEMANTIC_BCOLOR: + return 4 + index; + case TGSI_SEMANTIC_TEXCOORD: + return 6 + index; + default: + assert(!"invalid semantic name"); + return 0; + } +} + /** * Get the value of a shader input parameter and extract a bitfield. */ |