Hi,
I've got a problem with one of my geometry shaders with my game. It works on most hardware, but on a subset of machines, typically laptops with integrated graphics (although I do have a laptop with integrated graphics where it works), my shader doesn't work (that is, nothing is displayed on screen, but the calls themselves don't appear to be failing). My code is set up to require feature level 10.0 and on the machines where it's not working they're reporting as supporting this level. Everything else is working on these machines (I also have a pure 9.3 feature level fallback renderer which works perfectly on these machines).
Usually, I'd run the code through the debugger however these machines aren'are either not mine or struggle to run visual studio (it's an old netbook - Acer Aspire) hence that's an easy option.
So 2 questions:
1. Can anyone think of why one might see such issues between feature level 10.0 compatible hardware and if there are issues, then how would one programmatically identify this?
2. Suggestions on how to diagnose these problems without the use of VS
Background:
The shaders are designed to render a fluid in the game. The fluid is stored in a single large byte array where each droplet of fluid is represented by 4 bits (2 for colour, 2 for movement, ie. each byte represents 2 droplets). The location of the fluid is determined by its psition in the array. The geometry shader takes in an int and then, using bit masks, potentially outputs a set of vertices for every valid droplet. The rendering code then copies the original array to a buffer:
D3D11_INPUT_ELEMENT_DESC waterLayout[1];
waterLayout[0].AlignedByteOffset = 0;
waterLayout[0].Format = DXGI_FORMAT::DXGI_FORMAT_R32_UINT;
waterLayout[0].InputSlot = 0;
waterLayout[0].InputSlotClass = D3D11_INPUT_CLASSIFICATION::D3D11_INPUT_PER_VERTEX_DATA;
waterLayout[0].InstanceDataStepRate = 0;
waterLayout[0].SemanticIndex = 0;
waterLayout[0].SemanticName = "BITMASK";
auto hr = dxDevice->CreateInputLayout(waterLayout, 1, _vertexShader->shaderByteCode.get(), _vertexShader->shaderByteCodeLength, &_inputLayout);
I've attached the files in case there's anything obvious
Thanks
DataStructures.hlsl
GeometryShader.hlsl
PixelShader.hlsl
VertexShader.hlsl
↧