Read image descriptors in one bounded span

This commit is contained in:
nmzik committed 2026-09-23 15:41:02 +04:00
1 parent 66f1a82365
commit d30dca78be
9 files changed
+112 -78

No files matched your search

@@ -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 {