Skip to content

Larger resolutions fail to render #186

@BlackHoleFox

Description

@BlackHoleFox

I've been trying to use Pixels in a personal project, but I've hit what seems to be a bug with resolution handling. It seems that if you have a larger winit window, therefore a large surface texture, the first attempt at calling Pixels.render() crashes with a wgpu validation error. I think its related to the aspect ratio it ends up using,

[2021-08-26T01:52:49Z ERROR wgpu::backend::direct] wgpu error: Validation Error

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

I dug through just about the entire issue tracker but I wasn't able to find anything related. The closest thing seems to be this open PR about aspect ratios. Interesting, the minimal example on this branch doesn't panic rendering at 2K. I'm not sure how intentional this is though or if there's something else needed for the "ideal" result.

Steps to reproduce:

  1. git clone https://github.com/parasyte/pixels.git
  2. cd pixels/examples/minimal-winit
  3. sed -i "s/320/2560/; s/240/1440/" src/main.rs
  4. cargo run --release

OS: Windows 10 or Linux (X11 vs Wayland doesn't matter)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions