Hash :
a2f9ad39
Author :
Date :
2020-03-09T14:28:39
Vulkan: Remove unused atomic counter builtins Atomic counters are not supported by Vulkan. Most are already converted by the RewriteAtomicCounters traversal, but that is only invoked when atomic counters are active. This CL introduces another pass that removes any atomic counter builtin that was not handled by the previous pass. It also will assert if it sees any atomic counters active, thus ensuring it is only used when needed. Test: KHR-GLES31.core.compute_shader.shared-struct Test: angle_end2end_tests.exe --gtest_filter="*AtomicCounter*" Bug: angleproject:4189 Bug: b:150310216 Change-Id: I61d10e954886dc94fede8b344f5a0ede3b689adb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2095688 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
//
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// RemoveAtomicCounterBuiltins: Remove atomic counter builtins.
// Normally handled by RewriteAtomicCounters, but that is only invoked when
// atomic counters are actually in use. This pass removes the builtins and
// asserts no atomic counters are declared.
#ifndef COMPILER_TRANSLATOR_TREEOPS_REMOVEATOMICCOUNTERBUILTINS_H_
#define COMPILER_TRANSLATOR_TREEOPS_REMOVEATOMICCOUNTERBUILTINS_H_
#include "common/angleutils.h"
namespace sh
{
class TCompiler;
class TIntermBlock;
ANGLE_NO_DISCARD bool RemoveAtomicCounterBuiltins(TCompiler *compiler, TIntermBlock *root);
} // namespace sh
#endif // COMPILER_TRANSLATOR_TREEOPS_REMOVEATOMICCOUNTERBUILTINS_H_