struct si_shader_part *vs_prologs;
struct si_shader_part *vs_epilogs;
struct si_shader_part *tcs_epilogs;
+ struct si_shader_part *gs_prologs;
struct si_shader_part *ps_prologs;
struct si_shader_part *ps_epilogs;
bool is_stencil_sampler;
};
+#define SI_SAMPLER_STATE_MAGIC 0x34f1c35a
+
struct si_sampler_state {
+#ifdef DEBUG
+ unsigned magic;
+#endif
uint32_t val[4];
};
unsigned nr_samples;
unsigned log_samples;
unsigned compressed_cb_mask;
+ unsigned colorbuf_enabled_4bit;
unsigned spi_shader_col_format;
unsigned spi_shader_col_format_alpha;
unsigned spi_shader_col_format_blend;
unsigned last_sc_line_stipple;
int last_vtx_reuse_depth;
int current_rast_prim; /* primitive type after TES, GS */
- unsigned last_gsvs_itemsize;
+ bool gs_tri_strip_adj_fix;
/* Scratch buffer */
struct r600_resource *scratch_buffer;
struct si_shader_selector *last_tcs;
int last_num_tcs_input_cp;
int last_tes_sh_base;
+ unsigned last_num_patches;
/* Debug state. */
bool is_debug;
const struct pipe_box *src_box);
/* si_cp_dma.c */
+#define SI_CPDMA_SKIP_CHECK_CS_SPACE (1 << 0) /* don't call need_cs_space */
+#define SI_CPDMA_SKIP_SYNC_AFTER (1 << 1) /* don't wait for DMA after the copy */
+#define SI_CPDMA_SKIP_SYNC_BEFORE (1 << 2) /* don't wait for DMA before the copy (RAW hazards) */
+#define SI_CPDMA_SKIP_GFX_SYNC (1 << 3) /* don't flush caches and don't wait for PS/CS */
+
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);
+ uint64_t dst_offset, uint64_t src_offset, unsigned size,
+ unsigned user_flags);
+void cik_prefetch_TC_L2_async(struct si_context *sctx, struct pipe_resource *buf,
+ uint64_t offset, unsigned size);
void si_init_cp_dma_functions(struct si_context *sctx);
/* si_debug.c */
* common helpers
*/
-static inline struct r600_resource *
-si_resource_create_custom(struct pipe_screen *screen,
- unsigned usage, unsigned size)
-{
- assert(size);
- return r600_resource(pipe_buffer_create(screen,
- PIPE_BIND_CUSTOM, usage, size));
-}
-
static inline void
si_invalidate_draw_sh_constants(struct si_context *sctx)
{
static inline struct si_shader* si_get_vs_state(struct si_context *sctx)
{
if (sctx->gs_shader.current)
- return sctx->gs_shader.current->gs_copy_shader;
+ return sctx->gs_shader.cso->gs_copy_shader;
else if (sctx->tes_shader.current)
return sctx->tes_shader.current;
else
static inline bool si_vs_exports_prim_id(struct si_shader *shader)
{
if (shader->selector->type == PIPE_SHADER_VERTEX)
- return shader->key.vs.epilog.export_prim_id;
+ return shader->key.part.vs.epilog.export_prim_id;
else if (shader->selector->type == PIPE_SHADER_TESS_EVAL)
- return shader->key.tes.epilog.export_prim_id;
+ return shader->key.part.tes.epilog.export_prim_id;
else
return false;
}