Hash :
9624db05
Author :
Date :
2023-08-21T00:00:00
Validate missing fragment outputs for dual-source blending * A secondary fragment output must be declared when dual-source blending is enabled in WebGL contexts. * Omitting locations for multiple fragment outputs is not allowed in WebGL contexts. Bug: angleproject:1085 Change-Id: I57febdc02c9ccc571971a81b6671869f19b0aa96 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4834672 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
//
// Copyright 2013 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.
//
// ValidateOutputs validates fragment shader outputs. It checks for conflicting locations,
// out-of-range locations, that locations are specified when using multiple outputs, and YUV output
// validity.
//
#ifndef COMPILER_TRANSLATOR_VALIDATEOUTPUTS_H_
#define COMPILER_TRANSLATOR_VALIDATEOUTPUTS_H_
#include <GLSLANG/ShaderLang.h>
#include "compiler/translator/ExtensionBehavior.h"
namespace sh
{
class TCompiler;
class TIntermBlock;
class TDiagnostics;
// Returns true if the shader has no conflicting or otherwise erroneous fragment outputs.
bool ValidateOutputs(TIntermBlock *root,
const TExtensionBehavior &extBehavior,
const ShBuiltInResources &resources,
bool usesPixelLocalStorage,
bool isWebGL,
TDiagnostics *diagnostics);
} // namespace sh
#endif // COMPILER_TRANSLATOR_VALIDATEOUTPUTS_H_