summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_pipe.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-08-30 14:13:10 +0200
committerMarek Olšák <[email protected]>2015-09-01 21:51:15 +0200
commita9971e85d9a4038645bdc7496d73906fc324b805 (patch)
treef2258bd2f71b042892c97f659c4066ded6fde143 /src/gallium/drivers/radeonsi/si_pipe.h
parent5e2619ef3078fe4f9c3e0780ee520fbfb727ee54 (diff)
radeonsi: rework uploading border colors
The border colors are uploaded only once when the state is created. This brings truly immutable sampler descriptors, because they don't have to be updated every time a sampler state is re-bound. It also moves the TA_BC_BASE_ADDR registers to init_config, removing one more state. The catch is there is now a limit: only 4096 border colors can be used by one context. I don't think that will be a problem. Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.h')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index 02d75f00f98..847853e59e9 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -79,6 +79,7 @@
#define SI_GET_TRACE_POINT_ID(x) ((x) & 0xffff)
#define SI_MAX_VIEWPORTS 16
+#define SI_MAX_BORDER_COLORS 4096
struct si_compute;
@@ -103,7 +104,6 @@ struct si_sampler_view {
struct si_sampler_state {
uint32_t val[4];
- uint32_t border_color[4];
};
struct si_cs_shader_state {
@@ -219,8 +219,10 @@ struct si_context {
struct pipe_resource *esgs_ring;
struct pipe_resource *gsvs_ring;
struct pipe_resource *tf_ring;
- struct r600_resource *border_color_table;
- unsigned border_color_offset;
+ union pipe_color_union *border_color_table; /* in CPU memory, any endian */
+ struct r600_resource *border_color_buffer;
+ union pipe_color_union *border_color_map; /* in VRAM (slow access), little endian */
+ unsigned border_color_count;
/* Vertex and index buffers. */
bool vertex_buffers_dirty;