mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-19 13:32:59 +01:00
Cleanup.
This commit is contained in:
@@ -910,6 +910,14 @@ namespace bgfx { namespace gl
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char* s_ARB_texture_multisample[] =
|
||||
{
|
||||
"sampler2DMS",
|
||||
"isampler2DMS",
|
||||
"usampler2DMS",
|
||||
NULL
|
||||
};
|
||||
|
||||
static void GL_APIENTRY stubVertexAttribDivisor(GLuint /*_index*/, GLuint /*_divisor*/)
|
||||
{
|
||||
}
|
||||
@@ -4836,9 +4844,10 @@ namespace bgfx { namespace gl
|
||||
;
|
||||
const bool usesIUsamplers = !!bx::findIdentifierMatch(code, s_uisamplers);
|
||||
const bool usesTexelFetch = !!bx::findIdentifierMatch(code, s_texelFetch);
|
||||
const bool usesTextureMS = !!bx::findIdentifierMatch(code, s_ARB_texture_multisample);
|
||||
|
||||
uint32_t version =
|
||||
usesTexelFetch || usesIUsamplers ? 130
|
||||
usesIUsamplers || usesTexelFetch || usesTextureMS ? 130
|
||||
: usesTextureLod ? 120
|
||||
: 0
|
||||
;
|
||||
@@ -4856,6 +4865,11 @@ namespace bgfx { namespace gl
|
||||
}
|
||||
}
|
||||
|
||||
if (usesTextureMS)
|
||||
{
|
||||
writeString(&writer, "#extension GL_ARB_texture_multisample : enable\n");
|
||||
}
|
||||
|
||||
if (130 <= version)
|
||||
{
|
||||
if (m_type == GL_FRAGMENT_SHADER)
|
||||
|
||||
Reference in New Issue
Block a user