Hash :
e394cb46
Author :
Date :
2023-06-10T23:12:35
Vulkan: Refactor framebuffer fetch shader emulation This change fixes simultaneous usage of EXT_shader_framebuffer_fetch and ARM_shader_framebuffer_fetch, which previously declared two identical input attachment variables. The code is additionally greatly simplified. Bug: angleproject:8196 Bug: angleproject:8197 Bug: angleproject:8198 Change-Id: Iaaa2a5539a95727e67001a4da1d45092c9db4f2c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4615187 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: mohan maiya <m.maiya@samsung.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
//
// Copyright 2023 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.
//
// EmulateFramebufferFetch.h: Replace input, gl_LastFragData and gl_LastFragColorARM with usages of
// input attachments.
//
#ifndef COMPILER_TRANSLATOR_TREEOPS_VULKAN_EMULATEFRAMEBUFFERFETCH_H_
#define COMPILER_TRANSLATOR_TREEOPS_VULKAN_EMULATEFRAMEBUFFERFETCH_H_
#include "common/angleutils.h"
namespace sh
{
class TCompiler;
class TIntermBlock;
struct ShaderVariable;
// Emulate framebuffer fetch through the use of input attachments.
[[nodiscard]] bool EmulateFramebufferFetch(TCompiler *compiler,
TIntermBlock *root,
std::vector<ShaderVariable> *uniforms);
} // namespace sh
#endif // COMPILER_TRANSLATOR_TREEOPS_VULKAN_REPLACEFORSHADERFRAMEBUFFERFETCH_H_