summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-12-10 11:44:43 -0700
committerBrian Paul <[email protected]>2011-12-13 06:45:36 -0700
commit02d12719e356ee9e3348db67ae55ae790dad058f (patch)
tree33e18d56c4085f3d8ce875c2c049c6448ac67e8d /src/mesa/state_tracker
parent22e806f57013b2c116b5bfab228e0f28e25198f4 (diff)
st/mesa: stop using _DepthBuffer, _StencilBuffer fields
We never want to use the depth/stencil buffer wrappers so always just use the attachment renderbuffers. This is a step toward removing the _DepthBuffer, _StencilBuffer fields. Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c16
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c5
2 files changed, 6 insertions, 15 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 912241b35cf..65b4445521c 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -1182,12 +1182,9 @@ copy_stencil_pixels(struct gl_context *ctx, GLint srcx, GLint srcy,
return;
}
- /* Get the dest renderbuffer. If there's a wrapper, use the
- * underlying renderbuffer.
- */
- rbDraw = st_renderbuffer(ctx->DrawBuffer->_StencilBuffer);
- if (rbDraw->Base.Wrapped)
- rbDraw = st_renderbuffer(rbDraw->Base.Wrapped);
+ /* Get the dest renderbuffer */
+ rbDraw = st_renderbuffer(ctx->DrawBuffer->
+ Attachment[BUFFER_STENCIL].Renderbuffer);
/* this will do stencil pixel transfer ops */
_mesa_readpixels(ctx, srcx, srcy, width, height,
@@ -1484,7 +1481,8 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
}
else {
assert(type == GL_DEPTH);
- rbRead = st_renderbuffer(ctx->ReadBuffer->_DepthBuffer);
+ rbRead = st_renderbuffer(ctx->ReadBuffer->
+ Attachment[BUFFER_DEPTH].Renderbuffer);
color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
fpv = get_depth_stencil_fp_variant(st, GL_TRUE, GL_FALSE);
@@ -1496,10 +1494,6 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
/* update fragment program constants */
st_upload_constants(st, fpv->parameters, PIPE_SHADER_FRAGMENT);
-
- if (rbRead->Base.Wrapped)
- rbRead = st_renderbuffer(rbRead->Base.Wrapped);
-
sample_count = rbRead->texture->nr_samples;
/* I believe this would be legal, presumably would need to do a resolve
for color, and for depth/stencil spec says to just use one of the
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 52f654d7da8..289ad511434 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -1385,10 +1385,7 @@ st_copy_texsubimage(struct gl_context *ctx,
/* determine if copying depth or color data */
if (texBaseFormat == GL_DEPTH_COMPONENT ||
texBaseFormat == GL_DEPTH_STENCIL) {
- strb = st_renderbuffer(fb->_DepthBuffer);
- if (strb->Base.Wrapped) {
- strb = st_renderbuffer(strb->Base.Wrapped);
- }
+ strb = st_renderbuffer(fb->Attachment[BUFFER_DEPTH].Renderbuffer);
}
else {
/* texBaseFormat == GL_RGB, GL_RGBA, GL_ALPHA, etc */