gpu: minor changes required again as part of Dawn update #977

Closed
opened 2023-08-10 18:00:33 +00:00 by emidoots · 1 comment
emidoots commented 2023-08-10 18:00:33 +00:00 (Migrated from github.com)
2023-08-10T16:41:00Z diff --git a/out/Debug/gen/include/dawn/webgpu.h b/out/Debug/gen/include/dawn/webgpu.h
index 0789e6e5e3..67b35efe73 100644
--- a/out/Debug/gen/include/dawn/webgpu.h
+++ b/out/Debug/gen/include/dawn/webgpu.h
@@ -69,7 +69,6 @@
 
 #include <stdint.h>
 #include <stddef.h>
-#include <stdbool.h>
 
 #define WGPU_ARRAY_LAYER_COUNT_UNDEFINED (0xffffffffUL)
 #define WGPU_COPY_STRIDE_UNDEFINED (0xffffffffUL)
@@ -80,7 +79,6 @@
 #define WGPU_WHOLE_SIZE (0xffffffffffffffffULL)
 
 typedef uint32_t WGPUFlags;
-#define WGPU_BREAKING_CHANGE_BOOL
 typedef uint32_t WGPUBool;
 
 typedef struct WGPUAdapterImpl* WGPUAdapter WGPU_OBJECT_ATTRIBUTE;
