SPIRV-Cross/reference/opt/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert.vk
Hans-Kristian Arntzen 991b655c72 Declare OpSpecConstantOp up-front on relevant targets.
Required, since spec constants can include results from constant ops.
2018-05-15 14:20:16 +02:00

25 lines
551 B
Plaintext

#version 450
layout(constant_id = 201) const int _7 = -10;
layout(constant_id = 202) const uint _8 = 100u;
const int _20 = (_7 + 2);
const uint _25 = (_8 % 5u);
const ivec4 _30 = ivec4(20, 30, _20, _20);
const ivec2 _32 = ivec2(_30.y, _30.x);
const int _33 = _30.y;
layout(location = 0) flat out int _4;
void main()
{
vec4 _64 = vec4(0.0);
_64.y = float(_20);
vec4 _68 = _64;
_68.z = float(_25);
vec4 _52 = _68 + vec4(_30);
vec2 _56 = _52.xy + vec2(_32);
gl_Position = vec4(_56.x, _56.y, _52.z, _52.w);
_4 = _33;
}