From 7cd06249b93e713b624c2b3cc7fa1a2eb8d51806 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Fri, 19 Aug 2022 11:40:13 -0700 Subject: [PATCH] intel/compiler: Remove INTEL_DEBUG=tcs8 For Gen11 and prior, the dispatch mode for TCS was SINGLE_PATCH, and this debug setting could be used to change it to 8_PATCH (falling back to SINGLE_PATCH when shader couldn't be in the multi dispatch mode). However after talking to Ken, seems this debug setting is not really worth keeping around, so removing it. For Gen12+ the only option is 8_PATCH, so it was always using that dispatch mode as before. Reviewed-by: Kenneth Graunke Reviewed-by: Jordan Justen Part-of: --- src/intel/compiler/brw_compiler.c | 4 +--- src/intel/compiler/brw_vec4_tcs.cpp | 10 +--------- src/intel/dev/intel_debug.c | 1 - src/intel/dev/intel_debug.h | 17 ++++++++--------- 4 files changed, 10 insertions(+), 22 deletions(-) diff --git a/src/intel/compiler/brw_compiler.c b/src/intel/compiler/brw_compiler.c index 969eb7ab58e..a2988c21c59 100644 --- a/src/intel/compiler/brw_compiler.c +++ b/src/intel/compiler/brw_compiler.c @@ -116,9 +116,7 @@ brw_compiler_create(void *mem_ctx, const struct intel_device_info *devinfo) compiler->precise_trig = env_var_as_boolean("INTEL_PRECISE_TRIG", false); - compiler->use_tcs_8_patch = - devinfo->ver >= 12 || - (devinfo->ver >= 9 && INTEL_DEBUG(DEBUG_TCS_EIGHT_PATCH)); + compiler->use_tcs_8_patch = devinfo->ver >= 12; /* Default to the sampler since that's what we've done since forever */ compiler->indirect_ubos_use_sampler = true; diff --git a/src/intel/compiler/brw_vec4_tcs.cpp b/src/intel/compiler/brw_vec4_tcs.cpp index 906fec6ec54..7747b209cb2 100644 --- a/src/intel/compiler/brw_vec4_tcs.cpp +++ b/src/intel/compiler/brw_vec4_tcs.cpp @@ -394,15 +394,7 @@ brw_compile_tcs(const struct brw_compiler *compiler, prog_data->patch_count_threshold = brw::get_patch_count_threshold(key->input_vertices); - if (compiler->use_tcs_8_patch && - nir->info.tess.tcs_vertices_out <= (devinfo->ver >= 12 ? 32 : 16) && - 2 + has_primitive_id + key->input_vertices <= (devinfo->ver >= 12 ? 63 : 31)) { - /* 3DSTATE_HS imposes two constraints on using 8_PATCH mode. First, the - * "Instance" field limits the number of output vertices to [1, 16] on - * gfx11 and below, or [1, 32] on gfx12 and above. Secondly, the - * "Dispatch GRF Start Register for URB Data" field is limited to [0, - * 31] - which imposes a limit on the input vertices. - */ + if (compiler->use_tcs_8_patch) { vue_prog_data->dispatch_mode = DISPATCH_MODE_TCS_8_PATCH; prog_data->instances = nir->info.tess.tcs_vertices_out; prog_data->include_primitive_id = has_primitive_id; diff --git a/src/intel/dev/intel_debug.c b/src/intel/dev/intel_debug.c index ce4d4e4931e..41ed20fa614 100644 --- a/src/intel/dev/intel_debug.c +++ b/src/intel/dev/intel_debug.c @@ -82,7 +82,6 @@ static const struct debug_control debug_control[] = { { "color", DEBUG_COLOR }, { "reemit", DEBUG_REEMIT }, { "soft64", DEBUG_SOFT64 }, - { "tcs8", DEBUG_TCS_EIGHT_PATCH }, { "bt", DEBUG_BT }, { "pc", DEBUG_PIPE_CONTROL }, { "nofc", DEBUG_NO_FAST_CLEAR }, diff --git a/src/intel/dev/intel_debug.h b/src/intel/dev/intel_debug.h index b03b2ac5b59..3e6e385a4d2 100644 --- a/src/intel/dev/intel_debug.h +++ b/src/intel/dev/intel_debug.h @@ -81,14 +81,13 @@ extern uint64_t intel_debug; #define DEBUG_COLOR (1ull << 33) #define DEBUG_REEMIT (1ull << 34) #define DEBUG_SOFT64 (1ull << 35) -#define DEBUG_TCS_EIGHT_PATCH (1ull << 36) -#define DEBUG_BT (1ull << 37) -#define DEBUG_PIPE_CONTROL (1ull << 38) -#define DEBUG_NO_FAST_CLEAR (1ull << 39) -#define DEBUG_NO32 (1ull << 40) -#define DEBUG_RT (1ull << 41) -#define DEBUG_TASK (1ull << 42) -#define DEBUG_MESH (1ull << 43) +#define DEBUG_BT (1ull << 36) +#define DEBUG_PIPE_CONTROL (1ull << 37) +#define DEBUG_NO_FAST_CLEAR (1ull << 38) +#define DEBUG_NO32 (1ull << 39) +#define DEBUG_RT (1ull << 40) +#define DEBUG_TASK (1ull << 41) +#define DEBUG_MESH (1ull << 42) #define DEBUG_ANY (~0ull) @@ -99,7 +98,7 @@ extern uint64_t intel_debug; #define DEBUG_DISK_CACHE_MASK \ (DEBUG_NO16 | DEBUG_NO_DUAL_OBJECT_GS | DEBUG_NO8 | DEBUG_SPILL_FS | \ DEBUG_SPILL_VEC4 | DEBUG_NO_COMPACTION | DEBUG_DO32 | DEBUG_SOFT64 | \ - DEBUG_TCS_EIGHT_PATCH | DEBUG_NO32) + DEBUG_NO32) #ifdef HAVE_ANDROID_PLATFORM #define LOG_TAG "INTEL-MESA"