1/*
2 * Copyright © 2022 Collabora, LTD
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 * IN THE SOFTWARE.
22 */
23
24#ifndef VK_LIMITS_H
25#define VK_LIMITS_H
26
27#define MESA_VK_MAX_VERTEX_BINDINGS 32
28#define MESA_VK_MAX_VERTEX_ATTRIBUTES 32
29
30/* As of June 29, 2022, according to vulkan.gpuinfo.org, 99% of all reports
31 * listed a max vertex stride that fits in 16 bits.
32 */
33#define MESA_VK_MAX_VERTEX_BINDING_STRIDE UINT16_MAX
34
35#define MESA_VK_MAX_VIEWPORTS 16
36#define MESA_VK_MAX_SCISSORS 16
37#define MESA_VK_MAX_DISCARD_RECTANGLES 4
38
39/* As of June 29, 2022, according to vulkan.gpuinfo.org, no reports list more
40 * than 16 samples for framebufferColorSampleCounts except one layer running
41 * on top of WARP on Windows.
42 */
43#define MESA_VK_MAX_SAMPLES 16
44
45/* As of June 29, 2022, according to vulkan.gpuinfo.org, the only GPUs
46 * claiming support for maxSampleLocationGridSize greater than 1x1 is AMD
47 * which supports 2x2 but only up to 8 samples.
48 */
49#define MESA_VK_MAX_SAMPLE_LOCATIONS 32
50
51#define MESA_VK_MAX_COLOR_ATTACHMENTS 8
52
53/* Since VkSubpassDescription2::viewMask is a 32-bit integer, there are a
54 * maximum of 32 possible views.
55 */
56#define MESA_VK_MAX_MULTIVIEW_VIEW_COUNT 32
57
58#endif /* VK_LIMITS_H */
59