Blender V5.0
blender::draw::command::ResourceBind Struct Reference

#include <draw_command.hh>

Public Types

enum class  Type : uint8_t {
  Sampler = 0 , BufferSampler , Image , UniformBuf ,
  StorageBuf , UniformAsStorageBuf , VertexAsStorageBuf , IndexAsStorageBuf
}

Public Member Functions

 ResourceBind ()=default
 ResourceBind (int slot_, gpu::UniformBuf *res)
 ResourceBind (int slot_, gpu::UniformBuf **res)
 ResourceBind (int slot_, gpu::StorageBuf *res)
 ResourceBind (int slot_, gpu::StorageBuf **res)
 ResourceBind (int slot_, gpu::UniformBuf *res, Type)
 ResourceBind (int slot_, gpu::UniformBuf **res, Type)
 ResourceBind (int slot_, gpu::VertBuf *res, Type)
 ResourceBind (int slot_, gpu::VertBuf **res, Type)
 ResourceBind (int slot_, gpu::IndexBuf *res, Type)
 ResourceBind (int slot_, gpu::IndexBuf **res, Type)
 ResourceBind (int slot_, draw::Image *res)
 ResourceBind (int slot_, draw::Image **res)
 ResourceBind (int slot_, gpu::Texture *res, GPUSamplerState state)
 ResourceBind (int slot_, gpu::Texture **res, GPUSamplerState state)
 ResourceBind (int slot_, gpu::VertBuf *res)
 ResourceBind (int slot_, gpu::VertBuf **res)
Commands Execution
void execute () const
Commands Serialization for debugging
std::string serialize () const

Public Attributes

GPUSamplerState sampler
int slot
bool is_reference
enum blender::draw::command::ResourceBind::Type type
union { 
   gpu::UniformBuf *   uniform_buf 
   gpu::UniformBuf **   uniform_buf_ref 
   gpu::StorageBuf *   storage_buf 
   gpu::StorageBuf **   storage_buf_ref 
   gpu::Texture *   texture 
   gpu::Texture **   texture_ref 
   gpu::VertBuf *   vertex_buf 
   gpu::VertBuf **   vertex_buf_ref 
   gpu::IndexBuf *   index_buf 
   gpu::IndexBuf **   index_buf_ref 
}; 

Detailed Description

Definition at line 161 of file draw_command.hh.

Member Enumeration Documentation

◆ Type

enum class blender::draw::command::ResourceBind::Type : uint8_t
strong
Enumerator
Sampler 
BufferSampler 
Image 
UniformBuf 
StorageBuf 
UniformAsStorageBuf 
VertexAsStorageBuf 
IndexAsStorageBuf 

Definition at line 166 of file draw_command.hh.

Constructor & Destructor Documentation

◆ ResourceBind() [1/17]

blender::draw::command::ResourceBind::ResourceBind ( )
default

◆ ResourceBind() [2/17]

blender::draw::command::ResourceBind::ResourceBind ( int slot_,
gpu::UniformBuf * res )
inline

Definition at line 195 of file draw_command.hh.

References false, is_reference, slot, type, and uniform_buf.

◆ ResourceBind() [3/17]

blender::draw::command::ResourceBind::ResourceBind ( int slot_,
gpu::UniformBuf ** res )
inline

Definition at line 197 of file draw_command.hh.

References is_reference, slot, true, type, and uniform_buf_ref.

◆ ResourceBind() [4/17]

blender::draw::command::ResourceBind::ResourceBind ( int slot_,
gpu::StorageBuf * res )
inline

Definition at line 199 of file draw_command.hh.

References false, is_reference, slot, storage_buf, and type.

◆ ResourceBind() [5/17]

blender::draw::command::ResourceBind::ResourceBind ( int slot_,
gpu::StorageBuf ** res )
inline

Definition at line 201 of file draw_command.hh.

References is_reference, slot, storage_buf_ref, true, and type.

◆ ResourceBind() [6/17]

blender::draw::command::ResourceBind::ResourceBind ( int slot_,
gpu::UniformBuf * res,
Type  )
inline

Definition at line 203 of file draw_command.hh.

References false, is_reference, slot, type, and uniform_buf.

◆ ResourceBind() [7/17]

blender::draw::command::ResourceBind::ResourceBind ( int slot_,
gpu::UniformBuf ** res,
Type  )
inline

Definition at line 205 of file draw_command.hh.

References is_reference, slot, true, type, and uniform_buf_ref.

◆ ResourceBind() [8/17]

blender::draw::command::ResourceBind::ResourceBind ( int slot_,
gpu::VertBuf * res,
Type  )
inline

Definition at line 207 of file draw_command.hh.

References false, is_reference, slot, type, and vertex_buf.

◆ ResourceBind() [9/17]

blender::draw::command::ResourceBind::ResourceBind ( int slot_,
gpu::VertBuf ** res,
Type  )
inline

Definition at line 209 of file draw_command.hh.

References is_reference, slot, true, type, and vertex_buf_ref.

