}
}
+void si_screen_clear_buffer(struct si_screen *sscreen, struct pipe_resource *dst, uint64_t offset,
+ uint64_t size, unsigned value)
+{
+ struct si_context *ctx = (struct si_context *)sscreen->aux_context;
+
+ simple_mtx_lock(&sscreen->aux_context_lock);
+ ctx->b.clear_buffer(&ctx->b, dst, offset, size, &value, 4);
+ sscreen->aux_context->flush(sscreen->aux_context, NULL, 0);
+ simple_mtx_unlock(&sscreen->aux_context_lock);
+}
+
static void si_pipe_clear_buffer(struct pipe_context *ctx, struct pipe_resource *dst,
unsigned offset, unsigned size, const void *clear_value,
int clear_value_size)
si_clear_saved_cs(&saved);
}
}
-
-void si_screen_clear_buffer(struct si_screen *sscreen, struct pipe_resource *dst, uint64_t offset,
- uint64_t size, unsigned value)
-{
- struct si_context *ctx = (struct si_context *)sscreen->aux_context;
-
- simple_mtx_lock(&sscreen->aux_context_lock);
- si_sdma_clear_buffer(ctx, dst, offset, size, value);
- sscreen->aux_context->flush(sscreen->aux_context, NULL, 0);
- simple_mtx_unlock(&sscreen->aux_context_lock);
-}
void si_clear_buffer(struct si_context *sctx, struct pipe_resource *dst, uint64_t offset,
uint64_t size, uint32_t *clear_value, uint32_t clear_value_size,
enum si_coherency coher, bool force_cpdma);
+void si_screen_clear_buffer(struct si_screen *sscreen, struct pipe_resource *dst, uint64_t offset,
+ uint64_t size, unsigned value);
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_compute_copy_image(struct si_context *sctx, struct pipe_resource *dst, unsigned dst_level,
void si_need_dma_space(struct si_context *ctx, unsigned num_dw, struct si_resource *dst,
struct si_resource *src);
void si_flush_dma_cs(struct si_context *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_cp_release_mem(struct si_context *ctx, struct radeon_cmdbuf *cs, unsigned event,