From a3fcbb54f4b0dac7f9104d5f45c8540e9764e46d Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Mon, 4 Jan 2021 11:41:54 +0100 Subject: 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. --- source/blender/draw/intern/draw_cache_impl_volume.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/draw/intern/draw_cache_impl_volume.c') diff --git a/source/blender/draw/intern/draw_cache_impl_volume.c b/source/blender/draw/intern/draw_cache_impl_volume.c index e90282a269a..1119e0458a5 100644 --- a/source/blender/draw/intern/draw_cache_impl_volume.c +++ b/source/blender/draw/intern/draw_cache_impl_volume.c @@ -40,6 +40,7 @@ #include "BKE_volume_render.h" #include "GPU_batch.h" +#include "GPU_capabilities.h" #include "GPU_texture.h" #include "DEG_depsgraph_query.h" @@ -157,7 +158,8 @@ static void drw_volume_wireframe_cb( Scene *scene = data->scene; Volume *volume = data->volume; VolumeBatchCache *cache = volume->batch_cache; - const bool do_hq_normals = (scene->r.perf_flag & SCE_PERF_HQ_NORMALS) != 0; + const bool do_hq_normals = (scene->r.perf_flag & SCE_PERF_HQ_NORMALS) != 0 || + GPU_use_hq_normals_workaround(); /* Create vertex buffer. */ static GPUVertFormat format = {0}; -- cgit v1.2.3