Skip to content

Commit

Permalink
Changes to make editor landscape tools compile on windows arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeLikeCXK committed Jan 21, 2025
1 parent 314a141 commit f3d760a
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 45 deletions.
3 changes: 2 additions & 1 deletion prog/gameLibs/landMesh/landRayTracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ static inline bool optimize_4cache(unsigned char *verts, int vertSize, int numv,
return true;
}

#if _TARGET_PC && _TARGET_SIMD_SSE
//remove _TARGET_SIMD_SSE
#if _TARGET_PC
template <class VertIndex, class FaceIndex>
bool BaseLandRayTracer<VertIndex, FaceIndex>::build(uint32_t cellsX, uint32_t cellsY, float cellSz, const Point3 &ofs,
const BBox3 &box, dag::ConstSpan<Mesh *> meshes, dag::ConstSpan<Mesh *> combined_meshes, uint32_t min_grid, uint32_t max_grid,
Expand Down
6 changes: 4 additions & 2 deletions prog/gameLibs/publicInclude/landMesh/landRayTracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ class BaseLandRayTracer
vec4f offsetV, numCellsV, invCellSizeV;
vec4f offsetVXZ, numCellsVXZ;
bbox3f boxV;
#if _TARGET_PC && _TARGET_SIMD_SSE
//remove _TARGET_SIMD_SSE
#if _TARGET_PC
static void packVerts(Vertex *packed, const Point3 *verts, int vertCount, vec4f &scale, vec4f &ofs)
{
bbox3f box;
Expand Down Expand Up @@ -1046,7 +1047,8 @@ class BaseLandRayTracer
void load(void *dump, int sz);
void initFromDump();
void save(IGenSave &cb);
#if _TARGET_PC && _TARGET_SIMD_SSE
//remove _TARGET_SIMD_SSE
#if _TARGET_PC
bool build(uint32_t cellsX, uint32_t cellsY, float cellSz, const Point3 &ofs, const BBox3 &box, dag::ConstSpan<Mesh *> meshes,
dag::ConstSpan<Mesh *> combined_meshes, uint32_t min_grid_index, uint32_t max_grid_index, bool optimize_for_cache);
#endif
Expand Down
85 changes: 43 additions & 42 deletions prog/tools/build_dagor_cdk_mini.cmd
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
@echo off

rem DaEditorX
jam -s Root=../.. -f sceneTools/daEditorX/jamfile-editor
jam -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/daEditorX/jamfile-editor
if errorlevel 1 goto error
jam -s Root=../.. -f sceneTools/daEditorX/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/daEditorX/jamfile
if errorlevel 1 goto error

rem dabuild
jam -s Root=../.. -f sceneTools/assetExp/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/assetExp/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f converters/ddsxCvt2/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f converters/ddsxCvt2/jamfile
if errorlevel 1 goto error

rem AssetViewer
jam -s Root=../.. -f AssetViewer/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f AssetViewer/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f sceneTools/findUnusedTex/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/findUnusedTex/jamfile
if errorlevel 1 goto error

rem daImpostorBaker
jam -s Root=../.. -f sceneTools/impostorBaker/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/impostorBaker/jamfile
if errorlevel 1 goto error

rem DDSx plugins
jam -s Root=../.. -f sceneTools/assetExp/ddsxConv/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/assetExp/ddsxConv/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -s iOS_exp=yes -f sceneTools/assetExp/ddsxConv/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -s iOS_exp=yes -f sceneTools/assetExp/ddsxConv/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -s Tegra_exp=yes -f sceneTools/assetExp/ddsxConv/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -s Tegra_exp=yes -f sceneTools/assetExp/ddsxConv/jamfile
if errorlevel 1 goto error

rem shader compilers
jam -s Root=../.. -f ../3rdPartyLibs/legacy_parser/dolphin/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f ../3rdPartyLibs/legacy_parser/dolphin/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f ../3rdPartyLibs/legacy_parser/whale/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f ../3rdPartyLibs/legacy_parser/whale/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f shaderCompiler2/jamfile-hlsl11
jam -sPlatformSpec=vc17 -s Root=../.. -f shaderCompiler2/jamfile-hlsl11
if errorlevel 1 goto error
jam -s Root=../.. -f shaderCompiler2/jamfile-hlsl2spirv
jam -sPlatformSpec=vc17 -s Root=../.. -f shaderCompiler2/jamfile-hlsl2spirv
if errorlevel 1 goto error
jam -s Root=../.. -f shaderCompiler2/jamfile-hlsl2metal
jam -sPlatformSpec=vc17 -s Root=../.. -f shaderCompiler2/jamfile-hlsl2metal
if errorlevel 1 goto error
jam -s Root=../.. -f shaderCompiler2/jamfile-dx12
jam -sPlatformSpec=vc17 -s Root=../.. -f shaderCompiler2/jamfile-dx12
if errorlevel 1 goto error
jam -s Root=../.. -f shaderCompiler2/hlslCompiler/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f shaderCompiler2/hlslCompiler/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f shaderCompiler2/nodeBased/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f shaderCompiler2/nodeBased/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f shaderInfo/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f shaderInfo/jamfile
if errorlevel 1 goto error

rem common minimal gui shaders for tools
Expand All @@ -56,38 +56,38 @@ call compile_gui_shaders_dx11.cmd
popd

rem utils
jam -s Root=../.. -f sceneTools/vromfsPacker/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/vromfsPacker/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f sceneTools/csvUtil/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/csvUtil/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f converters/ddsxCvt/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f converters/ddsxCvt/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f converters/ddsx2dds/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f converters/ddsx2dds/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f converters/ddsConverter/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f converters/ddsConverter/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f FontGenerator/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f FontGenerator/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f converters/GuiTex/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f converters/GuiTex/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f sceneTools/utils/jamfile-binBlk
jam -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/utils/jamfile-binBlk
if errorlevel 1 goto error

jam -s Root=../.. -f sceneTools/dumpGrp/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/dumpGrp/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f sceneTools/dbldUtil/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/dbldUtil/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f sceneTools/resDiff/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/resDiff/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f sceneTools/resUpdate/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/resUpdate/jamfile
if errorlevel 1 goto error
jam -s Root=../.. -f sceneTools/resClean/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/resClean/jamfile
if errorlevel 1 goto error

jam -s Root=../.. -sConfig=dev -sPlatformArch=x86_64 -f consoleSq/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -sConfig=dev -sPlatformArch=x86_64 -f consoleSq/jamfile
if errorlevel 1 goto error

rem jam -s Root=../.. -f miscUtils/fastdep-0.16/jamfile
rem jam -sPlatformSpec=vc17 -s Root=../.. -f miscUtils/fastdep-0.16/jamfile
rem if errorlevel 1 goto error

rem Blender plugin
Expand All @@ -96,22 +96,23 @@ __build_pack.py FINAL
popd

rem 3ds Max plugins, we don't care if these plugins fail to compile (this could happen due to missing SDK or compiler)
jam -s Root=../.. -s MaxVer=Max2025 -f maxplug/jamfile
jam -s Root=../.. -s MaxVer=Max2025 -f maxplug/jamfile-imp
jam -sPlatformSpec=vc17 -s Root=../.. -s MaxVer=Max2025 -f maxplug/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -s MaxVer=Max2025 -f maxplug/jamfile-imp

jam -s Root=../.. -s MaxVer=Max2024 -f maxplug/jamfile
jam -s Root=../.. -s MaxVer=Max2024 -f maxplug/jamfile-imp
jam -sPlatformSpec=vc17 -s Root=../.. -s MaxVer=Max2024 -f maxplug/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -s MaxVer=Max2024 -f maxplug/jamfile-imp

jam -s Root=../.. -s MaxVer=Max2023 -f maxplug/jamfile
jam -s Root=../.. -s MaxVer=Max2023 -f maxplug/jamfile-imp
jam -sPlatformSpec=vc17 -s Root=../.. -s MaxVer=Max2023 -f maxplug/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -s MaxVer=Max2023 -f maxplug/jamfile-imp

jam -s Root=../.. -s MaxVer=Max2022 -f maxplug/jamfile
jam -s Root=../.. -s MaxVer=Max2022 -f maxplug/jamfile-imp
jam -sPlatformSpec=vc17 -s Root=../.. -s MaxVer=Max2022 -f maxplug/jamfile
jam -sPlatformSpec=vc17 -s Root=../.. -s MaxVer=Max2022 -f maxplug/jamfile-imp
if errorlevel 1 goto EOF

goto EOF

:error
pause

echo.
echo An error occured
Expand Down
2 changes: 2 additions & 0 deletions prog/tools/build_dagor_cdk_mini_WindowsOnArm64.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ jam -sPlatformArch=arm64 -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/daEdito
if errorlevel 1 goto error
jam -sPlatformArch=arm64 -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/daEditorX/jamfile
if errorlevel 1 goto error


rem dabuild
jam -sPlatformArch=arm64 -sPlatformSpec=vc17 -s Root=../.. -f sceneTools/assetExp/jamfile
Expand Down Expand Up @@ -119,6 +120,7 @@ goto EOF

echo.
echo An error occured
pause
exit /b 1

:EOF
Expand Down

0 comments on commit f3d760a

Please sign in to comment.