|
|
@ -1186,7 +1186,7 @@ void vrend_fb_bind_texture(struct vrend_resource *res, |
|
|
|
static void vrend_hw_set_zsurf_texture(struct vrend_context *ctx) |
|
|
|
static void vrend_hw_set_zsurf_texture(struct vrend_context *ctx) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct vrend_resource *tex; |
|
|
|
struct vrend_resource *tex; |
|
|
|
|
|
|
|
int first_layer, last_layer; |
|
|
|
if (!ctx->sub->zsurf) { |
|
|
|
if (!ctx->sub->zsurf) { |
|
|
|
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_STENCIL_ATTACHMENT, |
|
|
|
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_STENCIL_ATTACHMENT, |
|
|
|
GL_TEXTURE_2D, 0, 0); |
|
|
|
GL_TEXTURE_2D, 0, 0); |
|
|
@ -1197,7 +1197,11 @@ static void vrend_hw_set_zsurf_texture(struct vrend_context *ctx) |
|
|
|
if (!tex) |
|
|
|
if (!tex) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
vrend_fb_bind_texture(tex, 0, ctx->sub->zsurf->val0, ctx->sub->zsurf->val1 & 0xffff); |
|
|
|
first_layer = ctx->sub->zsurf->val1 & 0xffff; |
|
|
|
|
|
|
|
last_layer = (ctx->sub->zsurf->val1 >> 16) & 0xffff; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vrend_fb_bind_texture(tex, 0, ctx->sub->zsurf->val0, |
|
|
|
|
|
|
|
first_layer != last_layer ? 0xffffffff : first_layer); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void vrend_hw_set_color_surface(struct vrend_context *ctx, int index) |
|
|
|
static void vrend_hw_set_color_surface(struct vrend_context *ctx, int index) |
|
|
|