radeonsi: remove r600_ring::flush callback
[mesa.git] / src / gallium / drivers / radeonsi / si_pipe.h
index e3d45ef6c3b2b45a4958fbd528b209a16ca24cc8..1c6e10f7dc92b20ef17b14a9b157b6dbc19b5efa 100644 (file)
@@ -660,6 +660,13 @@ void si_resource_copy_region(struct pipe_context *ctx,
                             struct pipe_resource *src,
                             unsigned src_level,
                             const struct pipe_box *src_box);
+void si_decompress_dcc(struct pipe_context *ctx, struct r600_texture *rtex);
+void si_blit_decompress_depth(struct pipe_context *ctx,
+                             struct r600_texture *texture,
+                             struct r600_texture *staging,
+                             unsigned first_level, unsigned last_level,
+                             unsigned first_layer, unsigned last_layer,
+                             unsigned first_sample, unsigned last_sample);
 
 /* si_clear.c */
 void vi_dcc_clear_level(struct si_context *sctx,
@@ -698,6 +705,10 @@ void cik_emit_prefetch_L2(struct si_context *sctx);
 void si_init_cp_dma_functions(struct si_context *sctx);
 
 /* si_debug.c */
+void si_save_cs(struct radeon_winsys *ws, struct radeon_winsys_cs *cs,
+               struct radeon_saved_cs *saved, bool get_buffer_list);
+void si_clear_saved_cs(struct radeon_saved_cs *saved);
+void si_destroy_saved_cs(struct si_saved_cs *scs);
 void si_auto_log_cs(void *data, struct u_log_context *log);
 void si_log_hw_flush(struct si_context *sctx);
 void si_log_draw_state(struct si_context *sctx, struct u_log_context *log);
@@ -710,7 +721,22 @@ bool si_replace_shader(unsigned num, struct ac_shader_binary *binary);
 /* si_dma.c */
 void si_init_dma_functions(struct si_context *sctx);
 
+/* si_dma_cs.c */
+void si_need_dma_space(struct r600_common_context *ctx, unsigned num_dw,
+                      struct r600_resource *dst, struct r600_resource *src);
+void si_flush_dma_cs(void *ctx, unsigned flags, struct pipe_fence_handle **fence);
+void si_screen_clear_buffer(struct si_screen *sscreen, struct pipe_resource *dst,
+                           uint64_t offset, uint64_t size, unsigned value);
+
 /* si_fence.c */
+void si_gfx_write_event_eop(struct r600_common_context *ctx,
+                           unsigned event, unsigned event_flags,
+                           unsigned data_sel,
+                           struct r600_resource *buf, uint64_t va,
+                           uint32_t new_fence, unsigned query_type);
+unsigned si_gfx_write_fence_dwords(struct si_screen *screen);
+void si_gfx_wait_fence(struct r600_common_context *ctx,
+                      uint64_t va, uint32_t ref, uint32_t mask);
 void si_init_fence_functions(struct si_context *ctx);
 void si_init_screen_fence_functions(struct si_screen *screen);
 struct pipe_fence_handle *si_create_fence(struct pipe_context *ctx,
@@ -720,12 +746,11 @@ struct pipe_fence_handle *si_create_fence(struct pipe_context *ctx,
 const char *si_get_family_name(const struct si_screen *sscreen);
 void si_init_screen_get_functions(struct si_screen *sscreen);
 
-/* si_hw_context.c */
-void si_destroy_saved_cs(struct si_saved_cs *scs);
-void si_context_gfx_flush(void *context, unsigned flags,
-                         struct pipe_fence_handle **fence);
-void si_begin_new_cs(struct si_context *ctx);
-void si_need_cs_space(struct si_context *ctx);
+/* si_gfx_cs.c */
+void si_flush_gfx_cs(void *context, unsigned flags,
+                    struct pipe_fence_handle **fence);
+void si_begin_new_gfx_cs(struct si_context *ctx);
+void si_need_gfx_cs_space(struct si_context *ctx);
 
 /* si_compute.c */
 void si_init_compute_functions(struct si_context *sctx);
@@ -940,4 +965,21 @@ static inline unsigned si_get_ps_iter_samples(struct si_context *sctx)
        return sctx->ps_iter_samples;
 }
 
+static inline unsigned si_get_total_colormask(struct si_context *sctx)
+{
+       if (sctx->queued.named.rasterizer->rasterizer_discard)
+               return 0;
+
+       struct si_shader_selector *ps = sctx->ps_shader.cso;
+       unsigned colormask = sctx->framebuffer.colorbuf_enabled_4bit &
+                            sctx->queued.named.blend->cb_target_mask;
+
+       if (!ps->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS])
+               colormask &= ps->colors_written_4bit;
+       else if (!ps->colors_written_4bit)
+               colormask = 0; /* color0 writes all cbufs, but it's not written */
+
+       return colormask;
+}
+
 #endif