switch (opcode) {
case SHADER_OPCODE_SHADER_TIME_ADD:
case VS_OPCODE_PULL_CONSTANT_LOAD_GEN7:
+ case SHADER_OPCODE_UNTYPED_ATOMIC:
+ case SHADER_OPCODE_UNTYPED_SURFACE_READ:
return true;
default:
return false;
switch (opcode) {
case SHADER_OPCODE_SHADER_TIME_ADD:
+ case SHADER_OPCODE_UNTYPED_ATOMIC:
+ case SHADER_OPCODE_UNTYPED_SURFACE_READ:
return arg == 0 ? mlen : 1;
case VS_OPCODE_PULL_CONSTANT_LOAD_GEN7:
case SHADER_OPCODE_TG4:
case SHADER_OPCODE_TG4_OFFSET:
return inst->header_present ? 1 : 0;
- case SHADER_OPCODE_UNTYPED_ATOMIC:
- case SHADER_OPCODE_UNTYPED_SURFACE_READ:
- return 0;
default:
unreachable("not reached");
}
break;
case SHADER_OPCODE_UNTYPED_ATOMIC:
- assert(src[0].file == BRW_IMMEDIATE_VALUE &&
- src[1].file == BRW_IMMEDIATE_VALUE);
- brw_untyped_atomic(p, dst, brw_message_reg(inst->base_mrf),
- src[1], src[0].dw1.ud, inst->mlen,
+ 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,
!inst->dst.is_null());
- brw_mark_surface_used(&prog_data->base, src[1].dw1.ud);
+ brw_mark_surface_used(&prog_data->base, src[2].dw1.ud);
break;
case SHADER_OPCODE_UNTYPED_SURFACE_READ:
- assert(src[0].file == BRW_IMMEDIATE_VALUE);
- brw_untyped_surface_read(p, dst, brw_message_reg(inst->base_mrf),
- src[0], inst->mlen, 1);
- brw_mark_surface_used(&prog_data->base, src[0].dw1.ud);
+ assert(src[1].file == BRW_IMMEDIATE_VALUE);
+ brw_untyped_surface_read(p, dst, src[0], src[1], inst->mlen, 1);
+ brw_mark_surface_used(&prog_data->base, src[1].dw1.ud);
break;
case VS_OPCODE_UNPACK_FLAGS_SIMD4X2:
* unused channels will be masked out.
*/
vec4_instruction *inst = emit(SHADER_OPCODE_UNTYPED_ATOMIC, dst,
+ brw_message_reg(0),
src_reg(atomic_op), src_reg(surf_index));
- inst->base_mrf = 0;
inst->mlen = mlen;
}
* untyped surface read message, but that's OK because unused
* channels will be masked out.
*/
- vec4_instruction *inst = emit(SHADER_OPCODE_UNTYPED_SURFACE_READ,
- dst, src_reg(surf_index));
- inst->base_mrf = 0;
+ vec4_instruction *inst = emit(SHADER_OPCODE_UNTYPED_SURFACE_READ, dst,
+ brw_message_reg(0), src_reg(surf_index));
inst->mlen = 1;
}