zink: enable loop unrolling for loops that have soft fp64
The info that a loop contains fp64 ops is lost after full software lowering. Therefore, specifically unroll these loops in zink instead of in vulkan, where the blown up body is no longer unrolled. This helps a lot in KHR-Single-GL46.arrays_of_arrays_gl.SubroutineFunctionCalls2. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
This commit is contained in:
@@ -3,7 +3,6 @@ GTF-GL46.gtf30.GL3Tests.sgis_texture_lod.sgis_texture_lod_basic_lod_selection,Fa
|
||||
GTF-GL46.gtf32.GL3Tests.draw_elements_base_vertex.draw_elements_base_vertex_invalid_mode,Fail
|
||||
|
||||
KHR-Single-GL46.arrays_of_arrays_gl.AtomicUsage,Fail
|
||||
KHR-Single-GL46.arrays_of_arrays_gl.SubroutineFunctionCalls2,Crash
|
||||
|
||||
# Turnip has maxFragmentInputComponents = 124, while GL requires
|
||||
# gl_MaxFragmentInputComponents >= 128
|
||||
|
@@ -394,6 +394,7 @@ zink_screen_init_compiler(struct zink_screen *screen)
|
||||
.has_txs = true,
|
||||
.lower_mul_2x32_64 = true,
|
||||
.support_16bit_alu = true, /* not quite what it sounds like */
|
||||
.max_unroll_iterations = 0,
|
||||
};
|
||||
|
||||
screen->nir_options = default_options;
|
||||
@@ -405,6 +406,10 @@ zink_screen_init_compiler(struct zink_screen *screen)
|
||||
screen->nir_options.lower_doubles_options = ~0;
|
||||
screen->nir_options.lower_flrp64 = true;
|
||||
screen->nir_options.lower_ffma64 = true;
|
||||
/* soft fp64 function inlining will blow up loop bodies and effectively
|
||||
* stop Vulkan drivers from unrolling the loops.
|
||||
*/
|
||||
screen->nir_options.max_unroll_iterations_fp64 = 32;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user