mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
Disabled GCC loop vectorization for R_LoadKVX() function
This prevents crash (unaligned memory access by SSE instruction) on loading voxels in Release (-O3) builds https://forum.zdoom.org/viewtopic.php?t=59656
This commit is contained in:
parent
7f17121df8
commit
53a9819283
1 changed files with 9 additions and 0 deletions
|
@ -180,6 +180,11 @@ static void RemapVoxelSlabs(kvxslab_t *dest, int size, const uint8_t *remap)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
|
#if defined __GNUC__ && !defined __clang__
|
||||||
|
#pragma GCC push_options
|
||||||
|
#pragma GCC optimize ("-fno-tree-loop-vectorize")
|
||||||
|
#endif // __GNUC__ && !__clang__
|
||||||
|
|
||||||
FVoxel *R_LoadKVX(int lumpnum)
|
FVoxel *R_LoadKVX(int lumpnum)
|
||||||
{
|
{
|
||||||
const kvxslab_t *slabs[MAXVOXMIPS];
|
const kvxslab_t *slabs[MAXVOXMIPS];
|
||||||
|
@ -320,6 +325,10 @@ FVoxel *R_LoadKVX(int lumpnum)
|
||||||
return voxel;
|
return voxel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined __GNUC__ && !defined __clang__
|
||||||
|
#pragma GCC pop_options
|
||||||
|
#endif // __GNUC__ && !__clang__
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue