tgsi: don't print texture target for sample opcodes

sample opcodes don't encode a texture target, it would thus always
print UNKNOWN, which is not helpful (and wouldn't parse when giving
back the shader text to tgsi).

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
This commit is contained in:
Roland Scheidegger 2014-09-13 00:29:56 +02:00
parent 84ca6bc113
commit 3a9eb40ee1
1 changed files with 5 additions and 2 deletions

View File

@ -573,8 +573,11 @@ iter_instruction(
}
if (inst->Instruction.Texture) {
TXT( ", " );
ENM( inst->Texture.Texture, tgsi_texture_names );
if (!(inst->Instruction.Opcode >= TGSI_OPCODE_SAMPLE &&
inst->Instruction.Opcode <= TGSI_OPCODE_GATHER4)) {
TXT( ", " );
ENM( inst->Texture.Texture, tgsi_texture_names );
}
for (i = 0; i < inst->Texture.NumOffsets; i++) {
TXT( ", " );
TXT(tgsi_file_name(inst->TexOffsets[i].File));