shader: detect and loudly skip unsupported GPU-buffer callables

This commit is contained in:
Pixeluted
2026-10-19 03:09:45 +02:00
committed by nmzik
parent defb2f11d3
commit cad6aafdc5
5 changed files with 25 additions and 1 deletions
+5
View File
@@ -10805,6 +10805,11 @@ void TestMemoryFedScalarLeafCall() {
};
IR::SrtRuntime runtime{.read_memory = read, .userdata = &memory, .read_specialization_memory = read};
const auto options = MakeCompileOptions(ShaderType::Compute);
const uint32_t gpu_callable[] = {EncodeVop1(0x02, 4, 256),
EncodeSmem0(0x09, 14, 0), 4u << 25u, EncodeSop1(0x21, 14, 14), EncodeSopp(0x01)};
const auto skipped = PrepareShaderSource(gpu_callable, options);
Check(skipped.unsupported_call_pc == 12u && skipped.calls.empty(),
"GPU-buffer callable did not report its unsupported call site");
auto source = PrepareShaderSource(shader, options);
Check(source.calls.size() == 1 && source.decoded.has_swap_pc &&
source.decoded.instructions[source.calls.front().instruction].branch_target == UINT32_MAX,