mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 07:39:45 -06:00
add new statistics for gpu buffer streaming
This commit is contained in:
@ -345,6 +345,8 @@ ID3D11Buffer* &PixelShaderCache::GetConstantBuffer()
|
||||
memcpy(map.pData, psconstants, sizeof(psconstants));
|
||||
D3D::context->Unmap(pscbuf, 0);
|
||||
pscbufchanged = false;
|
||||
|
||||
ADDSTAT(stats.thisFrame.bytesUniformStreamed, sizeof(psconstants));
|
||||
}
|
||||
return pscbuf;
|
||||
}
|
||||
|
@ -128,6 +128,9 @@ void VertexManager::PrepareDrawBuffers()
|
||||
memcpy((u16*)map.pData + m_point_draw_index, GetPointIndexBuffer(), sizeof(u16) * IndexGenerator::GetPointindexLen());
|
||||
D3D::context->Unmap(m_index_buffers[m_current_index_buffer], 0);
|
||||
m_index_buffer_cursor += iCount;
|
||||
|
||||
ADDSTAT(stats.thisFrame.bytesVertexStreamed, vSize);
|
||||
ADDSTAT(stats.thisFrame.bytesIndexStreamed, iCount*sizeof(u16));
|
||||
}
|
||||
|
||||
static const float LINE_PT_TEX_OFFSETS[8] = {
|
||||
|
@ -50,6 +50,8 @@ ID3D11Buffer* &VertexShaderCache::GetConstantBuffer()
|
||||
memcpy(map.pData, vsconstants, sizeof(vsconstants));
|
||||
D3D::context->Unmap(vscbuf, 0);
|
||||
vscbufchanged = false;
|
||||
|
||||
ADDSTAT(stats.thisFrame.bytesUniformStreamed, sizeof(vsconstants));
|
||||
}
|
||||
return vscbuf;
|
||||
}
|
||||
|
@ -197,6 +197,8 @@ void VertexManager::PrepareDrawBuffers(u32 stride)
|
||||
D3D::SetIndices(m_index_buffers[m_current_index_buffer]);
|
||||
}
|
||||
|
||||
ADDSTAT(stats.thisFrame.bytesVertexStreamed, datasize);
|
||||
ADDSTAT(stats.thisFrame.bytesIndexStreamed, IndexDataSize);
|
||||
}
|
||||
|
||||
void VertexManager::DrawVertexBuffer(int stride)
|
||||
|
@ -171,6 +171,8 @@ void ProgramShaderCache::UploadConstants()
|
||||
glBindBufferRange(GL_UNIFORM_BUFFER, 1, s_buffer->getBuffer(), offset, s_ps_data_size);
|
||||
glBindBufferRange(GL_UNIFORM_BUFFER, 2, s_buffer->getBuffer(), offset + s_vs_data_offset, s_vs_data_size);
|
||||
s_ubo_dirty = false;
|
||||
|
||||
ADDSTAT(stats.thisFrame.bytesUniformStreamed, s_ubo_buffer_size);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -104,6 +104,9 @@ void VertexManager::PrepareDrawBuffers(u32 stride)
|
||||
{
|
||||
s_offset[2] = s_indexBuffer->Upload((u8*)GetPointIndexBuffer(), point_index_size * sizeof(u16));
|
||||
}
|
||||
|
||||
ADDSTAT(stats.thisFrame.bytesVertexStreamed, vertex_data_size);
|
||||
ADDSTAT(stats.thisFrame.bytesIndexStreamed, index_size);
|
||||
}
|
||||
|
||||
void VertexManager::Draw(u32 stride)
|
||||
|
Reference in New Issue
Block a user