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

The device is the entry point for doing anything with the GPU. More...

#include <kore3/global.h>
#include <kore3/math/matrix.h>
#include "api.h"
#include "buffer.h"
#include "commandlist.h"
#include "fence.h"
#include "raytracing.h"
#include "sampler.h"
#include "textureformat.h"

Go to the source code of this file.

Data Structures

struct  kore_gpu_device_wishlist
struct  kore_gpu_device
struct  kore_gpu_buffer_parameters
struct  kore_gpu_texture_parameters
struct  kore_gpu_sampler_parameters
struct  kore_gpu_query_set
struct  kore_gpu_query_set_parameters

Macros

#define KORE_GPU_MAX_FRAMEBUFFERS   3

Typedefs

typedef struct kore_gpu_device_wishlist kore_gpu_device_wishlist
typedef struct kore_gpu_device kore_gpu_device
typedef enum kore_gpu_buffer_usage kore_gpu_buffer_usage
typedef struct kore_gpu_buffer_parameters kore_gpu_buffer_parameters
typedef enum kore_gpu_texture_dimension kore_gpu_texture_dimension
typedef enum kore_gpu_texture_usage kore_gpu_texture_usage
typedef struct kore_gpu_texture_parameters kore_gpu_texture_parameters
typedef enum kore_gpu_address_mode kore_gpu_address_mode
typedef enum kore_gpu_filter_mode kore_gpu_filter_mode
typedef enum kore_gpu_mipmap_filter_mode kore_gpu_mipmap_filter_mode
typedef enum kore_gpu_compare_function kore_gpu_compare_function
typedef struct kore_gpu_sampler_parameters kore_gpu_sampler_parameters
typedef enum kore_gpu_command_list_type kore_gpu_command_list_type
typedef struct kore_gpu_query_set kore_gpu_query_set
typedef enum kore_gpu_query_type kore_gpu_query_type
typedef struct kore_gpu_query_set_parameters kore_gpu_query_set_parameters

Enumerations

enum  kore_gpu_buffer_usage {
  KORE_GPU_BUFFER_USAGE_CPU_READ = 0x0001 , KORE_GPU_BUFFER_USAGE_CPU_WRITE = 0x0002 , KORE_GPU_BUFFER_USAGE_COPY_SRC = 0x0004 , KORE_GPU_BUFFER_USAGE_COPY_DST = 0x0008 ,
  KORE_GPU_BUFFER_USAGE_INDEX = 0x0010 , KORE_GPU_BUFFER_USAGE_INDIRECT = 0x0020 , KORE_GPU_BUFFER_USAGE_QUERY_RESOLVE = 0x0040 , KORE_GPU_BUFFER_USAGE_RAYTRACING_VOLUME = 0x0080
}
enum  kore_gpu_texture_dimension { KORE_GPU_TEXTURE_DIMENSION_1D , KORE_GPU_TEXTURE_DIMENSION_2D , KORE_GPU_TEXTURE_DIMENSION_3D }
enum  kore_gpu_texture_usage { KORE_GPU_TEXTURE_USAGE_COPY_SRC = 0x0001 , KORE_GPU_TEXTURE_USAGE_COPY_DST = 0x0002 , KORE_GPU_TEXTURE_USAGE_RENDER_ATTACHMENT = 0x0004 }
enum  kore_gpu_address_mode { KORE_GPU_ADDRESS_MODE_CLAMP_TO_EDGE , KORE_GPU_ADDRESS_MODE_REPEAT , KORE_GPU_ADDRESS_MODE_MIRROR_REPEAT }
enum  kore_gpu_filter_mode { KORE_GPU_FILTER_MODE_NEAREST , KORE_GPU_FILTER_MODE_LINEAR }
enum  kore_gpu_mipmap_filter_mode { KORE_GPU_MIPMAP_FILTER_MODE_NEAREST , KORE_GPU_MIPMAP_FILTER_MODE_LINEAR }
enum  kore_gpu_compare_function {
  KORE_GPU_COMPARE_FUNCTION_UNDEFINED , KORE_GPU_COMPARE_FUNCTION_NEVER , KORE_GPU_COMPARE_FUNCTION_LESS , KORE_GPU_COMPARE_FUNCTION_EQUAL ,
  KORE_GPU_COMPARE_FUNCTION_LESS_EQUAL , KORE_GPU_COMPARE_FUNCTION_GREATER , KORE_GPU_COMPARE_FUNCTION_NOT_EQUAL , KORE_GPU_COMPARE_FUNCTION_GREATER_EQUAL ,
  KORE_GPU_COMPARE_FUNCTION_ALWAYS
}
enum  kore_gpu_command_list_type { KORE_GPU_COMMAND_LIST_TYPE_GRAPHICS , KORE_GPU_COMMAND_LIST_TYPE_COMPUTE , KORE_GPU_COMMAND_LIST_TYPE_COPY }
enum  kore_gpu_query_type { KORE_GPU_QUERY_TYPE_OCCLUSION , KORE_GPU_QUERY_TYPE_TIMESTAMP }

