Implement the extension GL_EXT_spirv_intrinsics
- 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.
This commit is contained in:
parent
3d935ea224
commit
65a7fb7054
40 changed files with 7337 additions and 3967 deletions
37
Test/spv.intrinsicsSpirvDecorate.frag
Normal file
37
Test/spv.intrinsicsSpirvDecorate.frag
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue