1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 05:52:11 +01:00

[d3d11] Add some likely/unlikely around CS flushes

This commit is contained in:
Philip Rebohle 2019-06-02 20:29:22 +02:00
parent 6cbd611190
commit 818704d413

View File

@ -829,7 +829,7 @@ namespace dxvk {
void EmitCs(Cmd&& command) {
m_cmdData = nullptr;
if (!m_csChunk->push(command)) {
if (unlikely(!m_csChunk->push(command))) {
EmitCsChunk(std::move(m_csChunk));
m_csChunk = AllocCsChunk();
@ -842,7 +842,7 @@ namespace dxvk {
M* data = m_csChunk->pushCmd<M, Cmd, Args...>(
command, std::forward<Args>(args)...);
if (!data) {
if (unlikely(!data)) {
EmitCsChunk(std::move(m_csChunk));
m_csChunk = AllocCsChunk();
@ -855,7 +855,7 @@ namespace dxvk {
}
void FlushCsChunk() {
if (m_csChunk->commandCount() != 0) {
if (likely(m_csChunk->commandCount())) {
EmitCsChunk(std::move(m_csChunk));
m_csChunk = AllocCsChunk();
m_cmdData = nullptr;