◆ ResourceBind() [10/17]

blender::draw::command::ResourceBind::ResourceBind ( int slot_,
gpu::IndexBuf * res,
Type  )
inline

Definition at line 211 of file draw_command.hh.

References false, index_buf, is_reference, slot, and type.

◆ ResourceBind() [11/17]

blender::draw::command::ResourceBind::ResourceBind ( int slot_,
gpu::IndexBuf ** res,
Type  )
inline

Definition at line 213 of file draw_command.hh.

References index_buf_ref, is_reference, slot, true, and type.

◆ ResourceBind() [12/17]

blender::draw::command::ResourceBind::ResourceBind ( int slot_,
draw::Image * res )
inline

Definition at line 215 of file draw_command.hh.

References blender::draw::as_texture(), false, is_reference, slot, texture, and type.

◆ ResourceBind() [13/17]

blender::draw::command::ResourceBind::ResourceBind ( int slot_,
draw::Image ** res )
inline

Definition at line 217 of file draw_command.hh.

References blender::draw::as_texture(), is_reference, slot, texture_ref, true, and type.

◆ ResourceBind() [14/17]

blender::draw::command::ResourceBind::ResourceBind ( int slot_,
gpu::Texture * res,
GPUSamplerState state )
inline

Definition at line 219 of file draw_command.hh.

References false, is_reference, sampler, slot, state, texture, and type.

◆ ResourceBind() [15/17]

blender::draw::command::ResourceBind::ResourceBind ( int slot_,
gpu::Texture ** res,
GPUSamplerState state )
inline

Definition at line 221 of file draw_command.hh.

References is_reference, sampler, slot, state, texture_ref, true, and type.

◆ ResourceBind() [16/17]

blender::draw::command::ResourceBind::ResourceBind ( int slot_,
gpu::VertBuf * res )
inline

Definition at line 223 of file draw_command.hh.

References false, is_reference, slot, type, and vertex_buf.

◆ ResourceBind() [17/17]

blender::draw::command::ResourceBind::ResourceBind ( int slot_,
gpu::VertBuf ** res )
inline

Definition at line 225 of file draw_command.hh.

References is_reference, slot, true, type, and vertex_buf_ref.

Member Function Documentation

◆ execute()

◆ serialize()

std::string blender::draw::command::ResourceBind::serialize ( ) const

Member Data Documentation

◆ [union]

◆ index_buf

gpu::IndexBuf* blender::draw::command::ResourceBind::index_buf

Definition at line 189 of file draw_command.hh.

Referenced by execute(), and ResourceBind().

◆ index_buf_ref

gpu::IndexBuf** blender::draw::command::ResourceBind::index_buf_ref

Definition at line 190 of file draw_command.hh.

Referenced by execute(), and ResourceBind().

◆ is_reference

◆ sampler

GPUSamplerState blender::draw::command::ResourceBind::sampler

Definition at line 162 of file draw_command.hh.

Referenced by execute(), ResourceBind(), ResourceBind(), and serialize().

◆ slot

◆ storage_buf

gpu::StorageBuf* blender::draw::command::ResourceBind::storage_buf

Definition at line 182 of file draw_command.hh.

Referenced by execute(), and ResourceBind().

◆ storage_buf_ref

gpu::StorageBuf** blender::draw::command::ResourceBind::storage_buf_ref

Definition at line 183 of file draw_command.hh.

Referenced by execute(), and ResourceBind().

◆ texture

gpu::Texture* blender::draw::command::ResourceBind::texture

NOTE: Texture is used for both Sampler and Image binds.

Definition at line 185 of file draw_command.hh.

Referenced by execute(), ResourceBind(), and ResourceBind().

◆ texture_ref

gpu::Texture** blender::draw::command::ResourceBind::texture_ref

Definition at line 186 of file draw_command.hh.

Referenced by execute(), ResourceBind(), and ResourceBind().

◆ type

◆ uniform_buf

gpu::UniformBuf* blender::draw::command::ResourceBind::uniform_buf

TODO: Use draw::Texture|StorageBuffer|UniformBuffer as resources as they will give more debug info.

Definition at line 180 of file draw_command.hh.

Referenced by execute(), ResourceBind(), and ResourceBind().

◆ uniform_buf_ref

gpu::UniformBuf** blender::draw::command::ResourceBind::uniform_buf_ref

Definition at line 181 of file draw_command.hh.

Referenced by execute(), ResourceBind(), and ResourceBind().

◆ vertex_buf

gpu::VertBuf* blender::draw::command::ResourceBind::vertex_buf

Definition at line 187 of file draw_command.hh.

Referenced by execute(), ResourceBind(), and ResourceBind().

◆ vertex_buf_ref

gpu::VertBuf** blender::draw::command::ResourceBind::vertex_buf_ref

Definition at line 188 of file draw_command.hh.

Referenced by execute(), ResourceBind(), and ResourceBind().


The documentation for this struct was generated from the following files: