Blender V4.3
draw_command.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
16#include "BKE_global.hh"
17#include "BLI_map.hh"
18#include "DRW_gpu_wrapper.hh"
19
21#include "draw_handle.hh"
22#include "draw_state.hh"
23#include "draw_view.hh"
24
25/* Forward declarations. */
27template<typename T, int64_t block_size> class SubPassVector;
28template<typename DrawCommandBufType> class PassBase;
29} // namespace blender::draw::detail
30
31namespace blender::draw::command {
32
33class DrawCommandBuf;
34class DrawMultiBuf;
35
36/* -------------------------------------------------------------------- */
45 GPUShader *shader = nullptr;
46 bool front_facing = true;
47 bool inverted_view = false;
51 GPUStorageBuf *resource_id_buf = nullptr;
52
54 {
55 /* Facing is inverted if view is not in expected handedness. */
56 facing = this->inverted_view == facing;
57 /* Remove redundant changes. */
58 if (assign_if_different(this->front_facing, facing)) {
60 }
61 }
62
63 void cleanup()
64 {
65 if (front_facing == false) {
66 GPU_front_facing(false);
67 }
68
69 if (G.debug & G_DEBUG_GPU) {
74 }
75 }
76};
77
80/* -------------------------------------------------------------------- */
84enum class Type : uint8_t {
89 None = 0,
90
92 Barrier,
93 Clear,
97 Draw,
105 StateSet,
107
109 SubPass,
110 DrawMulti,
111};
112
124
127
128 void execute(RecordingState &state) const;
129 std::string serialize() const;
130};
131
133 GPUFrameBuffer **framebuffer;
134
135 void execute() const;
136 std::string serialize() const;
137};
138
144
145 void execute() const;
146 std::string serialize() const;
147};
148
151 int slot;
153
164
165 union {
168 GPUUniformBuf *uniform_buf;
169 GPUUniformBuf **uniform_buf_ref;
170 GPUStorageBuf *storage_buf;
171 GPUStorageBuf **storage_buf_ref;
173 GPUTexture *texture;
174 GPUTexture **texture_ref;
179 };
180
181 ResourceBind() = default;
182
183 ResourceBind(int slot_, GPUUniformBuf *res)
184 : slot(slot_), is_reference(false), type(Type::UniformBuf), uniform_buf(res){};
185 ResourceBind(int slot_, GPUUniformBuf **res)
186 : slot(slot_), is_reference(true), type(Type::UniformBuf), uniform_buf_ref(res){};
187 ResourceBind(int slot_, GPUStorageBuf *res)
188 : slot(slot_), is_reference(false), type(Type::StorageBuf), storage_buf(res){};
189 ResourceBind(int slot_, GPUStorageBuf **res)
190 : slot(slot_), is_reference(true), type(Type::StorageBuf), storage_buf_ref(res){};
191 ResourceBind(int slot_, GPUUniformBuf *res, Type /*type*/)
192 : slot(slot_), is_reference(false), type(Type::UniformAsStorageBuf), uniform_buf(res){};
193 ResourceBind(int slot_, GPUUniformBuf **res, Type /*type*/)
195 ResourceBind(int slot_, gpu::VertBuf *res, Type /*type*/)
196 : slot(slot_), is_reference(false), type(Type::VertexAsStorageBuf), vertex_buf(res){};
197 ResourceBind(int slot_, gpu::VertBuf **res, Type /*type*/)
198 : slot(slot_), is_reference(true), type(Type::VertexAsStorageBuf), vertex_buf_ref(res){};
199 ResourceBind(int slot_, gpu::IndexBuf *res, Type /*type*/)
200 : slot(slot_), is_reference(false), type(Type::IndexAsStorageBuf), index_buf(res){};
201 ResourceBind(int slot_, gpu::IndexBuf **res, Type /*type*/)
202 : slot(slot_), is_reference(true), type(Type::IndexAsStorageBuf), index_buf_ref(res){};
203 ResourceBind(int slot_, draw::Image *res)
204 : slot(slot_), is_reference(false), type(Type::Image), texture(draw::as_texture(res)){};
205 ResourceBind(int slot_, draw::Image **res)
206 : slot(slot_), is_reference(true), type(Type::Image), texture_ref(draw::as_texture(res)){};
207 ResourceBind(int slot_, GPUTexture *res, GPUSamplerState state)
208 : sampler(state), slot(slot_), is_reference(false), type(Type::Sampler), texture(res){};
209 ResourceBind(int slot_, GPUTexture **res, GPUSamplerState state)
210 : sampler(state), slot(slot_), is_reference(true), type(Type::Sampler), texture_ref(res){};
211 ResourceBind(int slot_, gpu::VertBuf *res)
212 : slot(slot_), is_reference(false), type(Type::BufferSampler), vertex_buf(res){};
213 ResourceBind(int slot_, gpu::VertBuf **res)
214 : slot(slot_), is_reference(true), type(Type::BufferSampler), vertex_buf_ref(res){};
215
216 void execute() const;
217 std::string serialize() const;
218};
219
224 enum class Type : uint8_t {
225 IntValue = 0,
236 union {
245 const int *int_ref;
249 const float *float_ref;
254 };
255
256 PushConstant() = default;
257
258 PushConstant(int loc, const float &val)
259 : location(loc), array_len(1), comp_len(1), type(Type::FloatValue), float1_value(val){};
260 PushConstant(int loc, const float2 &val)
261 : location(loc), array_len(1), comp_len(2), type(Type::FloatValue), float2_value(val){};
262 PushConstant(int loc, const float3 &val)
263 : location(loc), array_len(1), comp_len(3), type(Type::FloatValue), float3_value(val){};
264 PushConstant(int loc, const float4 &val)
265 : location(loc), array_len(1), comp_len(4), type(Type::FloatValue), float4_value(val){};
266
267 PushConstant(int loc, const int &val)
268 : location(loc), array_len(1), comp_len(1), type(Type::IntValue), int1_value(val){};
269 PushConstant(int loc, const int2 &val)
270 : location(loc), array_len(1), comp_len(2), type(Type::IntValue), int2_value(val){};
271 PushConstant(int loc, const int3 &val)
272 : location(loc), array_len(1), comp_len(3), type(Type::IntValue), int3_value(val){};
273 PushConstant(int loc, const int4 &val)
274 : location(loc), array_len(1), comp_len(4), type(Type::IntValue), int4_value(val){};
275
276 PushConstant(int loc, const float *val, int arr)
277 : location(loc), array_len(arr), comp_len(1), type(Type::FloatReference), float_ref(val){};
278 PushConstant(int loc, const float2 *val, int arr)
279 : location(loc), array_len(arr), comp_len(2), type(Type::FloatReference), float2_ref(val){};
280 PushConstant(int loc, const float3 *val, int arr)
281 : location(loc), array_len(arr), comp_len(3), type(Type::FloatReference), float3_ref(val){};
282 PushConstant(int loc, const float4 *val, int arr)
283 : location(loc), array_len(arr), comp_len(4), type(Type::FloatReference), float4_ref(val){};
284 PushConstant(int loc, const float4x4 *val)
285 : location(loc), array_len(1), comp_len(16), type(Type::FloatReference), float4x4_ref(val){};
286
287 PushConstant(int loc, const int *val, int arr)
288 : location(loc), array_len(arr), comp_len(1), type(Type::IntReference), int_ref(val){};
289 PushConstant(int loc, const int2 *val, int arr)
290 : location(loc), array_len(arr), comp_len(2), type(Type::IntReference), int2_ref(val){};
291 PushConstant(int loc, const int3 *val, int arr)
292 : location(loc), array_len(arr), comp_len(3), type(Type::IntReference), int3_ref(val){};
293 PushConstant(int loc, const int4 *val, int arr)
294 : location(loc), array_len(arr), comp_len(4), type(Type::IntReference), int4_ref(val){};
295
296 void execute(RecordingState &state) const;
297 std::string serialize() const;
298};
299
301 /* Shader to set the constant in. */
303 /* Value of the constant or a reference to it. */
304 union {
309 const int *int_ref;
311 const float *float_ref;
312 const bool *bool_ref;
313 };
314
316
317 enum class Type : uint8_t {
318 IntValue = 0,
319 UintValue,
321 BoolValue,
327
329
330 SpecializeConstant(GPUShader *sh, int loc, const float &val)
331 : shader(sh), float_value(val), location(loc), type(Type::FloatValue){};
332 SpecializeConstant(GPUShader *sh, int loc, const int &val)
333 : shader(sh), int_value(val), location(loc), type(Type::IntValue){};
334 SpecializeConstant(GPUShader *sh, int loc, const uint &val)
335 : shader(sh), uint_value(val), location(loc), type(Type::UintValue){};
336 SpecializeConstant(GPUShader *sh, int loc, const bool &val)
337 : shader(sh), bool_value(val), location(loc), type(Type::BoolValue){};
338 SpecializeConstant(GPUShader *sh, int loc, const float *val)
339 : shader(sh), float_ref(val), location(loc), type(Type::FloatReference){};
340 SpecializeConstant(GPUShader *sh, int loc, const int *val)
341 : shader(sh), int_ref(val), location(loc), type(Type::IntReference){};
342 SpecializeConstant(GPUShader *sh, int loc, const uint *val)
343 : shader(sh), uint_ref(val), location(loc), type(Type::UintReference){};
344 SpecializeConstant(GPUShader *sh, int loc, const bool *val)
345 : shader(sh), bool_ref(val), location(loc), type(Type::BoolReference){};
346
347 void execute() const;
348 std::string serialize() const;
349};
350
351struct Draw {
352 gpu::Batch *batch;
354 uint8_t expand_prim_type; /* #GPUPrimType */
359#ifdef WITH_METAL_BACKEND
360 /* Shader is required for extracting SSBO vertex fetch expansion parameters during draw command
361 * generation. */
362 GPUShader *shader;
363#endif
364
365 Draw() = default;
366
367 Draw(gpu::Batch *batch,
371#ifdef WITH_METAL_BACKEND
372 GPUShader *shader,
373#endif
374 GPUPrimType expanded_prim_type,
375 uint expanded_prim_len,
376 ResourceHandle handle)
377 {
378 this->batch = batch;
379 this->handle = handle;
380#ifdef WITH_METAL_BACKEND
381 this->shader = shader;
382#endif
383 BLI_assert(instance_len < SHRT_MAX);
384 this->instance_len = uint16_t(instance_len);
385 this->vertex_len = vertex_len;
386 this->vertex_first = vertex_first;
387 this->expand_prim_type = expanded_prim_type;
388 this->expand_prim_len = expanded_prim_len;
389 }
390
392 {
394 }
395
396 void execute(RecordingState &state) const;
397 std::string serialize() const;
398};
399
400struct DrawMulti {
401 gpu::Batch *batch;
405
406 void execute(RecordingState &state) const;
407 std::string serialize(const std::string &line_prefix) const;
408};
409
411 gpu::Batch *batch;
412 GPUStorageBuf **indirect_buf;
414
415 void execute(RecordingState &state) const;
416 std::string serialize() const;
417};
418
419struct Dispatch {
421 union {
424 };
425
426 Dispatch() = default;
427
428 Dispatch(int3 group_len) : is_reference(false), size(group_len){};
429 Dispatch(int3 *group_len) : is_reference(true), size_ref(group_len){};
430
431 void execute(RecordingState &state) const;
432 std::string serialize() const;
433};
434
436 GPUStorageBuf **indirect_buf;
437
438 void execute(RecordingState &state) const;
439 std::string serialize() const;
440};
441
442struct Barrier {
444
445 void execute() const;
446 std::string serialize() const;
447};
448
449struct Clear {
450 uint8_t clear_channels; /* #eGPUFrameBufferBits. But want to save some bits. */
452 float depth;
454
455 void execute() const;
456 std::string serialize() const;
457};
458
463
464 void execute() const;
465 std::string serialize() const;
466};
467
468struct StateSet {
471
472 void execute(RecordingState &state) const;
473 std::string serialize() const;
474};
475
480
481 void execute() const;
482 std::string serialize() const;
483};
484
503
506#ifdef WITH_METAL_BACKEND
507/* TODO(fclem): Remove. */
508BLI_STATIC_ASSERT(sizeof(Undetermined) <= 32, "One of the command type is too large.")
509#else
510BLI_STATIC_ASSERT(sizeof(Undetermined) <= 24, "One of the command type is too large.")
511#endif
512
515/* -------------------------------------------------------------------- */
526 friend Manager;
527
528 private:
531
533 ResourceIdBuf resource_id_buf_;
535 uint resource_id_count_ = 0;
536
537 public:
538 void clear()
539 {
540 resource_id_buf_.trim_to_next_power_of_2(resource_id_count_);
541 };
542
544 Vector<Undetermined, 0> &commands,
545 gpu::Batch *batch,
546 uint instance_len,
547 uint vertex_len,
548 uint vertex_first,
549 ResourceHandle handle,
550 uint custom_id,
551#ifdef WITH_METAL_BACKEND
552 GPUShader *shader,
553#endif
554 GPUPrimType expanded_prim_type,
555 uint16_t expanded_prim_len)
556 {
557 vertex_first = vertex_first != -1 ? vertex_first : 0;
558 instance_len = instance_len != -1 ? instance_len : 1;
559
560 BLI_assert_msg(custom_id == 0, "Custom ID is not supported in PassSimple");
561 UNUSED_VARS_NDEBUG(custom_id);
562
563 int64_t index = commands.append_and_get_index({});
564 headers.append({Type::Draw, uint(index)});
565 commands[index].draw = {batch,
566 instance_len,
567 vertex_len,
568 vertex_first,
569#ifdef WITH_METAL_BACKEND
570 shader,
571#endif
572 expanded_prim_type,
573 expanded_prim_len,
574 handle};
575 }
576
578 Vector<Header, 0> &headers,
579 Vector<Undetermined, 0> &commands,
580 SubPassVector &sub_passes);
581
582 private:
583 static void finalize_commands(Vector<Header, 0> &headers,
584 Vector<Undetermined, 0> &commands,
585 SubPassVector &sub_passes,
586 uint &resource_id_count,
587 ResourceIdBuf &resource_id_buf);
588};
589
592/* -------------------------------------------------------------------- */
621 friend Manager;
622 friend DrawMulti;
623
624 private:
629
630 using DrawGroupKey = std::pair<uint, gpu::Batch *>;
633 DrawGroupMap group_ids_;
634
636 DrawGroupBuf group_buf_ = {"DrawGroupBuf"};
638 DrawPrototypeBuf prototype_buf_ = {"DrawPrototypeBuf"};
640 DrawCommandBuf command_buf_ = {"DrawCommandBuf"};
642 ResourceIdBuf resource_id_buf_ = {"ResourceIdBuf"};
644 uint header_id_counter_ = 0;
646 uint group_count_ = 0;
648 uint prototype_count_ = 0;
650 uint resource_id_count_ = 0;
651
652 public:
653 void clear()
654 {
655 group_buf_.trim_to_next_power_of_2(group_count_);
656 /* Two commands per group (inverted and non-inverted scale). */
657 command_buf_.trim_to_next_power_of_2(group_count_ * 2);
658 prototype_buf_.trim_to_next_power_of_2(prototype_count_);
659 resource_id_buf_.trim_to_next_power_of_2(resource_id_count_);
660 header_id_counter_ = 0;
661 group_count_ = 0;
662 prototype_count_ = 0;
663 group_ids_.clear();
664 }
665
667 Vector<Undetermined, 0> &commands,
668 gpu::Batch *batch,
669 uint instance_len,
670 uint vertex_len,
671 uint vertex_first,
672 ResourceHandle handle,
673 uint custom_id,
674#ifdef WITH_METAL_BACKEND
675 GPUShader *shader,
676#endif
677 GPUPrimType expanded_prim_type,
678 uint16_t expanded_prim_len)
679 {
680 /* Custom draw-calls cannot be batched and will produce one group per draw. */
681 const bool custom_group = ((vertex_first != 0 && vertex_first != -1) || vertex_len != -1);
682
683 BLI_assert(vertex_len != 0);
684 vertex_len = vertex_len == -1 ? 0 : vertex_len;
685 instance_len = instance_len != -1 ? instance_len : 1;
686
687 /* If there was some state changes since previous call, we have to create another command. */
688 if (headers.is_empty() || headers.last().type != Type::DrawMulti) {
689 uint index = commands.append_and_get_index({});
690 headers.append({Type::DrawMulti, index});
691 commands[index].draw_multi = {batch, this, (uint)-1, header_id_counter_++};
692 }
693
694 DrawMulti &cmd = commands.last().draw_multi;
695
696 uint &group_id = group_ids_.lookup_or_add(DrawGroupKey(cmd.uuid, batch), uint(-1));
697
698 bool inverted = handle.has_inverted_handedness();
699
700 DrawPrototype &draw = prototype_buf_.get_or_resize(prototype_count_++);
701 draw.resource_handle = handle.raw;
702 draw.custom_id = custom_id;
703 draw.instance_len = instance_len;
704 draw.group_id = group_id;
705
706 if (group_id == uint(-1) || custom_group) {
707 uint new_group_id = group_count_++;
708 draw.group_id = new_group_id;
709
710 DrawGroup &group = group_buf_.get_or_resize(new_group_id);
711 group.next = cmd.group_first;
712 group.len = instance_len;
713 group.front_facing_len = inverted ? 0 : instance_len;
714 group.front_facing_counter = 0;
715 group.back_facing_counter = 0;
716 group.desc.vertex_len = vertex_len;
717 group.desc.vertex_first = vertex_first;
718 group.desc.gpu_batch = batch;
719 group.desc.expand_prim_type = expanded_prim_type;
720 group.desc.expand_prim_len = expanded_prim_len;
721 BLI_assert_msg(expanded_prim_len < (1 << 3), "Not enough bits to store primitive expansion");
722#ifdef WITH_METAL_BACKEND
723 group.desc.gpu_shader = shader;
724#endif
725 /* Custom group are not to be registered in the group_ids_. */
726 if (!custom_group) {
727 group_id = new_group_id;
728 }
729 /* For serialization only. Reset before use on GPU. */
730 (inverted ? group.back_facing_counter : group.front_facing_counter)++;
731 /* Append to list. */
732 cmd.group_first = new_group_id;
733 }
734 else {
735 DrawGroup &group = group_buf_[group_id];
736 group.len += instance_len;
737 group.front_facing_len += inverted ? 0 : instance_len;
738 /* For serialization only. Reset before use on GPU. */
739 (inverted ? group.back_facing_counter : group.front_facing_counter)++;
740 /* NOTE: We assume that primitive expansion is coupled to the shader itself. Meaning we rely
741 * on shader bind to isolate the expanded draws into their own group (as there could be
742 * regular draws and extended draws using the same batch mixed inside the same pass). This
743 * will cause issues if this assumption is broken. Also it is very hard to detect this case
744 * for error checking. At least we can check that expansion settings don't change inside a
745 * group. */
746 BLI_assert(group.desc.expand_prim_type == expanded_prim_type);
747 BLI_assert(group.desc.expand_prim_len == expanded_prim_len);
748#ifdef WITH_METAL_BACKEND
749 BLI_assert(group.desc.gpu_shader == shader);
750#endif
751 }
752 }
753
755 Vector<Header, 0> &headers,
756 Vector<Undetermined, 0> &commands,
757 VisibilityBuf &visibility_buf,
758 int visibility_word_per_draw,
759 int view_len,
760 bool use_custom_ids);
761};
762
765}; // namespace blender::draw::command
@ G_DEBUG_GPU
#define BLI_assert(a)
Definition BLI_assert.h:50
#define BLI_assert_msg(a, msg)
Definition BLI_assert.h:57
unsigned int uint
#define UNUSED_VARS_NDEBUG(...)
GPUPrimType
@ GPU_PRIM_NONE
eGPUBarrier
Definition GPU_state.hh:29
void GPU_front_facing(bool invert)
Definition gpu_state.cc:58
void GPU_storagebuf_debug_unbind_all()
void GPU_texture_image_unbind_all()
void GPU_texture_unbind_all()
void GPU_uniformbuf_debug_unbind_all()
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert Invert a producing a negative Combine Generate a color from its and blue Hue Saturation Apply a color transformation in the HSV color model Specular Similar to the Principled BSDF node but uses the specular workflow instead of which functions by specifying the facing(along normal) reflection color. Energy is not conserved
struct GPUShader GPUShader
void clear()
Definition BLI_map.hh:989
Value & lookup_or_add(const Key &key, const Value &value)
Definition BLI_map.hh:551
int64_t append_and_get_index(const T &value)
void append(const T &value)
const T & last(const int64_t n=0) const
bool is_empty() const
void trim_to_next_power_of_2(int64_t required_size)
void bind(RecordingState &state, Vector< Header, 0 > &headers, Vector< Undetermined, 0 > &commands, SubPassVector &sub_passes)
void append_draw(Vector< Header, 0 > &headers, Vector< Undetermined, 0 > &commands, gpu::Batch *batch, uint instance_len, uint vertex_len, uint vertex_first, ResourceHandle handle, uint custom_id, GPUPrimType expanded_prim_type, uint16_t expanded_prim_len)
void append_draw(Vector< Header, 0 > &headers, Vector< Undetermined, 0 > &commands, gpu::Batch *batch, uint instance_len, uint vertex_len, uint vertex_first, ResourceHandle handle, uint custom_id, GPUPrimType expanded_prim_type, uint16_t expanded_prim_len)
void bind(RecordingState &state, Vector< Header, 0 > &headers, Vector< Undetermined, 0 > &commands, VisibilityBuf &visibility_buf, int visibility_word_per_draw, int view_len, bool use_custom_ids)
DRWState
Definition draw_state.hh:25
@ DRW_STATE_NO_DRAW
Definition draw_state.hh:27
struct @620::@622 batch
static ulong state[N]
#define G(x, y, z)
static GPUTexture * as_texture(Image *img)
BLI_STATIC_ASSERT(MBC_BATCH_LEN< 32, "Number of batches exceeded the limit of bit fields")
bool assign_if_different(T &old_value, T new_value)
unsigned short uint16_t
Definition stdint.h:79
unsigned int uint32_t
Definition stdint.h:80
__int64 int64_t
Definition stdint.h:89
unsigned char uint8_t
Definition stdint.h:78
std::string serialize() const
void execute(RecordingState &state) const
void execute(RecordingState &state) const
void execute(RecordingState &state) const
std::string serialize(const std::string &line_prefix) const
void execute(RecordingState &state) const
void execute(RecordingState &state) const
std::string serialize() const
Draw(gpu::Batch *batch, uint instance_len, uint vertex_len, uint vertex_first, GPUPrimType expanded_prim_type, uint expanded_prim_len, ResourceHandle handle)
PushConstant(int loc, const float4x4 *val)
PushConstant(int loc, const float3 *val, int arr)
PushConstant(int loc, const int3 *val, int arr)
void execute(RecordingState &state) const
PushConstant(int loc, const int4 *val, int arr)
PushConstant(int loc, const float2 *val, int arr)
PushConstant(int loc, const int3 &val)
enum blender::draw::command::PushConstant::Type type
PushConstant(int loc, const float3 &val)
PushConstant(int loc, const int2 &val)
PushConstant(int loc, const int &val)
PushConstant(int loc, const int2 *val, int arr)
PushConstant(int loc, const float *val, int arr)
PushConstant(int loc, const float4 &val)
PushConstant(int loc, const float2 &val)
PushConstant(int loc, const float4 *val, int arr)
PushConstant(int loc, const float &val)
PushConstant(int loc, const int *val, int arr)
PushConstant(int loc, const int4 &val)
ResourceBind(int slot_, gpu::VertBuf **res, Type)
ResourceBind(int slot_, GPUUniformBuf **res, Type)
enum blender::draw::command::ResourceBind::Type type
ResourceBind(int slot_, draw::Image *res)
ResourceBind(int slot_, gpu::VertBuf *res)
ResourceBind(int slot_, GPUUniformBuf *res)
ResourceBind(int slot_, GPUStorageBuf *res)
ResourceBind(int slot_, GPUTexture *res, GPUSamplerState state)
ResourceBind(int slot_, GPUStorageBuf **res)
ResourceBind(int slot_, draw::Image **res)
ResourceBind(int slot_, GPUTexture **res, GPUSamplerState state)
ResourceBind(int slot_, gpu::VertBuf **res)
ResourceBind(int slot_, gpu::IndexBuf *res, Type)
ResourceBind(int slot_, GPUUniformBuf **res)
ResourceBind(int slot_, gpu::VertBuf *res, Type)
ResourceBind(int slot_, GPUUniformBuf *res, Type)
ResourceBind(int slot_, gpu::IndexBuf **res, Type)
void execute(RecordingState &state) const
SpecializeConstant(GPUShader *sh, int loc, const float &val)
SpecializeConstant(GPUShader *sh, int loc, const bool &val)
SpecializeConstant(GPUShader *sh, int loc, const bool *val)
SpecializeConstant(GPUShader *sh, int loc, const uint &val)
SpecializeConstant(GPUShader *sh, int loc, const uint *val)
SpecializeConstant(GPUShader *sh, int loc, const int &val)
SpecializeConstant(GPUShader *sh, int loc, const float *val)
enum blender::draw::command::SpecializeConstant::Type type
SpecializeConstant(GPUShader *sh, int loc, const int *val)
void execute(RecordingState &state) const