summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-06-03 13:40:05 -0700
committerKenneth Graunke <[email protected]>2019-06-05 16:45:12 -0700
commitf4d4c426084127d88aba11f22b4f33ff93700963 (patch)
tree0879d6145acb170d0b8553250e7d8397b34d3a3b /src/gallium/drivers
parente0641e0728aa21b884408794abff07857824cc6f (diff)
radeonsi: Enable NIR's lower_fmod option.
Currently, st/mesa is always calling the GLSL IR lower_instructions() pass with MOD_TO_FLOOR set, so mod operations will be lowered before ever reaching NIR. This enables the same lowering at the NIR level, which will let me shut off the GLSL IR path for NIR-based drivers. The AMD NIR backend also has code to handle fmod, so we could potentially skip this and still be fine. I don't have an opinion on that. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_get.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c
index 8217c10d9c9..40a54b34c4f 100644
--- a/src/gallium/drivers/radeonsi/si_get.c
+++ b/src/gallium/drivers/radeonsi/si_get.c
@@ -486,6 +486,7 @@ static const struct nir_shader_compiler_options nir_options = {
.lower_fdiv = true,
.lower_sub = true,
.lower_ffma = true,
+ .lower_fmod = true,
.lower_pack_snorm_2x16 = true,
.lower_pack_snorm_4x8 = true,
.lower_pack_unorm_2x16 = true,