GL: Fixed MSAA texture sampling.

This commit is contained in:
Branimir Karadžić
2016-06-13 14:47:37 -07:00
parent a3edffcd5c
commit d8d17994dc
2 changed files with 35 additions and 25 deletions

View File

@@ -5082,9 +5082,10 @@ namespace bgfx { namespace gl
&& s_extension[Extension::ARB_shader_texture_lod].m_supported
&& bx::findIdentifierMatch(code, s_ARB_shader_texture_lod)
;
const bool usesGpuShader5 = !!bx::findIdentifierMatch(code, s_ARB_gpu_shader5);
const bool usesIUsamplers = !!bx::findIdentifierMatch(code, s_uisamplers);
const bool usesTexelFetch = !!bx::findIdentifierMatch(code, s_texelFetch);
const bool usesGpuShader5 = !!bx::findIdentifierMatch(code, s_ARB_gpu_shader5);
const bool usesTextureMS = !!bx::findIdentifierMatch(code, s_ARB_texture_multisample);
const bool usesPacking = !!bx::findIdentifierMatch(code, s_ARB_shading_language_packing);
uint32_t version =
@@ -5116,6 +5117,11 @@ namespace bgfx { namespace gl
writeString(&writer, "#extension GL_ARB_shading_language_packing : enable\n");
}
if (usesTextureMS)
{
writeString(&writer, "#extension GL_ARB_texture_multisample : enable\n");
}
if (130 <= version)
{
if (m_type == GL_FRAGMENT_SHADER)