mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 12:32:43 +00:00
d3d12: Use custom loadvertex like call
This commit is contained in:
parent
b63c77ca7d
commit
ac352cd083
@ -706,13 +706,35 @@ void D3D12GSRender::ExecCMD()
|
||||
{
|
||||
InitDrawBuffers();
|
||||
|
||||
// Init vertex count
|
||||
// TODO: Very hackish, clean this
|
||||
if (m_indexed_array.m_count)
|
||||
{
|
||||
for (u32 i = 0; i < m_vertex_count; ++i)
|
||||
{
|
||||
if (!m_vertex_data[i].IsEnabled()) continue;
|
||||
if (!m_vertex_data[i].addr) continue;
|
||||
|
||||
const u32 tsize = m_vertex_data[i].GetTypeSize();
|
||||
m_vertex_data[i].data.resize((m_indexed_array.index_min + m_indexed_array.index_max - m_indexed_array.index_min + 1) * tsize * m_vertex_data[i].size);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (u32 i = 0; i < m_vertex_count; ++i)
|
||||
{
|
||||
if (!m_vertex_data[i].IsEnabled()) continue;
|
||||
if (!m_vertex_data[i].addr) continue;
|
||||
|
||||
const u32 tsize = m_vertex_data[i].GetTypeSize();
|
||||
m_vertex_data[i].data.resize((m_draw_array_first + m_draw_array_count) * tsize * m_vertex_data[i].size);
|
||||
}
|
||||
}
|
||||
|
||||
ID3D12GraphicsCommandList *commandList;
|
||||
m_device->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, getCurrentResourceStorage().m_commandAllocator, nullptr, IID_PPV_ARGS(&commandList));
|
||||
getCurrentResourceStorage().m_inflightCommandList.push_back(commandList);
|
||||
|
||||
if (m_indexed_array.m_count)
|
||||
LoadVertexData(m_indexed_array.index_min, m_indexed_array.index_max - m_indexed_array.index_min + 1);
|
||||
|
||||
if (m_indexed_array.m_count || m_draw_array_count)
|
||||
{
|
||||
const std::pair<std::vector<D3D12_VERTEX_BUFFER_VIEW>, D3D12_INDEX_BUFFER_VIEW> &vertexIndexBufferViews = EnableVertexData(m_indexed_array.m_count ? true : false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user