Hash :
cfc4db34
Author :
Date :
2021-11-04T16:54:15
Metal: Provoking vertex support for Metal DrawArrays Add in provoking vertex rewrite support for drawArrays command, enabling 6 dEQP tests. GLES3/functional_rasterization_flatshading_line_loop GLES3/functional_rasterization_flatshading_line_strip GLES3/functional_rasterization_flatshading_lines GLES3/functional_rasterization_flatshading_triangle_fan GLES3/functional_rasterization_flatshading_triangle_strip GLES3/functional_rasterization_flatshading_triangles This patch adds a new shader to the Provoking Vertex helper that generates draw commands for all simple data types. Fix bug in provoking vertex helper that caused reused index buffers to suffer from allocation issues. Also fix Provoking vertex for triangle fan generation Bug: angleproject:5325 Change-Id: I7a1211dfcd99329868269ea0666eef1915d487b5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3261635 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kyle Piddington <kpiddington@apple.com>
//
// Copyright 2021 The ANGLE Project. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// rewrite_incides_shared:
// defines for provoking vertex rewriting.
#ifndef rewrite_indices_shared_h
#define rewrite_indices_shared_h
#define MTL_FIX_INDEX_BUFFER_KEY_FUNCTION_CONSTANT_INDEX 1
#define MtlFixIndexBufferKeyTypeMask 0x03U
#define MtlFixIndexBufferKeyInShift 0U
#define MtlFixIndexBufferKeyOutShift 2U
#define MtlFixIndexBufferKeyVoid 0U
#define MtlFixIndexBufferKeyUint16 2U
#define MtlFixIndexBufferKeyUint32 3U
#define MtlFixIndexBufferKeyModeMask 0x0FU
#define MtlFixIndexBufferKeyModeShift 4U
#define MtlFixIndexBufferKeyPoints 0x00U
#define MtlFixIndexBufferKeyLines 0x01U
#define MtlFixIndexBufferKeyLineLoop 0x02U
#define MtlFixIndexBufferKeyLineStrip 0x03U
#define MtlFixIndexBufferKeyTriangles 0x04U
#define MtlFixIndexBufferKeyTriangleStrip 0x05U
#define MtlFixIndexBufferKeyTriangleFan 0x06U
#define MtlFixIndexBufferKeyPrimRestart 0x00100U
#define MtlFixIndexBufferKeyProvokingVertexLast 0x00200U
#endif /* rewrite_indices_shared_h */