WIP: freedreno: Fix dEQP-VK opquantize failures
This MR replaces ir3's ir3_cf()
optimization with new functionality in NIR, with the goal of fixing most of the dEQP-VK.spirv_assembly.instruction.graphics.opquantize.*
failures. It does not fix the tests dealing with inf
currently.
To that end, I allow the load_interpolated_input
intrinsic to have a destination type which we can set to fp16. Also, I add a new optimization pass nir_opt_mediump_texops()
that reduces the precision of texture operation inputs (e.g. coords, bias) to fp16. I understand that freedreno and also vc4 hardware can benefit from this.
The shader-db results are still overall regressing on freedreno, hence the WIP status. Notably, if a fragment shader consists of something like
#version 300 es
in lowp vec4 output_color;
out highp vec4 fragColor;
void main() {
fragColor = output_color;
}
we'll greedily change the precision of the load_interpolated_input
intrinsic to fp16 and then be unable to remove the f2f32
conversions required by the store_output
.
So, still WIP, but happy to get feedback on the approach.