shader: share runtime value checks

This commit is contained in:
nmzik committed 2026-09-05 13:16:54 +04:00
1 parent a379304362
commit ebe0979563
5 files changed
+159 -77

No files matched your search

@@ -19,10 +19,13 @@ struct SrtRuntime {
SrtMemoryReader read_specialization_memory = nullptr;
};
enum class RuntimeValueType { Any, Integer };
// Collects reachable ReadConst values. Immediate offsets receive compact flat-buffer slots;
// dynamic offsets remain explicit and are never assigned a fake slot.
void BuildSrtPlan(Program& program);
bool ValidateRuntimeValue(const ResourcePlan& program, Value value);
bool ValidateRuntimeValue(const ResourcePlan& program, Value value,
RuntimeValueType type = RuntimeValueType::Any);
bool EvaluateUniformValues(const ResourcePlan& program, std::span<const Value> values,
const SrtRuntime& runtime, std::span<uint32_t> results);