40#define GPU_FB_MAX_COLOR_ATTACHMENT (GPU_FB_MAX_ATTACHMENT - GPU_FB_COLOR_ATTACHMENT0)
68# define DEBUG_NAME_LEN 64
70# define DEBUG_NAME_LEN 16
92#ifndef GPU_NO_USE_PY_REFERENCES
105 virtual void bind(
bool enabled_srgb) = 0;
106 virtual bool check(
char err_out[256]) = 0;
108 const float clear_col[4],
110 uint clear_stencil) = 0;
114 const void *clear_value) = 0;
130 int dst_offset_y) = 0;
146 void (*
callback)(
void *user_data,
int level),
260 return reinterpret_cast<GPUFrameBuffer *
>(vert);
268 return reinterpret_cast<const FrameBuffer *
>(vert);
MINLINE bool equals_v4v4_int(const int v1[4], const int v2[4]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v4_v4_int(int r[4], const int a[4])
#define GPU_MAX_VIEWPORTS
Read Guarded memory(de)allocation.
void attachment_remove(GPUAttachmentType type)
void size_set(int width, int height)
virtual void subpass_transition_impl(const GPUAttachmentState depth_attachment_state, Span< GPUAttachmentState > color_attachment_states)=0
GPUTexture * depth_tex() const
bool use_explicit_load_store_
bool scissor_test_get() const
virtual void attachment_set_loadstore_op(GPUAttachmentType type, GPULoadStore ls)=0
uint get_bits_per_pixel()
virtual void read(eGPUFrameBufferBits planes, eGPUDataFormat format, const int area[4], int channel_len, int slot, void *r_data)=0
void set_use_explicit_loadstore(bool use_explicit_loadstore)
void viewport_set(const int viewport[4])
void scissor_set(const int scissor[4])
virtual void clear_attachment(GPUAttachmentType type, eGPUDataFormat data_format, const void *clear_value)=0
virtual void bind(bool enabled_srgb)=0
char name_[DEBUG_NAME_LEN]
void scissor_test_set(bool test)
void default_size_set(int width, int height)
const char *const name_get() const
void scissor_get(int r_scissor[4]) const
void subpass_transition(const GPUAttachmentState depth_attachment_state, Span< GPUAttachmentState > color_attachment_states)
virtual void clear_multi(const float(*clear_col)[4])=0
GPUTexture * color_tex(int slot) const
FrameBuffer(const char *name)
virtual bool check(char err_out[256])=0
virtual void clear(eGPUFrameBufferBits buffers, const float clear_col[4], float clear_depth, uint clear_stencil)=0
bool get_use_explicit_loadstore() const
void viewport_multi_set(const int viewports[GPU_MAX_VIEWPORTS][4])
void viewport_get(int r_viewport[4]) const
GPUAttachment attachments_[GPU_FB_MAX_ATTACHMENT]
int viewport_[GPU_MAX_VIEWPORTS][4]
void load_store_config_array(const GPULoadStore *load_store_actions, uint actions_len)
virtual void blit_to(eGPUFrameBufferBits planes, int src_slot, FrameBuffer *dst, int dst_slot, int dst_offset_x, int dst_offset_y)=0
void recursive_downsample(int max_lvl, void(*callback)(void *user_data, int level), void *user_data)
void attachment_set(GPUAttachmentType type, const GPUAttachment &new_attachment)
local_group_size(16, 16) .push_constant(Type b
DEGForeachIDComponentCallback callback
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
@ GPU_FB_DEPTH_STENCIL_ATTACHMENT
@ GPU_FB_COLOR_ATTACHMENT5
@ GPU_FB_COLOR_ATTACHMENT2
@ GPU_FB_COLOR_ATTACHMENT3
@ GPU_FB_COLOR_ATTACHMENT6
@ GPU_FB_COLOR_ATTACHMENT7
@ GPU_FB_COLOR_ATTACHMENT4
@ GPU_FB_COLOR_ATTACHMENT1
@ GPU_FB_COLOR_ATTACHMENT0
@ GPU_FB_DEPTH_ATTACHMENT
constexpr GPUAttachmentType operator-(GPUAttachmentType a, int b)
GPUAttachmentType & operator++(GPUAttachmentType &a)
constexpr GPUAttachmentType operator+(GPUAttachmentType a, int b)
GPUAttachmentType & operator--(GPUAttachmentType &a)
static Context * unwrap(GPUContext *ctx)
static GPUContext * wrap(Context *ctx)