mirror of
https://github.com/libretro/RetroArch
synced 2025-02-09 00:40:09 +00:00
420b7913d4
2820ab0b51 Merge pull request #1076 from KhronosGroup/bitcast-pre-330-glsl 63bcbd511e GLSL: Need extension to use bitcast on GLSL < 330. 9f3bebe3d0 Merge pull request #1075 from lifpan/master b11c20fc1d Remove unreasonable assertion for OpTypeImage Sampled parameter. 1a592b7c0f Merge pull request #1067 from cdavis5e/msl-scalar-block-layout 28454facbb MSL: Handle packed matrices. ea5c0ed82f MSL: Fix alignment of packed types. 44f688bf0b Merge pull request #1070 from KhronosGroup/fix-1066 25c74b324e Forget loop variable enables after emitting block chain. 6b010e0cbc Merge pull request #1069 from KhronosGroup/fix-1053 f6f849397e MSL: Re-roll array expressions in initializers. e5fa7edfd6 MSL: Support scalar block layout. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: 2820ab0b51bf5e4187435d904b34e762b988f48b
68 lines
3.2 KiB
Plaintext
68 lines
3.2 KiB
Plaintext
RWByteAddressBuffer _9 : register(u0, space0);
|
|
|
|
static uint4 gl_SubgroupEqMask;
|
|
static uint4 gl_SubgroupGeMask;
|
|
static uint4 gl_SubgroupGtMask;
|
|
static uint4 gl_SubgroupLeMask;
|
|
static uint4 gl_SubgroupLtMask;
|
|
void comp_main()
|
|
{
|
|
_9.Store(0, asuint(float(WaveGetLaneCount())));
|
|
_9.Store(0, asuint(float(WaveGetLaneIndex())));
|
|
_9.Store(0, asuint(float4(gl_SubgroupEqMask).x));
|
|
_9.Store(0, asuint(float4(gl_SubgroupGeMask).x));
|
|
_9.Store(0, asuint(float4(gl_SubgroupGtMask).x));
|
|
_9.Store(0, asuint(float4(gl_SubgroupLeMask).x));
|
|
_9.Store(0, asuint(float4(gl_SubgroupLtMask).x));
|
|
uint4 _75 = WaveActiveBallot(true);
|
|
float4 _88 = WaveActiveSum(20.0f.xxxx);
|
|
int4 _94 = WaveActiveSum(int4(20, 20, 20, 20));
|
|
float4 _96 = WaveActiveProduct(20.0f.xxxx);
|
|
int4 _98 = WaveActiveProduct(int4(20, 20, 20, 20));
|
|
float4 _127 = WavePrefixProduct(_96) * _96;
|
|
int4 _129 = WavePrefixProduct(_98) * _98;
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void main()
|
|
{
|
|
gl_SubgroupEqMask = 1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96));
|
|
if (WaveGetLaneIndex() >= 32) gl_SubgroupEqMask.x = 0;
|
|
if (WaveGetLaneIndex() >= 64 || WaveGetLaneIndex() < 32) gl_SubgroupEqMask.y = 0;
|
|
if (WaveGetLaneIndex() >= 96 || WaveGetLaneIndex() < 64) gl_SubgroupEqMask.z = 0;
|
|
if (WaveGetLaneIndex() < 96) gl_SubgroupEqMask.w = 0;
|
|
gl_SubgroupGeMask = ~((1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96))) - 1u);
|
|
if (WaveGetLaneIndex() >= 32) gl_SubgroupGeMask.x = 0u;
|
|
if (WaveGetLaneIndex() >= 64) gl_SubgroupGeMask.y = 0u;
|
|
if (WaveGetLaneIndex() >= 96) gl_SubgroupGeMask.z = 0u;
|
|
if (WaveGetLaneIndex() < 32) gl_SubgroupGeMask.y = ~0u;
|
|
if (WaveGetLaneIndex() < 64) gl_SubgroupGeMask.z = ~0u;
|
|
if (WaveGetLaneIndex() < 96) gl_SubgroupGeMask.w = ~0u;
|
|
uint gt_lane_index = WaveGetLaneIndex() + 1;
|
|
gl_SubgroupGtMask = ~((1u << (gt_lane_index - uint4(0, 32, 64, 96))) - 1u);
|
|
if (gt_lane_index >= 32) gl_SubgroupGtMask.x = 0u;
|
|
if (gt_lane_index >= 64) gl_SubgroupGtMask.y = 0u;
|
|
if (gt_lane_index >= 96) gl_SubgroupGtMask.z = 0u;
|
|
if (gt_lane_index >= 128) gl_SubgroupGtMask.w = 0u;
|
|
if (gt_lane_index < 32) gl_SubgroupGtMask.y = ~0u;
|
|
if (gt_lane_index < 64) gl_SubgroupGtMask.z = ~0u;
|
|
if (gt_lane_index < 96) gl_SubgroupGtMask.w = ~0u;
|
|
uint le_lane_index = WaveGetLaneIndex() + 1;
|
|
gl_SubgroupLeMask = (1u << (le_lane_index - uint4(0, 32, 64, 96))) - 1u;
|
|
if (le_lane_index >= 32) gl_SubgroupLeMask.x = ~0u;
|
|
if (le_lane_index >= 64) gl_SubgroupLeMask.y = ~0u;
|
|
if (le_lane_index >= 96) gl_SubgroupLeMask.z = ~0u;
|
|
if (le_lane_index >= 128) gl_SubgroupLeMask.w = ~0u;
|
|
if (le_lane_index < 32) gl_SubgroupLeMask.y = 0u;
|
|
if (le_lane_index < 64) gl_SubgroupLeMask.z = 0u;
|
|
if (le_lane_index < 96) gl_SubgroupLeMask.w = 0u;
|
|
gl_SubgroupLtMask = (1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96))) - 1u;
|
|
if (WaveGetLaneIndex() >= 32) gl_SubgroupLtMask.x = ~0u;
|
|
if (WaveGetLaneIndex() >= 64) gl_SubgroupLtMask.y = ~0u;
|
|
if (WaveGetLaneIndex() >= 96) gl_SubgroupLtMask.z = ~0u;
|
|
if (WaveGetLaneIndex() < 32) gl_SubgroupLtMask.y = 0u;
|
|
if (WaveGetLaneIndex() < 64) gl_SubgroupLtMask.z = 0u;
|
|
if (WaveGetLaneIndex() < 96) gl_SubgroupLtMask.w = 0u;
|
|
comp_main();
|
|
}
|