summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2014-02-09 19:23:58 +0100
committerMarek Olšák <marek.olsak@amd.com>2014-02-25 16:08:08 +0100
commit40b9812a761ce0745d9e17b92fd0abd27eb86bd7 (patch)
treebc0c5c70bb35faaf72c467b79bd030b011d43265 /src/gallium/drivers/radeonsi
parent933eaeee25f1a6a0377f194adb1ce698ff638e84 (diff)
r600g,radeonsi: share r600_surface
I'm gonna use this in radeonsi. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.h4
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c10
-rw-r--r--src/gallium/drivers/radeonsi/si_state.h1
3 files changed, 5 insertions, 10 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index f97feb0464c..4709454c9dd 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -70,10 +70,6 @@ struct si_textures_info {
unsigned n_samplers;
};
-struct si_surface {
- struct pipe_surface base;
-};
-
#define SI_NUM_ATOMS(sctx) (sizeof((sctx)->atoms)/sizeof((sctx)->atoms.array[0]))
#define SI_NUM_SHADERS (PIPE_SHADER_GEOMETRY+1)
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index f2886521e3a..0154e5804b8 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1576,7 +1576,7 @@ static void si_cb(struct si_context *sctx, struct si_pm4_state *pm4,
const struct pipe_framebuffer_state *state, int cb)
{
struct r600_texture *rtex;
- struct si_surface *surf;
+ struct r600_surface *surf;
unsigned level = state->cbufs[cb]->u.tex.level;
unsigned pitch, slice;
unsigned color_info, color_attrib, color_pitch, color_view;
@@ -1588,7 +1588,7 @@ static void si_cb(struct si_context *sctx, struct si_pm4_state *pm4,
unsigned blend_clamp = 0, blend_bypass = 0;
unsigned max_comp_size;
- surf = (struct si_surface *)state->cbufs[cb];
+ surf = (struct r600_surface *)state->cbufs[cb];
rtex = (struct r600_texture*)state->cbufs[cb]->texture;
offset = rtex->surface.level[level].offset;
@@ -1755,7 +1755,7 @@ static void si_db(struct si_context *sctx, struct si_pm4_state *pm4,
{
struct si_screen *sscreen = sctx->screen;
struct r600_texture *rtex;
- struct si_surface *surf;
+ struct r600_surface *surf;
unsigned level, pitch, slice, format, tile_mode_index, array_mode;
unsigned macro_aspect, tile_split, stile_split, bankh, bankw, nbanks, pipe_config;
uint32_t z_info, s_info, db_depth_info;
@@ -1768,7 +1768,7 @@ static void si_db(struct si_context *sctx, struct si_pm4_state *pm4,
return;
}
- surf = (struct si_surface *)state->zsbuf;
+ surf = (struct r600_surface *)state->zsbuf;
level = surf->base.u.tex.level;
rtex = (struct r600_texture*)surf->base.texture;
@@ -3084,7 +3084,7 @@ static struct pipe_surface *r600_create_surface(struct pipe_context *pipe,
const struct pipe_surface *surf_tmpl)
{
struct r600_texture *rtex = (struct r600_texture*)texture;
- struct si_surface *surface = CALLOC_STRUCT(si_surface);
+ struct r600_surface *surface = CALLOC_STRUCT(r600_surface);
unsigned level = surf_tmpl->u.tex.level;
if (surface == NULL)
diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h
index 6922c88e07c..fbc0d231226 100644
--- a/src/gallium/drivers/radeonsi/si_state.h
+++ b/src/gallium/drivers/radeonsi/si_state.h
@@ -217,7 +217,6 @@ void si_upload_const_buffer(struct si_context *sctx, struct r600_resource **rbuf
/* si_state.c */
struct si_pipe_shader_selector;
-struct si_surface;
boolean si_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,