Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

156 Neutral

About nwdg

  • Rank

Personal Information

  • Interests
  1. I'll try with NSight!   I've got a uniform buffer with a world matrix for the camera transform and a float4 filled with rendering mode data and volume info (this could probably be arranged better using push constants for the volume volume info and render mode). Volume data is a 3D texture loaded with staging. Raytracer output is a 2D texture that is not staged, created with STORAGE | SAMPLED usage flags, accessed as storage in compute, accessed with a sampler in fragment stage.   Would you do this different?
  2.   Yes of course! Totally agreed.   If you are interested we can compare the machine code!
  3.   Hey, sorry for the late reply!   the GPU I've used for comparison is a GTX 970 3Gb   SPIR-V renders at 4/5 fps@720p, both ported to GLSL or directly compiled from HLSL. HLSL renders at 25/27 fps@720p.   Did a second test with a bunch of spheres and simple lambertian reflectors/metal materials and the results are: SPIR-V renders at ~2500 fps@720p HLSL renders at ~400 fps@720p   Seems like that dynamic loop is killing SPIR-V!
  4. Fixed it! I overlooked an uint underflow when calculating the number of iterations! When the underflow occured it generated an infinite loop.   So the shader finishes, and you get the crash afterwards? Try a vkQueueWaitIdle() after vkQueueSubmit(), to quickly ensure all work has finished and see if it prevents the crash.   Or does the shader never finish? Usually this causes a bluescreen or a unstable system (Do NOT save your source files in this case - reboot instantly. I've lost some work with this) Probably a infinite loop - implement an additional max counter to prevent this and see if the crash goes away.     Can you post some performance comparision if you get it to work?         I can only access my laptop in the weekend, I'll post some comparisons tomorrow!
  5. Hi, I'm porting a D3D11 program I wrote to Vulkan, in this program I do volume ray casting. It is a simple fog simulator I'm expering with.  At each ray step I need to do some operations that requires a dynamic for loop, as the iterations number is evaluated on the fly at each step along the ray. This means no loop unrolling or compiler optimizations. On the other hand the hlsl code works just fine keeping a real-time speed.  In my Vulkan implementation, it just crashes after the compute fence goes timeout because of resource locking. What "fixed" the problem is using a constant value in the loop of course, but that kinda kills my algorithm. Does anybody have tried anything like this? Have some infos on this matter? I would like to dig into this further. Here's a pseudo-code of my ray marching algorithm vec3 ForEachStep() { vec3 retVal = 0, 0, 0; numIter = FunctionCallToDetermine(); for i = 0 to numIter { retVal += FuncCall(); } return retVal; } const uint numSteps = someValue; void main() { // do other unrelated stuff vec3 color = 0, 0, 0 for i = 0 to numSteps { // do other unrelated stuff color += ForEachStep(); // do other unrelated stuff } // store color to texture target } Cheers!
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!