mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-12 04:54:17 +01:00
[d3d11] Add some likely/unlikely around CS flushes
This commit is contained in:
parent
6cbd611190
commit
818704d413
@ -829,7 +829,7 @@ namespace dxvk {
|
|||||||
void EmitCs(Cmd&& command) {
|
void EmitCs(Cmd&& command) {
|
||||||
m_cmdData = nullptr;
|
m_cmdData = nullptr;
|
||||||
|
|
||||||
if (!m_csChunk->push(command)) {
|
if (unlikely(!m_csChunk->push(command))) {
|
||||||
EmitCsChunk(std::move(m_csChunk));
|
EmitCsChunk(std::move(m_csChunk));
|
||||||
|
|
||||||
m_csChunk = AllocCsChunk();
|
m_csChunk = AllocCsChunk();
|
||||||
@ -842,7 +842,7 @@ namespace dxvk {
|
|||||||
M* data = m_csChunk->pushCmd<M, Cmd, Args...>(
|
M* data = m_csChunk->pushCmd<M, Cmd, Args...>(
|
||||||
command, std::forward<Args>(args)...);
|
command, std::forward<Args>(args)...);
|
||||||
|
|
||||||
if (!data) {
|
if (unlikely(!data)) {
|
||||||
EmitCsChunk(std::move(m_csChunk));
|
EmitCsChunk(std::move(m_csChunk));
|
||||||
|
|
||||||
m_csChunk = AllocCsChunk();
|
m_csChunk = AllocCsChunk();
|
||||||
@ -855,7 +855,7 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FlushCsChunk() {
|
void FlushCsChunk() {
|
||||||
if (m_csChunk->commandCount() != 0) {
|
if (likely(m_csChunk->commandCount())) {
|
||||||
EmitCsChunk(std::move(m_csChunk));
|
EmitCsChunk(std::move(m_csChunk));
|
||||||
m_csChunk = AllocCsChunk();
|
m_csChunk = AllocCsChunk();
|
||||||
m_cmdData = nullptr;
|
m_cmdData = nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user