#include "si_pm4.h"
#include "../radeon/r600_pipe_common.h"
+struct si_screen;
+
struct si_state_blend {
struct si_pm4_state pm4;
uint32_t cb_target_mask;
struct si_pm4_state *sample_mask;
struct si_pm4_state *scissor;
struct si_state_viewport *viewport;
- struct si_pm4_state *framebuffer;
struct si_state_rasterizer *rasterizer;
struct si_state_dsa *dsa;
struct si_pm4_state *fb_rs;
struct si_pm4_state *fb_blend;
struct si_pm4_state *dsa_stencil_ref;
+ 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;
#define NUM_SAMPLER_VIEWS (FMASK_TEX_OFFSET+NUM_TEX_UNITS)
#define NUM_SAMPLER_STATES NUM_TEX_UNITS
-#define NUM_PIPE_CONST_BUFFERS 16
-#define NUM_CONST_BUFFERS 17
+#define NUM_PIPE_CONST_BUFFERS 16
+#define NUM_CONST_BUFFERS (NUM_PIPE_CONST_BUFFERS + 1)
+
+#define SI_RING_ESGS 0
+#define SI_RING_GSVS 1
/* This represents resource descriptors in memory, such as buffer resources,
* image resources, and sampler states.
struct si_descriptors desc;
unsigned num_buffers;
enum radeon_bo_usage shader_usage; /* READ, WRITE, or READWRITE */
+ enum radeon_bo_priority priority;
struct pipe_resource **buffers; /* this has num_buffers elements */
uint32_t *desc_storage; /* this has num_buffers*4 elements */
uint32_t **desc_data; /* an array of pointers pointing to desc_storage */
void si_set_sampler_view(struct si_context *sctx, unsigned shader,
unsigned slot, struct pipe_sampler_view *view,
unsigned *view_desc);
+void si_set_ring_buffer(struct pipe_context *ctx, uint shader, uint slot,
+ struct pipe_constant_buffer *input,
+ unsigned stride, unsigned num_records,
+ bool add_tid, bool swizzle,
+ unsigned element_size, unsigned index_stride);
void si_init_all_descriptors(struct si_context *sctx);
void si_release_all_descriptors(struct si_context *sctx);
void si_all_descriptors_begin_new_cs(struct si_context *sctx);
void si_copy_buffer(struct si_context *sctx,
struct pipe_resource *dst, struct pipe_resource *src,
uint64_t dst_offset, uint64_t src_offset, unsigned size);
+void si_upload_const_buffer(struct si_context *sctx, struct r600_resource **rbuffer,
+ const uint8_t *ptr, unsigned size, uint32_t *const_offset);
/* si_state.c */
struct si_pipe_shader_selector;
-struct si_surface;
boolean si_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,
unsigned sample_count,
unsigned usage);
int si_shader_select(struct pipe_context *ctx,
- struct si_pipe_shader_selector *sel,
- unsigned *dirty);
+ struct si_pipe_shader_selector *sel);
void si_init_state_functions(struct si_context *sctx);
void si_init_config(struct si_context *sctx);
+unsigned cik_bank_wh(unsigned bankwh);
+unsigned cik_db_pipe_config(struct si_screen *sscreen, unsigned tile_mode);
+unsigned cik_macro_tile_aspect(unsigned macro_tile_aspect);
+unsigned cik_tile_split(unsigned tile_split);
+unsigned si_tile_mode_index(struct r600_texture *rtex, unsigned level, bool stencil);
/* si_state_draw.c */
extern const struct r600_atom si_atom_cache_flush;