Files
DroidDeck/tools/upscale/layer/shaders/lite_npu_pack.comp
T
The412Banner 7972c18e50 upscale: import the NeuralScale Vulkan upscaler layer sources unchanged
Verbatim copy of app/src/main/cpp/fsr4npu/ (C sources, headers, shaders,
weight pack scripts) from michaelisomer-cyber/Winlator-NeuralScale at
a0ab6b0f770e1a6786b4e68def46b4edb8baafd0 (GPL-3.0, fork of
StevenMXZ/Winlator-Ludashi). Not built yet; the DroidDeck port follows.
2026-11-29 22:18:41 -05:00

15 lines
663 B
Plaintext

#version 450
// Pack AMD FSR 4.1.2 Lite scratch (+0, 962x542x16 int8 with 1-px halo) ->
// dense 960x540x16 uint8 (int8 ^ 0x80) in zero-copy AHB slot for Hexagon HTP v81.
layout(local_size_x = 64) in;
layout(set = 0, binding = 0, std430) readonly buffer ScratchBuf { uvec4 q[]; } scr;
layout(set = 0, binding = 1, std430) writeonly buffer AhbBuf { uvec4 q[]; } ahb;
layout(push_constant) uniform PC { uint base_q; uint p1; uint p2; uint p3; } pc;
void main() {
uint p = gl_GlobalInvocationID.x;
if (p >= 518400u) return;
uint x = p % 960u;
uint y = p / 960u;
ahb.q[pc.base_q + p] = scr.q[(x + 1u) + 962u * (y + 1u)] ^ uvec4(0x80808080u);
}