File: 11-arm64-support.patch

package info (click to toggle)
nvidia-texture-tools 2.0.8-1%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,312 kB
  • sloc: cpp: 22,495; ansic: 1,097; sh: 59; makefile: 10
file content (63 lines) | stat: -rw-r--r-- 2,173 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Title: ARM64 support
DEP: 3
Author: Martin Michlmayr <tbm@cyrius.com>
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790317
Last-Update: 2015-06-27
Applied-Upstream: https://github.com/castano/nvidia-texture-tools/commit/58617584d4d2541ff9fcfe23a9a492af86b11efb
Description:
 Adds ARM64 build support to nvtt.

--- nvidia-texture-tools-2.0.8-1+dfsg.orig/src/nvcore/Debug.cpp
+++ nvidia-texture-tools-2.0.8-1+dfsg/src/nvcore/Debug.cpp
@@ -221,6 +221,9 @@ namespace
 #		elif NV_CPU_PPC
 			ucontext_t * ucp = (ucontext_t *)secret;
 			return (void *) ucp->uc_mcontext.regs->nip;
+#		elif NV_CPU_ARM64
+			ucontext_t * ucp = (ucontext_t *)secret;
+			return (void *) ucp->uc_mcontext.pc;
 #		endif
 #	endif
 		
--- nvidia-texture-tools-2.0.8-1+dfsg.orig/src/nvcore/nvcore.h
+++ nvidia-texture-tools-2.0.8-1+dfsg/src/nvcore/nvcore.h
@@ -65,6 +65,7 @@
 // NV_CPU_X86_64
 // NV_CPU_PPC
 // NV_CPU_ARM
+// NV_CPU_ARM64
 
 #define NV_CPU_STRING 	POSH_CPU_STRING
 
@@ -76,6 +77,8 @@
 #	define NV_CPU_PPC 1
 #elif defined POSH_CPU_STRONGARM
 #	define NV_CPU_ARM 1
+#elif defined POSH_CPU_AARCH64
+#	define NV_CPU_ARM64 1
 #else
 #	error "Unsupported CPU"
 #endif
--- nvidia-texture-tools-2.0.8-1+dfsg.orig/src/nvcore/poshlib/posh.h
+++ nvidia-texture-tools-2.0.8-1+dfsg/src/nvcore/poshlib/posh.h
@@ -485,6 +485,11 @@ Metrowerks:
 #  define POSH_CPU_STRING "ARM"
 #endif
 
+#if defined __aarch64__
+#  define POSH_CPU_AARCH64 1
+#  define POSH_CPU_STRING "ARM64"
+#endif
+
 #if defined mips || defined __mips__ || defined __MIPS__ || defined _MIPS
 #  define POSH_CPU_MIPS 1 
 #  if defined _R5900
@@ -658,7 +663,7 @@ Metrowerks:
 ** the MIPS series, so we have to be careful about those.
 ** ----------------------------------------------------------------------------
 */
-#if defined POSH_CPU_X86 || defined POSH_CPU_AXP || defined POSH_CPU_STRONGARM || defined POSH_OS_WIN32 || defined POSH_OS_WINCE || defined __MIPSEL__
+#if defined POSH_CPU_X86 || defined POSH_CPU_AXP || defined POSH_CPU_STRONGARM || POSH_CPU_AARCH64 || defined POSH_OS_WIN32 || defined POSH_OS_WINCE || defined __MIPSEL__
 #  define POSH_ENDIAN_STRING "little"
 #  define POSH_LITTLE_ENDIAN 1
 #else