summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-01-23 15:45:52 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-01-23 15:45:52 -0700
commit8de2331e432e2ea6f978acb6c80666da99c6c4a1 (patch)
tree24d24901a45854fa3f5e37739ef6b4c6b8f784c5 /src/mesa/state_tracker
parent1cf3c77e086d3f8b01921aae9b7309aa62b3d15e (diff)
gallium: remove support for separate depth/stencil buffers. Always combined now.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_framebuffer.c15
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c6
2 files changed, 11 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c
index aec51f5eed..3e58d49f1f 100644
--- a/src/mesa/state_tracker/st_atom_framebuffer.c
+++ b/src/mesa/state_tracker/st_atom_framebuffer.c
@@ -65,14 +65,15 @@ update_framebuffer_state( struct st_context *st )
if (strb) {
strb = st_renderbuffer(strb->Base.Wrapped);
assert(strb->surface);
- framebuffer.zbuf = strb->surface;
+ framebuffer.zsbuf = strb->surface;
}
-
- strb = st_renderbuffer(fb->Attachment[BUFFER_STENCIL].Renderbuffer);
- if (strb) {
- strb = st_renderbuffer(strb->Base.Wrapped);
- assert(strb->surface);
- framebuffer.sbuf = strb->surface;
+ else {
+ strb = st_renderbuffer(fb->Attachment[BUFFER_STENCIL].Renderbuffer);
+ if (strb) {
+ strb = st_renderbuffer(strb->Base.Wrapped);
+ assert(strb->surface);
+ framebuffer.zsbuf = strb->surface;
+ }
}
/* XXX: The memcmp is insufficient for eliminating redundant state changes,
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index eaa88d3c6c..6b44cba2e4 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -848,7 +848,7 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
{
struct st_context *st = ctx->st;
struct pipe_context *pipe = st->pipe;
- struct pipe_surface *ps = st->state.framebuffer.sbuf;
+ struct pipe_surface *ps = st->state.framebuffer.zsbuf;
const GLboolean zoom = ctx->Pixel.ZoomX != 1.0 || ctx->Pixel.ZoomY != 1.0;
GLint skipPixels;
ubyte *stmap;
@@ -940,13 +940,13 @@ st_DrawPixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
st_validate_state(st);
if (format == GL_DEPTH_COMPONENT) {
- ps = st->state.framebuffer.zbuf;
+ ps = st->state.framebuffer.zsbuf;
stfp = make_fragment_shader_z(ctx->st);
stvp = make_vertex_shader(ctx->st, GL_TRUE);
color = ctx->Current.RasterColor;
}
else if (format == GL_STENCIL_INDEX) {
- ps = st->state.framebuffer.sbuf;
+ ps = st->state.framebuffer.zsbuf;
/* XXX special case - can't use texture map */
color = NULL;
}