diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-01-04 13:41:54 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-01-04 14:19:51 +0300 |
commit | a3fcbb54f4b0dac7f9104d5f45c8540e9764e46d (patch) | |
tree | 8ee6b349055ebfdee6e296d02555d0276599868b /source/blender/draw/intern/draw_cache_impl_curve.c | |
parent | 02d1f1482a5e225bbb8195c04eaece1514aa97d1 (diff) |
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.
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_curve.c')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_curve.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_curve.c b/source/blender/draw/intern/draw_cache_impl_curve.c index b9585aec0b2..3ccada23d47 100644 --- a/source/blender/draw/intern/draw_cache_impl_curve.c +++ b/source/blender/draw/intern/draw_cache_impl_curve.c @@ -36,6 +36,7 @@ #include "BKE_font.h" #include "GPU_batch.h" +#include "GPU_capabilities.h" #include "GPU_material.h" #include "GPU_texture.h" @@ -634,11 +635,11 @@ static void curve_create_edit_curves_nor(CurveRenderData *rdata, GPUVertBuf *vbo_curves_nor, const Scene *scene) { - 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(); static GPUVertFormat format = {0}; static GPUVertFormat format_hq = {0}; - /* TODO(jeroen): add support for high quality normals */ static struct { uint pos, nor, tan, rad; uint pos_hq, nor_hq, tan_hq, rad_hq; |