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:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-25 19:04:24 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-25 19:04:24 -0500
commit8d832fd10913064e1c8aec74191e3ba8f70211c8 (patch)
treee365199d7d86ebf592a5a0dc2f07cda4b74b58a7 /runtime/src/root_signature.cpp
parent5da3b6be3cefc1499452ba8c8370a50092674d61 (diff)
parentc50ed94b35b37b697ab9c5fd176f3738480b4db5 (diff)
Merge main into rt-title-every-budget (#2122)
#2098 split the every-pass loop of refresh_title_textures by mode: with LEONIDA_TEXTURE_REFRESH_ASYNC every persistent mapping is polled each pass and only stale unmapped textures are visited, without it all mapped or stale ones are. The async branch is kept as main has it. LEONIDA_TITLE_EVERY_BUDGET_US applies to the synchronous pass, the one before a submission on the submitting thread; under async the pass runs on the refresh worker and the limit does not apply (README says so). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/root_signature.cpp')
-rw-r--r--runtime/src/root_signature.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/runtime/src/root_signature.cpp b/runtime/src/root_signature.cpp
index 10dd1e02c..41d3f6c5a 100644
--- a/runtime/src/root_signature.cpp
+++ b/runtime/src/root_signature.cpp
@@ -17,10 +17,8 @@ PackResult pack(const RootSignature& sig) {
17 out.error = "unknown root parameter type"; 17 out.error = "unknown root parameter type";
18 return out; 18 return out;
19 } 19 }
20 if (p.type == ParamType::Constants && p.num_values == 0) { 20 // A constant parameter of 0 values is valid (the host serializer warns, CreateRootSignature answers S_OK):
21 out.error = "root constant parameter needs at least 1 dword"; 21 // it takes no dwords, so it gets no provenance entry and the parameters after it pack as if it were absent.
22 return out;
23 }
24 const uint32_t dwords = p.type == ParamType::Table ? 2 22 const uint32_t dwords = p.type == ParamType::Table ? 2
25 : p.type == ParamType::Descriptor ? 2 23 : p.type == ParamType::Descriptor ? 2
26 : p.num_values; 24 : p.num_values;
@@ -71,15 +69,12 @@ StagePackResult pack_stage(const RootSignature& sig, Stage stage) {
71 out.error = "unknown root parameter type"; 69 out.error = "unknown root parameter type";
72 return out; 70 return out;
73 } 71 }
74 if (p.type == ParamType::Constants && p.num_values == 0) {
75 out.error = "root constant parameter needs at least 1 dword";
76 return out;
77 }
78 cost += param_cost(p.type, p.num_values); 72 cost += param_cost(p.type, p.num_values);
79 if (cost > kMaxD3d12Cost) { 73 if (cost > kMaxD3d12Cost) {
80 out.error = "root signature exceeds the 64-dword D3D12 cost limit"; 74 out.error = "root signature exceeds the 64-dword D3D12 cost limit";
81 return out; 75 return out;
82 } 76 }
77 // 0 for a constant parameter of 0 values, which then shares its first SGPR with the next parameter.
83 const uint64_t dwords = stage_dwords(p.type, p.num_values); 78 const uint64_t dwords = stage_dwords(p.type, p.num_values);
84 if (!spilling && next + dwords <= kMaxUserSgprs) { 79 if (!spilling && next + dwords <= kMaxUserSgprs) {
85 first.push_back(static_cast<uint32_t>(next)); 80 first.push_back(static_cast<uint32_t>(next));