i965: Reorder sources of the untyped atomic opcode.
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). Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -2017,9 +2017,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:
|
||||
|
||||
@@ -3287,7 +3287,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -1471,9 +1471,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:
|
||||
|
||||
@@ -2962,7 +2962,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->mlen = mlen;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user