graphics: support dynamic indirect image tables

This commit is contained in:
nmzik committed 2026-08-18 03:53:43 +02:00
1 parent 1c4171c9eb
commit 430de9bd15
13 files changed
+710 -89

No files matched your search

@@ -113,7 +113,13 @@ bool ValidateNativeProgram(const IR::Program& program, std::string* error) {
if (!program.info.addresses.empty()) {
Expect(Kind::AddressMemory, Dense(program.info.addresses.size()));
}
if (program.values != nullptr && !program.values->srt_reads.empty()) {
const bool uses_flattened_runtime =
program.values != nullptr &&
(!program.values->srt_reads.empty() ||
std::ranges::any_of(program.info.images, [](const IR::ImageResource& image) {
return image.indirect_mapping_capacity != 0u;
}));
if (uses_flattened_runtime) {
Expect(Kind::FlattenedSrt);
}
if (program.bindings.ShaderDataDwords() != 0 && program.bindings.push_constant_size == 0) {