BoolConvertible: Hacks to fix MSVC build
This commit is contained in:
parent
883681cafb
commit
5772c54b99
|
@ -153,7 +153,7 @@ namespace dawn::native {
|
|||
texture->GetSampleCount(), texture, bindingInfo.texture.multisampled);
|
||||
|
||||
// TODO(dawn:563): Improve error message.
|
||||
DAWN_INVALID_IF((supportedTypes & requiredType) == 0,
|
||||
DAWN_INVALID_IF((supportedTypes & requiredType).value == 0,
|
||||
"Texture component type usage mismatch.");
|
||||
|
||||
DAWN_INVALID_IF(
|
||||
|
|
|
@ -84,19 +84,19 @@ namespace dawn::native {
|
|||
}
|
||||
|
||||
bool Format::HasDepth() const {
|
||||
return (aspects & Aspect::Depth) != 0;
|
||||
return (aspects & Aspect::Depth).value != 0;
|
||||
}
|
||||
|
||||
bool Format::HasStencil() const {
|
||||
return (aspects & Aspect::Stencil) != 0;
|
||||
return (aspects & Aspect::Stencil).value != 0;
|
||||
}
|
||||
|
||||
bool Format::HasDepthOrStencil() const {
|
||||
return (aspects & (Aspect::Depth | Aspect::Stencil)) != 0;
|
||||
return (aspects & (Aspect::Depth | Aspect::Stencil)).value != 0;
|
||||
}
|
||||
|
||||
bool Format::IsMultiPlanar() const {
|
||||
return (aspects & (Aspect::Plane0 | Aspect::Plane1)) != 0;
|
||||
return (aspects & (Aspect::Plane0 | Aspect::Plane1)).value != 0;
|
||||
}
|
||||
|
||||
bool Format::CopyCompatibleWith(const Format& format) const {
|
||||
|
@ -196,7 +196,7 @@ namespace dawn::native {
|
|||
UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
ASSERT((sampleTypes & SampleTypeBit::Float) != 0);
|
||||
ASSERT((sampleTypes & SampleTypeBit::Float).value != 0);
|
||||
firstAspect->baseType = wgpu::TextureComponentType::Float;
|
||||
}
|
||||
firstAspect->supportedSampleTypes = sampleTypes;
|
||||
|
|
|
@ -500,7 +500,7 @@ namespace dawn::native {
|
|||
|
||||
// TODO(dawn:563): Provide info about the sample types.
|
||||
DAWN_INVALID_IF((SampleTypeToSampleTypeBit(layoutInfo.texture.sampleType) &
|
||||
shaderInfo.texture.compatibleSampleTypes) == 0,
|
||||
shaderInfo.texture.compatibleSampleTypes).value == 0,
|
||||
"The sample type in the shader is not compatible with the "
|
||||
"sample type of the layout.");
|
||||
|
||||
|
|
|
@ -317,7 +317,7 @@ namespace dawn::native {
|
|||
// doesn't support depth/stencil formats on 3D textures.
|
||||
DAWN_INVALID_IF(
|
||||
descriptor->dimension != wgpu::TextureDimension::e2D &&
|
||||
(format->aspects & (Aspect::Depth | Aspect::Stencil)) != 0,
|
||||
(format->aspects & (Aspect::Depth | Aspect::Stencil)).value != 0,
|
||||
"The dimension (%s) of a texture with a depth/stencil format (%s) is not 2D.",
|
||||
descriptor->dimension, format->format);
|
||||
|
||||
|
|
Loading…
Reference in New Issue