Hash :
acb0ae09
        
        Author :
  
        
        Date :
2023-10-27T13:38:09
        
      
Vulkan: Swizzle YUV output from GL component order to vulkan Since OpenGL and vulkan has different YUV component ordering, we need to swizzle the component form GL to vulkan when we write YUV data to output variable. The computation in shader will still carry out in OpenGL order. This CL swizzles component for the YUV output variable. Bug: b/223456677 Change-Id: Ie34bbc723bf3723ac65f7931aeab086c92610271 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4985622 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Chris Forbes <chrisforbes@google.com> Reviewed-by: 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.
//
// ReswizzleYUVOps: Adjusts swizzles for YUV channel order difference between
//   GLES and Vulkan
//
#ifndef COMPILER_TRANSLATOR_TREEOPS_SPIRV_RESWIZZLEYUVOPS_H_
#define COMPILER_TRANSLATOR_TREEOPS_SPIRV_RESWIZZLEYUVOPS_H_
#include "common/angleutils.h"
#include "compiler/translator/Compiler.h"
namespace sh
{
class TCompiler;
class TIntermBlock;
class TSymbolTable;
[[nodiscard]] bool ReswizzleYUVOps(TCompiler *compiler,
                                   TIntermBlock *root,
                                   TSymbolTable *symbolTable,
                                   const TIntermSymbol *yuvOutput);
}  // namespace sh
#endif  // COMPILER_TRANSLATOR_TREEOPS_SPIRV_RESWIZZLEYUVOPS_H_