Files
armorpaint/base/sources/backends/direct3d12_gpu.h
T

77 lines
1.5 KiB
C
Raw Normal View History

2025-02-26 18:46:36 +01:00
#pragma once
#include <stdbool.h>
2025-03-04 11:05:01 +01:00
#include <stdint.h>
2025-02-26 18:46:36 +01:00
struct ID3D12Resource;
struct ID3D12DescriptorHeap;
2025-03-18 16:04:16 +01:00
struct ID3D12PipelineState;
struct ID3D12StateObject;
2025-06-19 19:55:16 +02:00
enum D3D12_RESOURCE_STATES;
2025-02-26 18:46:36 +01:00
typedef void *HANDLE;
typedef unsigned __int64 UINT64;
struct D3D12Viewport {
float TopLeftX;
float TopLeftY;
float Width;
float Height;
float MinDepth;
float MaxDepth;
};
struct D3D12Rect {
long left;
long top;
long right;
long bottom;
};
2025-06-19 19:55:16 +02:00
struct D3D12VertexBufferView {
__int64 BufferLocation;
unsigned int SizeInBytes;
unsigned int StrideInBytes;
};
2025-02-26 18:46:36 +01:00
2025-06-19 19:55:16 +02:00
struct D3D12IndexBufferView {
__int64 BufferLocation;
unsigned int SizeInBytes;
int Format;
};
2025-02-26 18:46:36 +01:00
typedef struct {
2025-06-19 19:55:16 +02:00
struct ID3D12PipelineState *pso;
} gpu_pipeline_impl_t;
2025-02-26 18:46:36 +01:00
typedef struct {
uint8_t *data;
int length;
2025-03-16 19:49:13 +01:00
} gpu_shader_impl_t;
2025-02-26 18:46:36 +01:00
typedef struct {
struct ID3D12Resource *image;
2025-07-09 21:04:01 +02:00
struct ID3D12DescriptorHeap *srv_descriptor_heap;
struct ID3D12DescriptorHeap *rtv_descriptor_heap;
2025-03-16 19:49:13 +01:00
} gpu_texture_impl_t;
2025-02-26 18:46:36 +01:00
typedef struct {
2025-06-19 19:55:16 +02:00
struct ID3D12Resource *buffer;
struct D3D12VertexBufferView vertex_buffer_view;
struct D3D12IndexBufferView index_buffer_view;
2025-02-26 18:46:36 +01:00
int last_start;
int last_count;
2025-03-18 10:39:23 +01:00
} gpu_buffer_impl_t;
2025-02-26 18:46:36 +01:00
typedef struct {
2025-08-11 10:50:13 +02:00
struct ID3D12StateObject *state;
2025-02-26 18:46:36 +01:00
struct ID3D12Resource *raygen_shader_table;
struct ID3D12Resource *miss_shader_table;
struct ID3D12Resource *hitgroup_shader_table;
2025-03-16 19:49:13 +01:00
} gpu_raytrace_pipeline_impl_t;
2025-02-26 18:46:36 +01:00
typedef struct {
struct ID3D12Resource *bottom_level_accel[16];
struct ID3D12Resource *top_level_accel;
2025-03-16 19:49:13 +01:00
} gpu_raytrace_acceleration_structure_impl_t;