summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-11-01 18:01:23 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-11-01 18:01:47 -0600
commit28bed6d355e7ea3acbc4dbef0490e269d560f89e (patch)
tree1052c04a4a2998fa2e9d88842848091e6a58613e /src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
parent80d2658e129d097f30c84fe57e07daeb81bcc790 (diff)
Use new state tracker context/destroy funcs with wrap Mesa context.
Diffstat (limited to 'src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
index a6d0d43e4d..2ffc757469 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
@@ -30,12 +30,14 @@
#include "intel_swapbuffers.h"
#include "intel_batchbuffer.h"
#include "intel_reg.h"
+#include "intel_winsys.h"
#include "context.h"
#include "utils.h"
#include "drirenderbuffer.h"
#include "vblank.h"
#include "pipe/p_context.h"
+#include "state_tracker/st_context.h"
#include "state_tracker/st_cb_fbo.h"
@@ -95,8 +97,8 @@ intelCopyBuffer(__DRIdrawablePrivate * dPriv,
/* if this drawable isn't currently bound the LOCK_HARDWARE done on the
current context (which is what intelScreenContext should return) might
not get a contended lock and thus cliprects not updated (tests/manywin) */
- if ((struct intel_context *)dPriv->driContextPriv->driverPrivate != intel)
- DRI_VALIDATE_DRAWABLE_INFO(intel->driScreen, dPriv);
+ if ((struct intel_context *)dPriv->driContextPriv->driverPrivate != intel)
+ DRI_VALIDATE_DRAWABLE_INFO(intel->driScreen, dPriv);
if (dPriv && dPriv->numClipRects) {
@@ -210,7 +212,8 @@ intelCopyBuffer(__DRIdrawablePrivate * dPriv,
DRM_BO_MASK_MEM | DRM_BO_FLAG_WRITE, 0);
OUT_BATCH((sbox.y1 << 16) | sbox.x1);
OUT_BATCH((srcpitch * cpp) & 0xffff);
- OUT_RELOC(backRegion->buffer, DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_READ,
+ OUT_RELOC(dri_bo(backRegion->buffer),
+ DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_READ,
DRM_BO_MASK_MEM | DRM_BO_FLAG_READ, 0);
ADVANCE_BATCH();
@@ -245,18 +248,18 @@ intelCopyBuffer(__DRIdrawablePrivate * dPriv,
void
intelWindowMoved(struct intel_context *intel)
{
- GLcontext *ctx = &intel->ctx;
+ GLcontext *ctx = intel->st->ctx;
__DRIdrawablePrivate *dPriv = intel->driDrawable;
struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
- if (!intel->ctx.DrawBuffer) {
+ if (!intel->st->ctx->DrawBuffer) {
/* when would this happen? -BP */
assert(0);
intel->numClipRects = 0;
}
/* Update Mesa's notion of window size */
- driUpdateFramebufferSize(ctx, dPriv);
+ intelUpdateFramebufferSize(ctx, dPriv);
intel_fb->Base.Initialized = GL_TRUE; /* XXX remove someday */
{
@@ -615,7 +618,7 @@ intelCopySubBuffer(__DRIdrawablePrivate * dPriv, int x, int y, int w, int h)
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
struct intel_context *intel =
(struct intel_context *) dPriv->driContextPriv->driverPrivate;
- GLcontext *ctx = &intel->ctx;
+ GLcontext *ctx = intel->st->ctx;
if (ctx->Visual.doubleBufferMode) {
drm_clip_rect_t rect;