Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Proxy webgpu calls back to the main thread. NFC (#20124)" #21388

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/library_html5_webgpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,4 @@ var LibraryHTML5WebGPU = {
{{{ html5_gpu.makeImportExport('render_bundle_encoder', 'RenderBundleEncoder') }}}
{{{ html5_gpu.makeImportExport('render_bundle', 'RenderBundle') }}}

for (const key of Object.keys(LibraryHTML5WebGPU)) {
if (typeof LibraryHTML5WebGPU[key] === 'function' && !(key + '__proxy' in LibraryHTML5WebGPU)) {
LibraryHTML5WebGPU[key + '__proxy'] = 'sync';
}
}

addToLibrary(LibraryHTML5WebGPU);
3 changes: 0 additions & 3 deletions src/library_webgpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -2730,9 +2730,6 @@ for (var value in LibraryWebGPU.$WebGPU.FeatureName) {
for (const key of Object.keys(LibraryWebGPU)) {
if (typeof LibraryWebGPU[key] === 'function') {
LibraryWebGPU[key + '__i53abi'] = true;
if (!(key + '__proxy' in LibraryWebGPU)) {
LibraryWebGPU[key + '__proxy'] = 'sync';
}
}
}

Expand Down
13 changes: 3 additions & 10 deletions test/webgpu_get_device.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
#include <stdio.h>

#include <emscripten/em_asm.h>
#include <emscripten.h>
#include <emscripten/html5_webgpu.h>

__attribute__((constructor)) void init() {
int main() {
EM_ASM({
Module['preinitializedWebGPUDevice'] = { this_is: 'a_dummy_object' };
});
}

int main() {
WGPUDevice d = emscripten_webgpu_get_device();
printf("emscripten_webgpu_get_device: %p\n", d);
return 0;
emscripten_webgpu_get_device();
}
Loading