From 4335f47f411ac2da44a967e7d2c5752d62ff55d8 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 8 Jul 2021 08:37:55 -0700 Subject: [PATCH] freedreno/ir3: Get tess_use_shared from fd_dev_info A step towards getting rid of checks for gpu_id sprinkled around. Checking major generation is ok, but checking for == or >= a specific gpu_id is going to start getting messy as we add more a6xx. Signed-off-by: Rob Clark Part-of: --- src/freedreno/common/freedreno_dev_info.h | 2 ++ src/freedreno/common/freedreno_devices.py | 1 + src/freedreno/ir3/ir3_compiler.c | 6 ++++-- src/freedreno/ir3/meson.build | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/freedreno/common/freedreno_dev_info.h b/src/freedreno/common/freedreno_dev_info.h index 8d6fbe2..77756a2 100644 --- a/src/freedreno/common/freedreno_dev_info.h +++ b/src/freedreno/common/freedreno_dev_info.h @@ -64,6 +64,8 @@ struct fd_dev_info { bool ccu_cntl_gmem_unk2; bool has_z24uint_s8uint; + bool tess_use_shared; + struct { uint32_t RB_UNKNOWN_8E04_blit; uint32_t PC_UNKNOWN_9805; diff --git a/src/freedreno/common/freedreno_devices.py b/src/freedreno/common/freedreno_devices.py index 248d1d3..8404d4f 100644 --- a/src/freedreno/common/freedreno_devices.py +++ b/src/freedreno/common/freedreno_devices.py @@ -189,6 +189,7 @@ a6xx_gen3 = dict( fibers_per_sp = 128 * 2 * 16, supports_multiview_mask = True, has_z24uint_s8uint = True, + tess_use_shared = True, ) add_gpus([ diff --git a/src/freedreno/ir3/ir3_compiler.c b/src/freedreno/ir3/ir3_compiler.c index c37eae7..54fe98b 100644 --- a/src/freedreno/ir3/ir3_compiler.c +++ b/src/freedreno/ir3/ir3_compiler.c @@ -26,6 +26,8 @@ #include "util/ralloc.h" +#include "freedreno_dev_info.h" + #include "ir3_compiler.h" static const struct debug_named_value shader_debug_options[] = { @@ -120,8 +122,8 @@ ir3_compiler_create(struct fd_device *dev, uint32_t gpu_id, /* TODO: implement private memory on earlier gen's */ compiler->has_pvtmem = true; - if (compiler->gpu_id == 650) - compiler->tess_use_shared = true; + compiler->tess_use_shared = + fd_dev_info(compiler->gpu_id)->a6xx.tess_use_shared; } else { compiler->max_const_pipeline = 512; compiler->max_const_geom = 512; diff --git a/src/freedreno/ir3/meson.build b/src/freedreno/ir3/meson.build index 312cdbf..7bff85f 100644 --- a/src/freedreno/ir3/meson.build +++ b/src/freedreno/ir3/meson.build @@ -119,7 +119,7 @@ libfreedreno_ir3 = static_library( include_directories : [inc_freedreno, inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], c_args : [no_override_init_args], gnu_symbol_visibility : 'hidden', - link_with: [libir3decode, libir3encode], + link_with: [libir3decode, libir3encode, libfreedreno_common], dependencies : [idep_nir_headers, dep_dl, idep_mesautil], build_by_default : false, ) -- 2.7.4