mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
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:
parent
1e8e785a07
commit
6ac3f9d64e
2 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue