Mesa (main): freedreno/ir3: Get tess_use_shared from fd_dev_info
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 14 02:20:02 UTC 2021
Module: Mesa
Branch: main
Commit: 4335f47f411ac2da44a967e7d2c5752d62ff55d8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4335f47f411ac2da44a967e7d2c5752d62ff55d8
Author: Rob Clark <robdclark at chromium.org>
Date: Thu Jul 8 08:37:55 2021 -0700
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 <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11790>
---
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 8d6fbe287ee..77756a290bd 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 248d1d32791..8404d4fc6d6 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 c37eae78083..54fe98bcaa7 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 312cdbf95a4..7bff85fe437 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,
)
More information about the mesa-commit
mailing list