From df645fa369d12be4d5e0fd9e4f6d4455caf2f4c3 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Sat, 9 Nov 2019 20:51:45 +0000 Subject: aco: implement VK_KHR_shader_float_controls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This actually supports more of the extension than the LLVM backend but we can't enable it because ACO doesn't work with all stages yet. With more of it enabled, some CTS tests fail because our 64-bit sqrt is very imprecise. I can't find any precision requirements for it anywhere, so I'm thinking it might be a CTS issue. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann --- src/amd/compiler/aco_opt_value_numbering.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/amd/compiler/aco_opt_value_numbering.cpp') diff --git a/src/amd/compiler/aco_opt_value_numbering.cpp b/src/amd/compiler/aco_opt_value_numbering.cpp index 803249637d5..40823da3c36 100644 --- a/src/amd/compiler/aco_opt_value_numbering.cpp +++ b/src/amd/compiler/aco_opt_value_numbering.cpp @@ -303,7 +303,8 @@ void process_block(vn_ctx& ctx, Block& block) Instruction* orig_instr = res.first->first; assert(instr->definitions.size() == orig_instr->definitions.size()); /* check if the original instruction dominates the current one */ - if (dominates(ctx, res.first->second, block.index)) { + if (dominates(ctx, res.first->second, block.index) && + ctx.program->blocks[res.first->second].fp_mode.canReplace(block.fp_mode)) { for (unsigned i = 0; i < instr->definitions.size(); i++) { assert(instr->definitions[i].regClass() == orig_instr->definitions[i].regClass()); ctx.renames[instr->definitions[i].tempId()] = orig_instr->definitions[i].getTemp(); -- cgit v1.2.3