diff options
author | Eric Anholt <eric@anholt.net> | 2008-01-10 10:48:05 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-01-10 12:34:08 -0800 |
commit | a04b632350e5d0e9994fc667afc59407a39da0ba (patch) | |
tree | 8907f56e859999fe2448530e4f98fc29656a65b9 /src/mesa/drivers/dri/i965/brw_tex.c | |
parent | 7086df58688dc375ffd4c0fb9a9884eae05a6e46 (diff) |
[intel] Add more cliprect modes to cover other meanings for batch emits.
The previous change gave us only two modes, one which looped over the batch
per cliprect (3d drawing) and one that didn't (state updeast).
However, we really want 4:
- Batch doesn't care about cliprects (state updates)
- Batch needs DRAWING_RECTANGLE looping per cliprect (3d drawing)
- Batch needs to be executed just once (region fills, copies, etc.)
- Batch already includes cliprect handling, and must be flushed by unlock time
(copybuffers, clears).
All callers should now be fixed to use one of these states for any batchbuffer
emits. Thanks to Keith Whitwell for pointing out the failure.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_tex.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_tex.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_tex.c b/src/mesa/drivers/dri/i965/brw_tex.c index b344dd7d27..05f724cc23 100644 --- a/src/mesa/drivers/dri/i965/brw_tex.c +++ b/src/mesa/drivers/dri/i965/brw_tex.c @@ -44,6 +44,7 @@ #include "intel_context.h" #include "intel_ioctl.h" #include "intel_regions.h" +#include "intel_tex.h" #include "brw_context.h" #include "brw_defines.h" @@ -76,3 +77,21 @@ void brw_FrameBufferTexDestroy( struct brw_context *brw ) brw->intel.ctx.Driver.DeleteTexture( &brw->intel.ctx, brw->intel.frame_buffer_texobj ); } + +/** + * Finalizes all textures, completing any rendering that needs to be done + * to prepare them. + */ +void brw_validate_textures( struct brw_context *brw ) +{ + struct intel_context *intel = &brw->intel; + int i; + + for (i = 0; i < BRW_MAX_TEX_UNIT; i++) { + struct gl_texture_unit *texUnit = &brw->attribs.Texture->Unit[i]; + + if (texUnit->_ReallyEnabled) { + intel_finalize_mipmap_tree(intel, i); + } + } +} |