summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_fbo.h
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-06-10 15:39:02 +0100
committerJosé Fonseca <[email protected]>2009-06-10 15:39:02 +0100
commit52411a1951da10bebc439a30c02c7ca99bc27c9c (patch)
tree6c1ba05f3e77370867907dc901bb30f72a19e6cc /src/mesa/state_tracker/st_cb_fbo.h
parent8bfbb7ec8b978d4b56ad6be7dca0290a96e91e6a (diff)
mesa: Pure software accum buffer.
The existing implementation was already implemented on software, but relied on the pipe driver to always support the R16G16B16A16_SNORM format. This patch eliminates that, without prejudice against a future hardware-only implementation. It also avoids some of the short <-> float conversions, and only does a read transfer of the color buffer on GL_RETURN if absolutely necessary.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_fbo.h')
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.h b/src/mesa/state_tracker/st_cb_fbo.h
index 44fa9fe9a4f..9a199550d9f 100644
--- a/src/mesa/state_tracker/st_cb_fbo.h
+++ b/src/mesa/state_tracker/st_cb_fbo.h
@@ -30,10 +30,6 @@
#define ST_CB_FBO_H
-#define DEFAULT_ACCUM_PIPE_FORMAT PIPE_FORMAT_R16G16B16A16_SNORM
-
-
-
/**
* Derived renderbuffer class. Just need to add a pointer to the
* pipe surface.
@@ -45,6 +41,13 @@ struct st_renderbuffer
struct pipe_surface *surface; /* temporary view into texture */
enum pipe_format format; /** preferred format, or PIPE_FORMAT_NONE */
+ /**
+ * Used only when hardware accumulation buffers are not supported.
+ */
+ boolean software;
+ size_t stride;
+ void *data;
+
struct st_texture_object *rtt; /**< GL render to texture's texture */
int rtt_level, rtt_face, rtt_slice;
@@ -62,7 +65,7 @@ st_renderbuffer(struct gl_renderbuffer *rb)
extern struct gl_renderbuffer *
-st_new_renderbuffer_fb(enum pipe_format format, int samples);
+st_new_renderbuffer_fb(enum pipe_format format, int samples, boolean sw);
extern void
st_init_fbo_functions(struct dd_function_table *functions);