I am currently building a Direct3D12 game engine in C++ and I'm currently implementing PBR. I attempted to compute an irradiance map for ambient lighting but I keep getting a TDR delay. I do not yet understand compute shaders so instead, I render each face of the skybox individually into a texture and then I copy that into a face of the cubemap. After generating each face, I wait for the operation to complete before doing the next face. Unless the pixel shader just returns a solid color or if only do one face, then the device always gets removed for taking too long.
I tried not waiting for the commands to complete but then it just crashes on present. I tried copying my opengl shader from a previous project that never caused a TDR delay but that didn't work.
Is there some way to let windows know that my app isn't frozen? Do I have to use compute shaders or multiple threads? The full source can be found here