nir_to_tgsi: Run copy prop (and thus dce) after lower_bool_to_float.

Fixes some i915g instruction count failures by eliminating some MOVs from
translating b2f32s.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11744>
This commit is contained in:
Emma Anholt
2021-07-06 12:24:51 -07:00
committed by Marge Bot
parent 2008ec8a43
commit b4ad947135
3 changed files with 3 additions and 9 deletions
+3
View File
@@ -2797,6 +2797,9 @@ nir_to_tgsi(struct nir_shader *s,
} else {
NIR_PASS_V(s, nir_lower_int_to_float);
NIR_PASS_V(s, nir_lower_bool_to_float);
/* bool_to_float generates MOVs for b2f32 that we want to clean up. */
NIR_PASS_V(s, nir_copy_prop);
NIR_PASS_V(s, nir_opt_dce);
}
/* Only lower 32-bit floats. The only other modifier type officially
@@ -927,29 +927,21 @@ dEQP-GLES2.functional.uniform_api.random.71,Fail
dEQP-GLES2.functional.uniform_api.random.74,Fail
dEQP-GLES2.functional.uniform_api.random.80,Fail
dEQP-GLES2.functional.uniform_api.random.81,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.array_in_struct.int_ivec4_both,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.array_in_struct.mat4_mat2_both,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.array_in_struct.mat4_mat2_fragment,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.array_in_struct.sampler2D_samplerCube_both,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.array_in_struct.sampler2D_samplerCube_fragment,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.basic_array.mat4_both,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.basic_array.mat4_fragment,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.multiple_basic_array.both,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.multiple_nested_structs_arrays.both,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.multiple_nested_structs_arrays.fragment,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.nested_structs_arrays.float_vec4_both,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.nested_structs_arrays.int_ivec4_both,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.nested_structs_arrays.mat4_mat2_fragment,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.struct_in_array.mat4_mat2_both,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.struct_in_array.mat4_mat2_fragment,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_value.render.array_in_struct.int_ivec4_both,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_value.render.array_in_struct.sampler2D_samplerCube_both,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_value.render.array_in_struct.sampler2D_samplerCube_fragment,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_value.render.multiple_basic_array.both,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_value.render.multiple_nested_structs_arrays.both,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_value.render.multiple_nested_structs_arrays.fragment,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_value.render.nested_structs_arrays.float_vec4_both,Fail
dEQP-GLES2.functional.uniform_api.value.assigned.by_value.render.nested_structs_arrays.int_ivec4_both,Fail
dEQP-GLES2.functional.uniform_api.value.initial.render.array_in_struct.mat4_mat2_both,Fail
dEQP-GLES2.functional.uniform_api.value.initial.render.array_in_struct.mat4_mat2_fragment,Fail
dEQP-GLES2.functional.uniform_api.value.initial.render.basic_array.mat4_both,Fail
@@ -483,7 +483,6 @@ spec@ext_texture_srgb@texwrap formats-s3tc bordercolor@GL_COMPRESSED_SLUMINANCE_
spec@ext_texture_srgb@texwrap formats-s3tc bordercolor@GL_COMPRESSED_SRGB- border color only,Fail
spec@ext_texture_srgb@texwrap formats-s3tc bordercolor@GL_COMPRESSED_SRGB_ALPHA- border color only,Fail
spec@ext_texture_srgb@texwrap formats-s3tc bordercolor@GL_COMPRESSED_SRGB_S3TC_DXT1_EXT- border color only,Fail
spec@glsl-1.10@execution@built-in-functions@fs-atan-vec2-vec2,Fail
spec@glsl-1.10@execution@built-in-functions@fs-atan-vec3-vec3,Fail
spec@glsl-1.10@execution@built-in-functions@fs-atan-vec4-vec4,Fail
spec@glsl-1.10@execution@built-in-functions@fs-cos-float,Fail