VideoConfig: Add bool for sampler LOD bias support
This commit is contained in:
parent
6dae4043cb
commit
08396c56e5
|
@ -109,6 +109,7 @@ void VideoBackend::FillBackendInfo()
|
|||
g_Config.backend_info.bSupportsPipelineCacheData = false;
|
||||
g_Config.backend_info.bSupportsCoarseDerivatives = true;
|
||||
g_Config.backend_info.bSupportsTextureQueryLevels = true;
|
||||
g_Config.backend_info.bSupportsLodBiasInSampler = true;
|
||||
g_Config.backend_info.bSupportsLogicOp = D3D::SupportsLogicOp(g_Config.iAdapter);
|
||||
|
||||
g_Config.backend_info.Adapters = D3DCommon::GetAdapterNames();
|
||||
|
|
|
@ -85,6 +85,7 @@ void VideoBackend::FillBackendInfo()
|
|||
g_Config.backend_info.bSupportsPipelineCacheData = true;
|
||||
g_Config.backend_info.bSupportsCoarseDerivatives = true;
|
||||
g_Config.backend_info.bSupportsTextureQueryLevels = true;
|
||||
g_Config.backend_info.bSupportsLodBiasInSampler = true;
|
||||
|
||||
// We can only check texture support once we have a device.
|
||||
if (g_dx_context)
|
||||
|
|
|
@ -58,6 +58,7 @@ void VideoBackend::InitBackendInfo()
|
|||
g_Config.backend_info.bSupportsPipelineCacheData = false;
|
||||
g_Config.backend_info.bSupportsCoarseDerivatives = false;
|
||||
g_Config.backend_info.bSupportsTextureQueryLevels = false;
|
||||
g_Config.backend_info.bSupportsLodBiasInSampler = false;
|
||||
|
||||
// aamodes: We only support 1 sample, so no MSAA
|
||||
g_Config.backend_info.Adapters.clear();
|
||||
|
|
|
@ -93,6 +93,7 @@ void VideoBackend::InitBackendInfo()
|
|||
g_Config.backend_info.bSupportsPartialDepthCopies = true;
|
||||
g_Config.backend_info.bSupportsShaderBinaries = false;
|
||||
g_Config.backend_info.bSupportsPipelineCacheData = false;
|
||||
g_Config.backend_info.bSupportsLodBiasInSampler = true;
|
||||
|
||||
// TODO: There is a bug here, if texel buffers or SSBOs/atomics are not supported the graphics
|
||||
// options will show the option when it is not supported. The only way around this would be
|
||||
|
|
|
@ -513,6 +513,9 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
|||
// ARB_get_texture_sub_image (unlikely, except maybe on NVIDIA), we can use that instead.
|
||||
g_Config.backend_info.bSupportsDepthReadback = g_ogl_config.bSupportsTextureSubImage;
|
||||
|
||||
// GL_TEXTURE_LOD_BIAS is not supported on GLES.
|
||||
g_Config.backend_info.bSupportsLodBiasInSampler = false;
|
||||
|
||||
if (GLExtensions::Supports("GL_EXT_shader_framebuffer_fetch"))
|
||||
{
|
||||
g_ogl_config.SupportedFramebufferFetch = EsFbFetchType::FbFetchExt;
|
||||
|
|
|
@ -87,6 +87,7 @@ void VideoSoftware::InitBackendInfo()
|
|||
g_Config.backend_info.bSupportsBBox = true;
|
||||
g_Config.backend_info.bSupportsCoarseDerivatives = false;
|
||||
g_Config.backend_info.bSupportsTextureQueryLevels = false;
|
||||
g_Config.backend_info.bSupportsLodBiasInSampler = false;
|
||||
|
||||
// aamodes
|
||||
g_Config.backend_info.AAModes = {1};
|
||||
|
|
|
@ -289,6 +289,7 @@ void VulkanContext::PopulateBackendInfo(VideoConfig* config)
|
|||
config->backend_info.bSupportsFramebufferFetch = false; // Dependent on OS and features.
|
||||
config->backend_info.bSupportsCoarseDerivatives = true; // Assumed support.
|
||||
config->backend_info.bSupportsTextureQueryLevels = true; // Assumed support.
|
||||
config->backend_info.bSupportsLodBiasInSampler = false; // Dependent on OS.
|
||||
}
|
||||
|
||||
void VulkanContext::PopulateBackendInfoAdapters(VideoConfig* config, const GPUList& gpu_list)
|
||||
|
@ -316,6 +317,13 @@ void VulkanContext::PopulateBackendInfoFeatures(VideoConfig* config, VkPhysicalD
|
|||
config->backend_info.bSupportsSSAA = (features.sampleRateShading == VK_TRUE);
|
||||
config->backend_info.bSupportsLogicOp = (features.logicOp == VK_TRUE);
|
||||
|
||||
#ifdef __APPLE__
|
||||
// Metal doesn't support this.
|
||||
config->backend_info.bSupportsLodBiasInSampler = false;
|
||||
#else
|
||||
config->backend_info.bSupportsLodBiasInSampler = true;
|
||||
#endif
|
||||
|
||||
// Disable geometry shader when shaderTessellationAndGeometryPointSize is not supported.
|
||||
// Seems this is needed for gl_Layer.
|
||||
if (!features.shaderTessellationAndGeometryPointSize)
|
||||
|
|
|
@ -233,6 +233,7 @@ struct VideoConfig final
|
|||
bool bSupportsPipelineCacheData = false;
|
||||
bool bSupportsCoarseDerivatives = false;
|
||||
bool bSupportsTextureQueryLevels = false;
|
||||
bool bSupportsLodBiasInSampler = false;
|
||||
} backend_info;
|
||||
|
||||
// Utility
|
||||
|
|
Loading…
Reference in New Issue