Conversation
laurenz-canva
force-pushed
the
laurenz/reduce_slots
branch
from
October 1, 2026 10:58
e6bb774 to
23fa98b
Compare
laurenz-canva
added this pull request to stack #1969
October 1, 2026 11:00
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #1858, we changed the shader so it could allow binding up to four images at the same time in a single draw call. This was to reduce the number of draw calls that will be performed when rendering many images.
However, after some investigation yesterday, I realized that this change caused significant regressions to the shader compile time on certain devices (in my case a MacBook on Chrome 103 running Sierra), where I'm seeing a lag of around 2 seconds because of this. With this change, this drops to around 600ms. The reason seems to be that our code for sampling an image is quite large, because we need to handle NN, bilinear and bicubic sampling. By having four images in the shader and a branch for each slot, this code essentially needs to be duplicated four times, and I guess on some machines this has a very detrimental effect on compile times. Therefore, we temporarily revert this for now.
I've tried to keep the changes minimal so that we can easily re-add this in the future once we feel ready and made other adjustments.