-
-
Notifications
You must be signed in to change notification settings - Fork 141
Description
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:
git clone https://github.com/parasyte/pixels.gitcd pixels/examples/minimal-winitsed -i "s/320/2560/; s/240/1440/" src/main.rscargo run --release
OS: Windows 10 or Linux (X11 vs Wayland doesn't matter)