summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_state.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-06-18 02:46:49 +0200
committerMarek Olšák <[email protected]>2014-07-18 01:58:59 +0200
commitdd46841bc9685b48c972ebe5f5cf92770cf025fd (patch)
tree271fad13df6b5cc05ba96cab0ac78349de18cdd9 /src/gallium/drivers/radeonsi/si_state.h
parent2a7b57ad4269e7267922ff695a57b9a2ce413a06 (diff)
radeonsi: move sampler descriptors from IB to memory
Sampler descriptors are now represented by si_descriptors. This also adds support for fine-grained sampler state updates and the border color update is now isolated in a separate function. Border colors have been broken if texturing from multiple shader stages is used. This patch doesn't change that. BTW, blitting already makes use of fine-grained state updates. u_blitter uses 2 textures at most, so we only have to save 2. Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.h')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h
index ae42e6673b5..7a0433c1b9d 100644
--- a/src/gallium/drivers/radeonsi/si_state.h
+++ b/src/gallium/drivers/radeonsi/si_state.h
@@ -89,15 +89,13 @@ union si_state {
struct si_pm4_state *fb_rs;
struct si_pm4_state *fb_blend;
struct si_pm4_state *dsa_stencil_ref;
+ struct si_pm4_state *ta_bordercolor_base;
struct si_pm4_state *es;
struct si_pm4_state *gs;
struct si_pm4_state *gs_rings;
- struct si_pm4_state *gs_sampler;
struct si_pm4_state *gs_onoff;
struct si_pm4_state *vs;
- struct si_pm4_state *vs_sampler;
struct si_pm4_state *ps;
- struct si_pm4_state *ps_sampler;
struct si_pm4_state *spi;
struct si_pm4_state *vertex_buffers;
struct si_pm4_state *draw_info;
@@ -174,6 +172,12 @@ struct si_sampler_views {
uint32_t *desc_data[SI_NUM_SAMPLER_VIEWS];
};
+struct si_sampler_states {
+ struct si_descriptors desc;
+ uint32_t *desc_data[SI_NUM_SAMPLER_STATES];
+ void *saved_states[2]; /* saved for u_blitter */
+};
+
struct si_buffer_resources {
struct si_descriptors desc;
unsigned num_buffers;
@@ -218,6 +222,8 @@ struct si_buffer_resources {
void si_set_sampler_view(struct si_context *sctx, unsigned shader,
unsigned slot, struct pipe_sampler_view *view,
unsigned *view_desc);
+void si_set_sampler_descriptors(struct si_context *sctx, unsigned shader,
+ unsigned start, unsigned count, void **states);
void si_set_ring_buffer(struct pipe_context *ctx, uint shader, uint slot,
struct pipe_constant_buffer *input,
unsigned stride, unsigned num_records,