Hash :
3972cfa1
Author :
Date :
2025-02-18T19:52:06
YUV should support on all the shader stages * The spec requires all shader stages should support YUV. Therefore, move YUV related functions out of the switch. * Add a new end2end test that sampling YUV in the vertex shader. Bug: angleproject:391919465 Change-Id: I7811d419d5f1461c2499c522a902c3b2149289a1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6263325 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> 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.
//
// 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 AdjustYUVOutput(TCompiler *compiler,
TIntermBlock *root,
TSymbolTable *symbolTable,
const TIntermSymbol &yuvOutput);
[[nodiscard]] bool ReswizzleYUVTextureAccess(TCompiler *compiler,
TIntermBlock *root,
TSymbolTable *symbolTable);
} // namespace sh
#endif // COMPILER_TRANSLATOR_TREEOPS_SPIRV_RESWIZZLEYUVOPS_H_