mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-08 19:40: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.
38 lines
1.7 KiB
GLSL
38 lines
1.7 KiB
GLSL
#version 450 core
|
|
|
|
#extension GL_EXT_spirv_intrinsics: enable
|
|
|
|
#define GL_AMD_shader_explicit_vertex_parameter 1
|
|
|
|
spirv_decorate (extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], 11, 4992)
|
|
in vec2 gl_BaryCoordNoPerspAMD;
|
|
spirv_decorate (extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], 11, 4993)
|
|
in vec2 gl_BaryCoordNoPerspCentroidAMD;
|
|
spirv_decorate (extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], 11, 4994)
|
|
in vec2 gl_BaryCoordNoPerspSampleAMD;
|
|
spirv_decorate (extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], 11, 4995)
|
|
in vec2 gl_BaryCoordSmoothAMD;
|
|
spirv_decorate (extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], 11, 4996)
|
|
in vec2 gl_BaryCoordSmoothCentroidAMD;
|
|
spirv_decorate (extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], 11, 4997)
|
|
in vec2 gl_BaryCoordSmoothSampleAMD;
|
|
spirv_decorate (extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], 11, 4998)
|
|
in vec3 gl_BaryCoordPullModelAMD;
|
|
|
|
#define __explicitInterpAMD spirv_decorate(extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], 4999)
|
|
|
|
spirv_instruction(extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], set = "SPV_AMD_shader_explicit_vertex_parameter", id = 1)
|
|
float interpolateAtVertexAMD(float interpolant, uint vertexIdx);
|
|
|
|
layout(location = 0) in __explicitInterpAMD float floatIn;
|
|
layout(location = 0) out float floatOut;
|
|
layout(location = 1) out vec2 vec2Out;
|
|
|
|
void main()
|
|
{
|
|
floatOut = interpolateAtVertexAMD(floatIn, 1);
|
|
vec2Out = gl_BaryCoordNoPerspAMD + gl_BaryCoordNoPerspCentroidAMD + gl_BaryCoordNoPerspSampleAMD +
|
|
gl_BaryCoordSmoothAMD + gl_BaryCoordSmoothCentroidAMD + gl_BaryCoordSmoothSampleAMD +
|
|
gl_BaryCoordPullModelAMD.xy;
|
|
}
|