mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
VideoConfig: add bSupportsFragmentStoresAndAtomics
This commit is contained in:
parent
8e6d256722
commit
de940a5fd6
@ -239,6 +239,8 @@ void DolphinAnalytics::MakePerGameBuilder()
|
|||||||
builder.AddData("gpu-has-early-z", g_Config.backend_info.bSupportsEarlyZ);
|
builder.AddData("gpu-has-early-z", g_Config.backend_info.bSupportsEarlyZ);
|
||||||
builder.AddData("gpu-has-binding-layout", g_Config.backend_info.bSupportsBindingLayout);
|
builder.AddData("gpu-has-binding-layout", g_Config.backend_info.bSupportsBindingLayout);
|
||||||
builder.AddData("gpu-has-bbox", g_Config.backend_info.bSupportsBBox);
|
builder.AddData("gpu-has-bbox", g_Config.backend_info.bSupportsBBox);
|
||||||
|
builder.AddData("gpu-has-fragment-stores-and-atomics",
|
||||||
|
g_Config.backend_info.bSupportsFragmentStoresAndAtomics);
|
||||||
builder.AddData("gpu-has-gs-instancing", g_Config.backend_info.bSupportsGSInstancing);
|
builder.AddData("gpu-has-gs-instancing", g_Config.backend_info.bSupportsGSInstancing);
|
||||||
builder.AddData("gpu-has-post-processing", g_Config.backend_info.bSupportsPostProcessing);
|
builder.AddData("gpu-has-post-processing", g_Config.backend_info.bSupportsPostProcessing);
|
||||||
builder.AddData("gpu-has-palette-conversion", g_Config.backend_info.bSupportsPaletteConversion);
|
builder.AddData("gpu-has-palette-conversion", g_Config.backend_info.bSupportsPaletteConversion);
|
||||||
|
@ -112,7 +112,8 @@ void VideoBackend::InitBackendInfo()
|
|||||||
g_Config.backend_info.bSupportsEarlyZ = shader_model_5_supported;
|
g_Config.backend_info.bSupportsEarlyZ = shader_model_5_supported;
|
||||||
|
|
||||||
// Requires full UAV functionality (only available in shader model 5)
|
// Requires full UAV functionality (only available in shader model 5)
|
||||||
g_Config.backend_info.bSupportsBBox = shader_model_5_supported;
|
g_Config.backend_info.bSupportsBBox =
|
||||||
|
g_Config.backend_info.bSupportsFragmentStoresAndAtomics = shader_model_5_supported;
|
||||||
|
|
||||||
// Requires the instance attribute (only available in shader model 5)
|
// Requires the instance attribute (only available in shader model 5)
|
||||||
g_Config.backend_info.bSupportsGSInstancing = shader_model_5_supported;
|
g_Config.backend_info.bSupportsGSInstancing = shader_model_5_supported;
|
||||||
|
@ -120,7 +120,8 @@ void VideoBackend::InitBackendInfo()
|
|||||||
g_Config.backend_info.bSupportsEarlyZ = true;
|
g_Config.backend_info.bSupportsEarlyZ = true;
|
||||||
|
|
||||||
// Requires full UAV functionality (only available in shader model 5)
|
// Requires full UAV functionality (only available in shader model 5)
|
||||||
g_Config.backend_info.bSupportsBBox = true;
|
g_Config.backend_info.bSupportsBBox =
|
||||||
|
g_Config.backend_info.bSupportsFragmentStoresAndAtomics = true;
|
||||||
|
|
||||||
// Requires the instance attribute (only available in shader model 5)
|
// Requires the instance attribute (only available in shader model 5)
|
||||||
g_Config.backend_info.bSupportsGSInstancing = true;
|
g_Config.backend_info.bSupportsGSInstancing = true;
|
||||||
|
@ -17,7 +17,7 @@ namespace OGL
|
|||||||
{
|
{
|
||||||
void BoundingBox::Init()
|
void BoundingBox::Init()
|
||||||
{
|
{
|
||||||
if (g_ActiveConfig.backend_info.bSupportsBBox)
|
if (g_ActiveConfig.backend_info.bSupportsFragmentStoresAndAtomics)
|
||||||
{
|
{
|
||||||
int initial_values[4] = {0, 0, 0, 0};
|
int initial_values[4] = {0, 0, 0, 0};
|
||||||
glGenBuffers(1, &s_bbox_buffer_id);
|
glGenBuffers(1, &s_bbox_buffer_id);
|
||||||
@ -29,8 +29,10 @@ void BoundingBox::Init()
|
|||||||
|
|
||||||
void BoundingBox::Shutdown()
|
void BoundingBox::Shutdown()
|
||||||
{
|
{
|
||||||
if (g_ActiveConfig.backend_info.bSupportsBBox)
|
if (g_ActiveConfig.backend_info.bSupportsFragmentStoresAndAtomics)
|
||||||
|
{
|
||||||
glDeleteBuffers(1, &s_bbox_buffer_id);
|
glDeleteBuffers(1, &s_bbox_buffer_id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoundingBox::Set(int index, int value)
|
void BoundingBox::Set(int index, int value)
|
||||||
|
@ -618,7 +618,7 @@ void ProgramShaderCache::CreateHeader()
|
|||||||
"#define SAMPLER_BINDING(x)\n",
|
"#define SAMPLER_BINDING(x)\n",
|
||||||
// Input/output blocks are matched by name during program linking
|
// Input/output blocks are matched by name during program linking
|
||||||
"#define VARYING_LOCATION(x)\n",
|
"#define VARYING_LOCATION(x)\n",
|
||||||
!is_glsles && g_ActiveConfig.backend_info.bSupportsBBox ?
|
!is_glsles && g_ActiveConfig.backend_info.bSupportsFragmentStoresAndAtomics ?
|
||||||
"#extension GL_ARB_shader_storage_buffer_object : enable" :
|
"#extension GL_ARB_shader_storage_buffer_object : enable" :
|
||||||
"",
|
"",
|
||||||
v < GLSL_400 && g_ActiveConfig.backend_info.bSupportsGSInstancing ?
|
v < GLSL_400 && g_ActiveConfig.backend_info.bSupportsGSInstancing ?
|
||||||
|
@ -411,7 +411,7 @@ Renderer::Renderer()
|
|||||||
g_Config.backend_info.bSupportsPrimitiveRestart =
|
g_Config.backend_info.bSupportsPrimitiveRestart =
|
||||||
!DriverDetails::HasBug(DriverDetails::BUG_PRIMITIVE_RESTART) &&
|
!DriverDetails::HasBug(DriverDetails::BUG_PRIMITIVE_RESTART) &&
|
||||||
((GLExtensions::Version() >= 310) || GLExtensions::Supports("GL_NV_primitive_restart"));
|
((GLExtensions::Version() >= 310) || GLExtensions::Supports("GL_NV_primitive_restart"));
|
||||||
g_Config.backend_info.bSupportsBBox =
|
g_Config.backend_info.bSupportsBBox = g_Config.backend_info.bSupportsFragmentStoresAndAtomics =
|
||||||
GLExtensions::Supports("GL_ARB_shader_storage_buffer_object");
|
GLExtensions::Supports("GL_ARB_shader_storage_buffer_object");
|
||||||
g_Config.backend_info.bSupportsGSInstancing = GLExtensions::Supports("GL_ARB_gpu_shader5");
|
g_Config.backend_info.bSupportsGSInstancing = GLExtensions::Supports("GL_ARB_gpu_shader5");
|
||||||
g_Config.backend_info.bSupportsSSAA = GLExtensions::Supports("GL_ARB_gpu_shader5") &&
|
g_Config.backend_info.bSupportsSSAA = GLExtensions::Supports("GL_ARB_gpu_shader5") &&
|
||||||
@ -498,6 +498,7 @@ Renderer::Renderer()
|
|||||||
g_Config.backend_info.bSupportsGeometryShaders && g_ogl_config.SupportedESPointSize > 0;
|
g_Config.backend_info.bSupportsGeometryShaders && g_ogl_config.SupportedESPointSize > 0;
|
||||||
g_Config.backend_info.bSupportsSSAA = g_ogl_config.bSupportsAEP;
|
g_Config.backend_info.bSupportsSSAA = g_ogl_config.bSupportsAEP;
|
||||||
g_Config.backend_info.bSupportsBBox = true;
|
g_Config.backend_info.bSupportsBBox = true;
|
||||||
|
g_Config.backend_info.bSupportsFragmentStoresAndAtomics = true;
|
||||||
g_ogl_config.bSupportsMSAA = true;
|
g_ogl_config.bSupportsMSAA = true;
|
||||||
g_ogl_config.bSupports2DTextureStorage = true;
|
g_ogl_config.bSupports2DTextureStorage = true;
|
||||||
if (g_ActiveConfig.iStereoMode > 0 && g_ActiveConfig.iMultisamples > 1 &&
|
if (g_ActiveConfig.iStereoMode > 0 && g_ActiveConfig.iMultisamples > 1 &&
|
||||||
@ -519,6 +520,7 @@ Renderer::Renderer()
|
|||||||
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.bSupportsBBox = true;
|
g_Config.backend_info.bSupportsBBox = true;
|
||||||
|
g_Config.backend_info.bSupportsFragmentStoresAndAtomics = true;
|
||||||
g_ogl_config.bSupportsCopySubImage = true;
|
g_ogl_config.bSupportsCopySubImage = true;
|
||||||
g_ogl_config.bSupportsGLBaseVertex = true;
|
g_ogl_config.bSupportsGLBaseVertex = true;
|
||||||
g_ogl_config.bSupportsDebug = true;
|
g_ogl_config.bSupportsDebug = true;
|
||||||
|
@ -240,6 +240,7 @@ void VulkanContext::PopulateBackendInfo(VideoConfig* config)
|
|||||||
config->backend_info.bSupportsGeometryShaders = false; // Dependent on features.
|
config->backend_info.bSupportsGeometryShaders = false; // Dependent on features.
|
||||||
config->backend_info.bSupportsGSInstancing = false; // Dependent on features.
|
config->backend_info.bSupportsGSInstancing = false; // Dependent on features.
|
||||||
config->backend_info.bSupportsBBox = false; // Dependent on features.
|
config->backend_info.bSupportsBBox = false; // Dependent on features.
|
||||||
|
config->backend_info.bSupportsFragmentStoresAndAtomics = false; // Dependent on features.
|
||||||
config->backend_info.bSupportsSSAA = false; // Dependent on features.
|
config->backend_info.bSupportsSSAA = false; // Dependent on features.
|
||||||
config->backend_info.bSupportsDepthClamp = false; // Dependent on features.
|
config->backend_info.bSupportsDepthClamp = false; // Dependent on features.
|
||||||
config->backend_info.bSupportsReversedDepthRange = false; // No support yet due to driver bugs.
|
config->backend_info.bSupportsReversedDepthRange = false; // No support yet due to driver bugs.
|
||||||
@ -264,7 +265,8 @@ void VulkanContext::PopulateBackendInfoFeatures(VideoConfig* config, VkPhysicalD
|
|||||||
config->backend_info.bSupportsDualSourceBlend = (features.dualSrcBlend == VK_TRUE);
|
config->backend_info.bSupportsDualSourceBlend = (features.dualSrcBlend == VK_TRUE);
|
||||||
config->backend_info.bSupportsGeometryShaders = (features.geometryShader == VK_TRUE);
|
config->backend_info.bSupportsGeometryShaders = (features.geometryShader == VK_TRUE);
|
||||||
config->backend_info.bSupportsGSInstancing = (features.geometryShader == VK_TRUE);
|
config->backend_info.bSupportsGSInstancing = (features.geometryShader == VK_TRUE);
|
||||||
config->backend_info.bSupportsBBox = (features.fragmentStoresAndAtomics == VK_TRUE);
|
config->backend_info.bSupportsBBox = config->backend_info.bSupportsFragmentStoresAndAtomics =
|
||||||
|
(features.fragmentStoresAndAtomics == VK_TRUE);
|
||||||
config->backend_info.bSupportsSSAA = (features.sampleRateShading == VK_TRUE);
|
config->backend_info.bSupportsSSAA = (features.sampleRateShading == VK_TRUE);
|
||||||
|
|
||||||
// Disable geometry shader when shaderTessellationAndGeometryPointSize is not supported.
|
// Disable geometry shader when shaderTessellationAndGeometryPointSize is not supported.
|
||||||
|
@ -172,6 +172,7 @@ PixelShaderUid GetPixelShaderUid()
|
|||||||
uid_data->genMode_numtexgens = bpmem.genMode.numtexgens;
|
uid_data->genMode_numtexgens = bpmem.genMode.numtexgens;
|
||||||
uid_data->per_pixel_lighting = g_ActiveConfig.bEnablePixelLighting;
|
uid_data->per_pixel_lighting = g_ActiveConfig.bEnablePixelLighting;
|
||||||
uid_data->bounding_box = g_ActiveConfig.backend_info.bSupportsBBox &&
|
uid_data->bounding_box = g_ActiveConfig.backend_info.bSupportsBBox &&
|
||||||
|
g_ActiveConfig.backend_info.bSupportsFragmentStoresAndAtomics &&
|
||||||
g_ActiveConfig.bBBoxEnable && BoundingBox::active;
|
g_ActiveConfig.bBBoxEnable && BoundingBox::active;
|
||||||
uid_data->rgba6_format =
|
uid_data->rgba6_format =
|
||||||
bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24 && !g_ActiveConfig.bForceTrueColor;
|
bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24 && !g_ActiveConfig.bForceTrueColor;
|
||||||
|
@ -189,6 +189,7 @@ struct VideoConfig final
|
|||||||
bool bSupportsPaletteConversion;
|
bool bSupportsPaletteConversion;
|
||||||
bool bSupportsClipControl; // Needed by VertexShaderGen, so must stay in VideoCommon
|
bool bSupportsClipControl; // Needed by VertexShaderGen, so must stay in VideoCommon
|
||||||
bool bSupportsSSAA;
|
bool bSupportsSSAA;
|
||||||
|
bool bSupportsFragmentStoresAndAtomics; // a.k.a. OpenGL SSBOs a.k.a. Direct3D UAVs
|
||||||
bool bSupportsDepthClamp; // Needed by VertexShaderGen, so must stay in VideoCommon
|
bool bSupportsDepthClamp; // Needed by VertexShaderGen, so must stay in VideoCommon
|
||||||
bool bSupportsReversedDepthRange;
|
bool bSupportsReversedDepthRange;
|
||||||
bool bSupportsMultithreading;
|
bool bSupportsMultithreading;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user