}
+static bool
+is_mem_query_inst(unsigned opcode)
+{
+ return opcode == TGSI_OPCODE_RESQ ||
+ opcode == TGSI_OPCODE_TXQ ||
+ opcode == TGSI_OPCODE_TXQS ||
+ opcode == TGSI_OPCODE_TXQ_LZ ||
+ opcode == TGSI_OPCODE_LODQ;
+}
+
/**
* Is the opcode a "true" texture instruction which samples from a
* texture map?
static bool
is_texture_inst(unsigned opcode)
{
- return (opcode != TGSI_OPCODE_TXQ &&
- opcode != TGSI_OPCODE_TXQS &&
- opcode != TGSI_OPCODE_TXQ_LZ &&
- opcode != TGSI_OPCODE_LODQ &&
+ return (!is_mem_query_inst(opcode) &&
tgsi_get_opcode_info(opcode)->is_tex);
}
}
}
- if (is_memory_file(src->Register.File)) {
+ if (is_memory_file(src->Register.File) &&
+ !is_mem_query_inst(fullinst->Instruction.Opcode)) {
is_mem_inst = true;
if (tgsi_get_opcode_info(fullinst->Instruction.Opcode)->is_store) {