Mesa (master): i965: Move prepare_wm_surfaces texobj declarations inside of _ReallyEnabled.
Eric Anholt
anholt at kemper.freedesktop.org
Tue May 31 19:08:01 UTC 2011
Module: Mesa
Branch: master
Commit: d1946f53482a5a490a1da86d9bf9a3e2e866c0c4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d1946f53482a5a490a1da86d9bf9a3e2e866c0c4
Author: Eric Anholt <eric at anholt.net>
Date: Tue May 17 09:11:38 2011 -0700
i965: Move prepare_wm_surfaces texobj declarations inside of _ReallyEnabled.
Interestingly, the compiler wasn't doing this for us at -O2, so we
were doing the computation for every non-_ReallyEnabled unit.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 5 +++--
1 files changed, 3 insertions(+), 2 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 de1953e..a311176 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -558,10 +558,11 @@ prepare_wm_surfaces(struct brw_context *brw)
for (i = 0; i < BRW_MAX_TEX_UNIT; i++) {
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
- struct gl_texture_object *tObj = texUnit->_Current;
- struct intel_texture_object *intelObj = intel_texture_object(tObj);
if (texUnit->_ReallyEnabled) {
+ struct gl_texture_object *tObj = texUnit->_Current;
+ struct intel_texture_object *intelObj = intel_texture_object(tObj);
+
brw_add_validated_bo(brw, intelObj->mt->region->buffer);
nr_surfaces = SURF_INDEX_TEXTURE(i) + 1;
}
More information about the mesa-commit
mailing list