summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_shader.c
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2019-10-03 15:32:19 +0100
committerRhys Perry <[email protected]>2019-10-04 14:00:46 +0000
commita87b0f51410932e03f43a0f5c8ad21a9099e57df (patch)
treecdf9f51412dcf4c4b26d1c67237d97f89be4588a /src/amd/vulkan/radv_shader.c
parent0fe2e04f2d8e95ac6163ffa9e78e82d83aeb02e9 (diff)
radv/aco,aco: set lower_fmod
This simplifies ACO and allows the lowered code to be optimized (in particular, constant folded). Totals from affected shaders: SGPRS: 1776 -> 1776 (0.00 %) VGPRS: 1436 -> 1436 (0.00 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Private memory VGPRs: 0 -> 0 (0.00 %) Scratch size: 0 -> 0 (0.00 %) dwords per thread Code Size: 203452 -> 203564 (0.06 %) bytes LDS: 0 -> 0 (0.00 %) blocks Max Waves: 103 -> 103 (0.00 %) At least some of the code size increase seems to be from literals being applied to instructions as a result of constant folding. v2: remove fmod/frem handling in init_context() Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_shader.c')
-rw-r--r--src/amd/vulkan/radv_shader.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 09c5ce639c8..ee37c06b8ca 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -91,6 +91,7 @@ static const struct nir_shader_compiler_options nir_options_aco = {
.lower_flrp64 = true,
.lower_device_index_to_zero = true,
.lower_fdiv = true,
+ .lower_fmod = true,
.lower_bitfield_insert_to_bitfield_select = true,
.lower_bitfield_extract = true,
.lower_pack_snorm_2x16 = true,