mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-12 13:54:14 +01:00
[d3d11] Use EmitCs for Input Assembly methods
This commit is contained in:
parent
e951a5ea0c
commit
7fad731096
@ -720,10 +720,15 @@ namespace dxvk {
|
|||||||
if (m_state.ia.inputLayout != inputLayout) {
|
if (m_state.ia.inputLayout != inputLayout) {
|
||||||
m_state.ia.inputLayout = inputLayout;
|
m_state.ia.inputLayout = inputLayout;
|
||||||
|
|
||||||
if (inputLayout != nullptr)
|
if (inputLayout != nullptr) {
|
||||||
inputLayout->BindToContext(m_context);
|
EmitCs([inputLayout] (DxvkContext* ctx) {
|
||||||
else
|
inputLayout->BindToContext(ctx);
|
||||||
m_context->setInputLayout(0, nullptr, 0, nullptr);
|
});
|
||||||
|
} else {
|
||||||
|
EmitCs([inputLayout] (DxvkContext* ctx) {
|
||||||
|
ctx->setInputLayout(0, nullptr, 0, nullptr);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -763,7 +768,9 @@ namespace dxvk {
|
|||||||
|
|
||||||
}();
|
}();
|
||||||
|
|
||||||
m_context->setInputAssemblyState(iaState);
|
EmitCs([iaState] (DxvkContext* ctx) {
|
||||||
|
ctx->setInputAssemblyState(iaState);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -784,12 +791,19 @@ namespace dxvk {
|
|||||||
m_state.ia.vertexBuffers[i].stride = pStrides[i];
|
m_state.ia.vertexBuffers[i].stride = pStrides[i];
|
||||||
|
|
||||||
if (newBuffer != nullptr) {
|
if (newBuffer != nullptr) {
|
||||||
m_context->bindVertexBuffer(StartSlot + i,
|
EmitCs([
|
||||||
newBuffer->GetBufferSlice(pOffsets[i]),
|
slotId = StartSlot + i,
|
||||||
pStrides[i]);
|
offset = pOffsets[i],
|
||||||
|
stride = pStrides[i],
|
||||||
|
slice = newBuffer->GetBufferSlice(pOffsets[i])
|
||||||
|
] (DxvkContext* ctx) {
|
||||||
|
ctx->bindVertexBuffer(
|
||||||
|
slotId, slice, stride);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
m_context->bindVertexBuffer(StartSlot + i,
|
EmitCs([cSlotId = StartSlot + i] (DxvkContext* ctx) {
|
||||||
DxvkBufferSlice(), 0);
|
ctx->bindVertexBuffer(cSlotId, DxvkBufferSlice(), 0);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -817,9 +831,11 @@ namespace dxvk {
|
|||||||
default: Logger::err(str::format("D3D11: Invalid index format: ", Format));
|
default: Logger::err(str::format("D3D11: Invalid index format: ", Format));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_context->bindIndexBuffer(
|
EmitCs([indexType,
|
||||||
newBuffer->GetBufferSlice(Offset),
|
slice = newBuffer->GetBufferSlice(Offset)
|
||||||
indexType);
|
] (DxvkContext* ctx) {
|
||||||
|
ctx->bindIndexBuffer(slice, indexType);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user