Quantcast
Channel: Questions in topic: "compute shader"
Viewing all articles
Browse latest Browse all 287

How do you see the results of compute shaders in the debugger?

$
0
0
I'm trying to write some particularly complex functionality on the gpu that would be really good if I could at least see the raw data but I have no idea how. Initially i thought my code was broken which led me to post this on stack exchange ... http://gamedev.stackexchange.com/questions/116323/how-do-i-build-a-3d-array-result-set-from-a-compute-shader-in-unity ... I now think its possible that unity has some sort of wierd bug that prevents me looking at the result of populating a 3d array from a compute shader result. The code in this example isn't complex so there's no reason why it shouldn't behave just like debugging any other cpu code as all I want to do is put some values in to the buffer on the gpu then download and view them by putting a breakpoint in after my buffer.GetData(cpuArray) call. Does anyone know if there's a work around or something for this? It's worth noting that in the edit where I generate a 3,3,3 array of voxels where all but the center one are "empty" (-1 values) and the center is full (1 value) the array in the debugger tells me all elements are 0 values (apparently not populated) but the cpu meshing code is then able to generate the correct cube mesh from it after (not included in the question). So what must I do to inspect arrays populated from the GPU? I have tried the following with 0 success ... - Normal VS debugging (breapoint look at value / add to watch window to see value) - Load solution in to MonoDev and repeat the VS procedure - Debug.Log(values)

Viewing all articles
Browse latest Browse all 287

Trending Articles