How to extract vertices from a DirectX 12 game

Viewed 26

I'm trying to extract geometry from a DirectX 12 game "Forza Horizon 4 Demo", and I'm having trouble with getting the vertices. For the particular DrawIndexedInstance call I am interested in, it followed a IASetVertexBuffers call that has a pViews[0].BufferLocation GPU location that does not match any ID3D12Resource's GetGPUVirtualAddress's I have looked at.

I get resources after CreateCommittedResource, CopyBufferRegion and unmap. If the BufferLocation was not an exact resource gpu location, I also tried finding the closest resource and assuming an offset to get to the BufferLocation, but I didn't find a resource with enough space for the offset. Another strange thing is that the pViews[0].StrideInBytes is only 8 bytes, which seems a bit small if a vertex needs to store position xyz and texture uv at the minimum (probably also expect a normal).

I managed to extract vertices fine from Quake3 ioq3-renderer-bgfx DirectX 12, it focused on using CopyBufferRegion to populate vertices (and it was easier since I had the source code to learn from). I also looked at renderdoc but it doesn't seem to support UWP applications (Forza Horizon 4 Demo is UWP). UWP makes things a lot harder, but I solved all the UWP problems and am just stuck on the vertex buffer.

I am just asking for ideas of things to try next to extract vertices from that IASetVertexBuffers call.

0 Answers
Related