aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_cb_blit.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-13 12:16:00 +0200
committermarha <marha@users.sourceforge.net>2012-07-13 12:16:00 +0200
commitdcf9ae77854778629cabd0d6943dda3678eb91fa (patch)
tree087d3bb4beb55bcc0c5857b41d2b5b10edd0e2f3 /mesalib/src/mesa/state_tracker/st_cb_blit.c
parent2c8d7aa6bda138693fa1827852ba6b75d1721ff8 (diff)
parentf0a7d1d88be0c31bd471f4428c4493a93f2d9321 (diff)
downloadvcxsrv-dcf9ae77854778629cabd0d6943dda3678eb91fa.tar.gz
vcxsrv-dcf9ae77854778629cabd0d6943dda3678eb91fa.tar.bz2
vcxsrv-dcf9ae77854778629cabd0d6943dda3678eb91fa.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/glx/glxext.c xorg-server/hw/xwin/InitOutput.c
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_blit.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_blit.c37
1 files changed, 31 insertions, 6 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_blit.c b/mesalib/src/mesa/state_tracker/st_cb_blit.c
index 27da2c633..1486779fd 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_blit.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_blit.c
@@ -242,7 +242,7 @@ st_BlitFramebuffer(struct gl_context *ctx,
srcX0, srcY0, srcX1, srcY1,
srcAtt->Zoffset + srcAtt->CubeMapFace,
dstSurf, dstX0, dstY0, dstX1, dstY1,
- 0.0, pFilter);
+ 0.0, pFilter, TGSI_WRITEMASK_XYZW, 0);
}
else {
struct st_renderbuffer *srcRb =
@@ -257,7 +257,7 @@ st_BlitFramebuffer(struct gl_context *ctx,
srcX0, srcY0, srcX1, srcY1,
srcSurf->u.tex.first_layer,
dstSurf, dstX0, dstY0, dstX1, dstY1,
- 0.0, pFilter);
+ 0.0, pFilter, TGSI_WRITEMASK_XYZW, 0);
}
}
@@ -281,6 +281,13 @@ st_BlitFramebuffer(struct gl_context *ctx,
struct pipe_surface *dstDepthSurf =
dstDepthRb ? dstDepthRb->surface : NULL;
+ struct st_renderbuffer *srcStencilRb =
+ st_renderbuffer(readFB->Attachment[BUFFER_STENCIL].Renderbuffer);
+ struct st_renderbuffer *dstStencilRb =
+ st_renderbuffer(drawFB->Attachment[BUFFER_STENCIL].Renderbuffer);
+ struct pipe_surface *dstStencilSurf =
+ dstStencilRb ? dstStencilRb->surface : NULL;
+
if ((mask & depthStencil) == depthStencil &&
st_is_depth_stencil_combined(srcDepth, srcStencil) &&
st_is_depth_stencil_combined(dstDepth, dstStencil)) {
@@ -294,7 +301,15 @@ st_BlitFramebuffer(struct gl_context *ctx,
srcX0, srcY0, srcX1, srcY1,
srcDepthRb->surface->u.tex.first_layer,
dstDepthSurf, dstX0, dstY0, dstX1, dstY1,
- 0.0, pFilter);
+ 0.0, pFilter, 0,
+ BLIT_WRITEMASK_Z |
+ (st->has_stencil_export ? BLIT_WRITEMASK_STENCIL
+ : 0));
+
+ if (!st->has_stencil_export) {
+ _mesa_problem(ctx, "st_BlitFramebuffer(STENCIL) "
+ "software fallback not implemented");
+ }
}
else {
/* blitting depth and stencil separately */
@@ -305,12 +320,22 @@ st_BlitFramebuffer(struct gl_context *ctx,
srcX0, srcY0, srcX1, srcY1,
srcDepthRb->surface->u.tex.first_layer,
dstDepthSurf, dstX0, dstY0, dstX1, dstY1,
- 0.0, pFilter);
+ 0.0, pFilter, 0, BLIT_WRITEMASK_Z);
}
if (mask & GL_STENCIL_BUFFER_BIT) {
- /* blit stencil only */
- _mesa_problem(ctx, "st_BlitFramebuffer(STENCIL) not completed");
+ if (st->has_stencil_export) {
+ util_blit_pixels(st->blit, srcStencilRb->texture,
+ srcStencilRb->surface->u.tex.level,
+ srcX0, srcY0, srcX1, srcY1,
+ srcStencilRb->surface->u.tex.first_layer,
+ dstStencilSurf, dstX0, dstY0, dstX1, dstY1,
+ 0.0, pFilter, 0, BLIT_WRITEMASK_STENCIL);
+ }
+ else {
+ _mesa_problem(ctx, "st_BlitFramebuffer(STENCIL) "
+ "software fallback not implemented");
+ }
}
}
}