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

Author: Dylan Baker <dy...@pnwbakers.com>
Date:   Thu Jun  7 10:58:06 2018 -0700

meson: Add support for SPARC assembly

This was blindly copied from autotools and tested by a helpful gentoo
user.

Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
Reviewed-by: Eric Engestrom <eric.engest...@intel.com>
Reviewed-by: Matt Turner <matts...@gmail.com>

---

 meson.build                | 5 +++++
 src/mapi/glapi/meson.build | 3 ++-
 src/mesa/meson.build       | 8 +++++++-
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index 16866d77ed..c78d34098f 100644
--- a/meson.build
+++ b/meson.build
@@ -896,6 +896,11 @@ if with_asm
       with_asm_arch = 'aarch64'
       pre_args += ['-DUSE_AARCH64_ASM']
     endif
+  elif host_machine.cpu_family() == 'sparc64'
+    if system_has_kms_drm
+      with_asm_arch = 'sparc'
+      pre_args += ['-DUSE_SPARC_ASM']
+    endif
   endif
 endif
 
diff --git a/src/mapi/glapi/meson.build b/src/mapi/glapi/meson.build
index e241d9ed38..2509e19eaa 100644
--- a/src/mapi/glapi/meson.build
+++ b/src/mapi/glapi/meson.build
@@ -64,8 +64,9 @@ else
     static_glapi_files += glapi_x86_s
   elif with_asm_arch == 'x86_64'
     static_glapi_files += glapi_x86_64_s
+  elif with_asm_arch == 'sparc'
+    static_glapi_files += glapi_sparc_s
   endif
-  # TODO: SPARC asm
 endif
 
 libglapi_static = static_library(
diff --git a/src/mesa/meson.build b/src/mesa/meson.build
index 24b5cc821c..8fb7db215c 100644
--- a/src/mesa/meson.build
+++ b/src/mesa/meson.build
@@ -649,8 +649,14 @@ if with_asm_arch == 'x86'
 elif with_asm_arch == 'x86_64'
   files_libmesa_common += files('x86-64/x86-64.h', 'x86-64/xform4.S')
   inc_libmesa_asm = include_directories('x86-64')
+elif with_asm_arch == 'sparc'
+  files_libmesa_common += files(
+    'sparc/sparc_clip.S',
+    'sparc/norm.S',
+    'sparc/xform.S',
+  )
+  inc_libmesa_asm = include_directories('sparc')
 endif
-# TODO: sparc
 
 format_fallback_c = custom_target(
   'format_fallback.c',

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

Reply via email to