How to render in Dx12 without a vertex buffer

Started by
2 comments, last by Hodgman 6 years, 8 months ago

I found this for DX11: https://msdn.microsoft.com/en-us/library/windows/desktop/bb232912

I am not sure how to use this with Dx12. It doesn't complain about the HLSL and I use:
m_commandList->IASetVertexBuffers(0, 0, nullptr);

and it compiles and runs, but still can't see my triangle.

Rest of the code shown in the link I don't know how to use it for Dx12.

Advertisement

The biggest issue here is your referencing D3D11 materials, and trying to apply that to 12. These APIs may have similar looking methods, but they couldn't be any further apart in the pipeline configuration. I only know a little about 12, but I'm pretty sure there wouldn't be an easy way to integrate the deprecated effects framework with it, not at least without getting very creative.

The shader itself may accomplish pushing the vertices/texels to the rasterizer, but that still doesn't address the multiple issues you may have on the app side. Especially with 12...Are you syncing correctly? Are you handling your command Allocators, and Queue appropriately? How's does the PSO look? Even in D3D11 you had a lot of points of failure. D3D12 is even worse.

I'm gonna parrot your previous thread and say use PIX at the very least. Or, if nothing at all. At least use the built in Visual Studio Graphics Debugger so you can ascertain which stage may not be running.

Load it up in renderdoc and you'll be able to see your triangle as a table of numbers that were produced by the vertex shader.

This topic is closed to new replies.

Advertisement