summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2008-07-14 01:14:52 +1000
committerBen Skeggs <[email protected]>2008-07-14 01:14:52 +1000
commitd68a3ebf0e7e853cf9680ddbb095fffe7c0fb1f9 (patch)
treee093bba7d7b0ff62e0a4f47bd622180e5cea1a22 /src/mesa
parent1d50e26f4afc0c7cdcd843a1336a90cdfc76765b (diff)
parent6410e94b966148dde81b5121e53a250d7b530d91 (diff)
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/x11/xm_surface.c4
-rw-r--r--src/mesa/state_tracker/st_cb_accum.c12
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c8
-rw-r--r--src/mesa/state_tracker/st_cb_program.c4
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c10
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c8
-rw-r--r--src/mesa/state_tracker/st_context.c4
-rw-r--r--src/mesa/state_tracker/st_draw.c2
8 files changed, 31 insertions, 21 deletions
diff --git a/src/mesa/drivers/x11/xm_surface.c b/src/mesa/drivers/x11/xm_surface.c
index 81616b92d96..a3f2fe7d685 100644
--- a/src/mesa/drivers/x11/xm_surface.c
+++ b/src/mesa/drivers/x11/xm_surface.c
@@ -106,7 +106,7 @@ xmesa_get_tile_rgba(struct pipe_context *pipe, struct pipe_surface *ps,
}
else {
/* other softpipe surface */
- softpipe_get_tile_rgba(pipe, ps, x, y, w, h, p);
+ softpipe_get_tile_rgba(ps, x, y, w, h, p);
}
}
@@ -142,7 +142,7 @@ xmesa_put_tile_rgba(struct pipe_context *pipe, struct pipe_surface *ps,
}
else {
/* other softpipe surface */
- softpipe_put_tile_rgba(pipe, ps, x, y, w, h, p);
+ softpipe_put_tile_rgba(ps, x, y, w, h, p);
}
}
diff --git a/src/mesa/state_tracker/st_cb_accum.c b/src/mesa/state_tracker/st_cb_accum.c
index 2283905662f..c0e8c6bf33e 100644
--- a/src/mesa/state_tracker/st_cb_accum.c
+++ b/src/mesa/state_tracker/st_cb_accum.c
@@ -73,7 +73,7 @@ acc_get_tile_rgba(struct pipe_context *pipe, struct pipe_surface *acc_ps,
acc_ps->block.width = 1;
acc_ps->block.height = 1;
- pipe_get_tile_rgba(pipe, acc_ps, x, y, w, h, p);
+ pipe_get_tile_rgba(acc_ps, x, y, w, h, p);
acc_ps->format = f;
acc_ps->block = b;
@@ -97,7 +97,7 @@ acc_put_tile_rgba(struct pipe_context *pipe, struct pipe_surface *acc_ps,
acc_ps->block.width = 1;
acc_ps->block.height = 1;
- pipe_put_tile_rgba(pipe, acc_ps, x, y, w, h, p);
+ pipe_put_tile_rgba(acc_ps, x, y, w, h, p);
acc_ps->format = f;
acc_ps->block = b;
@@ -208,7 +208,7 @@ accum_accum(struct pipe_context *pipe, GLfloat value,
colorBuf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
accBuf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- pipe_get_tile_rgba(pipe, color_surf, xpos, ypos, width, height, colorBuf);
+ pipe_get_tile_rgba(color_surf, xpos, ypos, width, height, colorBuf);
acc_get_tile_rgba(pipe, acc_surf, xpos, ypos, width, height, accBuf);
for (i = 0; i < 4 * width * height; i++) {
@@ -243,7 +243,7 @@ accum_load(struct pipe_context *pipe, GLfloat value,
buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- pipe_get_tile_rgba(pipe, color_surf, xpos, ypos, width, height, buf);
+ pipe_get_tile_rgba(color_surf, xpos, ypos, width, height, buf);
for (i = 0; i < 4 * width * height; i++) {
buf[i] = buf[i] * value;
@@ -283,7 +283,7 @@ accum_return(GLcontext *ctx, GLfloat value,
if (!colormask[0] || !colormask[1] || !colormask[2] || !colormask[3]) {
cbuf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- pipe_get_tile_rgba(pipe, color_surf, xpos, ypos, width, height, cbuf);
+ pipe_get_tile_rgba(color_surf, xpos, ypos, width, height, cbuf);
}
for (i = 0; i < width * height; i++) {
@@ -298,7 +298,7 @@ accum_return(GLcontext *ctx, GLfloat value,
}
}
- pipe_put_tile_rgba(pipe, color_surf, xpos, ypos, width, height, abuf);
+ pipe_put_tile_rgba(color_surf, xpos, ypos, width, height, abuf);
free(abuf);
if (cbuf)
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index a7781f3ab2a..6b0137dcf87 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -1049,16 +1049,16 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
/* alternate path using get/put_tile() */
GLfloat *buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- pipe_get_tile_rgba(pipe, psRead, srcx, srcy, width, height, buf);
- pipe_put_tile_rgba(pipe, psTex, 0, 0, width, height, buf);
+ pipe_get_tile_rgba(psRead, srcx, srcy, width, height, buf);
+ pipe_put_tile_rgba(psTex, 0, 0, width, height, buf);
free(buf);
}
else {
/* GL_DEPTH */
GLuint *buf = (GLuint *) malloc(width * height * sizeof(GLuint));
- pipe_get_tile_z(pipe, psRead, srcx, srcy, width, height, buf);
- pipe_put_tile_z(pipe, psTex, 0, 0, width, height, buf);
+ pipe_get_tile_z(psRead, srcx, srcy, width, height, buf);
+ pipe_put_tile_z(psTex, 0, 0, width, height, buf);
free(buf);
}
pipe_surface_reference(&psRead, NULL);
diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c
index 11ba5d56f30..ea0fa20012e 100644
--- a/src/mesa/state_tracker/st_cb_program.c
+++ b/src/mesa/state_tracker/st_cb_program.c
@@ -144,9 +144,11 @@ st_delete_program(GLcontext *ctx, struct gl_program *prog)
}
if (stvp->draw_shader) {
+#if FEATURE_feedback || FEATURE_drawpix
/* this would only have been allocated for the RasterPos path */
draw_delete_vertex_shader(st->draw, stvp->draw_shader);
stvp->draw_shader = NULL;
+#endif
}
if (stvp->state.tokens) {
@@ -232,9 +234,11 @@ static void st_program_string_notify( GLcontext *ctx,
}
if (stvp->draw_shader) {
+#if FEATURE_feedback || FEATURE_drawpix
/* this would only have been allocated for the RasterPos path */
draw_delete_vertex_shader(st->draw, stvp->draw_shader);
stvp->draw_shader = NULL;
+#endif
}
if (stvp->state.tokens) {
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index 09d9c29e446..eb71779cc9f 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/src/mesa/state_tracker/st_cb_readpixels.c
@@ -262,7 +262,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
GLuint ztemp[MAX_WIDTH];
GLfloat zfloat[MAX_WIDTH];
const double scale = 1.0 / ((1 << 24) - 1);
- pipe_get_tile_raw(pipe, surf, x, y, width, 1, ztemp, 0);
+ pipe_get_tile_raw(surf, x, y, width, 1, ztemp, 0);
y += yStep;
for (j = 0; j < width; j++) {
zfloat[j] = (float) (scale * (ztemp[j] & 0xffffff));
@@ -276,7 +276,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
/* untested, but simple: */
assert(format == GL_DEPTH_STENCIL_EXT);
for (i = 0; i < height; i++) {
- pipe_get_tile_raw(pipe, surf, x, y, width, 1, dst, 0);
+ pipe_get_tile_raw(surf, x, y, width, 1, dst, 0);
y += yStep;
dst += dstStride;
}
@@ -287,7 +287,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
GLushort ztemp[MAX_WIDTH];
GLfloat zfloat[MAX_WIDTH];
const double scale = 1.0 / 0xffff;
- pipe_get_tile_raw(pipe, surf, x, y, width, 1, ztemp, 0);
+ pipe_get_tile_raw(surf, x, y, width, 1, ztemp, 0);
y += yStep;
for (j = 0; j < width; j++) {
zfloat[j] = (float) (scale * ztemp[j]);
@@ -302,7 +302,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
GLuint ztemp[MAX_WIDTH];
GLfloat zfloat[MAX_WIDTH];
const double scale = 1.0 / 0xffffffff;
- pipe_get_tile_raw(pipe, surf, x, y, width, 1, ztemp, 0);
+ pipe_get_tile_raw(surf, x, y, width, 1, ztemp, 0);
y += yStep;
for (j = 0; j < width; j++) {
zfloat[j] = (float) (scale * ztemp[j]);
@@ -316,7 +316,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
/* RGBA format */
/* Do a row at a time to flip image data vertically */
for (i = 0; i < height; i++) {
- pipe_get_tile_rgba(pipe, surf, x, y, width, 1, df);
+ pipe_get_tile_rgba(surf, x, y, width, 1, df);
y += yStep;
df += dfStride;
if (!dfStride) {
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index b9aa513d723..73f8b8f7880 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -1100,25 +1100,25 @@ fallback_copy_texsubimage(GLcontext *ctx,
for (row = 0; row < height; row++, srcY++, destY += yStep) {
uint data[MAX_WIDTH];
- pipe_get_tile_z(pipe, src_surf, srcX, srcY, width, 1, data);
+ pipe_get_tile_z(src_surf, srcX, srcY, width, 1, data);
if (scaleOrBias) {
_mesa_scale_and_bias_depth_uint(ctx, width, data);
}
- pipe_put_tile_z(pipe, dest_surf, destX, destY, width, 1, data);
+ pipe_put_tile_z(dest_surf, destX, destY, width, 1, data);
}
}
else {
/* RGBA format */
for (row = 0; row < height; row++, srcY++, destY += yStep) {
float data[4 * MAX_WIDTH];
- pipe_get_tile_rgba(pipe, src_surf, srcX, srcY, width, 1, data);
+ pipe_get_tile_rgba(src_surf, srcX, srcY, width, 1, data);
/* XXX we're ignoring convolution for now */
if (ctx->_ImageTransferState) {
_mesa_apply_rgba_transfer_ops(ctx,
ctx->_ImageTransferState & ~IMAGE_CONVOLUTION_BIT,
width, (GLfloat (*)[4]) data);
}
- pipe_put_tile_rgba(pipe, dest_surf, destX, destY, width, 1, data);
+ pipe_put_tile_rgba(dest_surf, destX, destY, width, 1, data);
}
}
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index bf78cacb8ea..8b30e35684b 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -98,6 +98,7 @@ st_create_context_priv( GLcontext *ctx, struct pipe_context *pipe )
/* state tracker needs the VBO module */
_vbo_CreateContext(ctx);
+#if FEATURE_feedback || FEATURE_drawpix
st->draw = draw_create(); /* for selection/feedback */
/* Disable draw options that might convert points/lines to tris, etc.
@@ -107,6 +108,7 @@ st_create_context_priv( GLcontext *ctx, struct pipe_context *pipe )
draw_wide_point_threshold(st->draw, 1000.0f);
draw_enable_line_stipple(st->draw, FALSE);
draw_enable_point_sprites(st->draw, FALSE);
+#endif
st->dirty.mesa = ~0;
st->dirty.st = ~0;
@@ -164,7 +166,9 @@ static void st_destroy_context_priv( struct st_context *st )
{
uint i;
+#if FEATURE_feedback || FEATURE_drawpix
draw_destroy(st->draw);
+#endif
st_destroy_atoms( st );
st_destroy_draw( st );
st_destroy_generate_mipmap(st);
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index a57d7b6a7aa..30c2bdb723f 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -447,6 +447,7 @@ st_draw_vbo(GLcontext *ctx,
}
+#if FEATURE_feedback || FEATURE_drawpix
/**
* Set the (private) draw module's post-transformed vertex format when in
@@ -657,6 +658,7 @@ st_feedback_draw_vbo(GLcontext *ctx,
}
}
+#endif /* FEATURE_feedback || FEATURE_drawpix */
void st_init_draw( struct st_context *st )