diff options
author | android-autoroll <android-autoroll@skia-public.iam.gserviceaccount.com> | 2024-04-16 16:04:53 +0000 |
---|---|---|
committer | android-autoroll <android-autoroll@skia-public.iam.gserviceaccount.com> | 2024-04-16 16:04:53 +0000 |
commit | 32d654704bfc9bbbd6562cfa448608dd963accf6 (patch) | |
tree | 838604f0d73531d2415ae8c950399aa0faaaedac /third_party/vulkan-deps/spirv-tools/src/test/opt/type_manager_test.cpp | |
parent | 657469d86ba562c3156671602edc6feeb2edbf8a (diff) | |
parent | d9d583bfdc05d3ccbcb4c048fe6693652d89d4ba (diff) | |
download | angle-32d654704bfc9bbbd6562cfa448608dd963accf6.tar.gz |
Roll ANGLE from 1153a17e92df to d9d583bfdc05 (20 revisions)
https://chromium.googlesource.com/angle/angle.git/+log/1153a17e92df..d9d583bfdc05
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/316013423
Bug: b/329414677
Bug: b/334183919
Change-Id: I619a81766ed5f144d7093949df5c94d490f42b72
Diffstat (limited to 'third_party/vulkan-deps/spirv-tools/src/test/opt/type_manager_test.cpp')
-rw-r--r-- | third_party/vulkan-deps/spirv-tools/src/test/opt/type_manager_test.cpp | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/third_party/vulkan-deps/spirv-tools/src/test/opt/type_manager_test.cpp b/third_party/vulkan-deps/spirv-tools/src/test/opt/type_manager_test.cpp index 946f06cc08..d4d0fef524 100644 --- a/third_party/vulkan-deps/spirv-tools/src/test/opt/type_manager_test.cpp +++ b/third_party/vulkan-deps/spirv-tools/src/test/opt/type_manager_test.cpp @@ -942,10 +942,11 @@ OpMemoryModel Logical GLSL450 EXPECT_NE(context, nullptr); std::vector<std::unique_ptr<Type>> types = GenerateAllTypes(); - uint32_t id = 1u; + uint32_t id = 0u; for (auto& t : types) { - context->get_type_mgr()->RegisterType(id, *t); + context->get_type_mgr()->RegisterType(++id, *t); EXPECT_EQ(*t, *context->get_type_mgr()->GetType(id)); + EXPECT_EQ(id, context->get_type_mgr()->GetId(t.get())); } types.clear(); @@ -1199,6 +1200,39 @@ OpMemoryModel Logical GLSL450 Match(text, context.get()); } +// Structures containing circular type references +// (from https://github.com/KhronosGroup/SPIRV-Tools/issues/5623). +TEST(TypeManager, CircularPointerToStruct) { + const std::string text = R"( + OpCapability VariablePointers + OpCapability PhysicalStorageBufferAddresses + OpCapability Int64 + OpCapability Shader + OpExtension "SPV_KHR_variable_pointers" + OpExtension "SPV_KHR_physical_storage_buffer" + OpMemoryModel PhysicalStorageBuffer64 GLSL450 + OpEntryPoint Fragment %1 "main" + OpExecutionMode %1 OriginUpperLeft + OpExecutionMode %1 DepthReplacing + OpDecorate %1200 ArrayStride 24 + OpMemberDecorate %600 0 Offset 0 + OpMemberDecorate %800 0 Offset 0 + OpMemberDecorate %120 0 Offset 16 + OpTypeForwardPointer %1200 PhysicalStorageBuffer + %600 = OpTypeStruct %1200 + %800 = OpTypeStruct %1200 + %120 = OpTypeStruct %800 + %1200 = OpTypePointer PhysicalStorageBuffer %120 + )"; + + std::unique_ptr<IRContext> context = + BuildModule(SPV_ENV_UNIVERSAL_1_1, nullptr, text, + SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS); + TypeManager manager(nullptr, context.get()); + uint32_t id = manager.FindPointerToType(600, spv::StorageClass::Function); + EXPECT_EQ(id, 1201); +} + } // namespace } // namespace analysis } // namespace opt |