diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-04-07 23:51:21 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-04-07 23:51:31 +0300 |
commit | 5dd855102130bfbc140cbe334a8f79c309e4a5c5 (patch) | |
tree | bfb3420b7f7abbe41240c613efbf253ade8f098e /source/blender/draw/engines/overlay | |
parent | d197e272bb711ce271106c1da01e89b2c431200b (diff) |
Fix T97144 Overlay: Illegal recursive expansion of macros
Was caused by the shaderCreateInfo port.
Diffstat (limited to 'source/blender/draw/engines/overlay')
3 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/draw/engines/overlay/shaders/edit_mesh_geom.glsl b/source/blender/draw/engines/overlay/shaders/edit_mesh_geom.glsl index 65615524927..82f957b2071 100644 --- a/source/blender/draw/engines/overlay/shaders/edit_mesh_geom.glsl +++ b/source/blender/draw/engines/overlay/shaders/edit_mesh_geom.glsl @@ -46,7 +46,7 @@ void main() vec2 line = ss_pos[0] - ss_pos[1]; line = abs(line) * sizeViewport.xy; - geometry_out.finalColorOuter = geometry_in[0].finalColorOuter; + geometry_out.finalColorOuter = geometry_in[0].finalColorOuter_; float half_size = sizeEdge; /* Enlarge edge for flag display. */ half_size += (geometry_out.finalColorOuter.a > 0.0) ? max(sizeEdge, 1.0) : 0.0; @@ -64,12 +64,12 @@ void main() /* Due to an AMD glitch, this line was moved out of the `do_vertex` * function (see T62792). */ view_clipping_distances_set(gl_in[0]); - do_vertex(geometry_in[0].finalColor, pos0, half_size, edge_ofs.xy); - do_vertex(geometry_in[0].finalColor, pos0, -half_size, -edge_ofs.xy); + do_vertex(geometry_in[0].finalColor_, pos0, half_size, edge_ofs.xy); + do_vertex(geometry_in[0].finalColor_, pos0, -half_size, -edge_ofs.xy); view_clipping_distances_set(gl_in[1]); - vec4 final_color = (geometry_in[0].selectOverride == 0) ? geometry_in[1].finalColor : - geometry_in[0].finalColor; + vec4 final_color = (geometry_in[0].selectOverride_ == 0) ? geometry_in[1].finalColor_ : + geometry_in[0].finalColor_; do_vertex(final_color, pos1, half_size, edge_ofs.xy); do_vertex(final_color, pos1, -half_size, -edge_ofs.xy); diff --git a/source/blender/draw/engines/overlay/shaders/edit_mesh_vert.glsl b/source/blender/draw/engines/overlay/shaders/edit_mesh_vert.glsl index 77826e26c8a..166ac1a37b0 100644 --- a/source/blender/draw/engines/overlay/shaders/edit_mesh_vert.glsl +++ b/source/blender/draw/engines/overlay/shaders/edit_mesh_vert.glsl @@ -5,9 +5,9 @@ #ifdef EDGE /* Ugly but needed to keep the same vertex shader code for other passes. */ -# define finalColor geometry_in.finalColor -# define finalColorOuter geometry_in.finalColorOuter -# define selectOverride geometry_in.selectOverride +# define finalColor geometry_in.finalColor_ +# define finalColorOuter geometry_in.finalColorOuter_ +# define selectOverride geometry_in.selectOverride_ #endif bool test_occlusion() diff --git a/source/blender/draw/engines/overlay/shaders/infos/edit_mode_info.hh b/source/blender/draw/engines/overlay/shaders/infos/edit_mode_info.hh index c756b9473a3..f1acb1c3f3c 100644 --- a/source/blender/draw/engines/overlay/shaders/infos/edit_mode_info.hh +++ b/source/blender/draw/engines/overlay/shaders/infos/edit_mode_info.hh @@ -36,9 +36,9 @@ GPU_SHADER_CREATE_INFO(overlay_edit_mesh_vert) .additional_info("overlay_edit_mesh_common"); GPU_SHADER_INTERFACE_INFO(overlay_edit_mesh_edge_iface, "geometry_in") - .smooth(Type::VEC4, "finalColor") - .smooth(Type::VEC4, "finalColorOuter") - .smooth(Type::INT, "selectOverride"); + .smooth(Type::VEC4, "finalColor_") + .smooth(Type::VEC4, "finalColorOuter_") + .smooth(Type::INT, "selectOverride_"); GPU_SHADER_INTERFACE_INFO(overlay_edit_mesh_edge_geom_iface, "geometry_out") .smooth(Type::VEC4, "finalColor") |