Kore 3
Loading...
Searching...
No Matches
commandlist.h File Reference

The command list is used to send commands to the GPU. More...

#include <kore3/global.h>
#include <kore3/math/matrix.h>
#include "api.h"
#include "buffer.h"
#include "texture.h"
#include <kore3/math/vector.h>
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  kore_gpu_color
struct  kore_gpu_render_pass_color_attachment
struct  kore_gpu_render_pass_depth_stencil_attachment
struct  kore_gpu_render_pass_timestamp_writes
struct  kore_gpu_render_pass_parameters
struct  kore_gpu_image_copy_texture
struct  kore_gpu_image_copy_buffer
struct  kore_gpu_draw_arguments
struct  kore_gpu_draw_indexed_arguments
struct  kore_gpu_compute_arguments
struct  kore_gpu_command_list

Typedefs

typedef enum kore_gpu_load_op kore_gpu_load_op
typedef enum kore_gpu_store_op kore_gpu_store_op
typedef struct kore_gpu_color kore_gpu_color
typedef struct kore_gpu_render_pass_color_attachment kore_gpu_render_pass_color_attachment
typedef struct kore_gpu_render_pass_depth_stencil_attachment kore_gpu_render_pass_depth_stencil_attachment
typedef struct kore_gpu_render_pass_timestamp_writes kore_gpu_render_pass_timestamp_writes
typedef struct kore_gpu_render_pass_parameters kore_gpu_render_pass_parameters
typedef struct kore_gpu_image_copy_texture kore_gpu_image_copy_texture
typedef struct kore_gpu_image_copy_buffer kore_gpu_image_copy_buffer
typedef enum kore_gpu_index_format kore_gpu_index_format
typedef struct kore_gpu_draw_arguments kore_gpu_draw_arguments
typedef struct kore_gpu_draw_indexed_arguments kore_gpu_draw_indexed_arguments
typedef struct kore_gpu_compute_arguments kore_gpu_compute_arguments
typedef struct kore_gpu_command_list kore_gpu_command_list

Enumerations

enum  kore_gpu_load_op { KORE_GPU_LOAD_OP_LOAD , KORE_GPU_LOAD_OP_CLEAR }
enum  kore_gpu_store_op { KORE_GPU_STORE_OP_STORE , KORE_GPU_STORE_OP_DISCARD }
enum  kore_gpu_index_format { KORE_GPU_INDEX_FORMAT_UINT16 , KORE_GPU_INDEX_FORMAT_UINT32 }

Functions

KORE_FUNC void kore_gpu_command_list_destroy (kore_gpu_command_list *list)
 Destroys the command-list. If the command-list is currently queued, destruction is postponed until execution of the command-list ends.
KORE_FUNC void kore_gpu_command_list_set_name (kore_gpu_command_list *list, const char *name)
 Set a name for the command-list that's visible in GPU-debuggers.
KORE_FUNC void kore_gpu_command_list_push_debug_group (kore_gpu_command_list *list, const char *name)
 Groups following commands for better command-organization in GPU-debuggers.
KORE_FUNC void kore_gpu_command_list_pop_debug_group (kore_gpu_command_list *list)
 Closes the previously pushed group.
KORE_FUNC void kore_gpu_command_list_insert_debug_marker (kore_gpu_command_list *list, const char *name)
 Inserts a named debug marker that's visible in GPU-debuggers.
