Fix: GPU Incorrect Padding For Globals
A float array use different alignment and reservation rules on GPU versus CPU. Before this change the _pad1 was aligned to 16 bytes as it was defined as an array, but on CPU this alignment doesn't happen. This is fixed by using 3 floats in stead of a float array for padding. Pull Request: https://projects.blender.org/blender/blender/pulls/112565
This commit is contained in:
parent
2d70f46265
commit
39e6776689
|
@ -135,7 +135,7 @@ struct GlobalsUboStorage {
|
|||
float size_checker;
|
||||
float size_vertex_gpencil;
|
||||
float fresnel_mix_edit;
|
||||
float _pad[3];
|
||||
float _pad1, _pad2, _pad3;
|
||||
};
|
||||
BLI_STATIC_ASSERT_ALIGN(GlobalsUboStorage, 16)
|
||||
|
||||
|
|
Loading…
Reference in New Issue