fix(agc): keep FaultBuffer-only shaders bounded in DispatchWriteRanges

Symptom / Log:
- agc_driver_write_data_written_ahead: specialized atomic compute shaders with FaultBuffer but no BdaPagetable were classified as unbounded in DispatchWriteRanges, stopping ahead group resolution.

Root Cause:
- core/libs/prx/libSceAgcDriver/Execution/src/Driver/Memory/WrittenBuffers.cpp:DispatchWriteRanges:L56-L61 — FaultBuffer bindings were treated as unbounded pointer writes even when no BdaPagetable binding was present.

Change:
- Allow FaultBuffer bindings in DispatchWriteRanges without clearing bounded unless Gds or BdaPagetable is present.

Metric / Verification:
- DispatchWriteRanges returns bounded == true for descriptor-indexed atomic shaders with FaultBuffer and no BdaPagetable.
This commit is contained in:
hamb3r committed 2026-10-29 13:14:37 +03:00
1 parent 1b580f13cf
commit e2338d5bd1
1 file changed
+2 -2
@@ -54,11 +54,11 @@ void Driver::noteWrittenBuffers(std::uint64_t program, std::uint32_t queue, cons
}
std::vector<std::pair<std::uint64_t, std::uint64_t>> DispatchWriteRanges(const ShaderRecompiler::RecompileResult& compiled, bool& bounded) {
bounded = compiled.bdaAbiVersion == 0;
bounded = compiled.bdaAbiVersion == 0 || std::any_of(compiled.bindings.begin(), compiled.bindings.end(), [](const ShaderRecompiler::DescriptorBinding& binding) { return binding.role == ShaderRecompiler::DescriptorRole::FaultBuffer; });
std::vector<std::pair<std::uint64_t, std::uint64_t>> ranges;
constexpr std::uint64_t UnknownImageBytes = 64ull * 1024 * 1024;
for (const auto& binding : compiled.bindings) {
if (binding.role == ShaderRecompiler::DescriptorRole::Gds || binding.role == ShaderRecompiler::DescriptorRole::BdaPagetable || binding.role == ShaderRecompiler::DescriptorRole::FaultBuffer) bounded = false;
if (binding.role == ShaderRecompiler::DescriptorRole::Gds || binding.role == ShaderRecompiler::DescriptorRole::BdaPagetable) bounded = false;
if (binding.role != ShaderRecompiler::DescriptorRole::GuestImages || binding.kind != ShaderRecompiler::DescriptorKind::StorageImage) continue;
for (std::uint32_t element = 0; element < binding.count; ++element) {
const bool written = element >= binding.imageWritten.size() || binding.imageWritten[element];