Blender V5.3
gpu_select_pick.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2017 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
11#include <cfloat>
12#include <cstdlib>
13#include <cstring>
14
15#include "GPU_debug.hh"
16#include "GPU_framebuffer.hh"
17#include "GPU_select.hh"
18#include "GPU_state.hh"
19
20#include "MEM_guardedalloc.h"
21
22#include "BLI_listbase.hh"
23#include "BLI_rect.hh"
24#include "BLI_utildefines.hh"
25
26#include "gpu_select_private.hh"
27
28#include "BLI_strict_flags.hh" /* IWYU pragma: keep. Keep last. */
29
30namespace blender {
31
32// #define DEBUG_PRINT
33
34/* Alloc number for depths */
35#define ALLOC_DEPTHS 200
36
37/* Z-depth of cleared depth buffer */
38#define DEPTH_MAX 0xffffffff
39
40/* -------------------------------------------------------------------- */
43
55
57using depth_t = uint;
58
64static void rect_subregion_stride_calc(const rcti *src, const rcti *dst, SubRectStride *r_sub)
65{
66 const int src_x = BLI_rcti_size_x(src);
67 // const int src_y = BLI_rcti_size_y(src);
68 const int dst_x = BLI_rcti_size_x(dst);
69 const int dst_y = BLI_rcti_size_y(dst);
70 const int x = dst->xmin - src->xmin;
71 const int y = dst->ymin - src->ymin;
72
73 BLI_assert(src->xmin <= dst->xmin && src->ymin <= dst->ymin && src->xmax >= dst->xmax &&
74 src->ymax >= dst->ymax);
75 BLI_assert(x >= 0 && y >= 0);
76
77 r_sub->start = uint((src_x * y) + x);
78 r_sub->span = uint(dst_x);
79 r_sub->span_len = uint(dst_y);
80 r_sub->skip = uint(src_x - dst_x);
81}
82
87BLI_INLINE bool depth_is_filled(const depth_t *prev, const depth_t *curr)
88{
89 return (*prev != *curr) && (*curr != DEPTH_MAX);
90}
91
93
94/* -------------------------------------------------------------------- */
100
107
109{
110 DepthBufCache *rect = static_cast<DepthBufCache *>(
111 MEM_new_uninitialized(sizeof(DepthBufCache) + sizeof(depth_t) * rect_len, __func__));
112 rect->id = SELECT_ID_NONE;
113 return rect;
114}
115
116static bool depth_buf_rect_depth_any(const DepthBufCache *rect_depth, uint rect_len)
117{
118 const depth_t *curr = rect_depth->buf;
119 for (uint i = 0; i < rect_len; i++, curr++) {
120 if (*curr != DEPTH_MAX) {
121 return true;
122 }
123 }
124 return false;
125}
126
127static bool depth_buf_subrect_depth_any(const DepthBufCache *rect_depth,
128 const SubRectStride *sub_rect)
129{
130 const depth_t *curr = rect_depth->buf + sub_rect->start;
131 for (uint i = 0; i < sub_rect->span_len; i++) {
132 const depth_t *curr_end = curr + sub_rect->span;
133 for (; curr < curr_end; curr++, curr++) {
134 if (*curr != DEPTH_MAX) {
135 return true;
136 }
137 }
138 curr += sub_rect->skip;
139 }
140 return false;
141}
142
144 const DepthBufCache *rect_curr,
145 uint rect_len)
146{
147#if 0
148 return memcmp(rect_depth_a->buf, rect_depth_b->buf, rect_len * sizeof(depth_t)) != 0;
149#else
150 const depth_t *prev = rect_prev->buf;
151 const depth_t *curr = rect_curr->buf;
152 for (uint i = 0; i < rect_len; i++, curr++, prev++) {
153 if (depth_is_filled(prev, curr)) {
154 return true;
155 }
156 }
157 return false;
158#endif
159}
160
165 const DepthBufCache *rect_dst,
166 const SubRectStride *sub_rect)
167{
168 /* Same as #depth_buf_rect_depth_any_filled but different rectangle sizes. */
169 const depth_t *prev = rect_src->buf + sub_rect->start;
170 const depth_t *curr = rect_dst->buf + sub_rect->start;
171 for (uint i = 0; i < sub_rect->span_len; i++) {
172 const depth_t *curr_end = curr + sub_rect->span;
173 for (; curr < curr_end; prev++, curr++) {
174 if (depth_is_filled(prev, curr)) {
175 return true;
176 }
177 }
178 prev += sub_rect->skip;
179 curr += sub_rect->skip;
180 }
181 return false;
182}
183
185
186/* -------------------------------------------------------------------- */
191
196
197static int depth_id_cmp(const void *v1, const void *v2)
198{
199 const DepthID *d1 = static_cast<const DepthID *>(v1), *d2 = static_cast<const DepthID *>(v2);
200 if (d1->id < d2->id) {
201 return -1;
202 }
203 if (d1->id > d2->id) {
204 return 1;
205 }
206
207 return 0;
208}
209
210static int depth_cmp(const void *v1, const void *v2)
211{
212 const DepthID *d1 = static_cast<const DepthID *>(v1), *d2 = static_cast<const DepthID *>(v2);
213 if (d1->depth < d2->depth) {
214 return -1;
215 }
216 if (d1->depth > d2->depth) {
217 return 1;
218 }
219
220 return 0;
221}
222
224
225/* -------------------------------------------------------------------- */
228
235
237 struct {
242
244 int clip_readpixels[4];
245
247 bool is_init;
250
255 struct {
259
263 struct {
269
271 ListBaseT<DepthBufCache> bufs;
273
275 union {
277 struct {
278 DepthID *hits;
281 } all;
282
284 struct {
285 uint *rect_id;
286 } nearest;
287 };
288
290 int viewport[4];
291 int scissor[4];
294};
295
297
299{
301
302#ifdef DEBUG_PRINT
303 printf("%s: mode=%d, use_cache=%d, is_cache=%d\n",
304 __func__,
305 int(mode),
306 ps->use_cache,
307 ps->is_cached);
308#endif
309
310 GPU_debug_group_begin("Selection Pick");
311
312 ps->buffer = buffer;
313 ps->mode = mode;
314
315 const uint rect_len = uint(BLI_rcti_size_x(input) * BLI_rcti_size_y(input));
316 ps->dst.clip_rect = *input;
317 ps->dst.rect_len = rect_len;
318
319 /* Avoids unnecessary GPU operations when cache is available and they are unnecessary. */
320 if (ps->is_cached == false) {
324
325 /* Disable writing to the frame-buffer. */
326 GPU_color_mask(false, false, false, false);
327
328 GPU_depth_mask(true);
329 /* Always use #GPU_DEPTH_LESS_EQUAL even though #GPU_SELECT_PICK_ALL always clears the buffer.
330 * This is because individual objects themselves might have sections that overlap and we need
331 * these to have the correct distance information. */
333
334 float viewport[4];
335 GPU_viewport_size_get_f(viewport);
336
337 ps->src.clip_rect = *input;
338 ps->src.rect_len = rect_len;
339
340 ps->gpu.clip_readpixels[0] = int(viewport[0]);
341 ps->gpu.clip_readpixels[1] = int(viewport[1]);
342 ps->gpu.clip_readpixels[2] = BLI_rcti_size_x(&ps->src.clip_rect);
343 ps->gpu.clip_readpixels[3] = BLI_rcti_size_y(&ps->src.clip_rect);
344
345 GPU_viewport(UNPACK4(ps->gpu.clip_readpixels));
346
347 /* It's possible we don't want to clear depth buffer,
348 * so existing elements are masked by current z-buffer. */
349 GPU_clear_depth(1.0f);
350
351 /* scratch buffer (read new values here) */
352 ps->gpu.rect_depth_test = depth_buf_malloc(rect_len);
353 ps->gpu.rect_depth = depth_buf_malloc(rect_len);
354
355 /* Set initial 'far' value. */
356 for (uint i = 0; i < rect_len; i++) {
357 ps->gpu.rect_depth->buf[i] = DEPTH_MAX;
358 }
359
360 ps->gpu.is_init = false;
361 ps->gpu.prev_id = 0;
362 }
363 else {
364 /* Using cache `ps->is_cached == true`. */
365 /* `src.clip_rect` -> `dst.clip_rect`. */
366 rect_subregion_stride_calc(&ps->src.clip_rect, &ps->dst.clip_rect, &ps->cache.sub_rect);
367 BLI_assert(ps->gpu.rect_depth == nullptr);
368 BLI_assert(ps->gpu.rect_depth_test == nullptr);
369 }
370
371 if (mode == GPU_SELECT_PICK_ALL) {
372 ps->all.hits = MEM_new_array_uninitialized<DepthID>(ALLOC_DEPTHS, __func__);
373 ps->all.hits_len = 0;
374 ps->all.hits_len_alloc = ALLOC_DEPTHS;
375 }
376 else {
377 /* Set to 0xff for #SELECT_ID_NONE. */
378 ps->nearest.rect_id = MEM_new_array_uninitialized<uint>(ps->dst.rect_len, __func__);
379 memset(ps->nearest.rect_id, 0xff, sizeof(uint) * ps->dst.rect_len);
380 }
381}
382
387static void gpu_select_load_id_pass_all(const DepthBufCache *rect_curr)
388{
390 const uint id = rect_curr->id;
391 /* find the best depth for this pass and store in 'all.hits' */
392 depth_t depth_best = DEPTH_MAX;
393
394#define EVAL_TEST() \
395 if (depth_best > *curr) { \
396 depth_best = *curr; \
397 } \
398 ((void)0)
399
400 if (ps->is_cached == false) {
401 const depth_t *curr = rect_curr->buf;
402 BLI_assert(ps->src.rect_len == ps->dst.rect_len);
403 const uint rect_len = ps->src.rect_len;
404 for (uint i = 0; i < rect_len; i++, curr++) {
405 EVAL_TEST();
406 }
407 }
408 else {
409 /* Same as above but different rectangle sizes. */
410 const depth_t *curr = rect_curr->buf + ps->cache.sub_rect.start;
411 for (uint i = 0; i < ps->cache.sub_rect.span_len; i++) {
412 const depth_t *curr_end = curr + ps->cache.sub_rect.span;
413 for (; curr < curr_end; curr++) {
414 EVAL_TEST();
415 }
416 curr += ps->cache.sub_rect.skip;
417 }
418 }
419
420#undef EVAL_TEST
421
422 /* Ensure enough space. */
423 if (ps->all.hits_len == ps->all.hits_len_alloc) [[unlikely]] {
424 ps->all.hits_len_alloc += ALLOC_DEPTHS;
425 ps->all.hits = static_cast<DepthID *>(
426 MEM_realloc_uninitialized(ps->all.hits, ps->all.hits_len_alloc * sizeof(*ps->all.hits)));
427 }
428 DepthID *d = &ps->all.hits[ps->all.hits_len++];
429 d->id = id;
430 d->depth = depth_best;
431}
432
434 const DepthBufCache *rect_curr)
435{
437 const uint id = rect_curr->id;
438 /* Keep track each pixels ID in `nearest.rect_id`. */
439 if (id != SELECT_ID_NONE) {
440 uint *id_ptr = ps->nearest.rect_id;
441
442/* Check against DEPTH_MAX because XRAY will clear the buffer,
443 * so previously set values will become unset.
444 * In this case just leave those id's left as-is. */
445#define EVAL_TEST() \
446 if (depth_is_filled(prev, curr)) { \
447 *id_ptr = id; \
448 } \
449 ((void)0)
450
451 if (ps->is_cached == false) {
452 const depth_t *prev = rect_prev->buf;
453 const depth_t *curr = rect_curr->buf;
454 BLI_assert(ps->src.rect_len == ps->dst.rect_len);
455 const uint rect_len = ps->src.rect_len;
456 for (uint i = 0; i < rect_len; i++, curr++, prev++, id_ptr++) {
457 EVAL_TEST();
458 }
459 }
460 else {
461 /* same as above but different rect sizes */
462 const depth_t *prev = rect_prev->buf + ps->cache.sub_rect.start;
463 const depth_t *curr = rect_curr->buf + ps->cache.sub_rect.start;
464 for (uint i = 0; i < ps->cache.sub_rect.span_len; i++) {
465 const depth_t *curr_end = curr + ps->cache.sub_rect.span;
466 for (; curr < curr_end; prev++, curr++, id_ptr++) {
467 EVAL_TEST();
468 }
469 prev += ps->cache.sub_rect.skip;
470 curr += ps->cache.sub_rect.skip;
471 }
472 }
473
474#undef EVAL_TEST
475 }
476}
477
479{
481
482 if (ps->gpu.is_init) {
483 if (id == ps->gpu.prev_id && !end) {
484 /* No need to read if we are still drawing for the same id since
485 * all these depths will be merged / de-duplicated in the end. */
486 return true;
487 }
488
489 const uint rect_len = ps->src.rect_len;
492 fb, UNPACK4(ps->gpu.clip_readpixels), GPU_DATA_UINT, ps->gpu.rect_depth_test->buf);
493 /* Perform initial check since most cases the array remains unchanged. */
494
495 bool do_pass = false;
497 if (depth_buf_rect_depth_any(ps->gpu.rect_depth_test, rect_len)) {
498 ps->gpu.rect_depth_test->id = ps->gpu.prev_id;
499 gpu_select_load_id_pass_all(ps->gpu.rect_depth_test);
500 do_pass = true;
501 }
502 }
503 else {
504 if (depth_buf_rect_depth_any_filled(ps->gpu.rect_depth, ps->gpu.rect_depth_test, rect_len)) {
505 ps->gpu.rect_depth_test->id = ps->gpu.prev_id;
506 gpu_select_load_id_pass_nearest(ps->gpu.rect_depth, ps->gpu.rect_depth_test);
507 do_pass = true;
508 }
509 }
510
511 if (do_pass) {
512 /* Store depth in cache */
513 if (ps->use_cache) {
514 BLI_addtail(&ps->cache.bufs, ps->gpu.rect_depth);
515 ps->gpu.rect_depth = depth_buf_malloc(ps->src.rect_len);
516 }
517
518 std::swap(ps->gpu.rect_depth, ps->gpu.rect_depth_test);
519
521 /* (fclem) This is to be on the safe side. I don't know if this is required. */
522 bool prev_depth_mask = GPU_depth_mask_get();
523 /* we want new depths every time */
524 GPU_depth_mask(true);
525 GPU_clear_depth(1.0f);
526
527 GPU_depth_mask(prev_depth_mask);
528 }
529 }
530 }
531
532 ps->gpu.is_init = true;
533 ps->gpu.prev_id = id;
534
535 return true;
536}
537
539{
541
542#ifdef DEBUG_PRINT
543 printf("%s\n", __func__);
544#endif
545
546 if (ps->is_cached == false) {
547 if (ps->gpu.is_init) {
548 /* force finishing last pass */
549 gpu_select_pick_load_id(ps->gpu.prev_id, true);
550 }
554 }
555
557
558 /* Assign but never free directly since it may be in cache. */
559 DepthBufCache *rect_depth_final;
560
561 /* Store depth in cache */
562 if (ps->use_cache && !ps->is_cached) {
563 BLI_addtail(&ps->cache.bufs, ps->gpu.rect_depth);
564 ps->gpu.rect_depth = nullptr;
565 rect_depth_final = ps->cache.bufs.last();
566 }
567 else if (ps->is_cached) {
568 rect_depth_final = ps->cache.bufs.last();
569 }
570 else {
571 /* Common case, no cache. */
572 rect_depth_final = ps->gpu.rect_depth;
573 }
574
575 DepthID *depth_data;
576 uint depth_data_len = 0;
577
579 depth_data = ps->all.hits;
580 depth_data_len = ps->all.hits_len;
581 /* Move ownership. */
582 ps->all.hits = nullptr;
583 ps->all.hits_len = 0;
584 ps->all.hits_len_alloc = 0;
585 }
586 else {
587 /* #GPU_SELECT_PICK_NEAREST */
588
589 /* Over allocate (unlikely we have as many depths as pixels). */
590 uint depth_data_len_first_pass = 0;
591 depth_data = MEM_new_array_uninitialized<DepthID>(ps->dst.rect_len, __func__);
592
593 /* Partially de-duplicating copy,
594 * when contiguous ID's are found - update their closest depth.
595 * This isn't essential but means there is less data to sort. */
596
597#define EVAL_TEST(i_src, i_dst) \
598 { \
599 const uint id = ps->nearest.rect_id[i_dst]; \
600 if (id != SELECT_ID_NONE) { \
601 const depth_t depth = rect_depth_final->buf[i_src]; \
602 if (depth_last == nullptr || depth_last->id != id) { \
603 DepthID *d = &depth_data[depth_data_len_first_pass++]; \
604 d->id = id; \
605 d->depth = depth; \
606 } \
607 else if (depth_last->depth > depth) { \
608 depth_last->depth = depth; \
609 } \
610 } \
611 } \
612 ((void)0)
613
614 {
615 DepthID *depth_last = nullptr;
616 if (ps->is_cached == false) {
617 for (uint i = 0; i < ps->src.rect_len; i++) {
618 EVAL_TEST(i, i);
619 }
620 }
621 else {
622 /* Same as above but different rectangle sizes. */
623 uint i_src = ps->cache.sub_rect.start, i_dst = 0;
624 for (uint j = 0; j < ps->cache.sub_rect.span_len; j++) {
625 const uint i_src_end = i_src + ps->cache.sub_rect.span;
626 for (; i_src < i_src_end; i_src++, i_dst++) {
627 EVAL_TEST(i_src, i_dst);
628 }
629 i_src += ps->cache.sub_rect.skip;
630 }
631 }
632 }
633
634#undef EVAL_TEST
635
636 qsort(depth_data, depth_data_len_first_pass, sizeof(DepthID), depth_id_cmp);
637
638 /* Sort by ID's then keep the best depth for each ID. */
639 depth_data_len = 0;
640 {
641 DepthID *depth_last = nullptr;
642 for (uint i = 0; i < depth_data_len_first_pass; i++) {
643 if (depth_last == nullptr || depth_last->id != depth_data[i].id) {
644 depth_last = &depth_data[depth_data_len++];
645 *depth_last = depth_data[i];
646 }
647 else if (depth_last->depth > depth_data[i].depth) {
648 depth_last->depth = depth_data[i].depth;
649 }
650 }
651 }
652 }
653
654 /* Finally sort each unique (id, depth) pair by depth
655 * so the final hit-list is sorted by depth (nearest first). */
656 uint hits = 0;
657
658 /* Leave sorting up to the caller. */
659 qsort(depth_data, depth_data_len, sizeof(DepthID), depth_cmp);
660
662 for (uint i = 0; i < depth_data_len; i++) {
663#ifdef DEBUG_PRINT
664 printf(" hit: %u: depth %u\n", depth_data[i].id, depth_data[i].depth);
665#endif
666 GPUSelectResult hit_result{};
667 hit_result.id = depth_data[i].id;
668 hit_result.depth = depth_data[i].depth;
670 hits++;
671 }
672
673 MEM_delete(depth_data);
674
675 MEM_SAFE_DELETE(ps->gpu.rect_depth);
676 MEM_SAFE_DELETE(ps->gpu.rect_depth_test);
677
679 /* 'hits' already freed as 'depth_data' */
680 }
681 else {
682 MEM_delete(ps->nearest.rect_id);
683 ps->nearest.rect_id = nullptr;
684 }
685
686 if (ps->use_cache) {
687 ps->is_cached = true;
688 }
689
690 return hits;
691}
692
694
695/* -------------------------------------------------------------------- */
700
702{
704#ifdef DEBUG_PRINT
705 printf("%s\n", __func__);
706#endif
707 g_pick_state.use_cache = true;
708 g_pick_state.is_cached = false;
709}
710
712{
713#ifdef DEBUG_PRINT
714 printf("%s: with %d buffers\n", __func__, g_pick_state.cache.bufs.count());
715#endif
716 g_pick_state.use_cache = false;
717 g_pick_state.is_cached = false;
718
719 g_pick_state.cache.bufs.free_no_destruct();
720}
721
726
728{
731#ifdef DEBUG_PRINT
732 printf("%s (building depth from cache)\n", __func__);
733#endif
734 for (DepthBufCache &rect_depth : ps->cache.bufs) {
735 if (rect_depth.next != nullptr) {
736 /* We know the buffers differ, but this sub-region may not.
737 * Double check before adding an id-pass. */
739 if (depth_buf_subrect_depth_any(rect_depth.next, &ps->cache.sub_rect)) {
741 }
742 }
743 else {
744 if (depth_buf_subrect_depth_any_filled(&rect_depth, rect_depth.next, &ps->cache.sub_rect))
745 {
746 gpu_select_load_id_pass_nearest(&rect_depth, rect_depth.next);
747 }
748 }
749 }
750 }
751}
752
754
755} // namespace blender
Read Blender memory allocation and freeing.
#define UNPACK4(a)
#define BLI_INLINE
#define MEM_realloc_uninitialized(vmemh, len)
int64_t size() const
void append_unchecked(const T &value)
void reserve(const int64_t min_capacity)
#define DEPTH_MAX
#define ALLOC_DEPTHS
#define EVAL_TEST()
#define SELECT_ID_NONE
BMesh Iterators.
void * MEM_new_uninitialized(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
BLI_INLINE bool depth_is_filled(const depth_t *prev, const depth_t *curr)
gpu::FrameBuffer * GPU_framebuffer_active_get()
GPUWriteMask GPU_write_mask_get()
Definition gpu_state.cc:217
void gpu_select_pick_begin(GPUSelectBuffer *buffer, const rcti *input, GPUSelectMode mode)
unsigned int uint
Definition BKE_text.h:55
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
GPUDepthTest GPU_depth_test_get()
Definition gpu_state.cc:229
@ GPU_SELECT_PICK_ALL
Definition GPU_select.hh:27
bool gpu_select_pick_load_id(uint id, bool end)
BLI_INLINE float fb(float length, float L)
void gpu_select_pick_cache_begin()
static bool depth_buf_subrect_depth_any_filled(const DepthBufCache *rect_src, const DepthBufCache *rect_dst, const SubRectStride *sub_rect)
void GPU_clear_depth(float depth)
static int depth_id_cmp(const void *v1, const void *v2)
void GPU_depth_mask(bool depth)
Definition gpu_state.cc:107
void gpu_select_pick_cache_end()
static int depth_cmp(const void *v1, const void *v2)
static bool depth_buf_rect_depth_any(const DepthBufCache *rect_depth, uint rect_len)
static bool depth_buf_rect_depth_any_filled(const DepthBufCache *rect_prev, const DepthBufCache *rect_curr, uint rect_len)
static GPUPickState g_pick_state
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
Definition BLI_rect.hh:207
@ GPU_DEPTH_LESS_EQUAL
Definition GPU_state.hh:135
void GPU_viewport_size_get_f(float coords[4])
Definition gpu_state.cc:258
static void gpu_select_load_id_pass_nearest(const DepthBufCache *rect_prev, const DepthBufCache *rect_curr)
void GPU_scissor_get(int coords[4])
Definition gpu_state.cc:253
bool GPU_depth_mask_get()
Definition gpu_state.cc:272
void GPU_color_mask(bool r, bool g, bool b, bool a)
Definition gpu_state.cc:95
static bool depth_buf_subrect_depth_any(const DepthBufCache *rect_depth, const SubRectStride *sub_rect)
uint gpu_select_pick_end()
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
Definition BLI_rect.hh:203
void GPU_debug_group_end()
Definition gpu_debug.cc:34
static DepthBufCache * depth_buf_malloc(uint rect_len)
bool gpu_select_pick_is_cached()
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:118
ATTR_WARN_UNUSED_RESULT const BMVert * v2
void gpu_select_pick_cache_load_id()
static void gpu_select_load_id_pass_all(const DepthBufCache *rect_curr)
void GPU_viewport(int x, int y, int width, int height)
Definition gpu_state.cc:184
void GPU_framebuffer_read_depth(gpu::FrameBuffer *fb, int x, int y, int width, int height, eGPUDataFormat data_format, void *r_data)
void GPU_depth_test(GPUDepthTest test)
Definition gpu_state.cc:70
static void rect_subregion_stride_calc(const rcti *src, const rcti *dst, SubRectStride *r_sub)
void GPU_write_mask(GPUWriteMask mask)
Definition gpu_state.cc:90
void GPU_debug_group_begin(const char *name)
Definition gpu_debug.cc:23
ListBaseT< DepthBufCache > bufs
struct blender::GPUPickState::@237160012157103054135253154261345100325061036241 gpu
GPUSelectBuffer * buffer
struct blender::GPUPickState::@341047125372111172251217223051052316337032215273 dst
struct blender::GPUPickState::@341047125372111172251217223051052316337032215273 src
struct blender::GPUPickState::@051005354226036273374115173066131237112043103074 cache
GPUSelectStorage storage
Definition GPU_select.hh:49
struct blender::GPUPickState::@364023105341251130237061015042314333367143353064::@036170307022304230102310351335062032200332310226 all
struct blender::GPUPickState::@364023105341251130237061015042314333367143353064::@370040275105014177254277343216324033054106174152 nearest