Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.

Terrible framerate on MacOS #52

Open
vpicaver opened this issue Feb 27, 2019 · 13 comments
Open

Terrible framerate on MacOS #52

vpicaver opened this issue Feb 27, 2019 · 13 comments

Comments

@vpicaver
Copy link

vpicaver commented Feb 27, 2019

When I load Sponza (from glTF-Sample-Models repo) into the AssetPipelineEditor, it runs at an unusable 2FPS. I've also experienced very slow framerates with the kuesa's car example. Loading the same scene into Blender 2.8 using Eevee, its an a reasonable framerate. I'm currently running on 2018 Mac Book Pro with Radean Pro 560X.

@lemirep
Copy link
Collaborator

lemirep commented Feb 27, 2019

Hi. Thanks for the report. I'll ask my colleagues on Mac to see if they have something similar.

@mkrus
Copy link
Member

mkrus commented Feb 28, 2019

Hi, Sponza is indeed very slow on my identical MBP.

Looking at apitrace, it's drawing loads of objects ping-pong-ing between 2 sets of textures, too many context changes...

@mkrus
Copy link
Member

mkrus commented Feb 28, 2019

Pull request #54 fixes this

@mkrus mkrus closed this as completed Feb 28, 2019
@vpicaver
Copy link
Author

vpicaver commented Mar 7, 2019

I'm still getting fairly slow performance, even with the sorting patch. After running AssetPipelineEditor through Instruments, it looks like Qt3D is causing the AMD driver to re-compile a fragment shader every frame! See screenshot:

screen shot 2019-03-07 at 4 20 51 pm

I think you should re-open this bug.

@mkrus
Copy link
Member

mkrus commented Mar 7, 2019

will investigate

@mkrus mkrus reopened this Mar 7, 2019
@vpicaver
Copy link
Author

gltf.zip

Here's another very small example that causes the issue. I think it also blinks because it's recompiling the fragment shader ever frame.

@mkrus
Copy link
Member

mkrus commented Mar 13, 2019

@vpicaver if you're building your own qt3d 5.12, please test https://codereview.qt-project.org/#/c/255678/ see if it fixes the issue for you. Thanks!

@vpicaver
Copy link
Author

@mkrus After applying the patch, I see a slight improvement. Textureless models are buttery smooth as before. Models with textures still suffer from shader compiling performance overhead. The patch does prevent the models from blinking. I get the same performance profile with the patch. Did you test patch with a model with multiple textured objects? It took me a bit to build qt from source. Future reviews should take me less time.

@mkrus
Copy link
Member

mkrus commented Mar 16, 2019

Thanks for trying!

Other slow models: TextureSettingsTest, VC...

@jcelerier
Copy link
Contributor

wondering about this : couldn't it be caused by the following mac QtWidgets issue, for the APE ? https://codereview.qt-project.org/#/c/251381/

@mkrus
Copy link
Member

mkrus commented Mar 21, 2019

I don't think, I think that would cause the frame rate to always be bad. Current slowness appears to kick in when texture binding changes for the same shader from one draw call to the next. In that case if appears it recompiles the shader for every draw call. Sounds like a driver bug to me.

@vpicaver
Copy link
Author

How do we report the driver bug so it get's fixed? It sounds like apple doesn't really care about OpenGL anymore but it seems like a clear regression in functionality. Does it happen on other Mac's with different drivers?

@larrylin28
Copy link

larrylin28 commented Sep 4, 2020

Was there any progress on this issue? I hit the same issue on Qt 5.14

I'm using a SceneLoader which loads a static model but still got this issue, is there any workaround that I can do to prevent texture binding change if that's the problem?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants