From 6b52834ece91887b9c3d799ebfb57c8a026a0cfa Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Sun, 30 Oct 2022 02:24:36 +0300 Subject: [PATCH] anv: remove shader fp64 inspection after parsing Unfortunately some crucible tests are using all floating point widths in a single shader and specializing a variable to select what code path to use for a particular supported floating point width. This is reporting errors in the validation layers. Remove the validation for now. Signed-off-by: Lionel Landwerlin Fixes 8c4c4c3ee1a2 ("anv: Add softtp64 workaround") Reviewed-by: Caio Oliveira Reviewed-by: Mykhailo Skorokhodov Part-of: --- src/intel/vulkan/anv_pipeline.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index ef9b1f92751..87de5a90b4b 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -176,29 +176,6 @@ anv_nir_lower_mesh_ext(nir_shader *nir) &state); } -static bool -nir_shader_uses_64bit_alu(nir_shader *shader) -{ - nir_foreach_function(function, shader) { - if (!function->impl) - continue; - - nir_foreach_block(block, function->impl) { - nir_foreach_instr(instr, block) { - if (instr->type != nir_instr_type_alu) - continue; - nir_alu_instr *alu = nir_instr_as_alu(instr); - if (nir_alu_type_get_base_type(nir_op_infos[alu->op].output_type) != nir_type_float) - continue; - if (alu->dest.dest.ssa.bit_size == 64) - return true; - } - } - } - - return false; -} - /* Eventually, this will become part of anv_CreateShader. Unfortunately, * we can't do that yet because we don't have the ability to copy nir. */ @@ -320,9 +297,6 @@ anv_shader_stage_to_nir(struct anv_device *device, /* Vulkan uses the separate-shader linking model */ nir->info.separate_shader = true; - assert(device->info->has_64bit_float || instance->fp64_workaround_enabled || - !nir_shader_uses_64bit_alu(nir)); - brw_preprocess_nir(compiler, nir, device->fp64_nir); if (nir->info.stage == MESA_SHADER_MESH && !nir->info.mesh.nv) {