asahi: Set GPR count accurately for background/EOT
Better occupancy, which is especially important when the background shader does memory access (for reloads). On my 4K monitor, glmark2 -bdesktop fullscreen from 95fps to 133fps. At default settings, glmark2 -bterrain from 63fps to 71fps. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19997>
This commit is contained in:
committed by
Marge Bot
parent
bcba473eac
commit
b102f045ab
@@ -14,7 +14,6 @@ agx_compile_meta_shader(struct agx_meta_cache *cache, nir_shader *shader,
|
||||
struct agx_shader_key *key,
|
||||
struct agx_tilebuffer_layout *tib)
|
||||
{
|
||||
struct agx_shader_info info = { 0 };
|
||||
struct util_dynarray binary;
|
||||
util_dynarray_init(&binary, NULL);
|
||||
|
||||
@@ -22,9 +21,9 @@ agx_compile_meta_shader(struct agx_meta_cache *cache, nir_shader *shader,
|
||||
if (tib)
|
||||
agx_nir_lower_tilebuffer(shader, tib);
|
||||
|
||||
agx_compile_shader_nir(shader, key, NULL, &binary, &info);
|
||||
|
||||
struct agx_meta_shader *res = rzalloc(cache->ht, struct agx_meta_shader);
|
||||
agx_compile_shader_nir(shader, key, NULL, &binary, &res->info);
|
||||
|
||||
res->ptr = agx_pool_upload_aligned_with_bo(&cache->pool, binary.data,
|
||||
binary.size, 128,
|
||||
&res->bo);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#ifndef __AGX_META_H
|
||||
#define __AGX_META_H
|
||||
|
||||
#include "asahi/compiler/agx_compile.h"
|
||||
#include "agx_tilebuffer.h"
|
||||
#include "pool.h"
|
||||
|
||||
@@ -29,6 +30,7 @@ struct agx_meta_key {
|
||||
};
|
||||
|
||||
struct agx_meta_shader {
|
||||
struct agx_shader_info info;
|
||||
struct agx_bo *bo;
|
||||
uint32_t ptr;
|
||||
};
|
||||
|
||||
@@ -1532,7 +1532,7 @@ agx_build_meta(struct agx_batch *batch, bool store, bool partial_render)
|
||||
cfg.unk_2 = 0;
|
||||
}
|
||||
|
||||
agx_usc_pack(&b, REGISTERS, cfg) cfg.register_count = 256;
|
||||
agx_usc_pack(&b, REGISTERS, cfg) cfg.register_count = shader->info.nr_gprs;
|
||||
agx_usc_pack(&b, NO_PRESHADER, cfg);
|
||||
|
||||
return agx_usc_fini(&b);
|
||||
|
||||
Reference in New Issue
Block a user