• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2018 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // RewriteRepeatedAssignToSwizzled.h: Rewrite expressions that assign an assignment to a swizzled
7 // vector, like:
8 //     v.x = z = expression;
9 // to:
10 //     z = expression;
11 //     v.x = z;
12 //
13 // Note that this doesn't handle some corner cases: expressions nested inside other expressions,
14 // inside loop headers, or inside if conditions.
15 
16 #ifndef COMPILER_TRANSLATOR_TREEOPS_REWRITEREPEATEDASSIGNTOSWIZZLED_H_
17 #define COMPILER_TRANSLATOR_TREEOPS_REWRITEREPEATEDASSIGNTOSWIZZLED_H_
18 
19 #include "common/angleutils.h"
20 
21 namespace sh
22 {
23 
24 class TCompiler;
25 class TIntermBlock;
26 
27 ANGLE_NO_DISCARD bool RewriteRepeatedAssignToSwizzled(TCompiler *compiler, TIntermBlock *root);
28 
29 }  // namespace sh
30 
31 #endif  // COMPILER_TRANSLATOR_TREEOPS_REWRITEREPEATEDASSIGNTOSWIZZLED_H_
32