This commit is contained in:
Branimir Karadžić
2016-03-30 20:32:13 -07:00
parent b95833f09f
commit 310bcfcfeb
4 changed files with 37 additions and 9 deletions

View File

@@ -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)