gpu/shaders: update piet-gpu

Changes:

- fix BeginClip bounding box
- replace continue not supported by HLSL

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-04-09 11:16:21 +02:00
parent e9a020f774
commit 3a94f7bf70
3 changed files with 5 additions and 7 deletions
+2 -3
View File
@@ -386,13 +386,12 @@ void main() {
case Element_BeginClip:
Clip begin_clip = Element_BeginClip_read(this_ref);
AnnoBeginClip anno_begin_clip;
// This is the absolute bbox, it's been transformed during encoding.
anno_begin_clip.bbox = begin_clip.bbox;
if (is_stroke) {
vec2 lw = get_linewidth(st);
// This is the absolute bbox, it's been transformed during encoding.
anno_begin_clip.bbox = begin_clip.bbox + vec4(-lw, lw);
anno_begin_clip.linewidth = st.linewidth * sqrt(abs(st.mat.x * st.mat.w - st.mat.y * st.mat.z));
} else {
anno_begin_clip.bbox = begin_clip.bbox;
anno_fill.linewidth = 0.0;
}
out_ref = AnnotatedRef(conf.anno_alloc.offset + (st.path_count - 1) * Annotated_size);