space_editor: wgpu Validation Error on startup

Describe the bug The editor somehow causes Bevy to create an invalid viewport rect, that is outside the render target.

To Reproduce From a blank Bevy project, add the space editor as shown on the README, and add the SpaceEditorPlugin, as well as the simple_editor_setup startup system.

Expected behavior Editor opens without causing a wgpu failure.

Screenshots wgpu shows the following failure message (shown here with the DX12 backend, but is also reproducible on the Vulkan backend)

wgpu error: Validation Error

Caused by:
    In a RenderPass
      note: encoder = `<CommandBuffer-(0, 1, Dx12)>`
    In a set_viewport command
    Viewport has invalid rect Rect { x: 2001.0, y: 74.0, w: 7999.0, h: 9896.0 }; origin and/or size is less than or equal to 0, and/or is not contained in the render target (1600, 900, 1)

Desktop (please complete the following information):

  • OS: Windows 11
  • Project Version 0.5 (assuming “project version” here means the version of space editor), rev 5067ab5d18f0bc678feadd2307d356e64cd392e2
  • Rust Verion: 1.77.2

Additional context Removing the simple_editor_setup removes the validation error, but leaves the “Game View” tab empty.

This bug seems to be Windows-specific, as I cannot reproduce on macOS.

As is often the case with these kinds of bugs, I have a display scale factor of 125% in my system settings, though the viewport values don’t seem to nicely tie to the display value by that display scale factor, so I don’t know how relevant this is.

About this issue

  • Original URL
  • State: open
  • Created 3 months ago
  • Comments: 22 (4 by maintainers)

Most upvoted comments

Hey guys, sorry I haven’t been responding. I am in process of moving to another state and haven’t had time to touch the project. Mid may I should be able to get back and help more