Skip to content

Commit

Permalink
Merge pull request KhronosGroup#1589 from KhronosGroup/roll-deps
Browse files Browse the repository at this point in the history
Roll dependencies.
  • Loading branch information
HansKristian-Work authored Jan 8, 2021
2 parents ce18d1b + 5d82d32 commit 702c903
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 13 deletions.
6 changes: 3 additions & 3 deletions checkout_glslang_spirv_tools.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

GLSLANG_REV=4dcc12d1a441b29d5901bc708bb1343d29d6459f
SPIRV_TOOLS_REV=0a1fb588cd365f7737cb121fdd64553923e0cef6
SPIRV_HEADERS_REV=060627f0b0d2fa8581b5acb939f46e3b9e500593
GLSLANG_REV=3de5cfe50edecd001e6d703555284d9b10b3dd57
SPIRV_TOOLS_REV=f3ccb633dfd7c5de1f9f0a2d2e9d7a25f2478206
SPIRV_HEADERS_REV=f027d53ded7e230e008d37c8b47ede7cd308e19d

if [ -z $PROTOCOL ]; then
PROTOCOL=git
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,18 @@ void frag_main()
#line 16 "test.frag"
FragColor = 4.0f;
}
#line 19 "test.frag"
for (int _127 = 0; float(_127) < (40.0f + vColor); )
{
#line 21 "test.frag"
FragColor += 0.20000000298023223876953125f;
#line 22 "test.frag"
FragColor += 0.300000011920928955078125f;
#line 19 "test.frag"
_127 += (int(vColor) + 5);
continue;
}
#line 25 "test.frag"
switch (int(vColor))
{
case 0:
Expand All @@ -64,7 +67,10 @@ void frag_main()
}
for (;;)
{
#line 42 "test.frag"
FragColor += (10.0f + vColor);
#line 43 "test.frag"
#line 42 "test.frag"
#line 43 "test.frag"
if (FragColor < 100.0f)
{
Expand All @@ -74,6 +80,7 @@ void frag_main()
break;
}
}
#line 48 "test.frag"
}

SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,18 @@ fragment main0_out main0(main0_in in [[stage_in]])
#line 16 "test.frag"
out.FragColor = 4.0;
}
#line 19 "test.frag"
for (int _127 = 0; float(_127) < (40.0 + in.vColor); )
{
#line 21 "test.frag"
out.FragColor += 0.20000000298023223876953125;
#line 22 "test.frag"
out.FragColor += 0.300000011920928955078125;
#line 19 "test.frag"
_127 += (int(in.vColor) + 5);
continue;
}
#line 25 "test.frag"
switch (int(in.vColor))
{
case 0:
Expand All @@ -67,7 +70,10 @@ fragment main0_out main0(main0_in in [[stage_in]])
}
for (;;)
{
#line 42 "test.frag"
out.FragColor += (10.0 + in.vColor);
#line 43 "test.frag"
#line 42 "test.frag"
#line 43 "test.frag"
if (out.FragColor < 100.0)
{
Expand All @@ -77,6 +83,7 @@ fragment main0_out main0(main0_in in [[stage_in]])
break;
}
}
#line 48 "test.frag"
return out;
}

7 changes: 7 additions & 0 deletions reference/opt/shaders/asm/frag/line-directive.line.asm.frag
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ void main()
#line 16 "test.frag"
FragColor = 4.0;
}
#line 19 "test.frag"
for (int _127 = 0; float(_127) < (40.0 + vColor); )
{
#line 21 "test.frag"
FragColor += 0.20000000298023223876953125;
#line 22 "test.frag"
FragColor += 0.300000011920928955078125;
#line 19 "test.frag"
_127 += (int(vColor) + 5);
continue;
}
#line 25 "test.frag"
switch (int(vColor))
{
case 0:
Expand All @@ -57,7 +60,10 @@ void main()
}
for (;;)
{
#line 42 "test.frag"
FragColor += (10.0 + vColor);
#line 43 "test.frag"
#line 42 "test.frag"
#line 43 "test.frag"
if (FragColor < 100.0)
{
Expand All @@ -67,5 +73,6 @@ void main()
break;
}
}
#line 48 "test.frag"
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#pragma clang diagnostic ignored "-Wmissing-prototypes"

#include <metal_stdlib>
#include <simd/simd.h>

using namespace metal;

static inline __attribute__((always_inline))
void _main(thread const uint3& id, thread texture2d<float, access::read_write> TargetTexture)
{
float2 loaded = TargetTexture.read(uint2(id.xy)).xy;
float2 storeTemp = loaded + float2(1.0);
TargetTexture.write(storeTemp.xyyy, uint2((id.xy + uint2(1u))));
}

kernel void main0(texture2d<float, access::read_write> TargetTexture [[texture(0)]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]])
{
uint3 id = gl_WorkGroupID;
uint3 param = id;
_main(param, TargetTexture);
}

0 comments on commit 702c903

Please sign in to comment.