Skip to content

vello_gpu: Revert to only binding 1 external texture per draw - #1968

Open
LaurenzV wants to merge 1 commit into
mainfrom
laurenz/reduce_slots
Open

LaurenzV wants to merge 1 commit into
mainfrom
laurenz/reduce_slots

Conversation

@LaurenzV

@LaurenzV LaurenzV commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

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.

@LaurenzV
LaurenzV requested a review from grebmeg October 1, 2026 05:57
@laurenz-canva
laurenz-canva added this pull request to stack #1969 October 1, 2026 11:00

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant