Max, min, legacy products, medians and fractions as the RDNA card's own (VICTORY_RDNA_FLOAT, on; 0: spelled out as before)
The console's v_max/v_min (seven host operations each, for the order of the two zeros), v_mul_legacy (a product, two comparisons, an or and a select; two thirds of all products of the lighting program), v_med3 and v_fract are written as the one operation the driver makes the same instruction of, where the host is an AMD card with waves of 32 and 64. Checked on the RX 7900 XTX against the spelled-out forms with zeros, infinities and NaN (a legacy product's zero may have the other sign). RX 7900 XTX, yard capture replayed turn by turn with and without (12 loops each): dispatches and draws 18.41 -> 17.58 ms, the lists' 29.2 -> 28.4 of a 36.6 ms frame; 0.4 of it without the legacy products. The picture is the same (79 dB; two replays of one set differ by 68). A product that is only a product would give 0.65 ms more and NaN where the console has 0. Measured and left out (nothing): v_mad as one multiply-add, fast reciprocals, scalar loads of four dwords at once, buffers picked from the heap read without asking for their kind (0.12 ms), a wave size for every compute program (32: +0.26 ms, 64: +0.1, the console's: +0.1), no barriers at all (0). Changes the translator: every shader is translated again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
4fa965582f
commit
565ab8517e
7 files changed
+377
-5
No files matched your search
@@ -921,6 +921,9 @@ fn create() -> windows::core::Result<Host> {
|
||||
{
|
||||
tracing::info!(min = o1.WaveLaneCountMin, max = o1.WaveLaneCountMax, "host wave lanes");
|
||||
victory_shader::emit::set_host_max_wave(o1.WaveLaneCountMax);
|
||||
// (RDNA has waves of 32 and 64, the vendor's older cards of 64 alone.)
|
||||
let amd = crate::indirect::amd(&device);
|
||||
victory_shader::emit::set_host_rdna(amd && o1.WaveLaneCountMin == 32 && o1.WaveLaneCountMax == 64);
|
||||
}
|
||||
let messages = debug
|
||||
.then(|| device.cast::<ID3D12InfoQueue>().ok())
|
||||
@@ -968,6 +971,15 @@ fn create() -> windows::core::Result<Host> {
|
||||
}
|
||||
}
|
||||
|
||||
impl Host {
|
||||
/// The driver's version, as the system counts it (0: not known).
|
||||
pub(crate) fn driver(&self) -> i64 {
|
||||
let adapter = self.adapter.as_ref();
|
||||
// SAFETY: a plain query.
|
||||
adapter.map_or(0, |a| unsafe { a.CheckInterfaceSupport(&IDXGIDevice::IID) }.unwrap_or(0))
|
||||
}
|
||||
}
|
||||
|
||||
/// DXGI may return hardware for `EnumWarpAdapter` (notably under Proton).
|
||||
/// Reject it before creating a device in diagnostics' software-only mode.
|
||||
pub(crate) fn warp_adapter() -> windows::core::Result<IDXGIAdapter> {
|
||||
|
||||
Reference in new issue
Block a user