Skip to content

Use the proper HLSL quad wave intrinsics in the SPD's quad reduction.… #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions sdk/include/FidelityFX/gpu/spd/ffx_spd.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,10 @@ FfxFloat32x4 SpdReduceQuad(FfxFloat32x4 v)
#elif defined(FFX_HLSL) && !defined(FFX_SPD_NO_WAVE_OPERATIONS)

// requires SM6.0
FfxUInt32 quad = WaveGetLaneIndex() & (~0x3);
FfxFloat32x4 v0 = v;
FfxFloat32x4 v1 = WaveReadLaneAt(v, quad | 1);
FfxFloat32x4 v2 = WaveReadLaneAt(v, quad | 2);
FfxFloat32x4 v3 = WaveReadLaneAt(v, quad | 3);
FfxFloat32x4 v0 = v;
FfxFloat32x4 v1 = QuadReadAcrossX(v);
FfxFloat32x4 v2 = QuadReadAcrossY(v);
FfxFloat32x4 v3 = QuadReadAcrossDiagonal(v);
return SpdReduce4(v0, v1, v2, v3);
/*
// if SM6.0 is not available, you can use the AMD shader intrinsics
Expand Down