mirror of https://github.com/bkaradzic/bgfx
Merge pull request #770 from dariomanesku/master
GL_ARB_texture_multisample is written against OGL 3.1.
This commit is contained in:
commit
b2c59cf949
|
@ -5067,10 +5067,9 @@ 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 =
|
||||
usesIUsamplers || usesTexelFetch || usesTextureMS ? 130
|
||||
usesIUsamplers || usesTexelFetch ? 130
|
||||
: usesTextureLod ? 120
|
||||
: 0
|
||||
;
|
||||
|
@ -5088,11 +5087,6 @@ namespace bgfx { namespace gl
|
|||
}
|
||||
}
|
||||
|
||||
if (usesTextureMS)
|
||||
{
|
||||
writeString(&writer, "#extension GL_ARB_texture_multisample : enable\n");
|
||||
}
|
||||
|
||||
if (130 <= version)
|
||||
{
|
||||
if (m_type == GL_FRAGMENT_SHADER)
|
||||
|
@ -5208,6 +5202,11 @@ namespace bgfx { namespace gl
|
|||
}
|
||||
}
|
||||
|
||||
if (!!bx::findIdentifierMatch(code, s_ARB_texture_multisample))
|
||||
{
|
||||
writeString(&writer, "#extension GL_ARB_texture_multisample : enable\n");
|
||||
}
|
||||
|
||||
if (0 != fragData)
|
||||
{
|
||||
writeStringf(&writer, "out vec4 bgfx_FragData[%d];\n", fragData);
|
||||
|
|
Loading…
Reference in New Issue