Functions

KORE_FUNC void kore_gpu_device_create (kore_gpu_device *device, const kore_gpu_device_wishlist *wishlist)
KORE_FUNC void kore_gpu_device_destroy (kore_gpu_device *device)
KORE_FUNC void kore_gpu_device_set_name (kore_gpu_device *device, const char *name)
KORE_FUNC void kore_gpu_device_create_buffer (kore_gpu_device *device, const kore_gpu_buffer_parameters *parameters, kore_gpu_buffer *buffer)
KORE_FUNC void kore_gpu_device_create_texture (kore_gpu_device *device, const kore_gpu_texture_parameters *parameters, kore_gpu_texture *texture)
KORE_FUNC kore_gpu_texture * kore_gpu_device_get_framebuffer (kore_gpu_device *device)
KORE_FUNC kore_gpu_texture_format kore_gpu_device_framebuffer_format (kore_gpu_device *device)
KORE_FUNC void kore_gpu_device_create_sampler (kore_gpu_device *device, const kore_gpu_sampler_parameters *parameters, kore_gpu_sampler *sampler)
KORE_FUNC void kore_gpu_device_create_command_list (kore_gpu_device *device, kore_gpu_command_list_type type, kore_gpu_command_list *list)
KORE_FUNC void kore_gpu_device_create_query_set (kore_gpu_device *device, const kore_gpu_query_set_parameters *parameters, kore_gpu_query_set *query_set)
KORE_FUNC void kore_gpu_device_create_fence (kore_gpu_device *device, kore_gpu_fence *fence)
KORE_FUNC void kore_gpu_device_execute_command_list (kore_gpu_device *device, kore_gpu_command_list *list)
KORE_FUNC void kore_gpu_device_wait_until_idle (kore_gpu_device *device)
KORE_FUNC void kore_gpu_device_create_raytracing_volume (kore_gpu_device *device, kore_gpu_buffer *vertex_buffer, uint64_t vertex_count, kore_gpu_buffer *index_buffer, uint32_t index_count, kore_gpu_raytracing_volume *volume)
KORE_FUNC void kore_gpu_device_create_raytracing_hierarchy (kore_gpu_device *device, kore_gpu_raytracing_volume **volumes, kore_matrix4x4 *volume_transforms, uint32_t volumes_count, kore_gpu_raytracing_hierarchy *hierarchy)
KORE_FUNC uint32_t kore_gpu_device_align_texture_row_bytes (kore_gpu_device *device, uint32_t row_bytes)
KORE_FUNC void kore_gpu_device_signal (kore_gpu_device *device, kore_gpu_command_list_type list_type, kore_gpu_fence *fence, uint64_t value)
KORE_FUNC void kore_gpu_device_wait (kore_gpu_device *device, kore_gpu_command_list_type list_type, kore_gpu_fence *fence, uint64_t value)

Detailed Description

The device is the entry point for doing anything with the GPU.