From b24bdc96b7ad6ecc53b8e6a6bd3b0478ad1dfbd1 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 3 Apr 2023 18:53:17 -0700 Subject: [PATCH] [Impeller] convert blend shaders to half precision (flutter/engine#40897) [Impeller] convert blend shaders to half precision --- .../shader_lib/impeller/blending.glsl | 138 ++++++------ .../shader_lib/impeller/branching.glsl | 20 ++ .../shader_lib/impeller/constants.glsl | 5 + .../shaders/blending/advanced_blend.glsl | 38 ++-- .../blending/advanced_blend_color.frag | 3 +- .../blending/advanced_blend_colorburn.frag | 3 +- .../blending/advanced_blend_colordodge.frag | 3 +- .../blending/advanced_blend_darken.frag | 3 +- .../blending/advanced_blend_difference.frag | 3 +- .../blending/advanced_blend_exclusion.frag | 3 +- .../blending/advanced_blend_hardlight.frag | 3 +- .../shaders/blending/advanced_blend_hue.frag | 3 +- .../blending/advanced_blend_lighten.frag | 3 +- .../blending/advanced_blend_luminosity.frag | 3 +- .../blending/advanced_blend_multiply.frag | 3 +- .../blending/advanced_blend_overlay.frag | 3 +- .../blending/advanced_blend_saturation.frag | 3 +- .../blending/advanced_blend_screen.frag | 3 +- .../blending/advanced_blend_softlight.frag | 3 +- .../entity/shaders/blending/blend.frag | 6 +- .../blending/ios/framebuffer_blend.glsl | 16 +- .../blending/ios/framebuffer_blend_color.frag | 3 +- .../ios/framebuffer_blend_colorburn.frag | 3 +- .../ios/framebuffer_blend_colordodge.frag | 3 +- .../ios/framebuffer_blend_darken.frag | 3 +- .../ios/framebuffer_blend_difference.frag | 3 +- .../ios/framebuffer_blend_exclusion.frag | 3 +- .../ios/framebuffer_blend_hardlight.frag | 3 +- .../blending/ios/framebuffer_blend_hue.frag | 3 +- .../ios/framebuffer_blend_lighten.frag | 3 +- .../ios/framebuffer_blend_luminosity.frag | 3 +- .../ios/framebuffer_blend_multiply.frag | 3 +- .../ios/framebuffer_blend_overlay.frag | 3 +- .../ios/framebuffer_blend_saturation.frag | 3 +- .../ios/framebuffer_blend_screen.frag | 3 +- .../ios/framebuffer_blend_softlight.frag | 3 +- engine/src/flutter/impeller/tools/malioc.json | 206 +++++++++--------- 37 files changed, 289 insertions(+), 230 deletions(-) diff --git a/engine/src/flutter/impeller/compiler/shader_lib/impeller/blending.glsl b/engine/src/flutter/impeller/compiler/shader_lib/impeller/blending.glsl index f92e6bc4ab..dc2fd13827 100644 --- a/engine/src/flutter/impeller/compiler/shader_lib/impeller/blending.glsl +++ b/engine/src/flutter/impeller/compiler/shader_lib/impeller/blending.glsl @@ -7,46 +7,48 @@ #include #include +#include //------------------------------------------------------------------------------ /// HSV utilities. /// -float IPLuminosity(vec3 color) { - return color.r * 0.3 + color.g * 0.59 + color.b * 0.11; +float16_t IPLuminosity(f16vec3 color) { + return color.r * 0.3hf + color.g * 0.59hf + color.b * 0.11hf; } /// Scales the color's luma by the amount necessary to place the color /// components in a 1-0 range. -vec3 IPClipColor(vec3 color) { - float lum = IPLuminosity(color); - float mn = min(min(color.r, color.g), color.b); - float mx = max(max(color.r, color.g), color.b); +f16vec3 IPClipColor(f16vec3 color) { + float16_t lum = IPLuminosity(color); + float16_t mn = min(min(color.r, color.g), color.b); + float16_t mx = max(max(color.r, color.g), color.b); // `lum - mn` and `mx - lum` will always be >= 0 in the following conditions, // so adding a tiny value is enough to make these divisions safe. - if (mn < 0) { - color = lum + (((color - lum) * lum) / (lum - mn + kEhCloseEnough)); + if (mn < 0.0hf) { + color = lum + (((color - lum) * lum) / (lum - mn + kEhCloseEnoughHalf)); } - if (mx > 1) { - color = lum + (((color - lum) * (1 - lum)) / (mx - lum + kEhCloseEnough)); + if (mx > 1.0hf) { + color = lum + + (((color - lum) * (1.0hf - lum)) / (mx - lum + kEhCloseEnoughHalf)); } return color; } -vec3 IPSetLuminosity(vec3 color, float luminosity) { - float relative_lum = luminosity - IPLuminosity(color); +f16vec3 IPSetLuminosity(f16vec3 color, float16_t luminosity) { + float16_t relative_lum = luminosity - IPLuminosity(color); return IPClipColor(color + relative_lum); } -float IPSaturation(vec3 color) { +float16_t IPSaturation(f16vec3 color) { return max(max(color.r, color.g), color.b) - min(min(color.r, color.g), color.b); } -vec3 IPSetSaturation(vec3 color, float saturation) { - float mn = min(min(color.r, color.g), color.b); - float mx = max(max(color.r, color.g), color.b); - return (mn < mx) ? ((color - mn) * saturation) / (mx - mn) : vec3(0); +f16vec3 IPSetSaturation(f16vec3 color, float16_t saturation) { + float16_t mn = min(min(color.r, color.g), color.b); + float16_t mx = max(max(color.r, color.g), color.b); + return (mn < mx) ? ((color - mn) * saturation) / (mx - mn) : f16vec3(0.0hf); } //------------------------------------------------------------------------------ @@ -58,134 +60,136 @@ vec3 IPSetSaturation(vec3 color, float saturation) { /// applied to the destination using `SourceOver` alpha compositing. /// -vec3 IPBlendScreen(vec3 dst, vec3 src) { +f16vec3 IPBlendScreen(f16vec3 dst, f16vec3 src) { // https://www.w3.org/TR/compositing-1/#blendingscreen return dst + src - (dst * src); } -vec3 IPBlendHardLight(vec3 dst, vec3 src) { +f16vec3 IPBlendHardLight(f16vec3 dst, f16vec3 src) { // https://www.w3.org/TR/compositing-1/#blendinghardlight - return IPVec3Choose(dst * (2 * src), IPBlendScreen(dst, 2 * src - 1), src); + return IPHalfVec3Choose(dst * (2.0hf * src), + IPBlendScreen(dst, 2.0hf * src - 1.0hf), src); } -vec3 IPBlendOverlay(vec3 dst, vec3 src) { +f16vec3 IPBlendOverlay(f16vec3 dst, f16vec3 src) { // https://www.w3.org/TR/compositing-1/#blendingoverlay // HardLight, but with reversed parameters. return IPBlendHardLight(src, dst); } -vec3 IPBlendDarken(vec3 dst, vec3 src) { +f16vec3 IPBlendDarken(f16vec3 dst, f16vec3 src) { // https://www.w3.org/TR/compositing-1/#blendingdarken return min(dst, src); } -vec3 IPBlendLighten(vec3 dst, vec3 src) { +f16vec3 IPBlendLighten(f16vec3 dst, f16vec3 src) { // https://www.w3.org/TR/compositing-1/#blendinglighten return max(dst, src); } -vec3 IPBlendColorDodge(vec3 dst, vec3 src) { +f16vec3 IPBlendColorDodge(f16vec3 dst, f16vec3 src) { // https://www.w3.org/TR/compositing-1/#blendingcolordodge - vec3 color = min(vec3(1), dst / (1 - src)); + f16vec3 color = min(f16vec3(1.0hf), dst / (1.0hf - src)); - if (dst.r < kEhCloseEnough) { - color.r = 0; + if (dst.r < kEhCloseEnoughHalf) { + color.r = 0.0hf; } - if (dst.g < kEhCloseEnough) { - color.g = 0; + if (dst.g < kEhCloseEnoughHalf) { + color.g = 0.0hf; } - if (dst.b < kEhCloseEnough) { - color.b = 0; + if (dst.b < kEhCloseEnoughHalf) { + color.b = 0.0hf; } - if (1 - src.r < kEhCloseEnough) { - color.r = 1; + if (1.0hf - src.r < kEhCloseEnoughHalf) { + color.r = 1.0hf; } - if (1 - src.g < kEhCloseEnough) { - color.g = 1; + if (1.0hf - src.g < kEhCloseEnoughHalf) { + color.g = 1.0hf; } - if (1 - src.b < kEhCloseEnough) { - color.b = 1; + if (1.0hf - src.b < kEhCloseEnoughHalf) { + color.b = 1.0hf; } return color; } -vec3 IPBlendColorBurn(vec3 dst, vec3 src) { +f16vec3 IPBlendColorBurn(f16vec3 dst, f16vec3 src) { // https://www.w3.org/TR/compositing-1/#blendingcolorburn - vec3 color = 1 - min(vec3(1), (1 - dst) / src); + f16vec3 color = 1.0hf - min(f16vec3(1.0hf), (1.0hf - dst) / src); - if (1 - dst.r < kEhCloseEnough) { - color.r = 1; + if (1.0hf - dst.r < kEhCloseEnoughHalf) { + color.r = 1.0hf; } - if (1 - dst.g < kEhCloseEnough) { - color.g = 1; + if (1.0hf - dst.g < kEhCloseEnoughHalf) { + color.g = 1.0hf; } - if (1 - dst.b < kEhCloseEnough) { - color.b = 1; + if (1.0hf - dst.b < kEhCloseEnoughHalf) { + color.b = 1.0hf; } - if (src.r < kEhCloseEnough) { - color.r = 0; + if (src.r < kEhCloseEnoughHalf) { + color.r = 0.0hf; } - if (src.g < kEhCloseEnough) { - color.g = 0; + if (src.g < kEhCloseEnoughHalf) { + color.g = 0.0hf; } - if (src.b < kEhCloseEnough) { - color.b = 0; + if (src.b < kEhCloseEnoughHalf) { + color.b = 0.0hf; } return color; } -vec3 IPBlendSoftLight(vec3 dst, vec3 src) { +f16vec3 IPBlendSoftLight(f16vec3 dst, f16vec3 src) { // https://www.w3.org/TR/compositing-1/#blendingsoftlight - vec3 D = IPVec3ChooseCutoff(((16 * dst - 12) * dst + 4) * dst, // - sqrt(dst), // - dst, // - 0.25); + f16vec3 D = + IPHalfVec3ChooseCutoff(((16.0hf * dst - 12.0hf) * dst + 4.0hf) * dst, // + sqrt(dst), // + dst, // + 0.25hf); - return IPVec3Choose(dst - (1 - 2 * src) * dst * (1 - dst), // - dst + (2 * src - 1) * (D - dst), // - src); + return IPHalfVec3Choose(dst - (1.0hf - 2.0hf * src) * dst * (1.0hf - dst), // + dst + (2.0hf * src - 1.0hf) * (D - dst), // + src); } -vec3 IPBlendDifference(vec3 dst, vec3 src) { +f16vec3 IPBlendDifference(f16vec3 dst, f16vec3 src) { // https://www.w3.org/TR/compositing-1/#blendingdifference return abs(dst - src); } -vec3 IPBlendExclusion(vec3 dst, vec3 src) { +f16vec3 IPBlendExclusion(f16vec3 dst, f16vec3 src) { // https://www.w3.org/TR/compositing-1/#blendingexclusion - return dst + src - 2 * dst * src; + return dst + src - 2.0hf * dst * src; } -vec3 IPBlendMultiply(vec3 dst, vec3 src) { +f16vec3 IPBlendMultiply(f16vec3 dst, f16vec3 src) { // https://www.w3.org/TR/compositing-1/#blendingmultiply return dst * src; } -vec3 IPBlendHue(vec3 dst, vec3 src) { +f16vec3 IPBlendHue(f16vec3 dst, f16vec3 src) { // https://www.w3.org/TR/compositing-1/#blendinghue return IPSetLuminosity(IPSetSaturation(src, IPSaturation(dst)), IPLuminosity(dst)); } -vec3 IPBlendSaturation(vec3 dst, vec3 src) { +f16vec3 IPBlendSaturation(f16vec3 dst, f16vec3 src) { // https://www.w3.org/TR/compositing-1/#blendingsaturation return IPSetLuminosity(IPSetSaturation(dst, IPSaturation(src)), IPLuminosity(dst)); } -vec3 IPBlendColor(vec3 dst, vec3 src) { +f16vec3 IPBlendColor(f16vec3 dst, f16vec3 src) { // https://www.w3.org/TR/compositing-1/#blendingcolor return IPSetLuminosity(src, IPLuminosity(dst)); } -vec3 IPBlendLuminosity(vec3 dst, vec3 src) { +f16vec3 IPBlendLuminosity(f16vec3 dst, f16vec3 src) { // https://www.w3.org/TR/compositing-1/#blendingluminosity return IPSetLuminosity(dst, IPLuminosity(src)); } diff --git a/engine/src/flutter/impeller/compiler/shader_lib/impeller/branching.glsl b/engine/src/flutter/impeller/compiler/shader_lib/impeller/branching.glsl index bfa00b62dc..4441e6a561 100644 --- a/engine/src/flutter/impeller/compiler/shader_lib/impeller/branching.glsl +++ b/engine/src/flutter/impeller/compiler/shader_lib/impeller/branching.glsl @@ -49,4 +49,24 @@ vec3 IPVec3Choose(vec3 a, vec3 b, vec3 value) { return IPVec3ChooseCutoff(a, b, value, 0.5); } +/// Perform a branchless greater than check for each vec3 component. +/// +/// Returns 1.0 if x > y, otherwise 0.0. +f16vec3 IPHalfVec3IsGreaterThan(f16vec3 x, f16vec3 y) { + return max(sign(x - y), float16_t(0.0hf)); +} + +/// For each vec3 component, if value > cutoff, return b, otherwise return a. +f16vec3 IPHalfVec3ChooseCutoff(f16vec3 a, + f16vec3 b, + f16vec3 value, + float16_t cutoff) { + return mix(a, b, IPHalfVec3IsGreaterThan(value, f16vec3(cutoff))); +} + +/// For each vec3 component, if value > 0.5, return b, otherwise return a. +f16vec3 IPHalfVec3Choose(f16vec3 a, f16vec3 b, f16vec3 value) { + return IPHalfVec3ChooseCutoff(a, b, value, float16_t(0.5hf)); +} + #endif diff --git a/engine/src/flutter/impeller/compiler/shader_lib/impeller/constants.glsl b/engine/src/flutter/impeller/compiler/shader_lib/impeller/constants.glsl index 423f4dbd73..dc429b57a7 100644 --- a/engine/src/flutter/impeller/compiler/shader_lib/impeller/constants.glsl +++ b/engine/src/flutter/impeller/compiler/shader_lib/impeller/constants.glsl @@ -5,8 +5,13 @@ #ifndef CONSTANTS_GLSL_ #define CONSTANTS_GLSL_ +#include + const float kEhCloseEnough = 0.000001; +// 1/1024. +const float16_t kEhCloseEnoughHalf = 0.0009765625hf; + // 1 / (2 * pi) const float k1Over2Pi = 0.1591549430918; diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.glsl b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.glsl index 916abf8277..cb8aaa7d1d 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.glsl +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.glsl @@ -8,21 +8,21 @@ #include uniform BlendInfo { - float dst_input_alpha; - float color_factor; - vec4 color; // This color input is expected to be unpremultiplied. + float16_t dst_input_alpha; + float16_t color_factor; + f16vec4 color; // This color input is expected to be unpremultiplied. } blend_info; -uniform sampler2D texture_sampler_dst; -uniform sampler2D texture_sampler_src; +uniform f16sampler2D texture_sampler_dst; +uniform f16sampler2D texture_sampler_src; in vec2 v_dst_texture_coords; in vec2 v_src_texture_coords; -out vec4 frag_color; +out f16vec4 frag_color; -vec4 Sample(sampler2D texture_sampler, vec2 texture_coords) { +f16vec4 Sample(f16sampler2D texture_sampler, vec2 texture_coords) { // gles 2.0 is the only backend without native decal support. #ifdef IMPELLER_TARGET_OPENGLES return IPSampleDecal(texture_sampler, texture_coords); @@ -32,20 +32,20 @@ vec4 Sample(sampler2D texture_sampler, vec2 texture_coords) { } void main() { - vec4 dst_sample = Sample(texture_sampler_dst, // sampler - v_dst_texture_coords // texture coordinates - ) * - blend_info.dst_input_alpha; + f16vec4 dst_sample = Sample(texture_sampler_dst, // sampler + v_dst_texture_coords // texture coordinates + ) * + blend_info.dst_input_alpha; - vec4 dst = IPUnpremultiply(dst_sample); - vec4 src = - blend_info.color_factor > 0 - ? blend_info.color - : IPUnpremultiply(Sample(texture_sampler_src, // sampler - v_src_texture_coords // texture coordinates - )); + f16vec4 dst = IPHalfUnpremultiply(dst_sample); + f16vec4 src = blend_info.color_factor > 0.0hf + ? blend_info.color + : IPHalfUnpremultiply(Sample( + texture_sampler_src, // sampler + v_src_texture_coords // texture coordinates + )); - vec4 blended = vec4(Blend(dst.rgb, src.rgb), 1) * dst.a; + f16vec4 blended = f16vec4(Blend(dst.rgb, src.rgb), 1.0hf) * dst.a; frag_color = mix(dst_sample, blended, src.a); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_color.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_color.frag index 225bd3f098..439a3598c9 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_color.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_color.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendColor(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_colorburn.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_colorburn.frag index 95aac01645..80b747f6c3 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_colorburn.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_colorburn.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendColorBurn(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_colordodge.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_colordodge.frag index f11fc5e685..c6356530bb 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_colordodge.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_colordodge.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendColorDodge(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_darken.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_darken.frag index 286b7ff291..95c8802433 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_darken.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_darken.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendDarken(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_difference.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_difference.frag index 9d9320fdff..1ccea9890e 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_difference.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_difference.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendDifference(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_exclusion.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_exclusion.frag index 7c2f9f9299..2f613ec109 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_exclusion.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_exclusion.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendExclusion(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_hardlight.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_hardlight.frag index aa126dfdc7..7a5d77cd38 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_hardlight.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_hardlight.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendHardLight(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_hue.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_hue.frag index c0355b4b00..2fee599fd4 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_hue.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_hue.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendHue(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_lighten.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_lighten.frag index 32f2df082b..c10ea8f0d4 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_lighten.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_lighten.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendLighten(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_luminosity.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_luminosity.frag index 4ceae64493..082a69ce70 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_luminosity.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_luminosity.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendLuminosity(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_multiply.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_multiply.frag index a2fd42b6c7..4034a42a3f 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_multiply.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_multiply.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendMultiply(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_overlay.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_overlay.frag index 0837b91d8b..520e356433 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_overlay.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_overlay.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendOverlay(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_saturation.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_saturation.frag index c3fd3bebc8..abd9cba668 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_saturation.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_saturation.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendSaturation(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_screen.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_screen.frag index f65ab5db1d..5d429d8676 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_screen.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_screen.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendScreen(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_softlight.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_softlight.frag index 3a504afbb9..2fa7182060 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_softlight.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_softlight.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendSoftLight(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/blend.frag b/engine/src/flutter/impeller/entity/shaders/blending/blend.frag index 85e1d7a5a0..0c83645eb2 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/blend.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/blend.frag @@ -5,16 +5,16 @@ #include #include -uniform sampler2D texture_sampler_src; +uniform f16sampler2D texture_sampler_src; uniform FragInfo { - float input_alpha; + float16_t input_alpha; } frag_info; in vec2 v_texture_coords; -out vec4 frag_color; +out f16vec4 frag_color; void main() { frag_color = diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend.glsl b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend.glsl index 181e6ca9fd..1bf7dea573 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend.glsl +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend.glsl @@ -31,14 +31,14 @@ in vec2 v_src_texture_coords; out vec4 frag_color; void main() { - vec4 dst_sample = ReadDestination(); - vec4 dst = IPUnpremultiply(dst_sample); - vec4 src = - IPUnpremultiply(texture(texture_sampler_src, // sampler - v_src_texture_coords // texture coordinates - )); + f16vec4 dst_sample = f16vec4(ReadDestination()); + f16vec4 dst = IPHalfUnpremultiply(dst_sample); + f16vec4 src = IPHalfUnpremultiply( + f16vec4(texture(texture_sampler_src, // sampler + v_src_texture_coords // texture coordinates + ))); - vec4 blended = vec4(Blend(dst.rgb, src.rgb), 1) * dst.a; + f16vec4 blended = f16vec4(Blend(dst.rgb, src.rgb), 1.0hf) * dst.a; - frag_color = mix(dst_sample, blended, src.a); + frag_color = vec4(mix(dst_sample, blended, src.a)); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_color.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_color.frag index fee29215b1..062bff86ac 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_color.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_color.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendColor(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colorburn.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colorburn.frag index bfbfb9dd40..25b44f7a13 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colorburn.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colorburn.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendColorBurn(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colordodge.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colordodge.frag index e89b27dc7f..d4985dd389 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colordodge.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colordodge.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendColorDodge(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_darken.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_darken.frag index 9e865c289e..77006e1e94 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_darken.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_darken.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendDarken(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_difference.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_difference.frag index e66cab545b..6dbc7bd12d 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_difference.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_difference.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendDifference(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_exclusion.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_exclusion.frag index 5c6b1ada4a..96164a0d3e 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_exclusion.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_exclusion.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendExclusion(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hardlight.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hardlight.frag index f3e1215a82..88d88db11b 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hardlight.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hardlight.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendHardLight(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hue.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hue.frag index b9e1cefb05..e30ded1bc3 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hue.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hue.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendHue(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_lighten.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_lighten.frag index dd480737af..55fb6f0d06 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_lighten.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_lighten.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendLighten(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_luminosity.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_luminosity.frag index 66ba223e62..75478e6641 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_luminosity.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_luminosity.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendLuminosity(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_multiply.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_multiply.frag index 3d8ec54b8e..fa3e5330a3 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_multiply.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_multiply.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendMultiply(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_overlay.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_overlay.frag index f412766d4f..61ecb34b2b 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_overlay.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_overlay.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendOverlay(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_saturation.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_saturation.frag index 4e6b1e7947..f8bd56858e 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_saturation.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_saturation.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendSaturation(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_screen.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_screen.frag index c1412a46c0..ba96978e30 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_screen.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_screen.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendScreen(dst, src); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_softlight.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_softlight.frag index a13caaa1a6..1aec3e1715 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_softlight.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_softlight.frag @@ -3,8 +3,9 @@ // found in the LICENSE file. #include +#include -vec3 Blend(vec3 dst, vec3 src) { +f16vec3 Blend(f16vec3 dst, f16vec3 src) { return IPBlendSoftLight(dst, src); } diff --git a/engine/src/flutter/impeller/tools/malioc.json b/engine/src/flutter/impeller/tools/malioc.json index b34a59e2b6..67e0e271cc 100644 --- a/engine/src/flutter/impeller/tools/malioc.json +++ b/engine/src/flutter/impeller/tools/malioc.json @@ -124,7 +124,7 @@ "uses_late_zs_update": false, "variants": { "Main": { - "fp16_arithmetic": 59, + "fp16_arithmetic": 88, "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ @@ -132,9 +132,9 @@ "arith_fma" ], "longest_path_cycles": [ - 0.65625, - 0.65625, - 0.328125, + 0.59375, + 0.59375, + 0.28125, 0.25, 0.0, 0.5, @@ -167,9 +167,9 @@ "arith_fma" ], "total_cycles": [ - 0.65625, - 0.65625, - 0.375, + 0.59375, + 0.59375, + 0.328125, 0.25, 0.0, 0.5, @@ -179,7 +179,7 @@ "stack_spill_bytes": 0, "thread_occupancy": 100, "uniform_registers_used": 10, - "work_registers_used": 15 + "work_registers_used": 12 } } } @@ -197,7 +197,7 @@ "uses_late_zs_update": false, "variants": { "Main": { - "fp16_arithmetic": 70, + "fp16_arithmetic": 100, "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ @@ -205,9 +205,9 @@ "texture" ], "longest_path_cycles": [ - 0.4375, - 0.296875, - 0.4375, + 0.421875, + 0.265625, + 0.421875, 0.3125, 0.0, 0.5, @@ -227,9 +227,9 @@ "arith_cvt" ], "shortest_path_cycles": [ - 0.421875, - 0.265625, - 0.421875, + 0.40625, + 0.234375, + 0.40625, 0.25, 0.0, 0.25, @@ -240,9 +240,9 @@ "texture" ], "total_cycles": [ - 0.484375, - 0.296875, - 0.484375, + 0.46875, + 0.265625, + 0.46875, 0.3125, 0.0, 0.5, @@ -251,7 +251,7 @@ }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 8, + "uniform_registers_used": 12, "work_registers_used": 15 } } @@ -270,7 +270,7 @@ "uses_late_zs_update": false, "variants": { "Main": { - "fp16_arithmetic": 65, + "fp16_arithmetic": 100, "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ @@ -278,9 +278,9 @@ "texture" ], "longest_path_cycles": [ - 0.4375, - 0.265625, - 0.4375, + 0.421875, + 0.234375, + 0.421875, 0.3125, 0.0, 0.5, @@ -300,9 +300,9 @@ "arith_cvt" ], "shortest_path_cycles": [ - 0.421875, - 0.234375, - 0.421875, + 0.40625, + 0.203125, + 0.40625, 0.25, 0.0, 0.25, @@ -313,9 +313,9 @@ "texture" ], "total_cycles": [ - 0.484375, - 0.265625, - 0.484375, + 0.46875, + 0.234375, + 0.46875, 0.3125, 0.0, 0.5, @@ -324,8 +324,8 @@ }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 8, - "work_registers_used": 15 + "uniform_registers_used": 12, + "work_registers_used": 13 } } } @@ -637,7 +637,7 @@ "uses_late_zs_update": false, "variants": { "Main": { - "fp16_arithmetic": 69, + "fp16_arithmetic": 91, "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ @@ -645,9 +645,9 @@ "arith_fma" ], "longest_path_cycles": [ - 0.762499988079071, - 0.762499988079071, - 0.5, + 0.699999988079071, + 0.699999988079071, + 0.453125, 0.3125, 0.0, 0.5, @@ -680,9 +680,9 @@ "arith_fma" ], "total_cycles": [ - 0.762499988079071, - 0.762499988079071, - 0.578125, + 0.699999988079071, + 0.699999988079071, + 0.53125, 0.3125, 0.0, 0.5, @@ -692,7 +692,7 @@ "stack_spill_bytes": 0, "thread_occupancy": 100, "uniform_registers_used": 10, - "work_registers_used": 15 + "work_registers_used": 13 } } } @@ -783,7 +783,7 @@ "uses_late_zs_update": false, "variants": { "Main": { - "fp16_arithmetic": 59, + "fp16_arithmetic": 88, "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ @@ -791,9 +791,9 @@ "arith_fma" ], "longest_path_cycles": [ - 0.65625, - 0.65625, - 0.328125, + 0.59375, + 0.59375, + 0.28125, 0.25, 0.0, 0.5, @@ -826,9 +826,9 @@ "arith_fma" ], "total_cycles": [ - 0.65625, - 0.65625, - 0.375, + 0.59375, + 0.59375, + 0.328125, 0.25, 0.0, 0.5, @@ -838,7 +838,7 @@ "stack_spill_bytes": 0, "thread_occupancy": 100, "uniform_registers_used": 10, - "work_registers_used": 15 + "work_registers_used": 12 } } } @@ -1002,7 +1002,7 @@ "uses_late_zs_update": false, "variants": { "Main": { - "fp16_arithmetic": 69, + "fp16_arithmetic": 91, "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ @@ -1010,9 +1010,9 @@ "arith_fma" ], "longest_path_cycles": [ - 0.762499988079071, - 0.762499988079071, - 0.5, + 0.699999988079071, + 0.699999988079071, + 0.453125, 0.3125, 0.0, 0.5, @@ -1045,9 +1045,9 @@ "arith_fma" ], "total_cycles": [ - 0.762499988079071, - 0.762499988079071, - 0.578125, + 0.699999988079071, + 0.699999988079071, + 0.53125, 0.3125, 0.0, 0.5, @@ -1057,7 +1057,7 @@ "stack_spill_bytes": 0, "thread_occupancy": 100, "uniform_registers_used": 10, - "work_registers_used": 15 + "work_registers_used": 13 } } } @@ -3687,16 +3687,16 @@ "uses_late_zs_update": false, "variants": { "Main": { - "fp16_arithmetic": 82, + "fp16_arithmetic": 100, "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ "arith_total", - "arith_fma" + "arith_sfu" ], "longest_path_cycles": [ - 0.65625, - 0.65625, + 0.625, + 0.59375, 0.53125, 0.625, 0.0, @@ -3727,11 +3727,11 @@ ], "total_bound_pipelines": [ "arith_total", - "arith_fma" + "arith_sfu" ], "total_cycles": [ - 0.65625, - 0.65625, + 0.625, + 0.59375, 0.578125, 0.625, 0.0, @@ -3741,7 +3741,7 @@ }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 12, + "uniform_registers_used": 10, "work_registers_used": 20 } } @@ -4531,7 +4531,7 @@ "uses_late_zs_update": false, "variants": { "Main": { - "fp16_arithmetic": 86, + "fp16_arithmetic": 100, "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ @@ -4539,8 +4539,8 @@ "arith_fma" ], "longest_path_cycles": [ - 0.762499988079071, - 0.762499988079071, + 0.699999988079071, + 0.699999988079071, 0.6875, 0.6875, 0.0, @@ -4575,7 +4575,7 @@ ], "total_cycles": [ 0.78125, - 0.762499988079071, + 0.699999988079071, 0.78125, 0.6875, 0.0, @@ -4585,7 +4585,7 @@ }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 12, + "uniform_registers_used": 10, "work_registers_used": 21 } } @@ -4771,16 +4771,16 @@ "uses_late_zs_update": false, "variants": { "Main": { - "fp16_arithmetic": 82, + "fp16_arithmetic": 100, "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ "arith_total", - "arith_fma" + "arith_sfu" ], "longest_path_cycles": [ - 0.65625, - 0.65625, + 0.625, + 0.59375, 0.53125, 0.625, 0.0, @@ -4811,11 +4811,11 @@ ], "total_bound_pipelines": [ "arith_total", - "arith_fma" + "arith_sfu" ], "total_cycles": [ - 0.65625, - 0.65625, + 0.625, + 0.59375, 0.578125, 0.625, 0.0, @@ -4825,7 +4825,7 @@ }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 12, + "uniform_registers_used": 10, "work_registers_used": 20 } } @@ -5133,7 +5133,7 @@ "uses_late_zs_update": false, "variants": { "Main": { - "fp16_arithmetic": 86, + "fp16_arithmetic": 100, "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ @@ -5141,8 +5141,8 @@ "arith_fma" ], "longest_path_cycles": [ - 0.762499988079071, - 0.762499988079071, + 0.699999988079071, + 0.699999988079071, 0.6875, 0.6875, 0.0, @@ -5177,7 +5177,7 @@ ], "total_cycles": [ 0.78125, - 0.762499988079071, + 0.699999988079071, 0.78125, 0.6875, 0.0, @@ -5187,7 +5187,7 @@ }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 12, + "uniform_registers_used": 10, "work_registers_used": 21 } } @@ -9817,7 +9817,7 @@ "uses_late_zs_update": false, "variants": { "Main": { - "fp16_arithmetic": 12, + "fp16_arithmetic": 34, "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ @@ -9861,9 +9861,9 @@ "arith_cvt" ], "total_cycles": [ - 0.5625, + 0.546875, 0.5, - 0.5625, + 0.546875, 0.375, 0.0, 0.25, @@ -12852,7 +12852,7 @@ "uses_late_zs_update": false, "variants": { "Main": { - "fp16_arithmetic": 15, + "fp16_arithmetic": 34, "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ @@ -12862,8 +12862,8 @@ "longest_path_cycles": [ 0.421875, 0.421875, - 0.359375, - 0.3125, + 0.328125, + 0.25, 0.0, 0.25, 0.25 @@ -12884,8 +12884,8 @@ "shortest_path_cycles": [ 0.328125, 0.328125, - 0.21875, - 0.3125, + 0.1875, + 0.25, 0.0, 0.25, 0.0 @@ -12897,8 +12897,8 @@ "total_cycles": [ 0.453125, 0.453125, - 0.421875, - 0.3125, + 0.375, + 0.25, 0.0, 0.25, 0.25 @@ -12906,8 +12906,8 @@ }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 20, - "work_registers_used": 16 + "uniform_registers_used": 18, + "work_registers_used": 15 } } } @@ -12925,7 +12925,7 @@ "uses_late_zs_update": false, "variants": { "Main": { - "fp16_arithmetic": 20, + "fp16_arithmetic": 31, "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ @@ -12951,13 +12951,13 @@ ], "shortest_path_bound_pipelines": [ "arith_total", - "arith_sfu" + "arith_fma" ], "shortest_path_cycles": [ - 0.3125, 0.28125, - 0.1875, - 0.3125, + 0.28125, + 0.171875, + 0.25, 0.0, 0.25, 0.0 @@ -12966,10 +12966,10 @@ "load_store" ], "total_cycles": [ - 0.6875, - 0.5625, - 0.6875, - 0.375, + 0.65625, + 0.546875, + 0.65625, + 0.3125, 4.0, 0.25, 0.0 @@ -12978,7 +12978,7 @@ "stack_spill_bytes": 0, "thread_occupancy": 100, "uniform_registers_used": 16, - "work_registers_used": 20 + "work_registers_used": 18 } } }