[Mesa-dev] [PATCH 10/13] i965: Reorder sources of the untyped atomic opcode.
Francisco Jerez
currojerez at riseup.net
Fri Feb 27 07:34:53 PST 2015
This is consistent with the untyped surface read opcode. From now on
all typed and untyped surface access opcodes will follow the same
pattern: src[0] will be the message payload, src[1] will be the
surface index and src[2] will be a control immediate (atomic operation
for atomic opcodes and number of vector components for surface read
and write opcodes).
---
src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 4 ++--
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 +-
src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 4 ++--
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index bd07008..a0aa64e 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -1886,9 +1886,9 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
case SHADER_OPCODE_UNTYPED_ATOMIC:
assert(src[1].file == BRW_IMMEDIATE_VALUE &&
src[2].file == BRW_IMMEDIATE_VALUE);
- brw_untyped_atomic(p, dst, src[0], src[2], src[1].dw1.ud,
+ brw_untyped_atomic(p, dst, src[0], src[1], src[2].dw1.ud,
inst->mlen, !inst->dst.is_null());
- brw_mark_surface_used(prog_data, src[2].dw1.ud);
+ brw_mark_surface_used(prog_data, src[1].dw1.ud);
break;
case SHADER_OPCODE_UNTYPED_SURFACE_READ:
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 6c401f4..c5b61b7 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -3160,7 +3160,7 @@ fs_visitor::emit_untyped_atomic(unsigned atomic_op, unsigned surf_index,
/* Emit the instruction. */
fs_inst *inst = emit(SHADER_OPCODE_UNTYPED_ATOMIC, dst, src_payload,
- fs_reg(atomic_op), fs_reg(surf_index));
+ fs_reg(surf_index), fs_reg(atomic_op));
inst->mlen = mlen;
}
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
index c97a5ba..5c350fe 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
@@ -1461,9 +1461,9 @@ vec4_generator::generate_code(const cfg_t *cfg)
case SHADER_OPCODE_UNTYPED_ATOMIC:
assert(src[1].file == BRW_IMMEDIATE_VALUE &&
src[2].file == BRW_IMMEDIATE_VALUE);
- brw_untyped_atomic(p, dst, src[0], src[2], src[1].dw1.ud, inst->mlen,
+ brw_untyped_atomic(p, dst, src[0], src[1], src[2].dw1.ud, inst->mlen,
!inst->dst.is_null());
- brw_mark_surface_used(&prog_data->base, src[2].dw1.ud);
+ brw_mark_surface_used(&prog_data->base, src[1].dw1.ud);
break;
case SHADER_OPCODE_UNTYPED_SURFACE_READ:
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index ebd02c6..4afe2c0 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -2954,7 +2954,7 @@ vec4_visitor::emit_untyped_atomic(unsigned atomic_op, unsigned surf_index,
*/
vec4_instruction *inst = emit(SHADER_OPCODE_UNTYPED_ATOMIC, dst,
brw_message_reg(0),
- src_reg(atomic_op), src_reg(surf_index));
+ src_reg(surf_index), src_reg(atomic_op));
inst->base_mrf = 0;
inst->mlen = mlen;
}
--
2.1.3
More information about the mesa-dev
mailing list