radeonsi: remove more functions from r600_pipe_common.c
authorMarek Olšák <marek.olsak@amd.com>
Sat, 25 Nov 2017 21:39:28 +0000 (22:39 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 29 Nov 2017 17:21:30 +0000 (18:21 +0100)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeon/r600_pipe_common.h
src/gallium/drivers/radeonsi/si_hw_context.c

index a72d2d46e4e21f1e302bc1c631ba8606f2d66914..dc776a2187d5a3f7b2d094268fbd48042e896d4a 100644 (file)
 
 #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) {
index 0597af49803ac9588c6caf0d81dbd2e99c03a728..08dffb96b6285646d9923f01862d7f65bdd399cb 100644 (file)
@@ -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);
index f163e5031758535e07393286c480680a4a636e4d..4e94c472ad7cdd1c4672bcd0b6d71a3ab11441fc 100644 (file)
@@ -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;