From: Kenneth Graunke Date: Tue, 10 Dec 2013 00:06:51 +0000 (-0800) Subject: i965: Use {point_sprite,flat}_enable variable names instead of dw*. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0d0edf8e4c3c6c102cf5689a36d58532a1863676;p=mesa.git 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 Reviewed-by: Jordan Justen --- 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();