
1. spirv_execution_mode_id and spirv_decorate_id could support specialization constants. The original implementation always assume only normal frontend constants are valid. It is not true. 2. spirv_type donesn't support type_specifier as an option of spirv_type_parameter. At present, only constant_expression is the valid option.
15 lines
347 B
GLSL
15 lines
347 B
GLSL
#version 450 core
|
|
|
|
#extension GL_EXT_spirv_intrinsics: enable
|
|
|
|
layout(constant_id = 5) const uint targetWidth = 32;
|
|
spirv_execution_mode_id(4460/*=DenormFlushToZero*/, targetWidth);
|
|
|
|
layout(constant_id = 6) const uint builtIn = 1;
|
|
spirv_decorate_id(11/*=BuiltIn*/, builtIn) out float pointSize;
|
|
|
|
void main()
|
|
{
|
|
pointSize = 4.0;
|
|
}
|