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

Use new Surface API #7

Merged
merged 4 commits into from
Jun 12, 2024
Merged

Use new Surface API #7

merged 4 commits into from
Jun 12, 2024

Conversation

beaufortfrancois
Copy link
Owner

@beaufortfrancois beaufortfrancois commented May 13, 2024

On Emscripten, it requires emscripten-core/emscripten#21939

[](WGPURequestDeviceStatus status, WGPUDevice cDevice,
const char* message, void* userdata) {
wgpu::Device device = wgpu::Device::Acquire(cDevice);
device.SetUncapturedErrorCallback(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this will be part of the descriptor soon.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(It is already there in Dawn, but Emscripten doesn't implement it.)

@beaufortfrancois beaufortfrancois force-pushed the remove-swapchain branch 3 times, most recently from 64a5abc to 6a83afa Compare May 13, 2024 14:46
main.cpp Show resolved Hide resolved
main.cpp Show resolved Hide resolved
main.cpp Outdated Show resolved Hide resolved
@beaufortfrancois beaufortfrancois marked this pull request as ready for review May 21, 2024 08:32
@beaufortfrancois
Copy link
Owner Author

@kainino0x @Kangz I've updated this PR. Note that I'm now reusing format in colorTargetState instead of hardcoding wgpu::TextureFormat::BGRA8Unorm

Copy link
Collaborator

@kainino0x kainino0x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once emscripten changes land

main.cpp Outdated Show resolved Hide resolved
main.cpp Outdated Show resolved Hide resolved
@beaufortfrancois
Copy link
Owner Author

@kainino0x I've addressed your latest feedback. I'll merge when emscripten changes land. Thank you!

Copy link
Owner Author

@beaufortfrancois beaufortfrancois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I'm now using default values for alphaMode and presentMode

main.cpp Outdated Show resolved Hide resolved
main.cpp Show resolved Hide resolved
main.cpp Show resolved Hide resolved
@beaufortfrancois
Copy link
Owner Author

I'll merge when Chrome 126 hits stable. Thanks for the reviews!

@beaufortfrancois beaufortfrancois merged commit 4003303 into main Jun 12, 2024
@beaufortfrancois beaufortfrancois deleted the remove-swapchain branch June 12, 2024 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants