mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-24 02:32:18 +00:00
Fixed compiling MOC on Linux
This commit is contained in:
parent
d34eaf0b09
commit
d747be22d6
4 changed files with 8 additions and 4 deletions
|
@ -2,4 +2,4 @@ cd ..
|
|||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DONATIVE=ON -DFFMPEG=OFF -DBINKDEC=ON -DUSE_PRECOMPILED_HEADERS=OFF -DUSE_INTRINSICS_SSE=OFF ../neo
|
||||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DONATIVE=ON -DFFMPEG=OFF -DBINKDEC=ON -DUSE_PRECOMPILED_HEADERS=OFF -DUSE_INTRINSICS_SSE=ON ../neo
|
||||
|
|
|
@ -77,6 +77,8 @@
|
|||
free(ptr);
|
||||
}
|
||||
|
||||
// RB: commented out
|
||||
#if 0
|
||||
FORCE_INLINE void __cpuidex(int* cpuinfo, int function, int subfunction)
|
||||
{
|
||||
__cpuid_count(function, subfunction, cpuinfo[0], cpuinfo[1], cpuinfo[2], cpuinfo[3]);
|
||||
|
@ -92,6 +94,7 @@
|
|||
);
|
||||
return ((unsigned long long)edx << 32) | eax;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
#error Unsupported compiler
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
#include "FrameRecorder.h"
|
||||
#endif
|
||||
|
||||
#if defined(__AVX__) || defined(__AVX2__)
|
||||
// RB: only check this on Windows and expect any Linux user to have a CPU newer than 2013
|
||||
#if defined(_MSC_VER) && ( defined(__AVX__) || defined(__AVX2__) )
|
||||
// For performance reasons, the MaskedOcclusionCullingAVX2/512.cpp files should be compiled with VEX encoding for SSE instructions (to avoid
|
||||
// AVX-SSE transition penalties, see https://software.intel.com/en-us/articles/avoiding-avx-sse-transition-penalties). However, this file
|
||||
// _must_ be compiled without VEX encoding to allow backwards compatibility. Best practice is to use lowest supported target platform
|
||||
|
|
|
@ -551,7 +551,7 @@ void R_FillMaskedOcclusionBufferWithModels( viewDef_t* viewDef )
|
|||
static void TonemapDepth( float* depth, unsigned char* image, int w, int h )
|
||||
{
|
||||
// Find min/max w coordinate (discard cleared pixels)
|
||||
float minW = FLT_MAX, maxW = 0.0f;
|
||||
float minW = idMath::INFINITUM, maxW = 0.0f;
|
||||
for( int i = 0; i < w * h; ++i )
|
||||
{
|
||||
if( depth[i] > 0.0f )
|
||||
|
@ -608,4 +608,4 @@ CONSOLE_COMMAND( maskShot, "Dumping masked occlusion culling buffer", NULL )
|
|||
R_WritePNG( "screenshots/soft_occlusion_buffer.png", image, 3, width, height, "fs_basepath" );
|
||||
delete[] image;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue