summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2017-11-10 13:13:46 -0700
committerBrian Paul <[email protected]>2017-11-15 16:12:43 -0700
commit824e8084ed557061cd7a008b08da15897277d66e (patch)
tree5e6d968b272cbc3941104be158c1f59a15f45cce /src
parentcacb88490a98af2d9abc582acef385c7b9d1a372 (diff)
svga: issue debug warning for unsupported two-sided stencil state
We only have a single stencil read mask and write mask. Issue a warning if different front/back values are used. The Piglit gl-2.0-two-sided-stencil test hits this. Reviewed-by: Neha Bhende <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/svga/svga_pipe_depthstencil.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_depthstencil.c b/src/gallium/drivers/svga/svga_pipe_depthstencil.c
index 1b62290446b..e5caa4b2771 100644
--- a/src/gallium/drivers/svga/svga_pipe_depthstencil.c
+++ b/src/gallium/drivers/svga/svga_pipe_depthstencil.c
@@ -172,6 +172,21 @@ svga_create_depth_stencil_state(struct pipe_context *pipe,
ds->stencil_mask = templ->stencil[1].valuemask & 0xff;
ds->stencil_writemask = templ->stencil[1].writemask & 0xff;
+
+ if (templ->stencil[1].valuemask != templ->stencil[0].valuemask) {
+ pipe_debug_message(&svga->debug.callback, CONFORMANCE,
+ "two-sided stencil mask not supported "
+ "(front=0x%x, back=0x%x)",
+ templ->stencil[0].valuemask,
+ templ->stencil[1].valuemask);
+ }
+ if (templ->stencil[1].writemask != templ->stencil[0].writemask) {
+ pipe_debug_message(&svga->debug.callback, CONFORMANCE,
+ "two-sided stencil writemask not supported "
+ "(front=0x%x, back=0x%x)",
+ templ->stencil[0].writemask,
+ templ->stencil[1].writemask);
+ }
}
else {
/* back face state is same as front-face state */