mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 10:49:14 +00:00
Allowed mismatch sampler/comparison sampler when using SPIRV-Cross
When SPIRV-Cross we always reflect samplers as regular samplers. A recent change implementing proper validation broke programs using comparison samplers in that path. Skip that bit of validation when using SPIRV-Cross, that hack can be removed once we use Tint unconditionally for reflection. Also reenables some BGL-ShaderModule compatibility tests with SPIRV-Cross to cover the "fixed" validation. Bug: dawn:571 Bug: dawn:367 Change-Id: I2d1a65aaea717b4927ac4e838942547a1b413d33 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56900 Commit-Queue: Ben Clayton <bclayton@google.com> Auto-Submit: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
3be120026d
commit
7ae959da60
@@ -484,7 +484,7 @@ namespace dawn_native {
|
||||
return std::move(result);
|
||||
}
|
||||
|
||||
MaybeError ValidateCompatibilityWithBindGroupLayout(DeviceBase*,
|
||||
MaybeError ValidateCompatibilityWithBindGroupLayout(DeviceBase* device,
|
||||
BindGroupIndex group,
|
||||
const EntryPointMetadata& entryPoint,
|
||||
const BindGroupLayoutBase* layout) {
|
||||
@@ -622,6 +622,13 @@ namespace dawn_native {
|
||||
}
|
||||
|
||||
case BindingInfoType::Sampler:
|
||||
// Allow mismatched samplers when using SPIRV-Cross since we can't reflect
|
||||
// data that's precise enough.
|
||||
// TODO(dawn:571): Remove once we use Tint unconditionnally for reflection.
|
||||
if (!device->IsToggleEnabled(Toggle::UseTintGenerator)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((layoutInfo.sampler.type == wgpu::SamplerBindingType::Comparison) !=
|
||||
shaderInfo.sampler.isComparison) {
|
||||
return DAWN_VALIDATION_ERROR(
|
||||
|
||||
Reference in New Issue
Block a user