Skip to content

Commit

Permalink
Remove unused and deprecated bits, with placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
kainino0x committed May 11, 2020
1 parent d549969 commit a3596ef
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 40 deletions.
7 changes: 0 additions & 7 deletions src/library_webgpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@

// Must be in sync with webgpu.h.
PresentMode: {
Immediate: 0,
Mailbox: 1,
Fifo: 2,
},
SType: {
Expand Down Expand Up @@ -336,11 +334,6 @@ var LibraryWebGPU = {
'clear',
'load',
],
PresentMode: [
'immediate',
'mailbox',
'fifo',
],
PrimitiveTopology: [
'point-list',
'line-list',
Expand Down
11 changes: 1 addition & 10 deletions src/struct_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,6 @@
"type",
"hasDynamicOffset",
"multisampled",
"textureDimension",
"viewDimension",
"textureComponentType",
"storageTextureFormat"
Expand All @@ -1702,8 +1701,6 @@
"nextInChain",
"buffer",
"offset",
"rowPitch",
"imageHeight",
"bytesPerRow",
"rowsPerImage"
],
Expand Down Expand Up @@ -1822,9 +1819,7 @@
],
"WGPUShaderModuleDescriptor": [
"nextInChain",
"label",
"codeSize",
"code"
"label"
],
"WGPUShaderModuleSPIRVDescriptor": [
"chain",
Expand Down Expand Up @@ -1878,16 +1873,12 @@
"nextInChain",
"label",
"layout",
"bindingCount",
"bindings",
"entryCount",
"entries"
],
"WGPUBindGroupLayoutDescriptor": [
"nextInChain",
"label",
"bindingCount",
"bindings",
"entryCount",
"entries"
],
Expand Down
32 changes: 9 additions & 23 deletions system/include/webgpu/webgpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,6 @@ typedef enum WGPUSType {
WGPUSType_SurfaceDescriptorFromHTMLCanvasId = 0x00000004,
WGPUSType_ShaderModuleSPIRVDescriptor = 0x00000005,
WGPUSType_ShaderModuleWGSLDescriptor = 0x00000006,
WGPUSType_SamplerDescriptorDummyAnisotropicFiltering = 0x00000007,
WGPUSType_RenderPipelineDescriptorDummyExtension = 0x00000008,
WGPUSType_Force32 = 0x7FFFFFFF
} WGPUSType;

Expand Down Expand Up @@ -473,7 +471,7 @@ typedef struct WGPUBindGroupLayoutEntry {
WGPUBindingType type;
bool hasDynamicOffset;
bool multisampled;
WGPUTextureViewDimension textureDimension;
WGPUTextureViewDimension _deprecated_textureDimension;
WGPUTextureViewDimension viewDimension;
WGPUTextureComponentType textureComponentType;
WGPUTextureFormat storageTextureFormat;
Expand All @@ -489,8 +487,8 @@ typedef struct WGPUBufferCopyView {
WGPUChainedStruct const * nextInChain;
WGPUBuffer buffer;
uint64_t offset;
uint32_t rowPitch;
uint32_t imageHeight;
uint32_t _deprecated_rowPitch;
uint32_t _deprecated_imageHeight;
uint32_t bytesPerRow;
uint32_t rowsPerImage;
} WGPUBufferCopyView;
Expand Down Expand Up @@ -616,16 +614,11 @@ typedef struct WGPUSamplerDescriptor {
WGPUCompareFunction compare;
} WGPUSamplerDescriptor;

typedef struct WGPUSamplerDescriptorDummyAnisotropicFiltering {
WGPUChainedStruct chain;
float maxAnisotropy;
} WGPUSamplerDescriptorDummyAnisotropicFiltering;

typedef struct WGPUShaderModuleDescriptor {
WGPUChainedStruct const * nextInChain;
char const * label;
uint32_t codeSize;
uint32_t const * code;
uint32_t _deprecated_codeSize;
uint32_t const * _deprecated_code;
} WGPUShaderModuleDescriptor;

typedef struct WGPUShaderModuleSPIRVDescriptor {
Expand Down Expand Up @@ -706,17 +699,17 @@ typedef struct WGPUBindGroupDescriptor {
WGPUChainedStruct const * nextInChain;
char const * label;
WGPUBindGroupLayout layout;
uint32_t bindingCount;
WGPUBindGroupEntry const * bindings;
uint32_t _deprecated_bindingCount;
WGPUBindGroupEntry const * _deprecated_bindings;
uint32_t entryCount;
WGPUBindGroupEntry const * entries;
} WGPUBindGroupDescriptor;

typedef struct WGPUBindGroupLayoutDescriptor {
WGPUChainedStruct const * nextInChain;
char const * label;
uint32_t bindingCount;
WGPUBindGroupLayoutEntry const * bindings;
uint32_t _deprecated_bindingCount;
WGPUBindGroupLayoutEntry const * _deprecated_bindings;
uint32_t entryCount;
WGPUBindGroupLayoutEntry const * entries;
} WGPUBindGroupLayoutDescriptor;
Expand Down Expand Up @@ -755,11 +748,6 @@ typedef struct WGPURenderPassColorAttachmentDescriptor {
WGPUColor clearColor;
} WGPURenderPassColorAttachmentDescriptor;

typedef struct WGPURenderPipelineDescriptorDummyExtension {
WGPUChainedStruct chain;
WGPUProgrammableStageDescriptor dummyStage;
} WGPURenderPipelineDescriptorDummyExtension;

typedef struct WGPUTextureCopyView {
WGPUChainedStruct const * nextInChain;
WGPUTexture texture;
Expand Down Expand Up @@ -901,7 +889,6 @@ typedef WGPUCreateBufferMappedResult (*WGPUProcDeviceCreateBufferMapped)(WGPUDev
typedef WGPUCommandEncoder (*WGPUProcDeviceCreateCommandEncoder)(WGPUDevice device, WGPUCommandEncoderDescriptor const * descriptor);
typedef WGPUComputePipeline (*WGPUProcDeviceCreateComputePipeline)(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor);
typedef WGPUPipelineLayout (*WGPUProcDeviceCreatePipelineLayout)(WGPUDevice device, WGPUPipelineLayoutDescriptor const * descriptor);
typedef WGPUQueue (*WGPUProcDeviceCreateQueue)(WGPUDevice device);
typedef WGPURenderBundleEncoder (*WGPUProcDeviceCreateRenderBundleEncoder)(WGPUDevice device, WGPURenderBundleEncoderDescriptor const * descriptor);
typedef WGPURenderPipeline (*WGPUProcDeviceCreateRenderPipeline)(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor);
typedef WGPUSampler (*WGPUProcDeviceCreateSampler)(WGPUDevice device, WGPUSamplerDescriptor const * descriptor);
Expand Down Expand Up @@ -1083,7 +1070,6 @@ WGPU_EXPORT WGPUCreateBufferMappedResult wgpuDeviceCreateBufferMapped(WGPUDevice
WGPU_EXPORT WGPUCommandEncoder wgpuDeviceCreateCommandEncoder(WGPUDevice device, WGPUCommandEncoderDescriptor const * descriptor);
WGPU_EXPORT WGPUComputePipeline wgpuDeviceCreateComputePipeline(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor);
WGPU_EXPORT WGPUPipelineLayout wgpuDeviceCreatePipelineLayout(WGPUDevice device, WGPUPipelineLayoutDescriptor const * descriptor);
WGPU_EXPORT WGPUQueue wgpuDeviceCreateQueue(WGPUDevice device);
WGPU_EXPORT WGPURenderBundleEncoder wgpuDeviceCreateRenderBundleEncoder(WGPUDevice device, WGPURenderBundleEncoderDescriptor const * descriptor);
WGPU_EXPORT WGPURenderPipeline wgpuDeviceCreateRenderPipeline(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor);
WGPU_EXPORT WGPUSampler wgpuDeviceCreateSampler(WGPUDevice device, WGPUSamplerDescriptor const * descriptor);
Expand Down

0 comments on commit a3596ef

Please sign in to comment.