Commit: 41733a9c08ee256293b13f4a370fc09adb915ae1
Author: Miguel Pozo
Date:   Sun Nov 27 14:40:00 2022 +0100
Branches: blender-v3.4-release
https://developer.blender.org/rB41733a9c08ee256293b13f4a370fc09adb915ae1

Fix T102773 & T102777: Regressions in GPU Subdivision

Introduced in D16420.
SHADER_BUFFER_TRIS and SHADER_BUFFER_TRIS_MULTIPLE_MATERIALS flags were 
accidentally swapped.

===================================================================

M       source/blender/draw/intern/draw_cache_impl_subdivision.cc

===================================================================

diff --git a/source/blender/draw/intern/draw_cache_impl_subdivision.cc 
b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
index b99075b1edd..4a3ab9f4e38 100644
--- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc
+++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
@@ -289,11 +289,11 @@ static GPUShader *get_subdiv_shader(int shader_type)
     if (ELEM(shader_type,
              SHADER_BUFFER_LINES,
              SHADER_BUFFER_LNOR,
-             SHADER_BUFFER_TRIS,
+             SHADER_BUFFER_TRIS_MULTIPLE_MATERIALS,
              SHADER_BUFFER_UV_STRETCH_AREA)) {
       defines = "#define SUBDIV_POLYGON_OFFSET\n";
     }
-    else if (shader_type == SHADER_BUFFER_TRIS_MULTIPLE_MATERIALS) {
+    else if (shader_type == SHADER_BUFFER_TRIS) {
       defines =
           "#define SUBDIV_POLYGON_OFFSET\n"
           "#define SINGLE_MATERIAL\n";

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to