diff options
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.c | 31 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_hw_context.c | 6 |
3 files changed, 4 insertions, 35 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index a72d2d46e4e..dc776a2187d 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -23,21 +23,9 @@ #include "r600_pipe_common.h" #include "r600_cs.h" -#include "tgsi/tgsi_parse.h" -#include "util/list.h" -#include "util/u_draw_quad.h" #include "util/u_memory.h" -#include "util/u_format_s3tc.h" #include "util/u_upload_mgr.h" -#include "util/os_time.h" -#include "vl/vl_decoder.h" -#include "vl/vl_video_buffer.h" #include "radeon/radeon_video.h" -#include "amd/common/ac_llvm_util.h" -#include "amd/common/sid.h" -#include <inttypes.h> - -#include <llvm-c/TargetMachine.h> /* * pipe_context @@ -252,24 +240,6 @@ void si_need_dma_space(struct r600_common_context *ctx, unsigned num_dw, ctx->num_dma_calls++; } -static void r600_memory_barrier(struct pipe_context *ctx, unsigned flags) -{ -} - -void si_preflush_suspend_features(struct r600_common_context *ctx) -{ - /* suspend queries */ - if (!LIST_IS_EMPTY(&ctx->active_queries)) - si_suspend_queries(ctx); -} - -void si_postflush_resume_features(struct r600_common_context *ctx) -{ - /* resume queries */ - if (!LIST_IS_EMPTY(&ctx->active_queries)) - si_resume_queries(ctx); -} - static void r600_flush_dma_ring(void *ctx, unsigned flags, struct pipe_fence_handle **fence) { @@ -450,7 +420,6 @@ bool si_common_context_init(struct r600_common_context *rctx, rctx->b.transfer_flush_region = u_transfer_flush_region_vtbl; rctx->b.transfer_unmap = u_transfer_unmap_vtbl; rctx->b.texture_subdata = u_default_texture_subdata; - rctx->b.memory_barrier = r600_memory_barrier; rctx->b.buffer_subdata = si_buffer_subdata; if (rscreen->info.drm_major == 2 && rscreen->info.drm_minor >= 43) { diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index 0597af49803..08dffb96b62 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -651,8 +651,6 @@ void si_gfx_wait_fence(struct r600_common_context *ctx, bool si_common_screen_init(struct r600_common_screen *rscreen, struct radeon_winsys *ws); void si_destroy_common_screen(struct r600_common_screen *rscreen); -void si_preflush_suspend_features(struct r600_common_context *ctx); -void si_postflush_resume_features(struct r600_common_context *ctx); bool si_common_context_init(struct r600_common_context *rctx, struct r600_common_screen *rscreen, unsigned context_flags); diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c index f163e503175..4e94c472ad7 100644 --- a/src/gallium/drivers/radeonsi/si_hw_context.c +++ b/src/gallium/drivers/radeonsi/si_hw_context.c @@ -97,7 +97,8 @@ void si_context_gfx_flush(void *context, unsigned flags, ctx->gfx_flush_in_progress = true; - si_preflush_suspend_features(&ctx->b); + if (!LIST_IS_EMPTY(&ctx->b.active_queries)) + si_suspend_queries(&ctx->b); ctx->streamout.suspended = false; if (ctx->streamout.begin_emitted) { @@ -274,7 +275,8 @@ void si_begin_new_cs(struct si_context *ctx) si_streamout_buffers_dirty(ctx); } - si_postflush_resume_features(&ctx->b); + if (!LIST_IS_EMPTY(&ctx->b.active_queries)) + si_resume_queries(&ctx->b); assert(!ctx->b.gfx.cs->prev_dw); ctx->b.initial_gfx_cs_size = ctx->b.gfx.cs->current.cdw; |