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

naga_oil interprets field access as imported binding #9466

Closed
amfaber opened this issue Aug 17, 2023 · 2 comments
Closed

naga_oil interprets field access as imported binding #9466

amfaber opened this issue Aug 17, 2023 · 2 comments
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Duplicate This issue or PR already exists

Comments

@amfaber
Copy link

amfaber commented Aug 17, 2023

Bevy version

Hash - 43fe83b

What you did

In my wgsl code I have #import bevy_pbr::mesh_view_bindings view. Later I try to use the "view" field of the "view" binding - ... view.view ...
This results in the following wgsl validation error

error: invalid field accessor `bevy_pbr::mesh_view_bindings::view`
   ┌─ shaders/instancing.wgsl:39:86
   │
39 │     let idk = bevy_pbr::mesh_view_bindings::view.bevy_pbr::mesh_view_bindings::view;
   │                                                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid accessor
   │
   = invalid field accessor `bevy_pbr::mesh_view_bindings::view`
  • what were you expecting?
    Field access to work like expected
  • what actually happened?
    The field is interpreted as the imported binding

Additional information

I assume this is an unintended consequence of #5703

@amfaber amfaber added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Aug 17, 2023
@JMS55 JMS55 added S-Duplicate This issue or PR already exists A-Rendering Drawing game state to the screen and removed S-Needs-Triage This issue needs to be labelled labels Aug 17, 2023
@JMS55
Copy link
Contributor

JMS55 commented Aug 17, 2023

I believe this should be fixed by bevyengine/naga_oil#31?

@amfaber
Copy link
Author

amfaber commented Aug 17, 2023

It even lists the exact same example of view.view, so I think it is safe to assume so. Awesome to see it fixed already :) I'll just have to watch out for when the version is bumped

@amfaber amfaber closed this as completed Aug 17, 2023
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-Duplicate This issue or PR already exists
Projects
None yet
Development

No branches or pull requests

2 participants