47 # define DEBUG_NAME_LEN 64
49 # define DEBUG_NAME_LEN 8
53 #define GPU_TEX_MAX_FBO_ATTACHED 32
67 #ifndef GPU_NO_USE_PY_REFERENCES
259 return reinterpret_cast<Texture *
>(vert);
263 return reinterpret_cast<const Texture *
>(vert);
266 #undef DEBUG_NAME_LEN
404 switch (data_format) {
429 switch (tex_format) {
464 switch (tex_format) {
528 switch (tex_format) {
572 switch (tex_format) {
591 switch (
format->attrs[0].comp_len) {
593 switch (
format->attrs[0].comp_type) {
613 switch (
format->attrs[0].comp_type) {
636 switch (
format->attrs[0].comp_type) {
646 switch (
format->attrs[0].fetch_mode) {
669 BLI_assert_msg(0,
"Unsupported vertex format for buffer texture");
#define BLI_assert_msg(a, msg)
MINLINE int max_ii(int a, int b)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
struct GPUTexture GPUTexture
@ GPU_DATA_2_10_10_10_REV
struct GPUVertBuf GPUVertBuf
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
virtual void mip_range_set(int min, int max)=0
virtual uint gl_bindcode_get() const =0
virtual bool init_internal(GPUVertBuf *vbo)=0
virtual void stencil_texture_mode_set(bool use_stencil)=0
void attach_to(FrameBuffer *fb, GPUAttachmentType type)
int mip_width_get(int mip) const
eGPUTextureFormat format_
int mip_depth_get(int mip) const
eGPUTextureFormatFlag format_flag_get() const
virtual void generate_mipmap()=0
bool init_view(const GPUTexture *src, eGPUTextureFormat format, int mip_start, int mip_len, int layer_start, int layer_len, bool cube_as_array)
eGPUTextureFormat format_get() const
eGPUTextureFormatFlag format_flag_
void update(eGPUDataFormat format, const void *data)
char name_[DEBUG_NAME_LEN]
FrameBuffer * fb_[GPU_TEX_MAX_FBO_ATTACHED]
int dimensions_count() const
virtual void swizzle_set(const char swizzle_mask[4])=0
bool init_buffer(GPUVertBuf *vbo, eGPUTextureFormat format)
GPUAttachmentType fb_attachment_[GPU_TEX_MAX_FBO_ATTACHED]
GPUAttachmentType attachment_type(int slot) const
bool init_1D(int w, int layers, int mip_len, eGPUTextureFormat format)
eGPUSamplerState sampler_state
int mip_height_get(int mip) const
virtual bool init_internal(const GPUTexture *src, int mip_offset, int layer_offset)=0
virtual void clear(eGPUDataFormat format, const void *data)=0
eGPUTextureType type_get() const
virtual bool init_internal()=0
bool init_cubemap(int w, int layers, int mip_len, eGPUTextureFormat format)
virtual void * read(int mip, eGPUDataFormat format)=0
virtual void update_sub(int mip, int offset[3], int extent[3], eGPUDataFormat format, const void *data)=0
void mip_size_get(int mip, int r_size[3]) const
virtual void copy_to(Texture *tex)=0
bool init_3D(int w, int h, int d, int mip_len, eGPUTextureFormat format)
Texture(const char *name)
void detach_from(FrameBuffer *fb)
bool init_2D(int w, int h, int layers, int mip_len, eGPUTextureFormat format)
SyclQueue void void * src
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img GPU_RGBA16F
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx GPU_R32F
@ GPU_FB_DEPTH_STENCIL_ATTACHMENT
@ GPU_FB_COLOR_ATTACHMENT0
@ GPU_FB_DEPTH_ATTACHMENT
#define GPU_TEX_MAX_FBO_ATTACHED
BLI_INLINE float fb(float length, float L)
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
ENUM_OPERATORS(MTLPipelineStateDirtyFlag, MTL_PIPELINE_STATE_CULLMODE_FLAG)
bool validate_data_format_mtl(eGPUTextureFormat tex_format, eGPUDataFormat data_format)
bool validate_data_format(eGPUTextureFormat tex_format, eGPUDataFormat data_format)
size_t to_block_size(eGPUTextureFormat data_type)
static GPUContext * wrap(Context *ctx)
static Context * unwrap(GPUContext *ctx)
@ GPU_FORMAT_DEPTH_STENCIL
eGPUFrameBufferBits to_framebuffer_bits(eGPUTextureFormat tex_format)
eGPUDataFormat to_data_format(eGPUTextureFormat tex_format)
static eGPUTextureFormat to_texture_format(const GPUVertFormat *format)
eGPUTextureFormatFlag to_format_flag(eGPUTextureFormat format)
static size_t to_bytesize(GPUIndexBufType type)
int to_component_len(eGPUTextureFormat format)