Commit 789124f7 authored by Laszlo Agocs's avatar Laszlo Agocs

d3d: Fix skipping the last byte for static buffers

parent 12164c5e
......@@ -457,7 +457,7 @@ void QRhiD3D11::commitResourceUpdates(QRhiResourceUpdateBatch *resourceUpdates)
D3D11_BOX box;
box.left = box.top = box.front = 0;
box.back = box.bottom = 1;
box.right = u.data.size() - 1;
box.right = u.data.size(); // no -1: right, bottom, back are exclusive, see D3D11_BOX doc
context->UpdateSubresource(bufD->buffer, 0, &box, u.data.constData(), 0, 0);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment