summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-25 18:50:15 -0600
committerBrian <[email protected]>2007-10-25 20:32:45 -0600
commitee80e0b620c5b9af62dac8ad64a84042b46f5264 (patch)
treef41b4fdaa0ff6658ff991925cd14423cdbc3f592 /src/mesa/pipe
parentafd19177e4e6571858fc94ab6be1b12bb54a04ed (diff)
Move the get/put_tile() functions to pipe_context.
The _rgba versions are temporary until the state tracker is updated.
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/i915simple/i915_surface.c17
-rw-r--r--src/mesa/pipe/p_context.h18
-rw-r--r--src/mesa/pipe/p_state.h21
-rw-r--r--src/mesa/pipe/softpipe/sp_context.c6
-rw-r--r--src/mesa/pipe/softpipe/sp_flush.c6
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_blend.c8
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_colormask.c5
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_depth_test.c2
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_output.c3
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_stencil.c2
-rw-r--r--src/mesa/pipe/softpipe/sp_state_surface.c6
-rw-r--r--src/mesa/pipe/softpipe/sp_surface.c91
-rw-r--r--src/mesa/pipe/softpipe/sp_surface.h9
-rw-r--r--src/mesa/pipe/softpipe/sp_tile_cache.c50
-rw-r--r--src/mesa/pipe/softpipe/sp_tile_cache.h6
15 files changed, 159 insertions, 91 deletions
diff --git a/src/mesa/pipe/i915simple/i915_surface.c b/src/mesa/pipe/i915simple/i915_surface.c
index c094cf9ec47..a07a21c13b1 100644
--- a/src/mesa/pipe/i915simple/i915_surface.c
+++ b/src/mesa/pipe/i915simple/i915_surface.c
@@ -29,7 +29,6 @@
#include "i915_state.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
-//#include "main/imports.h"
struct i915_surface
@@ -44,8 +43,9 @@ struct i915_surface
* Share it someday.
*/
static void
-i915_get_tile(struct pipe_surface *ps,
- unsigned x, unsigned y, unsigned w, unsigned h, float *p)
+i915_get_tile_rgba(struct pipe_context *pipe,
+ struct pipe_surface *ps,
+ uint x, uint y, uint w, uint h, float *p)
{
const unsigned *src
= ((const unsigned *) (ps->region->map + ps->offset))
@@ -82,8 +82,9 @@ i915_get_tile(struct pipe_surface *ps,
static void
-i915_put_tile(struct pipe_surface *ps,
- unsigned x, unsigned y, unsigned w, unsigned h, const float *p)
+i915_put_tile_rgba(struct pipe_context *pipe,
+ struct pipe_surface *ps,
+ uint x, uint y, uint w, uint h, const float *p)
{
/* any need to put tiles into i915 surfaces? */
assert(0);
@@ -102,8 +103,8 @@ i915_surface_alloc(struct pipe_context *pipe, unsigned format)
surf->surface.format = format;
surf->surface.refcount = 1;
- surf->surface.get_tile = i915_get_tile;
- surf->surface.put_tile = i915_put_tile;
+ // surf->surface.get_tile = i915_get_tile;
+ // surf->surface.put_tile = i915_put_tile;
return &surf->surface;
}
@@ -113,4 +114,6 @@ void
i915_init_surface_functions(struct i915_context *i915)
{
i915->pipe.surface_alloc = i915_surface_alloc;
+ i915->pipe.get_tile_rgba = i915_get_tile_rgba;
+ i915->pipe.put_tile_rgba = i915_put_tile_rgba;
}
diff --git a/src/mesa/pipe/p_context.h b/src/mesa/pipe/p_context.h
index 2558a6341ce..a22ea3a8a07 100644
--- a/src/mesa/pipe/p_context.h
+++ b/src/mesa/pipe/p_context.h
@@ -188,6 +188,24 @@ struct pipe_context {
unsigned face, unsigned level,
unsigned zslice);
+ /** Get a block of raw pixel data from a surface */
+ void (*get_tile)(struct pipe_context *pipe,
+ struct pipe_surface *ps,
+ uint x, uint y, uint w, uint h,
+ void *p, int dst_stride);
+ /** Put a block of raw pixel data into a surface */
+ void (*put_tile)(struct pipe_context *pipe,
+ struct pipe_surface *ps,
+ uint x, uint y, uint w, uint h,
+ const void *p, int src_stride);
+
+ /* XXX temporary here, move these to softpipe */
+ void (*get_tile_rgba)(struct pipe_context *pipe, struct pipe_surface *ps,
+ uint x, uint y, uint w, uint h, float *p);
+ void (*put_tile_rgba)(struct pipe_context *pipe, struct pipe_surface *ps,
+ uint x, uint y, uint w, uint h, const float *p);
+
+
/*
* Memory region functions
* Some of these may go away...
diff --git a/src/mesa/pipe/p_state.h b/src/mesa/pipe/p_state.h
index 69b11588e07..03045e42130 100644
--- a/src/mesa/pipe/p_state.h
+++ b/src/mesa/pipe/p_state.h
@@ -291,27 +291,6 @@ struct pipe_surface
unsigned width, height;
unsigned offset; /**< offset from start of region, in bytes */
unsigned refcount;
-
- /**
- * Get block/tile of pixels from surface as floats
- * If color surface, return float[4]. If depth surface, return float[1].
- */
- void (*get_tile)(struct pipe_surface *ps,
- uint x, uint y, uint w, uint h, float *p);
-
- /**
- * Put block/tile of pixels into surface as floats
- * If color surface, data is float[4]. If depth surface, data is float[1].
- */
- void (*put_tile)(struct pipe_surface *ps,
- uint x, uint y, uint w, uint h, const float *p);
-
- /** As above, but data is raw pixel data */
- void (*get_tile_raw)(struct pipe_surface *ps,
- uint x, uint y, uint w, uint h, void *p);
- /** As above, but data is raw pixel data */
- void (*put_tile_raw)(struct pipe_surface *ps,
- uint x, uint y, uint w, uint h, const void *p);
};
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c
index bf61019f624..476d4ac01cc 100644
--- a/src/mesa/pipe/softpipe/sp_context.c
+++ b/src/mesa/pipe/softpipe/sp_context.c
@@ -171,9 +171,9 @@ softpipe_unmap_surfaces(struct softpipe_context *sp)
uint i;
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++)
- sp_flush_tile_cache(sp->cbuf_cache[i]);
- sp_flush_tile_cache(sp->zbuf_cache);
- sp_flush_tile_cache(sp->sbuf_cache);
+ sp_flush_tile_cache(sp, sp->cbuf_cache[i]);
+ sp_flush_tile_cache(sp, sp->zbuf_cache);
+ sp_flush_tile_cache(sp, sp->sbuf_cache);
for (i = 0; i < sp->framebuffer.num_cbufs; i++) {
struct pipe_surface *ps = sp->framebuffer.cbufs[i];
diff --git a/src/mesa/pipe/softpipe/sp_flush.c b/src/mesa/pipe/softpipe/sp_flush.c
index 2b077c20210..1010924bf61 100644
--- a/src/mesa/pipe/softpipe/sp_flush.c
+++ b/src/mesa/pipe/softpipe/sp_flush.c
@@ -57,13 +57,13 @@ softpipe_flush( struct pipe_context *pipe,
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++)
if (softpipe->cbuf_cache[i])
- sp_flush_tile_cache(softpipe->cbuf_cache[i]);
+ sp_flush_tile_cache(softpipe, softpipe->cbuf_cache[i]);
if (softpipe->zbuf_cache)
- sp_flush_tile_cache(softpipe->zbuf_cache);
+ sp_flush_tile_cache(softpipe, softpipe->zbuf_cache);
if (softpipe->sbuf_cache)
- sp_flush_tile_cache(softpipe->sbuf_cache);
+ sp_flush_tile_cache(softpipe, softpipe->sbuf_cache);
/* Need this call for hardware buffers before swapbuffers.
*
diff --git a/src/mesa/pipe/softpipe/sp_quad_blend.c b/src/mesa/pipe/softpipe/sp_quad_blend.c
index b056e477b1d..9b7a48669d4 100644
--- a/src/mesa/pipe/softpipe/sp_quad_blend.c
+++ b/src/mesa/pipe/softpipe/sp_quad_blend.c
@@ -107,7 +107,8 @@ logicop_quad(struct quad_stage *qs, struct quad_header *quad)
uint *dst4 = (uint *) dst;
uint *res4 = (uint *) res;
struct softpipe_cached_tile *
- tile = sp_get_cached_tile(softpipe->cbuf_cache[0], quad->x0, quad->y0);
+ tile = sp_get_cached_tile(softpipe, softpipe->cbuf_cache[0],
+ quad->x0, quad->y0);
uint i, j;
/* get/swizzle dest colors */
@@ -222,8 +223,9 @@ blend_quad(struct quad_stage *qs, struct quad_header *quad)
static const float zero[4] = { 0, 0, 0, 0 };
static const float one[4] = { 1, 1, 1, 1 };
float source[4][QUAD_SIZE], dest[4][QUAD_SIZE];
- struct softpipe_cached_tile *
- tile = sp_get_cached_tile(softpipe->cbuf_cache[0], quad->x0, quad->y0);
+ struct softpipe_cached_tile *tile
+ = sp_get_cached_tile(softpipe, softpipe->cbuf_cache[0],
+ quad->x0, quad->y0);
uint i, j;
if (softpipe->blend->logicop_enable) {
diff --git a/src/mesa/pipe/softpipe/sp_quad_colormask.c b/src/mesa/pipe/softpipe/sp_quad_colormask.c
index 3c0196dd5dc..8872825555e 100644
--- a/src/mesa/pipe/softpipe/sp_quad_colormask.c
+++ b/src/mesa/pipe/softpipe/sp_quad_colormask.c
@@ -48,8 +48,9 @@ colormask_quad(struct quad_stage *qs, struct quad_header *quad)
{
struct softpipe_context *softpipe = qs->softpipe;
float dest[4][QUAD_SIZE];
- struct softpipe_cached_tile *
- tile = sp_get_cached_tile(softpipe->cbuf_cache[0], quad->x0, quad->y0);
+ struct softpipe_cached_tile *tile
+ = sp_get_cached_tile(softpipe,
+ softpipe->cbuf_cache[0], quad->x0, quad->y0);
uint i, j;
/* get/swizzle dest colors */
diff --git a/src/mesa/pipe/softpipe/sp_quad_depth_test.c b/src/mesa/pipe/softpipe/sp_quad_depth_test.c
index 29231322b83..05dafeca7c0 100644
--- a/src/mesa/pipe/softpipe/sp_quad_depth_test.c
+++ b/src/mesa/pipe/softpipe/sp_quad_depth_test.c
@@ -57,7 +57,7 @@ sp_depth_test_quad(struct quad_stage *qs, struct quad_header *quad)
unsigned zmask = 0;
unsigned j;
struct softpipe_cached_tile *tile
- = sp_get_cached_tile(softpipe->zbuf_cache, quad->x0, quad->y0);
+ = sp_get_cached_tile(softpipe, softpipe->zbuf_cache, quad->x0, quad->y0);
assert(sps); /* shouldn't get here if there's no zbuffer */
diff --git a/src/mesa/pipe/softpipe/sp_quad_output.c b/src/mesa/pipe/softpipe/sp_quad_output.c
index e86f42be461..f757a439279 100644
--- a/src/mesa/pipe/softpipe/sp_quad_output.c
+++ b/src/mesa/pipe/softpipe/sp_quad_output.c
@@ -43,7 +43,8 @@ output_quad(struct quad_stage *qs, struct quad_header *quad)
{
struct softpipe_context *softpipe = qs->softpipe;
struct softpipe_cached_tile *tile
- = sp_get_cached_tile(softpipe->cbuf_cache[0], quad->x0, quad->y0);
+ = sp_get_cached_tile(softpipe, softpipe->cbuf_cache[0],
+ quad->x0, quad->y0);
/* in-tile pos: */
const int itx = quad->x0 % TILE_SIZE;
const int ity = quad->y0 % TILE_SIZE;
diff --git a/src/mesa/pipe/softpipe/sp_quad_stencil.c b/src/mesa/pipe/softpipe/sp_quad_stencil.c
index 4a3823d6468..8475bf3b96c 100644
--- a/src/mesa/pipe/softpipe/sp_quad_stencil.c
+++ b/src/mesa/pipe/softpipe/sp_quad_stencil.c
@@ -206,7 +206,7 @@ stencil_test_quad(struct quad_stage *qs, struct quad_header *quad)
ubyte ref, wrtMask, valMask;
ubyte stencilVals[QUAD_SIZE];
struct softpipe_cached_tile *tile
- = sp_get_cached_tile(softpipe->sbuf_cache, quad->x0, quad->y0);
+ = sp_get_cached_tile(softpipe, softpipe->sbuf_cache, quad->x0, quad->y0);
uint j;
/* choose front or back face function, operator, etc */
diff --git a/src/mesa/pipe/softpipe/sp_state_surface.c b/src/mesa/pipe/softpipe/sp_state_surface.c
index cd1e75c563a..0960fc45ab0 100644
--- a/src/mesa/pipe/softpipe/sp_state_surface.c
+++ b/src/mesa/pipe/softpipe/sp_state_surface.c
@@ -51,7 +51,7 @@ softpipe_set_framebuffer_state(struct pipe_context *pipe,
/* check if changing cbuf */
if (sp->framebuffer.cbufs[i] != fb->cbufs[i]) {
/* flush old */
- sp_flush_tile_cache(sp->cbuf_cache[i]);
+ sp_flush_tile_cache(sp, sp->cbuf_cache[i]);
/* unmap old */
sps = softpipe_surface(sp->framebuffer.cbufs[i]);
if (sps && sps->surface.region)
@@ -73,7 +73,7 @@ softpipe_set_framebuffer_state(struct pipe_context *pipe,
/* zbuf changing? */
if (sp->framebuffer.zbuf != fb->zbuf) {
/* flush old */
- sp_flush_tile_cache(sp->zbuf_cache);
+ sp_flush_tile_cache(sp, sp->zbuf_cache);
/* unmap old */
sps = softpipe_surface(sp->framebuffer.zbuf);
if (sps && sps->surface.region)
@@ -98,7 +98,7 @@ softpipe_set_framebuffer_state(struct pipe_context *pipe,
/* sbuf changing? */
if (sp->framebuffer.sbuf != fb->sbuf) {
/* flush old */
- sp_flush_tile_cache(sp->sbuf_cache_sep);
+ sp_flush_tile_cache(sp, sp->sbuf_cache_sep);
/* unmap old */
sps = softpipe_surface(sp->framebuffer.sbuf);
if (sps && sps->surface.region)
diff --git a/src/mesa/pipe/softpipe/sp_surface.c b/src/mesa/pipe/softpipe/sp_surface.c
index 057a311cd97..b8af1c561ff 100644
--- a/src/mesa/pipe/softpipe/sp_surface.c
+++ b/src/mesa/pipe/softpipe/sp_surface.c
@@ -632,48 +632,48 @@ softpipe_init_surface_funcs(struct softpipe_surface *sps)
switch (sps->surface.format) {
case PIPE_FORMAT_U_A8_R8_G8_B8:
- sps->surface.get_tile = a8r8g8b8_get_tile;
- sps->surface.put_tile = a8r8g8b8_put_tile;
+ sps->get_tile = a8r8g8b8_get_tile;
+ sps->put_tile = a8r8g8b8_put_tile;
break;
case PIPE_FORMAT_U_A1_R5_G5_B5:
- sps->surface.get_tile = a1r5g5b5_get_tile;
+ sps->get_tile = a1r5g5b5_get_tile;
break;
case PIPE_FORMAT_U_L8:
- sps->surface.get_tile = l8_get_tile;
+ sps->get_tile = l8_get_tile;
break;
case PIPE_FORMAT_U_A8:
- sps->surface.get_tile = a8_get_tile;
+ sps->get_tile = a8_get_tile;
break;
case PIPE_FORMAT_U_I8:
- sps->surface.get_tile = i8_get_tile;
+ sps->get_tile = i8_get_tile;
break;
case PIPE_FORMAT_U_A8_L8:
- sps->surface.get_tile = a8_l8_get_tile;
+ sps->get_tile = a8_l8_get_tile;
break;
case PIPE_FORMAT_S_R16_G16_B16_A16:
- sps->surface.get_tile = r16g16b16a16_get_tile;
- sps->surface.put_tile = r16g16b16a16_put_tile;
+ sps->get_tile = r16g16b16a16_get_tile;
+ sps->put_tile = r16g16b16a16_put_tile;
break;
case PIPE_FORMAT_U_Z16:
- sps->surface.get_tile = z16_get_tile;
- sps->surface.get_tile_raw = get_tile_raw16;
- sps->surface.put_tile_raw = put_tile_raw16;
+ sps->get_tile = z16_get_tile;
+ sps->get_tile_raw = get_tile_raw16;
+ sps->put_tile_raw = put_tile_raw16;
break;
case PIPE_FORMAT_U_Z32:
- sps->surface.get_tile = z32_get_tile;
- sps->surface.get_tile_raw = get_tile_raw32;
- sps->surface.put_tile_raw = put_tile_raw32;
+ sps->get_tile = z32_get_tile;
+ sps->get_tile_raw = get_tile_raw32;
+ sps->put_tile_raw = put_tile_raw32;
break;
case PIPE_FORMAT_S8_Z24:
- sps->surface.get_tile = s8z24_get_tile;
- sps->surface.get_tile_raw = get_tile_raw32;
- sps->surface.put_tile_raw = put_tile_raw32;
+ sps->get_tile = s8z24_get_tile;
+ sps->get_tile_raw = get_tile_raw32;
+ sps->put_tile_raw = put_tile_raw32;
break;
case PIPE_FORMAT_U_S8:
- sps->surface.get_tile_raw = get_tile_raw8;
- sps->surface.put_tile_raw = put_tile_raw8;
+ sps->get_tile_raw = get_tile_raw8;
+ sps->put_tile_raw = put_tile_raw8;
break;
default:
assert(0);
@@ -739,8 +739,59 @@ softpipe_get_tex_surface(struct pipe_context *pipe,
}
+static void
+get_tile_generic(struct pipe_context *pipe,
+ struct pipe_surface *ps,
+ uint x, uint y, uint w, uint h,
+ void *p, int dst_stride)
+{
+ struct softpipe_surface *sps = softpipe_surface(ps);
+ sps->get_tile_raw(ps, x, y, w, h, p);
+}
+
+
+static void
+put_tile_generic(struct pipe_context *pipe,
+ struct pipe_surface *ps,
+ uint x, uint y, uint w, uint h,
+ const void *p, int src_stride)
+{
+ struct softpipe_surface *sps = softpipe_surface(ps);
+ sps->put_tile_raw(ps, x, y, w, h, p);
+}
+
+
+static void
+get_tile_rgba_generic(struct pipe_context *pipe,
+ struct pipe_surface *ps,
+ uint x, uint y, uint w, uint h,
+ float *p)
+{
+ struct softpipe_surface *sps = softpipe_surface(ps);
+ sps->get_tile(ps, x, y, w, h, p);
+}
+
+
+static void
+put_tile_rgba_generic(struct pipe_context *pipe,
+ struct pipe_surface *ps,
+ uint x, uint y, uint w, uint h,
+ const float *p)
+{
+ struct softpipe_surface *sps = softpipe_surface(ps);
+ sps->put_tile(ps, x, y, w, h, p);
+}
+
+
+
void
sp_init_surface_functions(struct softpipe_context *sp)
{
sp->pipe.surface_alloc = softpipe_surface_alloc;
+
+ sp->pipe.get_tile = get_tile_generic;
+ sp->pipe.put_tile = put_tile_generic;
+
+ sp->pipe.get_tile_rgba = get_tile_rgba_generic;
+ sp->pipe.put_tile_rgba = put_tile_rgba_generic;
}
diff --git a/src/mesa/pipe/softpipe/sp_surface.h b/src/mesa/pipe/softpipe/sp_surface.h
index 06c0a01aee5..0c2486a1716 100644
--- a/src/mesa/pipe/softpipe/sp_surface.h
+++ b/src/mesa/pipe/softpipe/sp_surface.h
@@ -46,7 +46,14 @@ struct softpipe_tile_cache;
struct softpipe_surface {
struct pipe_surface surface;
- /* no softpipe-specific extras now */
+ void (*get_tile)(struct pipe_surface *ps,
+ uint x, uint y, uint w, uint h, float *p);
+ void (*put_tile)(struct pipe_surface *ps,
+ uint x, uint y, uint w, uint h, const float *p);
+ void (*get_tile_raw)(struct pipe_surface *ps,
+ uint x, uint y, uint w, uint h, void *p);
+ void (*put_tile_raw)(struct pipe_surface *ps,
+ uint x, uint y, uint w, uint h, const void *p);
};
diff --git a/src/mesa/pipe/softpipe/sp_tile_cache.c b/src/mesa/pipe/softpipe/sp_tile_cache.c
index 129785d26da..421d7bdb1a7 100644
--- a/src/mesa/pipe/softpipe/sp_tile_cache.c
+++ b/src/mesa/pipe/softpipe/sp_tile_cache.c
@@ -153,8 +153,10 @@ sp_tile_cache_set_texture(struct softpipe_tile_cache *tc,
void
-sp_flush_tile_cache(struct softpipe_tile_cache *tc)
+sp_flush_tile_cache(struct softpipe_context *softpipe,
+ struct softpipe_tile_cache *tc)
{
+ struct pipe_context *pipe = &softpipe->pipe;
struct pipe_surface *ps = &tc->surface->surface;
boolean is_depth_stencil;
int inuse = 0, pos;
@@ -171,14 +173,14 @@ sp_flush_tile_cache(struct softpipe_tile_cache *tc)
struct softpipe_cached_tile *tile = tc->entries + pos;
if (tile->x >= 0) {
if (is_depth_stencil) {
- ps->put_tile_raw(ps,
- tile->x, tile->y, TILE_SIZE, TILE_SIZE,
- tile->data.depth32);
+ pipe->put_tile(pipe, ps,
+ tile->x, tile->y, TILE_SIZE, TILE_SIZE,
+ tile->data.depth32, 0/*STRIDE*/);
}
else {
- ps->put_tile(ps,
- tile->x, tile->y, TILE_SIZE, TILE_SIZE,
- (float *) tile->data.color);
+ pipe->put_tile_rgba(pipe, ps,
+ tile->x, tile->y, TILE_SIZE, TILE_SIZE,
+ (float *) tile->data.color);
}
tile->x = tile->y = -1; /* mark as empty */
@@ -193,8 +195,10 @@ sp_flush_tile_cache(struct softpipe_tile_cache *tc)
struct softpipe_cached_tile *
-sp_get_cached_tile(struct softpipe_tile_cache *tc, int x, int y)
+sp_get_cached_tile(struct softpipe_context *softpipe,
+ struct softpipe_tile_cache *tc, int x, int y)
{
+ struct pipe_context *pipe = &softpipe->pipe;
struct pipe_surface *ps = &tc->surface->surface;
boolean is_depth_stencil
= (ps->format == PIPE_FORMAT_S8_Z24 ||
@@ -216,14 +220,14 @@ sp_get_cached_tile(struct softpipe_tile_cache *tc, int x, int y)
if (tile->x != -1) {
/* put dirty tile back in framebuffer */
if (is_depth_stencil) {
- ps->put_tile_raw(ps,
- tile->x, tile->y, TILE_SIZE, TILE_SIZE,
- tile->data.depth32);
+ pipe->put_tile(pipe, ps,
+ tile->x, tile->y, TILE_SIZE, TILE_SIZE,
+ tile->data.depth32, 0 /*STRIDE*/);
}
else {
- ps->put_tile(ps,
- tile->x, tile->y, TILE_SIZE, TILE_SIZE,
- (float *) tile->data.color);
+ pipe->put_tile_rgba(pipe, ps,
+ tile->x, tile->y, TILE_SIZE, TILE_SIZE,
+ (float *) tile->data.color);
}
}
@@ -289,14 +293,14 @@ sp_get_cached_tile(struct softpipe_tile_cache *tc, int x, int y)
else {
/* get new tile from framebuffer */
if (is_depth_stencil) {
- ps->get_tile_raw(ps,
- tile_x, tile_y, TILE_SIZE, TILE_SIZE,
- tile->data.depth32);
+ pipe->get_tile(pipe, ps,
+ tile_x, tile_y, TILE_SIZE, TILE_SIZE,
+ tile->data.depth32, 0/*STRIDE*/);
}
else {
- ps->get_tile(ps,
- tile_x, tile_y, TILE_SIZE, TILE_SIZE,
- (float *) tile->data.color);
+ pipe->get_tile_rgba(pipe, ps,
+ tile_x, tile_y, TILE_SIZE, TILE_SIZE,
+ (float *) tile->data.color);
}
}
@@ -349,9 +353,9 @@ sp_get_cached_tile_tex(struct pipe_context *pipe,
struct pipe_surface *ps
= pipe->get_tex_surface(pipe, tc->texture, face, level, z);
- ps->get_tile(ps,
- tile_x, tile_y, TILE_SIZE, TILE_SIZE,
- (float *) tile->data.color);
+ pipe->get_tile_rgba(pipe, ps,
+ tile_x, tile_y, TILE_SIZE, TILE_SIZE,
+ (float *) tile->data.color);
pipe_surface_reference(&ps, NULL);
diff --git a/src/mesa/pipe/softpipe/sp_tile_cache.h b/src/mesa/pipe/softpipe/sp_tile_cache.h
index 15245a2efba..e122d70d138 100644
--- a/src/mesa/pipe/softpipe/sp_tile_cache.h
+++ b/src/mesa/pipe/softpipe/sp_tile_cache.h
@@ -74,13 +74,15 @@ sp_tile_cache_set_texture(struct softpipe_tile_cache *tc,
struct pipe_mipmap_tree *texture);
extern void
-sp_flush_tile_cache(struct softpipe_tile_cache *tc);
+sp_flush_tile_cache(struct softpipe_context *softpipe,
+ struct softpipe_tile_cache *tc);
extern void
sp_tile_cache_clear(struct softpipe_tile_cache *tc, const float value[4]);
extern struct softpipe_cached_tile *
-sp_get_cached_tile(struct softpipe_tile_cache *tc, int x, int y);
+sp_get_cached_tile(struct softpipe_context *softpipe,
+ struct softpipe_tile_cache *tc, int x, int y);
extern const struct softpipe_cached_tile *
sp_get_cached_tile_tex(struct pipe_context *pipe,