Hi guys,
Working through a problem at the moment with myself and my team member around an issue with development.
So, here goes.
My PC currently has a ATI R290 card , his a GTX 960 card. (this may or may not be relevant based on some testing).
Currently I have instancing working with my game so basically I have 2 buffers being loaded into the GPU with instance and vertex data. This works perfectly well on my R290 and my test machine (sans dev environment) with a ATI 7800. The buffer is a row_major matrix that Im loading for each instance.
On my team members PC, he has a GTX 960. The issue is, and I have walked him through it is that the Instance buffer isn't loading in. Now, I think I have coded in a way to be an issue.
In the input assembler stage, I am loading the instance buffer in before loading the vertex buffer, in 2 separate calls. I am also setting some other variables in the input assembler along the way. Now they aren't being set in the same spot at the same time, but very close, only a few lines of code difference (But instance is being loaded ahead of vertex data). This shouldn't really be an issue, and its not on my ATI cards.
But my colleague has mentioned that the input assembler stage can be a little tempramental depending on the card being used. SO.
I've rewritten the code to load the buffers at the same time. 2 different versons of the calls, 1 call using the Sharpdx buffer binding (setvertexbuffers call), and the other by passing the input array in including strides etc (different version sharpdx setvertexbuffers call).
He is to test these, but I am wondering if there is anything else I may need to consider.
We narrowed it down to the instance buffer matrix not being passed by passing matrix via constant buffer instead and testing the code worked (rendered all objects in same spot, but it worked). When it didn't work, it was rendering black triangles into the first half of the top right quartile of the screen (I had this also while developing instancing and it is consistent).
Sorry for the long post, I'm endeavouring to work through this one. Will let you know my results, just any other suggestions? At the least I've rewritten the code to test other vectors of attack, I hope he will be coming back with answers stating it works. Otherwise, where to from here?