diff options
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_context.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_context.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_state.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_state.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_state.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/swrast/swrast.c | 3 |
7 files changed, 23 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index 4d89af182d5..4f6bdb74e7c 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b/src/mesa/drivers/dri/i915/i915_context.c @@ -27,6 +27,7 @@ #include "i915_context.h" #include "main/api_exec.h" +#include "main/framebuffer.h" #include "main/imports.h" #include "main/macros.h" #include "main/version.h" @@ -62,6 +63,9 @@ i915InvalidateState(struct gl_context * ctx) _tnl_invalidate_vertex_state(ctx, new_state); intel_context(ctx)->NewGLState |= new_state; + if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT)) + _mesa_update_draw_buffer_bounds(ctx, ctx->DrawBuffer); + /* Todo: gather state values under which tracked parameters become * invalidated, add callbacks for things like * ProgramLocalParameters, etc. diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index 7f3924573f9..e0766a0e3f3 100644 --- a/src/mesa/drivers/dri/i915/intel_context.c +++ b/src/mesa/drivers/dri/i915/intel_context.c @@ -324,6 +324,9 @@ intelInvalidateState(struct gl_context * ctx) intel->NewGLState |= new_state; + if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT)) + _mesa_update_draw_buffer_bounds(ctx, ctx->DrawBuffer); + if (intel->vtbl.invalidate_state) intel->vtbl.invalidate_state( intel, new_state ); } diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index e9de5b7b238..e921a41c827 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -203,6 +203,9 @@ intel_update_state(struct gl_context * ctx) _mesa_unlock_context_textures(ctx); + if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT)) + _mesa_update_draw_buffer_bounds(ctx, ctx->DrawBuffer); + if (new_state & (_NEW_STENCIL | _NEW_BUFFERS)) { brw->stencil_enabled = _mesa_stencil_is_enabled(ctx); brw->stencil_two_sided = _mesa_stencil_is_two_sided(ctx); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index 6d998fca832..1aa26e955bf 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -32,6 +32,7 @@ #include "swrast/swrast.h" #include "tnl/tnl.h" #include "util/bitscan.h" +#include "main/framebuffer.h" static void nouveau_alpha_func(struct gl_context *ctx, GLenum func, GLfloat ref) @@ -456,6 +457,9 @@ nouveau_update_state(struct gl_context *ctx) GLbitfield new_state = ctx->NewState; int i; + if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT)) + _mesa_update_draw_buffer_bounds(ctx, ctx->DrawBuffer); + if (new_state & (_NEW_PROJECTION | _NEW_MODELVIEW)) context_dirty(ctx, PROJECTION); diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c index 30437e3201a..b157572832c 100644 --- a/src/mesa/drivers/dri/r200/r200_state.c +++ b/src/mesa/drivers/dri/r200/r200_state.c @@ -2282,6 +2282,9 @@ static void r200InvalidateState(struct gl_context *ctx) r200ContextPtr rmesa = R200_CONTEXT(ctx); + if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT)) + _mesa_update_draw_buffer_bounds(ctx, ctx->DrawBuffer); + _swrast_InvalidateState( ctx, new_state ); _swsetup_InvalidateState( ctx, new_state ); _tnl_InvalidateState( ctx, new_state ); diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c index 940f8de3b48..d2ca812155f 100644 --- a/src/mesa/drivers/dri/radeon/radeon_state.c +++ b/src/mesa/drivers/dri/radeon/radeon_state.c @@ -2048,6 +2048,9 @@ static void radeonInvalidateState(struct gl_context *ctx) { GLuint new_state = ctx->NewState; + if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT)) + _mesa_update_draw_buffer_bounds(ctx, ctx->DrawBuffer); + _swrast_InvalidateState( ctx, new_state ); _swsetup_InvalidateState( ctx, new_state ); _tnl_InvalidateState( ctx, new_state ); diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index 3b1de420f6d..e66b2257de8 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -701,6 +701,9 @@ update_state(struct gl_context *ctx) { GLuint new_state = ctx->NewState; + if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT)) + _mesa_update_draw_buffer_bounds(ctx, ctx->DrawBuffer); + /* not much to do here - pass it on */ _swrast_InvalidateState( ctx, new_state ); _swsetup_InvalidateState( ctx, new_state ); |