Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Move shader generation and upload to init path #353

Open
strassek opened this issue May 3, 2018 · 2 comments
Open

Move shader generation and upload to init path #353

strassek opened this issue May 3, 2018 · 2 comments

Comments

@strassek
Copy link
Contributor

strassek commented May 3, 2018

Currently we are generating shaders on-demand in the compositor draw path. This means we can't provide consistent draw latency, as compositions may be subject to blocking on shader gen/upload.

Pick a sensible max number of supported layers, and gen/upload shaders in bulk at program init. We will then reject requests for compositions that exceed that number.

Requirements:

  • The interface we use to tell the backend to do the gen/upload should be graphics API agnostic. i.e. for Vulkan we would generate a pipeline, not just the shader modules.

  • The process of loading shader binaries from storage and then uploading to gpu should happen sequentially, such that it becomes very unlikely that the shader binary memory goes cold before upload.

  • Get rid of LOAD_PREBUILT_SHADER_FILE and compile in prebuilt shader support by default

@js0701
Copy link
Contributor

js0701 commented Nov 19, 2018

See glprogram.cpp
the vertex shader and program shader are generated runtime based on the layer_count.
We can't implement this feature if the layer_count is dynamically changed.
We can decide a maximum layer_count, and then use a uniform for the real layercount,
in this case it still possible?

@js0701
Copy link
Contributor

js0701 commented Nov 19, 2018

After investitation, this feature is hard to be implemented by gles3.3 spec.
However it is feasible with gles4.2 afterwards. We can wait for this until mesa implement it

@stripes416 stripes416 removed their assignment Nov 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants