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

[Impeller] Fix text jitter on Vulkan. #42792

Merged
merged 3 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion impeller/entity/shaders/glyph_atlas.frag
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ uniform FragInfo {
}
frag_info;

in vec2 v_uv;
in highp vec2 v_uv;

out f16vec4 frag_color;

Expand Down
17 changes: 9 additions & 8 deletions impeller/entity/shaders/glyph_atlas.vert
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@
// found in the LICENSE file.

#include <impeller/transform.glsl>
#include <impeller/types.glsl>

precision highp float;

uniform FrameInfo {
mat4 mvp;
mat4 entity_transform;
vec2 atlas_size;
vec2 offset;
highp mat4 mvp;
highp mat4 entity_transform;
highp vec2 atlas_size;
highp vec2 offset;
float is_translation_scale;
}
frame_info;

// XYWH.
in vec4 atlas_glyph_bounds;
in highp vec4 atlas_glyph_bounds;
// XYWH
in vec4 glyph_bounds;
in highp vec4 glyph_bounds;

in vec2 unit_position;
in highp vec2 unit_position;
in highp vec2 glyph_position;

out highp vec2 v_uv;
Expand Down
2 changes: 1 addition & 1 deletion impeller/entity/shaders/glyph_atlas_color.frag
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ uniform FragInfo {
}
frag_info;

in vec2 v_uv;
in highp vec2 v_uv;

out f16vec4 frag_color;

Expand Down
94 changes: 47 additions & 47 deletions impeller/tools/malioc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7557,16 +7557,16 @@
"type": "Vertex",
"variants": {
"Position": {
"fp16_arithmetic": 57,
"fp16_arithmetic": 0,
"has_stack_spilling": false,
"performance": {
"longest_path_bound_pipelines": [
"load_store"
],
"longest_path_cycles": [
0.359375,
0.359375,
0.171875,
0.515625,
0.515625,
0.140625,
0.0,
4.0,
0.0
Expand All @@ -7583,9 +7583,9 @@
"load_store"
],
"shortest_path_cycles": [
0.375,
0.375,
0.078125,
0.484375,
0.484375,
0.03125,
0.0,
4.0,
0.0
Expand All @@ -7594,30 +7594,30 @@
"load_store"
],
"total_cycles": [
0.59375,
0.59375,
0.1875,
0.737500011920929,
0.737500011920929,
0.15625,
0.0,
4.0,
0.0
]
},
"stack_spill_bytes": 0,
"thread_occupancy": 100,
"uniform_registers_used": 30,
"uniform_registers_used": 44,
"work_registers_used": 32
},
"Varying": {
"fp16_arithmetic": 100,
"fp16_arithmetic": 0,
"has_stack_spilling": false,
"performance": {
"longest_path_bound_pipelines": [
"load_store"
],
"longest_path_cycles": [
0.078125,
0.078125,
0.03125,
0.15625,
0.15625,
0.0,
0.0,
4.0,
0.0
Expand All @@ -7634,9 +7634,9 @@
"load_store"
],
"shortest_path_cycles": [
0.078125,
0.078125,
0.03125,
0.15625,
0.15625,
0.0,
0.0,
4.0,
0.0
Expand All @@ -7645,18 +7645,18 @@
"load_store"
],
"total_cycles": [
0.078125,
0.078125,
0.03125,
0.15625,
0.15625,
0.0,
0.0,
4.0,
0.0
]
},
"stack_spill_bytes": 0,
"thread_occupancy": 100,
"uniform_registers_used": 12,
"work_registers_used": 9
"uniform_registers_used": 14,
"work_registers_used": 11
}
}
},
Expand All @@ -7670,10 +7670,10 @@
"has_stack_spilling": false,
"performance": {
"longest_path_bound_pipelines": [
"arithmetic"
"load_store"
],
"longest_path_cycles": [
7.260000228881836,
6.929999828338623,
7.0,
0.0
],
Expand All @@ -7686,21 +7686,21 @@
"load_store"
],
"shortest_path_cycles": [
6.269999980926514,
5.940000057220459,
7.0,
0.0
],
"total_bound_pipelines": [
"arithmetic"
],
"total_cycles": [
9.333333015441895,
9.0,
7.0,
0.0
]
},
"thread_occupancy": 100,
"uniform_registers_used": 7,
"uniform_registers_used": 11,
"work_registers_used": 3
}
}
Expand Down Expand Up @@ -10964,16 +10964,16 @@
"type": "Vertex",
"variants": {
"Position": {
"fp16_arithmetic": 51,
"fp16_arithmetic": 0,
"has_stack_spilling": false,
"performance": {
"longest_path_bound_pipelines": [
"load_store"
],
"longest_path_cycles": [
0.328125,
0.328125,
0.15625,
0.5,
0.5,
0.140625,
0.0,
4.0,
0.0
Expand All @@ -10990,9 +10990,9 @@
"load_store"
],
"shortest_path_cycles": [
0.34375,
0.34375,
0.09375,
0.46875,
0.46875,
0.03125,
0.0,
4.0,
0.0
Expand All @@ -11001,29 +11001,29 @@
"load_store"
],
"total_cycles": [
0.546875,
0.546875,
0.171875,
0.71875,
0.71875,
0.15625,
0.0,
4.0,
0.0
]
},
"stack_spill_bytes": 0,
"thread_occupancy": 100,
"uniform_registers_used": 40,
"uniform_registers_used": 52,
"work_registers_used": 32
},
"Varying": {
"fp16_arithmetic": 66,
"fp16_arithmetic": 0,
"has_stack_spilling": false,
"performance": {
"longest_path_bound_pipelines": [
"load_store"
],
"longest_path_cycles": [
0.09375,
0.09375,
0.15625,
0.15625,
0.0,
0.0,
4.0,
Expand All @@ -11041,8 +11041,8 @@
"load_store"
],
"shortest_path_cycles": [
0.09375,
0.09375,
0.15625,
0.15625,
0.0,
0.0,
4.0,
Expand All @@ -11052,8 +11052,8 @@
"load_store"
],
"total_cycles": [
0.09375,
0.09375,
0.15625,
0.15625,
0.0,
0.0,
4.0,
Expand All @@ -11062,7 +11062,7 @@
},
"stack_spill_bytes": 0,
"thread_occupancy": 100,
"uniform_registers_used": 34,
"uniform_registers_used": 44,
"work_registers_used": 11
}
}
Expand Down