Blender V4.3
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_, GPUUniformBuf *res)
 
 ResourceBind (int slot_, GPUUniformBuf **res)
 
 ResourceBind (int slot_, GPUStorageBuf *res)
 
 ResourceBind (int slot_, GPUStorageBuf **res)
 
 ResourceBind (int slot_, GPUUniformBuf *res, Type)
 
 ResourceBind (int slot_, GPUUniformBuf **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_, GPUTexture *res, GPUSamplerState state)
 
 ResourceBind (int slot_, GPUTexture **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 { 
 
   GPUUniformBuf *   uniform_buf 
 
   GPUUniformBuf **   uniform_buf_ref 
 
   GPUStorageBuf *   storage_buf 
 
   GPUStorageBuf **   storage_buf_ref 
 
   GPUTexture *   texture 
 
   GPUTexture **   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 149 of file draw_command.hh.

Member Enumeration Documentation

◆ Type

Enumerator
Sampler 
BufferSampler 
Image 
UniformBuf 
StorageBuf 
UniformAsStorageBuf 
VertexAsStorageBuf 
IndexAsStorageBuf 

Definition at line 154 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_,
GPUUniformBuf * res )
inline

Definition at line 183 of file draw_command.hh.

◆ ResourceBind() [3/17]

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

Definition at line 185 of file draw_command.hh.

◆ ResourceBind() [4/17]

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

Definition at line 187 of file draw_command.hh.

◆ ResourceBind() [5/17]

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

Definition at line 189 of file draw_command.hh.

◆ ResourceBind() [6/17]

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

Definition at line 191 of file draw_command.hh.

◆ ResourceBind() [7/17]

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

Definition at line 193 of file draw_command.hh.

◆ ResourceBind() [8/17]

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

Definition at line 195 of file draw_command.hh.

◆ ResourceBind() [9/17]

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

Definition at line 197 of file draw_command.hh.

◆ ResourceBind() [10/17]

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

Definition at line 199 of file draw_command.hh.

◆ ResourceBind() [11/17]

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

Definition at line 201 of file draw_command.hh.

◆ ResourceBind() [12/17]

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

Definition at line 203 of file draw_command.hh.

◆ ResourceBind() [13/17]

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

Definition at line 205 of file draw_command.hh.

◆ ResourceBind() [14/17]

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

Definition at line 207 of file draw_command.hh.

◆ ResourceBind() [15/17]

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

Definition at line 209 of file draw_command.hh.

◆ ResourceBind() [16/17]

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

Definition at line 211 of file draw_command.hh.

◆ ResourceBind() [17/17]

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

Definition at line 213 of file draw_command.hh.

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 177 of file draw_command.hh.

Referenced by execute().

◆ index_buf_ref

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

Definition at line 178 of file draw_command.hh.

Referenced by execute().

◆ is_reference

bool blender::draw::command::ResourceBind::is_reference

Definition at line 152 of file draw_command.hh.

Referenced by execute(), and serialize().

◆ sampler

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

Definition at line 150 of file draw_command.hh.

Referenced by execute(), and serialize().

◆ slot

int blender::draw::command::ResourceBind::slot

Definition at line 151 of file draw_command.hh.

Referenced by execute(), and serialize().

◆ storage_buf

GPUStorageBuf* blender::draw::command::ResourceBind::storage_buf

Definition at line 170 of file draw_command.hh.

Referenced by execute().

◆ storage_buf_ref

GPUStorageBuf** blender::draw::command::ResourceBind::storage_buf_ref

Definition at line 171 of file draw_command.hh.

Referenced by execute().

◆ texture

GPUTexture* blender::draw::command::ResourceBind::texture

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

Definition at line 173 of file draw_command.hh.

Referenced by execute().

◆ texture_ref

GPUTexture** blender::draw::command::ResourceBind::texture_ref

Definition at line 174 of file draw_command.hh.

Referenced by execute().

◆ type

enum blender::draw::command::ResourceBind::Type blender::draw::command::ResourceBind::type

◆ uniform_buf

GPUUniformBuf* blender::draw::command::ResourceBind::uniform_buf

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

Definition at line 168 of file draw_command.hh.

Referenced by execute().

◆ uniform_buf_ref

GPUUniformBuf** blender::draw::command::ResourceBind::uniform_buf_ref

Definition at line 169 of file draw_command.hh.

Referenced by execute().

◆ vertex_buf

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

Definition at line 175 of file draw_command.hh.

Referenced by execute().

◆ vertex_buf_ref

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

Definition at line 176 of file draw_command.hh.

Referenced by execute().


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