Blender  V3.3
draw_manager.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2016 Blender Foundation. */
3 
8 /* Private functions / structs of the draw manager */
9 
10 #pragma once
11 
12 #include "DRW_engine.h"
13 #include "DRW_render.h"
14 
15 #include "BLI_assert.h"
16 #include "BLI_linklist.h"
17 #include "BLI_memblock.h"
18 #include "BLI_task.h"
19 #include "BLI_threads.h"
20 
21 #include "GPU_batch.h"
22 #include "GPU_context.h"
23 #include "GPU_drawlist.h"
24 #include "GPU_framebuffer.h"
25 #include "GPU_shader.h"
26 #include "GPU_uniform_buffer.h"
27 #include "GPU_viewport.h"
28 
29 #include "draw_instance_data.h"
30 #include "draw_shader_shared.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 struct DupliObject;
37 struct Object;
38 
40 #define USE_GPU_SELECT
41 
43 #define USE_BATCHING 1
44 
45 // #define DRW_DEBUG_CULLING
46 #define DRW_DEBUG_USE_UNIFORM_NAME 0
47 #define DRW_UNIFORM_BUFFER_NAME 64
48 
49 /* ------------ Profiling --------------- */
50 
51 #define USE_PROFILE
52 
53 #ifdef USE_PROFILE
54 # include "PIL_time.h"
55 
56 # define PROFILE_TIMER_FALLOFF 0.04
57 
58 # define PROFILE_START(time_start) \
59  double time_start = PIL_check_seconds_timer(); \
60  ((void)0)
61 
62 # define PROFILE_END_ACCUM(time_accum, time_start) \
63  { \
64  time_accum += (PIL_check_seconds_timer() - time_start) * 1e3; \
65  } \
66  ((void)0)
67 
68 /* exp average */
69 # define PROFILE_END_UPDATE(time_update, time_start) \
70  { \
71  double _time_delta = (PIL_check_seconds_timer() - time_start) * 1e3; \
72  time_update = (time_update * (1.0 - PROFILE_TIMER_FALLOFF)) + \
73  (_time_delta * PROFILE_TIMER_FALLOFF); \
74  } \
75  ((void)0)
76 
77 #else /* USE_PROFILE */
78 
79 # define PROFILE_START(time_start) ((void)0)
80 # define PROFILE_END_ACCUM(time_accum, time_start) ((void)0)
81 # define PROFILE_END_UPDATE(time_update, time_start) ((void)0)
82 
83 #endif /* USE_PROFILE */
84 
85 /* ------------ Data Structure --------------- */
90 typedef struct DRWRegisteredDrawEngine {
91  void /*DRWRegisteredDrawEngine*/ *next, *prev;
94  int index;
96 
103 typedef struct DRWCullingState {
105  /* Culling: Using Bounding Sphere for now for faster culling.
106  * Not ideal for planes. Could be extended. */
108  /* Grrr only used by EEVEE. */
109  void *user_data;
111 
112 /* Minimum max UBO size is 64KiB. We take the largest
113  * UBO struct and alloc the max number.
114  * `((1 << 16) / sizeof(DRWObjectMatrix)) = 512`
115  * Keep in sync with `common_view_lib.glsl`. */
116 #define DRW_RESOURCE_CHUNK_LEN 512
117 
133 
135 {
136  return (*handle & 0x80000000) != 0;
137 }
138 
140 {
141  return (*handle & 0x7FFFFFFF) >> 9;
142 }
143 
145 {
146  return (*handle & 0x000001FF);
147 }
148 
150 {
151  *handle += 1;
152 }
153 
155 {
156  *handle |= 0x80000000;
157 }
158 
160  const DRWResourceHandle *handle)
161 {
162  int elem = DRW_handle_id_get(handle);
163  int chunk = DRW_handle_chunk_get(handle);
164  return BLI_memblock_elem_get(memblock, chunk, elem);
165 }
166 
167 typedef struct DRWObjectMatrix {
168  float model[4][4];
169  float modelinverse[4][4];
171 
172 typedef struct DRWObjectInfos {
173  float orcotexfac[2][4];
174  float ob_color[4];
175  float ob_index;
176  float pad; /*UNUSED*/
177  float ob_random;
178  float ob_flag; /* Sign is negative scaling. */
180 
183 
184 typedef enum {
185  /* Draw Commands */
186  DRW_CMD_DRAW = 0, /* Only sortable type. Must be 0. */
191 
192  /* Compute Commands. */
196 
197  /* Other Commands */
203  /* Needs to fit in 4bits */
205 
206 #define DRW_MAX_DRAW_CMD_TYPE DRW_CMD_DRAW_PROCEDURAL
207 
208 typedef struct DRWCommandDraw {
212 
213 /* Assume DRWResourceHandle to be 0. */
214 typedef struct DRWCommandDrawRange {
220 
221 typedef struct DRWCommandDrawInstance {
225  uint use_attrs; /* bool */
227 
234 
235 typedef struct DRWCommandCompute {
240 
241 typedef struct DRWCommandComputeRef {
244 
248 
249 typedef struct DRWCommandBarrier {
252 
253 typedef struct DRWCommandDrawProcedural {
258 
264 
265 typedef struct DRWCommandSetStencil {
270 
271 typedef struct DRWCommandSetSelectID {
275 
276 typedef struct DRWCommandClear {
278  uchar r, g, b, a; /* [0..1] for each channels. Normalized. */
279  float depth; /* [0..1] for depth. Normalized. */
280  uchar stencil; /* Stencil value [0..255] */
282 
283 typedef union DRWCommand {
298 
303  int count;
304 };
305 
307 /* TODO(@jbakker): rename to DRW_RESOURCE/DRWResourceType. */
308 typedef enum {
336  /* WARNING: set DRWUniform->type
337  * bit length accordingly. */
339 
340 struct DRWUniform {
341  union {
342  /* For reference or array/vector types. */
343  const void *pvalue;
344  /* DRW_UNIFORM_TEXTURE */
345  struct {
346  union {
349  };
351  };
352  /* DRW_UNIFORM_BLOCK */
353  union {
356  };
357  /* DRW_UNIFORM_STORAGE_BLOCK */
358  union {
361  };
362  /* DRW_UNIFORM_VERTEX_BUFFER_AS_STORAGE */
363  union {
366  };
367  /* DRW_UNIFORM_FLOAT_COPY */
368  float fvalue[4];
369  /* DRW_UNIFORM_INT_COPY */
370  int ivalue[4];
371  /* DRW_UNIFORM_BLOCK_OBATTRS */
373  };
374  int location; /* Uniform location or binding point for textures and UBO's. */
375  uint8_t type; /* #DRWUniformType */
376  uint8_t length; /* Length of vector types. */
377  uint8_t arraysize; /* Array size of scalar/vector types. */
378 };
379 
382 
383  GPUShader *shader; /* Shader to bind */
384  struct DRWUniformChunk *uniforms; /* Uniforms pointers */
385 
386  struct {
387  /* Chunks of draw calls. */
389  } cmd;
390 
391  union {
392  /* This struct is used during cache populate. */
393  struct {
394  int objectinfo; /* Equal to 1 if the shader needs obinfos. */
395  DRWResourceHandle pass_handle; /* Memblock key to parent pass. */
396 
397  /* Set of uniform attributes used by this shader. */
399  };
400  /* This struct is used after cache populate if using the Z sorting.
401  * It will not conflict with the above struct. */
402  struct {
403  float distance; /* Distance from camera. */
404  uint original_index; /* Original position inside the shgroup list. */
406  };
407 };
408 
409 #define MAX_PASS_NAME 32
410 
411 struct DRWPass {
412  /* Linked list */
413  struct {
417 
418  /* Draw the shgroups of this pass instead.
419  * This avoid duplicating drawcalls/shgroups
420  * for similar passes. */
422  /* Link list of additional passes to render. */
424 
428 };
429 
430 #define MAX_CULLED_VIEWS 32
431 
432 struct DRWView {
434  struct DRWView *parent;
435 
440  bool is_dirty;
447  float frustum_planes[6][4];
450  void *user_data;
451 };
452 
453 /* ------------ Data Chunks --------------- */
463 typedef struct DRWUniformChunk {
464  struct DRWUniformChunk *next; /* single-linked list */
469 
470 typedef struct DRWCommandChunk {
474  /* 4bits for each command. */
476  /* -- 64 bytes aligned -- */
478  /* -- 64 bytes aligned -- */
480 
481 typedef struct DRWCommandSmallChunk {
485  /* 4bits for each command. */
486  /* TODO: reduce size of command_type. */
490 
491 /* Only true for 64-bit platforms. */
492 #ifdef __LP64__
494 #endif
495 
496 /* ------------- DRAW DEBUG ------------ */
497 
498 typedef struct DRWDebugLine {
499  struct DRWDebugLine *next; /* linked list */
500  float pos[2][3];
501  float color[4];
503 
504 typedef struct DRWDebugSphere {
505  struct DRWDebugSphere *next; /* linked list */
506  float mat[4][4];
507  float color[4];
509 
510 /* ------------- Memory Pools ------------ */
511 
512 /* Contains memory pools information */
513 typedef struct DRWData {
533  void *volume_grids_ubos; /* VolumeUniformBufPool */
542  struct DRWViewData *view_data[2];
546 
547 /* ------------- DRAW MANAGER ------------ */
548 
549 typedef struct DupliKey {
550  struct Object *ob;
551  struct ID *ob_data;
553 
554 #define DST_MAX_SLOTS 64 /* Cannot be changed without modifying RST.bound_tex_slots */
555 #define MAX_CLIP_PLANES 6 /* GL_MAX_CLIP_PLANES is at least 6 */
556 #define STENCIL_UNDEFINED 256
557 #define DRW_DRAWLIST_LEN 256
558 typedef struct DRWManager {
559  /* TODO: clean up this struct a bit. */
560  /* Cache generation */
561  /* TODO(@fclem): Rename to data. */
565  /* State of the object being evaluated if already allocated. */
573 
586  /* Dupli data for the current dupli for each enabled engine. */
587  void **dupli_datas;
588 
589  /* Rendering state */
592 
593  /* Managed by `DRW_state_set`, `DRW_state_reset` */
596 
597  /* Per viewport */
600  float size[2];
601  float inv_size[2];
602  float screenvecs[2][3];
603  float pixsize;
604 
605  struct {
614 
615  /* Current rendering context */
617 
618  /* Convenience pointer to text_store owned by the viewport */
620 
621  bool buffer_finish_called; /* Avoid bad usage of DRW_render_instance_buffer_finish */
622 
630 
631 #ifdef USE_GPU_SELECT
633 #endif
634 
636  /* Contains list of objects that needs to be extracted from other objects. */
638 
639  /* ---------- Nothing after this point is cleared after use ----------- */
640 
641  /* gl_context serves as the offset for clearing only
642  * the top portion of the struct so DO NOT MOVE IT! */
644  void *gl_context;
648 
650 
651  struct {
652  /* TODO(@fclem): optimize: use chunks. */
655  } debug;
657 
658 extern DRWManager DST; /* TODO: get rid of this and allow multi-threaded rendering. */
659 
660 /* --------------- FUNCTIONS ------------- */
661 
663 
664 void *drw_viewport_engine_data_ensure(void *engine_type);
665 
667 
668 void drw_debug_draw(void);
669 void drw_debug_init(void);
670 
671 eDRWCommandType command_type_get(const uint64_t *command_type_bits, int index);
672 
675 
681 
682 void drw_resource_buffer_finish(DRWData *vmempool);
683 
684 /* Procedural Drawing */
688 
689 void drw_uniform_attrs_pool_update(struct GHash *table,
690  struct GPUUniformAttrList *key,
691  DRWResourceHandle *handle,
692  struct Object *ob,
693  struct Object *dupli_parent,
694  struct DupliObject *dupli_source);
695 
697 void *drw_engine_data_engine_data_create(GPUViewport *viewport, void *engine_type);
698 void *drw_engine_data_engine_data_get(GPUViewport *viewport, void *engine_handle);
699 bool drw_engine_data_engines_data_validate(GPUViewport *viewport, void **engine_handle_array);
702 
703 #ifdef __cplusplus
704 }
705 #endif
#define BLI_STATIC_ASSERT_ALIGN(st, align)
Definition: BLI_assert.h:86
#define BLI_INLINE
struct GSet GSet
Definition: BLI_ghash.h:340
void * BLI_memblock_elem_get(BLI_memblock *mblk, int chunk, int elem) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition: BLI_memblock.c:176
unsigned char uchar
Definition: BLI_sys_types.h:70
unsigned int uint
Definition: BLI_sys_types.h:67
bool() DRWCallVisibilityFn(bool vis_in, void *user_data)
Definition: DRW_render.h:402
DRWTextureFlag
Definition: DRW_render.h:139
DRWState
Definition: DRW_render.h:298
GPUBatch
Definition: GPU_batch.h:78
struct GPUContext GPUContext
Definition: GPU_context.h:27
struct GPUDrawList GPUDrawList
Definition: GPU_drawlist.h:20
struct GPUFrameBuffer GPUFrameBuffer
eGPUFrameBufferBits
struct GPUShader GPUShader
Definition: GPU_shader.h:20
eGPUBarrier
Definition: GPU_state.h:24
struct GPUStorageBuf GPUStorageBuf
eGPUSamplerState
Definition: GPU_texture.h:25
struct GPUTexture GPUTexture
Definition: GPU_texture.h:17
struct GPUUniformBuf GPUUniformBuf
struct GPUVertBuf GPUVertBuf
Platform independent time functions.
#define MAX_INSTANCE_DATA_SIZE
struct DRWCommandComputeRef DRWCommandComputeRef
void drw_texture_set_parameters(GPUTexture *tex, DRWTextureFlag flags)
void drw_resource_buffer_finish(DRWData *vmempool)
DRWUniformType
Definition: draw_manager.h:308
@ DRW_UNIFORM_VERTEX_BUFFER_AS_TEXTURE_REF
Definition: draw_manager.h:323
@ DRW_UNIFORM_BLOCK_OBINFOS
Definition: draw_manager.h:328
@ DRW_UNIFORM_TFEEDBACK_TARGET
Definition: draw_manager.h:321
@ DRW_UNIFORM_TEXTURE_REF
Definition: draw_manager.h:314
@ DRW_UNIFORM_MODEL_MATRIX
Definition: draw_manager.h:334
@ DRW_UNIFORM_VERTEX_BUFFER_AS_STORAGE
Definition: draw_manager.h:324
@ DRW_UNIFORM_FLOAT_COPY
Definition: draw_manager.h:312
@ DRW_UNIFORM_MODEL_MATRIX_INVERSE
Definition: draw_manager.h:335
@ DRW_UNIFORM_FLOAT
Definition: draw_manager.h:311
@ DRW_UNIFORM_VERTEX_BUFFER_AS_STORAGE_REF
Definition: draw_manager.h:325
@ DRW_UNIFORM_BASE_INSTANCE
Definition: draw_manager.h:333
@ DRW_UNIFORM_BLOCK_OBMATS
Definition: draw_manager.h:327
@ DRW_UNIFORM_IMAGE_REF
Definition: draw_manager.h:316
@ DRW_UNIFORM_RESOURCE_ID
Definition: draw_manager.h:331
@ DRW_UNIFORM_BLOCK
Definition: draw_manager.h:317
@ DRW_UNIFORM_TEXTURE
Definition: draw_manager.h:313
@ DRW_UNIFORM_STORAGE_BLOCK_REF
Definition: draw_manager.h:320
@ DRW_UNIFORM_VERTEX_BUFFER_AS_TEXTURE
Definition: draw_manager.h:322
@ DRW_UNIFORM_RESOURCE_CHUNK
Definition: draw_manager.h:330
@ DRW_UNIFORM_IMAGE
Definition: draw_manager.h:315
@ DRW_UNIFORM_BLOCK_OBATTRS
Definition: draw_manager.h:329
@ DRW_UNIFORM_STORAGE_BLOCK
Definition: draw_manager.h:319
@ DRW_UNIFORM_INT
Definition: draw_manager.h:309
@ DRW_UNIFORM_BLOCK_REF
Definition: draw_manager.h:318
@ DRW_UNIFORM_INT_COPY
Definition: draw_manager.h:310
struct DRWCommandSetSelectID DRWCommandSetSelectID
struct DRWUniformChunk DRWUniformChunk
BLI_INLINE uint32_t DRW_handle_chunk_get(const DRWResourceHandle *handle)
Definition: draw_manager.h:139
void drw_batch_cache_generate_requested_evaluated_mesh_or_curve(Object *ob)
Definition: draw_cache.c:3362
eDRWCommandType command_type_get(const uint64_t *command_type_bits, int index)
struct DRWRegisteredDrawEngine DRWRegisteredDrawEngine
struct DRWCommandDrawInstance DRWCommandDrawInstance
void drw_uniform_attrs_pool_update(struct GHash *table, struct GPUUniformAttrList *key, DRWResourceHandle *handle, struct Object *ob, struct Object *dupli_parent, struct DupliObject *dupli_source)
bool drw_engine_data_engines_data_validate(GPUViewport *viewport, void **engine_handle_array)
struct DRWCommandClear DRWCommandClear
void drw_state_set(DRWState state)
struct DRWCommandSetStencil DRWCommandSetStencil
void drw_debug_draw(void)
Definition: draw_debug.c:187
GPUBatch * drw_cache_procedural_points_get(void)
Definition: draw_cache.c:169
DRWManager DST
Definition: draw_manager.c:104
void * drw_viewport_engine_data_ensure(void *engine_type)
void drw_batch_cache_generate_requested(struct Object *ob)
Definition: draw_cache.c:3329
struct DRWCommandDrawProcedural DRWCommandDrawProcedural
GPUBatch * drw_cache_procedural_triangles_get(void)
Definition: draw_cache.c:197
BLI_INLINE void * DRW_memblock_elem_from_handle(struct BLI_memblock *memblock, const DRWResourceHandle *handle)
Definition: draw_manager.h:159
struct DRWCommandDrawRange DRWCommandDrawRange
eDRWCommandType
Definition: draw_manager.h:184
@ DRW_CMD_COMPUTE_INDIRECT
Definition: draw_manager.h:195
@ DRW_CMD_COMPUTE
Definition: draw_manager.h:193
@ DRW_CMD_COMPUTE_REF
Definition: draw_manager.h:194
@ DRW_CMD_DRAW
Definition: draw_manager.h:186
@ DRW_CMD_DRWSTATE
Definition: draw_manager.h:200
@ DRW_CMD_DRAW_RANGE
Definition: draw_manager.h:187
@ DRW_CMD_CLEAR
Definition: draw_manager.h:199
@ DRW_CMD_BARRIER
Definition: draw_manager.h:198
@ DRW_CMD_STENCIL
Definition: draw_manager.h:201
@ DRW_CMD_DRAW_INSTANCE_RANGE
Definition: draw_manager.h:189
@ DRW_CMD_DRAW_PROCEDURAL
Definition: draw_manager.h:190
@ DRW_CMD_SELECTID
Definition: draw_manager.h:202
@ DRW_CMD_DRAW_INSTANCE
Definition: draw_manager.h:188
struct DRWObjectInfos DRWObjectInfos
struct DRWDebugLine DRWDebugLine
void drw_batch_cache_validate(Object *ob)
Definition: draw_cache.c:3298
struct DRWData DRWData
struct DRWCommandCompute DRWCommandCompute
BLI_INLINE uint32_t DRW_handle_negative_scale_get(const DRWResourceHandle *handle)
Definition: draw_manager.h:134
void * drw_engine_data_engine_data_get(GPUViewport *viewport, void *engine_handle)
void drw_batch_cache_generate_requested_delayed(Object *ob)
Definition: draw_cache.c:3392
double * drw_engine_data_cache_time_get(GPUViewport *viewport)
void * drw_engine_data_engine_data_create(GPUViewport *viewport, void *engine_type)
struct DupliKey DupliKey
struct DRWDebugSphere DRWDebugSphere
struct DRWObjectMatrix DRWObjectMatrix
BLI_INLINE void DRW_handle_increment(DRWResourceHandle *handle)
Definition: draw_manager.h:149
struct DRWCommandDrawInstanceRange DRWCommandDrawInstanceRange
struct DRWCommandSmallChunk DRWCommandSmallChunk
BLI_INLINE uint32_t DRW_handle_id_get(const DRWResourceHandle *handle)
Definition: draw_manager.h:144
void drw_engine_data_cache_release(GPUViewport *viewport)
union DRWCommand DRWCommand
void drw_debug_init(void)
Definition: draw_debug.c:193
uint32_t DRWResourceHandle
Definition: draw_manager.h:132
#define MAX_PASS_NAME
Definition: draw_manager.h:409
BLI_INLINE void DRW_handle_negative_scale_enable(DRWResourceHandle *handle)
Definition: draw_manager.h:154
struct DRWCullingState DRWCullingState
struct DRWCommandChunk DRWCommandChunk
struct DRWManager DRWManager
void drw_engine_data_free(GPUViewport *viewport)
struct DRWCommandBarrier DRWCommandBarrier
GPUBatch * drw_cache_procedural_lines_get(void)
Definition: draw_cache.c:183
struct DRWCommandDraw DRWCommandDraw
struct DRWCommandComputeIndirect DRWCommandComputeIndirect
struct DRWCommandSetMutableState DRWCommandSetMutableState
const int state
unsigned int uint32_t
Definition: stdint.h:80
unsigned char uint8_t
Definition: stdint.h:78
unsigned __int64 uint64_t
Definition: stdint.h:90
GPUVertBuf * buf_select
Definition: draw_manager.h:302
GPUVertBuf * buf
Definition: draw_manager.h:301
eGPUBarrier type
Definition: draw_manager.h:250
struct DRWCommandChunk * next
Definition: draw_manager.h:471
uint32_t command_len
Definition: draw_manager.h:472
uint32_t command_used
Definition: draw_manager.h:473
DRWCommand commands[96]
Definition: draw_manager.h:477
uint64_t command_type[6]
Definition: draw_manager.h:475
eGPUFrameBufferBits clear_channels
Definition: draw_manager.h:277
GPUStorageBuf * indirect_buf
Definition: draw_manager.h:246
DRWResourceHandle handle
Definition: draw_manager.h:230
DRWResourceHandle handle
Definition: draw_manager.h:223
DRWResourceHandle handle
Definition: draw_manager.h:255
DRWResourceHandle handle
Definition: draw_manager.h:216
GPUBatch * batch
Definition: draw_manager.h:209
DRWResourceHandle handle
Definition: draw_manager.h:210
GPUVertBuf * select_buf
Definition: draw_manager.h:272
DRWCommand commands[6]
Definition: draw_manager.h:488
uint64_t command_type[6]
Definition: draw_manager.h:487
struct DRWCommandChunk * next
Definition: draw_manager.h:482
BoundSphere bsphere
Definition: draw_manager.h:107
struct GHash * obattrs_ubo_pool
Definition: draw_manager.h:530
ListBase smoke_textures
Definition: draw_manager.h:535
struct BLI_memblock * images
Definition: draw_manager.h:527
struct BLI_memblock * commands_small
Definition: draw_manager.h:518
uint ubo_len
Definition: draw_manager.h:531
struct BLI_memblock * obinfos
Definition: draw_manager.h:521
struct BLI_memblock * commands
Definition: draw_manager.h:517
struct BLI_memblock * shgroups
Definition: draw_manager.h:523
struct BLI_memblock * passes
Definition: draw_manager.h:526
void * volume_grids_ubos
Definition: draw_manager.h:533
struct BLI_memblock * uniforms
Definition: draw_manager.h:524
struct DRWTexturePool * texture_pool
Definition: draw_manager.h:540
struct GPUUniformBuf ** obinfos_ubo
Definition: draw_manager.h:529
struct DRWViewData * view_data[2]
Definition: draw_manager.h:542
struct BLI_memblock * obmats
Definition: draw_manager.h:520
struct GPUUniformBuf ** matrices_ubo
Definition: draw_manager.h:528
DRWInstanceDataList * idatalist
Definition: draw_manager.h:515
struct BLI_memblock * views
Definition: draw_manager.h:525
struct BLI_memblock * callbuffers
Definition: draw_manager.h:519
struct CurvesUniformBufPool * curves_ubos
Definition: draw_manager.h:544
struct BLI_memblock * cullstates
Definition: draw_manager.h:522
float pos[2][3]
Definition: draw_manager.h:500
struct DRWDebugLine * next
Definition: draw_manager.h:499
float color[4]
Definition: draw_manager.h:501
float mat[4][4]
Definition: draw_manager.h:506
struct DRWDebugSphere * next
Definition: draw_manager.h:505
float color[4]
Definition: draw_manager.h:507
ViewInfos view_storage_cpy
Definition: draw_manager.h:629
uint is_image_render
Definition: draw_manager.h:609
uint select_id
Definition: draw_manager.h:632
struct DupliObject * dupli_source
Definition: draw_manager.h:575
DRWResourceHandle ob_handle
Definition: draw_manager.h:566
uint draw_background
Definition: draw_manager.h:611
struct DRWViewData * view_data_active
Definition: draw_manager.h:564
DRWResourceHandle pass_handle
Definition: draw_manager.h:572
DRWView * view_active
Definition: draw_manager.h:624
struct TaskGraph * task_graph
Definition: draw_manager.h:635
DRWContextState draw_ctx
Definition: draw_manager.h:616
DRWView * view_previous
Definition: draw_manager.h:625
float size[2]
Definition: draw_manager.h:600
bool buffer_finish_called
Definition: draw_manager.h:621
DRWState state
Definition: draw_manager.h:594
DRWResourceHandle resource_handle
Definition: draw_manager.h:570
struct ID * dupli_origin_data
Definition: draw_manager.h:581
uint primary_view_num
Definition: draw_manager.h:626
GPUBatch * batch
Definition: draw_manager.h:591
float inv_size[2]
Definition: draw_manager.h:601
void ** dupli_datas
Definition: draw_manager.h:587
GPUViewport * viewport
Definition: draw_manager.h:598
GPUShader * shader
Definition: draw_manager.h:590
struct DRWManager::@314 debug
float screenvecs[2][3]
Definition: draw_manager.h:602
struct DRWTextStore ** text_store_p
Definition: draw_manager.h:619
DRWInstanceData * object_instance_data[MAX_INSTANCE_DATA_SIZE]
Definition: draw_manager.h:585
float pixsize
Definition: draw_manager.h:603
DRWDebugSphere * spheres
Definition: draw_manager.h:654
struct Object * dupli_parent
Definition: draw_manager.h:577
struct GSet * delayed_extraction
Definition: draw_manager.h:637
bool ob_state_obinfo_init
Definition: draw_manager.h:568
uint is_material_select
Definition: draw_manager.h:607
struct GHash * dupli_ghash
Definition: draw_manager.h:583
DRWDebugLine * lines
Definition: draw_manager.h:653
struct DRWManager::@313 options
struct GPUFrameBuffer * default_framebuffer
Definition: draw_manager.h:599
uint is_scene_render
Definition: draw_manager.h:610
uint is_select
Definition: draw_manager.h:606
GPUDrawList * draw_list
Definition: draw_manager.h:649
struct Object * dupli_origin
Definition: draw_manager.h:579
DRWData * vmempool
Definition: draw_manager.h:562
uint draw_text
Definition: draw_manager.h:612
TicketMutex * gl_context_mutex
Definition: draw_manager.h:647
DRWState state_lock
Definition: draw_manager.h:595
DRWView * view_default
Definition: draw_manager.h:623
GPUContext * gpu_context
Definition: draw_manager.h:645
void * gl_context
Definition: draw_manager.h:644
float orcotexfac[2][4]
Definition: draw_manager.h:173
float ob_color[4]
Definition: draw_manager.h:174
float modelinverse[4][4]
Definition: draw_manager.h:169
float model[4][4]
Definition: draw_manager.h:168
DRWResourceHandle handle
Definition: draw_manager.h:425
DRWState state
Definition: draw_manager.h:426
char name[MAX_PASS_NAME]
Definition: draw_manager.h:427
DRWShadingGroup * last
Definition: draw_manager.h:415
DRWShadingGroup * first
Definition: draw_manager.h:414
struct DRWPass::@312 shgroups
DRWPass * original
Definition: draw_manager.h:421
DRWPass * next
Definition: draw_manager.h:423
DrawEngineType * draw_engine
Definition: draw_manager.h:92
struct DRWCommandChunk * first
Definition: draw_manager.h:388
struct DRWShadingGroup::@307::@311 z_sorting
struct GPUUniformAttrList * uniform_attrs
Definition: draw_manager.h:398
struct DRWUniformChunk * uniforms
Definition: draw_manager.h:384
struct DRWShadingGroup::@306 cmd
DRWResourceHandle pass_handle
Definition: draw_manager.h:395
DRWShadingGroup * next
Definition: draw_manager.h:381
struct DRWCommandChunk * last
Definition: draw_manager.h:388
GPUShader * shader
Definition: draw_manager.h:383
uint32_t uniform_used
Definition: draw_manager.h:466
DRWUniform uniforms[10]
Definition: draw_manager.h:467
struct DRWUniformChunk * next
Definition: draw_manager.h:464
uint32_t uniform_len
Definition: draw_manager.h:465
int ivalue[4]
Definition: draw_manager.h:370
GPUStorageBuf ** ssbo_ref
Definition: draw_manager.h:360
uint8_t arraysize
Definition: draw_manager.h:377
struct GPUUniformAttrList * uniform_attrs
Definition: draw_manager.h:372
GPUStorageBuf * ssbo
Definition: draw_manager.h:359
GPUVertBuf * vertbuf
Definition: draw_manager.h:364
GPUTexture ** texture_ref
Definition: draw_manager.h:348
GPUVertBuf ** vertbuf_ref
Definition: draw_manager.h:365
GPUUniformBuf ** block_ref
Definition: draw_manager.h:355
GPUUniformBuf * block
Definition: draw_manager.h:354
uint8_t type
Definition: draw_manager.h:375
uint8_t length
Definition: draw_manager.h:376
GPUTexture * texture
Definition: draw_manager.h:347
eGPUSamplerState sampler_state
Definition: draw_manager.h:350
float fvalue[4]
Definition: draw_manager.h:368
const void * pvalue
Definition: draw_manager.h:343
ViewInfos storage
Definition: draw_manager.h:436
int clip_planes_len
Definition: draw_manager.h:438
struct DRWView * parent
Definition: draw_manager.h:434
DRWCallVisibilityFn * visibility_fn
Definition: draw_manager.h:449
uint32_t culling_mask
Definition: draw_manager.h:444
BoundBox frustum_corners
Definition: draw_manager.h:445
BoundSphere frustum_bsphere
Definition: draw_manager.h:446
void * user_data
Definition: draw_manager.h:450
bool is_dirty
Definition: draw_manager.h:440
float frustum_planes[6][4]
Definition: draw_manager.h:447
bool is_inverted
Definition: draw_manager.h:442
struct ID * ob_data
Definition: draw_manager.h:551
struct Object * ob
Definition: draw_manager.h:550
Definition: DNA_ID.h:368
DRWCommandComputeIndirect compute_indirect
Definition: draw_manager.h:291
DRWCommandSetStencil stencil
Definition: draw_manager.h:294
DRWCommandComputeRef compute_ref
Definition: draw_manager.h:290
DRWCommandDraw draw
Definition: draw_manager.h:284
DRWCommandDrawInstance instance
Definition: draw_manager.h:286
DRWCommandDrawRange range
Definition: draw_manager.h:285
DRWCommandSetMutableState state
Definition: draw_manager.h:293
DRWCommandCompute compute
Definition: draw_manager.h:289
DRWCommandBarrier barrier
Definition: draw_manager.h:292
DRWCommandDrawInstanceRange instance_range
Definition: draw_manager.h:287
DRWCommandClear clear
Definition: draw_manager.h:296
DRWCommandDrawProcedural procedural
Definition: draw_manager.h:288
DRWCommandSetSelectID select_id
Definition: draw_manager.h:295