Edit

kc3-lang/angle/src/compiler/translator/SeparateArrayInitialization.h

Branch :

  • Show log

    Commit

  • Author : Olli Etuaho
    Date : 2015-04-16 14:26:10
    Hash : 822fa84e
    Message : Support array initialization in HLSL output Do this by separating each array initialization into a declaration and an assignment. Array assignment is already supported in HLSL output by replacing it with a function call. The functionality is tested by the struct array constructor tests in dEQP. BUG=angleproject:941 TEST=dEQP-GLES3.functional.shaders.arrays.constructor.* Change-Id: Ida84fc343b767bea8b2d04e91c60cb8197d39039 Reviewed-on: https://chromium-review.googlesource.com/266002 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>

  • src/compiler/translator/SeparateArrayInitialization.h
  • //
    // Copyright (c) 2002-2015 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 SeparateArrayInitialization function splits each array initialization into a declaration and an assignment.
    // Example:
    //     type[n] a = initializer;
    // will effectively become
    //     type[n] a;
    //     a = initializer;
    
    #ifndef COMPILER_TRANSLATOR_SEPARATEARRAYINITIALIZATION_H_
    #define COMPILER_TRANSLATOR_SEPARATEARRAYINITIALIZATION_H_
    
    class TIntermNode;
    
    void SeparateArrayInitialization(TIntermNode *root);
    
    #endif  // COMPILER_TRANSLATOR_SEPARATEARRAYINITIALIZATION_H_