radv: enable lower_fmod for the LLVM path
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 3 Oct 2019 14:20:40 +0000 (16:20 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 3 Oct 2019 16:15:14 +0000 (18:15 +0200)
This lowers fmod and frem at NIR level like RadeonSI. fmod is
already lowered directly in NIR->LLVM, and frem will be lowered by
LLVM anyways.

This fixes a LLVM crash with:
dEQP-VK.glsl.builtin.precision_fp16_storage32b.frem.compute.scalar.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_shader.c

index 18608d8a9beae9a9c730ec7222d3b6e83c96fe23..09c5ce639c8734a2781603ebf970d4f060e86ac6 100644 (file)
@@ -61,6 +61,7 @@ static const struct nir_shader_compiler_options nir_options_llvm = {
        .lower_device_index_to_zero = true,
        .lower_fsat = true,
        .lower_fdiv = true,
+       .lower_fmod = true,
        .lower_bitfield_insert_to_bitfield_select = true,
        .lower_bitfield_extract = true,
        .lower_sub = true,