summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/radeonsi/radeonsi_pipe.h
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2013-08-17 19:19:30 +0200
committerMarek Olšák <marek.olsak@amd.com>2013-08-31 01:34:30 +0200
commitaa5c40f97cf5d0609dfb8c0792eca5f6d5108579 (patch)
tree24dd4409aa82a30ab7574381b314e5764228cf7c /src/gallium/drivers/radeonsi/radeonsi_pipe.h
parenta81c3e00fee0626e63b1fb8ebb4c2cef3fb23367 (diff)
radeonsi: convert constant buffers to si_descriptors
There is a new "class" si_buffer_resources, which should be good enough for implementing any kind of buffer bindings (constant buffers, vertex buffers, streamout buffers, shader storage buffers, etc.) I don't even keep a copy of pipe_constant_buffer - we don't need it. The main motivation behind this is to have a well-tested infrastrusture for setting up streamout buffers. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>
Diffstat (limited to 'src/gallium/drivers/radeonsi/radeonsi_pipe.h')
-rw-r--r--src/gallium/drivers/radeonsi/radeonsi_pipe.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.h b/src/gallium/drivers/radeonsi/radeonsi_pipe.h
index 517925d8650..9d84e613e51 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_pipe.h
+++ b/src/gallium/drivers/radeonsi/radeonsi_pipe.h
@@ -115,13 +115,6 @@ struct r600_fence_block {
struct list_head head;
};
-struct r600_constbuf_state
-{
- struct pipe_constant_buffer cb[2];
- uint32_t enabled_mask;
- uint32_t dirty_mask;
-};
-
#define SI_NUM_ATOMS(rctx) (sizeof((rctx)->atoms)/sizeof((rctx)->atoms.array[0]))
#define SI_NUM_SHADERS (PIPE_SHADER_FRAGMENT+1)
@@ -138,6 +131,7 @@ struct r600_context {
union {
struct {
+ struct r600_atom *const_buffers[SI_NUM_SHADERS];
struct r600_atom *sampler_views[SI_NUM_SHADERS];
};
struct r600_atom *array[0];
@@ -164,7 +158,7 @@ struct r600_context {
/* shader information */
unsigned sprite_coord_enable;
unsigned export_16bpc;
- struct r600_constbuf_state constbuf_state[PIPE_SHADER_TYPES];
+ struct si_buffer_resources const_buffers[SI_NUM_SHADERS];
struct r600_textures_info samplers[SI_NUM_SHADERS];
struct r600_resource *border_color_table;
unsigned border_color_offset;