freebsd-ports/graphics/nvidia-texture-tools/files/patch-src-nvcore-Debug.cpp
Dmitry Marakasov 464602e87a The NVIDIA Texture Tools is a collection of image processing and
texture manipulation tools, designed to be integrated in game tools
and asset conditioning pipelines.

The primary features of the library are mipmap and normal map
generation, format conversion and DXT compression.

DXT compression is based on Simon Brown's squish library. The library
also contains an alternative GPU-accelerated compressor that uses
CUDA and is one order of magnitude faster.

WWW: http://code.google.com/p/nvidia-texture-tools/
2009-03-07 14:51:39 +00:00

26 lines
735 B
C++

--- src/nvcore/Debug.cpp.orig 2008-12-01 11:04:27.000000000 +0300
+++ src/nvcore/Debug.cpp 2009-03-06 22:45:48.000000000 +0300
@@ -34,7 +34,7 @@
# endif
#endif
-#if NV_OS_DARWIN
+#if NV_OS_DARWIN || NV_OS_FREEBSD
# include <unistd.h> // getpid
# include <sys/types.h>
# include <sys/sysctl.h> // sysctl
@@ -195,6 +195,14 @@
return (void *) ucp->uc_mcontext->ss.eip;
# endif
# endif
+# elif NV_OS_FREEBSD
+# if NV_CPU_X86_64
+ ucontext_t * ucp = (ucontext_t *)secret;
+ return (void *)ucp->uc_mcontext.mc_rip;
+# elif NV_CPU_X86
+ ucontext_t * ucp = (ucontext_t *)secret;
+ return (void *)ucp->uc_mcontext.mc_eip;
+# endif
# else
# if NV_CPU_X86_64
// #define REG_RIP REG_INDEX(rip) // seems to be 16