Blender V5.0
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
11
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_LAYER_ATTR_UBO_SLOT 7
19/* Slots 0-6 are reserved for engine use. */
20/* TODO(fclem): Legacy. To be removed once we remove the old DRW. */
21#define DRW_OBJ_INFOS_UBO_SLOT 6
22/* TODO(fclem): Remove in favor of engine-side clipping UBO. */
23#define DRW_CLIPPING_UBO_SLOT 5
24
25/* We target hardware with at least 12 SSBO slots (NOT Guaranteed by GL 4.3). */
26#define DRW_RESOURCE_ID_SLOT 11
27#define DRW_OBJ_MAT_SLOT 10
28#define DRW_OBJ_INFOS_SLOT 9
29#define DRW_OBJ_ATTR_SLOT 8
30/* Slots 0-7 are reserved for engine use. */
31/* Debug SSBOs are not counted in the limit [12 - 15+]. */
32#define DRW_DEBUG_DRAW_SLOT 14
33#define DRW_DEBUG_DRAW_FEEDBACK_SLOT 15
34
35#define DRW_COMMAND_GROUP_SIZE 64
36#define DRW_FINALIZE_GROUP_SIZE 64
37/* Must be multiple of 32. Set to 32 for shader simplicity. */
38#define DRW_VISIBILITY_GROUP_SIZE 32
39
45#define DRW_VIEW_MAX 64
46
47/* TODO(fclem): Move to overlay. */
48#define OVERLAY_GLOBALS_SLOT 7