Module: Mesa
Branch: master
Commit: 723b000d279310d83ef48ff9c5bee51ae89e1ade
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=723b000d279310d83ef48ff9c5bee51ae89e1ade

Author: Rhys Perry <pendingchao...@gmail.com>
Date:   Wed Apr  7 19:18:09 2021 +0100

radv: don't use fp16 for 8-bit division lowering before GFX9

Signed-off-by: Rhys Perry <pendingchao...@gmail.com>
Reviewed-by: Timur Kristóf <timur.kris...@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10081>

---

 src/amd/vulkan/radv_pipeline.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 614b5598f4e..eef7a2b5947 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -3320,10 +3320,11 @@ radv_create_shaders(struct radv_pipeline *pipeline, 
struct radv_device *device,
          if (!radv_use_llvm_for_stage(device, i))
             nir_opt_idiv_const(nir[i], 8);
 
-         nir_lower_idiv(nir[i], &(nir_lower_idiv_options){
-                                   .imprecise_32bit_lowering = false,
-                                   .allow_fp16 = true,
-                                });
+         nir_lower_idiv(nir[i],
+                        &(nir_lower_idiv_options){
+                           .imprecise_32bit_lowering = false,
+                           .allow_fp16 = 
device->physical_device->rad_info.chip_class >= GFX9,
+                        });
 
          nir_opt_sink(nir[i], nir_move_load_input | nir_move_const_undef | 
nir_move_copies);
          nir_opt_move(nir[i], nir_move_load_input | nir_move_const_undef | 
nir_move_copies);

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to