[GPU] Fix dynamic GPR addressing check

This commit is contained in:
Triang3l 2018-09-17 07:35:56 +03:00
parent 79b745527c
commit 34fef0911c
1 changed files with 3 additions and 3 deletions

View File

@ -266,7 +266,7 @@ void ShaderTranslator::GatherInstructionInformation(
const auto& opcode_info = const auto& opcode_info =
alu_vector_opcode_infos_[static_cast<int>(op.vector_opcode())]; alu_vector_opcode_infos_[static_cast<int>(op.vector_opcode())];
for (size_t i = 0; i < opcode_info.argument_count; ++i) { for (size_t i = 0; i < opcode_info.argument_count; ++i) {
if (op.src_is_temp(i) && (op.src_reg(i) & 0x40)) { if (op.src_is_temp(i + 1) && (op.src_reg(i + 1) & 0x40)) {
uses_register_dynamic_addressing_ = true; uses_register_dynamic_addressing_ = true;
} }
} }
@ -283,8 +283,8 @@ void ShaderTranslator::GatherInstructionInformation(
if (op.has_scalar_op()) { if (op.has_scalar_op()) {
const auto& opcode_info = const auto& opcode_info =
alu_scalar_opcode_infos_[static_cast<int>(op.scalar_opcode())]; alu_scalar_opcode_infos_[static_cast<int>(op.scalar_opcode())];
if (opcode_info.argument_count == 1 && op.src_is_temp(0) && if (opcode_info.argument_count == 1 && op.src_is_temp(3) &&
(op.src_reg(0) & 0x40)) { (op.src_reg(3) & 0x40)) {
uses_register_dynamic_addressing_ = true; uses_register_dynamic_addressing_ = true;
} }
if (op.is_export()) { if (op.is_export()) {