summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2009-03-26 10:53:47 +0100
committerMichel Dänzer <[email protected]>2009-03-26 10:53:47 +0100
commitd332f8b4efae39f09454593374ff939a08af7619 (patch)
treef1806fc0177028e19f1da2ed06929b1bbe9c77d2 /src
parent6ce06f3fbcc04b6cde52d625368266b1e69e061e (diff)
gallium: Remove some little-used fields from struct pipe_surface.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_clear.c13
-rw-r--r--src/gallium/drivers/i915simple/i915_clear.c1
-rw-r--r--src/gallium/drivers/i915simple/i915_texture.c9
-rw-r--r--src/gallium/drivers/i965simple/brw_tex_layout.c1
-rw-r--r--src/gallium/drivers/nv04/nv04_miptree.c1
-rw-r--r--src/gallium/drivers/nv10/nv10_miptree.c1
-rw-r--r--src/gallium/drivers/nv20/nv20_clear.c1
-rw-r--r--src/gallium/drivers/nv20/nv20_miptree.c1
-rw-r--r--src/gallium/drivers/nv30/nv30_clear.c1
-rw-r--r--src/gallium/drivers/nv30/nv30_miptree.c1
-rw-r--r--src/gallium/drivers/nv30/nv30_state_emit.c8
-rw-r--r--src/gallium/drivers/nv40/nv40_clear.c1
-rw-r--r--src/gallium/drivers/nv40/nv40_miptree.c1
-rw-r--r--src/gallium/drivers/nv40/nv40_state_emit.c8
-rw-r--r--src/gallium/drivers/nv50/nv50_clear.c2
-rw-r--r--src/gallium/drivers/nv50/nv50_miptree.c1
-rw-r--r--src/gallium/drivers/nv50/nv50_state_validate.c7
-rw-r--r--src/gallium/drivers/r300/r300_clear.c3
-rw-r--r--src/gallium/drivers/r300/r300_texture.c1
-rw-r--r--src/gallium/drivers/softpipe/sp_clear.c2
-rw-r--r--src/gallium/drivers/softpipe/sp_setup.c10
-rw-r--r--src/gallium/drivers/trace/tr_state.c2
-rw-r--r--src/gallium/include/pipe/p_defines.h8
-rw-r--r--src/gallium/include/pipe/p_state.h2
-rw-r--r--src/gallium/state_trackers/egl/egl_surface.c2
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c17
-rw-r--r--src/mesa/state_tracker/st_framebuffer.c26
-rw-r--r--src/mesa/state_tracker/st_public.h1
28 files changed, 1 insertions, 131 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_clear.c b/src/gallium/drivers/cell/ppu/cell_clear.c
index edc06747ac1..34be5f3dc7d 100644
--- a/src/gallium/drivers/cell/ppu/cell_clear.c
+++ b/src/gallium/drivers/cell/ppu/cell_clear.c
@@ -101,17 +101,4 @@ cell_clear_surface(struct pipe_context *pipe, struct pipe_surface *ps,
clr->surface = surfIndex;
clr->value = clearValue;
}
-
- /* Technically, the surface's contents are now known and cleared,
- * so we could set the status to PIPE_SURFACE_STATUS_CLEAR. But
- * it turns out it's quite painful to recognize when any particular
- * surface goes from PIPE_SURFACE_STATUS_CLEAR to
- * PIPE_SURFACE_STATUS_DEFINED (i.e. with known contents), because
- * the drawing commands could be operating on numerous draw buffers,
- * which we'd have to iterate through to set all their stati...
- * For now, we cheat a bit and set the surface's status to DEFINED
- * right here. Later we should revisit this and set the status to
- * CLEAR here, and find a better place to set the status to DEFINED.
- */
- ps->status = PIPE_SURFACE_STATUS_DEFINED;
}
diff --git a/src/gallium/drivers/i915simple/i915_clear.c b/src/gallium/drivers/i915simple/i915_clear.c
index 8a2d3ca43f1..cde69daacc0 100644
--- a/src/gallium/drivers/i915simple/i915_clear.c
+++ b/src/gallium/drivers/i915simple/i915_clear.c
@@ -44,5 +44,4 @@ i915_clear(struct pipe_context *pipe, struct pipe_surface *ps,
unsigned clearValue)
{
pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, clearValue);
- ps->status = PIPE_SURFACE_STATUS_DEFINED;
}
diff --git a/src/gallium/drivers/i915simple/i915_texture.c b/src/gallium/drivers/i915simple/i915_texture.c
index 39aca9f8173..ca8e87af8d1 100644
--- a/src/gallium/drivers/i915simple/i915_texture.c
+++ b/src/gallium/drivers/i915simple/i915_texture.c
@@ -677,7 +677,6 @@ i915_get_tex_surface(struct pipe_screen *screen,
ps->height = pt->height[level];
ps->offset = offset;
ps->usage = flags;
- ps->status = PIPE_SURFACE_STATUS_DEFINED;
}
return ps;
}
@@ -725,14 +724,6 @@ i915_init_texture_functions(struct i915_context *i915)
static void
i915_tex_surface_destroy(struct pipe_surface *surf)
{
- /* This really should not be possible, but it's actually
- * happening quite a bit... Will fix.
- */
- if (surf->status == PIPE_SURFACE_STATUS_CLEAR) {
- debug_printf("XXX destroying a surface with pending clears...\n");
- assert(0);
- }
-
pipe_texture_reference(&surf->texture, NULL);
FREE(surf);
}
diff --git a/src/gallium/drivers/i965simple/brw_tex_layout.c b/src/gallium/drivers/i965simple/brw_tex_layout.c
index c921c0d38be..f44bd17451b 100644
--- a/src/gallium/drivers/i965simple/brw_tex_layout.c
+++ b/src/gallium/drivers/i965simple/brw_tex_layout.c
@@ -363,7 +363,6 @@ brw_get_tex_surface_screen(struct pipe_screen *screen,
ps->nblocksy = pt->nblocksy[level];
ps->stride = tex->stride;
ps->offset = offset;
- ps->status = PIPE_SURFACE_STATUS_DEFINED;
}
return ps;
}
diff --git a/src/gallium/drivers/nv04/nv04_miptree.c b/src/gallium/drivers/nv04/nv04_miptree.c
index 85dc017fbc4..4da833c25e8 100644
--- a/src/gallium/drivers/nv04/nv04_miptree.c
+++ b/src/gallium/drivers/nv04/nv04_miptree.c
@@ -122,7 +122,6 @@ nv04_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
ns->base.width = pt->width[level];
ns->base.height = pt->height[level];
ns->base.usage = flags;
- ns->base.status = PIPE_SURFACE_STATUS_DEFINED;
pipe_reference_init(&ns->base.reference, 1);
ns->base.face = face;
ns->base.level = level;
diff --git a/src/gallium/drivers/nv10/nv10_miptree.c b/src/gallium/drivers/nv10/nv10_miptree.c
index bb3a1c0f19e..34e3c2ebd77 100644
--- a/src/gallium/drivers/nv10/nv10_miptree.c
+++ b/src/gallium/drivers/nv10/nv10_miptree.c
@@ -136,7 +136,6 @@ nv10_miptree_surface_get(struct pipe_screen *screen, struct pipe_texture *pt,
ns->base.width = pt->width[level];
ns->base.height = pt->height[level];
ns->base.usage = flags;
- ns->base.status = PIPE_SURFACE_STATUS_DEFINED;
pipe_reference_init(&ns->base.reference, 1);
ns->base.face = face;
ns->base.level = level;
diff --git a/src/gallium/drivers/nv20/nv20_clear.c b/src/gallium/drivers/nv20/nv20_clear.c
index 29f4afd87c9..81b6f3e78ac 100644
--- a/src/gallium/drivers/nv20/nv20_clear.c
+++ b/src/gallium/drivers/nv20/nv20_clear.c
@@ -9,5 +9,4 @@ nv20_clear(struct pipe_context *pipe, struct pipe_surface *ps,
unsigned clearValue)
{
pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, clearValue);
- ps->status = PIPE_SURFACE_STATUS_CLEAR;
}
diff --git a/src/gallium/drivers/nv20/nv20_miptree.c b/src/gallium/drivers/nv20/nv20_miptree.c
index b2f29aff8d2..185fbf53e0f 100644
--- a/src/gallium/drivers/nv20/nv20_miptree.c
+++ b/src/gallium/drivers/nv20/nv20_miptree.c
@@ -170,7 +170,6 @@ nv20_miptree_surface_get(struct pipe_screen *screen, struct pipe_texture *pt,
ns->base.width = pt->width[level];
ns->base.height = pt->height[level];
ns->base.usage = flags;
- ns->base.status = PIPE_SURFACE_STATUS_DEFINED;
pipe_reference_init(&ns->base.reference, 1);
ns->base.face = face;
ns->base.level = level;
diff --git a/src/gallium/drivers/nv30/nv30_clear.c b/src/gallium/drivers/nv30/nv30_clear.c
index 8c3ca204d58..71f413588ee 100644
--- a/src/gallium/drivers/nv30/nv30_clear.c
+++ b/src/gallium/drivers/nv30/nv30_clear.c
@@ -9,5 +9,4 @@ nv30_clear(struct pipe_context *pipe, struct pipe_surface *ps,
unsigned clearValue)
{
pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, clearValue);
- ps->status = PIPE_SURFACE_STATUS_CLEAR;
}
diff --git a/src/gallium/drivers/nv30/nv30_miptree.c b/src/gallium/drivers/nv30/nv30_miptree.c
index d6dc621c9ee..7f8054de733 100644
--- a/src/gallium/drivers/nv30/nv30_miptree.c
+++ b/src/gallium/drivers/nv30/nv30_miptree.c
@@ -177,7 +177,6 @@ nv30_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
ns->base.width = pt->width[level];
ns->base.height = pt->height[level];
ns->base.usage = flags;
- ns->base.status = PIPE_SURFACE_STATUS_DEFINED;
pipe_reference_init(&ns->base.reference, 1);
ns->base.face = face;
ns->base.level = level;
diff --git a/src/gallium/drivers/nv30/nv30_state_emit.c b/src/gallium/drivers/nv30/nv30_state_emit.c
index f77b08ff695..c18be20a327 100644
--- a/src/gallium/drivers/nv30/nv30_state_emit.c
+++ b/src/gallium/drivers/nv30/nv30_state_emit.c
@@ -21,14 +21,6 @@ static void
nv30_state_do_validate(struct nv30_context *nv30,
struct nv30_state_entry **states)
{
- const struct pipe_framebuffer_state *fb = &nv30->framebuffer;
- unsigned i;
-
- for (i = 0; i < fb->nr_cbufs; i++)
- fb->cbufs[i]->status = PIPE_SURFACE_STATUS_DEFINED;
- if (fb->zsbuf)
- fb->zsbuf->status = PIPE_SURFACE_STATUS_DEFINED;
-
while (*states) {
struct nv30_state_entry *e = *states;
diff --git a/src/gallium/drivers/nv40/nv40_clear.c b/src/gallium/drivers/nv40/nv40_clear.c
index 59efd620e32..2c4e8f01fda 100644
--- a/src/gallium/drivers/nv40/nv40_clear.c
+++ b/src/gallium/drivers/nv40/nv40_clear.c
@@ -9,5 +9,4 @@ nv40_clear(struct pipe_context *pipe, struct pipe_surface *ps,
unsigned clearValue)
{
pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, clearValue);
- ps->status = PIPE_SURFACE_STATUS_CLEAR;
}
diff --git a/src/gallium/drivers/nv40/nv40_miptree.c b/src/gallium/drivers/nv40/nv40_miptree.c
index abadca8c933..5a201ccf458 100644
--- a/src/gallium/drivers/nv40/nv40_miptree.c
+++ b/src/gallium/drivers/nv40/nv40_miptree.c
@@ -176,7 +176,6 @@ nv40_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
ns->base.width = pt->width[level];
ns->base.height = pt->height[level];
ns->base.usage = flags;
- ns->base.status = PIPE_SURFACE_STATUS_DEFINED;
pipe_reference_init(&ns->base.reference, 1);
ns->base.face = face;
ns->base.level = level;
diff --git a/src/gallium/drivers/nv40/nv40_state_emit.c b/src/gallium/drivers/nv40/nv40_state_emit.c
index ce859def108..10aae298328 100644
--- a/src/gallium/drivers/nv40/nv40_state_emit.c
+++ b/src/gallium/drivers/nv40/nv40_state_emit.c
@@ -38,14 +38,6 @@ static void
nv40_state_do_validate(struct nv40_context *nv40,
struct nv40_state_entry **states)
{
- const struct pipe_framebuffer_state *fb = &nv40->framebuffer;
- unsigned i;
-
- for (i = 0; i < fb->nr_cbufs; i++)
- fb->cbufs[i]->status = PIPE_SURFACE_STATUS_DEFINED;
- if (fb->zsbuf)
- fb->zsbuf->status = PIPE_SURFACE_STATUS_DEFINED;
-
while (*states) {
struct nv40_state_entry *e = *states;
diff --git a/src/gallium/drivers/nv50/nv50_clear.c b/src/gallium/drivers/nv50/nv50_clear.c
index f9bc3b53caa..db44a9da0e3 100644
--- a/src/gallium/drivers/nv50/nv50_clear.c
+++ b/src/gallium/drivers/nv50/nv50_clear.c
@@ -86,7 +86,5 @@ nv50_clear(struct pipe_context *pipe, struct pipe_surface *ps,
pipe->set_framebuffer_state(pipe, &s_fb);
pipe->set_scissor_state(pipe, &s_sc);
nv50->dirty |= dirty;
-
- ps->status = PIPE_SURFACE_STATUS_CLEAR;
}
diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c
index dc4688ccdc4..f79a7ca86c9 100644
--- a/src/gallium/drivers/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nv50/nv50_miptree.c
@@ -163,7 +163,6 @@ nv50_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
ps->width = pt->width[level];
ps->height = pt->height[level];
ps->usage = flags;
- ps->status = PIPE_SURFACE_STATUS_DEFINED;
pipe_reference_init(&ps->reference, 1);
ps->face = face;
ps->level = level;
diff --git a/src/gallium/drivers/nv50/nv50_state_validate.c b/src/gallium/drivers/nv50/nv50_state_validate.c
index 85098a78a25..fc6157dbd09 100644
--- a/src/gallium/drivers/nv50/nv50_state_validate.c
+++ b/src/gallium/drivers/nv50/nv50_state_validate.c
@@ -178,17 +178,10 @@ nv50_state_emit(struct nv50_context *nv50)
boolean
nv50_state_validate(struct nv50_context *nv50)
{
- const struct pipe_framebuffer_state *fb = &nv50->framebuffer;
struct nouveau_grobj *tesla = nv50->screen->tesla;
struct nouveau_stateobj *so;
unsigned i;
- for (i = 0; i < fb->nr_cbufs; i++)
- fb->cbufs[i]->status = PIPE_SURFACE_STATUS_DEFINED;
-
- if (fb->zsbuf)
- fb->zsbuf->status = PIPE_SURFACE_STATUS_DEFINED;
-
if (nv50->dirty & NV50_NEW_FRAMEBUFFER)
nv50_state_validate_fb(nv50);
diff --git a/src/gallium/drivers/r300/r300_clear.c b/src/gallium/drivers/r300/r300_clear.c
index fd28437aaa4..8506ed29424 100644
--- a/src/gallium/drivers/r300/r300_clear.c
+++ b/src/gallium/drivers/r300/r300_clear.c
@@ -29,5 +29,4 @@ void r300_clear(struct pipe_context* pipe,
unsigned color)
{
pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, color);
- ps->status = PIPE_SURFACE_STATUS_DEFINED;
-} \ No newline at end of file
+}
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 6cdea3d2854..fe91f4e1844 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -147,7 +147,6 @@ static struct pipe_surface* r300_get_tex_surface(struct pipe_screen* screen,
surface->height = texture->height[level];
surface->offset = offset;
surface->usage = flags;
- surface->status = PIPE_SURFACE_STATUS_DEFINED;
}
return surface;
diff --git a/src/gallium/drivers/softpipe/sp_clear.c b/src/gallium/drivers/softpipe/sp_clear.c
index ad108ec446d..a60c6c4c16f 100644
--- a/src/gallium/drivers/softpipe/sp_clear.c
+++ b/src/gallium/drivers/softpipe/sp_clear.c
@@ -79,7 +79,6 @@ softpipe_clear(struct pipe_context *pipe, struct pipe_surface *ps,
if (ps == sp_tile_cache_get_surface(softpipe->zsbuf_cache)) {
sp_tile_cache_clear(softpipe->zsbuf_cache, clearValue);
- softpipe->framebuffer.zsbuf->status = PIPE_SURFACE_STATUS_CLEAR;
#if TILE_CLEAR_OPTIMIZATION
return;
#endif
@@ -96,7 +95,6 @@ softpipe_clear(struct pipe_context *pipe, struct pipe_surface *ps,
cv = clearValue;
}
sp_tile_cache_clear(softpipe->cbuf_cache[i], cv);
- softpipe->framebuffer.cbufs[i]->status = PIPE_SURFACE_STATUS_CLEAR;
}
}
diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c
index 96cb09b9051..711343abe67 100644
--- a/src/gallium/drivers/softpipe/sp_setup.c
+++ b/src/gallium/drivers/softpipe/sp_setup.c
@@ -1489,16 +1489,6 @@ void setup_prepare( struct setup_context *setup )
softpipe_update_derived(sp);
}
- /* Mark surfaces as defined now */
- for (i = 0; i < sp->framebuffer.nr_cbufs; i++){
- if (sp->framebuffer.cbufs[i]) {
- sp->framebuffer.cbufs[i]->status = PIPE_SURFACE_STATUS_DEFINED;
- }
- }
- if (sp->framebuffer.zsbuf) {
- sp->framebuffer.zsbuf->status = PIPE_SURFACE_STATUS_DEFINED;
- }
-
/* Note: nr_attrs is only used for debugging (vertex printing) */
setup->quad.nr_attrs = draw_num_vs_outputs(sp->draw);
diff --git a/src/gallium/drivers/trace/tr_state.c b/src/gallium/drivers/trace/tr_state.c
index f9fbe9aee79..a9570c1aebd 100644
--- a/src/gallium/drivers/trace/tr_state.c
+++ b/src/gallium/drivers/trace/tr_state.c
@@ -406,8 +406,6 @@ void trace_dump_surface(const struct pipe_surface *state)
trace_dump_reference(&state->reference);
trace_dump_member(format, state, format);
- trace_dump_member(uint, state, status);
- trace_dump_member(uint, state, clear_value);
trace_dump_member(uint, state, width);
trace_dump_member(uint, state, height);
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 52d443970b0..8e4f253359a 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -186,14 +186,6 @@ enum pipe_texture_target {
/**
- * Surface status
- */
-#define PIPE_SURFACE_STATUS_UNDEFINED 0
-#define PIPE_SURFACE_STATUS_DEFINED 1
-#define PIPE_SURFACE_STATUS_CLEAR 2
-
-
-/**
* Transfer object usage flags
*/
enum pipe_transfer_usage {
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 9c7baa3d92e..705ae68ec65 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -281,8 +281,6 @@ struct pipe_surface
{
struct pipe_reference reference;
enum pipe_format format; /**< PIPE_FORMAT_x */
- unsigned status; /**< PIPE_SURFACE_STATUS_x */
- unsigned clear_value; /**< XXX may be temporary */
unsigned width; /**< logical width in pixels */
unsigned height; /**< logical height in pixels */
unsigned layout; /**< PIPE_SURFACE_LAYOUT_x */
diff --git a/src/gallium/state_trackers/egl/egl_surface.c b/src/gallium/state_trackers/egl/egl_surface.c
index ca545b12e68..489aa8d9af5 100644
--- a/src/gallium/state_trackers/egl/egl_surface.c
+++ b/src/gallium/state_trackers/egl/egl_surface.c
@@ -406,8 +406,6 @@ drm_swap_buffers(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw)
surf->user->pipe->flush(surf->user->pipe, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_TEXTURE_CACHE, NULL);
/* TODO stuff here */
}
-
- st_notify_swapbuffers_complete(surf->stfb);
}
return EGL_TRUE;
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index dd9ba2881f9..020684b4e14 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -291,11 +291,6 @@ clear_with_quad(GLcontext *ctx,
static INLINE GLboolean
check_clear_color_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
{
- const struct st_renderbuffer *strb = st_renderbuffer(rb);
-
- if (strb->surface->status == PIPE_SURFACE_STATUS_UNDEFINED)
- return FALSE;
-
if (ctx->Scissor.Enabled)
return TRUE;
@@ -312,14 +307,10 @@ check_clear_color_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
static INLINE GLboolean
check_clear_depth_stencil_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
{
- const struct st_renderbuffer *strb = st_renderbuffer(rb);
const GLuint stencilMax = (1 << rb->StencilBits) - 1;
GLboolean maskStencil
= (ctx->Stencil.WriteMask[0] & stencilMax) != stencilMax;
- if (strb->surface->status == PIPE_SURFACE_STATUS_UNDEFINED)
- return FALSE;
-
if (ctx->Scissor.Enabled)
return TRUE;
@@ -339,14 +330,10 @@ check_clear_depth_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
const struct st_renderbuffer *strb = st_renderbuffer(rb);
const GLboolean isDS = is_depth_stencil_format(strb->surface->format);
- if (strb->surface->status == PIPE_SURFACE_STATUS_UNDEFINED)
- return FALSE;
-
if (ctx->Scissor.Enabled)
return TRUE;
if (isDS &&
- strb->surface->status == PIPE_SURFACE_STATUS_DEFINED &&
ctx->DrawBuffer->Visual.stencilBits > 0)
return TRUE;
@@ -366,9 +353,6 @@ check_clear_stencil_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
const GLboolean maskStencil
= (ctx->Stencil.WriteMask[0] & stencilMax) != stencilMax;
- if (strb->surface->status == PIPE_SURFACE_STATUS_UNDEFINED)
- return FALSE;
-
if (maskStencil)
return TRUE;
@@ -381,7 +365,6 @@ check_clear_stencil_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
* current state.
*/
if (isDS &&
- strb->surface->status == PIPE_SURFACE_STATUS_DEFINED &&
ctx->DrawBuffer->Visual.depthBits > 0)
return TRUE;
diff --git a/src/mesa/state_tracker/st_framebuffer.c b/src/mesa/state_tracker/st_framebuffer.c
index 06fec20eeec..daaad65ccaf 100644
--- a/src/mesa/state_tracker/st_framebuffer.c
+++ b/src/mesa/state_tracker/st_framebuffer.c
@@ -293,32 +293,6 @@ st_notify_swapbuffers(struct st_framebuffer *stfb)
}
-/**
- * Quick hack - allows the winsys to inform the driver that surface
- * states are now undefined after a glXSwapBuffers or similar.
- */
-void
-st_notify_swapbuffers_complete(struct st_framebuffer *stfb)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- if (ctx && ctx->DrawBuffer == &stfb->Base) {
- struct st_renderbuffer *strb;
-
- /* Mark back color buffers as undefined */
- strb = st_renderbuffer(stfb->Base.Attachment[BUFFER_BACK_LEFT].
- Renderbuffer);
- if (strb && strb->surface)
- strb->surface->status = PIPE_SURFACE_STATUS_UNDEFINED;
-
- strb = st_renderbuffer(stfb->Base.Attachment[BUFFER_BACK_RIGHT].
- Renderbuffer);
- if (strb && strb->surface)
- strb->surface->status = PIPE_SURFACE_STATUS_UNDEFINED;
- }
-}
-
-
void *st_framebuffer_private( struct st_framebuffer *stfb )
{
return stfb->Private;
diff --git a/src/mesa/state_tracker/st_public.h b/src/mesa/state_tracker/st_public.h
index 414218bb589..030314372f9 100644
--- a/src/mesa/state_tracker/st_public.h
+++ b/src/mesa/state_tracker/st_public.h
@@ -100,7 +100,6 @@ void st_flush( struct st_context *st, uint pipeFlushFlags,
void st_finish( struct st_context *st );
void st_notify_swapbuffers(struct st_framebuffer *stfb);
-void st_notify_swapbuffers_complete(struct st_framebuffer *stfb);
int st_set_teximage(struct pipe_texture *pt, int target);