}
static inline bool
-brw_message_desc_header_present(const struct gen_device_info *devinfo,
+brw_message_desc_header_present(MAYBE_UNUSED const struct gen_device_info *devinfo,
uint32_t desc)
{
assert(devinfo->gen >= 5);
}
static inline unsigned
-brw_message_ex_desc(const struct gen_device_info *devinfo,
+brw_message_ex_desc(UNUSED const struct gen_device_info *devinfo,
unsigned ex_msg_length)
{
return SET_BITS(ex_msg_length, 9, 6);
}
static inline unsigned
-brw_message_ex_desc_ex_mlen(const struct gen_device_info *devinfo,
+brw_message_ex_desc_ex_mlen(UNUSED const struct gen_device_info *devinfo,
uint32_t ex_desc)
{
return GET_BITS(ex_desc, 9, 6);
}
static inline unsigned
-brw_sampler_desc_binding_table_index(const struct gen_device_info *devinfo,
+brw_sampler_desc_binding_table_index(UNUSED const struct gen_device_info *devinfo,
uint32_t desc)
{
return GET_BITS(desc, 7, 0);
}
static inline unsigned
-brw_sampler_desc_sampler(const struct gen_device_info *devinfo, uint32_t desc)
+brw_sampler_desc_sampler(UNUSED const struct gen_device_info *devinfo, uint32_t desc)
{
return GET_BITS(desc, 11, 8);
}
}
static inline unsigned
-brw_sampler_desc_return_format(const struct gen_device_info *devinfo,
+brw_sampler_desc_return_format(MAYBE_UNUSED const struct gen_device_info *devinfo,
uint32_t desc)
{
assert(devinfo->gen == 4 && !devinfo->is_g4x);
}
static inline unsigned
-brw_dp_desc_binding_table_index(const struct gen_device_info *devinfo,
+brw_dp_desc_binding_table_index(UNUSED const struct gen_device_info *devinfo,
uint32_t desc)
{
return GET_BITS(desc, 7, 0);
return brw_dp_desc(devinfo, BRW_BTI_STATELESS, msg_type, msg_control);
}
+static inline uint32_t
+brw_dp_a64_untyped_atomic_desc(const struct gen_device_info *devinfo,
+ MAYBE_UNUSED unsigned exec_size, /**< 0 for SIMD4x2 */
+ unsigned bit_size,
+ unsigned atomic_op,
+ bool response_expected)
+{
+ assert(exec_size == 8);
+ assert(devinfo->gen >= 8);
+ assert(bit_size == 32 || bit_size == 64);
+
+ const unsigned msg_type = GEN8_DATAPORT_DC_PORT1_A64_UNTYPED_ATOMIC_OP;
+
+ const unsigned msg_control =
+ SET_BITS(atomic_op, 3, 0) |
+ SET_BITS(bit_size == 64, 4, 4) |
+ SET_BITS(response_expected, 5, 5);
+
+ return brw_dp_desc(devinfo, BRW_BTI_STATELESS, msg_type, msg_control);
+}
+
+static inline uint32_t
+brw_dp_a64_untyped_atomic_float_desc(const struct gen_device_info *devinfo,
+ MAYBE_UNUSED unsigned exec_size,
+ unsigned atomic_op,
+ bool response_expected)
+{
+ assert(exec_size == 8);
+ assert(devinfo->gen >= 9);
+
+ assert(exec_size > 0);
+ const unsigned msg_type = GEN9_DATAPORT_DC_PORT1_A64_UNTYPED_ATOMIC_FLOAT_OP;
+
+ const unsigned msg_control =
+ SET_BITS(atomic_op, 1, 0) |
+ SET_BITS(response_expected, 5, 5);
+
+ return brw_dp_desc(devinfo, BRW_BTI_STATELESS, msg_type, msg_control);
+}
+
static inline uint32_t
brw_dp_typed_atomic_desc(const struct gen_device_info *devinfo,
unsigned exec_size,
struct brw_reg dst,
struct brw_reg payload,
struct brw_reg desc,
- unsigned desc_imm);
+ unsigned desc_imm,
+ bool eot);
void
brw_send_indirect_split_message(struct brw_codegen *p,
struct brw_reg desc,
unsigned desc_imm,
struct brw_reg ex_desc,
- unsigned ex_desc_imm);
+ unsigned ex_desc_imm,
+ bool eot);
void brw_ff_sync(struct brw_codegen *p,
struct brw_reg dest,
unsigned num_channels,
bool header_present);
-void
-brw_typed_atomic(struct brw_codegen *p,
- struct brw_reg dst,
- struct brw_reg payload,
- struct brw_reg surface,
- unsigned atomic_op,
- unsigned msg_length,
- bool response_expected,
- bool header_present);
-
-void
-brw_typed_surface_read(struct brw_codegen *p,
- struct brw_reg dst,
- struct brw_reg payload,
- struct brw_reg surface,
- unsigned msg_length,
- 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,
- bool header_present);
-
void
brw_memory_fence(struct brw_codegen *p,
struct brw_reg dst,