1
1

GPU: Add packed_int3 for SSBO/UBO struct alignment

MSL require to use packed_int3 for compatibility
with GLSL memory layout.
This commit is contained in:
2023-05-23 12:17:01 +02:00
parent 4997748e5e
commit 07c59041ac

View File

@@ -60,6 +60,7 @@
# define bool3 bvec3
# define bool4 bvec4
# define packed_float3 vec3
# define packed_int3 int3
# endif
#else /* C / C++ */
@@ -85,6 +86,7 @@ using bool2 = blender::int2;
using bool3 = blender::int3;
using bool4 = blender::int4;
using packed_float3 = blender::float3;
using packed_int3 = blender::int3;
# else /* C */
typedef float float2[2];
@@ -102,6 +104,7 @@ typedef int bool2[2];
typedef int bool3[2];
typedef int bool4[4];
typedef float3 packed_float3;
typedef int3 packed_int3;
# endif
#endif