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@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11790>
This commit is contained in:
Rob Clark 2021-07-08 08:37:55 -07:00 committed by Marge Bot
parent c9bcd835fa
commit 4335f47f41
4 changed files with 8 additions and 3 deletions

View File

@ -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;

View File

@ -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([

View File

@ -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;

View File

@ -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,
)