summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2011-11-01 16:08:03 -0700
committerKenneth Graunke <[email protected]>2011-11-10 22:51:19 -0800
commite4b1c9b4bebd8f1fe851617e9ad350e45435e130 (patch)
treed9572df21b8280b5719063c5084a9d65fdb5d18a /src
parent6ba9090ea05e817bd38c1fcc63c53168b16593c7 (diff)
i965: Remove nr_surfaces computation from brw_update_wm_surfaces.
This code is fairly fragile, as it depends on the ordering of the entries in the binding table, which will change soon. Also, stop listening on the BRW_NEW_WM_CONSTBUF dirty bit as it's no longer required. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index df7a0ca5c67..cca1d48439c 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -587,7 +587,6 @@ brw_upload_wm_surfaces(struct brw_context *brw)
struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &brw->intel.ctx;
GLuint i;
- int nr_surfaces = 0;
/* _NEW_BUFFERS | _NEW_COLOR */
/* Update surfaces for drawing buffers */
@@ -599,15 +598,8 @@ brw_upload_wm_surfaces(struct brw_context *brw)
intel->vtbl.update_null_renderbuffer_surface(brw, i);
}
}
- nr_surfaces = SURF_INDEX_DRAW(ctx->DrawBuffer->_NumColorDrawBuffers);
} else {
intel->vtbl.update_null_renderbuffer_surface(brw, 0);
- nr_surfaces = SURF_INDEX_DRAW(0) + 1;
- }
-
- /* BRW_NEW_WM_CONSTBUF */
- if (brw->wm.const_bo) {
- nr_surfaces = SURF_INDEX_FRAG_CONST_BUFFER + 1;
}
/* Update surfaces for textures */
@@ -618,7 +610,6 @@ brw_upload_wm_surfaces(struct brw_context *brw)
/* _NEW_TEXTURE */
if (texUnit->_ReallyEnabled) {
intel->vtbl.update_texture_surface(ctx, i);
- nr_surfaces = SURF_INDEX_TEXTURE(i) + 1;
} else {
brw->wm.surf_offset[surf] = 0;
}
@@ -632,8 +623,7 @@ const struct brw_tracked_state brw_wm_surfaces = {
.mesa = (_NEW_COLOR |
_NEW_TEXTURE |
_NEW_BUFFERS),
- .brw = (BRW_NEW_BATCH |
- BRW_NEW_WM_CONSTBUF),
+ .brw = BRW_NEW_BATCH,
.cache = 0
},
.emit = brw_upload_wm_surfaces,