Blender V4.3
draw_defines.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
12#pragma once
13
14/* We target hardware with at least 12 UBO slots (Guaranteed by GL 4.3). */
15#define DRW_VIEW_UBO_SLOT 11
16#define DRW_VIEW_CULLING_UBO_SLOT 10
17#define DRW_OBJ_DATA_INFO_UBO_SLOT 9
18#define DRW_OBJ_MAT_UBO_SLOT 8
19#define DRW_LAYER_ATTR_UBO_SLOT 7
20/* Slots 0-6 are reserved for engine use. */
21/* TODO(fclem): Legacy. To be removed once we remove the old DRW. */
22#define DRW_OBJ_INFOS_UBO_SLOT 6
23/* TODO(fclem): Remove in favor of engine-side clipping UBO. */
24#define DRW_CLIPPING_UBO_SLOT 5
25
26/* We target hardware with at least 12 SSBO slots (NOT Guaranteed by GL 4.3). */
27#define DRW_RESOURCE_ID_SLOT 11
28#define DRW_OBJ_MAT_SLOT 10
29#define DRW_OBJ_INFOS_SLOT 9
30#define DRW_OBJ_ATTR_SLOT 8
31/* Slots 0-7 are reserved for engine use. */
32/* Debug SSBOs are not counted in the limit [12 - 15+]. */
33#define DRW_DEBUG_PRINT_SLOT 15
34#define DRW_DEBUG_DRAW_SLOT 14
35
36#define DRW_COMMAND_GROUP_SIZE 64
37#define DRW_FINALIZE_GROUP_SIZE 64
38/* Must be multiple of 32. Set to 32 for shader simplicity. */
39#define DRW_VISIBILITY_GROUP_SIZE 32
40
46#define DRW_VIEW_MAX 64