Mesa (main): svga: remove duplicate nir compile options

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 13 15:17:16 UTC 2022


Module: Mesa
Branch: main
Commit: 622e2ae08a86178fc518280d6266b03b7122ea64
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=622e2ae08a86178fc518280d6266b03b7122ea64

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Fri May 13 12:52:35 2022 +1000

svga: remove duplicate nir compile options

In a later merge request to remove the old GLSL IR loop unrolling
code we will add two additional compiler options stucts here. This
commit helps to avoid duplication getting out of hand.

Reviewed-by: Neha Bhende <bhenden at vmware.com>
Reviewed-by: Charmaine Lee <charmainel at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16489>

---

 src/gallium/drivers/svga/svga_screen.c | 39 +++++++++++++---------------------
 1 file changed, 15 insertions(+), 24 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 205f79783fe..b573fd00e35 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -757,38 +757,29 @@ vgpu10_get_shader_param(struct pipe_screen *screen,
    return 0;
 }
 
+#define COMMON_OPTIONS                                                        \
+   .lower_extract_byte = true,                                                \
+   .lower_extract_word = true,                                                \
+   .lower_insert_byte = true,                                                 \
+   .lower_insert_word = true,                                                 \
+   .lower_fdph = true,                                                        \
+   .lower_flrp64 = true,                                                      \
+   .lower_rotate = true,                                                      \
+   .lower_uniforms_to_ubo = true,                                             \
+   .lower_vector_cmp = true,                                                  \
+   .max_unroll_iterations = 32,                                               \
+   .use_interpolated_input_intrinsics = true
+
 static const nir_shader_compiler_options svga_vgpu9_compiler_options = {
+   COMMON_OPTIONS,
    .lower_bitops = true,
-   .lower_extract_byte = true,
-   .lower_extract_word = true,
-   .lower_insert_byte = true,
-   .lower_insert_word = true,
-   .lower_fdph = true,
-   .lower_flrp64 = true,
-   .lower_rotate = true,
-   .lower_uniforms_to_ubo = true,
-   .lower_vector_cmp = true,
-
-   .max_unroll_iterations = 32,
-   .use_interpolated_input_intrinsics = true,
 };
 
 static const nir_shader_compiler_options svga_vgpu10_compiler_options = {
+   COMMON_OPTIONS,
    .lower_doubles_options = nir_lower_dfloor,
-   .lower_extract_byte = true,
-   .lower_extract_word = true,
-   .lower_insert_byte = true,
-   .lower_insert_word = true,
-   .lower_fdph = true,
-   .lower_flrp64 = true,
    .lower_fmod = true,
    .lower_fpow = true,
-   .lower_rotate = true,
-   .lower_uniforms_to_ubo = true,
-   .lower_vector_cmp = true,
-
-   .max_unroll_iterations = 32,
-   .use_interpolated_input_intrinsics = true,
 };
 
 static const void *



More information about the mesa-commit mailing list