renderer: remove stencil attachments better

disconnect using the proper functions, the API in theory
works but mesa has bugs so lets avoid it for now.

This fixes 1d texture depth tests.
macos/master
Dave Airlie 9 years ago
parent d413cba1e9
commit 5f9133d0db
  1. 14
      src/vrend_renderer.c

@ -1382,9 +1382,19 @@ void vrend_fb_bind_texture(struct vrend_resource *res,
break;
}
if (attachment == GL_DEPTH_ATTACHMENT)
if (attachment == GL_DEPTH_ATTACHMENT) {
switch (res->target) {
case GL_TEXTURE_1D:
glFramebufferTexture1DEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT,
GL_TEXTURE_1D, 0, 0);
break;
case GL_TEXTURE_2D:
default:
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT,
0, 0, 0);
GL_TEXTURE_2D, 0, 0);
break;
}
}
}
static void vrend_hw_set_zsurf_texture(struct vrend_context *ctx)

Loading…
Cancel
Save