radeonsi: split si_clear_buffer to remove enum si_method
[mesa.git] / src / gallium / drivers / radeonsi / si_pipe.h
index 4a3e8bba18e28e2ea5412cce867306fb69f40824..7773cb02d7c50704714617c9e18bda3880833d65 100644 (file)
@@ -165,6 +165,7 @@ enum {
        DBG_TEST_VMFAULT_CP,
        DBG_TEST_VMFAULT_SDMA,
        DBG_TEST_VMFAULT_SHADER,
+       DBG_TEST_CLEARBUF_PERF,
 };
 
 #define DBG_ALL_SHADERS                (((1 << (DBG_CS + 1)) - 1))
@@ -248,7 +249,6 @@ struct si_texture {
        unsigned                        color_clear_value[2];
        unsigned                        last_msaa_resolve_target_micro_mode;
        unsigned                        num_level0_transfers;
-       unsigned                        num_color_samples;
 
        /* Depth buffer compression and fast clear. */
        uint64_t                        htile_offset;
@@ -804,6 +804,9 @@ struct si_context {
        struct si_scissors              scissors;
        struct si_streamout             streamout;
        struct si_viewports             viewports;
+       unsigned                        num_window_rectangles;
+       bool                            window_rectangles_include;
+       struct pipe_scissor_state       window_rectangles[4];
 
        /* Precomputed states. */
        struct si_pm4_state             *init_config;
@@ -1105,6 +1108,11 @@ void si_init_clear_functions(struct si_context *sctx);
                           SI_CPDMA_SKIP_GFX_SYNC | \
                           SI_CPDMA_SKIP_BO_LIST_UPDATE)
 
+enum si_cache_policy {
+       L2_BYPASS,
+       L2_LRU,    /* same as SLC=0 */
+};
+
 enum si_coherency {
        SI_COHERENCY_NONE, /* no cache flushes needed */
        SI_COHERENCY_SHADER,
@@ -1112,6 +1120,10 @@ enum si_coherency {
 };
 
 void si_cp_dma_wait_for_idle(struct si_context *sctx);
+void si_cp_dma_clear_buffer(struct si_context *sctx, struct pipe_resource *dst,
+                           uint64_t offset, uint64_t size, unsigned value,
+                           enum si_coherency coher,
+                           enum si_cache_policy cache_policy);
 void si_clear_buffer(struct si_context *sctx, struct pipe_resource *dst,
                     uint64_t offset, uint64_t size, unsigned value,
                     enum si_coherency coher);
@@ -1197,9 +1209,18 @@ void si_init_query_functions(struct si_context *sctx);
 void si_suspend_queries(struct si_context *sctx);
 void si_resume_queries(struct si_context *sctx);
 
+/* si_shaderlib_tgsi.c */
+void *si_get_blitter_vs(struct si_context *sctx, enum blitter_attrib_type type,
+                       unsigned num_layers);
+void *si_create_fixed_func_tcs(struct si_context *sctx);
+void *si_create_query_result_cs(struct si_context *sctx);
+
 /* si_test_dma.c */
 void si_test_dma(struct si_screen *sscreen);
 
+/* si_test_clearbuffer.c */
+void si_test_clearbuffer_perf(struct si_screen *sscreen);
+
 /* si_uvd.c */
 struct pipe_video_codec *si_uvd_create_decoder(struct pipe_context *context,
                                               const struct pipe_video_codec *templ);