summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_clip_util.c
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2013-08-10 21:13:33 -0700
committerPaul Berry <stereotype441@gmail.com>2013-08-23 11:03:08 -0700
commita9e8c10bd76f9a94b878b76bb5ae696beeaae2e0 (patch)
treeea75baf62cb0b5a7c4dbb9e207df75286484c75c /src/mesa/drivers/dri/i965/brw_clip_util.c
parent591fc0861cef499a355c1816641c8c963846b001 (diff)
i965: Combine 4 boolean args of brw_urb_WRITE into a flags bitfield.
The arguments to brw_urb_WRITE() were getting pretty unwieldy, and we have to add more flags to support geometry shaders anyhow. Also plumb these flags through brw_clip_emit_vue(), brw_set_urb_message(), and the vec4_instruction class. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_clip_util.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_util.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip_util.c b/src/mesa/drivers/dri/i965/brw_clip_util.c
index 62172ecf6b..d5c50d7a89 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_util.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_util.c
@@ -313,15 +313,18 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
void brw_clip_emit_vue(struct brw_clip_compile *c,
struct brw_indirect vert,
- bool allocate,
- bool eot,
+ unsigned flags,
GLuint header)
{
struct brw_compile *p = &c->func;
+ bool allocate = flags & BRW_URB_WRITE_ALLOCATE;
brw_clip_ff_sync(c);
- assert(!(allocate && eot));
+ /* Any URB entry that is allocated must subsequently be used or discarded,
+ * so it doesn't make sense to mark EOT and ALLOCATE at the same time.
+ */
+ assert(!(allocate && (flags & BRW_URB_WRITE_EOT)));
/* Copy the vertex from vertn into m1..mN+1:
*/
@@ -343,12 +346,9 @@ void brw_clip_emit_vue(struct brw_clip_compile *c,
allocate ? c->reg.R0 : retype(brw_null_reg(), BRW_REGISTER_TYPE_UD),
0,
c->reg.R0,
- allocate,
- 1, /* used */
+ flags,
c->nr_regs + 1, /* msg length */
allocate ? 1 : 0, /* response_length */
- eot, /* eot */
- 1, /* writes_complete */
0, /* urb offset */
BRW_URB_SWIZZLE_NONE);
}
@@ -367,12 +367,9 @@ void brw_clip_kill_thread(struct brw_clip_compile *c)
retype(brw_null_reg(), BRW_REGISTER_TYPE_UD),
0,
c->reg.R0,
- 0, /* allocate */
- 0, /* used */
+ BRW_URB_WRITE_UNUSED | BRW_URB_WRITE_EOT_COMPLETE,
1, /* msg len */
0, /* response len */
- 1, /* eot */
- 1, /* writes complete */
0,
BRW_URB_SWIZZLE_NONE);
}