Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 5a824e2

Browse files
[Impeller] ensure precision is matched between fragment and vertex stage for PowerVR GPU bug (#51974)
According to https://registry.khronos.org/vulkan/specs/1.3/html/vkspec.html#interfaces-iointerfaces-matching , we shouldn't have to do this, but alas. On the PowerVR GPU in the Samsung SM T220, precision mismatches are causing rendering problems. Fix this by ensuring the precision matches. Fixes flutter/flutter#143573
1 parent 0226114 commit 5a824e2

File tree

6 files changed

+70
-70
lines changed

6 files changed

+70
-70
lines changed

impeller/entity/shaders/blending/porter_duff_blend.vert

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ in vec2 texture_coords;
1616
in vec4 color;
1717

1818
out vec2 v_texture_coords;
19-
out f16vec4 v_color;
19+
out mediump f16vec4 v_color;
2020

2121
void main() {
2222
gl_Position = frame_info.mvp * vec4(vertices, 0.0, 1.0);

impeller/entity/shaders/glyph_atlas.vert

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ in vec2 glyph_position;
2525

2626
out vec2 v_uv;
2727

28-
IMPELLER_MAYBE_FLAT out f16vec4 v_text_color;
28+
IMPELLER_MAYBE_FLAT out mediump f16vec4 v_text_color;
2929

3030
mat4 basis(mat4 m) {
3131
return mat4(m[0][0], m[0][1], m[0][2], 0.0, //

impeller/entity/shaders/position_color.vert

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ frame_info;
1313
in vec2 position;
1414
in vec4 color;
1515

16-
out f16vec4 v_color;
16+
out mediump f16vec4 v_color;
1717

1818
void main() {
1919
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);

impeller/entity/shaders/solid_fill.vert

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ frame_info;
1212

1313
in vec2 position;
1414

15-
IMPELLER_MAYBE_FLAT out f16vec4 v_color;
15+
IMPELLER_MAYBE_FLAT out mediump f16vec4 v_color;
1616

1717
void main() {
1818
v_color = frame_info.color;

impeller/entity/shaders/texture_fill.vert

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ in vec2 position;
1616
in vec2 texture_coords;
1717

1818
out vec2 v_texture_coords;
19-
IMPELLER_MAYBE_FLAT out float16_t v_alpha;
19+
IMPELLER_MAYBE_FLAT out mediump float16_t v_alpha;
2020

2121
void main() {
2222
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);

0 commit comments

Comments
 (0)