Skip to content

Commit adab0c0

Browse files
committed
🔧
1 parent 79f4693 commit adab0c0

6 files changed

Lines changed: 11 additions & 14 deletions

File tree

packages/webgpu/src/__tests__/Buffer.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,9 @@ describe("Buffer", () => {
341341

342342
return gpuBuffer.mapAsync(GPUMapMode.READ).then(() => {
343343
const data = new Uint32Array(gpuBuffer.getMappedRange());
344-
const result = Array.from(data);
344+
const result2 = Array.from(data);
345345
gpuBuffer.unmap();
346-
return result;
346+
return result2;
347347
});
348348
});
349349
// Should be [333, 444] (from offset 8), not [111, 222] (from offset 0)

packages/webgpu/src/__tests__/Texture.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ describe("Texture", () => {
237237
{ texture },
238238
layer1View, // This view has byteOffset=256
239239
{ bytesPerRow },
240-
{ width, height }
240+
{ width, height },
241241
);
242242

243243
// Read back the texture
@@ -250,7 +250,7 @@ describe("Texture", () => {
250250
commandEncoder.copyTextureToBuffer(
251251
{ texture },
252252
{ buffer: outputBuffer, bytesPerRow },
253-
[width, height]
253+
[width, height],
254254
);
255255
device.queue.submit([commandEncoder.finish()]);
256256

packages/webgpu/src/__tests__/setup.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,7 @@ export const checkImage = (
407407
return 0;
408408
};
409409

410-
export const itSkipsOnWeb = (
411-
name: string,
412-
fn: () => Promise<void>,
413-
) => {
410+
export const itSkipsOnWeb = (name: string, fn: () => Promise<void>) => {
414411
it(name, async () => {
415412
if (client.OS === "web") {
416413
return;

packages/webgpu/src/external/ModuleProxy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type ImportType = ReturnType<typeof require>;
66
* This is useful for lazily requiring optional dependencies.
77
*/
88
export const createModuleProxy = <TModule>(
9-
getModule: () => ImportType
9+
getModule: () => ImportType,
1010
): TModule => {
1111
const holder: { module: TModule | undefined } = { module: undefined };
1212

packages/webgpu/src/external/reanimated/registerWebGPUForReanimated.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// Declare global WebGPU worklet helper functions (installed by native module)
22
declare function __webgpuIsWebGPUObject(obj: unknown): boolean;
3-
declare function __webgpuBox(
4-
obj: object
5-
): { unbox: () => object; __boxedWebGPU: true };
3+
declare function __webgpuBox(obj: object): {
4+
unbox: () => object;
5+
__boxedWebGPU: true;
6+
};
67

78
let isRegistered = false;
89

@@ -19,7 +20,6 @@ export const registerWebGPUForReanimated = () => {
1920
isRegistered = true;
2021

2122
try {
22-
// eslint-disable-next-line @typescript-eslint/no-var-requires
2323
const { registerCustomSerializable } = require("react-native-worklets");
2424

2525
registerCustomSerializable({

packages/webgpu/src/main/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ if (typeof RNWebGPU !== "undefined") {
3535
global.createImageBitmap ?? RNWebGPU.createImageBitmap.bind(RNWebGPU);
3636
} else {
3737
console.warn(
38-
`[react-native-wgpu] install() returned ${_installOk} but RNWebGPU global is not available`
38+
`[react-native-wgpu] install() returned ${_installOk} but RNWebGPU global is not available`,
3939
);
4040
}

0 commit comments

Comments
 (0)