[PATCH 0/1] MR7703: d2d1: Add [loop] attribute in sample_gradient() shader function.
Skips loop unrolling when compiling the shader, which lowers compilation time from ~80ms to ~40ms on my machine, which might preempt stutters for applications that call d2d_device_context_init() many times. This can help [CW bug 25000](https://www.codeweavers.com/support/bugs/browse/?cmd=bug_edit;bug_id=25000). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7703
From: Francisco Casas <fcasas(a)codeweavers.com> Skips loop unrolling when compiling the shader, which lowers compilation time from ~80ms to ~40ms on my machine, which might preempt stutters for applications that call d2d_device_context_init() many times. --- dlls/d2d1/device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c index e0eb8dd1dd0..99f1fc10450 100644 --- a/dlls/d2d1/device.c +++ b/dlls/d2d1/device.c @@ -3771,6 +3771,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target, " if (position < p_low)\n" " return c_low;\n" "\n" + " [loop]\n" " for (i = 1; i < stop_count; ++i)\n" " {\n" " p_high = gradient.Load(i * 2).x;\n" -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7703
Either that, or we could compile this once. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7703#note_99430
I would recommend doing both things. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7703#note_99910
This merge request was approved by Elizabeth Figura. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7703
This merge request was approved by Nikolay Sivov. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7703
participants (4)
-
Elizabeth Figura (@zfigura) -
Francisco Casas -
Francisco Casas (@fcasas) -
Nikolay Sivov (@nsivov)