Structure builder and rays: dispatches counted in threads, empty slots never entered, pages that are not there never hit; vertex signatures as DXC orders them
From DexNom/VIctory (GPL-3.0-or-later) bc3cd4b0 and 5f4c3df4: - DispatchX's flag 0x20 says the counts are threads (bc3cd4b0). Taken for groups, a rehydration stage ran up to 64 times its threads and stored over the structures after its own. The lanes past the count leave at once, in every builder program of one dimension without a group barrier (there: in two, by digest). VICTORY_THREAD_DIMENSIONS=0: as before. - A child that is not there may have inverted infinite bounds: it was entered at minus infinity, came first and ended the walk (bc3cd4b0). - A node in a page without a copy reads zeros, a child and a box: no hit (bc3cd4b0). - Signature rows in the order of their names; vertex outputs interpolated as the title's PSV0 says; an unread input packed beside a per-vertex one is constant too (5f4c3df4), with their tests. Every shader is translated again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
972bb4b0f8
commit
810efe5829
11 files changed
+443
-44
No files matched your search
@@ -80,6 +80,12 @@ pub const USER_VIEW_BIAS: u32 = 0x103;
|
||||
/// has no size, and the host's copy of what it names may end in the middle of
|
||||
/// it (a structure of megabytes crosses the 4 MiB windows).
|
||||
pub const USER_ROOT_ADDRESS: u32 = 0x104;
|
||||
/// `RootType::Other` code of a user-data dword the host sets at a dispatch
|
||||
/// counted in threads (the console's `DispatchX`): how many of the threads
|
||||
/// numbered along X run (0: all of every group). The metadata's `dword` is
|
||||
/// the group's width. Asked for by the structure builder's programs
|
||||
/// ([`crate::spill::is_spilled`]).
|
||||
pub const USER_DISPATCH_THREADS_X: u32 = 0x106;
|
||||
|
||||
/// `ShaderFlags` bits (metadata) and their `SFI0` feature bits.
|
||||
pub(crate) mod flags {
|
||||
@@ -507,6 +513,27 @@ impl Shader {
|
||||
|
||||
/// The finished container.
|
||||
pub fn finish(mut self) -> Vec<u8> {
|
||||
if self.pixel {
|
||||
// Reading a per-vertex value with attributeAtVertex needs a
|
||||
// constant input, even when the source declaration was smooth.
|
||||
// D3D requires all components packed into the same register to
|
||||
// share a mode, including the ones the shader never reads.
|
||||
for index in 0..self.inputs.len() {
|
||||
let unused = &self.inputs[index];
|
||||
if unused.kind != 0 || unused.usage != 0 || unused.row.is_none() {
|
||||
continue;
|
||||
}
|
||||
let mut modes = self.inputs.iter()
|
||||
.filter(|e| e.row == unused.row && e.usage != 0)
|
||||
.map(|e| e.interp);
|
||||
if let Some(mode) = modes.next()
|
||||
&& (mode == 1 || unused.comp == 9)
|
||||
&& modes.all(|other| other == mode)
|
||||
{
|
||||
self.inputs[index].interp = mode;
|
||||
}
|
||||
}
|
||||
}
|
||||
let ud_size = (self.user_data * 4).next_multiple_of(16);
|
||||
self.fix_user_data_size(ud_size);
|
||||
// The clean-up, before anything is declared about the code: a
|
||||
|
||||
Reference in new issue
Block a user