From 715ac712c693d113f681a2b81299b5253cef7fbc Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Thu, 21 Sep 2017 15:00:12 -0400 Subject: [PATCH] Document a bug in glTFViewer --- examples/glTFViewer/glTFViewer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/glTFViewer/glTFViewer.cpp b/examples/glTFViewer/glTFViewer.cpp index 2273f87ba4..66eb41aa14 100644 --- a/examples/glTFViewer/glTFViewer.cpp +++ b/examples/glTFViewer/glTFViewer.cpp @@ -502,6 +502,9 @@ namespace { } const MaterialInfo& material = getMaterial(iPrim.material, strides[0], strides[1], strides[2]); material.uniformBuffer.TransitionUsage(nxt::BufferUsageBit::TransferDst); + // TODO(cwallez@google.com): This is updating the uniform buffer with a device-level command + // but the draw is queue level command that is pipelined. This causes bad rendering for models + // that use the same part multiple time. material.uniformBuffer.SetSubData(0, sizeof(u_transform_block) / sizeof(uint32_t), reinterpret_cast(&transforms));