Hash :
9d5d619c
Author :
Date :
2022-12-26T00:00:00
Adjust clip distance compiler state and validation The internal uniform, which is used for passing GL state on some platforms, could be removed by GL drivers when built-ins are not accessed; this may lead to failed frontend assertions. Refactored relevant compiler state and validation helpers to avoid ambiguous usage. Added ClipCullDistanceTest.Unused test. Bug: angleproject:4452 Change-Id: I06fdf9a69e01afb2ad11fa12e0510d8b0421e4bc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4143839 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
//
// Copyright 2020 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.
//
// The ValidateClipCullDistance function checks if the sum of array sizes for gl_ClipDistance and
// gl_CullDistance exceeds gl_MaxCombinedClipAndCullDistances
//
#ifndef COMPILER_TRANSLATOR_VALIDATECLIPCULLDISTANCE_H_
#define COMPILER_TRANSLATOR_VALIDATECLIPCULLDISTANCE_H_
#include "GLSLANG/ShaderVars.h"
namespace sh
{
class TIntermBlock;
class TDiagnostics;
bool ValidateClipCullDistance(TIntermBlock *root,
TDiagnostics *diagnostics,
const unsigned int maxCullDistances,
const unsigned int maxCombinedClipAndCullDistances,
uint8_t *clipDistanceSizeOut,
uint8_t *cullDistanceSizeOut,
bool *clipDistanceRedeclaredOut,
bool *cullDistanceRedeclaredOut,
bool *clipDistanceUsedOut);
} // namespace sh
#endif