Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upwebrender should probably include the shader source directly and not read it from the filesystem #352
Comments
|
Long term I think this is the plan. But right now this is needed to be able to develop with a reasonable workflow since changing a compiled in shader would require a full servo rebuild. |
|
cc @glennw |
|
Doesn't webrender_traits prevent needing to do a servo rebuild? |
|
webrender_traits prevents a serialization of the dependency tree, allowing more stuff to compile in parallel. You'll still have to rebuild any crates that depend (transitively) on webrender. This probably means you can skip the script crate build, but not the servo crate one (including the final link). This is a lot of hassle compared to instantaneous shader reload with the file system watcher while running. |
|
It does, but it's still much slower to build and link WR than it is to tweak shaders unfortunately. We do need a solution though that embeds the shaders for distribution. |
|
I assume we'll switch to |
|
I think the plan here would be to have a build step that includes the shader source in WR. By default, WR would use these, however it would also look in a particular location (probably ../webrender/webrender/res/ from the servo directory) and load these as overrides if they are present. This would mean we don't need to copy the shaders to deploy, but still get the benefit of fast iteration time when developing. |
|
I may do this real quick -- it just bit me (replace'd wr with local version, WR since servo's lock had modified shaders but no version bump), and would make updating WR easier in servo. I'll likely do this with a |
|
FWIW doing this now would be really timely since it's blocking having "runnable" quantum-render builds in automation. (i.e. running these QR builds fails because it can't find the res directory). I can work around it in Firefox build packaging but it would be nicer to not have to. |
|
@vvuk Just curious, why not use include_bytes or include_str instead of a build script which generates source code? |
compile in shaders to webrender instead of requiring a res directory Fixes issue #352. res directory can be used to override. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/563) <!-- Reviewable:end -->
This will make distribution easier and avoids these being user modifiable.