void brw_clip_emit_vue(struct brw_clip_compile *c,
struct brw_indirect vert,
- unsigned flags,
+ enum brw_urb_write_flags flags,
GLuint header);
void brw_clip_kill_thread(struct brw_clip_compile *c);
void brw_clip_emit_vue(struct brw_clip_compile *c,
struct brw_indirect vert,
- unsigned flags,
+ enum brw_urb_write_flags flags,
GLuint header)
{
struct brw_compile *p = &c->func;
GLuint send_commit_msg);
enum brw_urb_write_flags {
+ BRW_URB_WRITE_NO_FLAGS = 0,
+
/**
* Causes a new URB entry to be allocated, and its address stored in the
* destination register (gen < 7).
BRW_URB_WRITE_ALLOCATE | BRW_URB_WRITE_COMPLETE,
};
+#ifdef __cplusplus
+/**
+ * Allow brw_urb_write_flags enums to be ORed together.
+ */
+inline brw_urb_write_flags
+operator|(brw_urb_write_flags x, brw_urb_write_flags y)
+{
+ return static_cast<brw_urb_write_flags>(static_cast<int>(x) |
+ static_cast<int>(y));
+}
+#endif
+
void brw_urb_WRITE(struct brw_compile *p,
struct brw_reg dest,
GLuint msg_reg_nr,
struct brw_reg src0,
- unsigned flags,
+ enum brw_urb_write_flags flags,
GLuint msg_length,
GLuint response_length,
GLuint offset,
static void brw_set_urb_message( struct brw_compile *p,
struct brw_instruction *insn,
- unsigned flags,
+ enum brw_urb_write_flags flags,
GLuint msg_length,
GLuint response_length,
GLuint offset,
struct brw_reg dest,
GLuint msg_reg_nr,
struct brw_reg src0,
- unsigned flags,
+ enum brw_urb_write_flags flags,
GLuint msg_length,
GLuint response_length,
GLuint offset,
brw_null_reg(),
0,
brw_vec8_grf(0, 0), /* r0, will be copied to m0 */
- last ? BRW_URB_WRITE_EOT_COMPLETE : 0,
+ last ? BRW_URB_WRITE_EOT_COMPLETE
+ : BRW_URB_WRITE_NO_FLAGS,
4, /* msg len */
0, /* response len */
i*4, /* offset */
brw_null_reg(),
0,
brw_vec8_grf(0, 0),
- last ? BRW_URB_WRITE_EOT_COMPLETE : 0,
+ last ? BRW_URB_WRITE_EOT_COMPLETE
+ : BRW_URB_WRITE_NO_FLAGS,
4, /* msg len */
0, /* response len */
i*4, /* urb destination offset */
brw_null_reg(),
0,
brw_vec8_grf(0, 0),
- last ? BRW_URB_WRITE_EOT_COMPLETE : 0,
+ last ? BRW_URB_WRITE_EOT_COMPLETE
+ : BRW_URB_WRITE_NO_FLAGS,
4, /* msg len */
0, /* response len */
i*4, /* urb destination offset */
brw_null_reg(),
0,
brw_vec8_grf(0, 0),
- last ? BRW_URB_WRITE_EOT_COMPLETE : 0,
+ last ? BRW_URB_WRITE_EOT_COMPLETE
+ : BRW_URB_WRITE_NO_FLAGS,
4, /* msg len */
0, /* response len */
i*4, /* urb destination offset */
int target; /**< MRT target. */
bool shadow_compare;
- unsigned urb_write_flags;
+ enum brw_urb_write_flags urb_write_flags;
bool header_present;
int mlen; /**< SEND message length */
int base_mrf; /**< First MRF in the SEND message, if mlen is nonzero. */
}
vec4_instruction *inst = emit(VS_OPCODE_URB_WRITE);
- inst->urb_write_flags = complete ? BRW_URB_WRITE_EOT_COMPLETE : 0;
+ inst->urb_write_flags = complete ?
+ BRW_URB_WRITE_EOT_COMPLETE : BRW_URB_WRITE_NO_FLAGS;
return inst;
}