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

Sometimes it looks like there's too many batch commands generated per single draw call #1282

Open
ksuprynowicz opened this issue Dec 27, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@ksuprynowicz
Copy link
Member

ksuprynowicz commented Dec 27, 2024

For example single web entity here seems to use 18 command calls, including two setPipeline calls:
image

@ksuprynowicz ksuprynowicz added the bug Something isn't working label Dec 27, 2024
@HifiExperiments
Copy link
Member

interesting! web entity doRender is pretty simple, it accounts for the last setResourceTexture through draw at the end:

batch.setResourceTexture(0, _texture);

I wonder if the setPipeline is coming from something else that early exits from drawing?

or it could be related to web entities being useOwnPipeline, maybe there’s some set up we do that isn’t necessary for those

@JulianGro
Copy link
Member

Without having much idea about this stuff: Web entities have a refresh rate property. Maybe these commands appear multiple times, if the web entity refresh rate is set higher than the current render rate?

@HifiExperiments
Copy link
Member

good idea but the refresh rate/actual drawing of the web page is handled separately by Qt, which then is converted to a texture by us somewhere different (actually using pure OpenGL calls, not batch commands, if I remember correctly).

@ksuprynowicz
Copy link
Member Author

good idea but the refresh rate/actual drawing of the web page is handled separately by Qt, which then is converted to a texture by us somewhere different (actually using pure OpenGL calls, not batch commands, if I remember correctly).

Can you point me to the place there these OpenGL calls are? This would be extremely helpful since I'm working on web textures for Vulkan branch currently. I'm doing it using shared GPU memory between OpenGL and Vulkan.

@HifiExperiments
Copy link
Member

yes! it's very hard to follow from the code but it ends up coming from RenderEventHandler::qmlRender. the other functions in that class also have raw GL commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants