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

Option to configure CommandBufferQueue size. #2057

Closed
roxlu opened this issue Jan 21, 2020 · 4 comments
Closed

Option to configure CommandBufferQueue size. #2057

roxlu opened this issue Jan 21, 2020 · 4 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@roxlu
Copy link
Contributor

roxlu commented Jan 21, 2020

I'm rendering a scene with ~3000 items that share ~100 meshes and it seems that the CommandBufferQueue is running out of space. In Allocators.h I see the buffer sizes, but I'm wondering how to change the size; or maybe there is another way to render 3000 items?

@romainguy romainguy added the enhancement New feature or request label Jan 22, 2020
@romainguy
Copy link
Collaborator

I talked to @pixelflinger and this is pretty much what we wanted to add. It was just never a priority so far. We'd love a test scene if you have one (a glTF file would work great if that's not a problem for you).

@pixelflinger
Copy link
Collaborator

I had to increase CONFIG_PER_RENDER_PASS_ARENA_SIZE to 3 MiB, CONFIG_PER_FRAME_COMMANDS_SIZE to 2 MiB and CONFIG_MIN_COMMAND_BUFFERS_SIZE to 3 MiB to be able to render a ~3400 items scene.

We will make this user-settable at Engine creation time eventually. Also maybe we could increase the defaults a bit.

@roxlu
Copy link
Contributor Author

roxlu commented Jul 8, 2020

I want to look into this and wondering how we can make the buffer sizes configurable. I've looked into some files and found the following buffer sizes which should be configurable. In Allocators.h we have:

  • CONFIG_PER_RENDER_PASS_ARENA_SIZE
  • CONFIG_PER_FRAME_COMMANDS_SIZE
  • CONFIG_MIN_COMMAND_BUFFERS_SIZE

And in OpenGLDriver.cpp we have:

  • mHandleArena("Handles", 2U * 1024U * 1024U),

I didn't find other buffer sizes which should be configurable; but there might be more.

@pixelflinger and @romainguy what are you thoughts on this? Should we create Builders for these too?

@roxlu
Copy link
Contributor Author

roxlu commented Aug 6, 2020

@romainguy what about using #defines so you can at least configure them? This could be added in 5min and we have a solution that works for now.

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

No branches or pull requests

3 participants