Blender  V2.93
draw_manager.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * Copyright 2016, Blender Foundation.
17  */
18 
23 /* Private functions / structs of the draw manager */
24 
25 #pragma once
26 
27 #include "DRW_engine.h"
28 #include "DRW_render.h"
29 
30 #include "BLI_assert.h"
31 #include "BLI_linklist.h"
32 #include "BLI_memblock.h"
33 #include "BLI_task.h"
34 #include "BLI_threads.h"
35 
36 #include "GPU_batch.h"
37 #include "GPU_context.h"
38 #include "GPU_drawlist.h"
39 #include "GPU_framebuffer.h"
40 #include "GPU_shader.h"
41 #include "GPU_uniform_buffer.h"
42 #include "GPU_viewport.h"
43 
44 #include "draw_instance_data.h"
45 
46 struct DupliObject;
47 struct Object;
48 
50 #define USE_GPU_SELECT
51 
53 #define USE_BATCHING 1
54 
55 // #define DRW_DEBUG_CULLING
56 #define DRW_DEBUG_USE_UNIFORM_NAME 0
57 #define DRW_UNIFORM_BUFFER_NAME 64
58 
59 /* ------------ Profiling --------------- */
60 
61 #define USE_PROFILE
62 
63 #ifdef USE_PROFILE
64 # include "PIL_time.h"
65 
66 # define PROFILE_TIMER_FALLOFF 0.04
67 
68 # define PROFILE_START(time_start) \
69  double time_start = PIL_check_seconds_timer(); \
70  ((void)0)
71 
72 # define PROFILE_END_ACCUM(time_accum, time_start) \
73  { \
74  time_accum += (PIL_check_seconds_timer() - time_start) * 1e3; \
75  } \
76  ((void)0)
77 
78 /* exp average */
79 # define PROFILE_END_UPDATE(time_update, time_start) \
80  { \
81  double _time_delta = (PIL_check_seconds_timer() - time_start) * 1e3; \
82  time_update = (time_update * (1.0 - PROFILE_TIMER_FALLOFF)) + \
83  (_time_delta * PROFILE_TIMER_FALLOFF); \
84  } \
85  ((void)0)
86 
87 #else /* USE_PROFILE */
88 
89 # define PROFILE_START(time_start) ((void)0)
90 # define PROFILE_END_ACCUM(time_accum, time_start) ((void)0)
91 # define PROFILE_END_UPDATE(time_update, time_start) ((void)0)
92 
93 #endif /* USE_PROFILE */
94 
95 /* ------------ Data Structure --------------- */
102 typedef struct DRWCullingState {
104  /* Culling: Using Bounding Sphere for now for faster culling.
105  * Not ideal for planes. Could be extended. */
107  /* Grrr only used by EEVEE. */
108  void *user_data;
110 
111 /* Minimum max UBO size is 64KiB. We take the largest
112  * UBO struct and alloc the max number.
113  * ((1 << 16) / sizeof(DRWObjectMatrix)) = 512
114  * Keep in sync with common_view_lib.glsl */
115 #define DRW_RESOURCE_CHUNK_LEN 512
116 
132 
134 {
135  return (*handle & 0x80000000) != 0;
136 }
137 
139 {
140  return (*handle & 0x7FFFFFFF) >> 9;
141 }
142 
144 {
145  return (*handle & 0x000001FF);
146 }
147 
149 {
150  *handle += 1;
151 }
152 
154 {
155  *handle |= 0x80000000;
156 }
157 
159  const DRWResourceHandle *handle)
160 {
161  int elem = DRW_handle_id_get(handle);
162  int chunk = DRW_handle_chunk_get(handle);
163  return BLI_memblock_elem_get(memblock, chunk, elem);
164 }
165 
166 typedef struct DRWObjectMatrix {
167  float model[4][4];
168  float modelinverse[4][4];
170 
171 typedef struct DRWObjectInfos {
172  float orcotexfac[2][4];
173  float ob_color[4];
174  float ob_index;
175  float pad; /* UNUSED*/
176  float ob_random;
177  float ob_flag; /* sign is negative scaling, */
179 
182 
183 typedef enum {
184  /* Draw Commands */
185  DRW_CMD_DRAW = 0, /* Only sortable type. Must be 0. */
190  /* Other Commands */
195  /* Needs to fit in 4bits */
197 
198 #define DRW_MAX_DRAW_CMD_TYPE DRW_CMD_DRAW_PROCEDURAL
199 
200 typedef struct DRWCommandDraw {
204 
205 /* Assume DRWResourceHandle to be 0. */
206 typedef struct DRWCommandDrawRange {
212 
213 typedef struct DRWCommandDrawInstance {
217  uint use_attrs; /* bool */
219 
226 
227 typedef struct DRWCommandDrawProcedural {
232 
238 
239 typedef struct DRWCommandSetStencil {
244 
245 typedef struct DRWCommandSetSelectID {
249 
250 typedef struct DRWCommandClear {
252  uchar r, g, b, a; /* [0..1] for each channels. Normalized. */
253  float depth; /* [0..1] for depth. Normalized. */
254  uchar stencil; /* Stencil value [0..255] */
256 
257 typedef union DRWCommand {
268 
273  int count;
274 };
275 
277 typedef enum {
299  /* WARNING: set DRWUniform->type
300  * bit length accordingly. */
302 
303 struct DRWUniform {
304  union {
305  /* For reference or array/vector types. */
306  const void *pvalue;
307  /* DRW_UNIFORM_TEXTURE */
308  struct {
309  union {
312  };
314  };
315  /* DRW_UNIFORM_BLOCK */
316  union {
319  };
320  /* DRW_UNIFORM_FLOAT_COPY */
321  float fvalue[4];
322  /* DRW_UNIFORM_INT_COPY */
323  int ivalue[4];
324  /* DRW_UNIFORM_BLOCK_OBATTRS */
326  };
327  int location; /* Uniform location or binding point for textures and UBO's. */
328  uint8_t type; /* #DRWUniformType */
329  uint8_t length; /* Length of vector types. */
330  uint8_t arraysize; /* Array size of scalar/vector types. */
331 };
332 
335 
336  GPUShader *shader; /* Shader to bind */
337  struct DRWUniformChunk *uniforms; /* Uniforms pointers */
338 
339  struct {
340  /* Chunks of draw calls. */
342  } cmd;
343 
344  union {
345  /* This struct is used during cache populate. */
346  struct {
347  int objectinfo; /* Equal to 1 if the shader needs obinfos. */
348  DRWResourceHandle pass_handle; /* Memblock key to parent pass. */
349 
350  /* Set of uniform attributes used by this shader. */
352  };
353  /* This struct is used after cache populate if using the Z sorting.
354  * It will not conflict with the above struct. */
355  struct {
356  float distance; /* Distance from camera. */
357  uint original_index; /* Original position inside the shgroup list. */
359  };
360 };
361 
362 #define MAX_PASS_NAME 32
363 
364 struct DRWPass {
365  /* Linked list */
366  struct {
370 
371  /* Draw the shgroups of this pass instead.
372  * This avoid duplicating drawcalls/shgroups
373  * for similar passes. */
375  /* Link list of additional passes to render. */
377 
381 };
382 
383 /* keep in sync with viewBlock */
384 typedef struct DRWViewUboStorage {
385  /* View matrices */
386  float persmat[4][4];
387  float persinv[4][4];
388  float viewmat[4][4];
389  float viewinv[4][4];
390  float winmat[4][4];
391  float wininv[4][4];
392 
393  float clipplanes[6][4];
394  float viewvecs[2][4];
395  /* Should not be here. Not view dependent (only main view). */
396  float viewcamtexcofac[4];
398 
400 
401 #define MAX_CULLED_VIEWS 32
402 
403 struct DRWView {
405  struct DRWView *parent;
406 
411  bool is_dirty;
418  float frustum_planes[6][4];
421  void *user_data;
422 };
423 
424 /* ------------ Data Chunks --------------- */
434 typedef struct DRWUniformChunk {
435  struct DRWUniformChunk *next; /* single-linked list */
440 
441 typedef struct DRWCommandChunk {
445  /* 4bits for each command. */
447  /* -- 64 bytes aligned -- */
449  /* -- 64 bytes aligned -- */
451 
452 typedef struct DRWCommandSmallChunk {
456  /* 4bits for each command. */
457  /* TODO reduce size of command_type. */
461 
462 /* Only true for 64-bit platforms. */
463 #ifdef __LP64__
465 #endif
466 
467 /* ------------- DRAW DEBUG ------------ */
468 
469 typedef struct DRWDebugLine {
470  struct DRWDebugLine *next; /* linked list */
471  float pos[2][3];
472  float color[4];
474 
475 typedef struct DRWDebugSphere {
476  struct DRWDebugSphere *next; /* linked list */
477  float mat[4][4];
478  float color[4];
480 
481 /* ------------- DRAW MANAGER ------------ */
482 
483 #define DST_MAX_SLOTS 64 /* Cannot be changed without modifying RST.bound_tex_slots */
484 #define MAX_CLIP_PLANES 6 /* GL_MAX_CLIP_PLANES is at least 6 */
485 #define STENCIL_UNDEFINED 256
486 #define DRW_DRAWLIST_LEN 256
487 typedef struct DRWManager {
488  /* TODO clean up this struct a bit */
489  /* Cache generation */
492  /* State of the object being evaluated if already allocated. */
500 
509  /* Array of dupli_data (one for each enabled engine) to handle duplis. */
510  void **dupli_datas;
511 
512  /* Rendering state */
515 
516  /* Managed by `DRW_state_set`, `DRW_state_reset` */
519 
520  /* Per viewport */
523  float size[2];
524  float inv_size[2];
525  float screenvecs[2][3];
526  float pixsize;
527 
528  struct {
537 
538  /* Current rendering context */
540 
541  /* Convenience pointer to text_store owned by the viewport */
543 
544  ListBase enabled_engines; /* RenderEngineType */
545  void **vedata_array; /* ViewportEngineData */
546  int enabled_engine_count; /* Length of enabled_engines list. */
547 
548  bool buffer_finish_called; /* Avoid bad usage of DRW_render_instance_buffer_finish */
549 
557 
558 #ifdef USE_GPU_SELECT
560 #endif
561 
563  /* Contains list of objects that needs to be extracted from other objects. */
565 
566  /* ---------- Nothing after this point is cleared after use ----------- */
567 
568  /* gl_context serves as the offset for clearing only
569  * the top portion of the struct so DO NOT MOVE IT! */
571  void *gl_context;
575 
577 
578  struct {
579  /* TODO(fclem): optimize: use chunks. */
582  } debug;
584 
585 extern DRWManager DST; /* TODO: get rid of this and allow multi-threaded rendering. */
586 
587 /* --------------- FUNCTIONS ------------- */
588 
590 
591 void *drw_viewport_engine_data_ensure(void *engine_type);
592 
594 
595 void drw_debug_draw(void);
596 void drw_debug_init(void);
597 
598 eDRWCommandType command_type_get(const uint64_t *command_type_bits, int index);
599 
603 
605 
606 /* Procedural Drawing */
610 
611 void drw_uniform_attrs_pool_update(struct GHash *table,
612  struct GPUUniformAttrList *key,
613  DRWResourceHandle *handle,
614  struct Object *ob,
615  struct Object *dupli_parent,
616  struct DupliObject *dupli_source);
#define BLI_STATIC_ASSERT_ALIGN(st, align)
Definition: BLI_assert.h:89
#define BLI_INLINE
struct GSet GSet
Definition: BLI_ghash.h:189
void * BLI_memblock_elem_get(BLI_memblock *mblk, int chunk, int elem) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition: BLI_memblock.c:197
unsigned char uchar
Definition: BLI_sys_types.h:86
unsigned int uint
Definition: BLI_sys_types.h:83
bool() DRWCallVisibilityFn(bool vis_in, void *user_data)
Definition: DRW_render.h:410
DRWTextureFlag
Definition: DRW_render.h:138
DRWState
Definition: DRW_render.h:312
GPUBatch
Definition: GPU_batch.h:93
struct GPUContext GPUContext
Definition: GPU_context.h:44
struct GPUDrawList GPUDrawList
Definition: GPU_drawlist.h:36
struct GPUFrameBuffer GPUFrameBuffer
eGPUFrameBufferBits
struct GPUShader GPUShader
Definition: GPU_shader.h:33
eGPUSamplerState
Definition: GPU_texture.h:40
struct GPUTexture GPUTexture
Definition: GPU_texture.h:33
struct GPUUniformBuf GPUUniformBuf
struct GPUVertBuf GPUVertBuf
Platform independent time functions.
#define MAX_INSTANCE_DATA_SIZE
void drw_texture_set_parameters(GPUTexture *tex, DRWTextureFlag flags)
DRWUniformType
Definition: draw_manager.h:277
@ DRW_UNIFORM_BLOCK_OBINFOS
Definition: draw_manager.h:291
@ DRW_UNIFORM_TFEEDBACK_TARGET
Definition: draw_manager.h:288
@ DRW_UNIFORM_TEXTURE_REF
Definition: draw_manager.h:283
@ DRW_UNIFORM_MODEL_MATRIX
Definition: draw_manager.h:297
@ DRW_UNIFORM_FLOAT_COPY
Definition: draw_manager.h:281
@ DRW_UNIFORM_MODEL_MATRIX_INVERSE
Definition: draw_manager.h:298
@ DRW_UNIFORM_FLOAT
Definition: draw_manager.h:280
@ DRW_UNIFORM_BASE_INSTANCE
Definition: draw_manager.h:296
@ DRW_UNIFORM_BLOCK_OBMATS
Definition: draw_manager.h:290
@ DRW_UNIFORM_IMAGE_REF
Definition: draw_manager.h:285
@ DRW_UNIFORM_RESOURCE_ID
Definition: draw_manager.h:294
@ DRW_UNIFORM_BLOCK
Definition: draw_manager.h:286
@ DRW_UNIFORM_TEXTURE
Definition: draw_manager.h:282
@ DRW_UNIFORM_RESOURCE_CHUNK
Definition: draw_manager.h:293
@ DRW_UNIFORM_IMAGE
Definition: draw_manager.h:284
@ DRW_UNIFORM_BLOCK_OBATTRS
Definition: draw_manager.h:292
@ DRW_UNIFORM_INT
Definition: draw_manager.h:278
@ DRW_UNIFORM_BLOCK_REF
Definition: draw_manager.h:287
@ DRW_UNIFORM_INT_COPY
Definition: draw_manager.h:279
struct DRWCommandSetSelectID DRWCommandSetSelectID
struct DRWUniformChunk DRWUniformChunk
BLI_INLINE uint32_t DRW_handle_chunk_get(const DRWResourceHandle *handle)
Definition: draw_manager.h:138
eDRWCommandType command_type_get(const uint64_t *command_type_bits, int index)
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)
struct DRWCommandClear DRWCommandClear
void drw_state_set(DRWState state)
struct DRWCommandSetStencil DRWCommandSetStencil
void drw_debug_draw(void)
Definition: draw_debug.c:221
GPUBatch * drw_cache_procedural_points_get(void)
Definition: draw_cache.c:170
DRWManager DST
Definition: draw_manager.c:111
void * drw_viewport_engine_data_ensure(void *engine_type)
Definition: draw_manager.c:401
void drw_batch_cache_generate_requested(struct Object *ob)
Definition: draw_cache.c:3573
struct DRWCommandDrawProcedural DRWCommandDrawProcedural
GPUBatch * drw_cache_procedural_triangles_get(void)
Definition: draw_cache.c:198
BLI_INLINE void * DRW_memblock_elem_from_handle(struct BLI_memblock *memblock, const DRWResourceHandle *handle)
Definition: draw_manager.h:158
struct DRWCommandDrawRange DRWCommandDrawRange
eDRWCommandType
Definition: draw_manager.h:183
@ DRW_CMD_DRAW
Definition: draw_manager.h:185
@ DRW_CMD_DRWSTATE
Definition: draw_manager.h:192
@ DRW_CMD_DRAW_RANGE
Definition: draw_manager.h:186
@ DRW_CMD_CLEAR
Definition: draw_manager.h:191
@ DRW_CMD_STENCIL
Definition: draw_manager.h:193
@ DRW_CMD_DRAW_INSTANCE_RANGE
Definition: draw_manager.h:188
@ DRW_CMD_DRAW_PROCEDURAL
Definition: draw_manager.h:189
@ DRW_CMD_SELECTID
Definition: draw_manager.h:194
@ DRW_CMD_DRAW_INSTANCE
Definition: draw_manager.h:187
struct DRWObjectInfos DRWObjectInfos
struct DRWDebugLine DRWDebugLine
void drw_batch_cache_validate(Object *ob)
Definition: draw_cache.c:3538
BLI_INLINE uint32_t DRW_handle_negative_scale_get(const DRWResourceHandle *handle)
Definition: draw_manager.h:133
void drw_batch_cache_generate_requested_delayed(Object *ob)
Definition: draw_cache.c:3608
struct DRWDebugSphere DRWDebugSphere
struct DRWObjectMatrix DRWObjectMatrix
BLI_INLINE void DRW_handle_increment(DRWResourceHandle *handle)
Definition: draw_manager.h:148
struct DRWCommandDrawInstanceRange DRWCommandDrawInstanceRange
struct DRWCommandSmallChunk DRWCommandSmallChunk
BLI_INLINE uint32_t DRW_handle_id_get(const DRWResourceHandle *handle)
Definition: draw_manager.h:143
union DRWCommand DRWCommand
void drw_debug_init(void)
Definition: draw_debug.c:227
uint32_t DRWResourceHandle
Definition: draw_manager.h:131
#define MAX_PASS_NAME
Definition: draw_manager.h:362
BLI_INLINE void DRW_handle_negative_scale_enable(DRWResourceHandle *handle)
Definition: draw_manager.h:153
struct DRWCullingState DRWCullingState
struct DRWCommandChunk DRWCommandChunk
struct DRWManager DRWManager
GPUBatch * drw_cache_procedural_lines_get(void)
Definition: draw_cache.c:184
struct DRWViewUboStorage DRWViewUboStorage
struct DRWCommandDraw DRWCommandDraw
struct DRWCommandSetMutableState DRWCommandSetMutableState
void drw_resource_buffer_finish(ViewportMemoryPool *vmempool)
static ulong state[N]
unsigned int uint32_t
Definition: stdint.h:83
unsigned char uint8_t
Definition: stdint.h:81
unsigned __int64 uint64_t
Definition: stdint.h:93
GPUVertBuf * buf_select
Definition: draw_manager.h:272
GPUVertBuf * buf
Definition: draw_manager.h:271
struct DRWCommandChunk * next
Definition: draw_manager.h:442
uint32_t command_len
Definition: draw_manager.h:443
uint32_t command_used
Definition: draw_manager.h:444
DRWCommand commands[96]
Definition: draw_manager.h:448
uint64_t command_type[6]
Definition: draw_manager.h:446
eGPUFrameBufferBits clear_channels
Definition: draw_manager.h:251
DRWResourceHandle handle
Definition: draw_manager.h:222
DRWResourceHandle handle
Definition: draw_manager.h:215
DRWResourceHandle handle
Definition: draw_manager.h:229
DRWResourceHandle handle
Definition: draw_manager.h:208
GPUBatch * batch
Definition: draw_manager.h:201
DRWResourceHandle handle
Definition: draw_manager.h:202
GPUVertBuf * select_buf
Definition: draw_manager.h:246
DRWCommand commands[6]
Definition: draw_manager.h:459
uint64_t command_type[6]
Definition: draw_manager.h:458
struct DRWCommandChunk * next
Definition: draw_manager.h:453
BoundSphere bsphere
Definition: draw_manager.h:106
float pos[2][3]
Definition: draw_manager.h:471
struct DRWDebugLine * next
Definition: draw_manager.h:470
float color[4]
Definition: draw_manager.h:472
float mat[4][4]
Definition: draw_manager.h:477
struct DRWDebugSphere * next
Definition: draw_manager.h:476
float color[4]
Definition: draw_manager.h:478
uint is_image_render
Definition: draw_manager.h:531
uint select_id
Definition: draw_manager.h:559
struct DupliObject * dupli_source
Definition: draw_manager.h:502
DRWResourceHandle ob_handle
Definition: draw_manager.h:493
uint draw_background
Definition: draw_manager.h:534
DRWResourceHandle pass_handle
Definition: draw_manager.h:499
DRWView * view_active
Definition: draw_manager.h:551
struct TaskGraph * task_graph
Definition: draw_manager.h:562
DRWContextState draw_ctx
Definition: draw_manager.h:539
DRWView * view_previous
Definition: draw_manager.h:552
float size[2]
Definition: draw_manager.h:523
bool buffer_finish_called
Definition: draw_manager.h:548
DRWState state
Definition: draw_manager.h:517
DRWResourceHandle resource_handle
Definition: draw_manager.h:497
GPUBatch * batch
Definition: draw_manager.h:514
float inv_size[2]
Definition: draw_manager.h:524
uint primary_view_ct
Definition: draw_manager.h:553
void ** dupli_datas
Definition: draw_manager.h:510
GPUViewport * viewport
Definition: draw_manager.h:521
ListBase enabled_engines
Definition: draw_manager.h:544
GPUShader * shader
Definition: draw_manager.h:513
void ** vedata_array
Definition: draw_manager.h:545
float screenvecs[2][3]
Definition: draw_manager.h:525
struct DRWTextStore ** text_store_p
Definition: draw_manager.h:542
DRWInstanceData * object_instance_data[MAX_INSTANCE_DATA_SIZE]
Definition: draw_manager.h:508
float pixsize
Definition: draw_manager.h:526
DRWDebugSphere * spheres
Definition: draw_manager.h:581
struct Object * dupli_parent
Definition: draw_manager.h:503
struct GSet * delayed_extraction
Definition: draw_manager.h:564
uint do_color_management
Definition: draw_manager.h:533
bool ob_state_obinfo_init
Definition: draw_manager.h:495
struct GHash * dupli_ghash
Definition: draw_manager.h:506
DRWDebugLine * lines
Definition: draw_manager.h:580
ViewportMemoryPool * vmempool
Definition: draw_manager.h:490
struct GPUFrameBuffer * default_framebuffer
Definition: draw_manager.h:522
uint is_scene_render
Definition: draw_manager.h:532
struct DRWManager::@295 options
uint is_select
Definition: draw_manager.h:529
GPUDrawList * draw_list
Definition: draw_manager.h:576
struct Object * dupli_origin
Definition: draw_manager.h:504
struct DRWManager::@296 debug
int enabled_engine_count
Definition: draw_manager.h:546
uint draw_text
Definition: draw_manager.h:535
DRWInstanceDataList * idatalist
Definition: draw_manager.h:491
TicketMutex * gl_context_mutex
Definition: draw_manager.h:574
DRWState state_lock
Definition: draw_manager.h:518
DRWView * view_default
Definition: draw_manager.h:550
GPUContext * gpu_context
Definition: draw_manager.h:572
DRWViewUboStorage view_storage_cpy
Definition: draw_manager.h:556
void * gl_context
Definition: draw_manager.h:571
float orcotexfac[2][4]
Definition: draw_manager.h:172
float ob_color[4]
Definition: draw_manager.h:173
float modelinverse[4][4]
Definition: draw_manager.h:168
float model[4][4]
Definition: draw_manager.h:167
DRWResourceHandle handle
Definition: draw_manager.h:378
DRWState state
Definition: draw_manager.h:379
char name[MAX_PASS_NAME]
Definition: draw_manager.h:380
DRWShadingGroup * last
Definition: draw_manager.h:368
DRWShadingGroup * first
Definition: draw_manager.h:367
DRWPass * original
Definition: draw_manager.h:374
struct DRWPass::@294 shgroups
DRWPass * next
Definition: draw_manager.h:376
struct DRWCommandChunk * first
Definition: draw_manager.h:341
struct DRWShadingGroup::@289::@293 z_sorting
struct GPUUniformAttrList * uniform_attrs
Definition: draw_manager.h:351
struct DRWUniformChunk * uniforms
Definition: draw_manager.h:337
DRWResourceHandle pass_handle
Definition: draw_manager.h:348
DRWShadingGroup * next
Definition: draw_manager.h:334
struct DRWShadingGroup::@288 cmd
struct DRWCommandChunk * last
Definition: draw_manager.h:341
GPUShader * shader
Definition: draw_manager.h:336
uint32_t uniform_used
Definition: draw_manager.h:437
DRWUniform uniforms[10]
Definition: draw_manager.h:438
struct DRWUniformChunk * next
Definition: draw_manager.h:435
uint32_t uniform_len
Definition: draw_manager.h:436
int ivalue[4]
Definition: draw_manager.h:323
uint8_t arraysize
Definition: draw_manager.h:330
struct GPUUniformAttrList * uniform_attrs
Definition: draw_manager.h:325
GPUTexture ** texture_ref
Definition: draw_manager.h:311
GPUUniformBuf ** block_ref
Definition: draw_manager.h:318
GPUUniformBuf * block
Definition: draw_manager.h:317
uint8_t type
Definition: draw_manager.h:328
uint8_t length
Definition: draw_manager.h:329
GPUTexture * texture
Definition: draw_manager.h:310
eGPUSamplerState sampler_state
Definition: draw_manager.h:313
float fvalue[4]
Definition: draw_manager.h:321
const void * pvalue
Definition: draw_manager.h:306
float viewcamtexcofac[4]
Definition: draw_manager.h:396
float persmat[4][4]
Definition: draw_manager.h:386
float winmat[4][4]
Definition: draw_manager.h:390
float viewinv[4][4]
Definition: draw_manager.h:389
float viewmat[4][4]
Definition: draw_manager.h:388
float wininv[4][4]
Definition: draw_manager.h:391
float clipplanes[6][4]
Definition: draw_manager.h:393
float viewvecs[2][4]
Definition: draw_manager.h:394
float persinv[4][4]
Definition: draw_manager.h:387
DRWViewUboStorage storage
Definition: draw_manager.h:407
int clip_planes_len
Definition: draw_manager.h:409
struct DRWView * parent
Definition: draw_manager.h:405
DRWCallVisibilityFn * visibility_fn
Definition: draw_manager.h:420
uint32_t culling_mask
Definition: draw_manager.h:415
BoundBox frustum_corners
Definition: draw_manager.h:416
BoundSphere frustum_bsphere
Definition: draw_manager.h:417
void * user_data
Definition: draw_manager.h:421
bool is_dirty
Definition: draw_manager.h:411
float frustum_planes[6][4]
Definition: draw_manager.h:418
bool is_inverted
Definition: draw_manager.h:413
DRWCommandSetStencil stencil
Definition: draw_manager.h:264
DRWCommandDraw draw
Definition: draw_manager.h:258
DRWCommandDrawInstance instance
Definition: draw_manager.h:260
DRWCommandDrawRange range
Definition: draw_manager.h:259
DRWCommandSetMutableState state
Definition: draw_manager.h:263
DRWCommandDrawInstanceRange instance_range
Definition: draw_manager.h:261
DRWCommandClear clear
Definition: draw_manager.h:266
DRWCommandDrawProcedural procedural
Definition: draw_manager.h:262
DRWCommandSetSelectID select_id
Definition: draw_manager.h:265