GPU: Add HQ normals workaround.

This change makes it possible for platforms to only support high quality
normal rendering. This is part of {T82856} where current AMD drivers
running on the polaris architecture does not support the low quality
setting due to a driver bug.

In a next commit the work around will be enabled.
This commit is contained in:
2021-01-04 11:41:54 +01:00
parent 02d1f1482a
commit a3fcbb54f4
7 changed files with 19 additions and 6 deletions

View File

@@ -43,6 +43,7 @@ int GPU_texture_size_with_limit(int res);
bool GPU_mip_render_workaround(void);
bool GPU_depth_blitting_workaround(void);
bool GPU_use_main_context_workaround(void);
bool GPU_use_hq_normals_workaround(void);
bool GPU_crappy_amd_driver(void);
bool GPU_shader_image_load_store_support(void);

View File

@@ -102,6 +102,11 @@ bool GPU_crappy_amd_driver(void)
return GCaps.broken_amd_driver;
}
bool GPU_use_hq_normals_workaround(void)
{
return GCaps.use_hq_normals_workaround;
}
bool GPU_shader_image_load_store_support(void)
{
return GCaps.shader_image_load_store_support;

View File

@@ -48,6 +48,7 @@ struct GPUCapabilities {
bool depth_blitting_workaround = false;
bool use_main_context_workaround = false;
bool broken_amd_driver = false;
bool use_hq_normals_workaround = false;
/* Vulkan related workarounds. */
};