mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 15:45:38 +00:00
d23514fd58
The old renderer is still the default, so the new compute renderer will only be used in the rare case the old renderer is not supported but the new is. That happens on the Samsung J2 Prime and Moto C Android phones. Or set the GIORENDERER environment variable to "forcecompute" to disable the old renderer: $ GIORENDERER=forcecompute go run ... Missing features: - Gradients are not supported yet, and render as a solid color. - Draw timers are not added, and profile.Events are not emitted. - Stroked paths may in some cases appear corrupted because their clip outlines are not continuous when generated by Gio. Sebastien is working on a fix. - The new renderer shares most CPU-side logic with the old renderer, resulting in several inefficient conversion steps between the old operations representation and the new. This is slower, but minimizes divergence in features and bugs between the two renderers. Roadmap: - The compute renderer supports features that Gio does not yet exploit: stroked paths with round caps, transformations, lines, cubic beziér curves. - More stroke styles and maybe dashed strokes natively in shaders. - Metal and Direct3D ports. The most important feature is porting the renderer to run on the CPU. A CPU renderer will both support Gio on devices with insufficient GPU support, and allow us to remove the old renderer. Two renderers is twice the maintenance but the feature set of the weakest implementation. Signed-off-by: Elias Naur <mail@eliasnaur.com>
23 lines
381 B
GLSL
23 lines
381 B
GLSL
#version 310 es
|
|
|
|
// SPDX-License-Identifier: Unlicense OR MIT
|
|
|
|
precision highp float;
|
|
|
|
void main() {
|
|
switch (gl_VertexIndex) {
|
|
case 0:
|
|
gl_Position = vec4(-1.0, +1.0, 0.0, 1.0);
|
|
break;
|
|
case 1:
|
|
gl_Position = vec4(+1.0, +1.0, 0.0, 1.0);
|
|
break;
|
|
case 2:
|
|
gl_Position = vec4(-1.0, -1.0, 0.0, 1.0);
|
|
break;
|
|
case 3:
|
|
gl_Position = vec4(+1.0, -1.0, 0.0, 1.0);
|
|
break;
|
|
}
|
|
}
|