fix resize bugs (fb size updated too late), fix typos, cleanups...
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user