102#define NGF_NOEXCEPT noexcept
111#pragma region ngf_type_declarations
205 void* (*allocate)(
size_t obj_size,
size_t nobjs,
void*
userdata);
211 void (*
free)(
void* ptr,
size_t obj_size,
size_t nobjs,
void*
userdata);
250 NGF_DEVICE_PERFORMANCE_TIER_COUNT
488 NGF_POLYGON_MODE_COUNT
825 NGF_BLEND_FACTOR_COUNT
868typedef enum ngf_color_write_mask_bit {
869 NGF_COLOR_MASK_WRITE_BIT_R = 0x01,
870 NGF_COLOR_MASK_WRITE_BIT_G = 0x02,
871 NGF_COLOR_MASK_WRITE_BIT_B = 0x04,
872 NGF_COLOR_MASK_WRITE_BIT_A = 0x08
873} ngf_color_write_mask_bit;
955typedef enum ngf_vertex_input_rate {
972 NGF_VERTEX_INPUT_RATE_COUNT
973} ngf_vertex_input_rate;
1082 NGF_SAMPLE_COUNT_1 = 1,
1083 NGF_SAMPLE_COUNT_2 = 2,
1084 NGF_SAMPLE_COUNT_4 = 4,
1085 NGF_SAMPLE_COUNT_8 = 8,
1086 NGF_SAMPLE_COUNT_16 = 16,
1087 NGF_SAMPLE_COUNT_32 = 32,
1088 NGF_SAMPLE_COUNT_64 = 64,
1119 NGF_IMAGE_FORMAT_R8 = 0,
1120 NGF_IMAGE_FORMAT_RG8,
1121 NGF_IMAGE_FORMAT_RGB8,
1122 NGF_IMAGE_FORMAT_RGBA8,
1123 NGF_IMAGE_FORMAT_SRGB8,
1124 NGF_IMAGE_FORMAT_SRGBA8,
1125 NGF_IMAGE_FORMAT_BGR8,
1126 NGF_IMAGE_FORMAT_BGRA8,
1127 NGF_IMAGE_FORMAT_BGR8_SRGB,
1128 NGF_IMAGE_FORMAT_BGRA8_SRGB,
1129 NGF_IMAGE_FORMAT_RGB10A2,
1130 NGF_IMAGE_FORMAT_R32F,
1131 NGF_IMAGE_FORMAT_RG32F,
1132 NGF_IMAGE_FORMAT_RGB32F,
1133 NGF_IMAGE_FORMAT_RGBA32F,
1134 NGF_IMAGE_FORMAT_R16F,
1135 NGF_IMAGE_FORMAT_RG16F,
1136 NGF_IMAGE_FORMAT_RGB16F,
1137 NGF_IMAGE_FORMAT_RGBA16F,
1138 NGF_IMAGE_FORMAT_RG11B10F,
1139 NGF_IMAGE_FORMAT_RGB9E5,
1140 NGF_IMAGE_FORMAT_R16_UNORM,
1141 NGF_IMAGE_FORMAT_R16_SNORM,
1142 NGF_IMAGE_FORMAT_RG16_UNORM,
1143 NGF_IMAGE_FORMAT_RG16_SNORM,
1144 NGF_IMAGE_FORMAT_RGBA16_UNORM,
1145 NGF_IMAGE_FORMAT_RGBA16_SNORM,
1146 NGF_IMAGE_FORMAT_R8U,
1147 NGF_IMAGE_FORMAT_R8S,
1148 NGF_IMAGE_FORMAT_R16U,
1149 NGF_IMAGE_FORMAT_R16S,
1150 NGF_IMAGE_FORMAT_RG16U,
1151 NGF_IMAGE_FORMAT_RGB16U,
1152 NGF_IMAGE_FORMAT_RGBA16U,
1153 NGF_IMAGE_FORMAT_R32U,
1154 NGF_IMAGE_FORMAT_RG32U,
1155 NGF_IMAGE_FORMAT_RGB32U,
1156 NGF_IMAGE_FORMAT_RGBA32U,
1157 NGF_IMAGE_FORMAT_BC7,
1158 NGF_IMAGE_FORMAT_BC7_SRGB,
1159 NGF_IMAGE_FORMAT_ASTC_4x4,
1160 NGF_IMAGE_FORMAT_ASTC_4x4_SRGB,
1161 NGF_IMAGE_FORMAT_ASTC_5x4,
1162 NGF_IMAGE_FORMAT_ASTC_5x4_SRGB,
1163 NGF_IMAGE_FORMAT_ASTC_5x5,
1164 NGF_IMAGE_FORMAT_ASTC_5x5_SRGB,
1165 NGF_IMAGE_FORMAT_ASTC_6x5,
1166 NGF_IMAGE_FORMAT_ASTC_6x5_SRGB,
1167 NGF_IMAGE_FORMAT_ASTC_6x6,
1168 NGF_IMAGE_FORMAT_ASTC_6x6_SRGB,
1169 NGF_IMAGE_FORMAT_ASTC_8x5,
1170 NGF_IMAGE_FORMAT_ASTC_8x5_SRGB,
1171 NGF_IMAGE_FORMAT_ASTC_8x6,
1172 NGF_IMAGE_FORMAT_ASTC_8x6_SRGB,
1173 NGF_IMAGE_FORMAT_ASTC_8x8,
1174 NGF_IMAGE_FORMAT_ASTC_8x8_SRGB,
1175 NGF_IMAGE_FORMAT_ASTC_10x5,
1176 NGF_IMAGE_FORMAT_ASTC_10x5_SRGB,
1177 NGF_IMAGE_FORMAT_ASTC_10x6,
1178 NGF_IMAGE_FORMAT_ASTC_10x6_SRGB,
1179 NGF_IMAGE_FORMAT_ASTC_10x8,
1180 NGF_IMAGE_FORMAT_ASTC_10x8_SRGB,
1181 NGF_IMAGE_FORMAT_ASTC_10x10,
1182 NGF_IMAGE_FORMAT_ASTC_10x10_SRGB,
1183 NGF_IMAGE_FORMAT_ASTC_12x10,
1184 NGF_IMAGE_FORMAT_ASTC_12x10_SRGB,
1185 NGF_IMAGE_FORMAT_ASTC_12x12,
1186 NGF_IMAGE_FORMAT_ASTC_12x12_SRGB,
1187 NGF_IMAGE_FORMAT_DEPTH32,
1188 NGF_IMAGE_FORMAT_DEPTH16,
1189 NGF_IMAGE_FORMAT_DEPTH24_STENCIL8,
1190 NGF_IMAGE_FORMAT_UNDEFINED,
1191 NGF_IMAGE_FORMAT_COUNT
1281 NGF_PRIMITIVE_TOPOLOGY_COUNT
1314 bool enable_primitive_restart;
1368 const char* debug_name;
1392 const char* debug_name;
1461 NGF_DESCRIPTOR_STORAGE_IMAGE,
1463 NGF_DESCRIPTOR_TYPE_COUNT
1624 NGF_IMAGE_TYPE_COUNT
1687 NGF_CUBEMAP_FACE_POSITIVE_X,
1688 NGF_CUBEMAP_FACE_NEGATIVE_X,
1689 NGF_CUBEMAP_FACE_POSITIVE_Y,
1690 NGF_CUBEMAP_FACE_NEGATIVE_Y,
1691 NGF_CUBEMAP_FACE_POSITIVE_Z,
1692 NGF_CUBEMAP_FACE_NEGATIVE_Z,
1693 NGF_CUBEMAP_FACE_COUNT
2141typedef enum ngf_colorspace {
2142 NGF_COLORSPACE_SRGB_NONLINEAR = 0u,
2143 NGF_COLORSPACE_EXTENDED_SRGB_NONLINEAR,
2144 NGF_COLORSPACE_EXTENDED_SRGB_LINEAR,
2145 NGF_COLORSPACE_DISPLAY_P3,
2146 NGF_COLORSPACE_DISPLAY_P3_LINEAR,
2147 NGF_COLORSPACE_DCI_P3,
2148 NGF_COLORSPACE_ITUR_BT2020,
2149 NGF_COLORSPACE_COUNT
2304#define NGF_DEVICE_LIMIT_UNKNOWN (~0u)
2488#define NGF_DEVICE_NAME_MAX_LENGTH (256u)
2526#pragma region ngf_function_declarations
2568void ngf_shutdown() NGF_NOEXCEPT;
3000 float clear_color_r,
3001 float clear_color_g,
3002 float clear_color_b,
3003 float clear_color_a,
3005 uint32_t clear_stencil,
3138 uint32_t nbind_operations) NGF_NOEXCEPT;
3152 uint32_t nbind_operations) NGF_NOEXCEPT;
3168 size_t offset) NGF_NOEXCEPT;
3202 uint32_t first_element,
3204 uint32_t ninstances) NGF_NOEXCEPT;
3219 uint32_t x_threadgroups,
3220 uint32_t y_threadgroups,
3221 uint32_t z_threadgroups) NGF_NOEXCEPT;
3241 size_t dst_offset) NGF_NOEXCEPT;
3265 uint32_t nwrites) NGF_NOEXCEPT;
3287 size_t dst_offset) NGF_NOEXCEPT;
ngf_type
Definition nicegraf.h:909
void ngf_cmd_stencil_write_mask(ngf_render_encoder enc, uint32_t front, uint32_t back)
void * ngf_buffer_map_range(ngf_buffer buf, size_t offset, size_t size)
void ngf_buffer_unmap(ngf_buffer buf)
ngf_blend_op
Definition nicegraf.h:840
uint32_t ngf_device_handle
Definition nicegraf.h:230
@ NGF_INPUT_RATE_VERTEX
Definition nicegraf.h:962
@ NGF_INPUT_RATE_INSTANCE
Definition nicegraf.h:971
ngf_error
Definition nicegraf.h:293
ngf_device_performance_tier
Definition nicegraf.h:237
void ngf_renderdoc_capture_end()
void ngf_cmd_draw(ngf_render_encoder enc, bool indexed, uint32_t first_element, uint32_t nelements, uint32_t ninstances)
void ngf_cmd_bind_compute_pipeline(ngf_compute_encoder buf, ngf_compute_pipeline pipeline)
ngf_stage_type
Definition nicegraf.h:371
void ngf_cmd_end_current_debug_group(ngf_cmd_buffer cmd_buffer)
ngf_present_mode
Definition nicegraf.h:2115
ngf_primitive_topology
Definition nicegraf.h:1249
void ngf_cmd_write_image(ngf_xfer_encoder enc, ngf_buffer src, ngf_image dst, const ngf_image_write *writes, uint32_t nwrites)
void ngf_cmd_stencil_compare_mask(ngf_render_encoder enc, uint32_t front, uint32_t back)
ngf_error ngf_start_cmd_buffer(ngf_cmd_buffer buf, ngf_frame_token token)
ngf_error ngf_create_render_target(const ngf_render_target_info *info, ngf_render_target *result)
ngf_error ngf_create_cmd_buffer(const ngf_cmd_buffer_info *info, ngf_cmd_buffer *result)
void ngf_destroy_render_target(ngf_render_target rendertarget)
void ngf_cmd_viewport(ngf_render_encoder buf, const ngf_irect2d *r)
void ngf_destroy_context(ngf_context ctx)
void ngf_cmd_bind_index_buffer(ngf_render_encoder enc, ngf_buffer idxbuf, size_t offset, ngf_type index_type)
void ngf_destroy_image(ngf_image image)
ngf_image_format
Definition nicegraf.h:1118
ngf_error ngf_create_compute_pipeline(const ngf_compute_pipeline_info *info, ngf_compute_pipeline *result)
void ngf_cmd_bind_gfx_pipeline(ngf_render_encoder buf, ngf_graphics_pipeline pipeline)
ngf_error ngf_create_context(const ngf_context_info *info, ngf_context *result)
void ngf_cmd_stencil_reference(ngf_render_encoder enc, uint32_t front, uint32_t back)
ngf_error ngf_cmd_end_xfer_pass(ngf_xfer_encoder enc)
ngf_error ngf_create_shader_stage(const ngf_shader_stage_info *info, ngf_shader_stage *result)
void ngf_destroy_texel_buffer_view(ngf_texel_buffer_view buf_view)
ngf_error ngf_cmd_end_render_pass(ngf_render_encoder enc)
void ngf_destroy_shader_stage(ngf_shader_stage stage)
void ngf_destroy_compute_pipeline(ngf_compute_pipeline pipeline)
ngf_error ngf_set_context(ngf_context ctx)
ngf_image_type
Definition nicegraf.h:1611
ngf_blend_factor
Definition nicegraf.h:702
ngf_error ngf_create_image(const ngf_image_info *info, ngf_image *result)
ngf_diagnostic_message_type
Definition nicegraf.h:136
ngf_diagnostic_log_verbosity
Definition nicegraf.h:119
ngf_error ngf_cmd_begin_compute_pass(ngf_cmd_buffer buf, const ngf_compute_pass_info *pass_info, ngf_compute_encoder *enc)
void ngf_cmd_bind_compute_resources(ngf_compute_encoder enc, const ngf_resource_bind_op *bind_operations, uint32_t nbind_operations)
ngf_error ngf_initialize(const ngf_init_info *init_info)
ngf_render_target ngf_default_render_target()
void ngf_cmd_copy_image_to_buffer(ngf_xfer_encoder enc, const ngf_image_ref src, ngf_offset3d src_offset, ngf_extent3d src_extent, uint32_t nlayers, ngf_buffer dst, size_t dst_offset)
ngf_buffer_storage_type
Definition nicegraf.h:1916
ngf_error ngf_end_frame(ngf_frame_token token)
void ngf_renderdoc_capture_next_frame()
ngf_descriptor_type
Definition nicegraf.h:1413
const ngf_device_capabilities * ngf_get_device_capabilities(void)
void ngf_cmd_begin_debug_group(ngf_cmd_buffer cmd_buffer, const char *name)
void ngf_destroy_buffer(ngf_buffer buffer)
void ngf_renderdoc_capture_begin()
ngf_error ngf_cmd_begin_render_pass(ngf_cmd_buffer buf, const ngf_render_pass_info *pass_info, ngf_render_encoder *enc)
void ngf_destroy_graphics_pipeline(ngf_graphics_pipeline pipeline)
ngf_error ngf_cmd_begin_render_pass_simple(ngf_cmd_buffer buf, ngf_render_target rt, float clear_color_r, float clear_color_g, float clear_color_b, float clear_color_a, float clear_depth, uint32_t clear_stencil, ngf_render_encoder *enc)
ngf_sample_count
Definition nicegraf.h:1081
ngf_sampler_wrap_mode
Definition nicegraf.h:1507
ngf_error ngf_cmd_generate_mipmaps(ngf_xfer_encoder xfenc, ngf_image img)
ngf_error ngf_cmd_begin_xfer_pass(ngf_cmd_buffer buf, const ngf_xfer_pass_info *pass_info, ngf_xfer_encoder *enc)
ngf_error ngf_resize_context(ngf_context ctx, uint32_t new_width, uint32_t new_height)
void ngf_cmd_bind_resources(ngf_render_encoder enc, const ngf_resource_bind_op *bind_operations, uint32_t nbind_operations)
ngf_error ngf_create_buffer(const ngf_buffer_info *info, ngf_buffer *result)
#define NGF_DEVICE_NAME_MAX_LENGTH
Definition nicegraf.h:2488
ngf_error ngf_cmd_end_compute_pass(ngf_compute_encoder enc)
ngf_polygon_mode
Definition nicegraf.h:476
ngf_attachment_store_op
Definition nicegraf.h:1788
ngf_error ngf_create_texel_buffer_view(const ngf_texel_buffer_view_info *info, ngf_texel_buffer_view *result)
ngf_error ngf_get_device_list(const ngf_device **devices, uint32_t *ndevices)
uintptr_t ngf_frame_token
Definition nicegraf.h:2297
ngf_buffer_usage
Definition nicegraf.h:1974
ngf_sampler_filter
Definition nicegraf.h:1472
ngf_context ngf_get_context()
ngf_cull_mode
Definition nicegraf.h:498
ngf_error ngf_create_sampler(const ngf_sampler_info *info, ngf_sampler *result)
ngf_front_face_mode
Definition nicegraf.h:524
const ngf_attachment_descriptions * ngf_default_render_target_attachment_descs()
ngf_cubemap_face
Definition nicegraf.h:1686
void ngf_destroy_cmd_buffer(ngf_cmd_buffer buffer)
void ngf_buffer_flush_range(ngf_buffer buf, size_t offset, size_t size)
ngf_image_usage
Definition nicegraf.h:1579
ngf_error ngf_create_graphics_pipeline(const ngf_graphics_pipeline_info *info, ngf_graphics_pipeline *result)
void ngf_cmd_scissor(ngf_render_encoder enc, const ngf_irect2d *r)
ngf_attachment_type
Definition nicegraf.h:1199
void ngf_cmd_dispatch(ngf_compute_encoder enc, uint32_t x_threadgroups, uint32_t y_threadgroups, uint32_t z_threadgroups)
ngf_compare_op
Definition nicegraf.h:554
void ngf_cmd_bind_attrib_buffer(ngf_render_encoder enc, ngf_buffer vbuf, uint32_t binding, size_t offset)
void ngf_cmd_copy_buffer(ngf_xfer_encoder enc, ngf_buffer src, ngf_buffer dst, size_t size, size_t src_offset, size_t dst_offset)
ngf_error ngf_submit_cmd_buffers(uint32_t nbuffers, ngf_cmd_buffer *bufs)
ngf_error ngf_begin_frame(ngf_frame_token *token)
void ngf_destroy_sampler(ngf_sampler sampler)
ngf_stencil_op
Definition nicegraf.h:595
ngf_attachment_load_op
Definition nicegraf.h:1768
@ NGF_TYPE_UINT8
Definition nicegraf.h:916
@ NGF_TYPE_INT32
Definition nicegraf.h:928
@ NGF_TYPE_INT16
Definition nicegraf.h:920
@ NGF_TYPE_UINT32
Definition nicegraf.h:932
@ NGF_TYPE_HALF_FLOAT
Definition nicegraf.h:940
@ NGF_TYPE_UINT16
Definition nicegraf.h:924
@ NGF_TYPE_DOUBLE
Definition nicegraf.h:944
@ NGF_TYPE_INT8
Definition nicegraf.h:912
@ NGF_TYPE_FLOAT
Definition nicegraf.h:936
@ NGF_BLEND_OP_MIN
Definition nicegraf.h:855
@ NGF_BLEND_OP_SUB
Definition nicegraf.h:847
@ NGF_BLEND_OP_REV_SUB
Definition nicegraf.h:851
@ NGF_BLEND_OP_MAX
Definition nicegraf.h:859
@ NGF_BLEND_OP_ADD
Definition nicegraf.h:843
@ NGF_ERROR_OUT_OF_BOUNDS
Definition nicegraf.h:310
@ NGF_ERROR_OK
Definition nicegraf.h:296
@ NGF_ERROR_INVALID_OPERATION
Definition nicegraf.h:327
@ NGF_ERROR_OBJECT_CREATION_FAILED
Definition nicegraf.h:305
@ NGF_ERROR_INVALID_SIZE
Definition nicegraf.h:319
@ NGF_ERROR_INVALID_ENUM
Definition nicegraf.h:323
@ NGF_ERROR_INVALID_FORMAT
Definition nicegraf.h:315
@ NGF_ERROR_OUT_OF_MEM
Definition nicegraf.h:300
@ NGF_DEVICE_PERFORMANCE_TIER_HIGH
Definition nicegraf.h:240
@ NGF_DEVICE_PERFORMANCE_TIER_UNKNOWN
Definition nicegraf.h:248
@ NGF_DEVICE_PERFORMANCE_TIER_LOW
Definition nicegraf.h:244
@ NGF_STAGE_COMPUTE
Definition nicegraf.h:383
@ NGF_STAGE_VERTEX
Definition nicegraf.h:374
@ NGF_STAGE_FRAGMENT
Definition nicegraf.h:378
@ NGF_PRESENTATION_MODE_IMMEDIATE
Definition nicegraf.h:2134
@ NGF_PRESENTATION_MODE_FIFO
Definition nicegraf.h:2125
@ NGF_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP
Definition nicegraf.h:1267
@ NGF_PRIMITIVE_TOPOLOGY_LINE_STRIP
Definition nicegraf.h:1279
@ NGF_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST
Definition nicegraf.h:1254
@ NGF_PRIMITIVE_TOPOLOGY_LINE_LIST
Definition nicegraf.h:1273
@ NGF_IMAGE_TYPE_IMAGE_3D
Definition nicegraf.h:1618
@ NGF_IMAGE_TYPE_IMAGE_2D
Definition nicegraf.h:1614
@ NGF_IMAGE_TYPE_CUBE
Definition nicegraf.h:1622
@ NGF_BLEND_FACTOR_ZERO
Definition nicegraf.h:708
@ NGF_BLEND_FACTOR_CONSTANT_ALPHA
Definition nicegraf.h:814
@ NGF_BLEND_FACTOR_SRC_COLOR
Definition nicegraf.h:723
@ NGF_BLEND_FACTOR_ONE_MINUS_SRC_COLOR
Definition nicegraf.h:732
@ NGF_BLEND_FACTOR_CONSTANT_COLOR
Definition nicegraf.h:795
@ NGF_BLEND_FACTOR_ONE_MINUS_DST_ALPHA
Definition nicegraf.h:785
@ NGF_BLEND_FACTOR_DST_COLOR
Definition nicegraf.h:741
@ NGF_BLEND_FACTOR_DST_ALPHA
Definition nicegraf.h:776
@ NGF_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR
Definition nicegraf.h:805
@ NGF_BLEND_FACTOR_ONE_MINUS_DST_COLOR
Definition nicegraf.h:750
@ NGF_BLEND_FACTOR_ONE
Definition nicegraf.h:715
@ NGF_BLEND_FACTOR_SRC_ALPHA
Definition nicegraf.h:758
@ NGF_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
Definition nicegraf.h:767
@ NGF_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA
Definition nicegraf.h:823
@ NGF_DIAGNOSTIC_WARNING
Definition nicegraf.h:145
@ NGF_DIAGNOSTIC_INFO
Definition nicegraf.h:140
@ NGF_DIAGNOSTIC_ERROR
Definition nicegraf.h:150
@ NGF_DIAGNOSTICS_VERBOSITY_DEFAULT
Definition nicegraf.h:123
@ NGF_DIAGNOSTICS_VERBOSITY_DETAILED
Definition nicegraf.h:128
@ NGF_BUFFER_STORAGE_DEVICE_LOCAL_HOST_READABLE_WRITEABLE
Definition nicegraf.h:1965
@ NGF_BUFFER_STORAGE_DEVICE_LOCAL
Definition nicegraf.h:1944
@ NGF_BUFFER_STORAGE_DEVICE_LOCAL_HOST_WRITEABLE
Definition nicegraf.h:1957
@ NGF_BUFFER_STORAGE_HOST_READABLE
Definition nicegraf.h:1921
@ NGF_BUFFER_STORAGE_HOST_READABLE_WRITEABLE
Definition nicegraf.h:1934
@ NGF_BUFFER_STORAGE_HOST_WRITEABLE
Definition nicegraf.h:1927
@ NGF_DESCRIPTOR_IMAGE_AND_SAMPLER
Definition nicegraf.h:1441
@ NGF_DESCRIPTOR_TEXEL_BUFFER
Definition nicegraf.h:1449
@ NGF_DESCRIPTOR_UNIFORM_BUFFER
Definition nicegraf.h:1420
@ NGF_DESCRIPTOR_IMAGE
Definition nicegraf.h:1427
@ NGF_DESCRIPTOR_STORAGE_BUFFER
Definition nicegraf.h:1456
@ NGF_DESCRIPTOR_SAMPLER
Definition nicegraf.h:1434
@ NGF_WRAP_MODE_MIRRORED_REPEAT
Definition nicegraf.h:1518
@ NGF_WRAP_MODE_REPEAT
Definition nicegraf.h:1514
@ NGF_WRAP_MODE_CLAMP_TO_EDGE
Definition nicegraf.h:1510
@ NGF_POLYGON_MODE_POINT
Definition nicegraf.h:487
@ NGF_POLYGON_MODE_LINE
Definition nicegraf.h:483
@ NGF_POLYGON_MODE_FILL
Definition nicegraf.h:479
@ NGF_STORE_OP_DONTCARE
Definition nicegraf.h:1795
@ NGF_STORE_OP_RESOLVE
Definition nicegraf.h:1810
@ NGF_STORE_OP_STORE
Definition nicegraf.h:1803
@ NGF_BUFFER_USAGE_XFER_SRC
Definition nicegraf.h:1977
@ NGF_BUFFER_USAGE_INDEX_BUFFER
Definition nicegraf.h:1989
@ NGF_BUFFER_USAGE_UNIFORM_BUFFER
Definition nicegraf.h:1985
@ NGF_BUFFER_USAGE_STORAGE_BUFFER
Definition nicegraf.h:2002
@ NGF_BUFFER_USAGE_VERTEX_BUFFER
Definition nicegraf.h:1993
@ NGF_BUFFER_USAGE_TEXEL_BUFFER
Definition nicegraf.h:1997
@ NGF_BUFFER_USAGE_XFER_DST
Definition nicegraf.h:1981
@ NGF_FILTER_LINEAR
Definition nicegraf.h:1496
@ NGF_FILTER_NEAREST
Definition nicegraf.h:1483
@ NGF_CULL_MODE_FRONT_AND_BACK
Definition nicegraf.h:509
@ NGF_CULL_MODE_FRONT
Definition nicegraf.h:505
@ NGF_CULL_MODE_NONE
Definition nicegraf.h:513
@ NGF_CULL_MODE_BACK
Definition nicegraf.h:501
@ NGF_FRONT_FACE_CLOCKWISE
Definition nicegraf.h:531
@ NGF_FRONT_FACE_COUNTER_CLOCKWISE
Definition nicegraf.h:527
@ NGF_IMAGE_USAGE_SAMPLE_FROM
Definition nicegraf.h:1582
@ NGF_IMAGE_USAGE_XFER_SRC
Definition nicegraf.h:1602
@ NGF_IMAGE_USAGE_XFER_DST
Definition nicegraf.h:1590
@ NGF_IMAGE_USAGE_ATTACHMENT
Definition nicegraf.h:1586
@ NGF_IMAGE_USAGE_MIPMAP_GENERATION
Definition nicegraf.h:1594
@ NGF_IMAGE_USAGE_STORAGE
Definition nicegraf.h:1598
@ NGF_ATTACHMENT_DEPTH_STENCIL
Definition nicegraf.h:1210
@ NGF_ATTACHMENT_COLOR
Definition nicegraf.h:1202
@ NGF_ATTACHMENT_DEPTH
Definition nicegraf.h:1206
@ NGF_COMPARE_OP_GREATER
Definition nicegraf.h:577
@ NGF_COMPARE_OP_LEQUAL
Definition nicegraf.h:565
@ NGF_COMPARE_OP_NEQUAL
Definition nicegraf.h:581
@ NGF_COMPARE_OP_EQUAL
Definition nicegraf.h:569
@ NGF_COMPARE_OP_GEQUAL
Definition nicegraf.h:573
@ NGF_COMPARE_OP_LESS
Definition nicegraf.h:561
@ NGF_COMPARE_OP_NEVER
Definition nicegraf.h:557
@ NGF_COMPARE_OP_ALWAYS
Definition nicegraf.h:585
@ NGF_STENCIL_OP_DECR_WRAP
Definition nicegraf.h:622
@ NGF_STENCIL_OP_KEEP
Definition nicegraf.h:598
@ NGF_STENCIL_OP_DECR_CLAMP
Definition nicegraf.h:618
@ NGF_STENCIL_OP_INVERT
Definition nicegraf.h:626
@ NGF_STENCIL_OP_ZERO
Definition nicegraf.h:602
@ NGF_STENCIL_OP_REPLACE
Definition nicegraf.h:606
@ NGF_STENCIL_OP_INCR_WRAP
Definition nicegraf.h:614
@ NGF_STENCIL_OP_INCR_CLAMP
Definition nicegraf.h:610
@ NGF_LOAD_OP_DONTCARE
Definition nicegraf.h:1771
@ NGF_LOAD_OP_CLEAR
Definition nicegraf.h:1779
@ NGF_LOAD_OP_KEEP
Definition nicegraf.h:1775
Definition nicegraf.h:198
void * userdata
Definition nicegraf.h:216
void(* free)(void *ptr, size_t obj_size, size_t nobjs, void *userdata)
Definition nicegraf.h:211
Definition nicegraf.h:1218
ngf_sample_count sample_count
Definition nicegraf.h:1222
ngf_attachment_type type
Definition nicegraf.h:1219
bool is_resolve
Definition nicegraf.h:1225
bool is_sampled
Definition nicegraf.h:1223
ngf_image_format format
Definition nicegraf.h:1220
Definition nicegraf.h:1234
const ngf_attachment_description * descs
Definition nicegraf.h:1238
uint32_t ndescs
Definition nicegraf.h:1240
Definition nicegraf.h:891
bool enable
Definition nicegraf.h:901
ngf_blend_factor dst_alpha_blend_factor
Definition nicegraf.h:897
ngf_blend_op blend_op_alpha
Definition nicegraf.h:893
ngf_blend_factor dst_color_blend_factor
Definition nicegraf.h:895
uint32_t color_write_mask
Definition nicegraf.h:898
ngf_blend_factor src_color_blend_factor
Definition nicegraf.h:894
ngf_blend_factor src_alpha_blend_factor
Definition nicegraf.h:896
ngf_blend_op blend_op_color
Definition nicegraf.h:892
Definition nicegraf.h:2063
size_t offset
Definition nicegraf.h:2065
size_t range
Definition nicegraf.h:2066
ngf_buffer buffer
Definition nicegraf.h:2064
Definition nicegraf.h:2010
uint32_t buffer_usage
Definition nicegraf.h:2013
ngf_buffer_storage_type storage_type
Definition nicegraf.h:2012
size_t size
Definition nicegraf.h:2011
Definition nicegraf.h:2030
ngf_buffer buffer
Definition nicegraf.h:2031
size_t offset
Definition nicegraf.h:2032
size_t range
Definition nicegraf.h:2033
Definition nicegraf.h:2228
Definition nicegraf.h:1848
Definition nicegraf.h:1907
Definition nicegraf.h:1388
ngf_shader_stage shader_stage
Definition nicegraf.h:1389
const ngf_specialization_info * spec_info
Definition nicegraf.h:1391
Definition nicegraf.h:1290
uint32_t offset
Definition nicegraf.h:1292
ngf_type type
Definition nicegraf.h:1294
uint32_t constant_id
Definition nicegraf.h:1291
Definition nicegraf.h:2208
const ngf_context shared_context
Definition nicegraf.h:2220
const ngf_swapchain_info * swapchain_info
Definition nicegraf.h:2214
Definition nicegraf.h:651
bool depth_write
Definition nicegraf.h:691
ngf_stencil_info back_stencil
Definition nicegraf.h:662
bool stencil_test
Definition nicegraf.h:677
bool depth_test
Definition nicegraf.h:684
ngf_compare_op depth_compare
Definition nicegraf.h:668
ngf_stencil_info front_stencil
Definition nicegraf.h:656
Definition nicegraf.h:2312
size_t max_sampled_images_per_stage
Definition nicegraf.h:2346
size_t texture_color_sample_counts
Definition nicegraf.h:2453
size_t max_samplers_per_stage
Definition nicegraf.h:2353
size_t texture_depth_sample_counts
Definition nicegraf.h:2465
size_t uniform_buffer_offset_alignment
Definition nicegraf.h:2317
size_t max_image_layers
Definition nicegraf.h:2397
size_t storage_buffer_offset_alignment
Definition nicegraf.h:2322
ngf_sample_count max_supported_framebuffer_color_sample_count
Definition nicegraf.h:2435
bool cubemap_arrays_supported
Definition nicegraf.h:2423
size_t max_2d_image_dimension
Definition nicegraf.h:2381
ngf_sample_count max_supported_texture_color_sample_count
Definition nicegraf.h:2459
ngf_sample_count max_supported_texture_depth_sample_count
Definition nicegraf.h:2471
size_t max_uniform_buffers_per_stage
Definition nicegraf.h:2358
size_t max_cube_image_dimension
Definition nicegraf.h:2392
bool clipspace_z_zero_to_one
Definition nicegraf.h:2418
size_t texel_buffer_offset_alignment
Definition nicegraf.h:2334
size_t max_color_attachments_per_pass
Definition nicegraf.h:2403
size_t max_3d_image_dimension
Definition nicegraf.h:2387
bool device_local_memory_is_host_visible
Definition nicegraf.h:2481
size_t framebuffer_color_sample_counts
Definition nicegraf.h:2429
float max_sampler_anisotropy
Definition nicegraf.h:2408
size_t max_uniform_buffer_range
Definition nicegraf.h:2328
ngf_sample_count max_supported_framebuffer_depth_sample_count
Definition nicegraf.h:2447
size_t max_vertex_input_attributes_per_pipeline
Definition nicegraf.h:2339
size_t framebuffer_depth_sample_counts
Definition nicegraf.h:2441
size_t max_1d_image_dimension
Definition nicegraf.h:2376
size_t max_fragment_input_components
Definition nicegraf.h:2366
size_t max_fragment_inputs
Definition nicegraf.h:2371
Definition nicegraf.h:2496
ngf_device_capabilities capabilities
Definition nicegraf.h:2505
char name[(256u)]
Definition nicegraf.h:2503
ngf_device_handle handle
Definition nicegraf.h:2498
ngf_device_performance_tier performance_tier
Definition nicegraf.h:2497
Definition nicegraf.h:182
ngf_diagnostic_log_verbosity verbosity
Definition nicegraf.h:183
bool enable_debug_groups
Definition nicegraf.h:189
void * userdata
Definition nicegraf.h:184
ngf_diagnostic_callback callback
Definition nicegraf.h:187
Definition nicegraf.h:348
uint32_t height
Definition nicegraf.h:350
uint32_t depth
Definition nicegraf.h:351
uint32_t width
Definition nicegraf.h:349
Definition nicegraf.h:1323
const ngf_vertex_input_info * input_info
Definition nicegraf.h:1337
uint32_t nshader_stages
Definition nicegraf.h:1325
const ngf_depth_stencil_info * depth_stencil
Definition nicegraf.h:1332
const ngf_specialization_info * spec_info
Definition nicegraf.h:1344
const ngf_input_assembly_info * input_assembly_info
Definition nicegraf.h:1342
const ngf_rasterization_info * rasterization
Definition nicegraf.h:1326
const ngf_blend_info * color_attachment_blend_states
Definition nicegraf.h:1361
ngf_shader_stage shader_stages[5]
Definition nicegraf.h:1324
const ngf_attachment_descriptions * compatible_rt_attachment_descs
Definition nicegraf.h:1352
const ngf_multisample_info * multisample
Definition nicegraf.h:1327
float blend_consts[4]
Definition nicegraf.h:1363
Definition nicegraf.h:1633
ngf_extent3d extent
Definition nicegraf.h:1635
ngf_image_format format
Definition nicegraf.h:1639
ngf_image_type type
Definition nicegraf.h:1634
uint32_t nlayers
Definition nicegraf.h:1638
uint32_t usage_hint
Definition nicegraf.h:1641
uint32_t nmips
Definition nicegraf.h:1637
ngf_sample_count sample_count
Definition nicegraf.h:1640
Definition nicegraf.h:1702
ngf_image image
Definition nicegraf.h:1703
uint32_t layer
Definition nicegraf.h:1705
uint32_t mip_level
Definition nicegraf.h:1704
ngf_cubemap_face cubemap_face
Definition nicegraf.h:1706
Definition nicegraf.h:2075
ngf_sampler sampler
Definition nicegraf.h:2077
ngf_image image
Definition nicegraf.h:2076
Definition nicegraf.h:2514
ngf_extent3d extent
Definition nicegraf.h:2517
uint32_t nlayers
Definition nicegraf.h:2520
ngf_offset3d dst_offset
Definition nicegraf.h:2516
uint32_t dst_level
Definition nicegraf.h:2518
uint32_t dst_base_layer
Definition nicegraf.h:2519
Definition nicegraf.h:258
const ngf_diagnostic_info * diag_info
Definition nicegraf.h:263
const ngf_allocation_callbacks * allocation_callbacks
Definition nicegraf.h:270
const ngf_renderdoc_info * renderdoc_info
Definition nicegraf.h:283
ngf_device_handle device
Definition nicegraf.h:277
Definition nicegraf.h:336
int32_t x
Definition nicegraf.h:337
uint32_t width
Definition nicegraf.h:339
uint32_t height
Definition nicegraf.h:340
int32_t y
Definition nicegraf.h:338
Definition nicegraf.h:1097
bool alpha_to_coverage
Definition nicegraf.h:1099
ngf_sample_count sample_count
Definition nicegraf.h:1098
Definition nicegraf.h:359
int32_t x
Definition nicegraf.h:360
int32_t y
Definition nicegraf.h:361
int32_t z
Definition nicegraf.h:362
Definition nicegraf.h:541
bool discard
Definition nicegraf.h:542
ngf_cull_mode cull_mode
Definition nicegraf.h:545
ngf_polygon_mode polygon_mode
Definition nicegraf.h:544
ngf_front_face_mode front_face
Definition nicegraf.h:546
Definition nicegraf.h:1827
Definition nicegraf.h:1857
const ngf_attachment_store_op * store_ops
Definition nicegraf.h:1877
ngf_render_target render_target
Definition nicegraf.h:1861
const ngf_clear * clears
Definition nicegraf.h:1887
const ngf_attachment_load_op * load_ops
Definition nicegraf.h:1869
Definition nicegraf.h:1715
const ngf_image_ref * attachment_image_refs
Definition nicegraf.h:1720
const ngf_attachment_descriptions * attachment_descriptions
Definition nicegraf.h:1717
Definition nicegraf.h:158
const char * renderdoc_destination_template
Definition nicegraf.h:169
const char * renderdoc_lib_path
Definition nicegraf.h:163
Definition nicegraf.h:2095
uint32_t target_binding
Definition nicegraf.h:2097
union ngf_resource_bind_op::@1 info
uint32_t target_set
Definition nicegraf.h:2096
ngf_descriptor_type type
Definition nicegraf.h:2098
Definition nicegraf.h:1529
ngf_sampler_wrap_mode wrap_u
Definition nicegraf.h:1533
float lod_min
Definition nicegraf.h:1541
ngf_sampler_filter mag_filter
Definition nicegraf.h:1531
ngf_sampler_wrap_mode wrap_v
Definition nicegraf.h:1534
ngf_sampler_wrap_mode wrap_w
Definition nicegraf.h:1535
float lod_max
Definition nicegraf.h:1536
ngf_sampler_filter mip_filter
Definition nicegraf.h:1532
float max_anisotropy
Definition nicegraf.h:1547
float lod_bias
Definition nicegraf.h:1546
bool enable_anisotropy
Definition nicegraf.h:1550
ngf_sampler_filter min_filter
Definition nicegraf.h:1530
Definition nicegraf.h:394
ngf_stage_type type
Definition nicegraf.h:395
const void * content
Definition nicegraf.h:440
const char * entry_point_name
Definition nicegraf.h:445
const char * debug_name
Definition nicegraf.h:444
uint32_t content_length
Definition nicegraf.h:443
Definition nicegraf.h:1305
const void * value_buffer
Definition nicegraf.h:1308
uint32_t nspecializations
Definition nicegraf.h:1307
const ngf_constant_specialization * specializations
Definition nicegraf.h:1306
Definition nicegraf.h:636
uint32_t compare_mask
Definition nicegraf.h:641
ngf_stencil_op depth_fail_op
Definition nicegraf.h:639
uint32_t write_mask
Definition nicegraf.h:642
uint32_t reference
Definition nicegraf.h:643
ngf_stencil_op fail_op
Definition nicegraf.h:637
ngf_stencil_op pass_op
Definition nicegraf.h:638
ngf_compare_op compare_op
Definition nicegraf.h:640
Definition nicegraf.h:2157
uint32_t width
Definition nicegraf.h:2164
uint32_t height
Definition nicegraf.h:2165
ngf_image_format color_format
Definition nicegraf.h:2158
ngf_colorspace colorspace
Definition nicegraf.h:2159
uintptr_t native_handle
Definition nicegraf.h:2166
ngf_sample_count sample_count
Definition nicegraf.h:2162
uint32_t capacity_hint
Definition nicegraf.h:2163
ngf_image_format depth_format
Definition nicegraf.h:2160
ngf_present_mode present_mode
Definition nicegraf.h:2167
Definition nicegraf.h:2051
ngf_buffer buffer
Definition nicegraf.h:2052
size_t offset
Definition nicegraf.h:2053
ngf_image_format texel_format
Definition nicegraf.h:2055
size_t size
Definition nicegraf.h:2054
Definition nicegraf.h:1038
bool normalized
Definition nicegraf.h:1052
uint32_t size
Definition nicegraf.h:1043
uint32_t offset
Definition nicegraf.h:1041
ngf_type type
Definition nicegraf.h:1042
uint32_t location
Definition nicegraf.h:1039
uint32_t binding
Definition nicegraf.h:1040
Definition nicegraf.h:986
uint32_t stride
Definition nicegraf.h:1024
uint32_t binding
Definition nicegraf.h:987
ngf_vertex_input_rate input_rate
Definition nicegraf.h:1030
Definition nicegraf.h:1838
Definition nicegraf.h:1897
Definition nicegraf.h:1815
Definition nicegraf.h:1743
struct ngf_clear_info::@0 clear_depth_stencil
float clear_color[4]
Definition nicegraf.h:1751
float clear_depth
Definition nicegraf.h:1758
uint32_t clear_stencil
Definition nicegraf.h:1759