@@ -414,7 +412,6 @@ typedef enum WGPUFeatureName {
     WGPUFeatureName_RG11B10UfloatRenderable = 0x0000000A,
     WGPUFeatureName_BGRA8UnormStorage = 0x0000000B,
     WGPUFeatureName_Float32Filterable = 0x0000000C,
-    WGPUFeatureName_DawnShaderFloat16 = 0x000003E9,
     WGPUFeatureName_DawnInternalUsages = 0x000003EA,
     WGPUFeatureName_DawnMultiPlanarFormats = 0x000003EB,
     WGPUFeatureName_DawnNative = 0x000003EC,
@@ -1766,8 +1763,10 @@ extern "C" {
 
 #if !defined(WGPU_SKIP_PROCS)
 
+typedef void (*WGPUProcAdapterPropertiesFreeMembers)(WGPUAdapterProperties value) WGPU_FUNCTION_ATTRIBUTE;
 typedef WGPUInstance (*WGPUProcCreateInstance)(WGPUInstanceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
 typedef WGPUProc (*WGPUProcGetProcAddress)(WGPUDevice device, char const * procName) WGPU_FUNCTION_ATTRIBUTE;
+typedef void (*WGPUProcSharedTextureMemoryEndAccessStateFreeMembers)(WGPUSharedTextureMemoryEndAccessState value) WGPU_FUNCTION_ATTRIBUTE;
 
 // Procs of Adapter
 typedef WGPUDevice (*WGPUProcAdapterCreateDevice)(WGPUAdapter adapter, WGPU_NULLABLE WGPUDeviceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
@@ -2039,12 +2038,15 @@ typedef void (*WGPUProcTextureViewSetLabel)(WGPUTextureView textureView, char co
 typedef void (*WGPUProcTextureViewReference)(WGPUTextureView textureView) WGPU_FUNCTION_ATTRIBUTE;
 typedef void (*WGPUProcTextureViewRelease)(WGPUTextureView textureView) WGPU_FUNCTION_ATTRIBUTE;
 
+
 #endif  // !defined(WGPU_SKIP_PROCS)
 
 #if !defined(WGPU_SKIP_DECLARATIONS)
 
+WGPU_EXPORT void wgpuAdapterPropertiesFreeMembers(WGPUAdapterProperties value) WGPU_FUNCTION_ATTRIBUTE;
 WGPU_EXPORT WGPUInstance wgpuCreateInstance(WGPUInstanceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
 WGPU_EXPORT WGPUProc wgpuGetProcAddress(WGPUDevice device, char const * procName) WGPU_FUNCTION_ATTRIBUTE;
+WGPU_EXPORT void wgpuSharedTextureMemoryEndAccessStateFreeMembers(WGPUSharedTextureMemoryEndAccessState value) WGPU_FUNCTION_ATTRIBUTE;
 
 // Methods of Adapter
 WGPU_EXPORT WGPUDevice wgpuAdapterCreateDevice(WGPUAdapter adapter, WGPU_NULLABLE WGPUDeviceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
@@ -2316,6 +2318,7 @@ WGPU_EXPORT void wgpuTextureViewSetLabel(WGPUTextureView textureView, char const
 WGPU_EXPORT void wgpuTextureViewReference(WGPUTextureView textureView) WGPU_FUNCTION_ATTRIBUTE;
 WGPU_EXPORT void wgpuTextureViewRelease(WGPUTextureView textureView) WGPU_FUNCTION_ATTRIBUTE;
 
+
 #endif  // !defined(WGPU_SKIP_DECLARATIONS)
 
 #ifdef __cplusplus
2023-08-10T16:41:00Z diff --git a/dawn.json b/dawn.json
index 86f8862eeb..d55f48a202 100644
--- a/dawn.json
+++ b/dawn.json
@@ -136,11 +136,11 @@
         "extensible": "out",
         "members": [
             {"name": "vendor ID", "type": "uint32_t"},
-            {"name": "vendor name", "type": "char", "annotation": "const*", "length": "strlen"},
-            {"name": "architecture", "type": "char", "annotation": "const*", "length": "strlen"},
+            {"name": "vendor name", "type": "char", "annotation": "const*", "length": "strlen", "default": "nullptr"},
+            {"name": "architecture", "type": "char", "annotation": "const*", "length": "strlen", "default": "nullptr"},
             {"name": "device ID", "type": "uint32_t"},
-            {"name": "name", "type": "char", "annotation": "const*", "length": "strlen"},
-            {"name": "driver description", "type": "char", "annotation": "const*", "length": "strlen"},
+            {"name": "name", "type": "char", "annotation": "const*", "length": "strlen", "default": "nullptr"},
+            {"name": "driver description", "type": "char", "annotation": "const*", "length": "strlen", "default": "nullptr"},
             {"name": "adapter type", "type": "adapter type"},
             {"name": "backend type", "type": "backend type"},
             {"name": "compatibility mode", "type": "bool", "default": "false", "tags": ["dawn", "emscripten"]}
@@ -1794,7 +1794,6 @@
             {"value": 10, "name": "RG11B10 ufloat renderable"},
             {"value": 11, "name": "BGRA8 unorm storage"},
             {"value": 12, "name": "float32 filterable"},
-            {"value": 1001, "name": "dawn shader float 16", "tags": ["dawn"]},
             {"value": 1002, "name": "dawn internal usages", "tags": ["dawn"]},
             {"value": 1003, "name": "dawn multi planar formats", "tags": ["dawn"]},
             {"value": 1004, "name": "dawn native", "tags": ["dawn", "native"]},
```diff 2023-08-10T16:41:00Z diff --git a/out/Debug/gen/include/dawn/webgpu.h b/out/Debug/gen/include/dawn/webgpu.h index 0789e6e5e3..67b35efe73 100644 --- a/out/Debug/gen/include/dawn/webgpu.h +++ b/out/Debug/gen/include/dawn/webgpu.h @@ -69,7 +69,6 @@ #include <stdint.h> #include <stddef.h> -#include <stdbool.h> #define WGPU_ARRAY_LAYER_COUNT_UNDEFINED (0xffffffffUL) #define WGPU_COPY_STRIDE_UNDEFINED (0xffffffffUL) @@ -80,7 +79,6 @@ #define WGPU_WHOLE_SIZE (0xffffffffffffffffULL) typedef uint32_t WGPUFlags; -#define WGPU_BREAKING_CHANGE_BOOL typedef uint32_t WGPUBool; typedef struct WGPUAdapterImpl* WGPUAdapter WGPU_OBJECT_ATTRIBUTE; @@ -414,7 +412,6 @@ typedef enum WGPUFeatureName { WGPUFeatureName_RG11B10UfloatRenderable = 0x0000000A, WGPUFeatureName_BGRA8UnormStorage = 0x0000000B, WGPUFeatureName_Float32Filterable = 0x0000000C, - WGPUFeatureName_DawnShaderFloat16 = 0x000003E9, WGPUFeatureName_DawnInternalUsages = 0x000003EA, WGPUFeatureName_DawnMultiPlanarFormats = 0x000003EB, WGPUFeatureName_DawnNative = 0x000003EC, @@ -1766,8 +1763,10 @@ extern "C" { #if !defined(WGPU_SKIP_PROCS) +typedef void (*WGPUProcAdapterPropertiesFreeMembers)(WGPUAdapterProperties value) WGPU_FUNCTION_ATTRIBUTE; typedef WGPUInstance (*WGPUProcCreateInstance)(WGPUInstanceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE; typedef WGPUProc (*WGPUProcGetProcAddress)(WGPUDevice device, char const * procName) WGPU_FUNCTION_ATTRIBUTE; +typedef void (*WGPUProcSharedTextureMemoryEndAccessStateFreeMembers)(WGPUSharedTextureMemoryEndAccessState value) WGPU_FUNCTION_ATTRIBUTE; // Procs of Adapter typedef WGPUDevice (*WGPUProcAdapterCreateDevice)(WGPUAdapter adapter, WGPU_NULLABLE WGPUDeviceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE; @@ -2039,12 +2038,15 @@ typedef void (*WGPUProcTextureViewSetLabel)(WGPUTextureView textureView, char co typedef void (*WGPUProcTextureViewReference)(WGPUTextureView textureView) WGPU_FUNCTION_ATTRIBUTE; typedef void (*WGPUProcTextureViewRelease)(WGPUTextureView textureView) WGPU_FUNCTION_ATTRIBUTE; + #endif // !defined(WGPU_SKIP_PROCS) #if !defined(WGPU_SKIP_DECLARATIONS) +WGPU_EXPORT void wgpuAdapterPropertiesFreeMembers(WGPUAdapterProperties value) WGPU_FUNCTION_ATTRIBUTE; WGPU_EXPORT WGPUInstance wgpuCreateInstance(WGPUInstanceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE; WGPU_EXPORT WGPUProc wgpuGetProcAddress(WGPUDevice device, char const * procName) WGPU_FUNCTION_ATTRIBUTE; +WGPU_EXPORT void wgpuSharedTextureMemoryEndAccessStateFreeMembers(WGPUSharedTextureMemoryEndAccessState value) WGPU_FUNCTION_ATTRIBUTE; // Methods of Adapter WGPU_EXPORT WGPUDevice wgpuAdapterCreateDevice(WGPUAdapter adapter, WGPU_NULLABLE WGPUDeviceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE; @@ -2316,6 +2318,7 @@ WGPU_EXPORT void wgpuTextureViewSetLabel(WGPUTextureView textureView, char const WGPU_EXPORT void wgpuTextureViewReference(WGPUTextureView textureView) WGPU_FUNCTION_ATTRIBUTE; WGPU_EXPORT void wgpuTextureViewRelease(WGPUTextureView textureView) WGPU_FUNCTION_ATTRIBUTE; + #endif // !defined(WGPU_SKIP_DECLARATIONS) #ifdef __cplusplus ``` ``` 2023-08-10T16:41:00Z diff --git a/dawn.json b/dawn.json index 86f8862eeb..d55f48a202 100644 --- a/dawn.json +++ b/dawn.json @@ -136,11 +136,11 @@ "extensible": "out", "members": [ {"name": "vendor ID", "type": "uint32_t"}, - {"name": "vendor name", "type": "char", "annotation": "const*", "length": "strlen"}, - {"name": "architecture", "type": "char", "annotation": "const*", "length": "strlen"}, + {"name": "vendor name", "type": "char", "annotation": "const*", "length": "strlen", "default": "nullptr"}, + {"name": "architecture", "type": "char", "annotation": "const*", "length": "strlen", "default": "nullptr"}, {"name": "device ID", "type": "uint32_t"}, - {"name": "name", "type": "char", "annotation": "const*", "length": "strlen"}, - {"name": "driver description", "type": "char", "annotation": "const*", "length": "strlen"}, + {"name": "name", "type": "char", "annotation": "const*", "length": "strlen", "default": "nullptr"}, + {"name": "driver description", "type": "char", "annotation": "const*", "length": "strlen", "default": "nullptr"}, {"name": "adapter type", "type": "adapter type"}, {"name": "backend type", "type": "backend type"}, {"name": "compatibility mode", "type": "bool", "default": "false", "tags": ["dawn", "emscripten"]} @@ -1794,7 +1794,6 @@ {"value": 10, "name": "RG11B10 ufloat renderable"}, {"value": 11, "name": "BGRA8 unorm storage"}, {"value": 12, "name": "float32 filterable"}, - {"value": 1001, "name": "dawn shader float 16", "tags": ["dawn"]}, {"value": 1002, "name": "dawn internal usages", "tags": ["dawn"]}, {"value": 1003, "name": "dawn multi planar formats", "tags": ["dawn"]}, {"value": 1004, "name": "dawn native", "tags": ["dawn", "native"]}, ```
emidoots commented 2023-08-12 20:52:02 +00:00 (Migrated from github.com)
Fixed by https://github.com/hexops/mach-gpu/pull/16
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach#977
No description provided.