diff --git a/neo/cmake-linux-release.sh b/neo/cmake-linux-release.sh index bbc8757e..12ab504e 100755 --- a/neo/cmake-linux-release.sh +++ b/neo/cmake-linux-release.sh @@ -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 diff --git a/neo/libs/moc/CompilerSpecific.inl b/neo/libs/moc/CompilerSpecific.inl index a6203ff9..8bf66301 100644 --- a/neo/libs/moc/CompilerSpecific.inl +++ b/neo/libs/moc/CompilerSpecific.inl @@ -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 diff --git a/neo/libs/moc/MaskedOcclusionCulling.cpp b/neo/libs/moc/MaskedOcclusionCulling.cpp index 043e6716..47255b67 100644 --- a/neo/libs/moc/MaskedOcclusionCulling.cpp +++ b/neo/libs/moc/MaskedOcclusionCulling.cpp @@ -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 diff --git a/neo/renderer/tr_frontend_masked_occlusion_culling.cpp b/neo/renderer/tr_frontend_masked_occlusion_culling.cpp index f4aead98..2751ee90 100644 --- a/neo/renderer/tr_frontend_masked_occlusion_culling.cpp +++ b/neo/renderer/tr_frontend_masked_occlusion_culling.cpp @@ -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 \ No newline at end of file +#endif