Hash :
1850492e
        
        Author :
  
        
        Date :
2019-10-02T08:23:03
        
      
Vulkan: Disable OES_vertex_type_10_10_10_2 on GLES 2.0 - Because of the difference in the SNORM to FLOAT conversion formula between GLES 2.0 and 3.0, OES_vertex_type_10_10_10_2 is disabled when the context version is lower than 3.0. - Modify test conversion formula to be compliant with GLES 3.0 equation Bug: angleproject:3868 Test: angle_end2end_tests --gtest_filter=VertexAttributeTest*Packed*Vulkan Change-Id: I8b85d8146ee05353bc40fa0022f05d6634c33110 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1792197 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
To build multiple variations of a shader, add a file named X.json corresponding to shader file X. A variation is generated by building the shader with different definitions (a la glslang_validator’s -DName=1). These definitions come from flags and enumerations defined in the json file. Without a .json file, the shader is generated as is (1 variation).
There are multiple possible fields in the json file:
Flags are shorthand for 2-entry enumerations. Given n flags, there are 2^n variations where every flag is either present or not. For enumerations, only one entry is active in any variation. Thus, an enumeration with n entries generates n variations.
Here is an example json file:
{
"Description": [
    "Copyright 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.",
    "",
    "RayTrace.comp.json: Build parameters for RayTrace.comp."
],
"Flags": [
    "NanFilter",
    "WorkaroundIntelBug"
],
"RayTraceQuality": [
    "IsRTLowRes",
    "IsRTHighRes",
    "IsRTAwesome"
],
"ImageType": [
    "IsR",
    "IsRG",
    "IsRGB",
    "IsRGBA"
]}
This will generate 2^2 3 4 shaders.