From 113278ee79a6366ad88a4f584aa1c0310d71b479 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 19 Aug 2017 18:56:36 +0200 Subject: radeonsi: remove Constant Engine support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have come to the conclusion that it doesn't improve performance. Tested-by: Dieter Nützel Reviewed-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeon/r600_gpu_load.c | 4 ---- src/gallium/drivers/radeon/r600_pipe_common.c | 2 -- src/gallium/drivers/radeon/r600_pipe_common.h | 5 ++-- src/gallium/drivers/radeon/r600_query.c | 3 --- src/gallium/drivers/radeon/r600_query.h | 1 - src/gallium/drivers/radeon/radeon_winsys.h | 33 +-------------------------- 6 files changed, 3 insertions(+), 45 deletions(-) (limited to 'src/gallium/drivers/radeon') diff --git a/src/gallium/drivers/radeon/r600_gpu_load.c b/src/gallium/drivers/radeon/r600_gpu_load.c index 4e9f7ea37cd..d35be4f327a 100644 --- a/src/gallium/drivers/radeon/r600_gpu_load.c +++ b/src/gallium/drivers/radeon/r600_gpu_load.c @@ -68,7 +68,6 @@ #define SURFACE_SYNC_BUSY(x) (((x) >> 21) & 0x1) #define DMA_BUSY(x) (((x) >> 22) & 0x1) #define SCRATCH_RAM_BUSY(x) (((x) >> 24) & 0x1) -#define CE_BUSY(x) (((x) >> 26) & 0x1) #define IDENTITY(x) x @@ -123,7 +122,6 @@ static void r600_update_mmio_counters(struct r600_common_screen *rscreen, UPDATE_COUNTER(surf_sync, SURFACE_SYNC_BUSY); UPDATE_COUNTER(cp_dma, DMA_BUSY); UPDATE_COUNTER(scratch_ram, SCRATCH_RAM_BUSY); - UPDATE_COUNTER(ce, CE_BUSY); } value = gui_busy || sdma_busy; @@ -266,8 +264,6 @@ static unsigned busy_index_from_type(struct r600_common_screen *rscreen, return BUSY_INDEX(rscreen, cp_dma); case R600_QUERY_GPU_SCRATCH_RAM_BUSY: return BUSY_INDEX(rscreen, scratch_ram); - case R600_QUERY_GPU_CE_BUSY: - return BUSY_INDEX(rscreen, ce); default: unreachable("invalid query type"); } diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index dc54b5e5b79..37c12dea374 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -815,8 +815,6 @@ static const struct debug_named_value common_debug_options[] = { { "norbplus", DBG_NO_RB_PLUS, "Disable RB+." }, { "sisched", DBG_SI_SCHED, "Enable LLVM SI Machine Instruction Scheduler." }, { "mono", DBG_MONOLITHIC_SHADERS, "Use old-style monolithic shaders compiled on demand" }, - { "ce", DBG_CE, "Force enable the constant engine" }, - { "noce", DBG_NO_CE, "Disable the constant engine"}, { "unsafemath", DBG_UNSAFE_MATH, "Enable unsafe math shader optimizations" }, { "nodccfb", DBG_NO_DCC_FB, "Disable separate DCC on the main framebuffer" }, diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index abe9c4ca57b..c10cf18219e 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -72,7 +72,7 @@ struct u_log_context; #define DBG_NIR (1 << 1) #define DBG_COMPUTE (1 << 2) #define DBG_VM (1 << 3) -#define DBG_CE (1 << 4) +/* gap */ /* shader logging */ #define DBG_FS (1 << 5) #define DBG_VS (1 << 6) @@ -108,7 +108,7 @@ struct u_log_context; #define DBG_NO_RB_PLUS (1ull << 45) #define DBG_SI_SCHED (1ull << 46) #define DBG_MONOLITHIC_SHADERS (1ull << 47) -#define DBG_NO_CE (1ull << 48) +/* gap */ #define DBG_UNSAFE_MATH (1ull << 49) #define DBG_NO_DCC_FB (1ull << 50) #define DBG_TEST_VMFAULT_CP (1ull << 51) @@ -375,7 +375,6 @@ union r600_mmio_counters { struct r600_mmio_counter surf_sync; struct r600_mmio_counter cp_dma; struct r600_mmio_counter scratch_ram; - struct r600_mmio_counter ce; } named; unsigned array[0]; }; diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index bccfe7f94f8..98bdd80d739 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -219,7 +219,6 @@ static bool r600_query_sw_begin(struct r600_common_context *rctx, case R600_QUERY_GPU_SURF_SYNC_BUSY: case R600_QUERY_GPU_CP_DMA_BUSY: case R600_QUERY_GPU_SCRATCH_RAM_BUSY: - case R600_QUERY_GPU_CE_BUSY: query->begin_result = r600_begin_counter(rctx->screen, query->b.type); break; @@ -376,7 +375,6 @@ static bool r600_query_sw_end(struct r600_common_context *rctx, case R600_QUERY_GPU_SURF_SYNC_BUSY: case R600_QUERY_GPU_CP_DMA_BUSY: case R600_QUERY_GPU_SCRATCH_RAM_BUSY: - case R600_QUERY_GPU_CE_BUSY: query->end_result = r600_end_counter(rctx->screen, query->b.type, query->begin_result); @@ -2075,7 +2073,6 @@ static struct pipe_driver_query_info r600_driver_query_list[] = { X("GPU-surf-sync-busy", GPU_SURF_SYNC_BUSY, UINT64, AVERAGE), X("GPU-cp-dma-busy", GPU_CP_DMA_BUSY, UINT64, AVERAGE), X("GPU-scratch-ram-busy", GPU_SCRATCH_RAM_BUSY, UINT64, AVERAGE), - X("GPU-ce-busy", GPU_CE_BUSY, UINT64, AVERAGE), }; #undef X diff --git a/src/gallium/drivers/radeon/r600_query.h b/src/gallium/drivers/radeon/r600_query.h index 815dc7fc3c2..7455c8e63a8 100644 --- a/src/gallium/drivers/radeon/r600_query.h +++ b/src/gallium/drivers/radeon/r600_query.h @@ -102,7 +102,6 @@ enum { R600_QUERY_GPU_SURF_SYNC_BUSY, R600_QUERY_GPU_CP_DMA_BUSY, R600_QUERY_GPU_SCRATCH_RAM_BUSY, - R600_QUERY_GPU_CE_BUSY, R600_QUERY_NUM_COMPILATIONS, R600_QUERY_NUM_SHADERS_CREATED, R600_QUERY_BACK_BUFFER_PS_DRAW_RATIO, diff --git a/src/gallium/drivers/radeon/radeon_winsys.h b/src/gallium/drivers/radeon/radeon_winsys.h index 351edcd76f9..b00b1443e74 100644 --- a/src/gallium/drivers/radeon/radeon_winsys.h +++ b/src/gallium/drivers/radeon/radeon_winsys.h @@ -173,8 +173,7 @@ struct radeon_winsys_cs { unsigned max_prev; /* Space in array pointed to by prev. */ unsigned prev_dw; /* Total number of dwords in previous chunks. */ - /* Memory usage of the buffer list. These are always 0 for CE and preamble - * IBs. */ + /* Memory usage of the buffer list. These are always 0 for preamble IBs. */ uint64_t used_vram; uint64_t used_gart; }; @@ -456,36 +455,6 @@ struct radeon_winsys { struct pipe_fence_handle **fence), void *flush_ctx); - /** - * Add a constant engine IB to a graphics CS. This makes the graphics CS - * from "cs_create" a group of two IBs that share a buffer list and are - * flushed together. - * - * The returned constant CS is only a stream for writing packets to the new - * IB. Calling other winsys functions with it is not allowed, not even - * "cs_destroy". - * - * In order to add buffers and check memory usage, use the graphics CS. - * In order to flush it, use the graphics CS, which will flush both IBs. - * Destroying the graphics CS will destroy both of them. - * - * \param cs The graphics CS from "cs_create" that will hold the buffer - * list and will be used for flushing. - */ - struct radeon_winsys_cs *(*cs_add_const_ib)(struct radeon_winsys_cs *cs); - - /** - * Add a constant engine preamble IB to a graphics CS. This add an extra IB - * in similar manner to cs_add_const_ib. This should always be called after - * cs_add_const_ib. - * - * The returned IB is a constant engine IB that only gets flushed if the - * context changed. - * - * \param cs The graphics CS from "cs_create" that will hold the buffer - * list and will be used for flushing. - */ - struct radeon_winsys_cs *(*cs_add_const_preamble_ib)(struct radeon_winsys_cs *cs); /** * Destroy a command stream. * -- cgit v1.2.3