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

Set HiDpiMode to Locked(1.0) cause invalid scissor rect on MacOS #62

Open
CurryPseudo opened this issue Jul 29, 2021 · 0 comments
Open
Labels
bug Something isn't working

Comments

@CurryPseudo
Copy link

Description

I change the HiDpiMode from Default to Locked(1.0) in the cube example, and add some dbg! on dbg-hidpi-1.0
It crash with these log and backtrace:

    Finished dev [unoptimized + debuginfo] target(s) in 0.44s
     Running `target/debug/examples/cube`
[examples/cube.rs:393] &size = PhysicalSize {
    width: 1600,
    height: 1200,
}
[0.533005 ERROR]()(no module): Unexpected varying type: Array { base: [1], size: Constant([5]), stride: 4 }
[0.708039 ERROR]()(no module): Unexpected varying type: Array { base: [1], size: Constant([5]), stride: 4 }
[src/lib.rs:542] &clip_off = [
    0.0,
    0.0,
]
[src/lib.rs:542] &clip_scale = [
    1.0,
    1.0,
]
[src/lib.rs:567] &scissors = (
    0,
    0,
    3200,
    2400,
)
[src/lib.rs:567] &scissors = (
    64,
    79,
    504,
    492,
)
wgpu error: Validation Error

Caused by:
    In a RenderPass
      note: encoder = `<CommandBuffer-(0, 3, Metal)>`
    In a set_scissor_rect command
    Invalid ScissorRect parameters


thread 'main' panicked at 'Handling wgpu errors as fatal by default', /Users/fate/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.8.1/src/backend/direct.rs:1955:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

looks like that clip rect is bigger than frame size

System Information

image

@CurryPseudo CurryPseudo added the bug Something isn't working label Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant