struct brw_reg surface,
unsigned atomic_op,
unsigned msg_length,
- bool response_expected);
+ bool response_expected,
+ bool header_present);
void
brw_untyped_surface_read(struct brw_codegen *p,
struct brw_reg payload,
struct brw_reg surface,
unsigned msg_length,
- unsigned num_channels);
+ unsigned num_channels,
+ bool header_present);
void
brw_typed_atomic(struct brw_codegen *p,
struct brw_reg surface,
unsigned atomic_op,
unsigned msg_length,
- bool response_expected);
+ bool response_expected,
+ bool header_present);
void
brw_typed_surface_read(struct brw_codegen *p,
struct brw_reg payload,
struct brw_reg surface,
unsigned msg_length,
- unsigned num_channels);
+ unsigned num_channels,
+ bool header_present);
void
brw_typed_surface_write(struct brw_codegen *p,
struct brw_reg payload,
struct brw_reg surface,
unsigned msg_length,
- unsigned num_channels);
+ unsigned num_channels,
+ bool header_present);
void
brw_byte_scattered_read(struct brw_codegen *p,
struct brw_reg payload,
struct brw_reg surface,
unsigned msg_length,
- unsigned bit_size);
+ unsigned bit_size,
+ bool header_present);
void
brw_memory_fence(struct brw_codegen *p,
struct brw_reg surface,
unsigned atomic_op,
unsigned msg_length,
- bool response_expected)
+ bool response_expected,
+ bool header_present)
{
const struct gen_device_info *devinfo = p->devinfo;
const unsigned sfid = (devinfo->gen >= 8 || devinfo->is_haswell ?
p, sfid, brw_writemask(dst, mask), payload, surface, msg_length,
brw_surface_payload_size(p, response_expected,
devinfo->gen >= 8 || devinfo->is_haswell, true),
- align1);
+ header_present);
brw_set_dp_untyped_atomic_message(
p, insn, atomic_op, response_expected);
struct brw_reg payload,
struct brw_reg surface,
unsigned msg_length,
- unsigned num_channels)
+ unsigned num_channels,
+ bool header_present)
{
const struct gen_device_info *devinfo = p->devinfo;
const unsigned sfid = (devinfo->gen >= 8 || devinfo->is_haswell ?
WRITEMASK_X : WRITEMASK_XYZW;
struct brw_inst *insn = brw_send_indirect_surface_message(
p, sfid, brw_writemask(brw_null_reg(), mask),
- payload, surface, msg_length, 0, align1);
+ payload, surface, msg_length, 0, header_present);
brw_set_dp_untyped_surface_write_message(
p, insn, num_channels);
struct brw_reg payload,
struct brw_reg surface,
unsigned msg_length,
- unsigned bit_size)
+ unsigned bit_size,
+ bool header_present)
{
const struct gen_device_info *devinfo = p->devinfo;
assert(devinfo->gen > 7 || devinfo->is_haswell);
struct brw_inst *insn = brw_send_indirect_surface_message(
p, sfid, brw_writemask(brw_null_reg(), WRITEMASK_XYZW),
- payload, surface, msg_length, 0, true);
+ payload, surface, msg_length, 0, header_present);
unsigned msg_control =
brw_byte_scattered_data_element_from_bit_size(bit_size) << 2;
struct brw_reg surface,
unsigned atomic_op,
unsigned msg_length,
- bool response_expected) {
+ bool response_expected,
+ bool header_present) {
const struct gen_device_info *devinfo = p->devinfo;
const unsigned sfid = (devinfo->gen >= 8 || devinfo->is_haswell ?
HSW_SFID_DATAPORT_DATA_CACHE_1 :
p, sfid, brw_writemask(dst, mask), payload, surface, msg_length,
brw_surface_payload_size(p, response_expected,
devinfo->gen >= 8 || devinfo->is_haswell, false),
- true);
+ header_present);
brw_set_dp_typed_atomic_message(
p, insn, atomic_op, response_expected);
struct brw_reg payload,
struct brw_reg surface,
unsigned msg_length,
- unsigned num_channels)
+ unsigned num_channels,
+ bool header_present)
{
const struct gen_device_info *devinfo = p->devinfo;
const unsigned sfid = (devinfo->gen >= 8 || devinfo->is_haswell ?
p, sfid, dst, payload, surface, msg_length,
brw_surface_payload_size(p, num_channels,
devinfo->gen >= 8 || devinfo->is_haswell, false),
- true);
+ header_present);
brw_set_dp_typed_surface_read_message(
p, insn, num_channels);
struct brw_reg payload,
struct brw_reg surface,
unsigned msg_length,
- unsigned num_channels)
+ unsigned num_channels,
+ bool header_present)
{
const struct gen_device_info *devinfo = p->devinfo;
const unsigned sfid = (devinfo->gen >= 8 || devinfo->is_haswell ?
WRITEMASK_X : WRITEMASK_XYZW);
struct brw_inst *insn = brw_send_indirect_surface_message(
p, sfid, brw_writemask(brw_null_reg(), mask),
- payload, surface, msg_length, 0, true);
+ payload, surface, msg_length, 0, header_present);
brw_set_dp_typed_surface_write_message(
p, insn, num_channels);
case SHADER_OPCODE_UNTYPED_ATOMIC:
assert(src[2].file == BRW_IMMEDIATE_VALUE);
brw_untyped_atomic(p, dst, src[0], src[1], src[2].ud,
- inst->mlen, !inst->dst.is_null());
+ inst->mlen, !inst->dst.is_null(),
+ inst->header_size);
break;
case SHADER_OPCODE_UNTYPED_SURFACE_READ:
+ assert(!inst->header_size);
assert(src[2].file == BRW_IMMEDIATE_VALUE);
brw_untyped_surface_read(p, dst, src[0], src[1],
inst->mlen, src[2].ud);
case SHADER_OPCODE_UNTYPED_SURFACE_WRITE:
assert(src[2].file == BRW_IMMEDIATE_VALUE);
brw_untyped_surface_write(p, src[0], src[1],
- inst->mlen, src[2].ud);
+ inst->mlen, src[2].ud,
+ inst->header_size);
break;
case SHADER_OPCODE_BYTE_SCATTERED_READ:
+ assert(!inst->header_size);
assert(src[2].file == BRW_IMMEDIATE_VALUE);
brw_byte_scattered_read(p, dst, src[0], src[1],
inst->mlen, src[2].ud);
case SHADER_OPCODE_BYTE_SCATTERED_WRITE:
assert(src[2].file == BRW_IMMEDIATE_VALUE);
brw_byte_scattered_write(p, src[0], src[1],
- inst->mlen, src[2].ud);
+ inst->mlen, src[2].ud,
+ inst->header_size);
break;
case SHADER_OPCODE_TYPED_ATOMIC:
assert(src[2].file == BRW_IMMEDIATE_VALUE);
brw_typed_atomic(p, dst, src[0], src[1],
- src[2].ud, inst->mlen, !inst->dst.is_null());
+ src[2].ud, inst->mlen, !inst->dst.is_null(),
+ inst->header_size);
break;
case SHADER_OPCODE_TYPED_SURFACE_READ:
assert(src[2].file == BRW_IMMEDIATE_VALUE);
brw_typed_surface_read(p, dst, src[0], src[1],
- inst->mlen, src[2].ud);
+ inst->mlen, src[2].ud,
+ inst->header_size);
break;
case SHADER_OPCODE_TYPED_SURFACE_WRITE:
assert(src[2].file == BRW_IMMEDIATE_VALUE);
- brw_typed_surface_write(p, src[0], src[1], inst->mlen, src[2].ud);
+ brw_typed_surface_write(p, src[0], src[1], inst->mlen, src[2].ud,
+ inst->header_size);
break;
case SHADER_OPCODE_MEMORY_FENCE:
case SHADER_OPCODE_UNTYPED_ATOMIC:
assert(src[2].file == BRW_IMMEDIATE_VALUE);
brw_untyped_atomic(p, dst, src[0], src[1], src[2].ud, inst->mlen,
- !inst->dst.is_null());
+ !inst->dst.is_null(), inst->header_size);
break;
case SHADER_OPCODE_UNTYPED_SURFACE_READ:
+ assert(!inst->header_size);
assert(src[2].file == BRW_IMMEDIATE_VALUE);
brw_untyped_surface_read(p, dst, src[0], src[1], inst->mlen,
src[2].ud);
case SHADER_OPCODE_UNTYPED_SURFACE_WRITE:
assert(src[2].file == BRW_IMMEDIATE_VALUE);
brw_untyped_surface_write(p, src[0], src[1], inst->mlen,
- src[2].ud);
+ src[2].ud, inst->header_size);
break;
case SHADER_OPCODE_TYPED_ATOMIC:
assert(src[2].file == BRW_IMMEDIATE_VALUE);
brw_typed_atomic(p, dst, src[0], src[1], src[2].ud, inst->mlen,
- !inst->dst.is_null());
+ !inst->dst.is_null(), inst->header_size);
break;
case SHADER_OPCODE_TYPED_SURFACE_READ:
assert(src[2].file == BRW_IMMEDIATE_VALUE);
brw_typed_surface_read(p, dst, src[0], src[1], inst->mlen,
- src[2].ud);
+ src[2].ud, inst->header_size);
break;
case SHADER_OPCODE_TYPED_SURFACE_WRITE:
assert(src[2].file == BRW_IMMEDIATE_VALUE);
brw_typed_surface_write(p, src[0], src[1], inst->mlen,
- src[2].ud);
+ src[2].ud, inst->header_size);
break;
case SHADER_OPCODE_MEMORY_FENCE: