mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-08 11:30:06 +00:00
65a7fb7054
- Add support of SPIR-V execution mode qualifiers. - Add support of SPIR-V storage class qualifier. - Add support of SPIR-V decorate qualifiers. - Add support of SPIR-V type specifier. - Add support of SPIR-V intruction qualifiers. - Add support of spirv_by_reference/spirv_literal parameter qualifier. - Add shader stage macros introduced by this extension.
22 lines
446 B
GLSL
22 lines
446 B
GLSL
#version 450 core
|
|
|
|
#extension GL_EXT_spirv_intrinsics: enable
|
|
|
|
spirv_instruction (set = "GLSL.std.450", id = 35) // modf
|
|
float modf(float x, spirv_by_reference float i);
|
|
|
|
layout(location = 0) in float floatIn;
|
|
layout(location = 0) out vec2 vec2Out;
|
|
layout(location = 1) out float floatOut;
|
|
|
|
void func(spirv_by_reference float f)
|
|
{
|
|
f = 0.5;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
vec2Out.x = modf(floatIn, vec2Out.y);
|
|
func(floatOut);
|
|
}
|