Welcome to mirror list, hosted at ThFree Co, Russian Federation.

int16min-literal.comp « comp « shaders-msl-no-opt « reference - github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a2b36ede8e1f4683c9c4ea884b78dabe74ee35b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <metal_stdlib>
#include <simd/simd.h>

using namespace metal;

struct UBO
{
    half b;
};

struct SSBO
{
    half a;
};

constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u);

kernel void main0(constant UBO& _12 [[buffer(0)]], device SSBO& _24 [[buffer(1)]])
{
    short v = as_type<short>(_12.b);
    v ^= short(-32768);
    _24.a = as_type<half>(v);
}