mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Standardise some enums from ALL_CAPS to CamelCase
This commit is contained in:
parent
ceb1f8c8cb
commit
c709f3c2d1
@ -64,26 +64,26 @@ static std::string s_glsl_header = "";
|
||||
|
||||
static std::string GetGLSLVersionString()
|
||||
{
|
||||
GLSL_VERSION v = g_ogl_config.eSupportedGLSLVersion;
|
||||
GlslVersion v = g_ogl_config.eSupportedGLSLVersion;
|
||||
switch (v)
|
||||
{
|
||||
case GLSLES_300:
|
||||
case GlslEs300:
|
||||
return "#version 300 es";
|
||||
case GLSLES_310:
|
||||
case GlslEs310:
|
||||
return "#version 310 es";
|
||||
case GLSLES_320:
|
||||
case GlslEs320:
|
||||
return "#version 320 es";
|
||||
case GLSL_130:
|
||||
case Glsl130:
|
||||
return "#version 130";
|
||||
case GLSL_140:
|
||||
case Glsl140:
|
||||
return "#version 140";
|
||||
case GLSL_150:
|
||||
case Glsl150:
|
||||
return "#version 150";
|
||||
case GLSL_330:
|
||||
case Glsl330:
|
||||
return "#version 330";
|
||||
case GLSL_400:
|
||||
case Glsl400:
|
||||
return "#version 400";
|
||||
case GLSL_430:
|
||||
case Glsl430:
|
||||
return "#version 430";
|
||||
default:
|
||||
// Shouldn't ever hit this
|
||||
@ -431,7 +431,7 @@ bool ProgramShaderCache::CompileComputeShader(SHADER& shader, const std::string&
|
||||
// but not GLSL 4.3. Mesa is one example.
|
||||
std::string header;
|
||||
if (g_ActiveConfig.backend_info.bSupportsComputeShaders &&
|
||||
g_ogl_config.eSupportedGLSLVersion < GLSL_430)
|
||||
g_ogl_config.eSupportedGLSLVersion < Glsl430)
|
||||
{
|
||||
header = "#extension GL_ARB_compute_shader : enable\n";
|
||||
}
|
||||
@ -839,8 +839,8 @@ void ProgramShaderCache::DestroyShaders()
|
||||
|
||||
void ProgramShaderCache::CreateHeader()
|
||||
{
|
||||
GLSL_VERSION v = g_ogl_config.eSupportedGLSLVersion;
|
||||
bool is_glsles = v >= GLSLES_300;
|
||||
GlslVersion v = g_ogl_config.eSupportedGLSLVersion;
|
||||
bool is_glsles = v >= GlslEs300;
|
||||
std::string SupportedESPointSize;
|
||||
std::string SupportedESTextureBuffer;
|
||||
switch (g_ogl_config.SupportedESPointSize)
|
||||
@ -858,14 +858,14 @@ void ProgramShaderCache::CreateHeader()
|
||||
|
||||
switch (g_ogl_config.SupportedESTextureBuffer)
|
||||
{
|
||||
case ES_TEXBUF_TYPE::TEXBUF_EXT:
|
||||
case EsTexbufType::TexbufExt:
|
||||
SupportedESTextureBuffer = "#extension GL_EXT_texture_buffer : enable";
|
||||
break;
|
||||
case ES_TEXBUF_TYPE::TEXBUF_OES:
|
||||
case EsTexbufType::TexbufOes:
|
||||
SupportedESTextureBuffer = "#extension GL_OES_texture_buffer : enable";
|
||||
break;
|
||||
case ES_TEXBUF_TYPE::TEXBUF_CORE:
|
||||
case ES_TEXBUF_TYPE::TEXBUF_NONE:
|
||||
case EsTexbufType::TexbufCore:
|
||||
case EsTexbufType::TexbufNone:
|
||||
SupportedESTextureBuffer = "";
|
||||
break;
|
||||
}
|
||||
@ -888,17 +888,17 @@ void ProgramShaderCache::CreateHeader()
|
||||
std::string framebuffer_fetch_string;
|
||||
switch (g_ogl_config.SupportedFramebufferFetch)
|
||||
{
|
||||
case ES_FB_FETCH_TYPE::FB_FETCH_EXT:
|
||||
case EsFbFetchType::FbFetchExt:
|
||||
framebuffer_fetch_string = "#extension GL_EXT_shader_framebuffer_fetch: enable\n"
|
||||
"#define FB_FETCH_VALUE real_ocol0\n"
|
||||
"#define FRAGMENT_INOUT inout";
|
||||
break;
|
||||
case ES_FB_FETCH_TYPE::FB_FETCH_ARM:
|
||||
case EsFbFetchType::FbFetchArm:
|
||||
framebuffer_fetch_string = "#extension GL_ARM_shader_framebuffer_fetch: enable\n"
|
||||
"#define FB_FETCH_VALUE gl_LastFragColorARM\n"
|
||||
"#define FRAGMENT_INOUT out";
|
||||
break;
|
||||
case ES_FB_FETCH_TYPE::FB_FETCH_NONE:
|
||||
case EsFbFetchType::FbFetchNone:
|
||||
framebuffer_fetch_string = "";
|
||||
break;
|
||||
}
|
||||
@ -947,11 +947,11 @@ void ProgramShaderCache::CreateHeader()
|
||||
|
||||
,
|
||||
GetGLSLVersionString().c_str(),
|
||||
v < GLSL_140 ? "#extension GL_ARB_uniform_buffer_object : enable" : "", earlyz_string.c_str(),
|
||||
(g_ActiveConfig.backend_info.bSupportsBindingLayout && v < GLSLES_310) ?
|
||||
v < Glsl140 ? "#extension GL_ARB_uniform_buffer_object : enable" : "", earlyz_string.c_str(),
|
||||
(g_ActiveConfig.backend_info.bSupportsBindingLayout && v < GlslEs310) ?
|
||||
"#extension GL_ARB_shading_language_420pack : enable" :
|
||||
"",
|
||||
(g_ogl_config.bSupportsMSAA && v < GLSL_150) ?
|
||||
(g_ogl_config.bSupportsMSAA && v < Glsl150) ?
|
||||
"#extension GL_ARB_texture_multisample : enable" :
|
||||
"",
|
||||
// Attribute and fragment output bindings are still done via glBindAttribLocation and
|
||||
@ -974,15 +974,15 @@ void ProgramShaderCache::CreateHeader()
|
||||
!is_glsles && g_ActiveConfig.backend_info.bSupportsFragmentStoresAndAtomics ?
|
||||
"#extension GL_ARB_shader_storage_buffer_object : enable" :
|
||||
"",
|
||||
v < GLSL_400 && g_ActiveConfig.backend_info.bSupportsGSInstancing ?
|
||||
v < Glsl400 && g_ActiveConfig.backend_info.bSupportsGSInstancing ?
|
||||
"#extension GL_ARB_gpu_shader5 : enable" :
|
||||
"",
|
||||
v < GLSL_400 && g_ActiveConfig.backend_info.bSupportsSSAA ?
|
||||
v < Glsl400 && g_ActiveConfig.backend_info.bSupportsSSAA ?
|
||||
"#extension GL_ARB_sample_shading : enable" :
|
||||
"",
|
||||
SupportedESPointSize.c_str(),
|
||||
g_ogl_config.bSupportsAEP ? "#extension GL_ANDROID_extension_pack_es31a : enable" : "",
|
||||
v < GLSL_140 && g_ActiveConfig.backend_info.bSupportsPaletteConversion ?
|
||||
v < Glsl140 && g_ActiveConfig.backend_info.bSupportsPaletteConversion ?
|
||||
"#extension GL_ARB_texture_buffer_object : enable" :
|
||||
"",
|
||||
SupportedESTextureBuffer.c_str(),
|
||||
@ -992,7 +992,7 @@ void ProgramShaderCache::CreateHeader()
|
||||
|
||||
,
|
||||
g_ogl_config.bSupportsImageLoadStore &&
|
||||
((!is_glsles && v < GLSL_430) || (is_glsles && v < GLSLES_310)) ?
|
||||
((!is_glsles && v < Glsl430) || (is_glsles && v < GlslEs310)) ?
|
||||
"#extension GL_ARB_shader_image_load_store : enable" :
|
||||
"",
|
||||
framebuffer_fetch_string.c_str(), is_glsles ? "precision highp float;" : "",
|
||||
@ -1000,8 +1000,8 @@ void ProgramShaderCache::CreateHeader()
|
||||
(is_glsles && g_ActiveConfig.backend_info.bSupportsPaletteConversion) ?
|
||||
"precision highp usamplerBuffer;" :
|
||||
"",
|
||||
v > GLSLES_300 ? "precision highp sampler2DMS;" : "",
|
||||
v >= GLSLES_310 ? "precision highp image2DArray;" : "");
|
||||
v > GlslEs300 ? "precision highp sampler2DMS;" : "",
|
||||
v >= GlslEs310 ? "precision highp image2DArray;" : "");
|
||||
}
|
||||
|
||||
void ProgramShaderCache::PrecompileUberShaders()
|
||||
|
@ -508,12 +508,12 @@ Renderer::Renderer()
|
||||
1 :
|
||||
GLExtensions::Supports("GL_EXT_geometry_point_size") ? 2 : 0;
|
||||
g_ogl_config.SupportedESTextureBuffer = GLExtensions::Supports("VERSION_GLES_3_2") ?
|
||||
ES_TEXBUF_TYPE::TEXBUF_CORE :
|
||||
EsTexbufType::TexbufCore :
|
||||
GLExtensions::Supports("GL_OES_texture_buffer") ?
|
||||
ES_TEXBUF_TYPE::TEXBUF_OES :
|
||||
EsTexbufType::TexbufOes :
|
||||
GLExtensions::Supports("GL_EXT_texture_buffer") ?
|
||||
ES_TEXBUF_TYPE::TEXBUF_EXT :
|
||||
ES_TEXBUF_TYPE::TEXBUF_NONE;
|
||||
EsTexbufType::TexbufExt :
|
||||
EsTexbufType::TexbufNone;
|
||||
|
||||
g_ogl_config.bSupportsGLSLCache = true;
|
||||
g_ogl_config.bSupportsGLSync = true;
|
||||
@ -524,29 +524,29 @@ Renderer::Renderer()
|
||||
|
||||
if (GLExtensions::Supports("GL_EXT_shader_framebuffer_fetch"))
|
||||
{
|
||||
g_ogl_config.SupportedFramebufferFetch = ES_FB_FETCH_TYPE::FB_FETCH_EXT;
|
||||
g_ogl_config.SupportedFramebufferFetch = EsFbFetchType::FbFetchExt;
|
||||
}
|
||||
else if (GLExtensions::Supports("GL_ARM_shader_framebuffer_fetch"))
|
||||
{
|
||||
g_ogl_config.SupportedFramebufferFetch = ES_FB_FETCH_TYPE::FB_FETCH_ARM;
|
||||
g_ogl_config.SupportedFramebufferFetch = EsFbFetchType::FbFetchArm;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_ogl_config.SupportedFramebufferFetch = ES_FB_FETCH_TYPE::FB_FETCH_NONE;
|
||||
g_ogl_config.SupportedFramebufferFetch = EsFbFetchType::FbFetchNone;
|
||||
}
|
||||
g_Config.backend_info.bSupportsFramebufferFetch =
|
||||
g_ogl_config.SupportedFramebufferFetch != ES_FB_FETCH_TYPE::FB_FETCH_NONE;
|
||||
g_ogl_config.SupportedFramebufferFetch != EsFbFetchType::FbFetchNone;
|
||||
|
||||
if (GLExtensions::Version() == 300)
|
||||
{
|
||||
g_ogl_config.eSupportedGLSLVersion = GLSLES_300;
|
||||
g_ogl_config.eSupportedGLSLVersion = GlslEs300;
|
||||
g_ogl_config.bSupportsAEP = false;
|
||||
g_ogl_config.bSupportsTextureStorage = true;
|
||||
g_Config.backend_info.bSupportsGeometryShaders = false;
|
||||
}
|
||||
else if (GLExtensions::Version() == 310)
|
||||
{
|
||||
g_ogl_config.eSupportedGLSLVersion = GLSLES_310;
|
||||
g_ogl_config.eSupportedGLSLVersion = GlslEs310;
|
||||
g_ogl_config.bSupportsAEP = GLExtensions::Supports("GL_ANDROID_extension_pack_es31a");
|
||||
g_Config.backend_info.bSupportsBindingLayout = true;
|
||||
g_ogl_config.bSupportsImageLoadStore = true;
|
||||
@ -571,7 +571,7 @@ Renderer::Renderer()
|
||||
}
|
||||
else
|
||||
{
|
||||
g_ogl_config.eSupportedGLSLVersion = GLSLES_320;
|
||||
g_ogl_config.eSupportedGLSLVersion = GlslEs320;
|
||||
g_ogl_config.bSupportsAEP = GLExtensions::Supports("GL_ANDROID_extension_pack_es31a");
|
||||
g_Config.backend_info.bSupportsBindingLayout = true;
|
||||
g_ogl_config.bSupportsImageLoadStore = true;
|
||||
@ -604,7 +604,7 @@ Renderer::Renderer()
|
||||
}
|
||||
else if (GLExtensions::Version() == 300)
|
||||
{
|
||||
g_ogl_config.eSupportedGLSLVersion = GLSL_130;
|
||||
g_ogl_config.eSupportedGLSLVersion = Glsl130;
|
||||
g_ogl_config.bSupportsImageLoadStore = false; // layout keyword is only supported on glsl150+
|
||||
g_ogl_config.bSupportsConservativeDepth =
|
||||
false; // layout keyword is only supported on glsl150+
|
||||
@ -613,7 +613,7 @@ Renderer::Renderer()
|
||||
}
|
||||
else if (GLExtensions::Version() == 310)
|
||||
{
|
||||
g_ogl_config.eSupportedGLSLVersion = GLSL_140;
|
||||
g_ogl_config.eSupportedGLSLVersion = Glsl140;
|
||||
g_ogl_config.bSupportsImageLoadStore = false; // layout keyword is only supported on glsl150+
|
||||
g_ogl_config.bSupportsConservativeDepth =
|
||||
false; // layout keyword is only supported on glsl150+
|
||||
@ -622,16 +622,16 @@ Renderer::Renderer()
|
||||
}
|
||||
else if (GLExtensions::Version() == 320)
|
||||
{
|
||||
g_ogl_config.eSupportedGLSLVersion = GLSL_150;
|
||||
g_ogl_config.eSupportedGLSLVersion = Glsl150;
|
||||
}
|
||||
else if (GLExtensions::Version() == 330)
|
||||
{
|
||||
g_ogl_config.eSupportedGLSLVersion = GLSL_330;
|
||||
g_ogl_config.eSupportedGLSLVersion = Glsl330;
|
||||
}
|
||||
else if (GLExtensions::Version() >= 430)
|
||||
{
|
||||
// TODO: We should really parse the GL_SHADING_LANGUAGE_VERSION token.
|
||||
g_ogl_config.eSupportedGLSLVersion = GLSL_430;
|
||||
g_ogl_config.eSupportedGLSLVersion = Glsl430;
|
||||
g_ogl_config.bSupportsTextureStorage = true;
|
||||
g_ogl_config.bSupportsImageLoadStore = true;
|
||||
g_Config.backend_info.bSupportsSSAA = true;
|
||||
@ -643,7 +643,7 @@ Renderer::Renderer()
|
||||
}
|
||||
else
|
||||
{
|
||||
g_ogl_config.eSupportedGLSLVersion = GLSL_400;
|
||||
g_ogl_config.eSupportedGLSLVersion = Glsl400;
|
||||
g_Config.backend_info.bSupportsSSAA = true;
|
||||
|
||||
if (GLExtensions::Version() == 420)
|
||||
|
@ -15,31 +15,31 @@ namespace OGL
|
||||
{
|
||||
void ClearEFBCache();
|
||||
|
||||
enum GLSL_VERSION
|
||||
enum GlslVersion
|
||||
{
|
||||
GLSL_130,
|
||||
GLSL_140,
|
||||
GLSL_150,
|
||||
GLSL_330,
|
||||
GLSL_400, // and above
|
||||
GLSL_430,
|
||||
GLSLES_300, // GLES 3.0
|
||||
GLSLES_310, // GLES 3.1
|
||||
GLSLES_320, // GLES 3.2
|
||||
Glsl130,
|
||||
Glsl140,
|
||||
Glsl150,
|
||||
Glsl330,
|
||||
Glsl400, // and above
|
||||
Glsl430,
|
||||
GlslEs300, // GLES 3.0
|
||||
GlslEs310, // GLES 3.1
|
||||
GlslEs320, // GLES 3.2
|
||||
};
|
||||
enum class ES_TEXBUF_TYPE
|
||||
enum class EsTexbufType
|
||||
{
|
||||
TEXBUF_NONE,
|
||||
TEXBUF_CORE,
|
||||
TEXBUF_OES,
|
||||
TEXBUF_EXT
|
||||
TexbufNone,
|
||||
TexbufCore,
|
||||
TexbufOes,
|
||||
TexbufExt
|
||||
};
|
||||
|
||||
enum class ES_FB_FETCH_TYPE
|
||||
enum class EsFbFetchType
|
||||
{
|
||||
FB_FETCH_NONE,
|
||||
FB_FETCH_EXT,
|
||||
FB_FETCH_ARM,
|
||||
FbFetchNone,
|
||||
FbFetchExt,
|
||||
FbFetchArm,
|
||||
};
|
||||
|
||||
// ogl-only config, so not in VideoConfig.h
|
||||
@ -51,13 +51,13 @@ struct VideoConfig
|
||||
bool bSupportsGLBaseVertex;
|
||||
bool bSupportsGLBufferStorage;
|
||||
bool bSupportsMSAA;
|
||||
GLSL_VERSION eSupportedGLSLVersion;
|
||||
GlslVersion eSupportedGLSLVersion;
|
||||
bool bSupportViewportFloat;
|
||||
bool bSupportsAEP;
|
||||
bool bSupportsDebug;
|
||||
bool bSupportsCopySubImage;
|
||||
u8 SupportedESPointSize;
|
||||
ES_TEXBUF_TYPE SupportedESTextureBuffer;
|
||||
EsTexbufType SupportedESTextureBuffer;
|
||||
bool bSupportsTextureStorage;
|
||||
bool bSupports2DTextureStorageMultisample;
|
||||
bool bSupports3DTextureStorageMultisample;
|
||||
@ -66,7 +66,7 @@ struct VideoConfig
|
||||
bool bSupportsAniso;
|
||||
bool bSupportsBitfield;
|
||||
bool bSupportsTextureSubImage;
|
||||
ES_FB_FETCH_TYPE SupportedFramebufferFetch;
|
||||
EsFbFetchType SupportedFramebufferFetch;
|
||||
|
||||
const char* gl_vendor;
|
||||
const char* gl_renderer;
|
||||
|
Loading…
Reference in New Issue
Block a user