diff --git a/renderdoc/api/replay/control_types.h b/renderdoc/api/replay/control_types.h index 35de08a85..7d4c25cfa 100644 --- a/renderdoc/api/replay/control_types.h +++ b/renderdoc/api/replay/control_types.h @@ -35,6 +35,7 @@ struct MeshFormat ResourceId idxbuf; uint64_t idxoffs; uint32_t idxByteWidth; + int32_t baseVertex; ResourceId buf; uint64_t offset; diff --git a/renderdoc/api/replay/data_types.h b/renderdoc/api/replay/data_types.h index c2ffb221c..42510ec85 100644 --- a/renderdoc/api/replay/data_types.h +++ b/renderdoc/api/replay/data_types.h @@ -184,6 +184,7 @@ struct FetchDrawcall numIndices = 0; numInstances = 0; indexOffset = 0; + baseVertex = 0; vertexOffset = 0; instanceOffset = 0; @@ -214,6 +215,7 @@ struct FetchDrawcall uint32_t numIndices; uint32_t numInstances; + int32_t baseVertex; uint32_t indexOffset; uint32_t vertexOffset; uint32_t instanceOffset; diff --git a/renderdoc/core/replay_proxy.cpp b/renderdoc/core/replay_proxy.cpp index 3cc197d1c..c0fb66f04 100644 --- a/renderdoc/core/replay_proxy.cpp +++ b/renderdoc/core/replay_proxy.cpp @@ -1020,6 +1020,7 @@ void Serialiser::Serialise(const char *name, FetchDrawcall &el) Serialise("", el.numIndices); Serialise("", el.numInstances); + Serialise("", el.baseVertex); Serialise("", el.indexOffset); Serialise("", el.vertexOffset); Serialise("", el.instanceOffset); @@ -1045,7 +1046,7 @@ void Serialiser::Serialise(const char *name, FetchDrawcall &el) Serialise("", el.events); Serialise("", el.children); - SIZE_CHECK(FetchDrawcall, 208); + SIZE_CHECK(FetchDrawcall, 216); } template<> @@ -1076,6 +1077,7 @@ void Serialiser::Serialise(const char *name, MeshFormat &el) Serialise("", el.idxbuf); Serialise("", el.idxoffs); Serialise("", el.idxByteWidth); + Serialise("", el.baseVertex); Serialise("", el.buf); Serialise("", el.offset); Serialise("", el.stride); diff --git a/renderdoc/driver/d3d11/d3d11_analyse.cpp b/renderdoc/driver/d3d11/d3d11_analyse.cpp index 0490f05f2..d192ce6a9 100644 --- a/renderdoc/driver/d3d11/d3d11_analyse.cpp +++ b/renderdoc/driver/d3d11/d3d11_analyse.cpp @@ -6136,7 +6136,7 @@ vector D3D11DebugManager::PixelHistory(uint32_t frameID, vect m_pImmediateContext->DrawIndexedInstanced(Topology_NumVerticesPerPrimitive(draw->topology), RDCMAX(1U, draw->numInstances), draw->indexOffset + Topology_VertexOffset(draw->topology, history[h].primitiveID), - draw->vertexOffset, draw->instanceOffset); + draw->baseVertex, draw->instanceOffset); } else { diff --git a/renderdoc/driver/d3d11/d3d11_context_wrap.cpp b/renderdoc/driver/d3d11/d3d11_context_wrap.cpp index 1a60fb69f..b05c5aa7a 100644 --- a/renderdoc/driver/d3d11/d3d11_context_wrap.cpp +++ b/renderdoc/driver/d3d11/d3d11_context_wrap.cpp @@ -3447,7 +3447,7 @@ bool WrappedID3D11DeviceContext::Serialise_DrawIndexedInstanced(UINT IndexCountP draw.numIndices = IndexCountPerInstance; draw.numInstances = InstanceCount; draw.indexOffset = StartIndexLocation; - draw.vertexOffset = BaseVertexLocation; + draw.baseVertex = BaseVertexLocation; draw.instanceOffset = StartInstanceLocation; draw.flags |= eDraw_Drawcall|eDraw_Instanced|eDraw_UseIBuffer; @@ -3567,7 +3567,7 @@ bool WrappedID3D11DeviceContext::Serialise_DrawIndexed(UINT IndexCount_, UINT St FetchDrawcall draw; draw.name = name; draw.numIndices = IndexCount; - draw.vertexOffset = BaseVertexLocation; + draw.baseVertex = BaseVertexLocation; draw.indexOffset = StartIndexLocation; draw.flags |= eDraw_Drawcall|eDraw_UseIBuffer; @@ -3787,19 +3787,29 @@ bool WrappedID3D11DeviceContext::Serialise_DrawIndexedInstancedIndirect(ID3D11Bu if(m_pDevice->GetResourceManager()->HasLiveResource(BufferForArgs)) { ID3D11Buffer *argBuffer = (ID3D11Buffer *)m_pDevice->GetResourceManager()->GetLiveResource(BufferForArgs); + + vector argarray; + m_pDevice->GetDebugManager()->GetBufferData(argBuffer, AlignedByteOffsetForArgs, 5*sizeof(uint32_t), argarray, true); - vector args; - m_pDevice->GetDebugManager()->GetBufferData(argBuffer, AlignedByteOffsetForArgs, 5*sizeof(uint32_t), args, true); - uint32_t *uargs = (uint32_t *)&args[0]; + struct DrawArgs + { + uint32_t IndexCountPerInstance; + uint32_t InstanceCount; + uint32_t StartIndexLocation; + int32_t BaseVertexLocation; + uint32_t StartInstanceLocation; + }; - name = "DrawIndexedInstancedIndirect(<" + ToStr::Get(uargs[0]) - + ", " + ToStr::Get(uargs[1]) + ">)"; + DrawArgs *args = (DrawArgs *)&argarray[0]; - draw.numIndices = uargs[0]; - draw.numInstances = uargs[1]; - draw.indexOffset = uargs[2]; - draw.vertexOffset = uargs[3]; - draw.instanceOffset = uargs[4]; + draw.numIndices = args->IndexCountPerInstance; + draw.numInstances = args->InstanceCount; + draw.indexOffset = args->StartIndexLocation; + draw.baseVertex = args->BaseVertexLocation; + draw.instanceOffset = args->StartInstanceLocation; + + name = "DrawIndexedInstancedIndirect(<" + ToStr::Get(draw.numIndices) + + ", " + ToStr::Get(draw.numInstances) + ">)"; } draw.name = name; diff --git a/renderdoc/driver/d3d11/d3d11_debug.cpp b/renderdoc/driver/d3d11/d3d11_debug.cpp index 68b78d4bc..8dcf15f47 100644 --- a/renderdoc/driver/d3d11/d3d11_debug.cpp +++ b/renderdoc/driver/d3d11/d3d11_debug.cpp @@ -3654,6 +3654,7 @@ MeshFormat D3D11DebugManager::GetPostVSBuffers(uint32_t frameID, uint32_t eventI ret.idxbuf = ResourceId(); ret.idxoffs = 0; ret.idxByteWidth = s.idxFmt == DXGI_FORMAT_R16_UINT ? 2 : 4; + ret.baseVertex = 0; if(s.buf) ret.buf = ((WrappedID3D11Buffer *)s.buf)->GetResourceID(); @@ -3868,11 +3869,23 @@ void D3D11DebugManager::InitPostVSBuffers(uint32_t frameID, uint32_t eventID) // only read as many indices as were available in the buffer uint32_t numIndices = RDCMIN(uint32_t(index16 ? idxdata.size()/2 : idxdata.size()/4), drawcall->numIndices); + uint32_t idxclamp = 0; + if(drawcall->baseVertex < 0) + idxclamp = uint32_t(-drawcall->baseVertex); + // grab all unique vertex indices referenced for(uint32_t i=0; i < numIndices; i++) { uint32_t i32 = index16 ? uint32_t(idx16[i]) : idx32[i]; + // apply baseVertex but clamp to 0 (don't allow index to become negative) + if(i32 < idxclamp) + i32 = 0; + else if(drawcall->baseVertex < 0) + i32 -= idxclamp; + else if(drawcall->baseVertex > 0) + i32 += drawcall->baseVertex; + auto it = std::lower_bound(indices.begin(), indices.end(), i32); if(it != indices.end() && *it == i32) @@ -3919,24 +3932,31 @@ void D3D11DebugManager::InitPostVSBuffers(uint32_t frameID, uint32_t eventID) SAFE_RELEASE(idxBuf); if(drawcall->flags & eDraw_Instanced) - m_pImmediateContext->DrawIndexedInstanced((UINT)indices.size(), drawcall->numInstances, 0, drawcall->vertexOffset, drawcall->instanceOffset); + m_pImmediateContext->DrawIndexedInstanced((UINT)indices.size(), drawcall->numInstances, 0, 0, drawcall->instanceOffset); else - m_pImmediateContext->DrawIndexed((UINT)indices.size(), 0, drawcall->vertexOffset); + m_pImmediateContext->DrawIndexed((UINT)indices.size(), 0, 0); m_pImmediateContext->IASetPrimitiveTopology(topo); m_pImmediateContext->IASetIndexBuffer(UNWRAP(WrappedID3D11Buffer, origBuf), idxFmt, idxOffs); // rebase existing index buffer to point to the right elements in our stream-out'd // vertex buffer - if(index16) + for(uint32_t i=0; i < numIndices; i++) { - for(uint32_t i=0; i < numIndices; i++) - idx16[i] = uint16_t(indexRemap[ idx16[i] ]); - } - else - { - for(uint32_t i=0; i < numIndices; i++) - idx32[i] = uint32_t(indexRemap[ idx32[i] ]); + uint32_t i32 = index16 ? uint32_t(idx16[i]) : idx32[i]; + + // apply baseVertex but clamp to 0 (don't allow index to become negative) + if(i32 < idxclamp) + i32 = 0; + else if(drawcall->baseVertex < 0) + i32 -= idxclamp; + else if(drawcall->baseVertex > 0) + i32 += drawcall->baseVertex; + + if(index16) + idx16[i] = uint16_t(indexRemap[ i32 ]); + else + idx32[i] = uint32_t(indexRemap[ i32 ]); } desc.ByteWidth = (UINT)idxdata.size(); @@ -4210,11 +4230,11 @@ void D3D11DebugManager::InitPostVSBuffers(uint32_t frameID, uint32_t eventID) if(drawcall->flags & eDraw_Instanced) { m_pImmediateContext->DrawIndexedInstanced(drawcall->numIndices, drawcall->numInstances, drawcall->indexOffset, - drawcall->vertexOffset, drawcall->instanceOffset); + drawcall->baseVertex, drawcall->instanceOffset); } else { - m_pImmediateContext->DrawIndexed(drawcall->numIndices, drawcall->indexOffset, drawcall->vertexOffset); + m_pImmediateContext->DrawIndexed(drawcall->numIndices, drawcall->indexOffset, drawcall->baseVertex); } } else @@ -4692,7 +4712,7 @@ void D3D11DebugManager::RenderMesh(uint32_t frameID, uint32_t eventID, const vec buf = UNWRAP(WrappedID3D11Buffer, it->second.m_Buffer); m_pImmediateContext->IASetIndexBuffer(buf, fmt.idxByteWidth == 2 ? DXGI_FORMAT_R16_UINT : DXGI_FORMAT_R32_UINT, (UINT)fmt.idxoffs); - m_pImmediateContext->DrawIndexed(fmt.numVerts, 0, 0); + m_pImmediateContext->DrawIndexed(fmt.numVerts, 0, fmt.baseVertex); } else { @@ -4772,7 +4792,7 @@ void D3D11DebugManager::RenderMesh(uint32_t frameID, uint32_t eventID, const vec } if(cfg.position.idxByteWidth) - m_pImmediateContext->DrawIndexed(cfg.position.numVerts, 0, 0); + m_pImmediateContext->DrawIndexed(cfg.position.numVerts, 0, cfg.position.baseVertex); else m_pImmediateContext->Draw(cfg.position.numVerts, 0); @@ -4802,7 +4822,7 @@ void D3D11DebugManager::RenderMesh(uint32_t frameID, uint32_t eventID, const vec m_pImmediateContext->IASetPrimitiveTopology(topo); if(cfg.position.idxByteWidth) - m_pImmediateContext->DrawIndexed(cfg.position.numVerts, 0, 0); + m_pImmediateContext->DrawIndexed(cfg.position.numVerts, 0, cfg.position.baseVertex); else m_pImmediateContext->Draw(cfg.position.numVerts, 0); } @@ -4888,9 +4908,24 @@ void D3D11DebugManager::RenderMesh(uint32_t frameID, uint32_t eventID, const vec uint32_t numIndices = RDCMIN(cfg.position.numVerts, uint32_t(idxdata.size()/bytesize)); m_HighlightCache.indices.resize(numIndices); + + uint32_t sub = uint32_t(-cfg.position.baseVertex); + uint32_t add = uint32_t(cfg.position.baseVertex); for(uint32_t i=0; i < numIndices; i++) + { m_HighlightCache.indices[i] = index16 ? uint32_t(idx16[i]) : idx32[i]; + + if(cfg.position.baseVertex < 0) + { + if(m_HighlightCache.indices[i] < sub) + m_HighlightCache.indices[i] = 0; + else + m_HighlightCache.indices[i] -= sub; + } + else + m_HighlightCache.indices[i] += add; + } } } diff --git a/renderdoc/driver/gl/gl_common.h b/renderdoc/driver/gl/gl_common.h index b682abb3b..9587f3438 100644 --- a/renderdoc/driver/gl/gl_common.h +++ b/renderdoc/driver/gl/gl_common.h @@ -162,7 +162,7 @@ struct DrawElementsIndirectCommand uint32_t count; uint32_t instanceCount; uint32_t firstIndex; - uint32_t baseVertex; + int32_t baseVertex; uint32_t baseInstance; }; diff --git a/renderdoc/driver/gl/gl_debug.cpp b/renderdoc/driver/gl/gl_debug.cpp index b9ddbbb69..8ff1d0879 100644 --- a/renderdoc/driver/gl/gl_debug.cpp +++ b/renderdoc/driver/gl/gl_debug.cpp @@ -2698,7 +2698,7 @@ void GLReplay::InitPostVSBuffers(uint32_t frameID, uint32_t eventID) } else { - gl.glDrawElementsBaseVertex(eGL_POINTS, (GLsizei)indices.size(), eGL_UNSIGNED_INT, NULL, drawcall->vertexOffset); + gl.glDrawElementsBaseVertex(eGL_POINTS, (GLsizei)indices.size(), eGL_UNSIGNED_INT, NULL, drawcall->baseVertex); } // delete the buffer, we don't need it anymore @@ -3104,12 +3104,12 @@ void GLReplay::InitPostVSBuffers(uint32_t frameID, uint32_t eventID) { gl.glDrawElementsInstancedBaseVertexBaseInstance(drawtopo, drawcall->numIndices, idxType, (const void *)uintptr_t(drawcall->indexOffset*drawcall->indexByteWidth), drawcall->numInstances, - drawcall->vertexOffset, drawcall->instanceOffset); + drawcall->baseVertex, drawcall->instanceOffset); } else { gl.glDrawElementsBaseVertex(drawtopo, drawcall->numIndices, idxType, - (const void *)uintptr_t(drawcall->indexOffset*drawcall->indexByteWidth), drawcall->vertexOffset); + (const void *)uintptr_t(drawcall->indexOffset*drawcall->indexByteWidth), drawcall->baseVertex); } } gl.glEndTransformFeedback(); @@ -3334,6 +3334,7 @@ MeshFormat GLReplay::GetPostVSBuffers(uint32_t frameID, uint32_t eventID, uint32 ret.idxbuf = ResourceId(); ret.idxoffs = 0; ret.idxByteWidth = s.idxByteWidth; + ret.baseVertex = 0; if(s.buf) ret.buf = m_pDriver->GetResourceManager()->GetID(BufferRes(NULL, s.buf)); @@ -3532,7 +3533,7 @@ void GLReplay::RenderMesh(uint32_t frameID, uint32_t eventID, const vectorGetResourceManager()->GetCurrentResource(cfg.position.idxbuf).name; gl.glBindBuffer(eGL_ELEMENT_ARRAY_BUFFER, ib); } - gl.glDrawElements(topo, cfg.position.numVerts, idxtype, (const void *)uintptr_t(cfg.position.idxoffs)); + gl.glDrawElementsBaseVertex(topo, cfg.position.numVerts, idxtype, (const void *)uintptr_t(cfg.position.idxoffs), cfg.position.baseVertex); } else { @@ -3728,7 +3729,7 @@ void GLReplay::RenderMesh(uint32_t frameID, uint32_t eventID, const vectorGetResourceManager()->GetCurrentResource(cfg.position.idxbuf).name; gl.glBindBuffer(eGL_ELEMENT_ARRAY_BUFFER, ib); } - gl.glDrawElements(topo != eGL_PATCHES ? topo : eGL_POINTS, cfg.position.numVerts, idxtype, (const void *)uintptr_t(cfg.position.idxoffs)); + gl.glDrawElementsBaseVertex(topo != eGL_PATCHES ? topo : eGL_POINTS, cfg.position.numVerts, idxtype, (const void *)uintptr_t(cfg.position.idxoffs), cfg.position.baseVertex); } else { @@ -3876,6 +3877,22 @@ void GLReplay::RenderMesh(uint32_t frameID, uint32_t eventID, const vectorvertexOffset; + vertexIndexOffset = minIndex + drawcall->baseVertex; // set numVerts numVerts = maxIndex - minIndex + 1; @@ -5248,7 +5248,7 @@ void VulkanDebugManager::InitPostVSBuffers(uint32_t frameID, uint32_t eventID) // do single draw modifiedstate.BeginRenderPassAndApplyState(cmd); - ObjDisp(cmd)->CmdDrawIndexed(Unwrap(cmd), (uint32_t)indices.size(), drawcall->numInstances, 0, drawcall->vertexOffset, drawcall->instanceOffset); + ObjDisp(cmd)->CmdDrawIndexed(Unwrap(cmd), (uint32_t)indices.size(), drawcall->numInstances, 0, drawcall->baseVertex, drawcall->instanceOffset); modifiedstate.EndRenderPass(cmd); // rebase existing index buffer to point to the right elements in our stream-out'd @@ -5463,6 +5463,7 @@ MeshFormat VulkanDebugManager::GetPostVSBuffers(uint32_t frameID, uint32_t event ret.idxByteWidth = 0; } ret.idxoffs = 0; + ret.baseVertex = 0; if(s.buf != VK_NULL_HANDLE) ret.buf = GetResID(s.buf); diff --git a/renderdoc/driver/vulkan/vk_replay.cpp b/renderdoc/driver/vulkan/vk_replay.cpp index 1c475bc50..118422f9b 100644 --- a/renderdoc/driver/vulkan/vk_replay.cpp +++ b/renderdoc/driver/vulkan/vk_replay.cpp @@ -1598,7 +1598,7 @@ void VulkanReplay::RenderMesh(uint32_t frameID, uint32_t eventID, const vectorCmdBindIndexBuffer(Unwrap(cmd), Unwrap(ib), fmt.idxoffs, idxtype); } - vt->CmdDrawIndexed(Unwrap(cmd), fmt.numVerts, 1, 0, 0, 0); + vt->CmdDrawIndexed(Unwrap(cmd), fmt.numVerts, 1, 0, fmt.baseVertex, 0); } else { @@ -1684,7 +1684,7 @@ void VulkanReplay::RenderMesh(uint32_t frameID, uint32_t eventID, const vectorCmdBindIndexBuffer(Unwrap(cmd), Unwrap(ib), cfg.position.idxoffs, idxtype); } - vt->CmdDrawIndexed(Unwrap(cmd), cfg.position.numVerts, 1, 0, 0, 0); + vt->CmdDrawIndexed(Unwrap(cmd), cfg.position.numVerts, 1, 0, cfg.position.baseVertex, 0); } else { @@ -1731,7 +1731,7 @@ void VulkanReplay::RenderMesh(uint32_t frameID, uint32_t eventID, const vectorCmdBindIndexBuffer(Unwrap(cmd), Unwrap(ib), cfg.position.idxoffs, idxtype); } - vt->CmdDrawIndexed(Unwrap(cmd), cfg.position.numVerts, 1, 0, 0, 0); + vt->CmdDrawIndexed(Unwrap(cmd), cfg.position.numVerts, 1, 0, cfg.position.baseVertex, 0); } else { @@ -1962,6 +1962,22 @@ void VulkanReplay::RenderMesh(uint32_t frameID, uint32_t eventID, const vectorindexCount; draw.numInstances = args->instanceCount; draw.indexOffset = args->firstIndex; - draw.vertexOffset = args->vertexOffset; + draw.baseVertex = args->vertexOffset; draw.instanceOffset = args->firstInstance; draw.flags |= eDraw_Drawcall|eDraw_UseIBuffer|eDraw_Instanced|eDraw_Indirect; diff --git a/renderdocui/Interop/FetchInfo.cs b/renderdocui/Interop/FetchInfo.cs index 220dc7fa4..03e3b9fd1 100644 --- a/renderdocui/Interop/FetchInfo.cs +++ b/renderdocui/Interop/FetchInfo.cs @@ -336,6 +336,7 @@ namespace renderdoc public UInt32 numIndices; public UInt32 numInstances; + public Int32 baseVertex; public UInt32 indexOffset; public UInt32 vertexOffset; public UInt32 instanceOffset; @@ -380,6 +381,7 @@ namespace renderdoc public ResourceId idxbuf; public UInt64 idxoffs; public UInt32 idxByteWidth; + public Int32 baseVertex; public ResourceId buf; public UInt64 offset; diff --git a/renderdocui/Windows/BufferViewer.cs b/renderdocui/Windows/BufferViewer.cs index 312ba6698..2bbf1acf7 100644 --- a/renderdocui/Windows/BufferViewer.cs +++ b/renderdocui/Windows/BufferViewer.cs @@ -1177,6 +1177,9 @@ namespace renderdocui.Windows { maxIdx = Math.Max(maxIndex, maxIdx); offset = input.Drawcall.vertexOffset; + + if (input.Drawcall.baseVertex > 0) + maxIdx += (uint)input.Drawcall.baseVertex; } System.Diagnostics.Debug.Assert(pi != pv || (pi == false && pv == false)); @@ -1497,6 +1500,21 @@ namespace renderdocui.Windows else { index = data.Indices[rownum]; + + // apply base vertex but clamp to 0 if subtracting + if (input.Drawcall.baseVertex < 0) + { + uint subtract = (uint)(-input.Drawcall.baseVertex); + + if (index < subtract) + index = 0; + else + index -= subtract; + } + else if (input.Drawcall.baseVertex > 0) + { + index += (uint)input.Drawcall.baseVertex; + } } } else if ((input.Drawcall.flags & DrawcallFlags.UseIBuffer) != 0 && state == m_VSIn) @@ -1774,6 +1792,29 @@ namespace renderdocui.Windows else { dataIndex = data.DataIndices[rowIdx]; + + if (state == m_VSIn) + { + // apply base vertex but clamp to 0 if subtracting + if (input.Drawcall.baseVertex < 0) + { + uint subtract = (uint)(-input.Drawcall.baseVertex); + + if (dataIndex < subtract) + { + dataIndex = 0; + outOfBoundsIdx = true; + } + else + { + dataIndex -= subtract; + } + } + else if (input.Drawcall.baseVertex > 0) + { + dataIndex += (uint)input.Drawcall.baseVertex; + } + } } } else if (input.Drawcall != null && (input.Drawcall.flags & DrawcallFlags.UseIBuffer) != 0 && @@ -1786,8 +1827,34 @@ namespace renderdocui.Windows uint displayIndex = dataIndex; if (data.Indices != null && rowIdx < data.Indices.Length) + { displayIndex = data.Indices[rowIdx]; + if (input.Drawcall != null && (input.Drawcall.flags & DrawcallFlags.UseIBuffer) != 0 && + (state == m_VSIn || state == m_VSOut)) + { + // apply base vertex but clamp to 0 if subtracting + if (input.Drawcall.baseVertex < 0) + { + uint subtract = (uint)(-input.Drawcall.baseVertex); + + if (displayIndex < subtract) + { + displayIndex = 0; + outOfBoundsIdx = true; + } + else + { + displayIndex -= subtract; + } + } + else if (input.Drawcall.baseVertex > 0) + { + displayIndex += (uint)input.Drawcall.baseVertex; + } + } + } + object[] rowdata = null; int x = 0; @@ -2636,6 +2703,7 @@ namespace renderdocui.Windows m_MeshDisplay.position.idxbuf = ResourceId.Null; m_MeshDisplay.position.idxoffs = 0; m_MeshDisplay.position.idxByteWidth = 0; + m_MeshDisplay.position.baseVertex = 0; m_MeshDisplay.position.buf = ResourceId.Null; m_MeshDisplay.position.offset = 0; @@ -2661,6 +2729,7 @@ namespace renderdocui.Windows m_MeshDisplay.position.idxbuf = ResourceId.Null; m_MeshDisplay.position.idxoffs = 0; m_MeshDisplay.position.idxByteWidth = 0; + m_MeshDisplay.position.baseVertex = 0; m_MeshDisplay.position.buf = ResourceId.Null; m_MeshDisplay.position.offset = 0; @@ -2683,6 +2752,7 @@ namespace renderdocui.Windows m_MeshDisplay.position.idxoffs = m_VSIn.m_Input.IndexOffset + ui.m_Input.Drawcall.indexOffset * ui.m_Input.Drawcall.indexByteWidth; m_MeshDisplay.position.idxByteWidth = ui.m_Input.Drawcall.indexByteWidth; + m_MeshDisplay.position.baseVertex = ui.m_Input.Drawcall.baseVertex; m_MeshDisplay.position.buf = m_VSIn.m_Input.Buffers[pos.buffer]; m_MeshDisplay.position.offset = pos.offset + ui.m_Input.Offsets[pos.buffer] + @@ -2697,6 +2767,7 @@ namespace renderdocui.Windows m_MeshDisplay.position.idxbuf = ui.m_Data.PostVS.idxbuf; m_MeshDisplay.position.idxoffs = 0; m_MeshDisplay.position.idxByteWidth = ui.m_Input.Drawcall.indexByteWidth; + m_MeshDisplay.position.baseVertex = ui.m_Data.PostVS.baseVertex; m_MeshDisplay.position.buf = ui.m_Data.PostVS.buf; m_MeshDisplay.position.offset = ui.m_Data.PostVS.offset + pos.offset; @@ -2711,6 +2782,7 @@ namespace renderdocui.Windows m_MeshDisplay.position.idxbuf = ResourceId.Null; m_MeshDisplay.position.idxoffs = 0; m_MeshDisplay.position.idxByteWidth = 0; + m_MeshDisplay.position.baseVertex = 0; } else { @@ -2734,6 +2806,7 @@ namespace renderdocui.Windows m_MeshDisplay.secondary.idxbuf = ResourceId.Null; m_MeshDisplay.secondary.idxoffs = 0; m_MeshDisplay.secondary.idxByteWidth = 0; + m_MeshDisplay.secondary.baseVertex = 0; m_MeshDisplay.secondary.buf = ResourceId.Null; m_MeshDisplay.secondary.offset = 0;