Commit b75b2e8 1 parent 5a9d4fd commit b75b2e8 Copy full SHA for b75b2e8
File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1200,6 +1200,7 @@ struct ccl_align(16) ShaderData
1200
1200
struct ShaderClosure closure [MAX_CLOSURE ];
1201
1201
};
1202
1202
1203
+ #ifdef __KERNEL_GPU__
1203
1204
/* ShaderDataTinyStorage needs the same alignment as ShaderData, or else
1204
1205
* the pointer cast in AS_SHADER_DATA invokes undefined behavior. */
1205
1206
struct ccl_align (16 ) ShaderDataTinyStorage
@@ -1213,6 +1214,11 @@ struct ccl_align(16) ShaderDataCausticsStorage
1213
1214
{
1214
1215
char pad [sizeof (ShaderData ) - sizeof (ShaderClosure ) * (MAX_CLOSURE - CAUSTICS_MAX_CLOSURE )];
1215
1216
};
1217
+ #else
1218
+ /* On the CPU use full size, to avoid compiler and ASAN warnings. */
1219
+ using ShaderDataTinyStorage = ShaderData ;
1220
+ using ShaderDataCausticsStorage = ShaderData ;
1221
+ #endif
1216
1222
1217
1223
#define AS_SHADER_DATA (shader_data_tiny_storage ) \
1218
1224
((ccl_private ShaderData *)shader_data_tiny_storage)
You can’t perform that action at this time.
0 commit comments