Closed ColinSalem closed 2 years ago
If there are some other people with graphics programming skills and AMD GPUs... then yes. It would be really nice to have AMD GPU support
I also have an AMD. An RX 6700 XT. It would be nice if AMD Raytracing would also be supported.
Greetings Timo
What is stopping support on AMD? I do not own any RDNA2 GPU, so I cannot test, but from what I read here VK_KHR_raytracing_pipeline is used, which is supported on AMD cards.
On Linux, it can even work with older cards thanks to the RADV driver being able to emulate raytracing. (If the game works on Linux, I can also test there, since I have a Polaris GPU.)
I don't have access to my RX 6700XT at the moment, so I can't test anything, but I think I may have found a possible culprit. https://github.com/sultim-t/RayTracedGL1/blob/a48aa5d69b103efaab9842eabe5ae639bd034463/Source/RayTracingPipeline.cpp#L196 IIRC RDNA2 currently only supports a maxRayRecursionDepth of 1, which is the minimum required by the Vulkan Specification. It is also the maximum recursion depth for RT pipelines. Since the requested pipeline would require a larger depth than supported, the RDNA2 card would not be able to provide the requested pipeline.
VUID-VkRayTracingPipelineCreateInfoKHR-maxPipelineRayRecursionDepth-03589
maxPipelineRayRecursionDepth must be less than or equal to [VkPhysicalDeviceRayTracingPipelinePropertiesKHR](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceRayTracingPipelinePropertiesKHR.html)::maxRayRecursionDepth
This actually seems to be an AMD driver limitation, since RADV seems to expose 31: see this list of GPUs that report 31. It includes all RADV entries, from Tahiti (i.e. HD 79xx) to Sienna Cichild (i.e. RX 6800-6900XT). RADV emulates it on the former but is also capable of using hardware acceleration on the latter. (Although I do think the performance is not that good compared to AMD's proprietary Windows driver).
I don't have access to my RX 6700XT at the moment, so I can't test anything, but I think I may have found a possible culprit. https://github.com/sultim-t/RayTracedGL1/blob/a48aa5d69b103efaab9842eabe5ae639bd034463/Source/RayTracingPipeline.cpp#L196 IIRC RDNA2 currently only supports a maxRayRecursionDepth of 1, which is the minimum required by the Vulkan Specification. It is also the maximum recursion depth for RT pipelines. Since the requested pipeline would require a larger depth than supported, the RDNA2 card would not be able to provide the requested pipeline.
I'm rather new to this so I'm not sure if this is how you would fix it, but I downloaded the repo for RayTracedGL1, changed pipelineInfo.maxPipelineRayRecursionDepth = 2
to pipelineInfo.maxPipelineRayRecursionDepth = 1
, and built the dll and it didn't fix the issue, so assuming I'm doing this right that's either not the problem or is only part of the problem.
I happen to own a 6700XT as well. I'll take a quick look. I just got it to build and it errors out really early, so it should be an easy fix hopefully.
Well, that was easy. I'll submit a PR to get the fix mainlined.
Well, that was easy. I'll submit a PR to get the fix mainlined.
Nice man! I'll consider this issue closed now, can't wait to be able to play this :)
Are there any plans for adding support for AMD Gpus? Would love to play this.