Hash :
7f418fc2
Author :
Date :
2019-10-01T07:56:53
Vulkan: lineloop support for DrawArrayIndirect
Add support for lineloops.
Includes a compute shader for generating an index
buffer to draw lineloop.
Instancing turns out to be a special case for indirect draws if we
have vertex attributes that need to be emulated (e.g. divisor too
large or native vertex format not available).
Test: dEQP.GLES31/functional_draw_indirect_*
angle_end2end_tests --gtest_filter=LineLoopIndirectTest.*/*
dEQP.GLES3/functional_draw_*
Bug: angleproject:3564
Change-Id: I1fdabe2c8a690c8b6df9e252e1e839e08796bcca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1834682
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Geoff Lang <geofflang@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.