mirror of
https://github.com/microsoft/UVAtlas
synced 2024-11-08 13:20:06 +00:00
Fix build breaks for DEBUG builds (#134)
This commit is contained in:
parent
8c1dab1b89
commit
3ebd255b4d
@ -115,7 +115,7 @@ namespace
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning( suppress : 4127 )
|
||||
#pragma warning( disable : 4127 )
|
||||
#endif
|
||||
if ((sizeof(IndexType) == sizeof(uint16_t)) && (*nNewVerts > 0x0fffe))
|
||||
{
|
||||
|
@ -1488,6 +1488,7 @@ Isochart::IMTFromTextureMapEx(
|
||||
|
||||
memset(tempSumIMT, 0, sizeof(double) * IMT_DIM);
|
||||
|
||||
double dTotal2DArea = 0;
|
||||
double dPieceArea = 0;
|
||||
for (size_t ii = 0; ii < dwRowLineCount - 1; ii++)
|
||||
{
|
||||
@ -1517,9 +1518,11 @@ Isochart::IMTFromTextureMapEx(
|
||||
tempSumIMT[kk] += tempIMT[kk];
|
||||
}
|
||||
|
||||
dTotal2DArea += dPieceArea;
|
||||
}
|
||||
}
|
||||
|
||||
std::ignore = dTotal2DArea;
|
||||
DPF(3, "2d area by formal %f", double(f2dArea));
|
||||
DPF(3, "integrated 2d area %f", dTotal2DArea);
|
||||
|
||||
|
@ -1263,6 +1263,8 @@ HRESULT CIsochartEngine::ApplyInitEngine(
|
||||
delete pRootChart;
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
size_t dwTestVertexCount = 0;
|
||||
size_t dwTestFaceCount = 0;
|
||||
while (!m_currentChartHeap.empty())
|
||||
{
|
||||
CIsochartMesh* pChart = m_currentChartHeap.cutTopData();
|
||||
@ -1310,9 +1312,13 @@ HRESULT CIsochartEngine::ApplyInitEngine(
|
||||
delete pChart;
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
dwTestVertexCount += pChart->GetVertexNumber();
|
||||
dwTestFaceCount += pChart->GetFaceNumber();
|
||||
}
|
||||
}
|
||||
|
||||
std::ignore = dwTestVertexCount;
|
||||
std::ignore = dwTestFaceCount;
|
||||
DPF(3, "Old Vert Number is %zu, New Vert Number is %zu",
|
||||
baseInfo.dwVertexCount,
|
||||
dwTestVertexCount);
|
||||
@ -1700,6 +1706,7 @@ HRESULT CIsochartEngine::FillExportFaceIndexBuffer(
|
||||
{
|
||||
assert(pvFaceBuffer != nullptr);
|
||||
|
||||
uint32_t dwFaceId = 0;
|
||||
size_t dwOffset = 0;
|
||||
|
||||
auto pBaseFaces = reinterpret_cast<INDEXTYPE*>(pvFaceBuffer->data());
|
||||
@ -1724,10 +1731,12 @@ HRESULT CIsochartEngine::FillExportFaceIndexBuffer(
|
||||
= static_cast<INDEXTYPE>(pChartFaceBuffer[j].dwVertexID[2]
|
||||
+ dwOffset);
|
||||
|
||||
dwFaceId++;
|
||||
}
|
||||
dwOffset += pChart->GetVertexNumber();
|
||||
}
|
||||
|
||||
std::ignore = dwFaceId;
|
||||
assert(dwFaceId == m_baseInfo.dwFaceCount);
|
||||
|
||||
return S_OK;
|
||||
|
@ -769,6 +769,7 @@ HRESULT CIsochartMesh::OptimizeGeoLnInfiniteStretch(
|
||||
return hr;
|
||||
}
|
||||
|
||||
size_t dwBoundaryInfFaces = 0;
|
||||
if (bCanOptimize)
|
||||
{
|
||||
if (optimizeInfo.dwInfinitStretchVertexCount == 0)
|
||||
@ -810,6 +811,12 @@ HRESULT CIsochartMesh::OptimizeGeoLnInfiniteStretch(
|
||||
optimizeInfo.dwInfinitStretchVertexCount++;
|
||||
optimizeInfo.fInfinitFacesArea +=
|
||||
m_baseInfo.pfFaceAreaArray[m_pFaces[i].dwIDInRootMesh];
|
||||
|
||||
bool bBoundary =
|
||||
m_pVerts[m_pFaces[i].dwVertexID[0]].bIsBoundary
|
||||
|| m_pVerts[m_pFaces[i].dwVertexID[1]].bIsBoundary
|
||||
|| m_pVerts[m_pFaces[i].dwVertexID[2]].bIsBoundary;
|
||||
dwBoundaryInfFaces += (bBoundary ? 1 : 0);
|
||||
}
|
||||
else if (optimizeInfo.pfFaceStretch[i] > m_baseInfo.fExpectAvgL2SquaredStretch)
|
||||
{
|
||||
@ -835,6 +842,7 @@ HRESULT CIsochartMesh::OptimizeGeoLnInfiniteStretch(
|
||||
|
||||
if (!bSucceed)
|
||||
{
|
||||
std::ignore = dwBoundaryInfFaces;
|
||||
DPF(1, "Infinite Optimize failed, %zu Internal infinite vertices,%zu boundary vert",
|
||||
optimizeInfo.dwInfinitStretchVertexCount - dwBoundaryInfFaces,
|
||||
dwBoundaryInfFaces);
|
||||
|
@ -105,6 +105,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <queue>
|
||||
#include <tuple>
|
||||
|
||||
#ifdef UVATLAS_USE_EIGEN
|
||||
#ifdef _MSC_VER
|
||||
|
@ -28,38 +28,32 @@ jobs:
|
||||
displayName: 'Win32 Desktop'
|
||||
timeoutInMinutes: 60
|
||||
cancelTimeoutInMinutes: 1
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
- checkout: none
|
||||
- task: DeleteFiles@1
|
||||
displayName: Delete files
|
||||
inputs:
|
||||
Contents: |
|
||||
DirectXTex\**
|
||||
DirectXMesh\**
|
||||
UVAtlas\**
|
||||
Tests\**
|
||||
|
||||
RemoveDotFiles: true
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchTags: false
|
||||
path: 's/UVAtlas'
|
||||
- task: CmdLine@2
|
||||
displayName: Fetch Libraries
|
||||
inputs:
|
||||
script: |
|
||||
git clone --quiet https://%GITHUB_PAT%@github.com/microsoft/DirectXMesh.git
|
||||
git clone --quiet https://%GITHUB_PAT%@github.com/microsoft/DirectXTex.git
|
||||
git clone --quiet https://%GITHUB_PAT%@github.com/microsoft/UVAtlas.git
|
||||
git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/DirectXMesh.git
|
||||
git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/DirectXTex.git
|
||||
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
workingDirectory: $(Pipeline.Workspace)/s
|
||||
failOnStderr: true
|
||||
- task: CmdLine@2
|
||||
displayName: Fetch Tests
|
||||
inputs:
|
||||
script: git clone --quiet https://%GITHUB_PAT%@github.com/walbourn/uvatlastest.git Tests
|
||||
workingDirectory: $(Build.SourcesDirectory)/UVAtlas
|
||||
script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/walbourn/uvatlastest.git Tests
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
failOnStderr: true
|
||||
- task: VSBuild@1
|
||||
displayName: Build solution xtuvatlas_Desktop_2022.sln 32dbg
|
||||
inputs:
|
||||
solution: UVAtlas/Tests/xtuvatlas_Desktop_2022.sln
|
||||
solution: Tests/xtuvatlas_Desktop_2022.sln
|
||||
vsVersion: 17.0
|
||||
msbuildArgs: /p:PreferredToolArchitecture=x64
|
||||
platform: x86
|
||||
@ -68,7 +62,7 @@ jobs:
|
||||
- task: VSBuild@1
|
||||
displayName: Build solutionxtuvatlas_Desktop_2022.sln 32rel
|
||||
inputs:
|
||||
solution: UVAtlas/Tests/xtuvatlas_Desktop_2022.sln
|
||||
solution: Tests/xtuvatlas_Desktop_2022.sln
|
||||
vsVersion: 17.0
|
||||
msbuildArgs: /p:PreferredToolArchitecture=x64
|
||||
platform: x86
|
||||
@ -77,7 +71,7 @@ jobs:
|
||||
- task: VSBuild@1
|
||||
displayName: Build solution xtuvatlas_Desktop_2022.sln 64dbg
|
||||
inputs:
|
||||
solution: UVAtlas/Tests/xtuvatlas_Desktop_2022.sln
|
||||
solution: Tests/xtuvatlas_Desktop_2022.sln
|
||||
vsVersion: 17.0
|
||||
msbuildArgs: /p:PreferredToolArchitecture=x64
|
||||
platform: x64
|
||||
@ -86,7 +80,7 @@ jobs:
|
||||
- task: VSBuild@1
|
||||
displayName: Build solution xtuvatlas_Desktop_2022.sln 64rel
|
||||
inputs:
|
||||
solution: UVAtlas/Tests/xtuvatlas_Desktop_2022.sln
|
||||
solution: Tests/xtuvatlas_Desktop_2022.sln
|
||||
vsVersion: 17.0
|
||||
msbuildArgs: /p:PreferredToolArchitecture=x64
|
||||
platform: x64
|
||||
@ -95,7 +89,7 @@ jobs:
|
||||
- task: VSBuild@1
|
||||
displayName: Build solution xtuvatlas_Desktop_2022.sln arm64dbg
|
||||
inputs:
|
||||
solution: UVAtlas/Tests/xtuvatlas_Desktop_2022.sln
|
||||
solution: Tests/xtuvatlas_Desktop_2022.sln
|
||||
vsVersion: 17.0
|
||||
msbuildArgs: /p:PreferredToolArchitecture=x64
|
||||
platform: ARM64
|
||||
@ -104,7 +98,7 @@ jobs:
|
||||
- task: VSBuild@1
|
||||
displayName: Build solution xtuvatlas_Desktop_2022.sln arm64rel
|
||||
inputs:
|
||||
solution: UVAtlas/Tests/xtuvatlas_Desktop_2022.sln
|
||||
solution: Tests/xtuvatlas_Desktop_2022.sln
|
||||
vsVersion: 17.0
|
||||
msbuildArgs: /p:PreferredToolArchitecture=x64
|
||||
platform: ARM64
|
||||
@ -114,33 +108,27 @@ jobs:
|
||||
- job: CMAKE_BUILD
|
||||
displayName: 'CMake BUILD_TESTING=ON'
|
||||
timeoutInMinutes: 120
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
- checkout: none
|
||||
- task: DeleteFiles@1
|
||||
displayName: Delete files
|
||||
inputs:
|
||||
Contents: |
|
||||
DirectXTex\**
|
||||
DirectXMesh\**
|
||||
UVAtlas\**
|
||||
Tests\**
|
||||
|
||||
RemoveDotFiles: true
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchTags: false
|
||||
path: 's/UVAtlas'
|
||||
- task: CmdLine@2
|
||||
displayName: Fetch Libraries
|
||||
inputs:
|
||||
script: |
|
||||
git clone --quiet https://%GITHUB_PAT%@github.com/microsoft/DirectXMesh.git
|
||||
git clone --quiet https://%GITHUB_PAT%@github.com/microsoft/DirectXTex.git
|
||||
git clone --quiet https://%GITHUB_PAT%@github.com/microsoft/UVAtlas.git
|
||||
git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/DirectXMesh.git
|
||||
git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/DirectXTex.git
|
||||
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
workingDirectory: $(Pipeline.Workspace)/s
|
||||
failOnStderr: true
|
||||
- task: CmdLine@2
|
||||
displayName: Fetch Tests
|
||||
inputs:
|
||||
script: git clone --quiet https://%GITHUB_PAT%@github.com/walbourn/uvatlastest.git Tests
|
||||
workingDirectory: $(Build.SourcesDirectory)/UVAtlas
|
||||
script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/walbourn/uvatlastest.git Tests
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
failOnStderr: true
|
||||
- task: ChocolateyCommand@0
|
||||
displayName: Install Ninja
|
||||
@ -167,12 +155,12 @@ jobs:
|
||||
- task: CMake@1
|
||||
displayName: CMake (MSVC; x64-Debug) Config
|
||||
inputs:
|
||||
cwd: $(Build.SourcesDirectory)/UVAtlas
|
||||
cwd: $(Build.SourcesDirectory)
|
||||
cmakeArgs: --preset=x64-Debug
|
||||
- task: CMake@1
|
||||
displayName: CMake (MSVC; x64-Debug) Build
|
||||
inputs:
|
||||
cwd: $(Build.SourcesDirectory)/UVAtlas
|
||||
cwd: $(Build.SourcesDirectory)
|
||||
cmakeArgs: --build out/build/x64-Debug -v
|
||||
- task: DeleteFiles@1
|
||||
inputs:
|
||||
@ -180,12 +168,12 @@ jobs:
|
||||
- task: CMake@1
|
||||
displayName: CMake (MSVC; x64-Release) Config
|
||||
inputs:
|
||||
cwd: $(Build.SourcesDirectory)/UVAtlas
|
||||
cwd: $(Build.SourcesDirectory)
|
||||
cmakeArgs: --preset=x64-Release
|
||||
- task: CMake@1
|
||||
displayName: CMake (MSVC; x64-Release) Build
|
||||
inputs:
|
||||
cwd: $(Build.SourcesDirectory)/UVAtlas
|
||||
cwd: $(Build.SourcesDirectory)
|
||||
cmakeArgs: --build out/build/x64-Release -v
|
||||
- task: DeleteFiles@1
|
||||
inputs:
|
||||
@ -193,12 +181,12 @@ jobs:
|
||||
- task: CMake@1
|
||||
displayName: CMake (clang/LLVM; x64-Debug) Config
|
||||
inputs:
|
||||
cwd: $(Build.SourcesDirectory)/UVAtlas
|
||||
cwd: $(Build.SourcesDirectory)
|
||||
cmakeArgs: --preset=x64-Debug-Clang
|
||||
- task: CMake@1
|
||||
displayName: CMake (clang/LLVM; x64-Debug) Build
|
||||
inputs:
|
||||
cwd: $(Build.SourcesDirectory)/UVAtlas
|
||||
cwd: $(Build.SourcesDirectory)
|
||||
cmakeArgs: --build out/build/x64-Debug-Clang -v
|
||||
- task: DeleteFiles@1
|
||||
inputs:
|
||||
@ -206,12 +194,12 @@ jobs:
|
||||
- task: CMake@1
|
||||
displayName: CMake (clang/LLVM; x64-Release) Config
|
||||
inputs:
|
||||
cwd: $(Build.SourcesDirectory)/UVAtlas
|
||||
cwd: $(Build.SourcesDirectory)
|
||||
cmakeArgs: --preset=x64-Release-Clang
|
||||
- task: CMake@1
|
||||
displayName: CMake (clang/LLVM; x64-Release) Build
|
||||
inputs:
|
||||
cwd: $(Build.SourcesDirectory)/UVAtlas
|
||||
cwd: $(Build.SourcesDirectory)
|
||||
cmakeArgs: --build out/build/x64-Release-Clang -v
|
||||
- task: DeleteFiles@1
|
||||
inputs:
|
||||
@ -230,12 +218,12 @@ jobs:
|
||||
- task: CMake@1
|
||||
displayName: CMake (clang/LLVM; arm64-Debug) Config
|
||||
inputs:
|
||||
cwd: $(Build.SourcesDirectory)/UVAtlas
|
||||
cwd: $(Build.SourcesDirectory)
|
||||
cmakeArgs: --preset=arm64-Debug-Clang
|
||||
- task: CMake@1
|
||||
displayName: CMake (clang/LLVM; arm64-Debug) Build
|
||||
inputs:
|
||||
cwd: $(Build.SourcesDirectory)/UVAtlas
|
||||
cwd: $(Build.SourcesDirectory)
|
||||
cmakeArgs: --build out/build/arm64-Debug-Clang -v
|
||||
- task: DeleteFiles@1
|
||||
inputs:
|
||||
@ -243,12 +231,12 @@ jobs:
|
||||
- task: CMake@1
|
||||
displayName: CMake (clang/LLVM; arm64-Release) Config
|
||||
inputs:
|
||||
cwd: $(Build.SourcesDirectory)/UVAtlas
|
||||
cwd: $(Build.SourcesDirectory)
|
||||
cmakeArgs: --preset=arm64-Release-Clang
|
||||
- task: CMake@1
|
||||
# This is disabled to avoid an ICE with clang v15.0.1
|
||||
displayName: CMake (clang/LLVM; arm64-Release) Build
|
||||
enabled: false
|
||||
inputs:
|
||||
cwd: $(Build.SourcesDirectory)/UVAtlas
|
||||
cwd: $(Build.SourcesDirectory)
|
||||
cmakeArgs: --build out/build/arm64-Release-Clang -v
|
||||
|
@ -47,38 +47,32 @@ jobs:
|
||||
displayName: 'Win32 Desktop'
|
||||
timeoutInMinutes: 60
|
||||
cancelTimeoutInMinutes: 1
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
- checkout: none
|
||||
- task: DeleteFiles@1
|
||||
displayName: Delete files
|
||||
inputs:
|
||||
Contents: |
|
||||
DirectXTex\**
|
||||
DirectXMesh\**
|
||||
UVAtlas\**
|
||||
Tests\**
|
||||
|
||||
RemoveDotFiles: true
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchTags: false
|
||||
path: 's/UVAtlas'
|
||||
- task: CmdLine@2
|
||||
displayName: Fetch Libraries
|
||||
inputs:
|
||||
script: |
|
||||
git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/DirectXMesh.git
|
||||
git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/DirectXTex.git
|
||||
git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/UVAtlas.git
|
||||
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
workingDirectory: $(Pipeline.Workspace)/s
|
||||
failOnStderr: true
|
||||
- task: CmdLine@2
|
||||
displayName: Fetch Tests
|
||||
inputs:
|
||||
script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/walbourn/uvatlastest.git Tests
|
||||
workingDirectory: $(Build.SourcesDirectory)/UVAtlas
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
failOnStderr: true
|
||||
- task: VSBuild@1
|
||||
displayName: Build solution xtuvatlas_Desktop_2019.sln 32dbg
|
||||
inputs:
|
||||
solution: UVAtlas/Tests/xtuvatlas_Desktop_2019.sln
|
||||
solution: Tests/xtuvatlas_Desktop_2019.sln
|
||||
vsVersion: 16.0
|
||||
msbuildArgs: /p:PreferredToolArchitecture=x64
|
||||
platform: x86
|
||||
@ -86,7 +80,7 @@ jobs:
|
||||
- task: VSBuild@1
|
||||
displayName: Build solutionxtuvatlas_Desktop_2019.sln 32rel
|
||||
inputs:
|
||||
solution: UVAtlas/Tests/xtuvatlas_Desktop_2019.sln
|
||||
solution: Tests/xtuvatlas_Desktop_2019.sln
|
||||
vsVersion: 16.0
|
||||
msbuildArgs: /p:PreferredToolArchitecture=x64
|
||||
platform: x86
|
||||
@ -94,7 +88,7 @@ jobs:
|
||||
- task: VSBuild@1
|
||||
displayName: Build solution xtuvatlas_Desktop_2019.sln 64dbg
|
||||
inputs:
|
||||
solution: UVAtlas/Tests/xtuvatlas_Desktop_2019.sln
|
||||
solution: Tests/xtuvatlas_Desktop_2019.sln
|
||||
vsVersion: 16.0
|
||||
msbuildArgs: /p:PreferredToolArchitecture=x64
|
||||
platform: x64
|
||||
@ -102,7 +96,7 @@ jobs:
|
||||
- task: VSBuild@1
|
||||
displayName: Build solution xtuvatlas_Desktop_2019.sln 64rel
|
||||
inputs:
|
||||
solution: UVAtlas/Tests/xtuvatlas_Desktop_2019.sln
|
||||
solution: Tests/xtuvatlas_Desktop_2019.sln
|
||||
vsVersion: 16.0
|
||||
msbuildArgs: /p:PreferredToolArchitecture=x64
|
||||
platform: x64
|
||||
@ -110,7 +104,7 @@ jobs:
|
||||
- task: VSBuild@1
|
||||
displayName: Build solution xtuvatlas_Desktop_2019.sln arm64dbg
|
||||
inputs:
|
||||
solution: UVAtlas/Tests/xtuvatlas_Desktop_2019.sln
|
||||
solution: Tests/xtuvatlas_Desktop_2019.sln
|
||||
vsVersion: 16.0
|
||||
msbuildArgs: /p:PreferredToolArchitecture=x64
|
||||
platform: ARM64
|
||||
@ -118,7 +112,7 @@ jobs:
|
||||
- task: VSBuild@1
|
||||
displayName: Build solution xtuvatlas_Desktop_2019.sln arm64rel
|
||||
inputs:
|
||||
solution: UVAtlas/Tests/xtuvatlas_Desktop_2019.sln
|
||||
solution: Tests/xtuvatlas_Desktop_2019.sln
|
||||
vsVersion: 16.0
|
||||
msbuildArgs: /p:PreferredToolArchitecture=x64
|
||||
platform: ARM64
|
||||
|
Loading…
Reference in New Issue
Block a user