KORE_FUNC void kore_gpu_command_list_begin_render_pass (kore_gpu_command_list *list, const kore_gpu_render_pass_parameters *parameters)
KORE_FUNC void kore_gpu_command_list_copy_buffer_to_buffer (kore_gpu_command_list *list, kore_gpu_buffer *source, uint64_t source_offset, kore_gpu_buffer *destination, uint64_t destination_offset, uint64_t size)
KORE_FUNC void kore_gpu_command_list_copy_buffer_to_texture (kore_gpu_command_list *list, const kore_gpu_image_copy_buffer *source, const kore_gpu_image_copy_texture *destination, uint32_t width, uint32_t height, uint32_t depth_or_array_layers)
KORE_FUNC void kore_gpu_command_list_copy_texture_to_buffer (kore_gpu_command_list *list, const kore_gpu_image_copy_texture *source, const kore_gpu_image_copy_buffer *destination, uint32_t width, uint32_t height, uint32_t depth_or_array_layers)
KORE_FUNC void kore_gpu_command_list_copy_texture_to_texture (kore_gpu_command_list *list, const kore_gpu_image_copy_texture *source, const kore_gpu_image_copy_texture *destination, uint32_t width, uint32_t height, uint32_t depth_or_array_layers)
KORE_FUNC void kore_gpu_command_list_clear_buffer (kore_gpu_command_list *list, kore_gpu_buffer *buffer, size_t offset, uint64_t size)
KORE_FUNC void kore_gpu_command_list_resolve_query_set (kore_gpu_command_list *list, struct kore_gpu_query_set *query_set, uint32_t first_query, uint32_t query_count, kore_gpu_buffer *destination, uint64_t destination_offset)
KORE_FUNC void kore_gpu_command_list_set_index_buffer (kore_gpu_command_list *list, kore_gpu_buffer *buffer, kore_gpu_index_format index_format, uint64_t offset_in_bytes)
KORE_FUNC void kore_gpu_command_list_draw (kore_gpu_command_list *list, uint32_t vertex_count, uint32_t instance_count, uint32_t first_vertex, uint32_t first_instance)
KORE_FUNC void kore_gpu_command_list_draw_indexed (kore_gpu_command_list *list, uint32_t index_count, uint32_t instance_count, uint32_t first_index, int32_t base_vertex, uint32_t first_instance)
KORE_FUNC void kore_gpu_command_list_draw_indirect (kore_gpu_command_list *list, kore_gpu_buffer *indirect_buffer, uint64_t indirect_offset, uint32_t max_draw_count, kore_gpu_buffer *count_buffer, uint64_t count_offset)
KORE_FUNC void kore_gpu_command_list_draw_indexed_indirect (kore_gpu_command_list *list, kore_gpu_buffer *indirect_buffer, uint64_t indirect_offset, uint32_t max_draw_count, kore_gpu_buffer *count_buffer, uint64_t count_offset)
KORE_FUNC void kore_gpu_command_list_set_viewport (kore_gpu_command_list *list, float x, float y, float width, float height, float min_depth, float max_depth)
KORE_FUNC void kore_gpu_command_list_set_scissor_rect (kore_gpu_command_list *list, uint32_t x, uint32_t y, uint32_t width, uint32_t height)
KORE_FUNC void kore_gpu_command_list_set_blend_constant (kore_gpu_command_list *list, kore_gpu_color color)
KORE_FUNC void kore_gpu_command_list_set_stencil_reference (kore_gpu_command_list *list, uint32_t reference)
KORE_FUNC void kore_gpu_command_list_begin_occlusion_query (kore_gpu_command_list *list, uint32_t query_index)
KORE_FUNC void kore_gpu_command_list_end_occlusion_query (kore_gpu_command_list *list)
KORE_FUNC void kore_gpu_command_list_end_render_pass (kore_gpu_command_list *list)
KORE_FUNC void kore_gpu_command_list_compute (kore_gpu_command_list *list, uint32_t workgroup_count_x, uint32_t workgroup_count_y, uint32_t workgroup_count_z)
KORE_FUNC void kore_gpu_command_list_compute_indirect (kore_gpu_command_list *list, kore_gpu_buffer *indirect_buffer, uint64_t indirect_offset)
KORE_FUNC void kore_gpu_command_list_prepare_raytracing_volume (kore_gpu_command_list *list, struct kore_gpu_raytracing_volume *volume)
KORE_FUNC void kore_gpu_command_list_prepare_raytracing_hierarchy (kore_gpu_command_list *list, struct kore_gpu_raytracing_hierarchy *hierarchy)
KORE_FUNC void kore_gpu_command_list_update_raytracing_hierarchy (kore_gpu_command_list *list, kore_matrix4x4 *volume_transforms, uint32_t volumes_count, struct kore_gpu_raytracing_hierarchy *hierarchy)
KORE_FUNC void kore_gpu_command_list_trace_rays (kore_gpu_command_list *list, uint32_t width, uint32_t height, uint32_t depth)
KORE_FUNC void kore_gpu_command_list_present (kore_gpu_command_list *list)

Detailed Description

The command list is used to send commands to the GPU.

Function Documentation

◆ kore_gpu_command_list_destroy()

KORE_FUNC void kore_gpu_command_list_destroy ( kore_gpu_command_list * list)

Destroys the command-list. If the command-list is currently queued, destruction is postponed until execution of the command-list ends.

Parameters
listThe list to destroy

◆ kore_gpu_command_list_insert_debug_marker()

KORE_FUNC void kore_gpu_command_list_insert_debug_marker ( kore_gpu_command_list * list,
const char * name )

Inserts a named debug marker that's visible in GPU-debuggers.

Parameters
listThe list on which the marker is inserted
nameThe name for the marker

◆ kore_gpu_command_list_pop_debug_group()

KORE_FUNC void kore_gpu_command_list_pop_debug_group ( kore_gpu_command_list * list)

Closes the previously pushed group.

Parameters
listThe list to ungroup

◆ kore_gpu_command_list_push_debug_group()

KORE_FUNC void kore_gpu_command_list_push_debug_group ( kore_gpu_command_list * list,
const char * name )

Groups following commands for better command-organization in GPU-debuggers.

Parameters
listThe list to group
nameThe name for the group

◆ kore_gpu_command_list_set_name()

KORE_FUNC void kore_gpu_command_list_set_name ( kore_gpu_command_list * list,
const char * name )

Set a name for the command-list that's visible in GPU-debuggers.

Parameters
listThe list to name
nameThe name to set