aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-11-12 11:50:32 -0700
committerBrian Paul <[email protected]>2011-11-15 07:49:26 -0700
commit3754ebb33dc6bfb3db59f23f0b3690134a71aa15 (patch)
tree4e00b70094d5823cc1ba39b985362bbf362e54b8 /src
parent77c85f014aa1db44f60b1b3291af8132ab65f444 (diff)
st/mesa: remove dependencies on code in st_cb_readpixels.c
st_cb_readpixels.c is going away next. Acked-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c21
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c2
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.h3
3 files changed, 19 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 5714d343d57..95805fd3c05 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -38,6 +38,7 @@
#include "main/mtypes.h"
#include "main/pack.h"
#include "main/pbo.h"
+#include "main/readpix.h"
#include "main/texformat.h"
#include "main/teximage.h"
#include "main/texstore.h"
@@ -1189,9 +1190,9 @@ copy_stencil_pixels(struct gl_context *ctx, GLint srcx, GLint srcy,
rbDraw = st_renderbuffer(rbDraw->Base.Wrapped);
/* this will do stencil pixel transfer ops */
- st_read_stencil_pixels(ctx, srcx, srcy, width, height,
- GL_STENCIL_INDEX, GL_UNSIGNED_BYTE,
- &ctx->DefaultPacking, buffer);
+ _mesa_readpixels(ctx, srcx, srcy, width, height,
+ GL_STENCIL_INDEX, GL_UNSIGNED_BYTE,
+ &ctx->DefaultPacking, buffer);
if (0) {
/* debug code: dump stencil values */
@@ -1296,6 +1297,20 @@ copy_stencil_pixels(struct gl_context *ctx, GLint srcx, GLint srcy,
}
+/**
+ * Return renderbuffer to use for reading color pixels for glCopyPixels
+ */
+static struct st_renderbuffer *
+st_get_color_read_renderbuffer(struct gl_context *ctx)
+{
+ struct gl_framebuffer *fb = ctx->ReadBuffer;
+ struct st_renderbuffer *strb =
+ st_renderbuffer(fb->_ColorReadBuffer);
+
+ return strb;
+}
+
+
/** Do the src/dest regions overlap? */
static GLboolean
regions_overlap(GLint srcX, GLint srcY, GLint dstX, GLint dstY,
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index 0c68e02fc87..f11d6dbe740 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/src/mesa/state_tracker/st_cb_readpixels.c
@@ -195,7 +195,7 @@ st_read_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
* Return renderbuffer to use for reading color pixels for glRead/CopyPixel
* commands.
*/
-struct st_renderbuffer *
+static struct st_renderbuffer *
st_get_color_read_renderbuffer(struct gl_context *ctx)
{
struct gl_framebuffer *fb = ctx->ReadBuffer;
diff --git a/src/mesa/state_tracker/st_cb_readpixels.h b/src/mesa/state_tracker/st_cb_readpixels.h
index 9622ae6feea..cbfe3f2eee7 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.h
+++ b/src/mesa/state_tracker/st_cb_readpixels.h
@@ -35,9 +35,6 @@ struct dd_function_table;
struct gl_context;
struct gl_pixelstore_attrib;
-extern struct st_renderbuffer *
-st_get_color_read_renderbuffer(struct gl_context *ctx);
-
extern void
st_read_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height,