зеркало из https://github.com/AvaloniaUI/angle.git
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: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Родитель
2f2ea8b465
Коммит
bf4268a396
|
@ -101,7 +101,7 @@ ShaderVariable &ShaderVariable::operator=(const ShaderVariable &other)
|
|||
offset = other.offset;
|
||||
readonly = other.readonly;
|
||||
writeonly = other.writeonly;
|
||||
writeonly = other.index;
|
||||
index = other.index;
|
||||
interpolation = other.interpolation;
|
||||
isInvariant = other.isInvariant;
|
||||
return *this;
|
||||
|
|
|
@ -924,7 +924,8 @@ Error Display::createContext(const Config *configuration,
|
|||
if (usesProgramCacheControl)
|
||||
{
|
||||
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.
|
||||
if (!programCacheControlEnabled || mMemoryProgramCache.maxSize() == 0)
|
||||
{
|
||||
|
|
|
@ -315,7 +315,8 @@ bool VertexArray::bindVertexBufferImpl(const Context *context,
|
|||
mCachedTransformFeedbackConflictedBindingsMask.set(
|
||||
bindingIndex, boundBuffer->isBoundForTransformFeedbackAndOtherUse());
|
||||
mState.mClientMemoryAttribsMask &= ~binding->getBoundAttributesMask();
|
||||
updateCachedMappedArrayBuffers(boundBuffer->isMapped(), binding->getBoundAttributesMask());
|
||||
updateCachedMappedArrayBuffers((boundBuffer->isMapped() == GL_TRUE),
|
||||
binding->getBoundAttributesMask());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2227,8 +2227,8 @@ angle::Result Renderer11::copyImageInternal(const gl::Context *context,
|
|||
{
|
||||
TextureHelper11 tex;
|
||||
ANGLE_TRY(resolveMultisampledTexture(context, sourceRenderTarget,
|
||||
colorAttachment->getDepthSize(),
|
||||
colorAttachment->getStencilSize(), &tex));
|
||||
colorAttachment->getDepthSize() > 0,
|
||||
colorAttachment->getStencilSize() > 0, &tex));
|
||||
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC viewDesc;
|
||||
viewDesc.Format = sourceRenderTarget->getFormatSet().srvFormat;
|
||||
|
|
|
@ -391,7 +391,7 @@ angle::Result TextureStorage11::getSRVForImage(const gl::Context *context,
|
|||
const d3d11::SharedSRV **outSRV)
|
||||
{
|
||||
// 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);
|
||||
ANGLE_TRY(getCachedOrCreateSRVForImage(context, key, outSRV));
|
||||
return angle::Result::Continue;
|
||||
|
@ -423,7 +423,7 @@ angle::Result TextureStorage11::getUAVForImage(const gl::Context *context,
|
|||
const d3d11::SharedUAV **outUAV)
|
||||
{
|
||||
// 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);
|
||||
ANGLE_TRY(getCachedOrCreateUAVForImage(context, key, outUAV));
|
||||
return angle::Result::Continue;
|
||||
|
|
|
@ -341,7 +341,7 @@ bool RoHelper::SupportedWindowsRelease()
|
|||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
return isSupported;
|
||||
return !!isSupported;
|
||||
}
|
||||
|
||||
Microsoft::WRL::ComPtr<ABI::Windows::Foundation::Metadata::IApiInformationStatics> api;
|
||||
|
@ -351,19 +351,19 @@ bool RoHelper::SupportedWindowsRelease()
|
|||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
return isSupported;
|
||||
return !!isSupported;
|
||||
}
|
||||
|
||||
hr = GetStringReference(L"Windows.Foundation.UniversalApiContract", &contractName,
|
||||
&contractNameHeader);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
return isSupported;
|
||||
return !!isSupported;
|
||||
}
|
||||
|
||||
api->IsApiContractPresentByMajor(contractName, 6, &isSupported);
|
||||
|
||||
return isSupported;
|
||||
return !!isSupported;
|
||||
}
|
||||
|
||||
HRESULT RoHelper::GetStringReference(PCWSTR source, HSTRING *act, HSTRING_HEADER *header)
|
||||
|
|
|
@ -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.
|
||||
invalidateDefaultAttributes(
|
||||
context->getStateCache().getActiveDefaultAttribsMask());
|
||||
bool useVertexBuffer = (mProgram->getState().getMaxActiveAttribLocation());
|
||||
bool useVertexBuffer = (mProgram->getState().getMaxActiveAttribLocation() > 0);
|
||||
mNonIndexedDirtyBitsMask.set(DIRTY_BIT_VERTEX_BUFFERS, useVertexBuffer);
|
||||
mIndexedDirtyBitsMask.set(DIRTY_BIT_VERTEX_BUFFERS, useVertexBuffer);
|
||||
mCurrentGraphicsPipeline = nullptr;
|
||||
|
|
|
@ -1465,7 +1465,7 @@ angle::Result ProgramVk::updateImagesDescriptorSet(ContextVk *contextVk,
|
|||
const vk::ImageView *imageView = nullptr;
|
||||
|
||||
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.
|
||||
|
||||
|
|
|
@ -88,7 +88,8 @@ void RendererVk::ensureCapsInitialized() const
|
|||
mNativeExtensions.instancedArraysEXT = mMaxVertexAttribDivisor > 1;
|
||||
|
||||
// Only expose robust buffer access if the physical device supports it.
|
||||
mNativeExtensions.robustBufferAccessBehavior = mPhysicalDeviceFeatures.robustBufferAccess;
|
||||
mNativeExtensions.robustBufferAccessBehavior =
|
||||
(mPhysicalDeviceFeatures.robustBufferAccess == VK_TRUE);
|
||||
|
||||
mNativeExtensions.eglSync = true;
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ class CommandBuffer : public WrappedObject<CommandBuffer, VkCommandBuffer>
|
|||
|
||||
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче