VideoConfig: Add bool for sampler LOD bias support

This commit is contained in:
OatmealDome
2021-08-06 23:26:51 -04:00
parent 6dae4043cb
commit 08396c56e5
8 changed files with 17 additions and 0 deletions

View File

@ -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)