Closed Bug 2016125 Opened 7 months ago Closed 7 months ago

Add a repeating quad shader

Categories

(Core :: Graphics: WebRender, task, P3)

task

Tracking

()

RESOLVED FIXED
150 Branch
Tracking Status
firefox150 --- fixed

People

(Reporter: nical, Assigned: nical)

References

Details

Attachments

(7 files)

We want a specific shader for repeating small patterns over potentially large areas (as opposed to supporting repetitions in all other pattern shaders).

The repeating pattern code path will use it.

Attachment #9544236 - Attachment description: WIP: Bug 2016125 - WIP - Repeating pattern shader → Bug 2016125 - Add a repeating quad shader. r=gw

Now that pattern coordinates are in the same coordinate space as the primitive, we need some way to inform that the primitive
is offset when emitting tile repetitions on the CPU.

I am not very happy about this solution. The prepare_* functions in quad.rs have too many arguments already.
This is made somewhat worse by having to pass the extra offset everywhere we pass the pattern builder, so it may not be a big issue if we find a way to remove the shared pattern logic and just build the pattern early.
Another potential solution is to stop using the primitive template as the pattern builder and have it create something that implements pattern builder, so that that thing can maybe more easily be offset.

For now I propose that we stick with this less ideal solution and revisit towards the end of the project. By then the code will have changed enough that the best long-term solution will probably be easier to see.

Caching causes issues with SWGL specifically. Something to worry about later.

QA Whiteboard: [qa-triage-done-c151/b150]
Duplicate of this bug: 1887841
Regressions: 2057205
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: