diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-05-01 23:26:54 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-05-01 23:28:38 +0300 |
commit | 3f0c09f6ddde9ba0f995eb3d7e088bd650112891 (patch) | |
tree | c85cdbb894b0e6d9fee616e956590174cd057209 /source/blender/draw/engines | |
parent | fc872d738ef1526fd251f073c1a495344360a667 (diff) |
GPUShaderCreateInfo: Add validation for overlapping vertex attribute
Those are usually not supported but some driver silently fix them and most
just silently fail (rendering error).
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r-- | source/blender/draw/engines/overlay/shaders/infos/armature_info.hh | 4 | ||||
-rw-r--r-- | source/blender/draw/engines/overlay/shaders/infos/extra_info.hh | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/draw/engines/overlay/shaders/infos/armature_info.hh b/source/blender/draw/engines/overlay/shaders/infos/armature_info.hh index f417fbe1fd4..d89272a50cf 100644 --- a/source/blender/draw/engines/overlay/shaders/infos/armature_info.hh +++ b/source/blender/draw/engines/overlay/shaders/infos/armature_info.hh @@ -43,8 +43,8 @@ GPU_SHADER_CREATE_INFO(overlay_armature_sphere_solid) .do_static_compilation(true) .vertex_in(0, Type::VEC2, "pos") /* Per instance. */ - .vertex_in(1, Type::MAT4, "inst_obmat") - .vertex_in(2, Type::VEC4, "color") + .vertex_in(1, Type::VEC4, "color") + .vertex_in(2, Type::MAT4, "inst_obmat") // .depth_layout(DepthLayout::GREATER) /* TODO */ .vertex_out(overlay_armature_sphere_solid_iface) .vertex_source("armature_sphere_solid_vert.glsl") diff --git a/source/blender/draw/engines/overlay/shaders/infos/extra_info.hh b/source/blender/draw/engines/overlay/shaders/infos/extra_info.hh index 1ab9ab3b23f..a765d881682 100644 --- a/source/blender/draw/engines/overlay/shaders/infos/extra_info.hh +++ b/source/blender/draw/engines/overlay/shaders/infos/extra_info.hh @@ -16,8 +16,8 @@ GPU_SHADER_CREATE_INFO(overlay_extra) .vertex_in(0, Type::VEC3, "pos") .vertex_in(1, Type::INT, "vclass") /* Instance attributes. */ - .vertex_in(2, Type::MAT4, "inst_obmat") - .vertex_in(3, Type::VEC4, "color") + .vertex_in(2, Type::VEC4, "color") + .vertex_in(3, Type::MAT4, "inst_obmat") .vertex_out(overlay_extra_iface) .fragment_out(0, Type::VEC4, "fragColor") .fragment_out(1, Type::VEC4, "lineOutput") |