Blender V4.3
GPU_common_types.hh File Reference
#include "BLI_string_ref.hh"

Go to the source code of this file.

Classes

struct  blender::gpu::shader::SpecializationConstant
 
struct  blender::gpu::shader::SpecializationConstant::Value
 

Namespaces

namespace  blender
 
namespace  blender::gpu
 
namespace  blender::gpu::shader
 

Enumerations

enum  eGPULoadOp { GPU_LOADACTION_CLEAR = 0 , GPU_LOADACTION_LOAD , GPU_LOADACTION_DONT_CARE }
 
enum  eGPUStoreOp { GPU_STOREACTION_STORE = 0 , GPU_STOREACTION_DONT_CARE }
 
enum  GPUAttachmentState { GPU_ATTACHMENT_IGNORE = 0 , GPU_ATTACHMENT_WRITE , GPU_ATTACHMENT_READ }
 
enum  eGPUFrontFace { GPU_CLOCKWISE , GPU_COUNTERCLOCKWISE }
 
enum class  blender::gpu::shader::Type {
  blender::gpu::shader::FLOAT = 0 , blender::gpu::shader::VEC2 , blender::gpu::shader::VEC3 , blender::gpu::shader::VEC4 ,
  blender::gpu::shader::MAT3 , blender::gpu::shader::MAT4 , blender::gpu::shader::UINT , blender::gpu::shader::UVEC2 ,
  blender::gpu::shader::UVEC3 , blender::gpu::shader::UVEC4 , blender::gpu::shader::INT , blender::gpu::shader::IVEC2 ,
  blender::gpu::shader::IVEC3 , blender::gpu::shader::IVEC4 , blender::gpu::shader::BOOL , blender::gpu::shader::VEC3_101010I2 ,
  blender::gpu::shader::UCHAR , blender::gpu::shader::UCHAR2 , blender::gpu::shader::UCHAR3 , blender::gpu::shader::UCHAR4 ,
  blender::gpu::shader::CHAR , blender::gpu::shader::CHAR2 , blender::gpu::shader::CHAR3 , blender::gpu::shader::CHAR4 ,
  blender::gpu::shader::USHORT , blender::gpu::shader::USHORT2 , blender::gpu::shader::USHORT3 , blender::gpu::shader::USHORT4 ,
  blender::gpu::shader::SHORT , blender::gpu::shader::SHORT2 , blender::gpu::shader::SHORT3 , blender::gpu::shader::SHORT4
}
 

Functions

BLI_INLINE int blender::gpu::shader::to_component_count (const Type &type)
 

Enumeration Type Documentation

◆ eGPUFrontFace

Enumerator
GPU_CLOCKWISE 
GPU_COUNTERCLOCKWISE 

Definition at line 71 of file GPU_common_types.hh.

◆ eGPULoadOp

enum eGPULoadOp

Describes the load operation of a frame-buffer attachment at the start of a render pass.

Enumerator
GPU_LOADACTION_CLEAR 

Clear the frame-buffer attachment using the clear value.

GPU_LOADACTION_LOAD 

Load the value from the attached texture. Cannot be used with memoryless attachments. Slower than GPU_LOADACTION_CLEAR or GPU_LOADACTION_DONT_CARE.

GPU_LOADACTION_DONT_CARE 

Do not care about the content of the attachment when the render pass starts. Useful if only the values being written are important. Faster than GPU_LOADACTION_CLEAR.

Definition at line 16 of file GPU_common_types.hh.

◆ eGPUStoreOp

Describes the store operation of a frame-buffer attachment at the end of a render pass.

Enumerator
GPU_STOREACTION_STORE 

Do not care about the content of the attachment when the render pass ends. Useful if only the values being written are important. Cannot be used with memoryless attachments.

GPU_STOREACTION_DONT_CARE 

The result of the rendering for this attachment will be discarded. No writes to the texture memory will be done which makes it faster than GPU_STOREACTION_STORE. IMPORTANT: The actual values of the attachment is to be considered undefined. Only to be used on transient attachment that are only used within the boundaries of a render pass (ex.: Unneeded depth buffer result).

Definition at line 38 of file GPU_common_types.hh.

◆ GPUAttachmentState

Describes the state of a frame-buffer attachment during a sub-pass.

NOTE: Until this is correctly implemented in all backend, reading and writing from the same attachment will not work. Although there is no case where it would currently be useful.

Enumerator
GPU_ATTACHMENT_IGNORE 

Attachment will not be written during rendering.

GPU_ATTACHMENT_WRITE 

Attachment will be written during render sub-pass. This also works with blending.

GPU_ATTACHMENT_READ 

Attachment is used as input in the fragment shader. Incompatible with depth on Metal.

Definition at line 62 of file GPU_common_types.hh.