diff options
author | Roland Scheidegger <[email protected]> | 2007-07-16 20:53:33 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2007-07-16 20:53:33 +0200 |
commit | cc9cf90b090b80e51ac03af6fe113287e083accd (patch) | |
tree | d831c24b909e90748aeb3c3acc2a19621e83192d /src/mesa/drivers/dri/i915tex | |
parent | 5fc7973d5493039e4b3037eae10e9a005d4cf717 (diff) |
fix resize bugs (fb size updated too late), fix typos, cleanups...
Diffstat (limited to 'src/mesa/drivers/dri/i915tex')
-rw-r--r-- | src/mesa/drivers/dri/i915tex/i915_state.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_buffers.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_pixel_copy.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_pixel_draw.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_screen.c | 2 |
5 files changed, 14 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i915tex/i915_state.c b/src/mesa/drivers/dri/i915tex/i915_state.c index e5d8d279936..f523206befc 100644 --- a/src/mesa/drivers/dri/i915tex/i915_state.c +++ b/src/mesa/drivers/dri/i915tex/i915_state.c @@ -904,6 +904,7 @@ i915_init_packets(struct i915_context *i915) { I915_STATECHANGE(i915, I915_UPLOAD_BUFFERS); +#if 0 /* color buffer offset/stride */ i915->state.Buffer[I915_DESTREG_CBUFADDR0] = _3DSTATE_BUF_INFO_CMD; /* XXX FBO: remove this? Also get set in i915_set_draw_region() */ @@ -914,6 +915,7 @@ i915_init_packets(struct i915_context *i915) /* XXX FBO: remove this? Also get set in i915_set_draw_region() */ i915->state.Buffer[I915_DESTREG_DBUFADDR1] = (BUF_3D_ID_DEPTH | BUF_3D_PITCH(screen->depth.pitch) | /* pitch in bytes */ BUF_3D_USE_FENCE); +#endif i915->state.Buffer[I915_DESTREG_DV0] = _3DSTATE_DST_BUF_VARS_CMD; diff --git a/src/mesa/drivers/dri/i915tex/intel_buffers.c b/src/mesa/drivers/dri/i915tex/intel_buffers.c index d3d97f8df0a..74e2bfd769c 100644 --- a/src/mesa/drivers/dri/i915tex/intel_buffers.c +++ b/src/mesa/drivers/dri/i915tex/intel_buffers.c @@ -160,6 +160,9 @@ intelWindowMoved(struct intel_context *intel) intel->numClipRects = 0; } + /* Update Mesa's notion of window size */ + driUpdateFramebufferSize(ctx, dPriv); + intel_fb->Base.Initialized = GL_TRUE; /* XXX remove someday */ if (intel->intelScreen->driScrnPriv->ddxMinor >= 7) { drmI830Sarea *sarea = intel->sarea; @@ -277,10 +280,6 @@ intelWindowMoved(struct intel_context *intel) intel_fb->vblank_flags &= ~VBLANK_FLAG_SECONDARY; } - /* Update Mesa's notion of window size */ - driUpdateFramebufferSize(ctx, dPriv); - intel_fb->Base.Initialized = GL_TRUE; /* XXX remove someday */ - /* Update hardware scissor */ ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y, ctx->Scissor.Width, ctx->Scissor.Height); @@ -707,6 +706,9 @@ intelPageFlip(const __DRIdrawablePrivate * dPriv) intel_flip_renderbuffers(intel_fb); intel_draw_buffer(&intel->ctx, &intel_fb->Base); + if (INTEL_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s: success\n", __FUNCTION__); + return GL_TRUE; } diff --git a/src/mesa/drivers/dri/i915tex/intel_pixel_copy.c b/src/mesa/drivers/dri/i915tex/intel_pixel_copy.c index 3148a2b0d42..ad111d4d721 100644 --- a/src/mesa/drivers/dri/i915tex/intel_pixel_copy.c +++ b/src/mesa/drivers/dri/i915tex/intel_pixel_copy.c @@ -263,7 +263,7 @@ do_blit_copypixels(GLcontext * ctx, || !(irbread->region->cpp == 2)) return GL_FALSE; } - else if (GL_DEPTH_STENCIL_EXT) { + else if (type == GL_DEPTH_STENCIL_EXT) { /* Does it matter whether it is stencil/depth or depth/stencil? */ irbread = intel_renderbuffer(ctx->ReadBuffer->_DepthBuffer->Wrapped); @@ -271,7 +271,7 @@ do_blit_copypixels(GLcontext * ctx, if (!irbread || !irbread->region || !irbdraw || !irbdraw->region) return GL_FALSE; } - else if (GL_STENCIL) { + else if (type == GL_STENCIL) { /* Don't think this is really possible. */ return GL_FALSE; diff --git a/src/mesa/drivers/dri/i915tex/intel_pixel_draw.c b/src/mesa/drivers/dri/i915tex/intel_pixel_draw.c index 1c83028d8ab..eebd63ec014 100644 --- a/src/mesa/drivers/dri/i915tex/intel_pixel_draw.c +++ b/src/mesa/drivers/dri/i915tex/intel_pixel_draw.c @@ -237,14 +237,14 @@ do_blit_drawpixels(GLcontext * ctx, if (!irbdraw || !irbdraw->region || !(irbdraw->region->cpp == 2)) return GL_FALSE; } - else if (GL_DEPTH_STENCIL_EXT) { + else if (type == GL_DEPTH_STENCIL_EXT) { /* Does it matter whether it is stencil/depth or depth/stencil? */ irbdraw = intel_renderbuffer(ctx->DrawBuffer->_DepthBuffer->Wrapped); if (!irbdraw || !irbdraw->region) return GL_FALSE; } - else if (GL_STENCIL) { + else if (type == GL_STENCIL) { /* Don't think this is really possible. */ return GL_FALSE; diff --git a/src/mesa/drivers/dri/i915tex/intel_screen.c b/src/mesa/drivers/dri/i915tex/intel_screen.c index dcc29923834..f0d1439dd70 100644 --- a/src/mesa/drivers/dri/i915tex/intel_screen.c +++ b/src/mesa/drivers/dri/i915tex/intel_screen.c @@ -355,6 +355,7 @@ intelUpdateScreenFromSAREA(intelScreenPrivate * intelScreen, intelScreen->front.handle = sarea->front_handle; intelScreen->front.size = sarea->front_size; +#if 0 intelScreen->back.offset = sarea->back_offset; intelScreen->back.pitch = sarea->pitch * intelScreen->cpp; intelScreen->back.handle = sarea->back_handle; @@ -376,6 +377,7 @@ intelUpdateScreenFromSAREA(intelScreenPrivate * intelScreen, intelScreen->logTextureGranularity = sarea->log_tex_granularity; intelScreen->tex.handle = sarea->tex_handle; intelScreen->tex.size = sarea->tex_size; +#endif intelScreen->rotated.offset = sarea->rotated_offset; intelScreen->rotated.pitch = sarea->rotated_pitch * intelScreen->cpp; |