aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_accum.c
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2007-12-07 12:30:35 +0100
committerMichel Dänzer <[email protected]>2007-12-07 12:30:35 +0100
commitb859cdf6f191b4d8b56537c8dc30082a7e2d94b3 (patch)
tree4bd3149cc81a2fb6434282a70b34361f94710cfd /src/mesa/state_tracker/st_cb_accum.c
parent987d59bb83e9e08192563e5f1b52949c5511053c (diff)
Eliminate struct pipe_region.
Directly use struct pipe_buffer_handle for storage and struct pipe_surface for (un)mapping.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_accum.c')
-rw-r--r--src/mesa/state_tracker/st_cb_accum.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/mesa/state_tracker/st_cb_accum.c b/src/mesa/state_tracker/st_cb_accum.c
index 7a245b0ed6d..c8d9cba12f3 100644
--- a/src/mesa/state_tracker/st_cb_accum.c
+++ b/src/mesa/state_tracker/st_cb_accum.c
@@ -42,6 +42,7 @@
#include "st_format.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
+#include "pipe/p_inlines.h"
/**
@@ -68,7 +69,7 @@ st_clear_accum_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
GLfloat *accBuf;
GLint i;
- (void) pipe->region_map(pipe, acc_ps->region);
+ (void) pipe_surface_map(acc_ps);
accBuf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
@@ -83,7 +84,7 @@ st_clear_accum_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
free(accBuf);
- pipe->region_unmap(pipe, acc_ps->region);
+ pipe_surface_unmap(acc_ps);
}
@@ -99,7 +100,7 @@ accum_mad(struct pipe_context *pipe, GLfloat scale, GLfloat bias,
accBuf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- (void) pipe->region_map(pipe, acc_ps->region);
+ (void) pipe_surface_map(acc_ps);
pipe->get_tile_rgba(pipe, acc_ps, xpos, ypos, width, height, accBuf);
@@ -111,7 +112,7 @@ accum_mad(struct pipe_context *pipe, GLfloat scale, GLfloat bias,
free(accBuf);
- pipe->region_unmap(pipe, acc_ps->region);
+ pipe_surface_unmap(acc_ps);
}
@@ -128,8 +129,8 @@ accum_accum(struct pipe_context *pipe, GLfloat value,
colorBuf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
accBuf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- colorMap = pipe->region_map(pipe, color_ps->region);
- accMap = pipe->region_map(pipe, acc_ps->region);
+ colorMap = pipe_surface_map(color_ps);
+ accMap = pipe_surface_map(acc_ps);
pipe->get_tile_rgba(pipe, color_ps, xpos, ypos, width, height, colorBuf);
pipe->get_tile_rgba(pipe, acc_ps, xpos, ypos, width, height, accBuf);
@@ -143,8 +144,8 @@ accum_accum(struct pipe_context *pipe, GLfloat value,
free(colorBuf);
free(accBuf);
- pipe->region_unmap(pipe, color_ps->region);
- pipe->region_unmap(pipe, acc_ps->region);
+ pipe_surface_unmap(color_ps);
+ pipe_surface_unmap(acc_ps);
}
@@ -159,8 +160,8 @@ accum_load(struct pipe_context *pipe, GLfloat value,
buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- (void) pipe->region_map(pipe, color_ps->region);
- (void) pipe->region_map(pipe, acc_ps->region);
+ (void) pipe_surface_map(color_ps);
+ (void) pipe_surface_map(acc_ps);
pipe->get_tile_rgba(pipe, color_ps, xpos, ypos, width, height, buf);
@@ -172,8 +173,8 @@ accum_load(struct pipe_context *pipe, GLfloat value,
free(buf);
- pipe->region_unmap(pipe, color_ps->region);
- pipe->region_unmap(pipe, acc_ps->region);
+ pipe_surface_unmap(color_ps);
+ pipe_surface_unmap(acc_ps);
}
@@ -190,8 +191,8 @@ accum_return(GLcontext *ctx, GLfloat value,
abuf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- (void) pipe->region_map(pipe, color_ps->region);
- (void) pipe->region_map(pipe, acc_ps->region);
+ (void) pipe_surface_map(color_ps);
+ (void) pipe_surface_map(acc_ps);
pipe->get_tile_rgba(pipe, acc_ps, xpos, ypos, width, height, abuf);
@@ -218,8 +219,8 @@ accum_return(GLcontext *ctx, GLfloat value,
if (cbuf)
free(cbuf);
- pipe->region_unmap(pipe, color_ps->region);
- pipe->region_unmap(pipe, acc_ps->region);
+ pipe_surface_unmap(color_ps);
+ pipe_surface_unmap(acc_ps);
}