renderbuffer_map_unmap(fb->_ColorReadBuffer, map);
- if (fb->_DepthBuffer)
- renderbuffer_map_unmap(fb->_DepthBuffer->Wrapped, map);
+ if (fb->Attachment[BUFFER_DEPTH].Renderbuffer)
+ renderbuffer_map_unmap(fb->Attachment[BUFFER_DEPTH].Renderbuffer, map);
}
static void
}
/* depth/stencil */
- if (fb->_DepthBuffer) {
+ if (fb->Attachment[BUFFER_DEPTH].Renderbuffer) {
s = &to_nouveau_renderbuffer(
- fb->_DepthBuffer->Wrapped)->surface;
+ fb->Attachment[BUFFER_DEPTH].Renderbuffer)->surface;
zeta_pitch = s->pitch;
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
struct gl_framebuffer *fb = ctx->DrawBuffer;
+ struct gl_renderbuffer *depthRb = fb->Attachment[BUFFER_DEPTH].Renderbuffer;
return context_chipset(ctx) < 0x17 &&
- !nctx->hierz.clear_blocked && fb->_DepthBuffer &&
- (_mesa_get_format_bits(fb->_DepthBuffer->Format,
+ !nctx->hierz.clear_blocked && depthRb &&
+ (_mesa_get_format_bits(depthRb->Format,
GL_DEPTH_BITS) >= 24);
}
struct gl_framebuffer *fb = ctx->DrawBuffer;
struct nouveau_framebuffer *nfb = to_nouveau_framebuffer(fb);
struct nouveau_surface *s = &to_nouveau_renderbuffer(
- fb->_DepthBuffer->Wrapped)->surface;
+ fb->Attachment[BUFFER_DEPTH].Renderbuffer)->surface;
if (nv10_use_viewport_zclear(ctx)) {
int x, y, w, h;
struct nouveau_framebuffer *nfb = to_nouveau_framebuffer(
ctx->DrawBuffer);
struct nouveau_surface *s = &to_nouveau_renderbuffer(
- nfb->base._DepthBuffer->Wrapped)->surface;
+ nfb->base.Attachment[BUFFER_DEPTH].Renderbuffer)->surface;
/* Clear the hierarchical depth buffer */
BEGIN_RING(chan, celsius, NV17_3D_HIERZ_FILL_VALUE, 1);
}
/* depth/stencil */
- if (fb->_DepthBuffer) {
+ if (fb->Attachment[BUFFER_DEPTH].Renderbuffer) {
s = &to_nouveau_renderbuffer(
- fb->_DepthBuffer->Wrapped)->surface;
+ fb->Attachment[BUFFER_DEPTH].Renderbuffer)->surface;
rt_format |= get_rt_format(s->format);
zeta_pitch = s->pitch;
if (buffers & (BUFFER_BIT_DEPTH | BUFFER_BIT_STENCIL)) {
struct nouveau_surface *s = &to_nouveau_renderbuffer(
- fb->_DepthBuffer->Wrapped)->surface;
+ fb->Attachment[BUFFER_DEPTH].Renderbuffer)->surface;
if (buffers & BUFFER_BIT_DEPTH && ctx->Depth.Mask)
clear |= NV20_3D_CLEAR_BUFFERS_DEPTH;
}
/* depth/stencil */
- if (fb->_DepthBuffer) {
+ if (fb->Attachment[BUFFER_DEPTH].Renderbuffer) {
s = &to_nouveau_renderbuffer(
- fb->_DepthBuffer->Wrapped)->surface;
+ fb->Attachment[BUFFER_DEPTH].Renderbuffer)->surface;
rt_format |= get_rt_format(s->format);
zeta_pitch = s->pitch;