summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_texture.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-08-21 07:48:04 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-08-29 09:21:38 +0100
commite3b38e5ec1ba93e3f1a1b3d5039c70ff7aa3ebe6 (patch)
tree51b1b47b1eb8466dbe629fee73cd1d7c219b3cae /src/gallium/drivers/llvmpipe/lp_texture.c
parentdb35ac36d92545392b76785bf7fca47151f1469c (diff)
llvmpipe: Code generate the depth test, and include in the shader.
Only 32bit depth/stencil surfaces supported for now. Stencil ops not implemented yet.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_texture.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_texture.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c
index 1c1e015a32..18c2362e98 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.c
+++ b/src/gallium/drivers/llvmpipe/lp_texture.c
@@ -133,6 +133,12 @@ llvmpipe_texture_create(struct pipe_screen *screen,
pipe_reference_init(&lpt->base.reference, 1);
lpt->base.screen = screen;
+ /* XXX: The xlib state tracker is brain-dead and will request
+ * PIPE_FORMAT_Z16_UNORM no matter how much we tell it we don't support it.
+ */
+ if(lpt->base.format == PIPE_FORMAT_Z16_UNORM)
+ lpt->base.format = PIPE_FORMAT_Z32_UNORM;
+
if (lpt->base.tex_usage & PIPE_TEXTURE_USAGE_DISPLAY_TARGET) {
if (!llvmpipe_displaytarget_layout(screen, lpt))
goto fail;