mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-05 12:35:42 +00:00
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.
15 lines
663 B
Plaintext
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);
|
|
}
|