Read image descriptors in one bounded span

This commit is contained in:
nmzik
2026-09-23 11:42:59 +04:00
parent 66f1a82365
commit d30dca78be
9 changed files with 112 additions and 78 deletions
@@ -15,7 +15,7 @@ namespace Libs::Graphics::ShaderRecompiler::IR {
SrtRuntime CleanRuntime(SrtRuntime runtime) {
runtime.read_memory = runtime.read_specialization_memory != nullptr
? runtime.read_specialization_memory
: +[](void*, uint64_t, uint32_t*) { return false; };
: +[](void*, uint64_t, std::span<uint32_t>) { return false; };
return runtime;
}
@@ -635,7 +635,7 @@ bool SrtWalker::EvaluateRawRead(const Inst& inst, uint64_t& result) {
}
uint32_t word = 0;
if (m_runtime.read_memory != nullptr) {
if (!m_runtime.read_memory(m_runtime.userdata, address, &word)) {
if (!m_runtime.read_memory(m_runtime.userdata, address, {&word, 1})) {
return false;
}
} else {