mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-05-31 00:41:38 +00:00
Updated ISPC instructions for Windows, Kubuntu and changed default to SS4
This commit is contained in:
parent
8f272bd3cb
commit
3e1121cebe
5 changed files with 31 additions and 9 deletions
|
@ -420,10 +420,12 @@ Existing repositories can be updated manually:
|
|||
3. Download and install the latest Vulkan SDK from LunarG: https://www.lunarg.com/vulkan-sdk/
|
||||
You can skip this step if you compile with DX12 only by adding -DUSE_VULKAN=OFF to the CMake options.
|
||||
|
||||
4. Generate the VS2022 projects using CMake by doubleclicking a matching configuration .bat file in the `DoomCode/neo/` folder.
|
||||
4. Download ISPC from https://github.com/ispc/ispc/releases and unpack the binary to `DoomCode/tools/ispc/bin/ispc.exe`
|
||||
|
||||
5. Generate the VS2022 projects using CMake by doubleclicking a matching configuration .bat file in the `DoomCode/neo/` folder.
|
||||
Recommended in this case is `cmake-vs2022-win64-no-ffmpeg.bat`
|
||||
|
||||
5. Use the VS2022 solution to compile what you need:
|
||||
6. Use the VS2022 solution to compile what you need:
|
||||
`DoomCode/build/RBDoom3BFG.sln`
|
||||
|
||||
|
||||
|
@ -447,7 +449,8 @@ Recommended in this case is `cmake-vs2022-win64-no-ffmpeg.bat`
|
|||
|
||||
On Debian or Ubuntu:
|
||||
|
||||
> sudo apt install cmake ispc libsdl2-dev libopenal-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libvulkan-dev libncurses-dev
|
||||
> sudo apt install cmake libsdl2-dev libopenal-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libvulkan-dev libncurses-dev
|
||||
> sudo snap install ispc
|
||||
|
||||
On Fedora
|
||||
|
||||
|
|
|
@ -446,14 +446,14 @@ endif()
|
|||
if(USE_INTRINSICS_SSE)
|
||||
add_subdirectory(libs/moc)
|
||||
set(MASKED_OCCLUSION_LIBRARY MaskedOcclusionCulling)
|
||||
|
||||
#set(ISPC_TEXCOMP_LIBRARY Compressonator_MD)
|
||||
#link_directories(${CMAKE_CURRENT_SOURCE_DIR}/libs/compressonator/lib)
|
||||
endif()
|
||||
|
||||
if(USE_INTRINSICS_SSE OR USE_INTRINSICS_NEON)
|
||||
add_subdirectory(libs/ispc_texcomp)
|
||||
set(ISPC_TEXCOMP_LIBRARY ispc_texcomp)
|
||||
|
||||
#set(ISPC_TEXCOMP_LIBRARY Compressonator_MD)
|
||||
#link_directories(${CMAKE_CURRENT_SOURCE_DIR}/libs/compressonator/lib)
|
||||
endif()
|
||||
|
||||
file(GLOB NATVIS_SOURCES .natvis)
|
||||
|
|
|
@ -6,7 +6,21 @@ cmake_minimum_required(VERSION 3.10)
|
|||
set(LIB_NAME ispc_texcomp)
|
||||
|
||||
# Find the ISPC compiler
|
||||
find_program(ISPC_EXECUTABLE ispc)
|
||||
if (MSVC)
|
||||
find_program(ISPC_EXECUTABLE
|
||||
NAMES ispc ispc.exe
|
||||
PATHS ${CMAKE_SOURCE_DIR}/../tools/ispc/bin
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
if (NOT ISPC_EXECUTABLE)
|
||||
find_program(ISPC_EXECUTABLE ispc)
|
||||
endif()
|
||||
|
||||
message(STATUS "Setting 'ISPC_EXECUTABLE' to '${ISPC_EXECUTABLE}'")
|
||||
else()
|
||||
find_program(ISPC_EXECUTABLE ispc)
|
||||
endif()
|
||||
|
||||
if(NOT ISPC_EXECUTABLE)
|
||||
message(FATAL_ERROR "ISPC compiler not found. Please install ISPC and ensure it is in the PATH.")
|
||||
endif()
|
||||
|
@ -36,7 +50,8 @@ if (USE_INTRINSICS_SSE)
|
|||
COMMAND ${ISPC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${ISPC_SOURCE}
|
||||
-o ${ISPC_OBJ}
|
||||
-h ${ISPC_HEADER}
|
||||
--target=avx2-i32x8 --arch=x86-64 ${ISPC_PIC}
|
||||
#--target=avx2-i32x8 --arch=x86-64 ${ISPC_PIC}
|
||||
--target=sse4-i32x4 --arch=x86-64 ${ISPC_PIC} # supports more CPUs beginning from 2008
|
||||
DEPENDS ${ISPC_SOURCE}
|
||||
COMMENT "Compiling ISPC file ${ISPC_SOURCE}"
|
||||
)
|
||||
|
|
|
@ -6111,6 +6111,7 @@ void idDxtEncoder::CompressImageR11G11B10_BC6Fast_SIMD( const byte* inBuf, byte*
|
|||
options.dwSize = sizeof( CMP_CompressOptions );
|
||||
options.fquality = 0.5f; // Medium quality for speed (0.0 to 1.0)
|
||||
options.dwnumThreads = 0; // 0 = auto-detect number of threads based on CPU cores
|
||||
options.nEncodeWith = CMP_GPU_OCL;
|
||||
|
||||
// Execute compression (single call)
|
||||
CMP_ERROR cmp_status = CMP_ConvertTexture( &srcTexture, &destTexture, &options, nullptr );
|
||||
|
|
|
@ -914,7 +914,10 @@ void idImage::ActuallyLoadImage( bool fromBackEnd, nvrhi::ICommandList* commandL
|
|||
|
||||
void idImage::DeferredLoadImage()
|
||||
{
|
||||
globalImages->imagesToLoad.AddUnique( this );
|
||||
if( !globalImages->cacheImages )
|
||||
{
|
||||
globalImages->imagesToLoad.AddUnique( this );
|
||||
}
|
||||
}
|
||||
|
||||
void idImage::DeferredPurgeImage()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue