2018-09-24 05:05:12 +00:00
|
|
|
#ifdef WGPU_REMOTE
|
|
|
|
typedef uint32_t WGPUId;
|
|
|
|
#else
|
|
|
|
typedef void *WGPUId;
|
|
|
|
#endif
|
|
|
|
|
2018-09-28 15:35:31 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
2018-09-26 18:37:24 +00:00
|
|
|
typedef enum {
|
|
|
|
WGPUBindingType_UniformBuffer = 0,
|
|
|
|
WGPUBindingType_Sampler = 1,
|
|
|
|
WGPUBindingType_SampledTexture = 2,
|
|
|
|
WGPUBindingType_StorageBuffer = 3,
|
|
|
|
} WGPUBindingType;
|
|
|
|
|
2018-09-27 13:18:22 +00:00
|
|
|
typedef enum {
|
|
|
|
WGPUBlendFactor_Zero = 0,
|
|
|
|
WGPUBlendFactor_One = 1,
|
|
|
|
WGPUBlendFactor_SrcColor = 2,
|
|
|
|
WGPUBlendFactor_OneMinusSrcColor = 3,
|
|
|
|
WGPUBlendFactor_SrcAlpha = 4,
|
|
|
|
WGPUBlendFactor_OneMinusSrcAlpha = 5,
|
|
|
|
WGPUBlendFactor_DstColor = 6,
|
|
|
|
WGPUBlendFactor_OneMinusDstColor = 7,
|
|
|
|
WGPUBlendFactor_DstAlpha = 8,
|
|
|
|
WGPUBlendFactor_OneMinusDstAlpha = 9,
|
|
|
|
WGPUBlendFactor_SrcAlphaSaturated = 10,
|
|
|
|
WGPUBlendFactor_BlendColor = 11,
|
|
|
|
WGPUBlendFactor_OneMinusBlendColor = 12,
|
|
|
|
} WGPUBlendFactor;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
WGPUBlendOperation_Add = 0,
|
|
|
|
WGPUBlendOperation_Subtract = 1,
|
|
|
|
WGPUBlendOperation_ReverseSubtract = 2,
|
|
|
|
WGPUBlendOperation_Min = 3,
|
|
|
|
WGPUBlendOperation_Max = 4,
|
|
|
|
} WGPUBlendOperation;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
WGPUCompareFunction_Never = 0,
|
|
|
|
WGPUCompareFunction_Less = 1,
|
|
|
|
WGPUCompareFunction_Equal = 2,
|
|
|
|
WGPUCompareFunction_LessEqual = 3,
|
|
|
|
WGPUCompareFunction_Greater = 4,
|
|
|
|
WGPUCompareFunction_NotEqual = 5,
|
|
|
|
WGPUCompareFunction_GreaterEqual = 6,
|
|
|
|
WGPUCompareFunction_Always = 7,
|
|
|
|
} WGPUCompareFunction;
|
|
|
|
|
2018-09-23 19:25:05 +00:00
|
|
|
typedef enum {
|
|
|
|
WGPUPowerPreference_Default = 0,
|
|
|
|
WGPUPowerPreference_LowPower = 1,
|
|
|
|
WGPUPowerPreference_HighPerformance = 2,
|
|
|
|
} WGPUPowerPreference;
|
|
|
|
|
2018-09-25 05:08:54 +00:00
|
|
|
typedef enum {
|
|
|
|
WGPUPrimitiveTopology_PointList = 0,
|
|
|
|
WGPUPrimitiveTopology_LineList = 1,
|
|
|
|
WGPUPrimitiveTopology_LineStrip = 2,
|
|
|
|
WGPUPrimitiveTopology_TriangleList = 3,
|
|
|
|
WGPUPrimitiveTopology_TriangleStrip = 4,
|
|
|
|
} WGPUPrimitiveTopology;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
WGPUShaderStage_Vertex = 0,
|
|
|
|
WGPUShaderStage_Fragment = 1,
|
|
|
|
WGPUShaderStage_Compute = 2,
|
|
|
|
} WGPUShaderStage;
|
|
|
|
|
2018-09-27 13:18:22 +00:00
|
|
|
typedef enum {
|
|
|
|
WGPUStencilOperation_Keep = 0,
|
|
|
|
WGPUStencilOperation_Zero = 1,
|
|
|
|
WGPUStencilOperation_Replace = 2,
|
|
|
|
WGPUStencilOperation_Invert = 3,
|
|
|
|
WGPUStencilOperation_IncrementClamp = 4,
|
|
|
|
WGPUStencilOperation_DecrementClamp = 5,
|
|
|
|
WGPUStencilOperation_IncrementWrap = 6,
|
|
|
|
WGPUStencilOperation_DecrementWrap = 7,
|
|
|
|
} WGPUStencilOperation;
|
|
|
|
|
2018-10-07 04:37:36 +00:00
|
|
|
typedef enum {
|
|
|
|
WGPUTextureDimension_D1,
|
|
|
|
WGPUTextureDimension_D2,
|
|
|
|
WGPUTextureDimension_D3,
|
|
|
|
} WGPUTextureDimension;
|
|
|
|
|
2018-09-27 13:18:22 +00:00
|
|
|
typedef enum {
|
|
|
|
WGPUTextureFormat_R8g8b8a8Unorm = 0,
|
|
|
|
WGPUTextureFormat_R8g8b8a8Uint = 1,
|
|
|
|
WGPUTextureFormat_B8g8r8a8Unorm = 2,
|
|
|
|
WGPUTextureFormat_D32FloatS8Uint = 3,
|
|
|
|
} WGPUTextureFormat;
|
|
|
|
|
2018-10-31 02:02:07 +00:00
|
|
|
typedef enum {
|
|
|
|
WGPUTextureViewDimension_D1,
|
|
|
|
WGPUTextureViewDimension_D2,
|
|
|
|
WGPUTextureViewDimension_D2Array,
|
|
|
|
WGPUTextureViewDimension_Cube,
|
|
|
|
WGPUTextureViewDimension_CubeArray,
|
|
|
|
WGPUTextureViewDimension_D3,
|
|
|
|
} WGPUTextureViewDimension;
|
|
|
|
|
|
|
|
typedef struct WGPURenderPassDescriptor_TextureViewId WGPURenderPassDescriptor_TextureViewId;
|
2018-10-03 11:29:18 +00:00
|
|
|
|
2018-09-23 19:25:05 +00:00
|
|
|
typedef WGPUId WGPUDeviceId;
|
|
|
|
|
|
|
|
typedef WGPUId WGPUAdapterId;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
bool anisotropic_filtering;
|
|
|
|
} WGPUExtensions;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
WGPUExtensions extensions;
|
|
|
|
} WGPUDeviceDescriptor;
|
|
|
|
|
|
|
|
typedef WGPUId WGPUComputePassId;
|
|
|
|
|
|
|
|
typedef WGPUId WGPUCommandBufferId;
|
|
|
|
|
2018-10-03 11:29:18 +00:00
|
|
|
typedef WGPUId WGPURenderPassId;
|
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
typedef WGPUId WGPUBindGroupId;
|
|
|
|
|
|
|
|
typedef WGPUId WGPUComputePipelineId;
|
|
|
|
|
2018-09-23 19:25:05 +00:00
|
|
|
typedef WGPUId WGPUInstanceId;
|
|
|
|
|
2018-09-26 18:37:24 +00:00
|
|
|
typedef WGPUId WGPUBindGroupLayoutId;
|
|
|
|
|
|
|
|
typedef uint32_t WGPUShaderStageFlags;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint32_t binding;
|
|
|
|
WGPUShaderStageFlags visibility;
|
|
|
|
WGPUBindingType ty;
|
|
|
|
} WGPUBindGroupLayoutBinding;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
const WGPUBindGroupLayoutBinding *bindings;
|
|
|
|
uintptr_t bindings_length;
|
|
|
|
} WGPUBindGroupLayoutDescriptor;
|
2018-09-27 23:04:17 +00:00
|
|
|
|
2018-09-27 13:18:22 +00:00
|
|
|
typedef WGPUId WGPUBlendStateId;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
WGPUBlendFactor src_factor;
|
|
|
|
WGPUBlendFactor dst_factor;
|
|
|
|
WGPUBlendOperation operation;
|
|
|
|
} WGPUBlendDescriptor;
|
|
|
|
|
|
|
|
typedef uint32_t WGPUColorWriteFlags;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
bool blend_enabled;
|
|
|
|
WGPUBlendDescriptor alpha;
|
|
|
|
WGPUBlendDescriptor color;
|
|
|
|
WGPUColorWriteFlags write_mask;
|
|
|
|
} WGPUBlendStateDescriptor;
|
|
|
|
|
2018-09-28 06:31:09 +00:00
|
|
|
typedef struct {
|
|
|
|
|
|
|
|
} WGPUCommandBufferDescriptor;
|
|
|
|
|
2018-09-27 13:18:22 +00:00
|
|
|
typedef WGPUId WGPUDepthStencilStateId;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
WGPUCompareFunction compare;
|
|
|
|
WGPUStencilOperation stencil_fail_op;
|
|
|
|
WGPUStencilOperation depth_fail_op;
|
|
|
|
WGPUStencilOperation pass_op;
|
|
|
|
} WGPUStencilStateFaceDescriptor;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
bool depth_write_enabled;
|
|
|
|
WGPUCompareFunction depth_compare;
|
|
|
|
WGPUStencilStateFaceDescriptor front;
|
|
|
|
WGPUStencilStateFaceDescriptor back;
|
|
|
|
uint32_t stencil_read_mask;
|
|
|
|
uint32_t stencil_write_mask;
|
|
|
|
} WGPUDepthStencilStateDescriptor;
|
|
|
|
|
2018-09-25 05:08:54 +00:00
|
|
|
typedef WGPUId WGPUPipelineLayoutId;
|
|
|
|
|
2018-09-26 18:37:24 +00:00
|
|
|
typedef struct {
|
|
|
|
const WGPUBindGroupLayoutId *bind_group_layouts;
|
|
|
|
uintptr_t bind_group_layouts_length;
|
|
|
|
} WGPUPipelineLayoutDescriptor;
|
|
|
|
|
|
|
|
typedef WGPUId WGPURenderPipelineId;
|
|
|
|
|
2018-09-23 19:25:05 +00:00
|
|
|
typedef WGPUId WGPUShaderModuleId;
|
|
|
|
|
2018-09-25 05:08:54 +00:00
|
|
|
typedef struct {
|
|
|
|
WGPUShaderModuleId module;
|
|
|
|
WGPUShaderStage stage;
|
|
|
|
const char *entry_point;
|
|
|
|
} WGPUPipelineStageDescriptor;
|
|
|
|
|
2018-10-31 02:02:07 +00:00
|
|
|
typedef struct {
|
|
|
|
WGPUTextureFormat format;
|
|
|
|
uint32_t samples;
|
|
|
|
} WGPUAttachment;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
const WGPUAttachment *color_attachments;
|
|
|
|
uintptr_t color_attachments_length;
|
|
|
|
const WGPUAttachment *depth_stencil_attachment;
|
|
|
|
} WGPUAttachmentsState;
|
|
|
|
|
2018-09-25 05:08:54 +00:00
|
|
|
typedef struct {
|
|
|
|
WGPUPipelineLayoutId layout;
|
|
|
|
const WGPUPipelineStageDescriptor *stages;
|
|
|
|
uintptr_t stages_length;
|
|
|
|
WGPUPrimitiveTopology primitive_topology;
|
2018-10-31 02:02:07 +00:00
|
|
|
WGPUAttachmentsState attachments_state;
|
2018-10-26 02:29:27 +00:00
|
|
|
const WGPUBlendStateId *blend_states;
|
|
|
|
uintptr_t blend_states_length;
|
2018-09-25 05:08:54 +00:00
|
|
|
WGPUDepthStencilStateId depth_stencil_state;
|
|
|
|
} WGPURenderPipelineDescriptor;
|
|
|
|
|
2018-09-24 01:29:44 +00:00
|
|
|
typedef struct {
|
|
|
|
const uint8_t *bytes;
|
|
|
|
uintptr_t length;
|
|
|
|
} WGPUByteArray;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
WGPUByteArray code;
|
|
|
|
} WGPUShaderModuleDescriptor;
|
|
|
|
|
2018-10-07 04:37:36 +00:00
|
|
|
typedef WGPUId WGPUTextureId;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint32_t width;
|
|
|
|
uint32_t height;
|
|
|
|
uint32_t depth;
|
|
|
|
} WGPUExtent3d;
|
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
typedef uint32_t WGPUTextureUsageFlags;
|
|
|
|
|
2018-10-07 04:37:36 +00:00
|
|
|
typedef struct {
|
|
|
|
WGPUExtent3d size;
|
|
|
|
uint32_t array_size;
|
|
|
|
WGPUTextureDimension dimension;
|
|
|
|
WGPUTextureFormat format;
|
|
|
|
WGPUTextureUsageFlags usage;
|
|
|
|
} WGPUTextureDescriptor;
|
|
|
|
|
2018-09-27 23:04:17 +00:00
|
|
|
typedef WGPUId WGPUQueueId;
|
|
|
|
|
2018-09-23 19:25:05 +00:00
|
|
|
typedef struct {
|
|
|
|
WGPUPowerPreference power_preference;
|
|
|
|
} WGPUAdapterDescriptor;
|
|
|
|
|
2018-10-31 02:02:07 +00:00
|
|
|
typedef WGPUId WGPUTextureViewId;
|
|
|
|
|
|
|
|
typedef uint32_t WGPUTextureAspectFlags;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
WGPUTextureFormat format;
|
|
|
|
WGPUTextureViewDimension dimension;
|
|
|
|
WGPUTextureAspectFlags aspect;
|
|
|
|
uint32_t base_mip_level;
|
|
|
|
uint32_t level_count;
|
|
|
|
uint32_t base_array_layer;
|
|
|
|
uint32_t array_count;
|
|
|
|
} WGPUTextureViewDescriptor;
|
|
|
|
|
2018-12-04 04:21:19 +00:00
|
|
|
#define WGPUBufferUsageFlags_INDEX 16
|
|
|
|
|
|
|
|
#define WGPUBufferUsageFlags_MAP_READ 1
|
|
|
|
|
|
|
|
#define WGPUBufferUsageFlags_MAP_WRITE 2
|
|
|
|
|
|
|
|
#define WGPUBufferUsageFlags_NONE 0
|
|
|
|
|
|
|
|
#define WGPUBufferUsageFlags_STORAGE 128
|
|
|
|
|
|
|
|
#define WGPUBufferUsageFlags_TRANSFER_DST 8
|
|
|
|
|
|
|
|
#define WGPUBufferUsageFlags_TRANSFER_SRC 4
|
|
|
|
|
|
|
|
#define WGPUBufferUsageFlags_UNIFORM 64
|
|
|
|
|
|
|
|
#define WGPUBufferUsageFlags_VERTEX 32
|
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUColorWriteFlags_ALL 15
|
2018-10-31 02:02:07 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUColorWriteFlags_ALPHA 8
|
2018-10-31 02:02:07 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUColorWriteFlags_BLUE 4
|
2018-10-31 02:02:07 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUColorWriteFlags_COLOR 7
|
2018-10-07 04:37:36 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUColorWriteFlags_GREEN 2
|
2018-10-07 04:37:36 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUColorWriteFlags_RED 1
|
2018-10-22 14:46:13 +00:00
|
|
|
|
2018-11-11 19:32:19 +00:00
|
|
|
#define WGPUColor_BLACK (WGPUColor){ .r = 0, .g = 0, .b = 0, .a = 1 }
|
2018-10-22 14:46:13 +00:00
|
|
|
|
2018-11-11 19:32:19 +00:00
|
|
|
#define WGPUColor_BLUE (WGPUColor){ .r = 0, .g = 0, .b = 1, .a = 1 }
|
2018-10-22 14:46:13 +00:00
|
|
|
|
2018-11-11 19:32:19 +00:00
|
|
|
#define WGPUColor_GREEN (WGPUColor){ .r = 0, .g = 1, .b = 0, .a = 1 }
|
2018-10-22 14:46:13 +00:00
|
|
|
|
2018-11-11 19:32:19 +00:00
|
|
|
#define WGPUColor_RED (WGPUColor){ .r = 1, .g = 0, .b = 0, .a = 1 }
|
2018-10-07 04:37:36 +00:00
|
|
|
|
2018-11-11 19:32:19 +00:00
|
|
|
#define WGPUColor_TRANSPARENT (WGPUColor){ .r = 0, .g = 0, .b = 0, .a = 0 }
|
2018-10-22 14:46:13 +00:00
|
|
|
|
2018-11-11 19:32:19 +00:00
|
|
|
#define WGPUColor_WHITE (WGPUColor){ .r = 1, .g = 1, .b = 1, .a = 1 }
|
2018-10-22 14:46:13 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUShaderStageFlags_COMPUTE 4
|
2018-10-22 14:46:13 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUShaderStageFlags_FRAGMENT 2
|
2018-10-22 14:46:13 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUShaderStageFlags_VERTEX 1
|
2018-10-07 04:37:36 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUTextureAspectFlags_COLOR 1
|
2018-10-22 14:46:13 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUTextureAspectFlags_DEPTH 2
|
2018-10-22 14:46:13 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUTextureAspectFlags_STENCIL 4
|
2018-10-31 02:02:07 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUTextureUsageFlags_NONE 0
|
2018-10-31 02:02:07 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUTextureUsageFlags_OUTPUT_ATTACHMENT 16
|
2018-10-31 02:02:07 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUTextureUsageFlags_PRESENT 32
|
2018-10-31 02:02:07 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUTextureUsageFlags_SAMPLED 4
|
2018-10-31 02:02:07 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUTextureUsageFlags_STORAGE 8
|
2018-10-31 02:02:07 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUTextureUsageFlags_TRANSFER_DST 2
|
2018-10-31 02:02:07 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
#define WGPUTextureUsageFlags_TRANSFER_SRC 1
|
2018-10-07 04:37:36 +00:00
|
|
|
|
2018-10-12 05:34:00 +00:00
|
|
|
WGPUDeviceId wgpu_adapter_create_device(WGPUAdapterId adapter_id,
|
|
|
|
const WGPUDeviceDescriptor *_desc);
|
2018-09-23 19:25:05 +00:00
|
|
|
|
2018-10-03 11:29:18 +00:00
|
|
|
WGPUComputePassId wgpu_command_buffer_begin_compute_pass(WGPUCommandBufferId command_buffer_id);
|
|
|
|
|
|
|
|
WGPURenderPassId wgpu_command_buffer_begin_render_pass(WGPUCommandBufferId command_buffer_id,
|
2018-10-31 02:02:07 +00:00
|
|
|
WGPURenderPassDescriptor_TextureViewId desc);
|
2018-09-23 19:25:05 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
void wgpu_compute_pass_dispatch(WGPUComputePassId pass_id, uint32_t x, uint32_t y, uint32_t z);
|
|
|
|
|
2018-10-03 11:29:18 +00:00
|
|
|
WGPUCommandBufferId wgpu_compute_pass_end_pass(WGPUComputePassId pass_id);
|
2018-09-23 19:25:05 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
void wgpu_compute_pass_set_bind_group(WGPUComputePassId pass_id,
|
|
|
|
uint32_t index,
|
|
|
|
WGPUBindGroupId bind_group_id);
|
|
|
|
|
|
|
|
void wgpu_compute_pass_set_pipeline(WGPUComputePassId pass_id, WGPUComputePipelineId pipeline_id);
|
|
|
|
|
2018-09-23 19:25:05 +00:00
|
|
|
WGPUInstanceId wgpu_create_instance(void);
|
|
|
|
|
2018-09-26 18:37:24 +00:00
|
|
|
WGPUBindGroupLayoutId wgpu_device_create_bind_group_layout(WGPUDeviceId device_id,
|
2018-10-12 05:34:00 +00:00
|
|
|
const WGPUBindGroupLayoutDescriptor *desc);
|
2018-09-26 18:37:24 +00:00
|
|
|
|
2018-09-27 13:18:22 +00:00
|
|
|
WGPUBlendStateId wgpu_device_create_blend_state(WGPUDeviceId _device_id,
|
2018-10-12 05:34:00 +00:00
|
|
|
const WGPUBlendStateDescriptor *desc);
|
2018-09-27 13:18:22 +00:00
|
|
|
|
2018-09-28 06:31:09 +00:00
|
|
|
WGPUCommandBufferId wgpu_device_create_command_buffer(WGPUDeviceId device_id,
|
2018-10-12 05:34:00 +00:00
|
|
|
const WGPUCommandBufferDescriptor *_desc);
|
2018-09-28 06:31:09 +00:00
|
|
|
|
2018-10-03 11:29:18 +00:00
|
|
|
WGPUDepthStencilStateId wgpu_device_create_depth_stencil_state(WGPUDeviceId _device_id,
|
2018-10-12 05:34:00 +00:00
|
|
|
const WGPUDepthStencilStateDescriptor *desc);
|
2018-09-27 13:18:22 +00:00
|
|
|
|
2018-09-26 18:37:24 +00:00
|
|
|
WGPUPipelineLayoutId wgpu_device_create_pipeline_layout(WGPUDeviceId device_id,
|
2018-10-12 05:34:00 +00:00
|
|
|
const WGPUPipelineLayoutDescriptor *desc);
|
2018-09-27 23:04:17 +00:00
|
|
|
|
2018-09-25 05:08:54 +00:00
|
|
|
WGPURenderPipelineId wgpu_device_create_render_pipeline(WGPUDeviceId device_id,
|
2018-10-12 05:34:00 +00:00
|
|
|
const WGPURenderPipelineDescriptor *desc);
|
2018-09-25 05:08:54 +00:00
|
|
|
|
2018-09-23 19:25:05 +00:00
|
|
|
WGPUShaderModuleId wgpu_device_create_shader_module(WGPUDeviceId device_id,
|
2018-10-12 05:34:00 +00:00
|
|
|
const WGPUShaderModuleDescriptor *desc);
|
2018-09-23 19:25:05 +00:00
|
|
|
|
2018-10-12 05:34:00 +00:00
|
|
|
WGPUTextureId wgpu_device_create_texture(WGPUDeviceId device_id, const WGPUTextureDescriptor *desc);
|
2018-10-07 04:37:36 +00:00
|
|
|
|
2018-09-27 23:04:17 +00:00
|
|
|
WGPUQueueId wgpu_device_get_queue(WGPUDeviceId device_id);
|
|
|
|
|
2018-10-12 05:34:00 +00:00
|
|
|
WGPUAdapterId wgpu_instance_get_adapter(WGPUInstanceId instance_id,
|
|
|
|
const WGPUAdapterDescriptor *desc);
|
2018-09-27 23:04:17 +00:00
|
|
|
|
|
|
|
void wgpu_queue_submit(WGPUQueueId queue_id,
|
|
|
|
const WGPUCommandBufferId *command_buffer_ptr,
|
|
|
|
uintptr_t command_buffer_count);
|
2018-10-03 11:29:18 +00:00
|
|
|
|
|
|
|
WGPUCommandBufferId wgpu_render_pass_end_pass(WGPURenderPassId pass_id);
|
2018-10-31 02:02:07 +00:00
|
|
|
|
|
|
|
WGPUTextureViewId wgpu_texture_create_default_texture_view(WGPUTextureId texture_id);
|
|
|
|
|
|
|
|
WGPUTextureViewId wgpu_texture_create_texture_view(WGPUTextureId texture_id,
|
|
|
|
const WGPUTextureViewDescriptor *desc);
|
2018-11-02 20:39:00 +00:00
|
|
|
|
2018-12-01 23:01:54 +00:00
|
|
|
void wgpu_texture_destroy(WGPUTextureId texture_id);
|
2018-11-02 20:39:00 +00:00
|
|
|
|
|
|
|
void wgpu_texture_view_destroy(WGPUTextureViewId _texture_view_id);
|