Fix #137329: Overlay: Cursor not always visible

On certain platforms the 3d cursor wasn't visible. The reason was that
the shader read garbage in `gpu_attr_1_fetch_unorm8` and interpreted the
data to be packed, resulting in loading incorrect colors.

Pull Request: https://projects.blender.org/blender/blender/pulls/137336
This commit is contained in:
Jeroen Bakker
2025-04-11 13:59:17 +02:00
parent b8f77fbc06
commit a2338e3eca

View File

@@ -90,6 +90,7 @@ class Cursor : Overlay {
/* WORKAROUND: This is normally set by the GPUBatch or IMM API but we don't use them here.
* So make sure it is set otherwise it can be in undefined state (see #136911). */
pass.push_constant("gpu_attr_0_fetch_int", false);
pass.push_constant("gpu_attr_1_fetch_unorm8", false);
/* See `polyline_draw_workaround`. */
int3 vert_stride_count_line = {2, 9999 /* Doesn't matter. */, 0};
int3 vert_stride_count_circle = {1, 9999 /* Doesn't matter. */, 0};