Commit bf4268a3 by Austin Kinross Committed by Commit Bot

Fix misc VS2019 bool conversion warnings

BUG=angleproject:3921 Change-Id: I06de5131f98b27c2556ed60dd7228c9cfa154802 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1811858 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 2f2ea8b4
...@@ -101,7 +101,7 @@ ShaderVariable &ShaderVariable::operator=(const ShaderVariable &other) ...@@ -101,7 +101,7 @@ ShaderVariable &ShaderVariable::operator=(const ShaderVariable &other)
offset = other.offset; offset = other.offset;
readonly = other.readonly; readonly = other.readonly;
writeonly = other.writeonly; writeonly = other.writeonly;
writeonly = other.index; index = other.index;
interpolation = other.interpolation; interpolation = other.interpolation;
isInvariant = other.isInvariant; isInvariant = other.isInvariant;
return *this; return *this;
......
...@@ -924,7 +924,8 @@ Error Display::createContext(const Config *configuration, ...@@ -924,7 +924,8 @@ Error Display::createContext(const Config *configuration,
if (usesProgramCacheControl) if (usesProgramCacheControl)
{ {
bool programCacheControlEnabled = bool programCacheControlEnabled =
mAttributeMap.get(EGL_CONTEXT_PROGRAM_BINARY_CACHE_ENABLED_ANGLE, GL_FALSE); (mAttributeMap.get(EGL_CONTEXT_PROGRAM_BINARY_CACHE_ENABLED_ANGLE, GL_FALSE) ==
GL_TRUE);
// A program cache size of zero indicates it should be disabled. // A program cache size of zero indicates it should be disabled.
if (!programCacheControlEnabled || mMemoryProgramCache.maxSize() == 0) if (!programCacheControlEnabled || mMemoryProgramCache.maxSize() == 0)
{ {
......
...@@ -315,7 +315,8 @@ bool VertexArray::bindVertexBufferImpl(const Context *context, ...@@ -315,7 +315,8 @@ bool VertexArray::bindVertexBufferImpl(const Context *context,
mCachedTransformFeedbackConflictedBindingsMask.set( mCachedTransformFeedbackConflictedBindingsMask.set(
bindingIndex, boundBuffer->isBoundForTransformFeedbackAndOtherUse()); bindingIndex, boundBuffer->isBoundForTransformFeedbackAndOtherUse());
mState.mClientMemoryAttribsMask &= ~binding->getBoundAttributesMask(); mState.mClientMemoryAttribsMask &= ~binding->getBoundAttributesMask();
updateCachedMappedArrayBuffers(boundBuffer->isMapped(), binding->getBoundAttributesMask()); updateCachedMappedArrayBuffers((boundBuffer->isMapped() == GL_TRUE),
binding->getBoundAttributesMask());
} }
else else
{ {
......
...@@ -2227,8 +2227,8 @@ angle::Result Renderer11::copyImageInternal(const gl::Context *context, ...@@ -2227,8 +2227,8 @@ angle::Result Renderer11::copyImageInternal(const gl::Context *context,
{ {
TextureHelper11 tex; TextureHelper11 tex;
ANGLE_TRY(resolveMultisampledTexture(context, sourceRenderTarget, ANGLE_TRY(resolveMultisampledTexture(context, sourceRenderTarget,
colorAttachment->getDepthSize(), colorAttachment->getDepthSize() > 0,
colorAttachment->getStencilSize(), &tex)); colorAttachment->getStencilSize() > 0, &tex));
D3D11_SHADER_RESOURCE_VIEW_DESC viewDesc; D3D11_SHADER_RESOURCE_VIEW_DESC viewDesc;
viewDesc.Format = sourceRenderTarget->getFormatSet().srvFormat; viewDesc.Format = sourceRenderTarget->getFormatSet().srvFormat;
......
...@@ -391,7 +391,7 @@ angle::Result TextureStorage11::getSRVForImage(const gl::Context *context, ...@@ -391,7 +391,7 @@ angle::Result TextureStorage11::getSRVForImage(const gl::Context *context,
const d3d11::SharedSRV **outSRV) const d3d11::SharedSRV **outSRV)
{ {
// TODO(Xinghua.cao@intel.com): Add solution to handle swizzle required. // TODO(Xinghua.cao@intel.com): Add solution to handle swizzle required.
ImageKey key(imageUnit.level, imageUnit.layered, imageUnit.layer, imageUnit.access, ImageKey key(imageUnit.level, (imageUnit.layered == GL_TRUE), imageUnit.layer, imageUnit.access,
imageUnit.format); imageUnit.format);
ANGLE_TRY(getCachedOrCreateSRVForImage(context, key, outSRV)); ANGLE_TRY(getCachedOrCreateSRVForImage(context, key, outSRV));
return angle::Result::Continue; return angle::Result::Continue;
...@@ -423,7 +423,7 @@ angle::Result TextureStorage11::getUAVForImage(const gl::Context *context, ...@@ -423,7 +423,7 @@ angle::Result TextureStorage11::getUAVForImage(const gl::Context *context,
const d3d11::SharedUAV **outUAV) const d3d11::SharedUAV **outUAV)
{ {
// TODO(Xinghua.cao@intel.com): Add solution to handle swizzle required. // TODO(Xinghua.cao@intel.com): Add solution to handle swizzle required.
ImageKey key(imageUnit.level, imageUnit.layered, imageUnit.layer, imageUnit.access, ImageKey key(imageUnit.level, (imageUnit.layered == GL_TRUE), imageUnit.layer, imageUnit.access,
imageUnit.format); imageUnit.format);
ANGLE_TRY(getCachedOrCreateUAVForImage(context, key, outUAV)); ANGLE_TRY(getCachedOrCreateUAVForImage(context, key, outUAV));
return angle::Result::Continue; return angle::Result::Continue;
......
...@@ -341,7 +341,7 @@ bool RoHelper::SupportedWindowsRelease() ...@@ -341,7 +341,7 @@ bool RoHelper::SupportedWindowsRelease()
if (FAILED(hr)) if (FAILED(hr))
{ {
return isSupported; return !!isSupported;
} }
Microsoft::WRL::ComPtr<ABI::Windows::Foundation::Metadata::IApiInformationStatics> api; Microsoft::WRL::ComPtr<ABI::Windows::Foundation::Metadata::IApiInformationStatics> api;
...@@ -351,19 +351,19 @@ bool RoHelper::SupportedWindowsRelease() ...@@ -351,19 +351,19 @@ bool RoHelper::SupportedWindowsRelease()
if (FAILED(hr)) if (FAILED(hr))
{ {
return isSupported; return !!isSupported;
} }
hr = GetStringReference(L"Windows.Foundation.UniversalApiContract", &contractName, hr = GetStringReference(L"Windows.Foundation.UniversalApiContract", &contractName,
&contractNameHeader); &contractNameHeader);
if (FAILED(hr)) if (FAILED(hr))
{ {
return isSupported; return !!isSupported;
} }
api->IsApiContractPresentByMajor(contractName, 6, &isSupported); api->IsApiContractPresentByMajor(contractName, 6, &isSupported);
return isSupported; return !!isSupported;
} }
HRESULT RoHelper::GetStringReference(PCWSTR source, HSTRING *act, HSTRING_HEADER *header) HRESULT RoHelper::GetStringReference(PCWSTR source, HSTRING *act, HSTRING_HEADER *header)
......
...@@ -1901,7 +1901,7 @@ angle::Result ContextVk::syncState(const gl::Context *context, ...@@ -1901,7 +1901,7 @@ angle::Result ContextVk::syncState(const gl::Context *context,
// No additional work is needed here. We will update the pipeline desc later. // No additional work is needed here. We will update the pipeline desc later.
invalidateDefaultAttributes( invalidateDefaultAttributes(
context->getStateCache().getActiveDefaultAttribsMask()); context->getStateCache().getActiveDefaultAttribsMask());
bool useVertexBuffer = (mProgram->getState().getMaxActiveAttribLocation()); bool useVertexBuffer = (mProgram->getState().getMaxActiveAttribLocation() > 0);
mNonIndexedDirtyBitsMask.set(DIRTY_BIT_VERTEX_BUFFERS, useVertexBuffer); mNonIndexedDirtyBitsMask.set(DIRTY_BIT_VERTEX_BUFFERS, useVertexBuffer);
mIndexedDirtyBitsMask.set(DIRTY_BIT_VERTEX_BUFFERS, useVertexBuffer); mIndexedDirtyBitsMask.set(DIRTY_BIT_VERTEX_BUFFERS, useVertexBuffer);
mCurrentGraphicsPipeline = nullptr; mCurrentGraphicsPipeline = nullptr;
......
...@@ -1465,7 +1465,7 @@ angle::Result ProgramVk::updateImagesDescriptorSet(ContextVk *contextVk, ...@@ -1465,7 +1465,7 @@ angle::Result ProgramVk::updateImagesDescriptorSet(ContextVk *contextVk,
const vk::ImageView *imageView = nullptr; const vk::ImageView *imageView = nullptr;
ANGLE_TRY(textureVk->getLayerLevelStorageImageView( ANGLE_TRY(textureVk->getLayerLevelStorageImageView(
contextVk, binding.layered, binding.layer, binding.level, &imageView)); contextVk, (binding.layered == GL_TRUE), binding.layer, binding.level, &imageView));
// Note: binding.access is unused because it is implied by the shader. // Note: binding.access is unused because it is implied by the shader.
......
...@@ -88,7 +88,8 @@ void RendererVk::ensureCapsInitialized() const ...@@ -88,7 +88,8 @@ void RendererVk::ensureCapsInitialized() const
mNativeExtensions.instancedArraysEXT = mMaxVertexAttribDivisor > 1; mNativeExtensions.instancedArraysEXT = mMaxVertexAttribDivisor > 1;
// Only expose robust buffer access if the physical device supports it. // Only expose robust buffer access if the physical device supports it.
mNativeExtensions.robustBufferAccessBehavior = mPhysicalDeviceFeatures.robustBufferAccess; mNativeExtensions.robustBufferAccessBehavior =
(mPhysicalDeviceFeatures.robustBufferAccess == VK_TRUE);
mNativeExtensions.eglSync = true; mNativeExtensions.eglSync = true;
......
...@@ -189,7 +189,7 @@ class CommandBuffer : public WrappedObject<CommandBuffer, VkCommandBuffer> ...@@ -189,7 +189,7 @@ class CommandBuffer : public WrappedObject<CommandBuffer, VkCommandBuffer>
static bool SupportsQueries(const VkPhysicalDeviceFeatures &features) static bool SupportsQueries(const VkPhysicalDeviceFeatures &features)
{ {
return features.inheritedQueries; return (features.inheritedQueries == VK_TRUE);
} }
// Vulkan command buffers are executed as secondary command buffers within a primary command // Vulkan command buffers are executed as secondary command buffers within a primary command
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment