author Jeff Gilbert <>
Fri, 15 Mar 2019 22:55:50 -0700
changeset 470378 167ee7c46b84bc9f0988896d74adc810ec2e495a
parent 419438 b7c91a6f1b0a72da63f430d8f6c57d5374d7e0a7
permissions -rw-r--r--
Bug 1520948 - Update ANGLE to chromium/3729..moz/firefox-68. Differential Revision:

// Copyright (c) 2002-2016 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.
// Emulate gl_FragColor broadcast behaviors in ES2 where
// GL_EXT_draw_buffers is explicitly enabled in a fragment shader.


#include <vector>

namespace sh
struct OutputVariable;
class TIntermBlock;
class TSymbolTable;

// Replace all gl_FragColor with gl_FragData[0], and in the end of main() function,
// assign gl_FragData[1] ... gl_FragData[maxDrawBuffers - 1] with gl_FragData[0].
// If gl_FragColor is in outputVariables, it is replaced by gl_FragData.
void EmulateGLFragColorBroadcast(TIntermBlock *root,
                                 int maxDrawBuffers,
                                 std::vector<OutputVariable> *outputVariables,
                                 TSymbolTable *symbolTable,
                                 int shaderVersion);
}  // namespace sh