summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-12-09 16:06:51 -0800
committerKenneth Graunke <[email protected]>2013-12-20 12:25:33 -0800
commit0d0edf8e4c3c6c102cf5689a36d58532a1863676 (patch)
tree46c598207e36b00b92f1a91ab601a49172bf366e /src/mesa/drivers
parent23fc845f81f55332aef509b5eb0610bb6a0df4bc (diff)
i965: Use {point_sprite,flat}_enable variable names instead of dw*.
Calling the local variables flat_enable and point_sprite_enable is clearer than dw16 and such. It also matches the names used in calculate_attr_overrides, which computes them. v2: Add /* dw16 */ and /* dw10 */ comments, requested by Jordan. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sf_state.c12
-rw-r--r--src/mesa/drivers/dri/i965/gen7_sf_state.c12
2 files changed, 14 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c
index a205f64805c..ed0b4294caf 100644
--- a/src/mesa/drivers/dri/i965/gen6_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c
@@ -227,7 +227,9 @@ upload_sf_state(struct brw_context *brw)
struct gl_context *ctx = &brw->ctx;
/* CACHE_NEW_WM_PROG */
uint32_t num_outputs = brw->wm.prog_data->num_varying_inputs;
- uint32_t dw1, dw2, dw3, dw4, dw16, dw17;
+ uint32_t dw1, dw2, dw3, dw4;
+ uint32_t point_sprite_enables;
+ uint32_t flat_enables;
int i;
/* _NEW_BUFFER */
bool render_to_fbo = _mesa_is_user_fbo(ctx->DrawBuffer);
@@ -373,8 +375,8 @@ upload_sf_state(struct brw_context *brw)
* CACHE_NEW_WM_PROG
*/
uint32_t urb_entry_read_length;
- calculate_attr_overrides(brw, attr_overrides, &dw16, &dw17,
- &urb_entry_read_length);
+ calculate_attr_overrides(brw, attr_overrides, &point_sprite_enables,
+ &flat_enables, &urb_entry_read_length);
dw1 |= (urb_entry_read_length << GEN6_SF_URB_ENTRY_READ_LENGTH_SHIFT |
urb_entry_read_offset << GEN6_SF_URB_ENTRY_READ_OFFSET_SHIFT);
@@ -390,8 +392,8 @@ upload_sf_state(struct brw_context *brw)
for (i = 0; i < 8; i++) {
OUT_BATCH(attr_overrides[i * 2] | attr_overrides[i * 2 + 1] << 16);
}
- OUT_BATCH(dw16); /* point sprite texcoord bitmask */
- OUT_BATCH(dw17); /* constant interp bitmask */
+ OUT_BATCH(point_sprite_enables); /* dw16 */
+ OUT_BATCH(flat_enables);
OUT_BATCH(0); /* wrapshortest enables 0-7 */
OUT_BATCH(0); /* wrapshortest enables 8-15 */
ADVANCE_BATCH();
diff --git a/src/mesa/drivers/dri/i965/gen7_sf_state.c b/src/mesa/drivers/dri/i965/gen7_sf_state.c
index 5181d9810b1..8d86280d75e 100644
--- a/src/mesa/drivers/dri/i965/gen7_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_sf_state.c
@@ -35,7 +35,9 @@ upload_sbe_state(struct brw_context *brw)
struct gl_context *ctx = &brw->ctx;
/* CACHE_NEW_WM_PROG */
uint32_t num_outputs = brw->wm.prog_data->num_varying_inputs;
- uint32_t dw1, dw10, dw11;
+ uint32_t dw1;
+ uint32_t point_sprite_enables;
+ uint32_t flat_enables;
int i;
const int urb_entry_read_offset = BRW_SF_URB_ENTRY_READ_OFFSET;
uint16_t attr_overrides[16];
@@ -62,8 +64,8 @@ upload_sbe_state(struct brw_context *brw)
* CACHE_NEW_WM_PROG
*/
uint32_t urb_entry_read_length;
- calculate_attr_overrides(brw, attr_overrides, &dw10, &dw11,
- &urb_entry_read_length);
+ calculate_attr_overrides(brw, attr_overrides, &point_sprite_enables,
+ &flat_enables, &urb_entry_read_length);
dw1 |= urb_entry_read_length << GEN7_SBE_URB_ENTRY_READ_LENGTH_SHIFT |
urb_entry_read_offset << GEN7_SBE_URB_ENTRY_READ_OFFSET_SHIFT;
@@ -76,8 +78,8 @@ upload_sbe_state(struct brw_context *brw)
OUT_BATCH(attr_overrides[i * 2] | attr_overrides[i * 2 + 1] << 16);
}
- OUT_BATCH(dw10); /* point sprite texcoord bitmask */
- OUT_BATCH(dw11); /* constant interp bitmask */
+ OUT_BATCH(point_sprite_enables); /* dw10 */
+ OUT_BATCH(flat_enables);
OUT_BATCH(0); /* wrapshortest enables 0-7 */
OUT_BATCH(0); /* wrapshortest enables 8-15 */
ADVANCE_BATCH();