summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-16 18:45:42 -0600
committerBrian <[email protected]>2007-10-16 18:45:42 -0600
commit45700ac280ddd5e23c57763129257d7fba171d9d (patch)
tree3b23e0434d56116cd24d24c89dce03f18465375b /src/mesa
parent2de9477feea4b2d3996a2118b36924fe8474a7d5 (diff)
use new st_clear_accum_buffer() function
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index a854378b18f..4f269ed3f7a 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -37,6 +37,7 @@
#include "st_atom.h"
#include "st_cache.h"
#include "st_context.h"
+#include "st_cb_accum.h"
#include "st_cb_clear.h"
#include "st_cb_fbo.h"
#include "st_draw.h"
@@ -462,28 +463,6 @@ clear_color_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
static void
-clear_accum_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
-{
- struct st_renderbuffer *strb = st_renderbuffer(rb);
-
- if (!ctx->Scissor.Enabled) {
- /* clear whole buffer w/out masking */
- GLuint clearValue
- = color_value(strb->surface->format, ctx->Accum.ClearColor);
- /* Note that clearValue is 32 bits but the accum buffer will
- * typically be 64bpp...
- */
- ctx->st->pipe->clear(ctx->st->pipe, strb->surface, clearValue);
- }
- else {
- /* scissoring */
- /* XXX point framebuffer.cbufs[0] at the accum buffer */
- clear_with_quad(ctx, GL_TRUE, GL_FALSE, GL_FALSE);
- }
-}
-
-
-static void
clear_depth_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
{
struct st_renderbuffer *strb = st_renderbuffer(rb);
@@ -605,8 +584,8 @@ static void st_clear(GLcontext *ctx, GLbitfield mask)
}
if (mask & BUFFER_BIT_ACCUM) {
- clear_accum_buffer(ctx,
- ctx->DrawBuffer->Attachment[BUFFER_ACCUM].Renderbuffer);
+ st_clear_accum_buffer(ctx,
+ ctx->DrawBuffer->Attachment[BUFFER_ACCUM].Renderbuffer);
}
if ((mask & BUFFER_BITS_DS) == BUFFER_BITS_DS && depthRb == stencilRb) {