Store index format and topology in drawcall, to accommodate GL

* D3D11 just latches the state from the input assembler state into the
  drawcall when it's being added. GL stores the state per-draw.
This commit is contained in:
baldurk
2015-01-15 17:17:12 +00:00
parent b9f1b9820f
commit f013f6fd29
19 changed files with 190 additions and 262 deletions
@@ -77,14 +77,10 @@ namespace renderdoc
public class IndexBuffer
{
public ResourceId Buffer;
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
public ResourceFormat Format;
public UInt32 Offset;
};
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
public IndexBuffer ibuffer;
public PrimitiveTopology Topology;
};
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
public InputAssembler m_IA;
+3
View File
@@ -329,6 +329,9 @@ namespace renderdoc
public UInt32 vertexOffset;
public UInt32 instanceOffset;
public UInt32 indexByteWidth;
public PrimitiveTopology topology;
public ResourceId context;
public double duration;
+1 -12
View File
@@ -57,18 +57,7 @@ namespace renderdoc
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public VertexBuffer[] vbuffers;
[StructLayout(LayoutKind.Sequential)]
public class IndexBuffer
{
public ResourceId Buffer;
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
public ResourceFormat Format;
public UInt32 Offset;
};
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
public IndexBuffer ibuffer;
public PrimitiveTopology Topology;
public ResourceId ibuffer;
};
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
public VertexInputs m_VtxIn;