mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-05 01:24:14 +01:00
[d3d11] Set zero stride when binding null vertex buffer
This commit is contained in:
parent
146fbd492f
commit
8e11630370
@ -3124,13 +3124,21 @@ namespace dxvk {
|
||||
D3D11Buffer* pBuffer,
|
||||
UINT Offset,
|
||||
UINT Stride) {
|
||||
EmitCs([
|
||||
cSlotId = Slot,
|
||||
cBufferSlice = pBuffer != nullptr ? pBuffer->GetBufferSlice(Offset) : DxvkBufferSlice(),
|
||||
cStride = Stride
|
||||
] (DxvkContext* ctx) {
|
||||
ctx->bindVertexBuffer(cSlotId, cBufferSlice, cStride);
|
||||
});
|
||||
if (likely(pBuffer != nullptr)) {
|
||||
EmitCs([
|
||||
cSlotId = Slot,
|
||||
cBufferSlice = pBuffer->GetBufferSlice(Offset),
|
||||
cStride = Stride
|
||||
] (DxvkContext* ctx) {
|
||||
ctx->bindVertexBuffer(cSlotId, cBufferSlice, cStride);
|
||||
});
|
||||
} else {
|
||||
EmitCs([
|
||||
cSlotId = Slot
|
||||
] (DxvkContext* ctx) {
|
||||
ctx->bindVertexBuffer(cSlotId, DxvkBufferSlice(), 0);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user