-
Notifications
You must be signed in to change notification settings - Fork 24
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
Best-effort rendering when GPU does not support full dataset #4424
Best-effort rendering when GPU does not support full dataset #4424
Conversation
… the hardware does not support accessing all textures at the same time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great stuff! 🥇
Thanks for making it very easy to test this.
I hit the limit using the nine-float-dataset on my machine and toggling the layers worked. The good thing is that the fast-toggling works very well due to your LRU implementation, also Chrome seems to be good at caching past shader compilations. We'll probably have to live with the fact that the initial compile time is rather high and users won't really know what's going on for now.
I was wondering, however, why I am able to open the nine-float-dataset on the master without any restrictions but wK complains on this branch. As I understand it, this could only happen if there was one layer with more textures than the others, but I don't think that's the case here? Do you know why this happens?
frontend/javascripts/oxalis/geometries/materials/plane_material_factory.js
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/geometries/materials/plane_material_factory.js
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/model/accessors/dataset_accessor.js
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/model/bucket_data_handling/data_rendering_logic.js
Show resolved
Hide resolved
frontend/javascripts/oxalis/model/bucket_data_handling/data_rendering_logic.js
Show resolved
Hide resolved
Hm, this is a good question. We should clarify this before merging. Let's talk about this next week! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
For the record: Daniels laptop supports 32 textures, which is why the dataset can be rendered on the current master. The MESA workaround had the effect that the dataset doesn't render completely on this branch. However, we think, that this is fine, since the performance with MESA and 32 textures is quite low, anyway. So, falling back to 16 is reasonable. |
Before, a client whose GPU didn't support enough data texture to render all layers of a dataset crashed when opening that dataset. This PR improves this in two ways:
MAX_TEXTURE_IMAGE_UNITS
is queried to check the client's compatibility with the current dataset.Regardless of how many layers are activated, the shaders are compiled so that exactly N layers are always accessed. If the user changes the layers so that a data texture has to be bound which wasn't on the GPU before, the shader is recompiled accordingly. The set of N layers which should be available on the GPU is determined by remembering the least-recently used (but currently disabled) layers. That way, fast toggling of a layer should always be possible without the performance hit which follows from the dynamic shader recompilation.
Todo:
URL of deployed dev instance (used for testing):
Steps to test:
nine_float_layer_dataset
)Issues:
Updated migration guide if applicableUpdated documentation if applicableAdapted wk-connect if datastore API changesNeeds datastore update after deployment