v3d: enable uniform expression propagation from outputs to the next shader
This will take effect after nir_opt_varyings is enabled by another MR, and will fix existing shader compiler crashes thanks to better optimizations. For example, one GLSL program that failed to compile and had 226 VS instructions and 356 FS instructions in NIR will be reduced to 2 or 3 instructions per shader. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942>
This commit is contained in:
@@ -762,6 +762,7 @@ v3d_screen_get_compiler_options(struct pipe_screen *pscreen,
|
||||
.max_unroll_iterations = 16,
|
||||
.force_indirect_unrolling_sampler = true,
|
||||
.scalarize_ddx = true,
|
||||
.max_varying_expression_cost = 4,
|
||||
};
|
||||
|
||||
if (!initialized) {
|
||||
|
||||
Reference in New Issue
Block a user