Module: Mesa Branch: main Commit: 1663b045924227074848d3f08d8572f4fbf31161 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1663b045924227074848d3f08d8572f4fbf31161
Author: Timothy Arceri <[email protected]> Date: Fri May 6 11:40:57 2022 +1000 i915g: switch to NIR loop unrolling Shader-db stats: total instructions in shared programs: 406749 -> 406890 (0.03%) instructions in affected programs: 216 -> 357 (65.28%) total tex_indirect in shared programs: 12666 -> 12671 (0.04%) tex_indirect in affected programs: 29 -> 34 (17.24%) total temps in shared programs: 23447 -> 23451 (0.02%) temps in affected programs: 296 -> 300 (1.35%) total const in shared programs: 59400 -> 59455 (0.09%) const in affected programs: 50 -> 105 (110.00%) LOST: 0 GAINED: 17 Reviewed-by: Emma Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16543> --- src/gallium/drivers/i915/ci/i915-g33-fails.txt | 5 ----- src/gallium/drivers/i915/i915_screen.c | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/i915/ci/i915-g33-fails.txt b/src/gallium/drivers/i915/ci/i915-g33-fails.txt index fb63cabeb34..1b941f7d9d6 100644 --- a/src/gallium/drivers/i915/ci/i915-g33-fails.txt +++ b/src/gallium/drivers/i915/ci/i915-g33-fails.txt @@ -25,8 +25,6 @@ dEQP-GLES2.functional.shaders.builtin_variable.frontfacing,Fail dEQP-GLES2.functional.shaders.functions.control_flow.mixed_return_break_continue_fragment,Fail dEQP-GLES2.functional.shaders.functions.control_flow.return_after_continue_fragment,Fail -dEQP-GLES2.functional.shaders.functions.control_flow.return_in_loop_if_fragment,Fail -dEQP-GLES2.functional.shaders.functions.control_flow.return_in_nested_loop_fragment,Fail dEQP-GLES2.functional.shaders.indexing.tmp_array.float_const_write_dynamic_read_fragment,Fail dEQP-GLES2.functional.shaders.indexing.tmp_array.vec2_const_write_dynamic_read_fragment,Fail dEQP-GLES2.functional.shaders.indexing.tmp_array.vec3_const_write_dynamic_read_fragment,Fail @@ -859,8 +857,6 @@ [email protected]@execution@interpolation@interpolation-none-gl_frontsecondarycolor [email protected]@execution@loops@glsl-fs-continue-inside-do-while,Fail [email protected]@execution@loops@glsl-fs-loop-300,Fail [email protected]@execution@loops@glsl-fs-loop-continue,Fail [email protected]@execution@loops@glsl-fs-loop-redundant-condition,Fail [email protected]@execution@loops@glsl-fs-loop-shadow-variables,Fail [email protected]@execution@loops@glsl-fs-unroll-out-param,Fail [email protected]@execution@loops@glsl-fs-unroll-side-effect,Fail @@ -882,7 +878,6 @@ [email protected]@execution@samplers@glsl-fs-shadow2d-clamp-z,Fail [email protected]@execution@samplers@glsl-fs-shadow2dproj,Fail [email protected]@execution@samplers@glsl-fs-shadow2dproj-bias,Fail [email protected]@execution@temp-array-indexing@glsl-fs-vec4-indexing-temp-dst-in-loop,Fail [email protected]@execution@temp-array-indexing@glsl-fs-vec4-indexing-temp-dst-in-nested-loop-combined,Fail [email protected]@execution@temp-array-indexing@glsl-fs-vec4-indexing-temp-src-in-loop,Fail [email protected]@execution@temp-array-indexing@glsl-fs-vec4-indexing-temp-src-in-nested-loop-combined,Fail diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c index 658d6275e78..d359209fd9f 100644 --- a/src/gallium/drivers/i915/i915_screen.c +++ b/src/gallium/drivers/i915/i915_screen.c @@ -122,6 +122,7 @@ static const nir_shader_compiler_options i915_compiler_options = { .use_interpolated_input_intrinsics = true, .force_indirect_unrolling = nir_var_all, .force_indirect_unrolling_sampler = true, + .max_unroll_iterations = 32, }; static const struct nir_shader_compiler_options gallivm_nir_options = { @@ -368,10 +369,9 @@ i915_get_shader_param(struct pipe_screen *screen, enum pipe_shader_type shader, case PIPE_SHADER_CAP_MAX_SHADER_IMAGES: case PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTERS: case PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTER_BUFFERS: + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: return 0; - case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: - return 32; default: debug_printf("%s: Unknown cap %u.\n", __FUNCTION__, cap); return 0;
