forked from bkaradzic/bgfx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
87 changed files
with
5,658 additions
and
1,205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...rty/spirv-cross/reference/opt/shaders-hlsl/frag/pixel-interlock-ordered.sm51.fxconly.frag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
RWByteAddressBuffer _9 : register(u6, space0); | ||
globallycoherent RasterizerOrderedByteAddressBuffer _42 : register(u3, space0); | ||
RasterizerOrderedByteAddressBuffer _52 : register(u4, space0); | ||
RWTexture2D<unorm float4> img4 : register(u5, space0); | ||
RasterizerOrderedTexture2D<unorm float4> img : register(u0, space0); | ||
RasterizerOrderedTexture2D<unorm float4> img3 : register(u2, space0); | ||
RasterizerOrderedTexture2D<uint> img2 : register(u1, space0); | ||
|
||
void frag_main() | ||
{ | ||
_9.Store(0, uint(0)); | ||
img4[int2(1, 1)] = float4(1.0f, 0.0f, 0.0f, 1.0f); | ||
img[int2(0, 0)] = img3[int2(0, 0)]; | ||
uint _39; | ||
InterlockedAdd(img2[int2(0, 0)], 1u, _39); | ||
_42.Store(0, uint(int(_42.Load(0)) + 42)); | ||
uint _55; | ||
_42.InterlockedAnd(4, _52.Load(0), _55); | ||
} | ||
|
||
void main() | ||
{ | ||
frag_main(); | ||
} |
11 changes: 11 additions & 0 deletions
11
...s/reference/opt/shaders-msl/comp/argument-buffers-image-load-store.ios.msl2.argument.comp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include <metal_stdlib> | ||
#include <simd/simd.h> | ||
|
||
using namespace metal; | ||
|
||
kernel void main0(texture2d<float, access::write> uImage [[texture(0)]], texture2d<float> uImageRead [[texture(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) | ||
{ | ||
int2 _17 = int2(gl_GlobalInvocationID.xy); | ||
uImage.write(uImageRead.read(uint2(_17)), uint2(_17)); | ||
} | ||
|
89 changes: 89 additions & 0 deletions
89
3rdparty/spirv-cross/reference/opt/shaders-msl/comp/basic.dynamic-buffer.msl2.comp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#include <metal_stdlib> | ||
#include <simd/simd.h> | ||
|
||
using namespace metal; | ||
|
||
struct Baz | ||
{ | ||
int e; | ||
int f; | ||
}; | ||
|
||
struct Foo | ||
{ | ||
int a; | ||
int b; | ||
}; | ||
|
||
struct Bar | ||
{ | ||
int c; | ||
int d; | ||
}; | ||
|
||
constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(3u, 3u, 2u); | ||
|
||
struct spvDescriptorSetBuffer0 | ||
{ | ||
constant Foo* m_34 [[id(0)]]; | ||
constant Bar* m_40 [[id(1)]]; | ||
}; | ||
|
||
struct spvDescriptorSetBuffer1 | ||
{ | ||
device Baz* baz [[id(0)]][3][3][2]; | ||
}; | ||
|
||
kernel void main0(constant spvDescriptorSetBuffer0& spvDescriptorSet0 [[buffer(0)]], constant spvDescriptorSetBuffer1& spvDescriptorSet1 [[buffer(1)]], constant uint* spvDynamicOffsets [[buffer(23)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) | ||
{ | ||
constant auto& _34 = *(constant Foo* )((constant char* )spvDescriptorSet0.m_34 + spvDynamicOffsets[0]); | ||
device Baz* baz[3][3][2] = | ||
{ | ||
{ | ||
{ | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[0][0][0] + spvDynamicOffsets[1]), | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[0][0][1] + spvDynamicOffsets[2]), | ||
}, | ||
{ | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[0][1][0] + spvDynamicOffsets[3]), | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[0][1][1] + spvDynamicOffsets[4]), | ||
}, | ||
{ | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[0][2][0] + spvDynamicOffsets[5]), | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[0][2][1] + spvDynamicOffsets[6]), | ||
}, | ||
}, | ||
{ | ||
{ | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[1][0][0] + spvDynamicOffsets[7]), | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[1][0][1] + spvDynamicOffsets[8]), | ||
}, | ||
{ | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[1][1][0] + spvDynamicOffsets[9]), | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[1][1][1] + spvDynamicOffsets[10]), | ||
}, | ||
{ | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[1][2][0] + spvDynamicOffsets[11]), | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[1][2][1] + spvDynamicOffsets[12]), | ||
}, | ||
}, | ||
{ | ||
{ | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[2][0][0] + spvDynamicOffsets[13]), | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[2][0][1] + spvDynamicOffsets[14]), | ||
}, | ||
{ | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[2][1][0] + spvDynamicOffsets[15]), | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[2][1][1] + spvDynamicOffsets[16]), | ||
}, | ||
{ | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[2][2][0] + spvDynamicOffsets[17]), | ||
(device Baz* )((device char* )spvDescriptorSet1.baz[2][2][1] + spvDynamicOffsets[18]), | ||
}, | ||
}, | ||
}; | ||
|
||
baz[gl_GlobalInvocationID.x][gl_GlobalInvocationID.y][gl_GlobalInvocationID.z]->e = _34.a + (*spvDescriptorSet0.m_40).c; | ||
baz[gl_GlobalInvocationID.x][gl_GlobalInvocationID.y][gl_GlobalInvocationID.z]->f = _34.b * (*spvDescriptorSet0.m_40).d; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.