summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-03-06 13:22:35 +0100
committerMichel Dänzer <michel@tungstengraphics.com>2007-03-06 13:22:35 +0100
commit6f9b1afc862851532e4820705c412388b497ad58 (patch)
treeb5b173a5e3fcb9908bd3cea4be40c90ea45b1f79 /src/mesa/drivers
parent1c70cde8881f794782780cbd695da0882f78c769 (diff)
r300: Call radeonSetCliprects from radeonMakeCurrent.
Based on a patch by Panagiotis Papadakos. Among other things, this makes sure the framebuffer object associated with the drawable has the correct size when _mesa_make_current is called, so the default viewport is set up correctly. Also update radeon->lastStamp in radeonSetCliprects.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/r300/radeon_context.c3
-rw-r--r--src/mesa/drivers/dri/r300/radeon_lock.c1
-rw-r--r--src/mesa/drivers/dri/r300/radeon_state.c2
3 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/radeon_context.c b/src/mesa/drivers/dri/r300/radeon_context.c
index 3a6bde8fc3..d66f1dc49e 100644
--- a/src/mesa/drivers/dri/r300/radeon_context.c
+++ b/src/mesa/drivers/dri/r300/radeon_context.c
@@ -51,6 +51,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_macros.h"
#include "radeon_reg.h"
+#include "radeon_state.h"
#include "r300_state.h"
#include "utils.h"
@@ -279,6 +280,8 @@ GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv,
r300UpdateWindow(radeon->glCtx);
r300UpdateViewportOffset(radeon->glCtx);
+
+ radeonSetCliprects(radeon);
}
_mesa_make_current(radeon->glCtx,
diff --git a/src/mesa/drivers/dri/r300/radeon_lock.c b/src/mesa/drivers/dri/r300/radeon_lock.c
index a00da6c8bc..1a2dfca7b0 100644
--- a/src/mesa/drivers/dri/r300/radeon_lock.c
+++ b/src/mesa/drivers/dri/r300/radeon_lock.c
@@ -90,7 +90,6 @@ static void r300RegainedLock(radeonContextPtr radeon)
#else
radeonUpdateScissor(radeon->glCtx);
#endif
- radeon->lastStamp = drawable->lastStamp;
}
if (sarea->ctx_owner != radeon->dri.hwContext) {
diff --git a/src/mesa/drivers/dri/r300/radeon_state.c b/src/mesa/drivers/dri/r300/radeon_state.c
index ddadf83a00..902e9583a6 100644
--- a/src/mesa/drivers/dri/r300/radeon_state.c
+++ b/src/mesa/drivers/dri/r300/radeon_state.c
@@ -185,6 +185,8 @@ void radeonSetCliprects(radeonContextPtr radeon)
if (radeon->state.scissor.enabled)
radeonRecalcScissorRects(radeon);
+
+ radeon->lastStamp = drawable->lastStamp;
}