Hash :
983460e6
Author :
Date :
2018-05-02T17:57:39
Rewrite repeated assignments to swizzled vectors on NVIDIA This works around the most common instances of a bug that reproduces on some NVIDIA OpenGL drivers prior to version 397.31. BUG=chromium:798117 TEST=angle_end2end_tests Change-Id: Iafc6a9a64e56fa98b42117149fe6867040e932e5 Reviewed-on: https://chromium-review.googlesource.com/1042190 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
//
// Copyright (c) 2018 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.
//
// RewriteRepeatedAssignToSwizzled.h: Rewrite expressions that assign an assignment to a swizzled
// vector, like:
// v.x = z = expression;
// to:
// z = expression;
// v.x = z;
//
// Note that this doesn't handle some corner cases: expressions nested inside other expressions,
// inside loop headers, or inside if conditions.
#ifndef COMPILER_TRANSLATOR_TREEOPS_REWRITEREPEATEDASSIGNTOSWIZZLED_H_
#define COMPILER_TRANSLATOR_TREEOPS_REWRITEREPEATEDASSIGNTOSWIZZLED_H_
namespace sh
{
class TIntermBlock;
void RewriteRepeatedAssignToSwizzled(TIntermBlock *root);
} // namespace sh
#endif // COMPILER_TRANSLATOR_TREEOPS_REWRITEREPEATEDASSIGNTOSWIZZLED_H_