Implement extension GL_ARB_shader_stencil_export
This commit is contained in:
parent
89f8d1e64f
commit
37cdceed41
10 changed files with 55 additions and 3 deletions
|
|
@ -3753,6 +3753,10 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
stageBuiltins[EShLangFragment].append(
|
||||
"vec2 gl_PointCoord;" // needs qualifier fixed later
|
||||
);
|
||||
if (version >= 140)
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
"out int gl_FragStencilRefARB;"
|
||||
);
|
||||
if (IncludeLegacy(version, profile, spvVersion) || (! ForwardCompatibility && version < 420))
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
"vec4 gl_FragColor;" // needs qualifier fixed later
|
||||
|
|
@ -5473,6 +5477,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
BuiltInVariable("gl_CullDistance", EbvCullDistance, symbolTable);
|
||||
BuiltInVariable("gl_PrimitiveID", EbvPrimitiveId, symbolTable);
|
||||
|
||||
if (profile != EEsProfile && version >= 140) {
|
||||
symbolTable.setVariableExtensions("gl_FragStencilRefARB", 1, &E_GL_ARB_shader_stencil_export);
|
||||
BuiltInVariable("gl_FragStencilRefARB", EbvFragStencilRef, symbolTable);
|
||||
}
|
||||
|
||||
if ((profile != EEsProfile && version >= 400) ||
|
||||
(profile == EEsProfile && version >= 310)) {
|
||||
BuiltInVariable("gl_SampleID", EbvSampleId, symbolTable);
|
||||
|
|
|
|||
|
|
@ -179,6 +179,7 @@ void TParseVersions::initializeExtensionBehavior()
|
|||
extensionBehavior[E_GL_ARB_shader_ballot] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_sparse_texture2] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_sparse_texture_clamp] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_shader_stencil_export] = EBhDisable;
|
||||
// extensionBehavior[E_GL_ARB_cull_distance] = EBhDisable; // present for 4.5, but need extension control over block members
|
||||
|
||||
extensionBehavior[E_GL_EXT_shader_non_constant_global_initializers] = EBhDisable;
|
||||
|
|
@ -309,6 +310,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
"#define GL_ARB_shader_ballot 1\n"
|
||||
"#define GL_ARB_sparse_texture2 1\n"
|
||||
"#define GL_ARB_sparse_texture_clamp 1\n"
|
||||
"#define GL_ARB_shader_stencil_export 1\n"
|
||||
// "#define GL_ARB_cull_distance 1\n" // present for 4.5, but need extension control over block members
|
||||
"#define GL_EXT_shader_non_constant_global_initializers 1\n"
|
||||
"#define GL_EXT_shader_image_load_formatted 1\n"
|
||||
|
|
|
|||
|
|
@ -133,6 +133,7 @@ const char* const E_GL_ARB_gpu_shader_int64 = "GL_ARB_gpu_shader_int
|
|||
const char* const E_GL_ARB_shader_ballot = "GL_ARB_shader_ballot";
|
||||
const char* const E_GL_ARB_sparse_texture2 = "GL_ARB_sparse_texture2";
|
||||
const char* const E_GL_ARB_sparse_texture_clamp = "GL_ARB_sparse_texture_clamp";
|
||||
const char* const E_GL_ARB_shader_stencil_export = "GL_ARB_shader_stencil_export";
|
||||
// const char* const E_GL_ARB_cull_distance = "GL_ARB_cull_distance"; // present for 4.5, but need extension control over block members
|
||||
|
||||
const char* const E_GL_EXT_shader_non_constant_global_initializers = "GL_EXT_shader_non_constant_global_initializers";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue