Hash :
a7dc51f2
        
        Author :
  
        
        Date :
2022-10-01T08:49:11
        
      
Add a framebuffer fetch implementation of PLS The framebuffer fetch implementation works by attaching PLS backing textures to the framebuffer, and then rewriting PLS uniforms as "inout" fragment variables. The compiler's existing machinery takes it from there and makes it work on GL and Vulkan, and soon Metal. EXT_shader_framebuffer_fetch is now the preferred backend for pixel local storage, but we also use EXT_shader_framebuffer_fetch_non_coherent if shader images can't be coherent. This is especially interesting for Vulkan, since noncoherent framebuffer fetch is possible without any extensions. Bug: angleproject:7279 Bug: angleproject:7683 Bug: angleproject:7684 Bug: angleproject:7724 Change-Id: I33f3b2c6df9a5709969d9165c448ea71b096c9e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3900142 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
//
// Copyright 2022 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.
//
#ifndef COMPILER_TRANSLATOR_TREEOPS_REWRITE_PIXELLOCALSTORAGE_H_
#define COMPILER_TRANSLATOR_TREEOPS_REWRITE_PIXELLOCALSTORAGE_H_
#include <GLSLANG/ShaderLang.h>
namespace sh
{
class TCompiler;
class TIntermBlock;
class TSymbolTable;
// This mutating tree traversal rewrites high level ANGLE_shader_pixel_local_storage operations to
// the type of shader operations specified by ShPixelLocalStorageType, found in ShCompileOptions.
[[nodiscard]] bool RewritePixelLocalStorage(TCompiler *compiler,
                                            TIntermBlock *root,
                                            TSymbolTable &symbolTable,
                                            const ShCompileOptions &compileOptions,
                                            int shaderVersion);
}  // namespace sh
#endif  // COMPILER_TRANSLATOR_TREEOPS_REWRITE_PIXELLOCALSTORAGE_H_