radeonsi: move si_destroy_saved_cs to si_debug.c
[mesa.git] / src / gallium / drivers / radeonsi / si_pipe.h
index e3d45ef6c3b2b45a4958fbd528b209a16ca24cc8..8973ad093c2eeb7c385b0cd68182f16b9b84be0a 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,7 @@ void cik_emit_prefetch_L2(struct si_context *sctx);
 void si_init_cp_dma_functions(struct si_context *sctx);
 
 /* si_debug.c */
+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);
@@ -721,11 +729,10 @@ 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);
+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 +947,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