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

Fix post_processing example on webgl2 #9361

Merged
merged 2 commits into from
Aug 4, 2023

Conversation

rparrett
Copy link
Contributor

@rparrett rparrett commented Aug 4, 2023

Objective

The post_processing example is currently broken when run with webgl2.

cargo run --example post_processing --target=wasm32-unknown-unknown
wasm.js:387 panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
      note: label = `post_process_pipeline`
    In the provided shader, the type given for group 0 binding 2 has a size of 4. As the device does not support `DownlevelFlags::BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED`, the type must have a size that is a multiple of 16 bytes.

I bisected the breakage to c7eaedd.

Solution

Add padding when using webgl2

@JMS55 JMS55 added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen labels Aug 4, 2023
Copy link
Contributor

@IceSentry IceSentry left a comment

Choose a reason for hiding this comment

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

Thanks, I thought I already fixed that when making the example but clearly I didn't

examples/shader/post_processing.rs Show resolved Hide resolved
examples/shader/post_processing.rs Show resolved Hide resolved
@mockersf mockersf added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Aug 4, 2023
@mockersf mockersf added this pull request to the merge queue Aug 4, 2023
Merged via the queue into bevyengine:main with commit e1e2407 Aug 4, 2023
@rparrett
Copy link
Contributor Author

rparrett commented Aug 8, 2023

Should this be in the 0.11.1 milestone so that it gets fixed on the website?

@mockersf mockersf added this to the 0.11.1 milestone Aug 8, 2023
cart pushed a commit that referenced this pull request Aug 10, 2023
# Objective

The `post_processing` example is currently broken when run with webgl2.

```
cargo run --example post_processing --target=wasm32-unknown-unknown
```

```
wasm.js:387 panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
      note: label = `post_process_pipeline`
    In the provided shader, the type given for group 0 binding 2 has a size of 4. As the device does not support `DownlevelFlags::BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED`, the type must have a size that is a multiple of 16 bytes.
```

I bisected the breakage to c7eaedd.

## Solution

Add padding when using webgl2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants