diff options
author | android-autoroll <android-autoroll@skia-public.iam.gserviceaccount.com> | 2024-04-18 01:20:18 +0000 |
---|---|---|
committer | android-autoroll <android-autoroll@skia-public.iam.gserviceaccount.com> | 2024-04-18 01:20:18 +0000 |
commit | bca15a3a9f4f503e8afde3b631a69ee5c3f028f3 (patch) | |
tree | a50db280e02658e2f4ba68da2e6891107f409646 | |
parent | 5b8d9fb4e6baeabf6e7ea2a64f723edff9065cee (diff) | |
parent | 6861da63bb01592964789d531dd8a71a06057547 (diff) | |
download | angle-bca15a3a9f4f503e8afde3b631a69ee5c3f028f3.tar.gz |
Roll ANGLE from 313c73c3f6a0 to 6861da63bb01 (3 revisions)
https://chromium.googlesource.com/angle/angle.git/+log/313c73c3f6a0..6861da63bb01
Please enable autosubmit on changes if possible when approving them.
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-android-autoroll
Please CC angle-team@google.com,rmistry@google.com,syoussefi@google.com on the revert to ensure that a human
is aware of the problem.
To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Test: Presubmit checks will test this change.
Exempt-From-Owner-Approval: The autoroll bot does not require owner approval.
Bug: b/315836169
Bug: b/323708819
Bug: b/324953979
Change-Id: I4c8ed48cb9ef6b32a3da2803a87cb079f841bf12
-rw-r--r-- | src/libANGLE/renderer/vulkan/UtilsVk.cpp | 48 | ||||
-rw-r--r-- | src/libANGLE/renderer/vulkan/vk_cache_utils.cpp | 13 | ||||
-rw-r--r-- | src/libANGLE/renderer/vulkan/vk_cache_utils.h | 9 | ||||
-rw-r--r-- | src/libANGLE/renderer/vulkan/vk_renderer.cpp | 6 |
4 files changed, 65 insertions, 11 deletions
diff --git a/src/libANGLE/renderer/vulkan/UtilsVk.cpp b/src/libANGLE/renderer/vulkan/UtilsVk.cpp index a20770e1a4..6a954fa1ed 100644 --- a/src/libANGLE/renderer/vulkan/UtilsVk.cpp +++ b/src/libANGLE/renderer/vulkan/UtilsVk.cpp @@ -454,6 +454,10 @@ void SetDepthDynamicStateForUnused(vk::Renderer *renderer, { commandBuffer->setDepthWriteEnable(VK_FALSE); } + if (renderer->useDepthCompareOpDynamicState()) + { + commandBuffer->setDepthCompareOp(VK_COMPARE_OP_ALWAYS); + } } // Sets the appropriate settings in the pipeline for either the shader to output stencil, regardless @@ -493,6 +497,26 @@ void SetStencilDynamicStateForWrite(vk::Renderer *renderer, } } +void SetStencilDynamicStateForUnused(vk::Renderer *renderer, + vk::RenderPassCommandBuffer *commandBuffer) +{ + if (renderer->useStencilTestEnableDynamicState()) + { + commandBuffer->setStencilTestEnable(false); + } + if (renderer->useStencilOpDynamicState()) + { + commandBuffer->setStencilOp(VK_STENCIL_FACE_FRONT_BIT, VK_STENCIL_OP_REPLACE, + VK_STENCIL_OP_REPLACE, VK_STENCIL_OP_REPLACE, + VK_COMPARE_OP_ALWAYS); + commandBuffer->setStencilOp(VK_STENCIL_FACE_BACK_BIT, VK_STENCIL_OP_REPLACE, + VK_STENCIL_OP_REPLACE, VK_STENCIL_OP_REPLACE, + VK_COMPARE_OP_ALWAYS); + } + commandBuffer->setStencilCompareMask(0x00, 0x00); + commandBuffer->setStencilWriteMask(0x00, 0x00); + commandBuffer->setStencilReference(0x00, 0x00); +} namespace unresolve { // The unresolve shader looks like the following, based on the number and types of unresolve @@ -2508,6 +2532,10 @@ angle::Result UtilsVk::clearFramebuffer(ContextVk *contextVk, { SetDepthDynamicStateForWrite(renderer, commandBuffer); } + else + { + SetDepthDynamicStateForUnused(renderer, commandBuffer); + } if (params.clearStencil) { @@ -2521,6 +2549,10 @@ angle::Result UtilsVk::clearFramebuffer(ContextVk *contextVk, SetStencilDynamicStateForWrite(contextVk->getRenderer(), commandBuffer); } + else + { + SetStencilDynamicStateForUnused(contextVk->getRenderer(), commandBuffer); + } ASSERT(contextVk->hasStartedRenderPassWithQueueSerial( framebuffer->getLastRenderPassQueueSerial())); @@ -2928,6 +2960,10 @@ angle::Result UtilsVk::blitResolveImpl(ContextVk *contextVk, { SetDepthDynamicStateForWrite(renderer, commandBuffer); } + else + { + SetDepthDynamicStateForUnused(renderer, commandBuffer); + } if (blitStencil) { @@ -2940,6 +2976,10 @@ angle::Result UtilsVk::blitResolveImpl(ContextVk *contextVk, SetStencilDynamicStateForWrite(renderer, commandBuffer); } + else + { + SetStencilDynamicStateForUnused(renderer, commandBuffer); + } // Note: this utility starts the render pass directly, thus bypassing // ContextVk::startRenderPass. As such, occlusion queries are not enabled. @@ -4158,6 +4198,10 @@ angle::Result UtilsVk::unresolve(ContextVk *contextVk, { SetDepthDynamicStateForWrite(renderer, commandBuffer); } + else + { + SetDepthDynamicStateForUnused(renderer, commandBuffer); + } if (unresolveStencilWithShaderExport) { @@ -4170,6 +4214,10 @@ angle::Result UtilsVk::unresolve(ContextVk *contextVk, SetStencilDynamicStateForWrite(renderer, commandBuffer); } + else + { + SetStencilDynamicStateForUnused(renderer, commandBuffer); + } // This draw call is made before ContextVk gets a chance to start the occlusion query. As // such, occlusion queries are not enabled. diff --git a/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp b/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp index 4680ccfb81..ff2e4259f8 100644 --- a/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp +++ b/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp @@ -4294,7 +4294,9 @@ bool operator==(const AttachmentOpsArray &lhs, const AttachmentOpsArray &rhs) } // DescriptorSetLayoutDesc implementation. -DescriptorSetLayoutDesc::DescriptorSetLayoutDesc() : mPackedDescriptorSetLayout{} {} +DescriptorSetLayoutDesc::DescriptorSetLayoutDesc() + : mPackedDescriptorSetLayout{}, mValidDescriptorSetLayoutIndexMask() +{} DescriptorSetLayoutDesc::~DescriptorSetLayoutDesc() = default; @@ -4336,19 +4338,20 @@ void DescriptorSetLayoutDesc::update(uint32_t bindingIndex, ASSERT(count == 1); packedBinding.immutableSampler = immutableSampler->getHandle(); } + + mValidDescriptorSetLayoutIndexMask.set(bindingIndex, count > 0); } void DescriptorSetLayoutDesc::unpackBindings(DescriptorSetLayoutBindingVector *bindings, std::vector<VkSampler> *immutableSamplers) const { - for (uint32_t bindingIndex = 0; bindingIndex < kMaxDescriptorSetLayoutBindings; ++bindingIndex) + for (size_t bindingIndex : mValidDescriptorSetLayoutIndexMask) { const PackedDescriptorSetBinding &packedBinding = mPackedDescriptorSetLayout[bindingIndex]; - if (packedBinding.count == 0) - continue; + ASSERT(packedBinding.count != 0); VkDescriptorSetLayoutBinding binding = {}; - binding.binding = bindingIndex; + binding.binding = static_cast<uint32_t>(bindingIndex); binding.descriptorCount = packedBinding.count; binding.descriptorType = static_cast<VkDescriptorType>(packedBinding.type); binding.stageFlags = static_cast<VkShaderStageFlags>(packedBinding.stages); diff --git a/src/libANGLE/renderer/vulkan/vk_cache_utils.h b/src/libANGLE/renderer/vulkan/vk_cache_utils.h index b1d70bfdaf..056d350503 100644 --- a/src/libANGLE/renderer/vulkan/vk_cache_utils.h +++ b/src/libANGLE/renderer/vulkan/vk_cache_utils.h @@ -993,6 +993,11 @@ constexpr uint32_t kMaxDescriptorSetLayoutBindings = using DescriptorSetLayoutBindingVector = angle::FixedVector<VkDescriptorSetLayoutBinding, kMaxDescriptorSetLayoutBindings>; +// Technically this needs to only be kMaxDescriptorSetLayoutBindings but due to struct padding +// issues round up size to 64. +constexpr uint32_t kMaxDescriptorSetLayoutCount = roundUpPow2(kMaxDescriptorSetLayoutBindings, 64u); +using DescriptorSetLayoutIndexMask = angle::BitSet<kMaxDescriptorSetLayoutCount>; + // A packed description of a descriptor set layout. Use similarly to RenderPassDesc and // GraphicsPipelineDesc. Currently we only need to differentiate layouts based on sampler and ubo // usage. In the future we could generalize this. @@ -1016,7 +1021,7 @@ class DescriptorSetLayoutDesc final void unpackBindings(DescriptorSetLayoutBindingVector *bindings, std::vector<VkSampler> *immutableSamplers) const; - bool empty() const { return *this == DescriptorSetLayoutDesc(); } + bool empty() const { return !mValidDescriptorSetLayoutIndexMask.any(); } private: // There is a small risk of an issue if the sampler cache is evicted but not the descriptor @@ -1037,6 +1042,8 @@ class DescriptorSetLayoutDesc final // This is a compact representation of a descriptor set layout. std::array<PackedDescriptorSetBinding, kMaxDescriptorSetLayoutBindings> mPackedDescriptorSetLayout; + + DescriptorSetLayoutIndexMask mValidDescriptorSetLayoutIndexMask; }; // The following are for caching descriptor set layouts. Limited to max three descriptor set diff --git a/src/libANGLE/renderer/vulkan/vk_renderer.cpp b/src/libANGLE/renderer/vulkan/vk_renderer.cpp index 202f6a897e..8f21b1c44f 100644 --- a/src/libANGLE/renderer/vulkan/vk_renderer.cpp +++ b/src/libANGLE/renderer/vulkan/vk_renderer.cpp @@ -236,10 +236,6 @@ constexpr const char *kSkippedMessages[] = { "VUID-vkCmdDrawIndexed-None-07835", "VUID-VkGraphicsPipelineCreateInfo-Input-08733", "VUID-vkCmdDraw-Input-08734", - // http://anglebug.com/8151 - "VUID-vkCmdDraw-None-07844", - "VUID-vkCmdDraw-None-07845", - "VUID-vkCmdDraw-None-07848", // https://anglebug.com/8128#c3 "VUID-VkBufferViewCreateInfo-format-08779", // https://anglebug.com/8203 @@ -4678,7 +4674,7 @@ void Renderer::initFeatures(const vk::ExtensionNameList &deviceExtensionNames, // For some reason, if we use cached staging buffer for read pixels, a lot of tests fail on ARM, // even though we do have invlaid() call there. Temporary keep the old behavior for ARM until we // can root cause it. - ANGLE_FEATURE_CONDITION(&mFeatures, requireCachedBitForStagingBuffer, !isARM); + ANGLE_FEATURE_CONDITION(&mFeatures, requireCachedBitForStagingBuffer, !isARM && !isPowerVR); // Multiple dynamic state issues on ARM have been fixed. // http://issuetracker.google.com/285124778 |