summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-05-23 15:31:35 +0200
committerSamuel Pitoiset <[email protected]>2017-05-24 09:52:17 +0200
commit51dc5e3df38b2be0549c96b52548df1c92e36e96 (patch)
tree36a33a49b2fbc83290e42f015de8e15282b2c131 /src/gallium/auxiliary
parent338f47b6d8db83e3dce9d89f6383afd41fc8852c (diff)
tgsi: remove unused tgsi_is_passthrough_shader()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Elie Tournier <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.c76
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.h3
2 files changed, 0 insertions, 79 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index d1ef769ec4d..847f4fce28f 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -891,79 +891,3 @@ tgsi_scan_arrays(const struct tgsi_token *tokens,
return;
}
-
-
-/**
- * Check if the given shader is a "passthrough" shader consisting of only
- * MOV instructions of the form: MOV OUT[n], IN[n]
- *
- */
-boolean
-tgsi_is_passthrough_shader(const struct tgsi_token *tokens)
-{
- struct tgsi_parse_context parse;
-
- /**
- ** Setup to begin parsing input shader
- **/
- if (tgsi_parse_init(&parse, tokens) != TGSI_PARSE_OK) {
- debug_printf("tgsi_parse_init() failed in tgsi_is_passthrough_shader()!\n");
- return FALSE;
- }
-
- /**
- ** Loop over incoming program tokens/instructions
- */
- while (!tgsi_parse_end_of_tokens(&parse)) {
-
- tgsi_parse_token(&parse);
-
- switch (parse.FullToken.Token.Type) {
- case TGSI_TOKEN_TYPE_INSTRUCTION:
- {
- struct tgsi_full_instruction *fullinst =
- &parse.FullToken.FullInstruction;
- const struct tgsi_full_src_register *src =
- &fullinst->Src[0];
- const struct tgsi_full_dst_register *dst =
- &fullinst->Dst[0];
-
- /* Do a whole bunch of checks for a simple move */
- if (fullinst->Instruction.Opcode != TGSI_OPCODE_MOV ||
- (src->Register.File != TGSI_FILE_INPUT &&
- src->Register.File != TGSI_FILE_SYSTEM_VALUE) ||
- dst->Register.File != TGSI_FILE_OUTPUT ||
- src->Register.Index != dst->Register.Index ||
-
- src->Register.Negate ||
- src->Register.Absolute ||
-
- src->Register.SwizzleX != TGSI_SWIZZLE_X ||
- src->Register.SwizzleY != TGSI_SWIZZLE_Y ||
- src->Register.SwizzleZ != TGSI_SWIZZLE_Z ||
- src->Register.SwizzleW != TGSI_SWIZZLE_W ||
-
- dst->Register.WriteMask != TGSI_WRITEMASK_XYZW)
- {
- tgsi_parse_free(&parse);
- return FALSE;
- }
- }
- break;
-
- case TGSI_TOKEN_TYPE_DECLARATION:
- /* fall-through */
- case TGSI_TOKEN_TYPE_IMMEDIATE:
- /* fall-through */
- case TGSI_TOKEN_TYPE_PROPERTY:
- /* fall-through */
- default:
- ; /* no-op */
- }
- }
-
- tgsi_parse_free(&parse);
-
- /* if we get here, it's a pass-through shader */
- return TRUE;
-}
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h
index 98387c982c6..af1651b7e82 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h
@@ -196,9 +196,6 @@ tgsi_scan_arrays(const struct tgsi_token *tokens,
unsigned max_array_id,
struct tgsi_array_info *arrays);
-extern boolean
-tgsi_is_passthrough_shader(const struct tgsi_token *tokens);
-
#ifdef __cplusplus
} // extern "C"
#endif