File tree Expand file tree Collapse file tree 3 files changed +13
-14
lines changed Expand file tree Collapse file tree 3 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 6
6
7
7
#include < cassert>
8
8
#include < cstdint>
9
+ #include < cstdio>
9
10
#include < format>
10
11
#include < stdexcept>
11
12
@@ -21,11 +22,10 @@ const char* WGPUDeviceLostReasonToStr(WGPUDeviceLostReason reason)
21
22
return " Undefined" ;
22
23
case WGPUDeviceLostReason_Destroyed:
23
24
return " Destroyed" ;
25
+ default :
26
+ assert (!" Unknown WGPUDeviceLostReason" );
27
+ return nullptr ;
24
28
}
25
-
26
- assert (!" Unknown WGPUDeviceLostReason" );
27
-
28
- return nullptr ;
29
29
}
30
30
31
31
const char * WGPUErrorTypeToStr (const WGPUErrorType type)
@@ -44,11 +44,10 @@ const char* WGPUErrorTypeToStr(const WGPUErrorType type)
44
44
return " Unknown" ;
45
45
case WGPUErrorType_DeviceLost:
46
46
return " DeviceLost" ;
47
+ default :
48
+ assert (!" Unknown WGPUErrorType" );
49
+ return nullptr ;
47
50
}
48
-
49
- assert (!" Unknown WGPUErrorType" );
50
-
51
- return nullptr ;
52
51
}
53
52
54
53
void onDeviceLost (WGPUDeviceLostReason reason, const char * const message, void * /* userdata*/ )
@@ -81,11 +80,10 @@ const char* WGPUQueueWorkDoneStatusToStr(const WGPUQueueWorkDoneStatus status)
81
80
return " Unknown" ;
82
81
case WGPUQueueWorkDoneStatus_DeviceLost:
83
82
return " DeviceLost" ;
83
+ default :
84
+ assert (!" Unknown WGPUQueueWorkDoneStatus" );
85
+ return nullptr ;
84
86
}
85
-
86
- assert (!" Unknown WGPUQueueWorkDoneStatus" );
87
-
88
- return nullptr ;
89
87
}
90
88
91
89
void onQueueWorkDone (WGPUQueueWorkDoneStatus status, void * /* userdata*/ )
Original file line number Diff line number Diff line change 7
7
8
8
#include < array>
9
9
#include < cstdint>
10
+ #include < cstdio>
10
11
#include < limits>
11
12
#include < tuple>
12
13
Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ struct Renderer
40
40
.maxUniformBuffersPerShaderStage = 0 ,
41
41
.maxUniformBufferBindingSize = 0 ,
42
42
.maxStorageBufferBindingSize = 0 ,
43
- .minUniformBufferOffsetAlignment = 64 ,
44
- .minStorageBufferOffsetAlignment = 16 ,
43
+ .minUniformBufferOffsetAlignment = 256 ,
44
+ .minStorageBufferOffsetAlignment = 256 ,
45
45
.maxVertexBuffers = 1 ,
46
46
.maxBufferSize = 24 * sizeof (float ),
47
47
.maxVertexAttributes = 2 ,
You can’t perform that action at this time.
0 commit comments