OpenGLRenderer: Add GL_EXT_texture_compression_s3tc check for DXT pixel formats
This commit is contained in:
parent
1dc39cccfd
commit
5bc3cd8d8c
|
|
@ -50,6 +50,7 @@ namespace Nz::GL
|
|||
{
|
||||
SpirV,
|
||||
TextureFilterAnisotropic,
|
||||
TextureCompressionS3tc,
|
||||
|
||||
Max = TextureFilterAnisotropic
|
||||
};
|
||||
|
|
|
|||
|
|
@ -191,7 +191,12 @@ namespace Nz
|
|||
case PixelFormat::DXT1:
|
||||
case PixelFormat::DXT3:
|
||||
case PixelFormat::DXT5:
|
||||
{
|
||||
if (!m_referenceContext->IsExtensionSupported(GL::Extension::TextureCompressionS3tc))
|
||||
return false;
|
||||
|
||||
return usage == TextureUsage::InputAttachment || usage == TextureUsage::ShaderSampling || usage == TextureUsage::TransferDestination || usage == TextureUsage::TransferSource;
|
||||
}
|
||||
|
||||
case PixelFormat::Depth16:
|
||||
case PixelFormat::Depth16Stencil8:
|
||||
|
|
|
|||
|
|
@ -281,6 +281,9 @@ namespace Nz::GL
|
|||
|
||||
m_extensionStatus.fill(ExtensionStatus::NotSupported);
|
||||
|
||||
if (m_supportedExtensions.count("GL_EXT_texture_compression_s3tc"))
|
||||
m_extensionStatus[UnderlyingCast(Extension::TextureCompressionS3tc)] = ExtensionStatus::EXT;
|
||||
|
||||
// TextureFilterAnisotropic
|
||||
if (m_supportedExtensions.count("GL_ARB_texture_filter_anisotropic"))
|
||||
m_extensionStatus[UnderlyingCast(Extension::TextureFilterAnisotropic)] = ExtensionStatus::ARB;
|
||||
|
|
|
|||
Loading…
Reference in New Issue