Skip to content

Commit

Permalink
⬆️
Browse files Browse the repository at this point in the history
  • Loading branch information
wcandillon committed Dec 14, 2024
1 parent 2ff0ac0 commit 8233656
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"@types/three": "0.168.0",
"@webgpu/types": "0.1.49",
"@webgpu/types": "0.1.51",
"babel-jest": "^29.6.3",
"eslint": "^8.19.0",
"eslint-config-react-native-wcandillon": "^3.10.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/webgpu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"@webgpu/types": "0.1.49",
"@webgpu/types": "0.1.51",
"clang-format": "^1.8.0",
"del-cli": "^5.1.0",
"eslint": "8",
Expand Down
20 changes: 20 additions & 0 deletions packages/webgpu/src/__tests__/GPU.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,26 @@ describe("Adapter", () => {
});
expect(result).toBe(true);
});
it("requestAdapter (6)", async () => {
const result = await client.eval(({ gpu }) => {
return gpu.requestAdapter().then((adapter) => {
if (!adapter) {
return null;
}
return {
vendor: adapter.info.vendor,
architecture: adapter.info.architecture,
device: adapter.info.device,
description: adapter.info.description,
};
});
});
expect(result).toBeDefined();
expect(result!.vendor).toBeDefined();
expect(result!.architecture).toBeDefined();
expect(result!.device).toBeDefined();
expect(result!.description).toBeDefined();
});
it("isFallback", async () => {
const result = await client.eval(({ adapter }) => {
return adapter.isFallbackAdapter;
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4283,7 +4283,7 @@ __metadata:
"@types/react": ^18.2.6
"@types/react-test-renderer": ^18.0.0
"@types/three": 0.168.0
"@webgpu/types": 0.1.49
"@webgpu/types": 0.1.51
babel-jest: ^29.6.3
eslint: ^8.19.0
eslint-config-react-native-wcandillon: ^3.10.2
Expand Down Expand Up @@ -10618,7 +10618,7 @@ __metadata:
"@types/ws": ^8.5.10
"@typescript-eslint/eslint-plugin": ^8.4.0
"@typescript-eslint/parser": ^8.4.0
"@webgpu/types": 0.1.49
"@webgpu/types": 0.1.51
clang-format: ^1.8.0
del-cli: ^5.1.0
eslint: 8
Expand Down

0 comments on commit 8233656

Please sign in to comment.