Unconditionally enable append_aliased_memory_decorations_to_ssbo
After the discussion with Khronos group on how to
handle aliased ssbo in GL driver:
https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/4321
https://gitlab.khronos.org/opengl/API/-/issues/183
it is the correct behavior to append aliased memory
qualifier to SSBOs, if restrict memory qualifier is
not specified. Unconditonally enable this feature
for all hardware.
Bug: b/266235549
Change-Id: I20c811710bb10f0de39de5707adab0262a46d296
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4485008
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
diff --git a/src/compiler/translator/OutputSPIRV.cpp b/src/compiler/translator/OutputSPIRV.cpp
index 1405996..7f82a69 100644
--- a/src/compiler/translator/OutputSPIRV.cpp
+++ b/src/compiler/translator/OutputSPIRV.cpp
@@ -6100,9 +6100,9 @@
if (type.getQualifier() == EvqBuffer && !memoryQualifier.restrictQualifier &&
mCompileOptions.aliasedSSBOUnlessRestrict)
{
- // Temporary workaround for issuetracker.google.com/266235549
// If GLSL does not specify the SSBO has restrict memory qualifier, assume the memory
// qualifier is aliased
+ // issuetracker.google.com/266235549
spirv::WriteDecorate(mBuilder.getSpirvDecorations(), variableId, spv::DecorationAliased,
{});
}
diff --git a/src/libANGLE/renderer/vulkan/RendererVk.cpp b/src/libANGLE/renderer/vulkan/RendererVk.cpp
index 9540a2d..86e5c3d 100644
--- a/src/libANGLE/renderer/vulkan/RendererVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RendererVk.cpp
@@ -3729,8 +3729,7 @@
isVulkan11Device() ||
ExtensionFound(VK_KHR_MAINTENANCE1_EXTENSION_NAME, deviceExtensionNames);
- ANGLE_FEATURE_CONDITION(&mFeatures, appendAliasedMemoryDecorationsToSsbo,
- isARM && armDriverVersion >= ARMDriverVersion(38, 1, 0));
+ ANGLE_FEATURE_CONDITION(&mFeatures, appendAliasedMemoryDecorationsToSsbo, true);
ANGLE_FEATURE_CONDITION(
&mFeatures, supportsSharedPresentableImageExtension,