diff options
author | Emil Velikov <[email protected]> | 2018-02-28 14:30:06 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2018-08-08 13:33:07 +0100 |
commit | 834036500c1b4fcc5550ff5d4ccabc872e5a868c (patch) | |
tree | f823eebfd3a2fa426b0dc809d513aed0ef0b287a /src/gallium | |
parent | db432194a1ef95e4ba5d6e190e78a961c4ab0ded (diff) |
ttn: remove {varying_slot, frag_result}_to_tgsi_semantic helpers
The respective drivers have been updated and the helpers are no longer
needed.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/nir/tgsi_to_nir.c | 73 | ||||
-rw-r--r-- | src/gallium/auxiliary/nir/tgsi_to_nir.h | 6 |
2 files changed, 0 insertions, 79 deletions
diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index 1b31b564246..12114dc2030 100644 --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c @@ -144,79 +144,6 @@ tgsi_varying_semantic_to_slot(unsigned semantic, unsigned index) } } -/* Temporary helper to remap back to TGSI style semantic name/index - * values, for use in drivers that haven't been converted to using - * VARYING_SLOT_ - */ -void -varying_slot_to_tgsi_semantic(gl_varying_slot slot, - unsigned *semantic_name, unsigned *semantic_index) -{ - static const unsigned map[][2] = { - [VARYING_SLOT_POS] = { TGSI_SEMANTIC_POSITION, 0 }, - [VARYING_SLOT_COL0] = { TGSI_SEMANTIC_COLOR, 0 }, - [VARYING_SLOT_COL1] = { TGSI_SEMANTIC_COLOR, 1 }, - [VARYING_SLOT_BFC0] = { TGSI_SEMANTIC_BCOLOR, 0 }, - [VARYING_SLOT_BFC1] = { TGSI_SEMANTIC_BCOLOR, 1 }, - [VARYING_SLOT_FOGC] = { TGSI_SEMANTIC_FOG, 0 }, - [VARYING_SLOT_PSIZ] = { TGSI_SEMANTIC_PSIZE, 0 }, - [VARYING_SLOT_FACE] = { TGSI_SEMANTIC_FACE, 0 }, - [VARYING_SLOT_EDGE] = { TGSI_SEMANTIC_EDGEFLAG, 0 }, - [VARYING_SLOT_PRIMITIVE_ID] = { TGSI_SEMANTIC_PRIMID, 0 }, - [VARYING_SLOT_CLIP_DIST0] = { TGSI_SEMANTIC_CLIPDIST, 0 }, - [VARYING_SLOT_CLIP_DIST1] = { TGSI_SEMANTIC_CLIPDIST, 1 }, - [VARYING_SLOT_CLIP_VERTEX] = { TGSI_SEMANTIC_CLIPVERTEX, 0 }, - [VARYING_SLOT_PNTC] = { TGSI_SEMANTIC_PCOORD, 0 }, - [VARYING_SLOT_VIEWPORT] = { TGSI_SEMANTIC_VIEWPORT_INDEX, 0 }, - [VARYING_SLOT_LAYER] = { TGSI_SEMANTIC_LAYER, 0 }, - }; - - if (slot >= VARYING_SLOT_VAR0) { - *semantic_name = TGSI_SEMANTIC_GENERIC; - *semantic_index = slot - VARYING_SLOT_VAR0; - return; - } - - if (slot >= VARYING_SLOT_TEX0 && slot <= VARYING_SLOT_TEX7) { - *semantic_name = TGSI_SEMANTIC_TEXCOORD; - *semantic_index = slot - VARYING_SLOT_TEX0; - return; - } - - if (slot >= ARRAY_SIZE(map)) { - fprintf(stderr, "Unknown varying slot %d\n", slot); - abort(); - } - - *semantic_name = map[slot][0]; - *semantic_index = map[slot][1]; -} - -/* Temporary helper to remap back to TGSI style semantic name/index - * values, for use in drivers that haven't been converted to using - * FRAG_RESULT_ - */ -void -frag_result_to_tgsi_semantic(gl_frag_result slot, - unsigned *semantic_name, unsigned *semantic_index) -{ - static const unsigned map[][2] = { - [FRAG_RESULT_DEPTH] = { TGSI_SEMANTIC_POSITION, 0 }, - [FRAG_RESULT_COLOR] = { TGSI_SEMANTIC_COLOR, -1 }, - [FRAG_RESULT_DATA0 + 0] = { TGSI_SEMANTIC_COLOR, 0 }, - [FRAG_RESULT_DATA0 + 1] = { TGSI_SEMANTIC_COLOR, 1 }, - [FRAG_RESULT_DATA0 + 2] = { TGSI_SEMANTIC_COLOR, 2 }, - [FRAG_RESULT_DATA0 + 3] = { TGSI_SEMANTIC_COLOR, 3 }, - [FRAG_RESULT_DATA0 + 4] = { TGSI_SEMANTIC_COLOR, 4 }, - [FRAG_RESULT_DATA0 + 5] = { TGSI_SEMANTIC_COLOR, 5 }, - [FRAG_RESULT_DATA0 + 6] = { TGSI_SEMANTIC_COLOR, 6 }, - [FRAG_RESULT_DATA0 + 7] = { TGSI_SEMANTIC_COLOR, 7 }, - }; - - *semantic_name = map[slot][0]; - *semantic_index = map[slot][1]; -} - static nir_ssa_def * ttn_src_for_dest(nir_builder *b, nir_alu_dest *dest) { diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.h b/src/gallium/auxiliary/nir/tgsi_to_nir.h index f480009afa4..a7060bca610 100644 --- a/src/gallium/auxiliary/nir/tgsi_to_nir.h +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.h @@ -26,9 +26,3 @@ struct nir_shader * tgsi_to_nir(const void *tgsi_tokens, const struct nir_shader_compiler_options *options); -void -varying_slot_to_tgsi_semantic(gl_varying_slot slot, - unsigned *semantic_name, unsigned *semantic_index); -void -frag_result_to_tgsi_semantic(gl_frag_result slot, - unsigned *semantic_name, unsigned *semantic_index); |