aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache/texture_cache.h
diff options
context:
space:
mode:
authorDuck <350528965+Duck912@users.noreply.github.com>2026-11-03 02:47:54 -0500
committerGitHub <noreply@github.com>2026-11-03 08:47:54 +0100
commita667551cdf6e9044e43e1d0c37320c3ec82a1213 (patch)
treee9575ab1653eed1d046f2868a5509b5f4178fb10 /src/video_core/texture_cache/texture_cache.h
parent881a47751455debec3b9ea7596aa0a1b207f0571 (diff)
video_core: cut per-draw work on the GPU back thread in crowded scenes (#374)
* video_core: demote the texture cache's per-draw debug logs to trace The invalid sampler and image view index messages fire for unused binding slots on every draw. Filtered LOG_DEBUG messages still cost a call and argument packing: in a Fire Emblem: Fortune's Weave city scene (about 2,100 draws per frame) they were 3.1% of the GPUBack thread's samples. LOG_TRACE compiles them out of release builds. Assisted-by: Claude Opus 5.5 (profiling, porting and drafting) Signed-off-by: Duck912 <350528965+Duck912@users.noreply.github.com> * texture_cache: read a descriptor with one page lookup DescriptorTable::Read runs for every texture and sampler of every draw, and it read each 32-byte TIC/TSC entry through the generic ReadBlockUnsafe page walk. In a Fire Emblem: Fortune's Weave city scene (about 2,100 draws per frame) that was 5.0% of the GPUBack thread's samples. An entry within one page is contiguous in host memory, so it is now a single page lookup and memcpy. Entries that cross a page and pages without host memory still take the block read, so unmapped and unbacked entries still read as zero. The same change in another Eden-based build cut these reads from 6.4% to 0.4% of its GPU thread. Assisted-by: Claude Opus 5.5 (profiling, porting and drafting) Signed-off-by: Duck912 <350528965+Duck912@users.noreply.github.com> --------- Signed-off-by: Duck912 <350528965+Duck912@users.noreply.github.com>
Diffstat (limited to 'src/video_core/texture_cache/texture_cache.h')
-rw-r--r--src/video_core/texture_cache/texture_cache.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index abb22b9bfb..ea82ab02e7 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -580,7 +580,7 @@ template <class P>
SamplerId TextureCache<P>::GetSamplerId(u32 index, bool compute) {
auto& table = compute ? channel_state->compute_sampler_table : channel_state->graphics_sampler_table;
if (index > table.current_limit) {
- LOG_DEBUG(HW_GPU, "Invalid sampler index={}", index);
+ LOG_TRACE(HW_GPU, "Invalid sampler index={}", index);
return NULL_SAMPLER_ID;
}
auto const map_index = index | (compute ? Common::SlotId::TAGGED_VALUE : 0);
@@ -812,7 +812,7 @@ ImageViewId TextureCache<P>::VisitImageView(u32 index, bool compute) {
index = Tegra::Texture::TextureHeaderIndex(index, table.current_limit,
gpu_memory->UsesNativeTiling());
if (index > table.current_limit) {
- LOG_DEBUG(HW_GPU, "Invalid image view index={}", index);
+ LOG_TRACE(HW_GPU, "Invalid image view index={}", index);
return NULL_IMAGE_VIEW_ID;
}
auto const map_index = index | (compute ? Common::SlotId::TAGGED_VALUE : 0);