VideoConfig: Add a field for indicating logic op support in the backend
This commit is contained in:
parent
3d44dc3981
commit
640bfb8135
|
@ -414,7 +414,10 @@ HRESULT Create(HWND wnd)
|
|||
|
||||
hr = device->QueryInterface<ID3D11Device1>(&device1);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN_LOG(VIDEO, "Missing Direct3D 11.1 support. Logical operations will not be supported.");
|
||||
g_Config.backend_info.bSupportsLogicOp = false;
|
||||
}
|
||||
|
||||
// BGRA textures are easier to deal with in TextureCache, but might not be supported
|
||||
UINT format_support;
|
||||
|
|
|
@ -62,6 +62,7 @@ void VideoBackend::InitBackendInfo()
|
|||
g_Config.backend_info.bSupportsClipControl = true;
|
||||
g_Config.backend_info.bSupportsDepthClamp = true;
|
||||
g_Config.backend_info.bSupportsReversedDepthRange = false;
|
||||
g_Config.backend_info.bSupportsLogicOp = true;
|
||||
g_Config.backend_info.bSupportsMultithreading = false;
|
||||
g_Config.backend_info.bSupportsGPUTextureDecoding = false;
|
||||
g_Config.backend_info.bSupportsST3CTextures = false;
|
||||
|
|
|
@ -47,6 +47,7 @@ void VideoBackend::InitBackendInfo()
|
|||
g_Config.backend_info.bSupportsBPTCTextures = false;
|
||||
g_Config.backend_info.bSupportsFramebufferFetch = false;
|
||||
g_Config.backend_info.bSupportsBackgroundCompiling = false;
|
||||
g_Config.backend_info.bSupportsLogicOp = false;
|
||||
|
||||
// aamodes: We only support 1 sample, so no MSAA
|
||||
g_Config.backend_info.Adapters.clear();
|
||||
|
|
|
@ -521,6 +521,9 @@ Renderer::Renderer()
|
|||
// depth clamping.
|
||||
g_Config.backend_info.bSupportsDepthClamp = false;
|
||||
|
||||
// GLES does not support logic op.
|
||||
g_Config.backend_info.bSupportsLogicOp = false;
|
||||
|
||||
if (GLExtensions::Supports("GL_EXT_shader_framebuffer_fetch"))
|
||||
{
|
||||
g_ogl_config.SupportedFramebufferFetch = EsFbFetchType::FbFetchExt;
|
||||
|
|
|
@ -83,6 +83,7 @@ void VideoBackend::InitBackendInfo()
|
|||
g_Config.backend_info.bSupportsPostProcessing = true;
|
||||
g_Config.backend_info.bSupportsSSAA = true;
|
||||
g_Config.backend_info.bSupportsReversedDepthRange = true;
|
||||
g_Config.backend_info.bSupportsLogicOp = true;
|
||||
g_Config.backend_info.bSupportsMultithreading = false;
|
||||
g_Config.backend_info.bSupportsCopyToVram = true;
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ void VideoSoftware::InitBackendInfo()
|
|||
g_Config.backend_info.bSupportsCopyToVram = false;
|
||||
g_Config.backend_info.bSupportsFramebufferFetch = false;
|
||||
g_Config.backend_info.bSupportsBackgroundCompiling = false;
|
||||
g_Config.backend_info.bSupportsLogicOp = true;
|
||||
|
||||
// aamodes
|
||||
g_Config.backend_info.AAModes = {1};
|
||||
|
|
|
@ -246,6 +246,7 @@ void VulkanContext::PopulateBackendInfo(VideoConfig* config)
|
|||
config->backend_info.bSupportsST3CTextures = false; // Dependent on features.
|
||||
config->backend_info.bSupportsBPTCTextures = false; // Dependent on features.
|
||||
config->backend_info.bSupportsReversedDepthRange = false; // No support yet due to driver bugs.
|
||||
config->backend_info.bSupportsLogicOp = false; // Dependent on features.
|
||||
config->backend_info.bSupportsCopyToVram = true; // Assumed support.
|
||||
config->backend_info.bSupportsFramebufferFetch = false;
|
||||
}
|
||||
|
@ -272,6 +273,7 @@ void VulkanContext::PopulateBackendInfoFeatures(VideoConfig* config, VkPhysicalD
|
|||
config->backend_info.bSupportsBBox = config->backend_info.bSupportsFragmentStoresAndAtomics =
|
||||
(features.fragmentStoresAndAtomics == VK_TRUE);
|
||||
config->backend_info.bSupportsSSAA = (features.sampleRateShading == VK_TRUE);
|
||||
config->backend_info.bSupportsLogicOp = (features.logicOp == VK_TRUE);
|
||||
|
||||
// Disable geometry shader when shaderTessellationAndGeometryPointSize is not supported.
|
||||
// Seems this is needed for gl_Layer.
|
||||
|
|
|
@ -33,6 +33,7 @@ ShaderHostConfig ShaderHostConfig::GetCurrent()
|
|||
bits.backend_dynamic_sampler_indexing =
|
||||
g_ActiveConfig.backend_info.bSupportsDynamicSamplerIndexing;
|
||||
bits.backend_shader_framebuffer_fetch = g_ActiveConfig.backend_info.bSupportsFramebufferFetch;
|
||||
bits.backend_logic_op = g_ActiveConfig.backend_info.bSupportsLogicOp;
|
||||
return bits;
|
||||
}
|
||||
|
||||
|
|
|
@ -180,7 +180,8 @@ union ShaderHostConfig
|
|||
u32 backend_bitfield : 1;
|
||||
u32 backend_dynamic_sampler_indexing : 1;
|
||||
u32 backend_shader_framebuffer_fetch : 1;
|
||||
u32 pad : 11;
|
||||
u32 backend_logic_op : 1;
|
||||
u32 pad : 10;
|
||||
};
|
||||
|
||||
static ShaderHostConfig GetCurrent();
|
||||
|
|
|
@ -201,6 +201,7 @@ struct VideoConfig final
|
|||
bool bSupportsFragmentStoresAndAtomics; // a.k.a. OpenGL SSBOs a.k.a. Direct3D UAVs
|
||||
bool bSupportsDepthClamp; // Needed by VertexShaderGen, so must stay in VideoCommon
|
||||
bool bSupportsReversedDepthRange;
|
||||
bool bSupportsLogicOp;
|
||||
bool bSupportsMultithreading;
|
||||
bool bSupportsGPUTextureDecoding;
|
||||
bool bSupportsST3CTextures;
|
||||
|
|
Loading…
Reference in New Issue