Pass mayCollide argument to Tint's BindingRemapper

Added in https://dawn-review.googlesource.com/c/tint/+/50742
Bindings may not collide except on the D3D12 backend where we use
the register offset as the binding number. Offsets may alias if
they are for different HLSL register types (buffer, texture, etc.)

Bug: tint:797
Change-Id: I020e3b5cd1d35fdf5678b587225507e0cf24f5b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50801
Commit-Queue: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
Austin Eng 2021-05-12 17:01:01 +00:00 committed by Commit Bot service account
parent 88d3afe19c
commit 81addb75cb
2 changed files with 6 additions and 2 deletions

View File

@ -258,8 +258,11 @@ namespace dawn_native { namespace d3d12 {
transformManager.Add<tint::transform::Renamer>();
transformManager.Add<tint::transform::Hlsl>();
// D3D12 registers like `t3` and `c3` have the same bindingOffset number in the
// remapping but should not be considered a collision because they have different types.
const bool mayCollide = true;
transformInputs.Add<BindingRemapper::Remappings>(std::move(bindingPoints),
std::move(accessControls));
std::move(accessControls), mayCollide);
tint::Program program;
tint::transform::DataMap transformOutputs;

View File

@ -172,7 +172,8 @@ namespace dawn_native { namespace vulkan {
tint::transform::DataMap transformInputs;
transformInputs.Add<BindingRemapper::Remappings>(std::move(bindingPoints),
std::move(accessControls));
std::move(accessControls),
/* mayCollide */ false);
tint::Program program;
DAWN_TRY_ASSIGN(program, RunTransforms(&transformManager, GetTintProgram(), transformInputs,