sultim-t / vkquake-rt

GNU General Public License v2.0
345 stars 14 forks source link

need help with compiling vkQuake-rt #43

Open pppbb opened 10 months ago

pppbb commented 10 months ago

could somebody post instructions how to build vkquake-rt with visual studio 17?

pppbb commented 10 months ago

i managed to configure and generate build files for RayTracedGL1: PS C:\dev\sultim\RayTracedGL1-2.0.1\Build> cmake .. -DRG_WITH_NVIDIA_DLSS=TRUE -DCMAKE_BUILD_TYPE=Release -- Building for: Visual Studio 17 2022 -- The CXX compiler identification is MSVC 19.37.32822.0 -- The C compiler identification is MSVC 19.37.32822.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Adding Vulkan. VulkanSDK: C:\VulkanSDK\1.3.250.1 -- Found Vulkan: C:/VulkanSDK/1.3.250.1/Lib/vulkan-1.lib (found version "1.3.250") found components: glslc glslangValidator -- RG_WITH_EXPORTS enabled. RTGL1 functions are exported. -- RG_WITH_SURFACE_WIN32 enabled -- RG_USE_NVIDIA_DLSS enabled -- Found DLSS SDK: C:\dev\nvngx_dlss_sdk -- Configuring done (3.9s) -- Generating done (0.0s) -- Build files have been written to: C:/dev/sultim/RayTracedGL1-2.0.1/Build And built it: `PS C:\dev\sultim\RayTracedGL1-2.0.1\Build> cmake --build . --config Release Wersja programu MSBuild 17.7.2+d6990bcfa dla .NET Framework

1>Checking Build System Building Custom Rule C:/dev/sultim/RayTracedGL1-2.0.1/CMakeLists.txt RTGL1.cpp RTGL1A.cpp VulkanDevice.cpp Buffer.cpp Scene.cpp PhysicalDevice.cpp Queues.cpp Swapchain.cpp GlobalUniform.cpp CommandBufferManager.cpp ShaderManager.cpp RayTracingPipeline.cpp VertexCollector.cpp ASManager.cpp VertexCollectorFilter.cpp ASBuilder.cpp ScratchBuffer.cpp Utils.cpp PathTracer.cpp Common.cpp Generowanie kodu... Trwa kompilowanie... Matrix.cpp Rasterizer.cpp RasterizedDataCollector.cpp vk_mem_alloc_imp.cpp ImageLoader.cpp TextureManager.cpp MemoryAllocator.cpp SamplerManager.cpp TextureOverrides.cpp TextureDescriptors.cpp TextureUploader.cpp VertexCollectorFilterType.cpp ShaderCommonCFramebuf.cpp Framebuffers.cpp BlueNoise.cpp ImageComposition.cpp Tonemapping.cpp LightManager.cpp AutoBuffer.cpp ASComponent.cpp Generowanie kodu... Trwa kompilowanie... CubemapManager.cpp CubemapUploader.cpp GeomInfoManager.cpp VertexPreprocessing.cpp Denoiser.cpp RasterizerPipelines.cpp RenderCubemap.cpp DepthCopying.cpp RasterPass.cpp SwapchainPass.cpp UserFunction.cpp RgException.cpp Bloom.cpp SuperResolution.cpp Sharpening.cpp DLSS.cpp HaltonSequence.cpp LightLists.cpp SectorVisibility.cpp TriangleInfoManager.cpp Generowanie kodu... Trwa kompilowanie... LensFlares.cpp DecalManager.cpp EffectBase.cpp Generowanie kodu... texture.c texture1.c C:\dev\sultim\RayTracedGL1-2.0.1\Source\KTX\lib\gl_format.h(95,1): warning C4005: "NOMINMAX": ponowna definicja makra [ C:\dev\sultim\RayTracedGL1-2.0.1\Build\RayTracedGL1.vcxproj] C:\dev\sultim\RayTracedGL1-2.0.1\Source\KTX\lib\gl_format.h(95,1): message : Element "NOMINMAX" został wcześniej zadekl arowany w wierszu polecenia [C:\dev\sultim\RayTracedGL1-2.0.1\Build\RayTracedGL1.vcxproj] texture2.c C:\dev\sultim\RayTracedGL1-2.0.1\Source\KTX\lib\gl_format.h(95,1): warning C4005: "NOMINMAX": ponowna definicja makra [ C:\dev\sultim\RayTracedGL1-2.0.1\Build\RayTracedGL1.vcxproj] C:\dev\sultim\RayTracedGL1-2.0.1\Source\KTX\lib\gl_format.h(95,1): message : Element "NOMINMAX" został wcześniej zadekl arowany w wierszu polecenia [C:\dev\sultim\RayTracedGL1-2.0.1\Build\RayTracedGL1.vcxproj] hashlist.c checkheader.c swap.c memstream.c filestream.c vkloader.c C:\dev\sultim\RayTracedGL1-2.0.1\Source\KTX\lib\gl_format.h(95,1): warning C4005: "NOMINMAX": ponowna definicja makra [ C:\dev\sultim\RayTracedGL1-2.0.1\Build\RayTracedGL1.vcxproj] C:\dev\sultim\RayTracedGL1-2.0.1\Source\KTX\lib\gl_format.h(95,1): message : Element "NOMINMAX" został wcześniej zadekl arowany w wierszu polecenia [C:\dev\sultim\RayTracedGL1-2.0.1\Build\RayTracedGL1.vcxproj] vk_funcs.c zstd.c createdfd.c interpretdfd.c queries.c vk2dfd.c Generowanie kodu... Trwa tworzenie biblioteki C:/dev/sultim/RayTracedGL1-2.0.1/Build/Release/RayTracedGL1.lib i obiektu C:/dev/sultim/ RayTracedGL1-2.0.1/Build/Release/RayTracedGL1.exp RayTracedGL1.vcxproj -> C:\dev\sultim\RayTracedGL1-2.0.1\Build\Release\RayTracedGL1.dll Building Custom Rule C:/dev/sultim/RayTracedGL1-2.0.1/CMakeLists.txt but when i try to build vkquake-rt with vs 2022 i get lots of errors.

pppbb commented 10 months ago

anybody compiled vkquake for linux?

RamblingMadMan commented 10 months ago

anybody compiled vkquake for linux?

Yeah, I've successfully got it running on linux; took a bit of fiddling around but it seems to be all working.

pppbb commented 10 months ago

Yeah, I've successfully got it running on linux; took a bit of fiddling around but it seems to be all working.

could you post instructions how to do that? i managed to compile lib RayTracedGL1.

pppbb commented 10 months ago

i get an error error: unknown type name ‘RgVertex’

RamblingMadMan commented 10 months ago

i get an error error: unknown type name ‘RgVertex’

You have to use the "quake" branch of RTGL1, I have fsr2 binaries and updated source/build scripts I can share if you like 👍 will post some steps if you need too

pppbb commented 10 months ago

could you send me lib GL1 .so and vkquake executable?

pppbb commented 10 months ago

could you send me lib GL1 .so and vkquake executable?

i want to build it myself but first i would like to test your build.

pppbb commented 10 months ago

You have to use the "quake" branch of RTGL1, I have fsr2 binaries and updated source/build scripts I can share if you like 👍 will post some steps if you need too

please share it.

pppbb commented 10 months ago

ping @RamblingMadMan could you please share your build files/scripts when you have the time?

RamblingMadMan commented 10 months ago

ping @RamblingMadMan could you please share your build files/scripts when you have the time?

Hey, sorry about the delay on this. I'll upload some stuff tonight and get you sorted 🤙

pppbb commented 10 months ago

@RamblingMadMan Sorry for being annoying but i need Linux version of the application. When i use windows version with wine i get less then half of Windows performance. There are locations i get below 30fps. I never played trough Mission packs and now i can do it with ray tracing. So if you please share your scripts/build files.

RamblingMadMan commented 10 months ago

Here's a working build (with FSR2), should work as long as you have the libraries installed that it links against 👍

vkquake-rt.tar.gz

You'll still need to download a release from the releases page to get the ovrd folder and put that in bin next to the executable.

Happy fraggin'

RamblingMadMan commented 10 months ago

@pppbb let me know if you have any issues and I can share the actual build steps if required

pppbb commented 10 months ago

let me know if you have any issues and I can share the actual build steps if required

I will try it as soon as posible.

pppbb commented 10 months ago

let me know if you have any issues and I can share the actual build steps if required

Unfortunately, i get a crash when running binary:( - memory violation after sound initialization. Maybe if i built it myself it would work?

Command line: /home/piotr/Games/test/bin/vkquake -condebug : qconsole.log @RamblingMadMan

RamblingMadMan commented 10 months ago

let me know if you have any issues and I can share the actual build steps if required

Unfortunately, i get a crash when running binary:( - memory violation after sound initialization. Maybe if i built it myself it would work?

Command line: /home/piotr/Games/test/bin/vkquake -condebug : qconsole.log @RamblingMadMan

Did you try gdb/lldb?

pppbb commented 10 months ago

Did you try gdb/lldb?

I don't know how to use these programs.

pppbb commented 10 months ago

(gdb) run Starting program: /home/piotr/Games/test/bin/vkquake [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". Command line: /home/piotr/Games/test/bin/vkquake Found SDL version 2.28.3 Detected 24 CPUs. Initializing vkQuake v1.20.3 Built with GCC 13.1.1 Host_Init [New Thread 0x7ffff6ad36c0 (LWP 691391)] [New Thread 0x7ffff62d26c0 (LWP 691392)] [New Thread 0x7ffff5ad16c0 (LWP 691393)] [New Thread 0x7ffff52d06c0 (LWP 691394)] [New Thread 0x7ffff4acf6c0 (LWP 691395)] [New Thread 0x7ffff42ce6c0 (LWP 691396)] [New Thread 0x7ffff3acd6c0 (LWP 691397)] [New Thread 0x7ffff32cc6c0 (LWP 691398)] [New Thread 0x7ffff2acb6c0 (LWP 691399)] [New Thread 0x7ffff22ca6c0 (LWP 691400)] [New Thread 0x7ffff1ac96c0 (LWP 691401)] [New Thread 0x7ffff12c86c0 (LWP 691402)] [New Thread 0x7ffff0ac76c0 (LWP 691403)] [New Thread 0x7ffff02c66c0 (LWP 691404)] [New Thread 0x7fffefac56c0 (LWP 691405)] [New Thread 0x7fffef2c46c0 (LWP 691406)] [New Thread 0x7fffeeac36c0 (LWP 691407)] [New Thread 0x7fffee2c26c0 (LWP 691408)] [New Thread 0x7fffedac16c0 (LWP 691409)] [New Thread 0x7fffed2c06c0 (LWP 691410)] [New Thread 0x7fffecabf6c0 (LWP 691411)] [New Thread 0x7fffec2be6c0 (LWP 691412)] [New Thread 0x7fffebabd6c0 (LWP 691413)] [New Thread 0x7fffeb2bc6c0 (LWP 691414)] Playing registered version. Console initialized. UDP4 Initialized UDPv6 Initialized Server using protocol 999+ (FTE-RMQ) Exe: 18:37:44 Aug 14 2023

Ray tracing Initialization [New Thread 0x7fffdc55e6c0 (LWP 691416)] [New Thread 0x7fffdbd5d6c0 (LWP 691417)] [New Thread 0x7fffdb55c6c0 (LWP 691418)] [New Thread 0x7fffdad5b6c0 (LWP 691419)] [New Thread 0x7fffd9f276c0 (LWP 691420)] [New Thread 0x7fffd33ff6c0 (LWP 691421)] [New Thread 0x7fff868086c0 (LWP 691438)]

Sound Initialization

Thread 1 "vkquake" received signal SIGSEGV, Segmentation fault. 0x00007fffe88463ed in ?? () from /usr/lib/libnvidia-glcore.so.535.43.09

pppbb commented 10 months ago

Could you post build instructions without fsr and/or with dlss?

RamblingMadMan commented 10 months ago

Could you post build instructions without fsr and/or with dlss?

When you get to the segfault, you need to enter bt to get a backtrace. I believe the RTGL1 .so I sent has debug symbols, so that should give us somewhere to start.

pppbb commented 10 months ago

(gdb) bt

0 0x00007fffe88463ed in ?? () from /usr/lib/libnvidia-glcore.so.535.43.09

1 0x00007ffff7a4cc7d in executeGpuJobCompute(BackendContext_VK, FfxGpuJobDescription, VkCommandBuffer_T*) ()

from /home/piotr/Games/test/bin/../lib/libRayTracedGL1.so

2 0x00007ffff7a4cddd in ExecuteGpuJobsVK(FfxFsr2Interface, void) () from /home/piotr/Games/test/bin/../lib/libRayTracedGL1.so

3 0x00007ffff7a47e59 in fsr2Dispatch(FfxFsr2Context_Private, FfxFsr2DispatchDescription const) ()

from /home/piotr/Games/test/bin/../lib/libRayTracedGL1.so

4 0x00007ffff791a888 in RTGL1::FSR2::Apply (this=0x55555b768690, cmd=0x55555bcfac50, frameIndex=0,

framebuffers=std::shared_ptr<RTGL1::Framebuffers> (use count 8, weak count 0) = {...}, renderResolution=..., jitterOffset=..., 
timeDelta=2.05599999, nearPlane=4, farPlane=16384, fovVerticalRad=0)
at /home/keith/Development/QuakeRT/RayTracedGL1-quake/Source/FSR2.cpp:200

5 0x00007ffff7806196 in RTGL1::VulkanDevice::Render (this=0x5555568f18e0, cmd=0x55555bcfac50, drawInfo=...)

at /home/keith/Development/QuakeRT/RayTracedGL1-quake/Source/VulkanDevice.cpp:709

6 0x00007ffff7806f75 in RTGL1::VulkanDevice::DrawFrame (this=0x5555568f18e0, drawInfo=0x7fffffffd100)

at /home/keith/Development/QuakeRT/RayTracedGL1-quake/Source/VulkanDevice.cpp:867

7 0x00007ffff780031d in Call<void (RTGL1::VulkanDevice::)(RgDrawFrameInfo const), RgDrawFrameInfo const*&> (rgInstance=0x400,

f=(void (RTGL1::VulkanDevice::*)(RTGL1::VulkanDevice * const, const RgDrawFrameInfo *)) 0x7ffff7806d7c <RTGL1::VulkanDevice::DrawFrame(RgDrawFrameInfo const*)>) at /home/keith/Development/QuakeRT/RayTracedGL1-quake/Source/RTGL1.cpp:124

8 0x00007ffff78003d0 in rgDrawFrame (rgInstance=0x400, pDrawInfo=0x7fffffffd100)

at /home/keith/Development/QuakeRT/RayTracedGL1-quake/Source/RTGL1.cpp:269

9 0x00005555555a680c in GL_EndRenderingTask ()

10 0x00005555555a7fbf in GL_EndRendering ()

11 0x0000555555597422 in SCR_UpdateScreen ()

12 0x000055555557e262 in Con_Printf ()

--Type for more, q to quit, c to continue without paging--

13 0x0000555555644cf4 in S_Init ()

14 0x00005555555abc18 in Host_Init ()

15 0x00005555555690e0 in main ()

pppbb commented 10 months ago

@RamblingMadMan Any thoughts on this?

pppbb commented 10 months ago

Ping @RamblingMadMan

pppbb commented 10 months ago

@RamblingMadMan Could you post instructions how to build FSR2 linux binaries or send me already built ones? I could build libRayTracedGL1 on my system. Or maybe there is a possibility to disable FSR at compilation?

pppbb commented 9 months ago

@RamblingMadMan Please respond.

RamblingMadMan commented 9 months ago

@RamblingMadMan Please respond.

You can build FSR2 with this pull request: https://github.com/GPUOpen-Effects/FidelityFX-FSR2/pull/60 Given you mentioned DLSS earlier, that might be worth investigating with RTGL1 as well.

pppbb commented 9 months ago

I have fsr2 binaries now but i still get compile errors in libRayTracedGL1.

pppbb commented 9 months ago

What distro are you using? I assume you are a busy man but could you compile everything again?