Skip to content
Snippets Groups Projects
Commit 2ebfbed8 authored by Clément Foucault's avatar Clément Foucault Committed by Clément Foucault
Browse files

Fix #128079: Grease Pencil stroke direction overlay missing on 4.2 LTS

Caused by the wrong uniform function being called.

This was not creating issue on opengl because sizeof(bool) is
4 for uniform boolean. But on metal, the boolean are packed
in 1 byte each which was triggering an assert and Undefined
behavior.

To be landed in 4.2. The 4.3 doesn't have GPv2 overlays.

Pull Request: https://projects.blender.org/blender/blender/pulls/129307
parent 8256ec6d
No related branches found
No related tags found
No related merge requests found
...@@ -347,7 +347,7 @@ static void OVERLAY_edit_gpencil_cache_populate(OVERLAY_Data *vedata, Object *ob ...@@ -347,7 +347,7 @@ static void OVERLAY_edit_gpencil_cache_populate(OVERLAY_Data *vedata, Object *ob
const bool show_direction = (v3d->gp_flag & V3D_GP_SHOW_STROKE_DIRECTION) != 0; const bool show_direction = (v3d->gp_flag & V3D_GP_SHOW_STROKE_DIRECTION) != 0;
DRWShadingGroup *grp = DRW_shgroup_create_sub(pd->edit_gpencil_points_grp); DRWShadingGroup *grp = DRW_shgroup_create_sub(pd->edit_gpencil_points_grp);
DRW_shgroup_uniform_float_copy(grp, "doStrokeEndpoints", show_direction); DRW_shgroup_uniform_bool_copy(grp, "doStrokeEndpoints", show_direction);
blender::gpu::Batch *geom = DRW_cache_gpencil_edit_points_get(ob, pd->cfra); blender::gpu::Batch *geom = DRW_cache_gpencil_edit_points_get(ob, pd->cfra);
DRW_shgroup_call_no_cull(grp, geom, ob); DRW_shgroup_call_no_cull(grp, geom, ob);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment