aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vs_emit.c
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2011-09-27 12:33:28 -0700
committerPaul Berry <[email protected]>2011-10-06 19:29:07 -0700
commit18e2e19b07b312c978dfbb6d336f69fa84b3ffe2 (patch)
treea3d3e6026db55557c29da31d19fa6a47185a324e /src/mesa/drivers/dri/i965/brw_vs_emit.c
parent8f6920a7b69bd20f04f807e88c22cf1eb78b4e79 (diff)
i965: Make brw_compute_vue_map's userclip dependency a boolean.
Previously, brw_compute_vue_map required an argument indicating the number of clip planes in use, but all it did with it was check if it was nonzero. This patch changes brw_compute_vue_map to take a boolean instead. This allows us to avoid some unnecessary recompilation of the Gen4/5 GS and SF threads. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vs_emit.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_emit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c
index 4f7a4422d76..e78cb6c60d4 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c
@@ -202,7 +202,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
/* User clip planes from curbe:
*/
- if (c->key.nr_userclip) {
+ if (c->key.userclip_active) {
if (intel->gen >= 6) {
for (i = 0; i < c->key.nr_userclip; i++) {
c->userplane[i] = stride(brw_vec4_grf(reg + i / 2,
@@ -325,7 +325,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
/* Allocate outputs. The non-position outputs go straight into message regs.
*/
- brw_compute_vue_map(&c->vue_map, intel, c->key.nr_userclip,
+ brw_compute_vue_map(&c->vue_map, intel, c->key.userclip_active,
c->prog_data.outputs_written);
c->first_output = reg;
@@ -1564,7 +1564,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
}
/* Set the user clip distances in dword 8-15. (m3-4)*/
- if (c->key.nr_userclip) {
+ if (c->key.userclip_active) {
for (i = 0; i < c->key.nr_userclip; i++) {
struct brw_reg m;
if (i < 4)
@@ -1577,7 +1577,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
}
} else if ((c->prog_data.outputs_written &
BITFIELD64_BIT(VERT_RESULT_PSIZ)) ||
- c->key.nr_userclip || brw->has_negative_rhw_bug) {
+ c->key.userclip_active || brw->has_negative_rhw_bug) {
struct brw_reg header1 = retype(get_tmp(c), BRW_REGISTER_TYPE_UD);
GLuint i;
@@ -1649,7 +1649,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
*/
brw_MOV(p, brw_message_reg(2), pos);
len_vertex_header = 1;
- if (c->key.nr_userclip > 0)
+ if (c->key.userclip_active)
len_vertex_header += 2;
} else if (intel->gen == 5) {
/* There are 20 DWs (D0-D19) in VUE header on Ironlake: