mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 10:49:14 +00:00
Only allow CompareFunction::Undefined for samplerDesc.compare
The various backends hit UNREACHABLE() during pipeline creation if depthStencil.depthCompare (or likewise for stencil) are set to undefined. Bug: chromium:1195694 Change-Id: Ibf4d8d47b4c98343dce3caccdf79ee90c0de899f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46863 Auto-Submit: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
1e45c5e764
commit
5d2f2042de
@@ -58,7 +58,14 @@ namespace dawn_native {
|
||||
DAWN_TRY(ValidateAddressMode(descriptor->addressModeU));
|
||||
DAWN_TRY(ValidateAddressMode(descriptor->addressModeV));
|
||||
DAWN_TRY(ValidateAddressMode(descriptor->addressModeW));
|
||||
DAWN_TRY(ValidateCompareFunction(descriptor->compare));
|
||||
|
||||
// CompareFunction::Undefined is tagged as invalid because it can't be used, except for the
|
||||
// SamplerDescriptor where it is a special value that means the sampler is not a
|
||||
// comparison-sampler.
|
||||
if (descriptor->compare != wgpu::CompareFunction::Undefined) {
|
||||
DAWN_TRY(ValidateCompareFunction(descriptor->compare));
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user