diff options
author | marha <marha@users.sourceforge.net> | 2011-01-23 16:38:21 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-01-23 16:38:21 +0000 |
commit | 174c4371f04f7a77979614fb7f3633807bd428ec (patch) | |
tree | 32722d1e5ed3c6a42b63dbf9bf0248789d23a772 /mesalib/src/mesa/state_tracker/st_cb_accum.c | |
parent | f544012f5c37fba02cae71b39a533f8296cdabb5 (diff) | |
download | vcxsrv-174c4371f04f7a77979614fb7f3633807bd428ec.tar.gz vcxsrv-174c4371f04f7a77979614fb7f3633807bd428ec.tar.bz2 vcxsrv-174c4371f04f7a77979614fb7f3633807bd428ec.zip |
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_accum.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_accum.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_accum.c b/mesalib/src/mesa/state_tracker/st_cb_accum.c index d4185b7e2..66e5312d9 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_accum.c +++ b/mesalib/src/mesa/state_tracker/st_cb_accum.c @@ -42,6 +42,7 @@ #include "st_texture.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
+#include "util/u_format.h"
#include "util/u_inlines.h"
#include "util/u_tile.h"
@@ -146,7 +147,9 @@ accum_accum(struct st_context *st, GLfloat value, buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- pipe_get_tile_rgba(pipe, color_trans, 0, 0, width, height, buf);
+ pipe_get_tile_rgba_format(pipe, color_trans, 0, 0, width, height,
+ util_format_linear(color_strb->texture->format),
+ buf);
switch (acc_strb->format) {
case PIPE_FORMAT_R16G16B16A16_SNORM:
@@ -183,7 +186,6 @@ accum_load(struct st_context *st, GLfloat value, GLubyte *data = acc_strb->data;
GLfloat *buf;
-
if (ST_DEBUG & DEBUG_FALLBACK)
debug_printf("%s: fallback processing\n", __FUNCTION__);
@@ -194,7 +196,9 @@ accum_load(struct st_context *st, GLfloat value, buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- pipe_get_tile_rgba(pipe, color_trans, 0, 0, width, height, buf);
+ pipe_get_tile_rgba_format(pipe, color_trans, 0, 0, width, height,
+ util_format_linear(color_strb->texture->format),
+ buf);
switch (acc_strb->format) {
case PIPE_FORMAT_R16G16B16A16_SNORM:
@@ -232,6 +236,7 @@ accum_return(struct gl_context *ctx, GLfloat value, size_t stride = acc_strb->stride;
const GLubyte *data = acc_strb->data;
GLfloat *buf;
+ enum pipe_format format = util_format_linear(color_strb->texture->format);
if (ST_DEBUG & DEBUG_FALLBACK)
debug_printf("%s: fallback processing\n", __FUNCTION__);
@@ -250,7 +255,8 @@ accum_return(struct gl_context *ctx, GLfloat value, width, height);
if (usage & PIPE_TRANSFER_READ)
- pipe_get_tile_rgba(pipe, color_trans, 0, 0, width, height, buf);
+ pipe_get_tile_rgba_format(pipe, color_trans, 0, 0, width, height,
+ format, buf);
switch (acc_strb->format) {
case PIPE_FORMAT_R16G16B16A16_SNORM:
@@ -279,7 +285,8 @@ accum_return(struct gl_context *ctx, GLfloat value, _mesa_problem(NULL, "unexpected format in st_clear_accum_buffer()");
}
- pipe_put_tile_rgba(pipe, color_trans, 0, 0, width, height, buf);
+ pipe_put_tile_rgba_format(pipe, color_trans, 0, 0, width, height,
+ format, buf);
free(buf);
pipe->transfer_destroy(pipe, color_trans);
|