Files
d4r/engine/output_store.glsl
T
ayo 7c5d3c9157 feat: add d4r inference engines and Windows parity tooling
Add native K/M/RR inference engines, HIP kernels, replay and validation
harnesses, and Windows DLSS setup and runtime support. Include GPU
profiling tools, build and packaging scripts, platform integration
patches, and implementation documentation.
2026-10-16 08:54:47 -04:00

18 lines
674 B
GLSL

// RADV's rgba16f image stores truncate before the copy path's UNORM conversion.
// Preserve that half-store + blit result when writing RGB10A2 directly. Below
// binary16's normal range both 10-bit RGB and 2-bit alpha quantize to zero, and
// overflow saturates, so a normal-range mantissa mask suffices for this format.
#ifndef OUTPUT_RGB10
#define OUTPUT_RGB10 0
#endif
#if OUTPUT_RGB10
#define FINAL_OUTPUT_FORMAT rgb10_a2
vec4 finalOutputValue(vec4 value) {
vec4 rounded = uintBitsToFloat(floatBitsToUint(value) & 0xffffe000u);
return mix(rounded, value, isnan(value));
}
#else
#define FINAL_OUTPUT_FORMAT rgba16f
#define finalOutputValue(value) (value)
#endif