I'm currently trying to get a basic Forward+ renderer working. I've managed to get the first two steps which is the z-prepass, and the lighting stage working. In the lighting stage i have an RWBuffer<uint> that has the format of R8_UINT that stores the tile light indices. That R8_UINT buffer is then passed on to the forward shading stage as an Buffer<uint>. My problem is that when it reads the value of the Buffer<uint>, it always returns 0 even if the buffer contains a different value.
I have verified that i am binding the buffer correctly and its value after the lighting stage(compute shader) through the VS Graphics Debugger. Currently, i'm setting my scene so that there are no lights and the light indices buffer are all filled with the max lights value of 256. When it gets to my forward shader though, when it reads the light indices buffer it is always 0. I have checked the buffer bound to my light indices buffer and the xbyte values are all 0xff which should give me 255(uint) but all i get when i read the buffer are all 0. Do i need to do something with the buffer after the compute shader but just before it gets to my forward shader?
My implementation is an adoption from MJP's IndexedDeferred demo.