@nativescript/canvas 2.0.0-webgpu.18 → 2.0.0-webgpu.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/WebGPU/GPUCommandEncoder.d.ts +2 -9
- package/WebGPU/GPUCommandEncoder.js +3 -67
- package/WebGPU/GPUCommandEncoder.js.map +1 -1
- package/WebGPU/GPUDevice.d.ts +9 -71
- package/WebGPU/GPUDevice.js +20 -140
- package/WebGPU/GPUDevice.js.map +1 -1
- package/WebGPU/GPUQueue.js +35 -8
- package/WebGPU/GPUQueue.js.map +1 -1
- package/WebGPU/Interfaces.d.ts +81 -1
- package/WebGPU/Types.d.ts +8 -1
- package/WebGPU/Utils.d.ts +14 -0
- package/WebGPU/Utils.js +211 -0
- package/WebGPU/Utils.js.map +1 -1
- package/package.json +1 -1
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +3 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +150 -25
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +3 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +3 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +656 -647
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +6 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +150 -25
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +3 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +3 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +150 -25
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +3 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +3 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +22 -22
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +656 -647
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +696 -687
- package/platforms/ios/src/cpp/webgpu/GPUBufferImpl.cpp +0 -2
- package/platforms/ios/src/cpp/webgpu/GPUCanvasContextImpl.cpp +3 -2
package/WebGPU/Interfaces.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import type { GPUBindGroupLayout } from './GPUBindGroupLayout';
|
|
1
2
|
import type { GPUBuffer } from './GPUBuffer';
|
|
3
|
+
import type { GPUPipelineLayout } from './GPUPipelineLayout';
|
|
2
4
|
import type { GPUQuerySet } from './GPUQuerySet';
|
|
3
5
|
import type { GPUShaderModule } from './GPUShaderModule';
|
|
4
6
|
import type { GPUTexture } from './GPUTexture';
|
|
5
7
|
import type { GPUTextureView } from './GPUTextureView';
|
|
6
|
-
import type { GPUBlendFactor, GPUBlendOperation, GPUColor, GPUCompareFunction, GPUCullMode, GPUFeatureName, GPUFrontFace, GPUIndexFormat, GPULoadOp, GPUOrigin2D, GPUOrigin3D, GPUPrimitiveTopology, GPUStencilOperation, GPUStoreOp, GPUTextureAspect, GPUTextureFormat, GPUTextureViewDimension, GPUVertexFormat, GPUVertexStepMode } from './Types';
|
|
8
|
+
import type { GPUBindingResource, GPUBlendFactor, GPUBlendOperation, GPUBufferBindingType, GPUColor, GPUCompareFunction, GPUCullMode, GPUFeatureName, GPUFrontFace, GPUIndexFormat, GPULoadOp, GPUOrigin2D, GPUOrigin3D, GPUPrimitiveTopology, GPUSamplerBindingType, GPUStencilOperation, GPUStorageTextureAccess, GPUStoreOp, GPUTextureAspect, GPUTextureFormat, GPUTextureSampleType, GPUTextureViewDimension, GPUVertexFormat, GPUVertexStepMode } from './Types';
|
|
7
9
|
export interface GPUExternalTextureBindingLayout {
|
|
8
10
|
}
|
|
9
11
|
export interface GPUProgrammableStage {
|
|
@@ -163,3 +165,81 @@ export interface GPUDeviceDescriptor {
|
|
|
163
165
|
[name: string]: number;
|
|
164
166
|
};
|
|
165
167
|
}
|
|
168
|
+
export interface GPUComputePassTimestampWrites {
|
|
169
|
+
beginningOfPassWriteIndex: number;
|
|
170
|
+
endOfPassWriteIndex: number;
|
|
171
|
+
querySet: GPUQuerySet;
|
|
172
|
+
}
|
|
173
|
+
export interface GPUComputePassDescriptor {
|
|
174
|
+
label?: string;
|
|
175
|
+
timestampWrites?: GPUComputePassTimestampWrites;
|
|
176
|
+
}
|
|
177
|
+
export interface GPURenderPassDescriptor {
|
|
178
|
+
colorAttachments: (null | GPURenderPassColorAttachment)[];
|
|
179
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
180
|
+
label?: string;
|
|
181
|
+
maxDrawCount?: number;
|
|
182
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
183
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
184
|
+
}
|
|
185
|
+
export interface GPUBufferBinding {
|
|
186
|
+
buffer: GPUBuffer;
|
|
187
|
+
offset?: number;
|
|
188
|
+
size?: number;
|
|
189
|
+
}
|
|
190
|
+
export interface GPUBindGroupEntry {
|
|
191
|
+
binding: number;
|
|
192
|
+
resource: GPUBindingResource;
|
|
193
|
+
}
|
|
194
|
+
export interface GPUBindGroupDescriptor {
|
|
195
|
+
entries: GPUBindGroupEntry[];
|
|
196
|
+
label?: string;
|
|
197
|
+
layout: GPUBindGroupLayout;
|
|
198
|
+
}
|
|
199
|
+
export interface GPUBufferBindingLayout {
|
|
200
|
+
hasDynamicOffset?: boolean;
|
|
201
|
+
minBindingSize?: number;
|
|
202
|
+
type?: GPUBufferBindingType;
|
|
203
|
+
}
|
|
204
|
+
export interface GPUExternalTextureBindingLayout {
|
|
205
|
+
}
|
|
206
|
+
export interface GPUStorageTextureBindingLayout {
|
|
207
|
+
access?: GPUStorageTextureAccess;
|
|
208
|
+
format: GPUTextureFormat;
|
|
209
|
+
viewDimension?: GPUTextureViewDimension;
|
|
210
|
+
}
|
|
211
|
+
export interface GPUSamplerBindingLayout {
|
|
212
|
+
type?: GPUSamplerBindingType;
|
|
213
|
+
}
|
|
214
|
+
export interface GPUTextureBindingLayout {
|
|
215
|
+
multisampled?: boolean;
|
|
216
|
+
sampleType?: GPUTextureSampleType;
|
|
217
|
+
viewDimension?: GPUTextureViewDimension;
|
|
218
|
+
}
|
|
219
|
+
export interface GPUBindGroupLayoutEntry {
|
|
220
|
+
binding: number;
|
|
221
|
+
buffer?: GPUBufferBindingLayout;
|
|
222
|
+
externalTexture?: GPUExternalTextureBindingLayout;
|
|
223
|
+
sampler?: GPUSamplerBindingLayout;
|
|
224
|
+
storageTexture?: GPUStorageTextureBindingLayout;
|
|
225
|
+
texture?: GPUTextureBindingLayout;
|
|
226
|
+
visibility: number;
|
|
227
|
+
}
|
|
228
|
+
export interface GPUBindGroupLayoutDescriptor {
|
|
229
|
+
entries: GPUBindGroupLayoutEntry[];
|
|
230
|
+
label?: string;
|
|
231
|
+
}
|
|
232
|
+
export interface GPUComputePipelineDescriptor {
|
|
233
|
+
compute: GPUProgrammableStage;
|
|
234
|
+
label?: string;
|
|
235
|
+
layout: GPUPipelineLayout | 'auto';
|
|
236
|
+
}
|
|
237
|
+
export interface GPURenderPipelineDescriptor {
|
|
238
|
+
depthStencil?: GPUDepthStencilState;
|
|
239
|
+
fragment?: GPUFragmentState;
|
|
240
|
+
label?: string;
|
|
241
|
+
layout: GPUPipelineLayout | 'auto';
|
|
242
|
+
multisample?: GPUMultisampleState;
|
|
243
|
+
primitive?: GPUPrimitiveState;
|
|
244
|
+
vertex: GPUVertexState;
|
|
245
|
+
}
|
package/WebGPU/Types.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GPUExternalTexture } from './GPUExternalTexture';
|
|
2
|
+
import type { GPUSampler } from './GPUSampler';
|
|
3
|
+
import type { GPUTextureView } from './GPUTextureView';
|
|
4
|
+
import type { GPUBufferBinding, GPUColorDict } from './Interfaces';
|
|
2
5
|
export type GPUOrigin2D = [number, number] | {
|
|
3
6
|
x?: number;
|
|
4
7
|
y?: number;
|
|
@@ -38,3 +41,7 @@ export type GPUVertexFormat = 'uint8x2' | 'uint8x4' | 'sint8x2' | 'sint8x4' | 'u
|
|
|
38
41
|
export type GPUCanvasAlphaMode = 'opaque' | 'premultiplied' | 'postmultiplied' | 'inherit';
|
|
39
42
|
export type GPUCanvasPresentMode = 'autoVsync' | 'autoNoVsync' | 'fifo' | 'fifoRelaxed' | 'immediate' | 'mailbox';
|
|
40
43
|
export type GPUFeatureName = 'depth-clip-control' | 'depth32float-stencil8' | 'texture-compression-bc' | 'texture-compression-etc2' | 'texture-compression-astc' | 'timestamp-query' | 'indirect-first-instance' | 'shader-f16' | 'rg11b10ufloat-renderable' | 'bgra8unorm-storage' | 'float32-filterable';
|
|
44
|
+
export type GPUBindingResource = GPUSampler | GPUTextureView | GPUBufferBinding | GPUExternalTexture;
|
|
45
|
+
export type GPUBufferBindingType = 'uniform' | 'storage' | 'read-only-storage';
|
|
46
|
+
export type GPUSamplerBindingType = 'filtering' | 'non-filtering' | 'comparison';
|
|
47
|
+
export type GPUStorageTextureAccess = 'write-only' | 'read-only' | 'read-write';
|
package/WebGPU/Utils.d.ts
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
+
import { GPUQuerySet } from './GPUQuerySet';
|
|
2
|
+
import { GPUBindGroupDescriptor, GPUComputePassDescriptor, GPUComputePipelineDescriptor, GPURenderPassColorAttachment, GPURenderPassDepthStencilAttachment, GPURenderPassDescriptor, GPURenderPassTimestampWrites, GPURenderPipelineDescriptor } from './Interfaces';
|
|
1
3
|
export declare function parseVertexFormat(value: string): 1 | 2 | 4 | 8 | 16 | 32 | 0 | 3 | 5 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | 34;
|
|
4
|
+
export declare function parseComputePassDescriptor(value?: GPUComputePassDescriptor): GPUComputePassDescriptor;
|
|
5
|
+
export declare function parseRenderPassDescriptor(value: GPURenderPassDescriptor): {
|
|
6
|
+
colorAttachments: (null | GPURenderPassColorAttachment)[];
|
|
7
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
8
|
+
label?: string;
|
|
9
|
+
maxDrawCount?: number;
|
|
10
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
11
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
12
|
+
};
|
|
13
|
+
export declare function parseBindGroupDescriptor(value: GPUBindGroupDescriptor): GPUBindGroupDescriptor;
|
|
14
|
+
export declare function parseComputePipelineDescriptor(value: GPUComputePipelineDescriptor): GPUComputePipelineDescriptor;
|
|
15
|
+
export declare function parseRenderPipelineDescriptor(value: GPURenderPipelineDescriptor, method: string): GPURenderPipelineDescriptor;
|
package/WebGPU/Utils.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { native_ } from './Constants';
|
|
2
|
+
import { GPUBuffer } from './GPUBuffer';
|
|
3
|
+
import { GPUExternalTexture } from './GPUExternalTexture';
|
|
4
|
+
import { GPUPipelineLayout } from './GPUPipelineLayout';
|
|
5
|
+
import { GPUSampler } from './GPUSampler';
|
|
6
|
+
import { GPUTextureView } from './GPUTextureView';
|
|
1
7
|
export function parseVertexFormat(value) {
|
|
2
8
|
switch (value) {
|
|
3
9
|
case 'uint8x2':
|
|
@@ -72,4 +78,209 @@ export function parseVertexFormat(value) {
|
|
|
72
78
|
return 34;
|
|
73
79
|
}
|
|
74
80
|
}
|
|
81
|
+
export function parseComputePassDescriptor(value) {
|
|
82
|
+
if (!value) {
|
|
83
|
+
return value;
|
|
84
|
+
}
|
|
85
|
+
const desc = {};
|
|
86
|
+
if (value.label) {
|
|
87
|
+
desc.label = value.label;
|
|
88
|
+
}
|
|
89
|
+
if (desc.timestampWrites) {
|
|
90
|
+
desc.timestampWrites = {
|
|
91
|
+
beginningOfPassWriteIndex: value.timestampWrites.beginningOfPassWriteIndex,
|
|
92
|
+
endOfPassWriteIndex: value.timestampWrites.endOfPassWriteIndex,
|
|
93
|
+
querySet: value.timestampWrites.querySet[native_],
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
return desc;
|
|
97
|
+
}
|
|
98
|
+
export function parseRenderPassDescriptor(value) {
|
|
99
|
+
const desc = {
|
|
100
|
+
colorAttachments: new Array(value?.colorAttachments?.length ?? 0),
|
|
101
|
+
};
|
|
102
|
+
if (typeof value.maxDrawCount === 'number') {
|
|
103
|
+
desc.maxDrawCount = value.maxDrawCount;
|
|
104
|
+
}
|
|
105
|
+
if (typeof value.label === 'string') {
|
|
106
|
+
desc.label = value.label;
|
|
107
|
+
}
|
|
108
|
+
value.colorAttachments.forEach((attachment, i) => {
|
|
109
|
+
const newAttachment = {
|
|
110
|
+
loadOp: 'load',
|
|
111
|
+
storeOp: 'store',
|
|
112
|
+
view: null,
|
|
113
|
+
};
|
|
114
|
+
if (Array.isArray(attachment.clearValue)) {
|
|
115
|
+
newAttachment.clearValue = { r: attachment.clearValue[0], g: attachment.clearValue[1], b: attachment.clearValue[2], a: attachment.clearValue[3] };
|
|
116
|
+
}
|
|
117
|
+
if (attachment.view) {
|
|
118
|
+
newAttachment.view = attachment.view[native_];
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
/// ???
|
|
122
|
+
}
|
|
123
|
+
if (attachment.resolveTarget) {
|
|
124
|
+
newAttachment.resolveTarget = attachment.resolveTarget[native_];
|
|
125
|
+
}
|
|
126
|
+
if (typeof attachment?.depthSlice === 'number') {
|
|
127
|
+
newAttachment.depthSlice = attachment.depthSlice;
|
|
128
|
+
}
|
|
129
|
+
if (attachment.loadOp) {
|
|
130
|
+
newAttachment.loadOp = attachment.loadOp;
|
|
131
|
+
}
|
|
132
|
+
if (attachment.storeOp) {
|
|
133
|
+
newAttachment.storeOp = attachment.storeOp;
|
|
134
|
+
}
|
|
135
|
+
desc.colorAttachments[i] = newAttachment;
|
|
136
|
+
});
|
|
137
|
+
if (value?.depthStencilAttachment) {
|
|
138
|
+
desc.depthStencilAttachment = {
|
|
139
|
+
depthLoadOp: value.depthStencilAttachment.depthLoadOp ?? 'load',
|
|
140
|
+
depthStoreOp: value.depthStencilAttachment.depthStoreOp ?? 'store',
|
|
141
|
+
view: value.depthStencilAttachment.view?.[native_],
|
|
142
|
+
depthClearValue: value.depthStencilAttachment.depthClearValue ?? 0,
|
|
143
|
+
depthReadOnly: value.depthStencilAttachment.depthReadOnly ?? false,
|
|
144
|
+
stencilLoadOp: value.depthStencilAttachment.stencilLoadOp ?? 'load',
|
|
145
|
+
stencilStoreOp: value.depthStencilAttachment.stencilStoreOp ?? 'store',
|
|
146
|
+
stencilClearValue: value.depthStencilAttachment.stencilClearValue ?? 0,
|
|
147
|
+
stencilReadOnly: value.depthStencilAttachment.stencilReadOnly ?? false,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
if (value?.occlusionQuerySet) {
|
|
151
|
+
desc.occlusionQuerySet = value.occlusionQuerySet[native_];
|
|
152
|
+
}
|
|
153
|
+
if (value?.timestampWrites) {
|
|
154
|
+
desc.timestampWrites = {
|
|
155
|
+
beginningOfPassWriteIndex: value.timestampWrites.beginningOfPassWriteIndex,
|
|
156
|
+
endOfPassWriteIndex: value.timestampWrites.endOfPassWriteIndex,
|
|
157
|
+
querySet: value.timestampWrites.querySet[native_],
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
return desc;
|
|
161
|
+
}
|
|
162
|
+
export function parseBindGroupDescriptor(value) {
|
|
163
|
+
const desc = {
|
|
164
|
+
layout: value.layout[native_],
|
|
165
|
+
entries: [],
|
|
166
|
+
};
|
|
167
|
+
if (typeof value.label === 'string') {
|
|
168
|
+
desc.label = value?.label;
|
|
169
|
+
}
|
|
170
|
+
if (Array.isArray(value.entries)) {
|
|
171
|
+
for (const entry of value.entries) {
|
|
172
|
+
if (entry.resource instanceof GPUTextureView) {
|
|
173
|
+
desc.entries.push({
|
|
174
|
+
binding: entry.binding,
|
|
175
|
+
resource: entry.resource[native_],
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
else if (entry.resource instanceof GPUSampler) {
|
|
179
|
+
desc.entries.push({
|
|
180
|
+
binding: entry.binding,
|
|
181
|
+
resource: entry.resource[native_],
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
else if (entry.resource instanceof GPUExternalTexture) {
|
|
185
|
+
desc.entries.push({
|
|
186
|
+
binding: entry.binding,
|
|
187
|
+
resource: entry.resource[native_],
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
else if (entry?.resource?.buffer && entry?.resource?.buffer instanceof GPUBuffer) {
|
|
191
|
+
desc.entries.push({
|
|
192
|
+
binding: entry.binding,
|
|
193
|
+
resource: {
|
|
194
|
+
buffer: entry.resource.buffer[native_],
|
|
195
|
+
offset: entry.resource.offset ?? 0,
|
|
196
|
+
size: entry.resource.size ?? entry.resource.buffer.size - entry.resource.offset,
|
|
197
|
+
},
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return desc;
|
|
203
|
+
}
|
|
204
|
+
export function parseComputePipelineDescriptor(value) {
|
|
205
|
+
const desc = {
|
|
206
|
+
compute: {
|
|
207
|
+
module: value.compute.module[native_],
|
|
208
|
+
},
|
|
209
|
+
layout: 'auto',
|
|
210
|
+
};
|
|
211
|
+
if (value.compute?.constants) {
|
|
212
|
+
desc.compute.constants = value.compute.constants;
|
|
213
|
+
}
|
|
214
|
+
if (value.compute?.entryPoint) {
|
|
215
|
+
desc.compute.entryPoint = value.compute.entryPoint;
|
|
216
|
+
}
|
|
217
|
+
if (typeof value?.label === 'string') {
|
|
218
|
+
desc.label = value.label;
|
|
219
|
+
}
|
|
220
|
+
if (value.layout instanceof GPUPipelineLayout) {
|
|
221
|
+
desc.layout = value.layout[native_];
|
|
222
|
+
}
|
|
223
|
+
return desc;
|
|
224
|
+
}
|
|
225
|
+
function handleUnsupportedPlatformFormat(fragment, method) {
|
|
226
|
+
// falls back to platform supported format ... maybe this can be removed once frameworks use the getPreferredCanvasFormat
|
|
227
|
+
if (__ANDROID__) {
|
|
228
|
+
let hasBrga = false;
|
|
229
|
+
fragment.targets = fragment.targets.map((target) => {
|
|
230
|
+
switch (target.format) {
|
|
231
|
+
case 'bgra8unorm':
|
|
232
|
+
target.format = 'rgba8unorm';
|
|
233
|
+
hasBrga = true;
|
|
234
|
+
break;
|
|
235
|
+
case 'bgra8unorm-srgb':
|
|
236
|
+
target.format = 'rgba8unorm-srgb';
|
|
237
|
+
hasBrga = true;
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
return target;
|
|
241
|
+
});
|
|
242
|
+
if (hasBrga) {
|
|
243
|
+
console.warn(`GPUDevice:${method} using unsupported brga format falling back to rgba counterpart.`);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
export function parseRenderPipelineDescriptor(value, method) {
|
|
248
|
+
const desc = {
|
|
249
|
+
vertex: {
|
|
250
|
+
module: value.vertex.module[native_],
|
|
251
|
+
},
|
|
252
|
+
layout: 'auto',
|
|
253
|
+
};
|
|
254
|
+
if (Array.isArray(value.vertex?.buffers)) {
|
|
255
|
+
desc.vertex.buffers = value.vertex.buffers.map((buffer) => {
|
|
256
|
+
buffer.attributes = buffer.attributes.map((attr) => {
|
|
257
|
+
attr.format = parseVertexFormat(attr.format);
|
|
258
|
+
return attr;
|
|
259
|
+
});
|
|
260
|
+
return buffer;
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
if (value.fragment) {
|
|
264
|
+
desc.fragment = {
|
|
265
|
+
module: value.fragment.module[native_],
|
|
266
|
+
targets: value.fragment.targets,
|
|
267
|
+
constants: value.fragment.constants,
|
|
268
|
+
entryPoint: value.fragment.entryPoint,
|
|
269
|
+
};
|
|
270
|
+
handleUnsupportedPlatformFormat(desc.fragment, method);
|
|
271
|
+
}
|
|
272
|
+
if (value.depthStencil) {
|
|
273
|
+
desc.depthStencil = value.depthStencil;
|
|
274
|
+
}
|
|
275
|
+
if (value.multisample) {
|
|
276
|
+
desc.multisample = value.multisample;
|
|
277
|
+
}
|
|
278
|
+
if (value.primitive) {
|
|
279
|
+
desc.primitive = value.primitive;
|
|
280
|
+
}
|
|
281
|
+
if (value.layout instanceof GPUPipelineLayout) {
|
|
282
|
+
desc.layout = value.layout[native_];
|
|
283
|
+
}
|
|
284
|
+
return desc;
|
|
285
|
+
}
|
|
75
286
|
//# sourceMappingURL=Utils.js.map
|
package/WebGPU/Utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../../packages/canvas/WebGPU/Utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC9C,QAAQ,KAAK,EAAE,CAAC;QACf,KAAK,SAAS;YACb,OAAO,CAAC,CAAC;QACV,KAAK,SAAS;YACb,OAAO,CAAC,CAAC;QACV,KAAK,SAAS;YACb,OAAO,CAAC,CAAC;QACV,KAAK,SAAS;YACb,OAAO,CAAC,CAAC;QACV,KAAK,UAAU;YACd,OAAO,CAAC,CAAC;QACV,KAAK,UAAU;YACd,OAAO,CAAC,CAAC;QACV,KAAK,UAAU;YACd,OAAO,CAAC,CAAC;QACV,KAAK,UAAU;YACd,OAAO,CAAC,CAAC;QACV,KAAK,UAAU;YACd,OAAO,CAAC,CAAC;QACV,KAAK,UAAU;YACd,OAAO,CAAC,CAAC;QACV,KAAK,UAAU;YACd,OAAO,EAAE,CAAC;QACX,KAAK,UAAU;YACd,OAAO,EAAE,CAAC;QACX,KAAK,WAAW;YACf,OAAO,EAAE,CAAC;QACX,KAAK,WAAW;YACf,OAAO,EAAE,CAAC;QACX,KAAK,WAAW;YACf,OAAO,EAAE,CAAC;QACX,KAAK,WAAW;YACf,OAAO,EAAE,CAAC;QACX,KAAK,WAAW;YACf,OAAO,EAAE,CAAC;QACX,KAAK,WAAW;YACf,OAAO,EAAE,CAAC;QACX,KAAK,SAAS;YACb,OAAO,EAAE,CAAC;QACX,KAAK,WAAW;YACf,OAAO,EAAE,CAAC;QACX,KAAK,WAAW;YACf,OAAO,EAAE,CAAC;QACX,KAAK,WAAW;YACf,OAAO,EAAE,CAAC;QACX,KAAK,QAAQ;YACZ,OAAO,EAAE,CAAC;QACX,KAAK,UAAU;YACd,OAAO,EAAE,CAAC;QACX,KAAK,UAAU;YACd,OAAO,EAAE,CAAC;QACX,KAAK,UAAU;YACd,OAAO,EAAE,CAAC;QACX,KAAK,QAAQ;YACZ,OAAO,EAAE,CAAC;QACX,KAAK,UAAU;YACd,OAAO,EAAE,CAAC;QACX,KAAK,UAAU;YACd,OAAO,EAAE,CAAC;QACX,KAAK,UAAU;YACd,OAAO,EAAE,CAAC;QACX,KAAK,SAAS;YACb,OAAO,EAAE,CAAC;QACX,KAAK,WAAW;YACf,OAAO,EAAE,CAAC;QACX,KAAK,WAAW;YACf,OAAO,EAAE,CAAC;QACX,KAAK,WAAW;YACf,OAAO,EAAE,CAAC;QACX,KAAK,iBAAiB;YACrB,OAAO,EAAE,CAAC;IACZ,CAAC;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../../packages/canvas/WebGPU/Utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,M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,CAAC;YAEH,OAAO,MAAM,CAAC;QACf,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG;YACf,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC;YACtC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,OAAO;YAC/B,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,SAAS;YACnC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,UAAU;SACrC,CAAC;QAEF,+BAA+B,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;IACxC,CAAC;IAED,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;QACvB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;IACtC,CAAC;IAED,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IAClC,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,YAAY,iBAAiB,EAAE,CAAC;QAC/C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC"}
|
package/package.json
CHANGED
package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative
CHANGED
|
Binary file
|
|
@@ -342,6 +342,7 @@ SWIFT_CLASS_NAMED("CanvasHelpers")
|
|
|
342
342
|
+ (NSMutableData * _Nonnull)getBytesFromUIImage:(UIImage * _Nonnull)image SWIFT_WARN_UNUSED_RESULT;
|
|
343
343
|
+ (int64_t)createPattern:(int64_t)context :(UIImage * _Nonnull)image :(NSString * _Nonnull)repetition SWIFT_WARN_UNUSED_RESULT;
|
|
344
344
|
+ (BOOL)loadImageAssetWithContext:(int64_t)asset :(UIImage * _Nonnull)image SWIFT_WARN_UNUSED_RESULT;
|
|
345
|
+
+ (BOOL)loadImageAssetWithPath:(int64_t)asset :(NSString * _Nonnull)path SWIFT_WARN_UNUSED_RESULT;
|
|
345
346
|
+ (BOOL)drawImageWithContext:(int64_t)context image:(UIImage * _Nonnull)image dx:(float)dx dy:(float)dy SWIFT_WARN_UNUSED_RESULT;
|
|
346
347
|
+ (BOOL)drawImageWithContext:(int64_t)context image:(UIImage * _Nonnull)image dx:(float)dx dy:(float)dy dw:(float)dw dh:(float)dh SWIFT_WARN_UNUSED_RESULT;
|
|
347
348
|
+ (BOOL)drawImageWithContext:(int64_t)context image:(UIImage * _Nonnull)image sx:(float)sx sy:(float)sy sw:(float)sw sh:(float)sh dx:(float)dx dy:(float)dy dw:(float)dw dh:(float)dh SWIFT_WARN_UNUSED_RESULT;
|
|
@@ -448,6 +449,8 @@ SWIFT_CLASS_NAMED("NSCImageAsset")
|
|
|
448
449
|
@interface NSCImageAsset : NSObject
|
|
449
450
|
+ (BOOL)loadImageFromImageSync:(int64_t)context :(UIImage * _Nonnull)image SWIFT_WARN_UNUSED_RESULT;
|
|
450
451
|
+ (void)loadImageFromImage:(int64_t)context :(UIImage * _Nonnull)image :(void (^ _Nonnull)(BOOL))callback;
|
|
452
|
+
+ (BOOL)loadImageFromPathSync:(int64_t)asset :(NSString * _Nonnull)path SWIFT_WARN_UNUSED_RESULT;
|
|
453
|
+
+ (void)loadImageFromPath:(int64_t)asset :(NSString * _Nonnull)path :(void (^ _Nonnull)(BOOL))callback;
|
|
451
454
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
452
455
|
@end
|
|
453
456
|
|