mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-16 20:31:20 +00:00
Metal: Remap vertex buffers when using Tint
Otherwise bindings with non-zero groups get through to the Tint MSL backend and break assumptions. Bug: tint:104, dawn:571 Change-Id: I8d95ba142a386ff0d992ffe5f88a7acf93057ce1 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54960 Auto-Submit: James Price <jrprice@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
5b6c1ebce7
commit
dcb82432fb
@ -112,9 +112,14 @@ namespace dawn_native { namespace metal {
|
||||
for (VertexBufferSlot slot :
|
||||
IterateBitSet(renderPipeline->GetVertexBufferSlotsUsed())) {
|
||||
uint32_t metalIndex = renderPipeline->GetMtlVertexBufferIndex(slot);
|
||||
DAWN_UNUSED(metalIndex);
|
||||
// TODO(crbug.com/tint/104): Tell Tint to map (kPullingBufferBindingSet, slot) to
|
||||
// this MSL buffer index.
|
||||
|
||||
// Tell Tint to map (kPullingBufferBindingSet, slot) to this MSL buffer index.
|
||||
BindingPoint srcBindingPoint{static_cast<uint32_t>(kPullingBufferBindingSet),
|
||||
static_cast<uint8_t>(slot)};
|
||||
BindingPoint dstBindingPoint{0, metalIndex};
|
||||
if (srcBindingPoint != dstBindingPoint) {
|
||||
bindingPoints.emplace(srcBindingPoint, dstBindingPoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (GetDevice()->IsRobustnessEnabled()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user