Mesa (master): i965: Use 4 bits to store nr_userclip in brw_clip.h.

Paul Berry stereotype441 at kemper.freedesktop.org
Wed Sep 28 18:39:10 UTC 2011


Module: Mesa
Branch: master
Commit: e6c8027ccb44de58a51956306dfe93146dcbf526
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e6c8027ccb44de58a51956306dfe93146dcbf526

Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Sep 20 16:20:32 2011 -0700

i965: Use 4 bits to store nr_userclip in brw_clip.h.

Since the i965 driver supports 8 clipping planes now, we need 4 bits
to store the number of user clipping planes, not 3.

In theory this isn't strictly necessary, since brw_clip.h is only used
on pre-GEN6, and pre-GEN6 only advertises support for 6 clipping
planes, but it seems wise to err on the safe side.

In the process I removed the pad0 element of struct
brw_clip_prog_key--it doesn't seem necessary because the compiler
automatically inserts padding if needed.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_clip.h |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_clip.h b/src/mesa/drivers/dri/i965/brw_clip.h
index 8647847..8fcf14e 100644
--- a/src/mesa/drivers/dri/i965/brw_clip.h
+++ b/src/mesa/drivers/dri/i965/brw_clip.h
@@ -44,7 +44,7 @@
 struct brw_clip_prog_key {
    GLbitfield64 attrs;
    GLuint primitive:4;
-   GLuint nr_userclip:3;
+   GLuint nr_userclip:4;
    GLuint do_flat_shading:1;
    GLuint pv_first:1;
    GLuint do_unfilled:1;
@@ -55,7 +55,6 @@ struct brw_clip_prog_key {
    GLuint copy_bfc_cw:1;
    GLuint copy_bfc_ccw:1;
    GLuint clip_mode:3;
-   GLuint pad0:11;
 
    GLfloat offset_factor;
    GLfloat offset_units;




More information about the mesa-commit mailing list