17#include "../intern/gpu_select_private.hh"
116 if (sub_object_id ==
uint(-1)) {
128 printf(
"%s : %u | %u = %u -> %u\n",
132 object_id | sub_object_id,
204 pass.use_custom_ids =
true;
223 pass.use_custom_ids =
true;
270 hit_result.depth = 0xFFFF;
271 hit_results.
append(hit_result);
285 hit_results.
append(hit_result);
291 for (
auto &hit : hit_results) {
294 printf(
" hit: %u: depth %u\n", hit_result.id, hit_result.depth);
MINLINE uint ceil_to_multiple_u(uint a, uint b)
@ GPU_SELECT_NEAREST_SECOND_PASS
@ GPU_SELECT_NEAREST_FIRST_PASS
@ GPU_SELECT_PICK_NEAREST
void GPU_memory_barrier(eGPUBarrier barrier)
@ GPU_BARRIER_BUFFER_UPDATE
void GPU_storagebuf_clear(GPUStorageBuf *ssbo, uint32_t clear_value)
int64_t append_and_get_index(const T &value)
void append(const T &value)
void resize(int64_t new_size)
void append(const T &value)
void state_set(DRWState state, int clip_plane_count=0)
void bind_ubo(const char *name, GPUUniformBuf *buffer)
void bind_ssbo(const char *name, GPUStorageBuf *buffer)
void gpu_select_next_set_result(GPUSelectResult *hit_buf, uint hit_len)
eGPUSelectMode gpu_select_next_get_mode()
int gpu_select_next_get_pick_area_center()
VecBase< int32_t, 2 > int2
ObjectRuntimeHandle * runtime
void select_append(ID select_id)
StorageVectorBuffer< uint32_t > select_buf
void select_bind(PassSimple::Sub &pass)
SelectBuf(const SelectionType selection_type)
const SelectionType selection_type
void select_bind(PassMain &pass, PassMain::Sub &sub)
Vector< std::string > map_names
UniformBuffer< SelectInfoData > info_buf
void select_bind(PassSimple &pass)
static const ID select_invalid_id()
StorageArrayBuffer< uint > select_output_buf
StorageArrayBuffer< uint, 4, true > dummy_select_buf
void select_bind(PassMain &pass)
const ID select_id(const ObjectRef &ob_ref, uint sub_object_id=0)
SelectMap(const SelectionType selection_type)
Vector< uint > select_id_map
const SelectionType selection_type