50 #define USE_GPU_SELECT
53 #define USE_BATCHING 1
56 #define DRW_DEBUG_USE_UNIFORM_NAME 0
57 #define DRW_UNIFORM_BUFFER_NAME 64
66 # define PROFILE_TIMER_FALLOFF 0.04
68 # define PROFILE_START(time_start) \
69 double time_start = PIL_check_seconds_timer(); \
72 # define PROFILE_END_ACCUM(time_accum, time_start) \
74 time_accum += (PIL_check_seconds_timer() - time_start) * 1e3; \
79 # define PROFILE_END_UPDATE(time_update, time_start) \
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); \
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)
115 #define DRW_RESOURCE_CHUNK_LEN 512
135 return (*handle & 0x80000000) != 0;
140 return (*handle & 0x7FFFFFFF) >> 9;
145 return (*handle & 0x000001FF);
155 *handle |= 0x80000000;
198 #define DRW_MAX_DRAW_CMD_TYPE DRW_CMD_DRAW_PROCEDURAL
362 #define MAX_PASS_NAME 32
401 #define MAX_CULLED_VIEWS 32
483 #define DST_MAX_SLOTS 64
484 #define MAX_CLIP_PLANES 6
485 #define STENCIL_UNDEFINED 256
486 #define DRW_DRAWLIST_LEN 256
558 #ifdef USE_GPU_SELECT
615 struct Object *dupli_parent,
#define BLI_STATIC_ASSERT_ALIGN(st, align)
void * BLI_memblock_elem_get(BLI_memblock *mblk, int chunk, int elem) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool() DRWCallVisibilityFn(bool vis_in, void *user_data)
struct GPUContext GPUContext
struct GPUDrawList GPUDrawList
struct GPUFrameBuffer GPUFrameBuffer
struct GPUShader GPUShader
struct GPUTexture GPUTexture
struct GPUVertBuf GPUVertBuf
Platform independent time functions.
#define MAX_INSTANCE_DATA_SIZE
void drw_texture_set_parameters(GPUTexture *tex, DRWTextureFlag flags)
@ DRW_UNIFORM_BLOCK_OBINFOS
@ DRW_UNIFORM_TFEEDBACK_TARGET
@ DRW_UNIFORM_TEXTURE_REF
@ DRW_UNIFORM_MODEL_MATRIX
@ DRW_UNIFORM_MODEL_MATRIX_INVERSE
@ DRW_UNIFORM_BASE_INSTANCE
@ DRW_UNIFORM_BLOCK_OBMATS
@ DRW_UNIFORM_RESOURCE_ID
@ DRW_UNIFORM_RESOURCE_CHUNK
@ DRW_UNIFORM_BLOCK_OBATTRS
struct DRWCommandSetSelectID DRWCommandSetSelectID
struct DRWUniformChunk DRWUniformChunk
BLI_INLINE uint32_t DRW_handle_chunk_get(const DRWResourceHandle *handle)
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)
GPUBatch * drw_cache_procedural_points_get(void)
void * drw_viewport_engine_data_ensure(void *engine_type)
void drw_batch_cache_generate_requested(struct Object *ob)
struct DRWCommandDrawProcedural DRWCommandDrawProcedural
GPUBatch * drw_cache_procedural_triangles_get(void)
BLI_INLINE void * DRW_memblock_elem_from_handle(struct BLI_memblock *memblock, const DRWResourceHandle *handle)
struct DRWCommandDrawRange DRWCommandDrawRange
@ DRW_CMD_DRAW_INSTANCE_RANGE
@ DRW_CMD_DRAW_PROCEDURAL
struct DRWObjectInfos DRWObjectInfos
struct DRWDebugLine DRWDebugLine
void drw_batch_cache_validate(Object *ob)
BLI_INLINE uint32_t DRW_handle_negative_scale_get(const DRWResourceHandle *handle)
void drw_batch_cache_generate_requested_delayed(Object *ob)
struct DRWDebugSphere DRWDebugSphere
struct DRWObjectMatrix DRWObjectMatrix
BLI_INLINE void DRW_handle_increment(DRWResourceHandle *handle)
struct DRWCommandDrawInstanceRange DRWCommandDrawInstanceRange
struct DRWCommandSmallChunk DRWCommandSmallChunk
BLI_INLINE uint32_t DRW_handle_id_get(const DRWResourceHandle *handle)
union DRWCommand DRWCommand
void drw_debug_init(void)
uint32_t DRWResourceHandle
BLI_INLINE void DRW_handle_negative_scale_enable(DRWResourceHandle *handle)
struct DRWCullingState DRWCullingState
struct DRWCommandChunk DRWCommandChunk
struct DRWManager DRWManager
GPUBatch * drw_cache_procedural_lines_get(void)
struct DRWViewUboStorage DRWViewUboStorage
struct DRWCommandDraw DRWCommandDraw
struct DRWCommandSetMutableState DRWCommandSetMutableState
void drw_resource_buffer_finish(ViewportMemoryPool *vmempool)
unsigned __int64 uint64_t
struct DRWCommandChunk * next
eGPUFrameBufferBits clear_channels
struct DRWCommandChunk * next
struct DRWDebugLine * next
struct DRWDebugSphere * next
struct DupliObject * dupli_source
DRWResourceHandle ob_handle
DRWResourceHandle pass_handle
struct TaskGraph * task_graph
bool buffer_finish_called
DRWResourceHandle resource_handle
struct DRWTextStore ** text_store_p
DRWInstanceData * object_instance_data[MAX_INSTANCE_DATA_SIZE]
struct Object * dupli_parent
struct GSet * delayed_extraction
bool ob_state_obinfo_init
struct GHash * dupli_ghash
ViewportMemoryPool * vmempool
struct GPUFrameBuffer * default_framebuffer
struct DRWManager::@295 options
struct Object * dupli_origin
struct DRWManager::@296 debug
DRWInstanceDataList * idatalist
TicketMutex * gl_context_mutex
DRWViewUboStorage view_storage_cpy
struct DRWPass::@294 shgroups
struct DRWCommandChunk * first
struct DRWShadingGroup::@289::@293 z_sorting
struct GPUUniformAttrList * uniform_attrs
struct DRWUniformChunk * uniforms
DRWResourceHandle pass_handle
struct DRWShadingGroup::@288 cmd
struct DRWCommandChunk * last
DRWViewUboStorage storage
DRWCallVisibilityFn * visibility_fn
BoundSphere frustum_bsphere
float frustum_planes[6][4]
DRWCommandSetStencil stencil
DRWCommandDrawInstance instance
DRWCommandDrawRange range
DRWCommandSetMutableState state
DRWCommandDrawInstanceRange instance_range
DRWCommandDrawProcedural procedural
DRWCommandSetSelectID select_id