2025-02-26 18:46:36 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <iron_gpu.h>
|
|
|
|
|
#include <iron_math.h>
|
|
|
|
|
#include <webgpu/webgpu.h>
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
WGPUBuffer buffer;
|
|
|
|
|
int count;
|
|
|
|
|
int stride;
|
2025-03-18 10:39:23 +01:00
|
|
|
} gpu_buffer_impl_t;
|
2025-02-26 18:46:36 +01:00
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
WGPUTexture texture;
|
2025-03-16 19:49:13 +01:00
|
|
|
} gpu_texture_impl_t;
|
2025-02-26 18:46:36 +01:00
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
WGPURenderPipeline pipeline;
|
2025-03-16 19:49:13 +01:00
|
|
|
} gpu_pipeline_impl_t;
|
2025-02-26 18:46:36 +01:00
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
int vertexOffset;
|
|
|
|
|
int fragmentOffset;
|
2025-03-16 19:49:13 +01:00
|
|
|
} gpu_constant_location_impl_t;
|
2025-02-26 18:46:36 +01:00
|
|
|
|
2025-03-10 20:38:53 +01:00
|
|
|
typedef struct iron_gpu_sampler_impl {
|
2025-02-26 18:46:36 +01:00
|
|
|
int a;
|
2025-03-16 19:49:13 +01:00
|
|
|
} gpu_sampler_impl_t;
|
2025-02-26 18:46:36 +01:00
|
|
|
|
|
|
|
|
struct WGPUShaderModuleImpl;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
WGPUShaderModule module;
|
2025-03-16 19:49:13 +01:00
|
|
|
} gpu_shader_impl_t;
|
2025-02-26 18:46:36 +01:00
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
WGPUCommandEncoder encoder;
|
|
|
|
|
WGPURenderPassEncoder pass;
|
|
|
|
|
int indexCount;
|
2025-03-16 19:49:13 +01:00
|
|
|
} gpu_command_list_impl_t;
|