uint32_t sh_base[SI_NUM_SHADERS];
};
-/* User sampler views: 0..31
- * Polygon stipple tex: 32
- */
#define SI_NUM_USER_SAMPLERS 32 /* AKA OpenGL textures units per shader */
-#define SI_POLY_STIPPLE_SAMPLER SI_NUM_USER_SAMPLERS
-#define SI_NUM_SAMPLERS (SI_POLY_STIPPLE_SAMPLER + 1)
+#define SI_NUM_SAMPLERS SI_NUM_USER_SAMPLERS
/* User constant buffers: 0..15
* Driver state constants: 16
#define SI_NUM_SHADER_BUFFERS 16
-/* Read-write buffer slots.
- *
- * Ring buffers: 0..1
- * Streamout buffers: 2..5
- */
-#define SI_RING_TESS_FACTOR 0 /* for HS (TCS) */
-#define SI_RING_ESGS 0 /* for ES, GS */
-#define SI_RING_GSVS 1 /* for GS, VS */
-#define SI_RING_GSVS_1 2 /* 1, 2, 3 for GS */
-#define SI_RING_GSVS_2 3
-#define SI_RING_GSVS_3 4
-#define SI_NUM_RING_BUFFERS 5
-#define SI_SO_BUF_OFFSET SI_NUM_RING_BUFFERS
-#define SI_NUM_RW_BUFFERS (SI_SO_BUF_OFFSET + 4)
+/* Private read-write buffer slots. */
+enum {
+ SI_HS_RING_TESS_FACTOR,
+
+ SI_ES_RING_ESGS,
+ SI_GS_RING_ESGS,
+
+ SI_GS_RING_GSVS0,
+ SI_GS_RING_GSVS1,
+ SI_GS_RING_GSVS2,
+ SI_GS_RING_GSVS3,
+ SI_VS_RING_GSVS,
+
+ SI_VS_STREAMOUT_BUF0,
+ SI_VS_STREAMOUT_BUF1,
+ SI_VS_STREAMOUT_BUF2,
+ SI_VS_STREAMOUT_BUF3,
+
+ SI_VS_CONST_CLIP_PLANES,
+ SI_PS_CONST_POLY_STIPPLE,
+ SI_PS_CONST_SAMPLE_POSITIONS,
+
+ SI_NUM_RW_BUFFERS,
+};
#define SI_NUM_VERTEX_BUFFERS SI_MAX_ATTRIBS
} while(0)
/* si_descriptors.c */
+void si_ce_enable_loads(struct radeon_winsys_cs *ib);
void si_set_ring_buffer(struct pipe_context *ctx, uint shader, uint slot,
struct pipe_resource *buffer,
unsigned stride, unsigned num_records,
void si_emit_graphics_shader_userdata(struct si_context *sctx,
struct r600_atom *atom);
void si_emit_compute_shader_userdata(struct si_context *sctx);
+void si_set_constant_buffer(struct si_context *sctx,
+ struct si_buffer_resources *buffers,
+ uint slot, struct pipe_constant_buffer *input);
/* si_state.c */
struct si_shader_selector;
/* si_state_draw.c */
void si_emit_cache_flush(struct si_context *sctx, struct r600_atom *atom);
+void si_ce_pre_draw_synchronization(struct si_context *sctx);
+void si_ce_post_draw_synchronization(struct si_context *sctx);
void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *dinfo);
void si_trace_emit(struct si_context *sctx);