Skip to content
Merged
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
6 changes: 6 additions & 0 deletions com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@
#define WaveGetLaneCount ERROR_ON_UNSUPPORTED_FUNCTION(WaveGetLaneCount)
#endif

#if defined(PLATFORM_SUPPORTS_WAVE_INTRINSICS)
// Helper macro to compute lane swizzle offset starting from andMask, orMask and xorMask.
// IMPORTANT, to guarantee compatibility with all platforms, the masks need to be constant literals (constants at compile time)
#define LANE_SWIZZLE_OFFSET(andMask, orMask, xorMask) (andMask | (orMask << 5) | (xorMask << 10))
#endif

#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonDeprecated.hlsl"

#if !defined(SHADER_API_GLES)
Expand Down