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

Enabling hardware acceleration in QT 6 builds makes images not render (win 10, 64 bit) #3578

Closed
dogboydog opened this issue Feb 17, 2023 · 7 comments · Fixed by #3585
Closed
Assignees
Labels
bug Broken behavior. qt issue Qt related issue.
Milestone

Comments

@dogboydog
Copy link
Contributor

dogboydog commented Feb 17, 2023

Describe the bug
There's a rendering issue for me and eishiya under recent QT 6 windows builds. With hardware acceleration turned on many types of images don't seem to render in the map editor. Interestingly, the tileset editor does render the tiles.

To Reproduce
Steps to reproduce the behavior:

  1. Open a map under windows 10
  2. Ensure hardware acceleration is turned on
  3. Observe tiles and image collection objects not rendering
  4. Turn off hardware acceleration
  5. Observe the images now starting to render

Expected behavior
The images should render.

Media
Map editor
image
Tileset editor
image

Have not tested on any other OS yet.

Specifications:

  • OS: Windows 10
  • Tiled Version: confirmed in latest master and also the Feb 15 "version less than" scripting utility commit has the issue
@dogboydog dogboydog added the bug Broken behavior. label Feb 17, 2023
@eishiya
Copy link
Contributor

eishiya commented Feb 17, 2023

I was initially able to reproduce this, but after restarting Tiled, everything is working fine. Very weird bug(?).

@dogboydog
Copy link
Contributor Author

dogboydog commented Feb 17, 2023

For me the issue persists after installing graphics drivers updates, rebooting, and trying to restart Tiled a few times. Also reproduced on a second Windows machine

@dogboydog
Copy link
Contributor Author

Reproduced on a Debian Linux VM as well.
image
image

@bjorn
Copy link
Member

bjorn commented Feb 21, 2023

Interestingly, the tileset editor does render the tiles.

Well, the tileset editor never uses hardware rendering. That option is limited to the map editor. :-)

Apart from being new in Qt 6, the issue appears to have something to do with the use of QPainter::drawPixmapFragments. When I disable that the rendering is fixed. So potentially something broke in case of multiple calls to this function.

@bjorn
Copy link
Member

bjorn commented Feb 22, 2023

Hmm, this still worked fine in Qt 6.3.2, so it's a regression somewhere in Qt 6.4. :-(

@bjorn bjorn added the qt issue Qt related issue. label Feb 22, 2023
@bjorn
Copy link
Member

bjorn commented Feb 22, 2023

Reported as QTBUG-111416.

bjorn added a commit to bjorn/tiled-dev that referenced this issue Feb 22, 2023
Work around an issue introduced in Qt 6.4.1 (QTBUG-111416) by not using
QPainter::drawPixmapFragments in OpenGL mode. This makes rendering tiles
a bit less efficient, but at least it works.

Closes mapeditor#3578
bjorn added a commit to bjorn/tiled-dev that referenced this issue Feb 23, 2023
Work around an issue introduced in Qt 6.4.1 (QTBUG-111416) by not using
QPainter::drawPixmapFragments in OpenGL mode. This makes rendering tiles
a bit less efficient, but at least it works.

Closes mapeditor#3578
bjorn added a commit that referenced this issue Feb 23, 2023
Work around an issue introduced in Qt 6.4.1 (QTBUG-111416) by not using
QPainter::drawPixmapFragments in OpenGL mode. This makes rendering tiles
a bit less efficient, but at least it works.

Closes #3578
@bjorn bjorn self-assigned this Feb 23, 2023
@bjorn bjorn added this to the Tiled 1.10 milestone Feb 23, 2023
@dogboydog
Copy link
Contributor Author

Thanks, it's fixed for me in the newest build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken behavior. qt issue Qt related issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants