llvmpipe: Code generate the depth test, and include in the shader.

Only 32bit depth/stencil surfaces supported for now. Stencil ops not
implemented yet.
This commit is contained in:
José Fonseca
2009-08-21 07:48:04 +01:00
parent db35ac36d9
commit e3b38e5ec1
14 changed files with 174 additions and 871 deletions

View File

@@ -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;