Fix #130456: GP Render engine crash due to C/C++ mix
1d48d842 introduced a float4x4 matrix in the GPencil render data, but that
struct must be trivially initializable. Use a conventional C matrix to avoid
crashes.
Pull Request: https://projects.blender.org/blender/blender/pulls/130468
This commit is contained in:
committed by
Clément Foucault
parent
5ddf8a6495
commit
8e8d21a8ca
@@ -262,7 +262,7 @@ typedef struct GPENCIL_PrivateData {
|
||||
bool draw_wireframe;
|
||||
/* Used by the depth merge step. */
|
||||
int is_stroke_order_3d;
|
||||
float4x4 object_bound_mat;
|
||||
float object_bound_mat[4][4];
|
||||
/* Used for computing object distance to camera. */
|
||||
float camera_z_axis[3], camera_z_offset;
|
||||
float camera_pos[3];
|
||||
|
||||
@@ -279,7 +279,7 @@ void GPENCIL_cache_init(void *ved)
|
||||
pass.shader_set(GPENCIL_shader_depth_merge_get());
|
||||
pass.bind_texture("depthBuf", &pd->depth_tx);
|
||||
pass.push_constant("strokeOrder3d", &pd->is_stroke_order_3d);
|
||||
pass.push_constant("gpModelMatrix", &pd->object_bound_mat);
|
||||
pass.push_constant("gpModelMatrix", float4x4(pd->object_bound_mat));
|
||||
pass.draw_procedural(GPU_PRIM_TRIS, 1, 3);
|
||||
}
|
||||
{
|
||||
@@ -836,7 +836,7 @@ static void GPENCIL_draw_object(GPENCIL_Data *vedata, GPENCIL_tObject *ob)
|
||||
manager->submit(*vfx->vfx_ps);
|
||||
}
|
||||
|
||||
pd->object_bound_mat = float4x4(ob->plane_mat);
|
||||
copy_m4_m4(pd->object_bound_mat, ob->plane_mat);
|
||||
pd->is_stroke_order_3d = ob->is_drawmode3d;
|
||||
|
||||
if (pd->scene_fb) {
|
||||
|
||||
Reference in New Issue
Block a user