summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_context.c4
-rw-r--r--src/gallium/drivers/softpipe/sp_context.h2
-rw-r--r--src/gallium/drivers/softpipe/sp_prim_setup.c2
-rw-r--r--src/gallium/drivers/softpipe/sp_quad_stencil.c4
-rw-r--r--src/gallium/drivers/softpipe/sp_state_fs.c3
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c14
-rw-r--r--src/gallium/drivers/softpipe/sp_tile_cache.c14
-rw-r--r--src/gallium/drivers/softpipe/sp_winsys.h2
8 files changed, 28 insertions, 17 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index edf91ecafa..fe9cd8375e 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -122,7 +122,7 @@ static void softpipe_destroy( struct pipe_context *pipe )
struct pipe_context *
softpipe_create( struct pipe_screen *screen,
struct pipe_winsys *pipe_winsys,
- struct softpipe_winsys *softpipe_winsys )
+ void *unused )
{
struct softpipe_context *softpipe = CALLOC_STRUCT(softpipe_context);
uint i;
@@ -212,8 +212,6 @@ softpipe_create( struct pipe_screen *screen,
softpipe->quad.colormask = sp_quad_colormask_stage(softpipe);
softpipe->quad.output = sp_quad_output_stage(softpipe);
- softpipe->winsys = softpipe_winsys;
-
/*
* Create drawing context and plug our rendering stage into it.
*/
diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h
index b3e2b2e435..62eabfb30e 100644
--- a/src/gallium/drivers/softpipe/sp_context.h
+++ b/src/gallium/drivers/softpipe/sp_context.h
@@ -57,8 +57,6 @@ struct sp_vertex_shader;
struct softpipe_context {
struct pipe_context pipe; /**< base class */
- struct softpipe_winsys *winsys; /**< window system interface */
-
/* The most recent drawing state as set by the driver:
*/
diff --git a/src/gallium/drivers/softpipe/sp_prim_setup.c b/src/gallium/drivers/softpipe/sp_prim_setup.c
index feb35d492a..1cf9ffa632 100644
--- a/src/gallium/drivers/softpipe/sp_prim_setup.c
+++ b/src/gallium/drivers/softpipe/sp_prim_setup.c
@@ -150,6 +150,8 @@ static void reset_stipple_counter( struct draw_stage *stage )
static void render_destroy( struct draw_stage *stage )
{
+ struct setup_stage *ssetup = setup_stage(stage);
+ setup_destroy_context(ssetup->setup);
FREE( stage );
}
diff --git a/src/gallium/drivers/softpipe/sp_quad_stencil.c b/src/gallium/drivers/softpipe/sp_quad_stencil.c
index 92a0da0083..b4c7e942fa 100644
--- a/src/gallium/drivers/softpipe/sp_quad_stencil.c
+++ b/src/gallium/drivers/softpipe/sp_quad_stencil.c
@@ -243,7 +243,7 @@ stencil_test_quad(struct quad_stage *qs, struct quad_header *quad)
stencilVals[j] = tile->data.depth32[y][x] & 0xff;
}
break;
- case PIPE_FORMAT_U_S8:
+ case PIPE_FORMAT_S8_UNORM:
for (j = 0; j < QUAD_SIZE; j++) {
int x = quad->x0 % TILE_SIZE + (j & 1);
int y = quad->y0 % TILE_SIZE + (j >> 1);
@@ -311,7 +311,7 @@ stencil_test_quad(struct quad_stage *qs, struct quad_header *quad)
tile->data.depth32[y][x] = z24s8;
}
break;
- case PIPE_FORMAT_U_S8:
+ case PIPE_FORMAT_S8_UNORM:
for (j = 0; j < QUAD_SIZE; j++) {
int x = quad->x0 % TILE_SIZE + (j & 1);
int y = quad->y0 % TILE_SIZE + (j >> 1);
diff --git a/src/gallium/drivers/softpipe/sp_state_fs.c b/src/gallium/drivers/softpipe/sp_state_fs.c
index 2921066ce3..9e77b7e91b 100644
--- a/src/gallium/drivers/softpipe/sp_state_fs.c
+++ b/src/gallium/drivers/softpipe/sp_state_fs.c
@@ -82,10 +82,9 @@ softpipe_bind_fs_state(struct pipe_context *pipe, void *fs)
void
softpipe_delete_fs_state(struct pipe_context *pipe, void *fs)
{
- struct softpipe_context *softpipe = softpipe_context(pipe);
struct sp_fragment_shader *state = fs;
- assert(fs != softpipe->fs);
+ assert(fs != softpipe_context(pipe)->fs);
state->delete( state );
}
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index 5b63f97997..be0b57d9fa 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -1051,5 +1051,19 @@ sp_get_samples(struct tgsi_sampler *sampler,
default:
assert(0);
}
+
+#if 0 /* DEBUG */
+ {
+ int i;
+ printf("Sampled at %f, %f, %f:\n", s[0], t[0], p[0]);
+ for (i = 0; i < 4; i++) {
+ printf("Frag %d: %f %f %f %f\n", i,
+ rgba[0][i],
+ rgba[1][i],
+ rgba[2][i],
+ rgba[3][i]);
+ }
+ }
+#endif
}
diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index edafd93d8b..1117c0ad4c 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -131,7 +131,7 @@ sp_destroy_tile_cache(struct softpipe_tile_cache *tc)
uint pos;
for (pos = 0; pos < NUM_ENTRIES; pos++) {
- //assert(tc->entries[pos].x < 0);
+ /*assert(tc->entries[pos].x < 0);*/
}
if (tc->surface) {
pipe_surface_reference(&tc->surface, NULL);
@@ -168,7 +168,7 @@ sp_tile_cache_set_surface(struct softpipe_tile_cache *tc,
tc->depth_stencil = (ps->format == PIPE_FORMAT_S8Z24_UNORM ||
ps->format == PIPE_FORMAT_Z16_UNORM ||
ps->format == PIPE_FORMAT_Z32_UNORM ||
- ps->format == PIPE_FORMAT_U_S8);
+ ps->format == PIPE_FORMAT_S8_UNORM);
}
}
@@ -332,8 +332,8 @@ sp_tile_cache_flush_clear(struct pipe_context *pipe,
for (x = 0; x < w; x += TILE_SIZE) {
if (is_clear_flag_set(tc->clear_flags, x, y)) {
pipe_put_tile_raw(pipe, ps,
- x, y, TILE_SIZE, TILE_SIZE,
- tc->tile.data.color32, 0/*STRIDE*/);
+ x, y, TILE_SIZE, TILE_SIZE,
+ tc->tile.data.color32, 0/*STRIDE*/);
/* do this? */
clear_clear_flag(tc->clear_flags, x, y);
@@ -367,8 +367,8 @@ sp_flush_tile_cache(struct softpipe_context *softpipe,
if (tile->x >= 0) {
if (tc->depth_stencil) {
pipe_put_tile_raw(pipe, ps,
- tile->x, tile->y, TILE_SIZE, TILE_SIZE,
- tile->data.depth32, 0/*STRIDE*/);
+ tile->x, tile->y, TILE_SIZE, TILE_SIZE,
+ tile->data.depth32, 0/*STRIDE*/);
}
else {
pipe_put_tile_rgba(pipe, ps,
@@ -385,7 +385,7 @@ sp_flush_tile_cache(struct softpipe_context *softpipe,
#endif
}
else if (tc->texture) {
- /* caching a texture, mark all entries as embpy */
+ /* caching a texture, mark all entries as empty */
for (pos = 0; pos < NUM_ENTRIES; pos++) {
tc->entries[pos].x = -1;
}
diff --git a/src/gallium/drivers/softpipe/sp_winsys.h b/src/gallium/drivers/softpipe/sp_winsys.h
index 291825dfe2..4ab666486c 100644
--- a/src/gallium/drivers/softpipe/sp_winsys.h
+++ b/src/gallium/drivers/softpipe/sp_winsys.h
@@ -59,7 +59,7 @@ struct pipe_context;
struct pipe_context *softpipe_create( struct pipe_screen *,
struct pipe_winsys *,
- struct softpipe_winsys * );
+ void *unused );
struct pipe_screen *