diff options
| author | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-28 14:44:18 -0400 |
|---|---|---|
| committer | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-28 14:44:18 -0400 |
| commit | 8f59920970674c47dcce8866d3e0659ef91a81b4 (patch) | |
| tree | 130acd77734bd03e4fcb633efc642407fd8d2598 /src/video_core/shader_cache.cpp | |
| parent | 3eec39d0cae60455fe5589b313f21342bafbad86 (diff) | |
IMAD.SHL as a shift; EDEN_NX2_REJECT; log where rejected programs are bound
- IMAD by a power of two lowers to SHL imm, the form Eden's jump-table
tracking expects (a title 1 compute program failed "track indirect branch").
- EDEN_NX2_REJECT=<hex addresses>: treat those native programs as rejected,
to bisect a behaviour change without rebuilding.
- A rejected graphics program logs its stage slot, header and slot registers
once (for the task/mesh pipeline setup).
- Notes: rows 87-92, title 1 status.
Diffstat (limited to 'src/video_core/shader_cache.cpp')
| -rw-r--r-- | src/video_core/shader_cache.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/video_core/shader_cache.cpp b/src/video_core/shader_cache.cpp index f92fe02068..15c1adb7c9 100644 --- a/src/video_core/shader_cache.cpp +++ b/src/video_core/shader_cache.cpp @@ -5,6 +5,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include <algorithm> +#include <cstring> #include <string> #include <unordered_set> #include <fmt/ranges.h> @@ -81,7 +82,22 @@ bool ShaderCache::RefreshStages(std::array<u64, 6>& unique_hashes) try { if (!shader_info) { const u32 start_address{native ? 0 : shader_config.offset}; GraphicsEnvironment env{*maxwell3d, *gpu_memory, program, native ? shader_addr : base_addr, start_address}; - shader_info = MakeShaderInfo(env, *cpu_shader_addr); + try { + shader_info = MakeShaderInfo(env, *cpu_shader_addr); + } catch (const Shader::Exception&) { + // Once per program: which stage slot it is bound to, its header and the slot's + // registers (to tell how a pipeline with task/mesh programs is set up). + static std::unordered_set<GPUVAddr> described; + if (native && described.insert(shader_addr).second) { + std::array<u32, 5> header{}; + gpu_memory->ReadBlockUnsafe(shader_addr, header.data(), sizeof(header)); + std::array<u32, sizeof(shader_config) / sizeof(u32)> config{}; + std::memcpy(config.data(), &shader_config, sizeof(config)); + LOG_ERROR(HW_GPU, "Rejected program {:#x} is bound to stage {}: header {:08x}, slot {:08x}", + shader_addr, index, fmt::join(header, " "), fmt::join(config, " ")); + } + throw; + } } shader_infos[index] = shader_info; unique_hashes[index] = shader_info->unique_hash; |
