72# define DEBUG_NAME_LEN 64
74# define DEBUG_NAME_LEN 8
78#define GPU_TEX_MAX_FBO_ATTACHED 32
92#ifndef GPU_NO_USE_PY_REFERENCES
164 GPUPixelBuffer *pixbuf) = 0;
309 BLI_assert_msg(0,
"Texture cannot be attached to a framebuffer because of its type");
320 bool use_stencil) = 0;
326 return reinterpret_cast<GPUTexture *
>(vert);
330 return reinterpret_cast<Texture *
>(vert);
334 return reinterpret_cast<const Texture *
>(vert);
355 return reinterpret_cast<GPUPixelBuffer *
>(pixbuf);
363 return reinterpret_cast<const PixelBuffer *
>(pixbuf);
415 return (3 * 10 + 2) / 8;
417 return (11 + 11 + 10) / 8;
420 return (32 + 8 + 24) / 8;
424 return (3 * 8 + 8) / 8;
467 return (3 * 9 + 5) / 8;
736 switch (data_format) {
773 switch (tex_format) {
892 switch (tex_format) {
997 switch (tex_format) {
1066 BLI_assert_msg(0,
"This texture format is not compatible with framebuffer attachment.");
1078 BLI_assert_msg(0,
"This texture format is not compatible with framebuffer attachment.");
1087 if (
format->attr_len == 0) {
1091 switch (
format->attrs[0].comp_len) {
1093 switch (
format->attrs[0].comp_type) {
1113 switch (
format->attrs[0].comp_type) {
1136 switch (
format->attrs[0].comp_type) {
1146 switch (
format->attrs[0].fetch_mode) {
1169 BLI_assert_msg(0,
"Unsupported vertex format for buffer texture");
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
MINLINE int max_ii(int a, int b)
#define ENUM_OPERATORS(_type, _max)
@ GPU_DATA_2_10_10_10_REV
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Texture
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
virtual int64_t get_native_handle()=0
virtual size_t get_size()=0
virtual void mip_range_set(int min, int max)=0
virtual uint gl_bindcode_get() const =0
GPUSamplerState sampler_state
void attach_to(FrameBuffer *fb, GPUAttachmentType type)
bool init_view(GPUTexture *src, eGPUTextureFormat format, eGPUTextureType type, int mip_start, int mip_len, int layer_start, int layer_len, bool cube_as_array, bool use_stencil)
virtual bool init_internal(GPUTexture *src, int mip_offset, int layer_offset, bool use_stencil)=0
virtual bool init_internal(VertBuf *vbo)=0
int mip_width_get(int mip) const
eGPUTextureFormat format_
int mip_depth_get(int mip) const
eGPUTextureFormatFlag format_flag_get() const
virtual void * read(int mip, eGPUDataFormat format)=0
virtual void generate_mipmap()=0
eGPUTextureFormat format_get() const
eGPUTextureFormatFlag format_flag_
void update(eGPUDataFormat format, const void *data)
eGPUTextureUsage gpu_image_usage_flags_
eGPUTextureUsage usage_get() const
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
virtual void update_sub(int offset[3], int extent[3], eGPUDataFormat format, GPUPixelBuffer *pixbuf)=0
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)
int mip_height_get(int mip) const
virtual void clear(eGPUDataFormat format, const void *data)=0
eGPUTextureType type_get() const
bool init_buffer(VertBuf *vbo, eGPUTextureFormat format)
virtual bool init_internal()=0
bool init_cubemap(int w, int layers, int mip_len, eGPUTextureFormat format)
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
void usage_set(eGPUTextureUsage usage_flags)
bool init_3D(int w, int h, int d, int mip_len, eGPUTextureFormat format)
void detach_from(FrameBuffer *fb)
bool init_2D(int w, int h, int layers, int mip_len, eGPUTextureFormat format)
additional_info("compositor_sum_float_shared") .push_constant(Type additional_info("compositor_sum_float_shared") .push_constant(Type GPU_RGBA32F
DOF_TILES_FLATTEN_GROUP_SIZE coc_tx GPU_R11F_G11F_B10F
out_radiance out_gbuf_normal out_gbuf_closure2 GPU_RG16
SHADOW_TILEMAP_RES tiles_buf[] statistics_buf render_view_buf[SHADOW_VIEW_MAX] GPU_R32UI
RAYTRACE_GROUP_SIZE additional_info("eevee_shared", "eevee_gbuffer_data", "eevee_global_ubo", "eevee_sampling_data", "eevee_utility_texture", "eevee_hiz_data", "draw_view") .specialization_constant(Type RAYTRACE_GROUP_SIZE in_sh_0_tx in_sh_2_tx screen_normal_tx GPU_RGBA8
@ 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)
static Context * unwrap(GPUContext *ctx)
size_t to_block_size(eGPUTextureFormat data_type)
static GPUContext * wrap(Context *ctx)
constexpr bool validate_data_format(eGPUTextureFormat tex_format, eGPUDataFormat data_format)
@ GPU_FORMAT_NORMALIZED_INTEGER
@ GPU_FORMAT_DEPTH_STENCIL
size_t to_bytesize(GPUIndexBufType type)
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)
int to_component_len(eGPUTextureFormat format)
static constexpr GPUSamplerState default_sampler()