OGL: Convert SupportedESPointSize to an enum class
This commit is contained in:
parent
79b8e136b7
commit
c68d484a65
|
@ -368,9 +368,10 @@ bool PopulateConfig(GLContext* m_main_gl_context)
|
||||||
|
|
||||||
if (m_main_gl_context->IsGLES())
|
if (m_main_gl_context->IsGLES())
|
||||||
{
|
{
|
||||||
g_ogl_config.SupportedESPointSize = GLExtensions::Supports("GL_OES_geometry_point_size") ? 1 :
|
g_ogl_config.SupportedESPointSize =
|
||||||
GLExtensions::Supports("GL_EXT_geometry_point_size") ? 2 :
|
GLExtensions::Supports("GL_OES_geometry_point_size") ? EsPointSizeType::PointSizeOes :
|
||||||
0;
|
GLExtensions::Supports("GL_EXT_geometry_point_size") ? EsPointSizeType::PointSizeExt :
|
||||||
|
EsPointSizeType::PointSizeNone;
|
||||||
g_ogl_config.SupportedESTextureBuffer =
|
g_ogl_config.SupportedESTextureBuffer =
|
||||||
GLExtensions::Supports("VERSION_GLES_3_2") ? EsTexbufType::TexbufCore :
|
GLExtensions::Supports("VERSION_GLES_3_2") ? EsTexbufType::TexbufCore :
|
||||||
GLExtensions::Supports("GL_OES_texture_buffer") ? EsTexbufType::TexbufOes :
|
GLExtensions::Supports("GL_OES_texture_buffer") ? EsTexbufType::TexbufOes :
|
||||||
|
@ -410,7 +411,8 @@ bool PopulateConfig(GLContext* m_main_gl_context)
|
||||||
g_Config.backend_info.bSupportsGeometryShaders = g_ogl_config.bSupportsAEP;
|
g_Config.backend_info.bSupportsGeometryShaders = g_ogl_config.bSupportsAEP;
|
||||||
g_Config.backend_info.bSupportsComputeShaders = true;
|
g_Config.backend_info.bSupportsComputeShaders = true;
|
||||||
g_Config.backend_info.bSupportsGSInstancing =
|
g_Config.backend_info.bSupportsGSInstancing =
|
||||||
g_Config.backend_info.bSupportsGeometryShaders && g_ogl_config.SupportedESPointSize > 0;
|
g_Config.backend_info.bSupportsGeometryShaders &&
|
||||||
|
g_ogl_config.SupportedESPointSize != EsPointSizeType::PointSizeNone;
|
||||||
g_Config.backend_info.bSupportsSSAA = g_ogl_config.bSupportsAEP;
|
g_Config.backend_info.bSupportsSSAA = g_ogl_config.bSupportsAEP;
|
||||||
g_Config.backend_info.bSupportsFragmentStoresAndAtomics = true;
|
g_Config.backend_info.bSupportsFragmentStoresAndAtomics = true;
|
||||||
g_ogl_config.bSupportsMSAA = true;
|
g_ogl_config.bSupportsMSAA = true;
|
||||||
|
@ -434,7 +436,8 @@ bool PopulateConfig(GLContext* m_main_gl_context)
|
||||||
g_ogl_config.bSupportsImageLoadStore = true;
|
g_ogl_config.bSupportsImageLoadStore = true;
|
||||||
g_Config.backend_info.bSupportsGeometryShaders = true;
|
g_Config.backend_info.bSupportsGeometryShaders = true;
|
||||||
g_Config.backend_info.bSupportsComputeShaders = true;
|
g_Config.backend_info.bSupportsComputeShaders = true;
|
||||||
g_Config.backend_info.bSupportsGSInstancing = g_ogl_config.SupportedESPointSize > 0;
|
g_Config.backend_info.bSupportsGSInstancing =
|
||||||
|
g_ogl_config.SupportedESPointSize != EsPointSizeType::PointSizeNone;
|
||||||
g_Config.backend_info.bSupportsPaletteConversion = true;
|
g_Config.backend_info.bSupportsPaletteConversion = true;
|
||||||
g_Config.backend_info.bSupportsSSAA = true;
|
g_Config.backend_info.bSupportsSSAA = true;
|
||||||
g_Config.backend_info.bSupportsFragmentStoresAndAtomics = true;
|
g_Config.backend_info.bSupportsFragmentStoresAndAtomics = true;
|
||||||
|
|
|
@ -22,6 +22,14 @@ enum GlslVersion
|
||||||
GlslEs310, // GLES 3.1
|
GlslEs310, // GLES 3.1
|
||||||
GlslEs320, // GLES 3.2
|
GlslEs320, // GLES 3.2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class EsPointSizeType
|
||||||
|
{
|
||||||
|
PointSizeNone,
|
||||||
|
PointSizeOes,
|
||||||
|
PointSizeExt,
|
||||||
|
};
|
||||||
|
|
||||||
enum class EsTexbufType
|
enum class EsTexbufType
|
||||||
{
|
{
|
||||||
TexbufNone,
|
TexbufNone,
|
||||||
|
@ -51,7 +59,7 @@ struct VideoConfig
|
||||||
bool bSupportsAEP;
|
bool bSupportsAEP;
|
||||||
bool bSupportsDebug;
|
bool bSupportsDebug;
|
||||||
bool bSupportsCopySubImage;
|
bool bSupportsCopySubImage;
|
||||||
u8 SupportedESPointSize;
|
EsPointSizeType SupportedESPointSize;
|
||||||
EsTexbufType SupportedESTextureBuffer;
|
EsTexbufType SupportedESTextureBuffer;
|
||||||
bool bSupportsTextureStorage;
|
bool bSupportsTextureStorage;
|
||||||
bool bSupports2DTextureStorageMultisample;
|
bool bSupports2DTextureStorageMultisample;
|
||||||
|
|
|
@ -664,12 +664,13 @@ void ProgramShaderCache::CreateHeader()
|
||||||
std::string SupportedESTextureBuffer;
|
std::string SupportedESTextureBuffer;
|
||||||
switch (g_ogl_config.SupportedESPointSize)
|
switch (g_ogl_config.SupportedESPointSize)
|
||||||
{
|
{
|
||||||
case 1:
|
case EsPointSizeType::PointSizeOes:
|
||||||
SupportedESPointSize = "#extension GL_OES_geometry_point_size : enable";
|
SupportedESPointSize = "#extension GL_OES_geometry_point_size : enable";
|
||||||
break;
|
break;
|
||||||
case 2:
|
case EsPointSizeType::PointSizeExt:
|
||||||
SupportedESPointSize = "#extension GL_EXT_geometry_point_size : enable";
|
SupportedESPointSize = "#extension GL_EXT_geometry_point_size : enable";
|
||||||
break;
|
break;
|
||||||
|
case EsPointSizeType::PointSizeNone:
|
||||||
default:
|
default:
|
||||||
SupportedESPointSize = "";
|
SupportedESPointSize = "";
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue