victory-gta6: this fork's changes on top of VIctory main (ffe310e)
World rendering, lighting, frame-rate and memory work for Grand Theft Auto VI (Xbox Series X profile) on one Windows PC with an NVIDIA RTX 4070. The README describes the state, the changes and the credits. Based on VIctory by Marvisak and contributors (GPL-3.0-or-later); XCL by ivall and contributors was used as a reference. No game files are included. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
1 parent
45c6e80601
commit
6fa814fba5
61 files changed
+32259
-1274
No files matched your search
@@ -15,6 +15,7 @@ use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
|
||||
|
||||
use victory_pipeline::{Cache, Converter};
|
||||
use victory_shader::emit::{HostShader, StaticSampler, UserData};
|
||||
use victory_shader::resource::RootIndexedView;
|
||||
use victory_shader::{HwStage, RootType};
|
||||
|
||||
static CACHE: OnceLock<Cache> = OnceLock::new();
|
||||
@@ -53,6 +54,8 @@ fn build() -> &'static [u8; 32] {
|
||||
match exe {
|
||||
Ok(mut bytes) => {
|
||||
bytes.extend_from_slice(&limit.to_le_bytes());
|
||||
// Which group barriers wait is part of the translation too.
|
||||
bytes.push(victory_shader::emit::group_sync());
|
||||
*blake3::hash(&bytes).as_bytes()
|
||||
}
|
||||
Err(e) => {
|
||||
@@ -206,10 +209,22 @@ fn encode(s: &HostShader) -> Vec<u8> {
|
||||
word(&mut out, v);
|
||||
}
|
||||
}
|
||||
for slots in [&s.root_cbvs, &s.root_srvs] {
|
||||
for slots in [&s.root_cbvs, &s.root_srvs, &s.root_uavs] {
|
||||
word(&mut out, slots.len() as u32);
|
||||
out.extend(slots);
|
||||
}
|
||||
word(&mut out, s.root_indexed_views.len() as u32);
|
||||
for view in &s.root_indexed_views {
|
||||
for value in [
|
||||
u32::from(view.table_slot),
|
||||
u32::from(view.constant_slot),
|
||||
view.constant_dword,
|
||||
view.byte_offset,
|
||||
u32::from(view.shift),
|
||||
] {
|
||||
word(&mut out, value);
|
||||
}
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
@@ -266,6 +281,18 @@ fn decode(bytes: &[u8]) -> Option<HostShader> {
|
||||
}
|
||||
let root_cbvs = r.list()?;
|
||||
let root_srvs = r.list()?;
|
||||
let root_uavs = r.list()?;
|
||||
let n = r.word()? as usize;
|
||||
let mut root_indexed_views = Vec::with_capacity(n.min(256));
|
||||
for _ in 0..n {
|
||||
root_indexed_views.push(RootIndexedView {
|
||||
table_slot: u8::try_from(r.word()?).ok()?,
|
||||
constant_slot: u8::try_from(r.word()?).ok()?,
|
||||
constant_dword: r.word()?,
|
||||
byte_offset: r.word()?,
|
||||
shift: u8::try_from(r.word()?).ok().filter(|&s| s < 32)?,
|
||||
});
|
||||
}
|
||||
r.0.is_empty().then_some(HostShader {
|
||||
stage,
|
||||
dxil,
|
||||
@@ -274,6 +301,8 @@ fn decode(bytes: &[u8]) -> Option<HostShader> {
|
||||
static_samplers,
|
||||
root_cbvs,
|
||||
root_srvs,
|
||||
root_uavs,
|
||||
root_indexed_views,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -300,6 +329,14 @@ mod tests {
|
||||
])],
|
||||
root_cbvs: vec![2],
|
||||
root_srvs: vec![0, 3],
|
||||
root_uavs: vec![1],
|
||||
root_indexed_views: vec![RootIndexedView {
|
||||
table_slot: 1,
|
||||
constant_slot: 2,
|
||||
constant_dword: 3,
|
||||
byte_offset: 32,
|
||||
shift: 5,
|
||||
}],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user