alipbcs / ZetaRay

Real-time Direct3D 12 path tracer
MIT License
223 stars 4 forks source link

Build fails on VS 2022 #6

Closed kyamant closed 5 months ago

kyamant commented 6 months ago

Rebuild started at 09:40... 1>------ Rebuild All started: Project: CopyWinPixDLL, Configuration: Debug x64 ------ 2>------ Rebuild All started: Project: CopyFsr2SDKBins, Configuration: Debug x64 ------ 3>------ Rebuild All started: Project: CopyFontDLL, Configuration: Debug x64 ------ 4>------ Rebuild All started: Project: CopyDX12AgilitySDKBins, Configuration: Debug x64 ------ 5>------ Rebuild All started: Project: CompileShaders, Configuration: Debug x64 ------ 1>1>Copying WinPixEventRuntime.dll into D:/Personal/Projects/ProjZetaRay/bin... 2>1>Copying ffx_fsr2_api_dx12_x64.dll into D:/Personal/Projects/ProjZetaRay/bin/... 2>2>Copying ffx_fsr2_api_x64.dll into D:/Personal/Projects/ProjZetaRay/bin/... 3>1>Copying Font.dll into D:/Personal/Projects/ProjZetaRay/bin/... 4>1>Copying D3D12Core.dll into D:/Personal/Projects/ProjZetaRay/bin/D3D12/... 4>2>Copying d3d12SDKLayers.dll into D:/Personal/Projects/ProjZetaRay/bin/D3D12/... 5>16>Compiling HLSL source file PresampleEmissives.hlsl... 5>13>Compiling HLSL source file IndirectDnsr_Spatial.hlsl... 5>10>Compiling HLSL source file FireflyFilter.hlsl... 6>------ Rebuild All started: Project: ZetaCore, Configuration: Debug x64 ------ 5>14>Compiling HLSL source file IndirectDnsr_Temporal.hlsl... 5>6>Compiling HLSL source file AutoExposure_Histogram.hlsl... 5>15>Compiling HLSL source file Inscattering.hlsl... 5>8>Compiling HLSL source file EstimateCurvature.hlsl... 5>4>Compiling HLSL source file Compositing.hlsl... 5>In file included from D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/IndirectDnsr_Temporal.hlsl:3: 5>In file included from D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI_Resampling.hlsli:4: 5>D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI_PathTracing.hlsli(244,13): error G5793C645: parameter 'eta' is uninitialized when used here [-Werror,-Wparameter-usage] 5> return false; 5> ^~ 5>D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI_PathTracing.hlsli:237:40: note: variable 'eta' is declared here 5> out BSDF::ShadingData surface, out float eta) 5> ^ 5> 5>The system cannot find the batch label specified - VCEnd 5>5>Compiling HLSL source file BuildLightVoxelGrid.hlsl... 5>D:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(237,5): error MSB8066: Custom build for 'D:\Personal\Projects\ProjZetaRay\build\CMakeFiles\301b84fbc1b63d76d4a5fe3509caba56\IndirectDnsr_Temporal_cs.cso.rule' exited with code 1. 5>3>Compiling DXIL library GBufferRT.hlsl... 5>1>Compiling HLSL source file AutoExposure_ExpectedVal.hlsl... 5>12>Compiling HLSL source file ImGui.hlsl... 5>2>Compiling HLSL source file GBufferRT_Inline.hlsl... 5>9>Compiling HLSL source file EstimateTriLumen.hlsl... 5>11>Compiling HLSL source file GenerateDepthBuffer.hlsl... 5>7>Compiling HLSL source file Display.hlsl... 5>6>Compiling HLSL source file ReSTIR_DI_DNSR_Spatial.hlsl... 6>CommandList.cpp 6>CommandQueue.cpp 6>DescriptorHeap.cpp 6>Device.cpp 6>Direct3DUtil.cpp 6>GpuMemory.cpp 6>GpuTimer.cpp 6>PipelineStateLibrary.cpp 6>RendererCore.cpp 6>RenderGraph.cpp 6>RootSignature.cpp 6>SharedShaderResources.cpp 6>BVH.cpp 6>Common.cpp 6>Sampling.cpp 6>Surface.cpp 5>1>Compiling HLSL source file ReSTIR_DI_SpatioTemporal_LP.hlsl... 5>12>Compiling HLSL source file ReSTIR_DI_DNSR_Temporal.hlsl... 5>8>Compiling HLSL source file ReSTIR_DI_SpatioTemporal.hlsl... 5>In file included from D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI_NPS.hlsl:5: 5>In file included from D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI_LVG.hlsl:7: 5>In file included from D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI.hlsl:1: 5>In file included from D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI_Resampling.hlsli:4: 5>In file included from D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI.hlsl:1: 5>In file included from D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI.hlsl:1: 5>In file included from D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI_Resampling.hlsli:4: 5>In file included from D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI_Resampling.hlsli:4: 5>D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI_PathTracing.hlsli(244,13): error G5793C645: parameter 'eta' is uninitialized when used here [-Werror,-Wparameter-usage] 5> return false; 5> ^~ 5>D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI_PathTracing.hlsli:237:40: note: variable 'eta' is declared here 5> out BSDF::ShadingData surface, out float eta) 5> ^ 5> 5>The system cannot find the batch label specified - VCEnd 5>11>Compiling HLSL source file ReSTIR_GI_NPS.hlsl... 5>D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI_PathTracing.hlsli(244,13): error G5793C645: parameter 'eta' is uninitialized when used here [-Werror,-Wparameter-usage] 5> return false; 5> ^~ 5>D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI_PathTracing.hlsli(244,13): error G5793C645: parameter 'eta' is uninitialized when used here [-Werror,-Wparameter-usage] 5>D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI_PathTracing.hlsli:237:40: note: variable 'eta' is declared here 5> return false; 5> out BSDF::ShadingData surface, out float eta) 5> ^~ 5> ^ 5> 5>D:/Personal/Projects/ProjZetaRay/Source/ZetaRenderPass/IndirectLighting/ReSTIR_GI_PathTracing.hlsli:237:40: note: variable 'eta' is declared here 5>The system cannot find the batch label specified - VCEnd 5> out BSDF::ShadingData surface, out float eta) 5>9>Compiling HLSL source file ReSTIR_GI_LVG.hlsl... 5> ^ 5> 5>The system cannot find the batch label specified - VCEnd 5>10>Compiling HLSL source file ReSTIR_GI.hlsl... 5>D:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(237,5): error MSB8066: Custom build for 'D:\Personal\Projects\ProjZetaRay\build\CMakeFiles\301b84fbc1b63d76d4a5fe3509caba56\ReSTIR_GI_cs.cso.rule' exited with code 1. 5>D:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(237,5): error MSB8066: Custom build for 'D:\Personal\Projects\ProjZetaRay\build\CMakeFiles\301b84fbc1b63d76d4a5fe3509caba56\ReSTIR_GI_NPS_cs.cso.rule' exited with code 1. 5>D:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(237,5): error MSB8066: Custom build for 'D:\Personal\Projects\ProjZetaRay\build\CMakeFiles\301b84fbc1b63d76d4a5fe3509caba56\ReSTIR_GI_LVG_cs.cso.rule' exited with code 1. 5>16>Compiling HLSL source file SkyDI_DNSR_Spatial.hlsl... 5>15>Compiling HLSL source file SkyDI_DNSR_Temporal.hlsl... 5>5>Compiling HLSL source file SkyDI_SpatioTemporal.hlsl... 5>7>Compiling HLSL source file SkyViewLUT.hlsl... 5>4>Compiling HLSL source file SunShadow.hlsl... 5>6>Compiling HLSL source file TAA.hlsl... 5>2>Compiling HLSL source file ffx_denoiser_spatial_filter.hlsl... 6>glTF.cpp 6>Mesh.cpp 6>RtAccelerationStructure.cpp 5>13>Compiling HLSL source file ffx_denoiser_temporal.hlsl... 6>Sampler.cpp 6>Asset.cpp 6>Camera.cpp 6>SceneCore.cpp 6>MemoryPool.cpp 6>MemoryArena.cpp 6>OffsetAllocator.cpp 6>Param.cpp 6>Task.cpp 6>ThreadPool.cpp 6>ThreadSafeMemoryArena.cpp 6>Error.cpp 6>Win32App.cpp 6>Win32Filesystem.cpp 6>Win32Timer.cpp 6>Win32Common.cpp 6>imgui.cpp 6>imgui_draw.cpp 6>imgui_tables.cpp 6>imgui_widgets.cpp 5>Done building project "CompileShaders.vcxproj" -- FAILED. 6>imnodes.cpp 6>implot.cpp 6>implot_items.cpp 6>ZetaCore.vcxproj -> D:\Personal\Projects\ProjZetaRay\bin\ZetaCored.lib 7>------ Rebuild All started: Project: ZetaRenderPass, Configuration: Debug x64 ------ 8>------ Rebuild All started: Project: Tests, Configuration: Debug x64 ------ 9>------ Rebuild All started: Project: BCnCompressglTF, Configuration: Debug x64 ------ 8>TestContainer.cpp 8>TestMath.cpp 8>TestAliasTable.cpp 8>TestOffsetAllocator.cpp 8>TestOptional.cpp 9>BC.cpp 7>RenderPass.cpp 8>main.cpp 9>BC4BC5.cpp 9>BC6HBC7.cpp 9>DirectXTexCompress.cpp 9>DirectXTexConvert.cpp 9>DirectXTexDDS.cpp 9>DirectXTexImage.cpp 9>DirectXTexMipmaps.cpp 9>DirectXTexMisc.cpp 9>DirectXTexResize.cpp 9>DirectXTexUtil.cpp 9>DirectXTexFlipRotate.cpp 9>DirectXTexWIC.cpp 9>BCDirectCompute.cpp 9>DirectXTexCompressGPU.cpp 9>DirectXTexD3D11.cpp 7>AutoExposure.cpp 7>Compositing.cpp 7>DirectLighting.cpp 7>SkyDI.cpp 7>Display.cpp 7>FSR2.cpp 7>GBufferRT.cpp 7>GenerateDepthBuffer.cpp 7>GuiPass.cpp 7>IndirectLighting.cpp 7>PreLighting.cpp 7>Sky.cpp 7>SunShadow.cpp 7>TAA.cpp 8>D:\Personal\Projects\ProjZetaRay\Tests\TestMath.cpp(376,23): error C2039: 'DegreeToRadians': is not a member of 'ZetaRay::Math' 8>D:\Personal\Projects\ProjZetaRay\Source\ZetaCore\Math\Sampling.h(11,11): 8>see declaration of 'ZetaRay::Math' 8>D:\Personal\Projects\ProjZetaRay\Tests\TestMath.cpp(376,23): error C3861: 'DegreeToRadians': identifier not found 9>texconv.cpp 9>BCnCompressglTF.cpp 7>ZetaRenderPass.vcxproj -> D:\Personal\Projects\ProjZetaRay\bin\ZetaRenderPassd.lib 10>------ Rebuild All started: Project: ZetaRenderer, Configuration: Debug x64 ------ 8>Done building project "Tests.vcxproj" -- FAILED. 10>GBuffer.cpp 10>PostProcessor.cpp 10>RayTracer.cpp 10>DefaultRenderer.cpp 10>ZetaRenderer.vcxproj -> D:\Personal\Projects\ProjZetaRay\bin\ZetaRendererd.lib 11>------ Rebuild All started: Project: ZetaLab, Configuration: Debug x64 ------ 11>ZetaLab.cpp 11> Creating library D:/Personal/Projects/ProjZetaRay/bin/ZetaLabd.lib and object D:/Personal/Projects/ProjZetaRay/bin/ZetaLabd.exp 11>ZetaLab.vcxproj -> D:\Personal\Projects\ProjZetaRay\bin\ZetaLabd.exe 9>BCnCompressglTF.vcxproj -> D:\Personal\Projects\ProjZetaRay\bin\BCnCompressglTFd.exe 12>------ Skipped Rebuild All: Project: ALL_BUILD, Configuration: Debug x64 ------ 12>Project not selected to build for this solution configuration ========== Rebuild All: 9 succeeded, 2 failed, 1 skipped ========== ========== Rebuild completed at 09:41 and took 12.961 seconds ==========

alipbcs commented 5 months ago

This error only happens with the latest version of DXC (1.8.2403) and shouldn't happen with the one specified in the build system (1.7.2308). In any case, I'll update DXC and push a fix.