diff options
author | Rhys Perry <[email protected]> | 2019-11-09 20:51:45 +0000 |
---|---|---|
committer | Rhys Perry <[email protected]> | 2019-11-15 17:36:21 +0000 |
commit | df645fa369d12be4d5e0fd9e4f6d4455caf2f4c3 (patch) | |
tree | edf4d5e28906aecb23581908f3e5bdb430570770 /src/amd/compiler/aco_opt_value_numbering.cpp | |
parent | be1d11249bde1e041f6eb9c0acedb041ab450c4b (diff) |
aco: implement VK_KHR_shader_float_controls
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 <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
Diffstat (limited to 'src/amd/compiler/aco_opt_value_numbering.cpp')
-rw-r--r-- | src/amd/compiler/aco_opt_value_numbering.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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(); |