Add optimized reference output for added test case.
This commit is contained in:
parent
680ef9d773
commit
1958438f69
@ -0,0 +1,28 @@
|
||||
#pragma clang diagnostic ignored "-Wmissing-prototypes"
|
||||
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
struct cb5_struct
|
||||
{
|
||||
float4 _m0[5];
|
||||
};
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
|
||||
kernel void main0(constant cb5_struct& cb0_5 [[buffer(1)]], texture2d<uint, access::write> u0 [[texture(0)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]])
|
||||
{
|
||||
uint _44 = as_type<uint>(as_type<float>(gl_LocalInvocationID.x << 4)) >> 2u;
|
||||
uint4 _51 = as_type<uint4>(cb0_5._m0[uint(as_type<int>(as_type<float>(gl_LocalInvocationID.x))) + 1u]);
|
||||
u0.write(_51.xxxx, spvTexelBufferCoord(_44));
|
||||
u0.write(_51.yyyy, spvTexelBufferCoord((_44 + 1u)));
|
||||
u0.write(_51.zzzz, spvTexelBufferCoord((_44 + 2u)));
|
||||
u0.write(_51.wwww, spvTexelBufferCoord((_44 + 3u)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user