diff options
author | Jerome Glisse <[email protected]> | 2006-11-15 17:45:05 +0000 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2006-11-15 17:45:05 +0000 |
commit | 8f6a50a49cd3b7479d1cfcf195b53e6d9b0800dd (patch) | |
tree | 7190690c3fe9e2cfa37e3a5baa8dac9716060e0c /src/mesa/drivers/dri/r200/r200_state.c | |
parent | 222930461f8afef0e130b435a91264a0d4473251 (diff) |
Remove use of GetBufferSize (depreciated).
Diffstat (limited to 'src/mesa/drivers/dri/r200/r200_state.c')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_state.c | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c index 097fbc868a4..dc1fbef72ee 100644 --- a/src/mesa/drivers/dri/r200/r200_state.c +++ b/src/mesa/drivers/dri/r200/r200_state.c @@ -40,6 +40,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "enums.h" #include "colormac.h" #include "light.h" +#include "framebuffer.h" #include "swrast/swrast.h" #include "array_cache/acache.h" @@ -1845,23 +1846,26 @@ static void r200LogicOpCode( GLcontext *ctx, GLenum opcode ) void r200SetCliprects( r200ContextPtr rmesa, GLenum mode ) { - __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; + __DRIdrawablePrivate *const drawable = rmesa->dri.drawable; + __DRIdrawablePrivate *const readable = rmesa->dri.readable; + GLframebuffer *const draw_fb = (GLframebuffer*) drawable->driverPrivate; + GLframebuffer *const read_fb = (GLframebuffer*) readable->driverPrivate; switch ( mode ) { case GL_FRONT_LEFT: - rmesa->numClipRects = dPriv->numClipRects; - rmesa->pClipRects = dPriv->pClipRects; + rmesa->numClipRects = drawable->numClipRects; + rmesa->pClipRects = drawable->pClipRects; break; case GL_BACK_LEFT: /* Can't ignore 2d windows if we are page flipping. */ - if ( dPriv->numBackClipRects == 0 || rmesa->doPageFlip ) { - rmesa->numClipRects = dPriv->numClipRects; - rmesa->pClipRects = dPriv->pClipRects; + if ( drawable->numBackClipRects == 0 || rmesa->doPageFlip ) { + rmesa->numClipRects = drawable->numClipRects; + rmesa->pClipRects = drawable->pClipRects; } else { - rmesa->numClipRects = dPriv->numBackClipRects; - rmesa->pClipRects = dPriv->pBackClipRects; + rmesa->numClipRects = drawable->numBackClipRects; + rmesa->pClipRects = drawable->pBackClipRects; } break; default: @@ -1869,6 +1873,21 @@ void r200SetCliprects( r200ContextPtr rmesa, GLenum mode ) return; } + if ((draw_fb->Width != drawable->w) || (draw_fb->Height != drawable->h)) { + _mesa_resize_framebuffer(rmesa->glCtx, draw_fb, + drawable->w, drawable->h); + draw_fb->Initialized = GL_TRUE; + } + + if (drawable != readable) { + if ((read_fb->Width != readable->w) || + (read_fb->Height != readable->h)) { + _mesa_resize_framebuffer(rmesa->glCtx, read_fb, + readable->w, readable->h); + read_fb->Initialized = GL_TRUE; + } + } + if (rmesa->state.scissor.enabled) r200RecalcScissorRects( rmesa ); } |