upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/root_signature.cpp
diff options
context:
space:
mode:
authorCodex <codex@localhost>2026-11-22 17:56:52 +0100
committerCodex <codex@localhost>2026-11-22 18:04:34 +0100
commit45a987d70b571f13d04c633d410b7f8f645e7d18 (patch)
tree357e22a83bdb2db46c780749b73a8f51e4e9a090 /runtime/src/root_signature.cpp
parent49475796c226c8511b9470bf97a4daf57b8af323 (diff)
Refuse unknown root parameter types in the SGPR packer
Diffstat (limited to 'runtime/src/root_signature.cpp')
-rw-r--r--runtime/src/root_signature.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/src/root_signature.cpp b/runtime/src/root_signature.cpp
index 762dd704e..844f1b580 100644
--- a/runtime/src/root_signature.cpp
+++ b/runtime/src/root_signature.cpp
@@ -13,6 +13,10 @@ PackResult pack(const RootSignature& sig) {
13 } 13 }
14 uint64_t cost = 0; // 64-bit: a parameter of 0xFFFFFFFF constants must not wrap past the limits 14 uint64_t cost = 0; // 64-bit: a parameter of 0xFFFFFFFF constants must not wrap past the limits
15 for (const RootParameter& p : sig.params) { 15 for (const RootParameter& p : sig.params) {
16 if (p.type != ParamType::Constants && p.type != ParamType::Descriptor && p.type != ParamType::Table) {
17 out.error = "unknown root parameter type";
18 return out;
19 }
16 if (p.type == ParamType::Constants && p.num_values == 0) { 20 if (p.type == ParamType::Constants && p.num_values == 0) {
17 out.error = "root constant parameter needs at least 1 dword"; 21 out.error = "root constant parameter needs at least 1 dword";
18 return out; 22 return out;