1 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/include/EGL/eglplatform.h ./mesa/include/EGL/eglplatform.h
2 --- /data/deadwood/source/Mesa-7.11-staging/include/EGL/eglplatform.h 2011-07-09 03:37:09.000000000 +0200
3 +++ ./mesa/include/EGL/eglplatform.h 2011-10-18 19:34:24.000000000 +0200
5 typedef struct gbm_bo *EGLNativePixmapType;
6 typedef void *EGLNativeWindowType;
8 +#elif defined(__AROS__)
10 +#include <intuition/intuition.h>
12 +typedef APTR EGLNativeDisplayType;
13 +typedef struct Bitmap *EGLNativePixmapType;
14 +typedef struct Window *EGLNativeWindowType;
16 #elif defined(__unix__) || defined(__unix)
18 #ifdef MESA_EGL_NO_X11_HEADERS
20 * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
23 -typedef khronos_int32_t EGLint;
24 +typedef SIPTR EGLint;
26 #endif /* __eglplatform_h */
27 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/egl/main/eglcompiler.h ./mesa/src/egl/main/eglcompiler.h
28 --- /data/deadwood/source/Mesa-7.11-staging/src/egl/main/eglcompiler.h 2011-07-09 03:37:09.000000000 +0200
29 +++ ./mesa/src/egl/main/eglcompiler.h 2013-01-04 19:25:40.000000000 +0100
32 #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
35 #elif defined(_MSC_VER)
36 typedef __int8 int8_t;
37 typedef unsigned __int8 uint8_t;
38 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/egl/main/eglconfig.c ./mesa/src/egl/main/eglconfig.c
39 --- /data/deadwood/source/Mesa-7.11-staging/src/egl/main/eglconfig.c 2011-07-09 03:37:09.000000000 +0200
40 +++ ./mesa/src/egl/main/eglconfig.c 2013-01-04 19:25:40.000000000 +0100
43 /* check attributes by their types */
44 for (i = 0; i < ARRAY_SIZE(_eglValidationTable); i++) {
48 attr = _eglValidationTable[i].attr;
49 val = _eglGetConfigKey(conf, attr);
56 _eglFallbackCompare(const _EGLConfig *conf1, const _EGLConfig *conf2,
59 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/egl/main/eglcurrent.c ./mesa/src/egl/main/eglcurrent.c
60 --- /data/deadwood/source/Mesa-7.11-staging/src/egl/main/eglcurrent.c 2011-07-09 03:37:09.000000000 +0200
61 +++ ./mesa/src/egl/main/eglcurrent.c 2011-09-05 20:03:01.000000000 +0200
66 +#elif defined(_EGL_OS_AROS)
68 +#include "aros/tls.h"
70 +static struct TaskLocalStorage * tls = NULL;
71 +static void (*_egl_FreeTSD)(_EGLThreadInfo *);
73 +static INLINE void _eglFiniTSD(void)
78 +static INLINE void _eglSetTSD(const _EGLThreadInfo *t)
80 + InsertIntoTLS(tls, (APTR)t);
83 +static INLINE _EGLThreadInfo *_eglGetTSD(void)
85 + return (_EGLThreadInfo *)GetFromTLS(tls);
88 +static INLINE EGLBoolean _eglInitTSD(void (*dtor)(_EGLThreadInfo *))
93 + _egl_FreeTSD = dtor;
94 + _eglAddAtExitCall(_eglFiniTSD);
103 +#include <aros/symbolsets.h>
105 +static VOID _egl_FreeTSD_fn()
107 + _EGLThreadInfo *t = NULL;
113 + if (t && _egl_FreeTSD)
114 + _egl_FreeTSD((void *) t);
117 +ADD2CLOSELIB(_egl_FreeTSD_fn, 10)
120 static const _EGLThreadInfo *_egl_TSD;
121 static void (*_egl_FreeTSD)(_EGLThreadInfo *);
122 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/egl/main/egldisplay.c ./mesa/src/egl/main/egldisplay.c
123 --- /data/deadwood/source/Mesa-7.11-staging/src/egl/main/egldisplay.c 2011-07-09 03:37:09.000000000 +0200
124 +++ ./mesa/src/egl/main/egldisplay.c 2011-09-05 20:03:01.000000000 +0200
126 { _EGL_PLATFORM_X11, "x11" },
127 { _EGL_PLATFORM_WAYLAND, "wayland" },
128 { _EGL_PLATFORM_DRM, "drm" },
129 - { _EGL_PLATFORM_FBDEV, "fbdev" }
130 + { _EGL_PLATFORM_FBDEV, "fbdev" },
131 + { _EGL_PLATFORM_AROS, "aros" }
133 _EGLPlatformType plat = _EGL_INVALID_PLATFORM;
134 const char *plat_name;
136 /* search the display list first */
137 dpy = _eglGlobal.DisplayList;
139 +#if !defined(_EGL_OS_AROS)
140 + /* It seems the _eglGlobal.DisplayList should unique per opener (not per task).
141 + This is not true on AROS (_eglGlobal.DisplayList is global for all
142 + openers). The workaround is to always create a new display object. This
143 + might fail with multithreaded applications as they might expect to have
144 + the same display object returned by GetDisplay */
145 if (dpy->Platform == plat && dpy->PlatformDisplay == plat_dpy)
151 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/egl/main/egldisplay.h ./mesa/src/egl/main/egldisplay.h
152 --- /data/deadwood/source/Mesa-7.11-staging/src/egl/main/egldisplay.h 2011-07-09 03:37:09.000000000 +0200
153 +++ ./mesa/src/egl/main/egldisplay.h 2011-09-05 20:03:01.000000000 +0200
155 _EGL_PLATFORM_WAYLAND,
158 + _EGL_PLATFORM_AROS,
161 _EGL_INVALID_PLATFORM = -1
162 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/egl/main/egldriver.c ./mesa/src/egl/main/egldriver.c
163 --- /data/deadwood/source/Mesa-7.11-staging/src/egl/main/egldriver.c 2011-07-09 03:37:09.000000000 +0200
164 +++ ./mesa/src/egl/main/egldriver.c 2012-01-22 09:08:51.000000000 +0100
166 * Functions for choosing and opening/loading device drivers.
179 * Wrappers for dlopen/dlclose()
185 +#elif defined(_EGL_OS_AROS)
187 +typedef void * lib_handle;
190 +close_library(void *lib)
195 #elif defined(_EGL_OS_UNIX)
200 _eglOpenLibrary(const char *driverPath, lib_handle *handle)
202 +#if !defined(_EGL_OS_AROS)
204 _EGLMain_t mainFunc = NULL;
205 const char *error = "unknown error";
220 +#if !defined(_EGL_OS_AROS)
222 * A loader function for use with _eglPreloadForEach. The loader data is the
223 * filename of the driver. This function stops on the first valid driver.
225 _eglPreloadForEach(_eglGetSearchPath(), _eglLoaderFile, external);
229 +#endif /* !defined(_EGL_OS_AROS) */
232 * Add built-in drivers to the module array.
237 +#if !defined(_EGL_OS_AROS)
238 if (!_eglAddUserDriver()) {
240 * Add other drivers only when EGL_DRIVER is not set. The order here
242 _eglAddGalliumDriver();
243 _eglAddBuiltInDrivers();
246 + _eglAddBuiltInDrivers();
249 return (_eglModules != NULL);
256 +#if !defined(_EGL_OS_AROS)
258 * Invoke a callback function on each EGL search path.
261 const char *search_path = _eglGetSearchPath();
262 _eglPreloadForEach(search_path, callback, callback_data);
265 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/egl/main/egldriver.h ./mesa/src/egl/main/egldriver.h
266 --- /data/deadwood/source/Mesa-7.11-staging/src/egl/main/egldriver.h 2011-07-09 03:37:09.000000000 +0200
267 +++ ./mesa/src/egl/main/egldriver.h 2012-01-21 16:25:55.000000000 +0100
270 _eglBuiltInDriverGLX(const char *args);
272 +#if defined(_EGL_OS_AROS)
274 +_eglBuiltInDriverAROSMesa(const char *args);
278 _eglMain(const char *args);
279 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/egl/main/egllog.c ./mesa/src/egl/main/egllog.c
280 --- /data/deadwood/source/Mesa-7.11-staging/src/egl/main/egllog.c 2011-07-09 03:37:09.000000000 +0200
281 +++ ./mesa/src/egl/main/egllog.c 2011-09-05 20:03:01.000000000 +0200
286 +#if !defined(_EGL_OS_AROS)
287 _EGL_MUTEX_INITIALIZER,
293 + .initialized = EGL_FALSE,
294 + .level = FALLBACK_LOG_LEVEL,
300 static const char *level_strings[] = {
301 @@ -122,13 +129,20 @@
305 +#if defined(_EGL_OS_AROS)
306 +#include <aros/debug.h>
309 * The default logger. It prints the message to stderr.
312 _eglDefaultLogger(EGLint level, const char *msg)
314 +#if !defined(_EGL_OS_AROS)
315 fprintf(stderr, "libEGL %s: %s\n", level_strings[level], msg);
317 + bug("[EGL]: %s: %s\n", level_strings[level], msg);
323 logging.logger = _eglDefaultLogger;
324 logging.level = (level >= 0) ? level : FALLBACK_LOG_LEVEL;
325 logging.initialized = EGL_TRUE;
326 +#if defined(_EGL_OS_AROS)
327 + _eglInitMutex(&logging.mutex);
330 /* it is fine to call _eglLog now */
331 if (log_env && level < 0) {
332 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/egl/main/eglmutex.h ./mesa/src/egl/main/eglmutex.h
333 --- /data/deadwood/source/Mesa-7.11-staging/src/egl/main/eglmutex.h 2011-07-09 03:37:09.000000000 +0200
334 +++ ./mesa/src/egl/main/eglmutex.h 2011-09-05 20:03:01.000000000 +0200
336 #define _EGL_DECLARE_MUTEX(m) \
337 _EGLMutex m = _EGL_MUTEX_INITIALIZER
339 +#elif defined(_EGL_OS_AROS)
341 +#include <proto/exec.h>
343 +typedef struct SignalSemaphore _EGLMutex;
345 +static INLINE void _eglInitMutex(_EGLMutex *m)
351 +_eglDestroyMutex(_EGLMutex *m)
357 +_eglLockMutex(_EGLMutex *m)
359 + ObtainSemaphore(m);
363 +_eglUnlockMutex(_EGLMutex *m)
365 + ReleaseSemaphore(m);
368 +/* This is not supported. _eglInitMutex must alway be used */
369 +/* #define _EGL_MUTEX_INITIALIZER */
371 +#include <aros/symbolsets.h> /* For ADD2INIT */
372 +/* Declare variable, declare init function, add to auto init. Ugly but works. */
373 +#define _EGL_DECLARE_MUTEX(m) \
375 +static void init##m() \
377 + _eglInitMutex(&m); \
379 +ADD2INIT(init##m, 5);
383 typedef int _EGLMutex;
384 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/auxiliary/os/os_thread.h ./mesa/src/gallium/auxiliary/os/os_thread.h
385 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/auxiliary/os/os_thread.h 2011-07-09 03:37:09.000000000 +0200
386 +++ ./mesa/src/gallium/auxiliary/os/os_thread.h 2011-09-05 20:03:01.000000000 +0200
389 #endif /* pre-Vista win32 */
391 +#elif defined(PIPE_OS_AROS)
393 +#include <proto/exec.h>
395 +#include "os/os_time.h"
397 +typedef struct SignalSemaphore pipe_mutex;
399 +#include <aros/symbolsets.h> /* For ADD2INIT */
401 +/* Declare variable, declare init function, add to auto init. Ugly but works. */
402 +#define pipe_static_mutex(mutex) \
403 +static pipe_mutex mutex; \
404 +static void init##mutex() \
406 + pipe_mutex_init(mutex); \
408 +ADD2INIT(init##mutex, 5);
410 +#define pipe_mutex_init(mutex) \
411 + InitSemaphore(&mutex)
413 +#define pipe_mutex_destroy(mutex) \
416 +#define pipe_mutex_lock(mutex) \
417 + ObtainSemaphore(&mutex)
419 +#define pipe_mutex_unlock(mutex) \
420 + ReleaseSemaphore(&mutex)
422 +typedef int64_t pipe_condvar;
424 +#define pipe_static_condvar(condvar) \
425 + static pipe_condvar condvar = 1000
427 +#define pipe_condvar_init(condvar) \
428 + (void) (condvar = 1000)
430 +#define pipe_condvar_destroy(condvar) \
433 +/* Poor man's pthread_cond_wait():
434 + Just release the mutex and sleep for one millisecond.
435 + The caller's while() loop does all the work. */
436 +#define pipe_condvar_wait(condvar, mutex) \
437 + do { pipe_mutex_unlock(mutex); \
438 + os_time_sleep(condvar); \
439 + pipe_mutex_lock(mutex); \
442 +#define pipe_condvar_signal(condvar) \
445 +#define pipe_condvar_broadcast(condvar) \
450 #include "os/os_time.h"
451 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/auxiliary/os/os_time.c ./mesa/src/gallium/auxiliary/os/os_time.c
452 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/auxiliary/os/os_time.c 2011-07-09 03:37:09.000000000 +0200
453 +++ ./mesa/src/gallium/auxiliary/os/os_time.c 2011-09-05 20:03:01.000000000 +0200
456 #include "pipe/p_config.h"
458 -#if defined(PIPE_OS_UNIX)
459 +#if defined(PIPE_OS_UNIX) || defined(PIPE_OS_AROS)
460 # include <sys/time.h> /* timeval */
461 #elif defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY)
462 # include <windows.h>
467 -#if defined(PIPE_OS_UNIX)
468 +#if defined(PIPE_OS_UNIX) || defined(PIPE_OS_AROS)
471 gettimeofday(&tv, NULL);
472 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/auxiliary/os/os_time.h ./mesa/src/gallium/auxiliary/os/os_time.h
473 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/auxiliary/os/os_time.h 2010-04-27 23:41:59.000000000 +0200
474 +++ ./mesa/src/gallium/auxiliary/os/os_time.h 2011-08-31 12:37:34.000000000 +0200
477 #include "pipe/p_config.h"
479 -#if defined(PIPE_OS_UNIX)
480 +#if defined(PIPE_OS_UNIX) || defined(PIPE_OS_AROS)
481 # include <unistd.h> /* usleep */
488 -#if defined(PIPE_OS_UNIX)
489 +#if defined(PIPE_OS_UNIX) || defined(PIPE_OS_AROS)
490 #define os_time_sleep(_usecs) usleep(_usecs)
493 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/auxiliary/util/u_atomic.h ./mesa/src/gallium/auxiliary/util/u_atomic.h
494 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/auxiliary/util/u_atomic.h 2010-10-19 19:58:28.000000000 +0200
495 +++ ./mesa/src/gallium/auxiliary/util/u_atomic.h 2011-12-17 11:25:59.000000000 +0100
497 #define PIPE_ATOMIC_ASM_MSVC_X86
498 #elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86))
499 #define PIPE_ATOMIC_ASM_GCC_X86
500 +#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_ARM))
501 +#define PIPE_ATOMIC_ASM_GCC_ARM
502 #elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86_64))
503 #define PIPE_ATOMIC_ASM_GCC_X86_64
504 +#elif defined(PIPE_OS_AROS) && defined(PIPE_ARCH_M68K)
505 +#define PIPE_ATOMIC_OS_AROS_CPU_M68K
506 #elif defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 401)
507 #define PIPE_ATOMIC_GCC_INTRINSIC
513 +#if defined(PIPE_ATOMIC_ASM_GCC_ARM)
515 +#define PIPE_ATOMIC "GCC ARM assembly"
521 +#define p_atomic_set(_v, _i) (*(_v) = (_i))
522 +#define p_atomic_read(_v) (*(_v))
524 +static INLINE boolean
525 +p_atomic_dec_zero(int32_t *v)
527 + unsigned long temp;
530 + __asm__ __volatile__("\n1: ldrex %0, [%3]; subs %0, %0, #1; moveq %2, #1; movne %2, #0; strex %1, %0, [%3]; teq %1, #0; bne 1b"
531 + :"=&r"(result), "=&r"(temp), "=&r"(cc)
538 +p_atomic_inc(int32_t *v)
540 + unsigned long temp;
542 + __asm__ __volatile__("\n1: ldrex %0, [%2]; add %0, %0, #1; strex %1, %0, [%2]; teq %1, #0; bne 1b"
543 + :"=&r"(result), "=&r"(temp)
549 +p_atomic_dec(int32_t *v)
551 + unsigned long temp;
553 + __asm__ __volatile__("\n1: ldrex %0, [%2]; sub %0, %0, #1; strex %1, %0, [%2]; teq %1, #0; bne 1b"
554 + :"=&r"(result), "=&r"(temp)
559 +static INLINE int32_t
560 +p_atomic_cmpxchg(int32_t *v, int32_t old, int32_t _new)
563 + unsigned long temp;
564 + __asm__ __volatile__("\n1: ldrex %0,[%2]; teq %0, %3; strexeq %1, %4, [%2]; teq %1, #0; bne 1b"
565 + :"=&r"(oldval), "=&r"(temp)
566 + :"r"(v), "Ir"(old), "r"(_new)
578 /* Implementation using GCC-provided synchronization intrinsics
588 +#if defined(PIPE_ATOMIC_OS_AROS_CPU_M68K)
590 +#define PIPE_ATOMIC "AROS OS atomic functions"
592 +#include <aros/atomic.h>
598 +#define p_atomic_set(_v, _i) (*(_v) = (_i))
599 +#define p_atomic_read(_v) (*(_v))
601 +static INLINE boolean
602 +p_atomic_dec_zero(int32_t *v)
606 + /* FIXME: AROS needs an atomic decrement and return... */
608 + AROS_ATOMIC_DEC(*(LONG *)v);
609 + n = (*v == 0) ? TRUE : FALSE;
615 +#define p_atomic_inc(_v) AROS_ATOMIC_INC(*(LONG *)_v)
616 +#define p_atomic_dec(_v) AROS_ATOMIC_DEC(*(LONG *)_v)
618 +static INLINE int32_t
619 +p_atomic_cmpxchg(int32_t *v, int32_t o, int32_t n)
623 + /* FIXME: AROS needs an atomic cmpxchg, using CAS.
624 + * However we can't do this if:
625 + * a) We are on a 68000 or
626 + * b) The 'v' points to Chip RAM (no r/m/w possible)
628 + * Settle for Disable()/Enable() for now.
644 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/auxiliary/util/u_math.c ./mesa/src/gallium/auxiliary/util/u_math.c
645 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/auxiliary/util/u_math.c 2010-02-05 01:10:39.000000000 +0100
646 +++ ./mesa/src/gallium/auxiliary/util/u_math.c 2011-08-31 12:37:34.000000000 +0200
648 pow2_table[i] = (float) pow(2.0, (i - POW2_TABLE_OFFSET) / POW2_TABLE_SCALE);
651 +#if defined(PIPE_OS_AROS)
653 + * NOTE: log_base_2(x) = log(x) / log(2)
654 + * NOTE: 1.442695 = 1/log(2).
656 +#define log2(x) ((float) (log(x) * 1.442695f))
659 /** log2(x), for x in [1.0, 2.0) */
660 float log2_table[LOG2_TABLE_SIZE];
661 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/auxiliary/util/u_math.h ./mesa/src/gallium/auxiliary/util/u_math.h
662 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/auxiliary/util/u_math.h 2011-07-09 03:37:09.000000000 +0200
663 +++ ./mesa/src/gallium/auxiliary/util/u_math.h 2011-09-05 20:03:01.000000000 +0200
666 #elif defined(__MINGW32__)
667 #define ffs __builtin_ffs
668 +#elif defined(PIPE_OS_AROS)
669 +#define ffs __builtin_ffs
674 util_bitcount(unsigned n)
676 #if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 304)
677 +#if defined(PIPE_OS_AROS)
679 + for (bits = 0; n > 0; n = n >> 1) {
684 return __builtin_popcount(n);
687 /* K&R classic bitcount.
689 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/auxiliary/util/u_network.c ./mesa/src/gallium/auxiliary/util/u_network.c
690 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/auxiliary/util/u_network.c 2010-10-05 18:56:51.000000000 +0200
691 +++ ./mesa/src/gallium/auxiliary/util/u_network.c 2013-03-13 22:19:46.000000000 +0100
693 #if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
694 # include <winsock2.h>
695 # include <windows.h>
696 -#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_CYGWIN)
697 +#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_AROS)
698 # include <sys/socket.h>
699 # include <netinet/in.h>
701 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/i915/i915_context.c ./mesa/src/gallium/drivers/i915/i915_context.c
702 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/i915/i915_context.c 2011-07-09 03:37:09.000000000 +0200
703 +++ ./mesa/src/gallium/drivers/i915/i915_context.c 2013-03-13 22:19:46.000000000 +0100
705 struct i915_context *i915 = i915_context(pipe);
706 struct draw_context *draw = i915->draw;
707 void *mapped_indices = NULL;
708 - unsigned cbuf_dirty;
712 * Ack vs contants here, helps ipers a lot.
714 - cbuf_dirty = i915->dirty & I915_NEW_VS_CONSTANTS;
715 i915->dirty &= ~I915_NEW_VS_CONSTANTS;
718 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/i915/i915_prim_vbuf.c ./mesa/src/gallium/drivers/i915/i915_prim_vbuf.c
719 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/i915/i915_prim_vbuf.c 2011-07-09 03:37:09.000000000 +0200
720 +++ ./mesa/src/gallium/drivers/i915/i915_prim_vbuf.c 2013-01-04 19:25:40.000000000 +0100
722 case PIPE_PRIM_LINE_LOOP:
724 for (i = start + 1; i < end; i++)
725 - OUT_BATCH((i-0) | (i+0) << 16);
726 - OUT_BATCH((i-0) | ( start) << 16);
727 + OUT_BATCH((i-1) | (i+0) << 16);
728 + OUT_BATCH((i-1) | ( start) << 16);
731 case PIPE_PRIM_QUADS:
732 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/i915/i915_screen.c ./mesa/src/gallium/drivers/i915/i915_screen.c
733 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/i915/i915_screen.c 2011-07-09 03:37:09.000000000 +0200
734 +++ ./mesa/src/gallium/drivers/i915/i915_screen.c 2013-01-04 19:25:40.000000000 +0100
738 PIPE_FORMAT_Z16_UNORM, */
740 + // AROS Quoke1 fix,seems to work,but probably better to fix SDL so
741 + // that some other format is used.
743 + PIPE_FORMAT_Z16_UNORM,
745 PIPE_FORMAT_DXT1_RGB,
746 PIPE_FORMAT_DXT1_RGBA,
747 PIPE_FORMAT_DXT3_RGBA,
749 static const enum pipe_format depth_supported[] = {
751 PIPE_FORMAT_Z16_UNORM, */
752 + PIPE_FORMAT_Z16_UNORM, // AROS quake1 fix
753 PIPE_FORMAT_Z24X8_UNORM,
754 PIPE_FORMAT_Z24_UNORM_S8_USCALED,
755 PIPE_FORMAT_NONE /* list terminator */
756 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/i915/i915_state_immediate.c ./mesa/src/gallium/drivers/i915/i915_state_immediate.c
757 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/i915/i915_state_immediate.c 2011-07-09 03:32:30.000000000 +0200
758 +++ ./mesa/src/gallium/drivers/i915/i915_state_immediate.c 2013-03-13 22:19:46.000000000 +0100
759 @@ -189,13 +189,13 @@
761 static void upload_S7(struct i915_context *i915)
766 /* I915_NEW_RASTERIZER
768 LIS7 = i915->rasterizer->LIS7;
771 set_immediate(i915, I915_IMMEDIATE_S7, LIS7);
774 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/nouveau/nouveau_fence.c ./mesa/src/gallium/drivers/nouveau/nouveau_fence.c
775 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/nouveau/nouveau_fence.c 2011-07-09 03:37:09.000000000 +0200
776 +++ ./mesa/src/gallium/drivers/nouveau/nouveau_fence.c 2013-01-04 19:25:40.000000000 +0100
782 +#include "drm_aros_config.h" /* for MOCK_HARDWARE define */
786 nouveau_fence_new(struct nouveau_screen *screen, struct nouveau_fence **fence,
789 /* set this now, so that if fence.emit triggers a flush we don't recurse */
790 fence->state = NOUVEAU_FENCE_STATE_EMITTED;
792 - screen->fence.emit(&screen->base, fence->sequence);
796 if (screen->fence.tail)
798 screen->fence.head = fence;
800 screen->fence.tail = fence;
802 + screen->fence.emit(&screen->base, fence->sequence);
808 struct nouveau_fence *fence;
809 struct nouveau_fence *next = NULL;
811 +#if defined(PIPE_OS_AROS) && defined(MOCK_HARDWARE)
812 + /* For purpose of simulation, assume all fences are signalled */
813 + u32 sequence = screen->fence.tail->sequence;
815 u32 sequence = screen->fence.update(&screen->base);
818 if (screen->fence.sequence_ack == sequence)
821 if (screen->fence.current->state < NOUVEAU_FENCE_STATE_EMITTED)
822 nouveau_fence_emit(screen->fence.current);
824 + nouveau_fence_ref(NULL, &screen->fence.current);
826 nouveau_fence_new(screen, &screen->fence.current, FALSE);
828 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c ./mesa/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c
829 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c 2011-07-09 03:37:09.000000000 +0200
830 +++ ./mesa/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c 2011-09-05 20:03:01.000000000 +0200
831 @@ -1480,7 +1480,7 @@
833 struct nv_value *t[4], *s[3];
834 uint opcode = translate_opcode(insn->Instruction.Opcode);
836 + int arg = 0, dim = 0, c;
837 const int tic = insn->Src[1].Register.Index;
839 const int cube = (insn->Texture.Texture == TGSI_TEXTURE_CUBE) ? 1 : 0;
840 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/nvfx/nv30_fragtex.c ./mesa/src/gallium/drivers/nvfx/nv30_fragtex.c
841 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/nvfx/nv30_fragtex.c 2011-04-08 21:31:18.000000000 +0200
842 +++ ./mesa/src/gallium/drivers/nvfx/nv30_fragtex.c 2011-09-30 21:45:16.000000000 +0200
844 struct nvfx_sampler_state *ps,
845 const struct pipe_sampler_state *cso)
851 if (cso->max_anisotropy >= 2)
854 ps->en |= NV30_3D_TEX_ENABLE_ANISO_2X;
858 limit = CLAMP(cso->lod_bias, -16.0, 15.0 + (255.0 / 256.0));
860 ps->filt |= (int)(cso->lod_bias * 256.0) & 0x1fff;
862 ps->max_lod = (int)CLAMP(cso->max_lod, 0.0, 15.0);
863 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/nvfx/nv40_fragtex.c ./mesa/src/gallium/drivers/nvfx/nv40_fragtex.c
864 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/nvfx/nv40_fragtex.c 2011-04-08 21:31:18.000000000 +0200
865 +++ ./mesa/src/gallium/drivers/nvfx/nv40_fragtex.c 2011-09-30 21:45:16.000000000 +0200
867 struct nvfx_sampler_state *ps,
868 const struct pipe_sampler_state *cso)
873 if (cso->max_anisotropy >= 2) {
874 /* no idea, binary driver sets it, works without it.. meh.. */
875 ps->wrap |= (1 << 5);
877 ps->en |= NV40_3D_TEX_ENABLE_ANISO_2X;
881 limit = CLAMP(cso->lod_bias, -16.0, 15.0 + (255.0 / 256.0));
883 ps->filt |= (int)(cso->lod_bias * 256.0) & 0x1fff;
885 ps->max_lod = (int)(CLAMP(cso->max_lod, 0.0, 15.0 + (255.0 / 256.0)) * 256.0);
886 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/softpipe/sp_query.c ./mesa/src/gallium/drivers/softpipe/sp_query.c
887 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/drivers/softpipe/sp_query.c 2010-10-05 18:56:51.000000000 +0200
888 +++ ./mesa/src/gallium/drivers/softpipe/sp_query.c 2013-03-13 22:19:46.000000000 +0100
890 /*os_get_time is in microseconds*/
891 td.frequency = 1000000;
893 - memcpy(vresult, &sq->so,
894 + memcpy(vresult, &td,
895 sizeof(struct pipe_query_data_timestamp_disjoint));
898 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/include/pipe/p_config.h ./mesa/src/gallium/include/pipe/p_config.h
899 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/include/pipe/p_config.h 2011-08-01 05:23:42.000000000 +0200
900 +++ ./mesa/src/gallium/include/pipe/p_config.h 2013-03-13 22:19:46.000000000 +0100
902 #define PIPE_ARCH_X86
905 +#if defined(__arm__)
906 +#define PIPE_ARCH_ARM
909 #if defined(__x86_64__) /* gcc */ || defined(_M_X64) /* msvc */ || defined(_M_AMD64) /* msvc */ || defined(__x86_64) /* Sun cc */
910 #define PIPE_ARCH_X86_64
913 +#if defined(__mc68000) /* gcc */
914 +#define PIPE_ARCH_M68K
917 #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
918 #if defined(PIPE_CC_GCC) && !defined(__SSE2__)
919 /* #warning SSE2 support requires -msse -msse2 compiler options */
924 -#if defined(__ppc__) || defined(__ppc64__) || defined(__PPC__)
925 +#if defined(__ppc__) || defined(__ppc64__) || defined(__PPC__) || defined(__powerpc__)
926 #define PIPE_ARCH_PPC
927 #if defined(__ppc64__) || defined(__PPC64__)
928 #define PIPE_ARCH_PPC_64
933 -#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
934 +#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) || defined(PIPE_ARCH_ARM)
935 #define PIPE_ARCH_LITTLE_ENDIAN
936 -#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64)
937 +#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_M68K)
938 #define PIPE_ARCH_BIG_ENDIAN
942 * See subsystem below for a more fine-grained distinction.
946 + * In some situations __AROS__ definition can coexist with anything of
947 + * the below (for example this happens on ARM port which is compiled using Linux
948 + * compiler at the moment). So if we have __AROS__ we don't evaluate anything else
950 +#if defined(__AROS__)
951 +#define PIPE_OS_AROS
954 #if defined(__linux__)
955 #define PIPE_OS_LINUX
964 * Try to auto-detect the subsystem.
966 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/state_trackers/egl/common/egl_g3d_api.c ./mesa/src/gallium/state_trackers/egl/common/egl_g3d_api.c
967 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/state_trackers/egl/common/egl_g3d_api.c 2011-07-09 03:37:09.000000000 +0200
968 +++ ./mesa/src/gallium/state_trackers/egl/common/egl_g3d_api.c 2012-01-22 09:28:44.000000000 +0100
975 egl_g3d_compare_config(const _EGLConfig *conf1, const _EGLConfig *conf2,
981 return _eglError(EGL_BAD_PARAMETER, "eglChooseConfigs");
982 +#if defined(_EGL_OS_AROS)
983 + /* This is the earliest place where client indicates which API is it interested in. Due to fact that
984 + * HostGL is not providing Gallium st_api, we detected if we are capable of continuing with Gallium EGL
985 + * driver and if not we "chain load" the display into AROSMesa EGL driver
988 + while (attribs[++j] != EGL_NONE)
990 + if (attribs[j] == EGL_RENDERABLE_TYPE)
992 + if (attribs[++j] == EGL_OPENGL_BIT)
994 + if (egl_g3d_get_st_api(drv, EGL_OPENGL_BIT) == NULL)
996 + dpy->Driver = _eglBuiltInDriverAROSMesa(NULL);
997 + dpy->Driver->API.Initialize(dpy->Driver, dpy);
998 + return dpy->Driver->API.ChooseConfig(dpy->Driver, dpy,attribs, configs, size, num_configs);
1005 if (!_eglParseConfigAttribList(&criteria, dpy, attribs))
1006 return _eglError(EGL_BAD_ATTRIBUTE, "eglChooseConfig");
1008 struct egl_g3d_surface *gsurf;
1009 struct native_surface *nsurf;
1013 switch (arg->type) {
1014 case EGL_WINDOW_BIT:
1018 /* initialize the geometry */
1019 - if (!nsurf->validate(nsurf, 0x0, &gsurf->sequence_number, NULL,
1020 - &gsurf->base.Width, &gsurf->base.Height)) {
1021 + if (!nsurf->validate(nsurf, 0x0, &gsurf->sequence_number, NULL, &w, &h)) {
1022 + gsurf->base.Width = w;
1023 + gsurf->base.Height = h;
1024 nsurf->destroy(nsurf);
1027 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/state_trackers/egl/common/egl_g3d.c ./mesa/src/gallium/state_trackers/egl/common/egl_g3d.c
1028 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/state_trackers/egl/common/egl_g3d.c 2011-07-09 03:37:09.000000000 +0200
1029 +++ ./mesa/src/gallium/state_trackers/egl/common/egl_g3d.c 2011-09-05 20:03:01.000000000 +0200
1031 gctx->stctxi->notify_invalid_framebuffer(gctx->stctxi, gsurf->stfbi);
1034 +#if !defined(PIPE_OS_AROS)
1035 static struct pipe_screen *
1036 egl_g3d_new_drm_screen(struct native_display *ndpy, const char *name, int fd)
1039 struct egl_g3d_display *gdpy = egl_g3d_display(dpy);
1040 return gdpy->loader->create_sw_screen(ws);
1044 static struct pipe_resource *
1045 egl_g3d_lookup_egl_image(struct native_display *ndpy, void *egl_image)
1050 +#if !defined(PIPE_OS_AROS)
1051 static const struct native_event_handler egl_g3d_native_event_handler = {
1052 egl_g3d_invalid_surface,
1053 egl_g3d_new_drm_screen,
1054 egl_g3d_new_sw_screen,
1055 egl_g3d_lookup_egl_image
1059 +static const struct native_event_handler egl_g3d_native_event_handler = {
1060 + egl_g3d_invalid_surface,
1061 + egl_g3d_lookup_egl_image
1065 * Get the native platform.
1067 @@ -137,6 +145,12 @@
1068 nplat = native_get_fbdev_platform(&egl_g3d_native_event_handler);
1071 + case _EGL_PLATFORM_AROS:
1072 + plat_name = "AROS";
1073 +#ifdef HAVE_AROS_BACKEND
1074 + nplat = native_get_aros_platform(&egl_g3d_native_event_handler);
1082 struct egl_g3d_display *gdpy = egl_g3d_display(dpy);
1083 const struct native_connector **native_connectors;
1084 - EGLint num_connectors, i;
1085 + int num_connectors, i;
1088 gdpy->native->modeset->get_connectors(gdpy->native, &num_connectors, NULL);
1090 const struct native_connector *nconn = native_connectors[i];
1091 struct egl_g3d_screen *gscr;
1092 const struct native_mode **native_modes;
1093 - EGLint num_modes, j;
1096 /* TODO support for hotplug */
1098 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/state_trackers/egl/common/egl_g3d_loader.h ./mesa/src/gallium/state_trackers/egl/common/egl_g3d_loader.h
1099 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/state_trackers/egl/common/egl_g3d_loader.h 2011-07-09 03:37:09.000000000 +0200
1100 +++ ./mesa/src/gallium/state_trackers/egl/common/egl_g3d_loader.h 2011-09-05 20:03:01.000000000 +0200
1102 uint profile_masks[ST_API_COUNT];
1103 struct st_api *(*get_st_api)(enum st_api_type api);
1105 +#if !defined(PIPE_OS_AROS)
1106 struct pipe_screen *(*create_drm_screen)(const char *name, int fd);
1107 struct pipe_screen *(*create_sw_screen)(struct sw_winsys *ws);
1112 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/state_trackers/egl/common/egl_g3d_st.c ./mesa/src/gallium/state_trackers/egl/common/egl_g3d_st.c
1113 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/state_trackers/egl/common/egl_g3d_st.c 2011-07-07 02:04:59.000000000 +0200
1114 +++ ./mesa/src/gallium/state_trackers/egl/common/egl_g3d_st.c 2011-09-05 20:03:01.000000000 +0200
1116 struct pipe_resource *textures[NUM_NATIVE_ATTACHMENTS];
1117 uint attachment_mask = 0;
1121 for (i = 0; i < count; i++) {
1123 @@ -234,10 +235,12 @@
1126 if (!gsurf->native->validate(gsurf->native, attachment_mask,
1127 - &gsurf->sequence_number, textures, &gsurf->base.Width,
1128 - &gsurf->base.Height))
1129 + &gsurf->sequence_number, textures, &w, &h)) {
1130 + gsurf->base.Width = w;
1131 + gsurf->base.Height = h;
1136 for (i = 0; i < count; i++) {
1137 struct pipe_resource *tex;
1139 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/state_trackers/egl/common/native.h ./mesa/src/gallium/state_trackers/egl/common/native.h
1140 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/state_trackers/egl/common/native.h 2011-07-09 03:37:09.000000000 +0200
1141 +++ ./mesa/src/gallium/state_trackers/egl/common/native.h 2011-09-05 20:03:01.000000000 +0200
1142 @@ -220,10 +220,12 @@
1143 struct native_surface *nsurf,
1144 unsigned int seq_num);
1146 +#if !defined(PIPE_OS_AROS)
1147 struct pipe_screen *(*new_drm_screen)(struct native_display *ndpy,
1148 const char *name, int fd);
1149 struct pipe_screen *(*new_sw_screen)(struct native_display *ndpy,
1150 struct sw_winsys *ws);
1153 struct pipe_resource *(*lookup_egl_image)(struct native_display *ndpy,
1155 @@ -288,8 +290,14 @@
1156 const struct native_platform *
1157 native_get_fbdev_platform(const struct native_event_handler *event_handler);
1159 +#if defined(PIPE_OS_AROS)
1160 +const struct native_platform *
1161 +native_get_aros_platform(const struct native_event_handler *event_handler);
1169 #endif /* _NATIVE_H_ */
1170 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/state_trackers/egl/common/native_helper.c ./mesa/src/gallium/state_trackers/egl/common/native_helper.c
1171 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/state_trackers/egl/common/native_helper.c 2011-07-09 03:37:09.000000000 +0200
1172 +++ ./mesa/src/gallium/state_trackers/egl/common/native_helper.c 2013-03-13 22:19:46.000000000 +0100
1173 @@ -282,10 +282,10 @@
1178 pipe_resource_reference(&btex, NULL);
1180 pipe_resource_reference(&ftex, NULL);
1185 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/state_trackers/vega/mask.c ./mesa/src/gallium/state_trackers/vega/mask.c
1186 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/state_trackers/vega/mask.c 2011-07-09 03:37:09.000000000 +0200
1187 +++ ./mesa/src/gallium/state_trackers/vega/mask.c 2011-09-05 20:03:01.000000000 +0200
1188 @@ -384,9 +384,11 @@
1189 VGint width, VGint height,
1193 VGfloat alpha_color[4] = {0, 0, 0, 0};
1195 alpha_color[3] = value;
1198 mask_resource_fill(layer->sampler_view->texture,
1199 x, y, width, height, value);
1200 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/state_trackers/vega/path.c ./mesa/src/gallium/state_trackers/vega/path.c
1201 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/state_trackers/vega/path.c 2011-01-23 03:05:41.000000000 +0100
1202 +++ ./mesa/src/gallium/state_trackers/vega/path.c 2011-09-05 20:03:01.000000000 +0200
1203 @@ -1093,8 +1093,8 @@
1207 - map_if_relative(pd->ox, pd->oy, relative, &x2, &y2);
1208 - map_if_relative(pd->ox, pd->oy, relative, &x3, &y3);
1209 + map_if_relative(x0, y0, relative, &x2, &y2);
1210 + map_if_relative(x0, y0, relative, &x3, &y3);
1214 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/targets/egl-static/egl.c ./mesa/src/gallium/targets/egl-static/egl.c
1215 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/targets/egl-static/egl.c 2011-07-09 03:37:09.000000000 +0200
1216 +++ ./mesa/src/gallium/targets/egl-static/egl.c 2011-09-05 20:03:01.000000000 +0200
1218 return stmod->stapi;
1221 +#if !defined(PIPE_OS_AROS)
1223 drm_fd_get_screen_name(int fd)
1227 return egl_pipe_create_swrast_screen(ws);
1231 static const struct egl_g3d_loader *
1233 @@ -155,8 +157,10 @@
1234 egl_g3d_loader.profile_masks[i] = egl_st_get_profile_mask(i);
1236 egl_g3d_loader.get_st_api = get_st_api;
1237 +#if !defined(PIPE_OS_AROS)
1238 egl_g3d_loader.create_drm_screen = create_drm_screen;
1239 egl_g3d_loader.create_sw_screen = create_sw_screen;
1242 return &egl_g3d_loader;
1244 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/gallium/targets/egl-static/st_GL.c ./mesa/src/gallium/targets/egl-static/st_GL.c
1245 --- /data/deadwood/source/Mesa-7.11-staging/src/gallium/targets/egl-static/st_GL.c 2011-07-09 03:37:09.000000000 +0200
1246 +++ ./mesa/src/gallium/targets/egl-static/st_GL.c 2012-01-21 20:54:03.000000000 +0100
1249 - * Mesa 3-D graphics library
1252 - * Copyright (C) 2011 LunarG Inc.
1254 - * Permission is hereby granted, free of charge, to any person obtaining a
1255 - * copy of this software and associated documentation files (the "Software"),
1256 - * to deal in the Software without restriction, including without limitation
1257 - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
1258 - * and/or sell copies of the Software, and to permit persons to whom the
1259 - * Software is furnished to do so, subject to the following conditions:
1261 - * The above copyright notice and this permission notice shall be included
1262 - * in all copies or substantial portions of the Software.
1264 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1265 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1266 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1267 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1268 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1269 - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1270 - * DEALINGS IN THE SOFTWARE.
1273 - * Chia-I Wu <olv@lunarg.com>
1275 -#include "state_tracker/st_gl_api.h"
1276 -#include "pipe/p_compiler.h"
1277 +#include <proto/exec.h>
1278 +#if !defined(__mc68000)
1279 +#include <proto/mesa.h>
1281 +#include <aros/symbolsets.h>
1283 -PUBLIC struct st_api *
1284 -st_api_create_OpenGL(void);
1285 +#include "egl_st.h"
1288 -st_api_create_OpenGL(void)
1289 +struct Library * MesaBase = NULL;
1291 +PUBLIC struct st_api * st_gl_api_create(void)
1293 +#if !defined(__mc68000)
1295 + MesaBase = OpenLibrary("mesa.library", 0L);
1298 + return (struct st_api *) AROSMesaGetOpenGLStateTrackerApi();
1304 +static VOID CloseMesa()
1306 - return st_gl_api_create();
1309 + CloseLibrary(MesaBase);
1314 +ADD2EXPUNGELIB(CloseMesa, 5)
1315 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/glsl/ir_function.cpp ./mesa/src/glsl/ir_function.cpp
1316 --- /data/deadwood/source/Mesa-7.11-staging/src/glsl/ir_function.cpp 2011-07-20 01:39:56.000000000 +0200
1317 +++ ./mesa/src/glsl/ir_function.cpp 2013-01-04 19:25:40.000000000 +0100
1319 * but the actual parameter can be coerced to the type of the declared
1320 * parameter, the match score is one.
1324 switch ((enum ir_variable_mode)(param->mode)) {
1326 case ir_var_uniform:
1327 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/glsl/ir_function_detect_recursion.cpp ./mesa/src/glsl/ir_function_detect_recursion.cpp
1328 --- /data/deadwood/source/Mesa-7.11-staging/src/glsl/ir_function_detect_recursion.cpp 2011-07-23 10:54:07.000000000 +0200
1329 +++ ./mesa/src/glsl/ir_function_detect_recursion.cpp 2013-10-03 18:47:38.000000000 +0200
1330 @@ -238,7 +238,11 @@
1335 +/* AROS: Removing static fixes an invalid compilation under
1336 + * gcc 4.6.2 -O2 mode where code generated remove_unlinked_functions
1337 + * in would loop indefinatelly
1340 destroy_links(exec_list *list, function *f)
1342 foreach_list_safe(node, list) {
1343 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/glsl/ir.h ./mesa/src/glsl/ir.h
1344 --- /data/deadwood/source/Mesa-7.11-staging/src/glsl/ir.h 2011-07-23 10:54:07.000000000 +0200
1345 +++ ./mesa/src/glsl/ir.h 2013-01-04 19:25:40.000000000 +0100
1350 +#if defined(__AROS__)
1351 +#include <aros/debug.h>
1354 +#define log2(x) ((float) (log(x) * 1.442695f))
1355 +#define printf(fmt, ...) bug(fmt, ##__VA_ARGS__)
1361 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/glsl/ralloc.c ./mesa/src/glsl/ralloc.c
1362 --- /data/deadwood/source/Mesa-7.11-staging/src/glsl/ralloc.c 2011-07-09 03:31:41.000000000 +0200
1363 +++ ./mesa/src/glsl/ralloc.c 2011-09-05 20:03:01.000000000 +0200
1368 +#if defined(__AROS__)
1369 +#define SIZE_MAX INT32_MAX
1375 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/glsl/ralloc.h ./mesa/src/glsl/ralloc.h
1376 --- /data/deadwood/source/Mesa-7.11-staging/src/glsl/ralloc.h 2011-07-09 03:31:41.000000000 +0200
1377 +++ ./mesa/src/glsl/ralloc.h 2011-09-05 20:03:01.000000000 +0200
1382 +#ifndef __cplusplus
1383 #include <stdbool.h>
1387 * \def ralloc(ctx, type)
1388 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/glsl/s_expression.cpp ./mesa/src/glsl/s_expression.cpp
1389 --- /data/deadwood/source/Mesa-7.11-staging/src/glsl/s_expression.cpp 2011-07-09 03:32:30.000000000 +0200
1390 +++ ./mesa/src/glsl/s_expression.cpp 2011-09-05 20:03:01.000000000 +0200
1393 #include "s_expression.h"
1395 +#if defined(__AROS__)
1396 +#include <aros/debug.h>
1397 +#define printf(fmt, ...) bug(fmt, ##__VA_ARGS__)
1400 s_symbol::s_symbol(const char *tmp, size_t n)
1402 this->str = ralloc_strndup (this, tmp, n);
1403 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/glu/sgi/libutil/mipmap.c ./mesa/src/glu/sgi/libutil/mipmap.c
1404 --- /data/deadwood/source/Mesa-7.11-staging/src/glu/sgi/libutil/mipmap.c 2011-07-09 03:37:10.000000000 +0200
1405 +++ ./mesa/src/glu/sgi/libutil/mipmap.c 2011-09-05 20:03:01.000000000 +0200
1406 @@ -4886,7 +4886,7 @@
1408 GLint elements_per_line;
1409 const GLubyte *start;
1410 - const GLubyte *iter;
1411 + const GLubyte *iter = NULL;
1415 @@ -5149,7 +5149,7 @@
1417 GLint elements_per_line;
1420 + GLubyte *iter = NULL;
1421 const GLushort *iter2;
1424 @@ -6034,7 +6034,7 @@
1427 const char *temp, *temp0;
1431 int lowx_int, highx_int, lowy_int, highy_int;
1432 float x_percent, y_percent;
1433 @@ -6695,7 +6695,7 @@
1434 int elementsPerLine;
1437 - const GLubyte *start, *rowStart, *iter;
1438 + const GLubyte *start, *rowStart, *iter = NULL;
1442 @@ -7057,7 +7057,7 @@
1446 - GLubyte *start, *rowStart, *iter;
1447 + GLubyte *start, *rowStart, *iter = NULL;
1448 int elementsPerLine;
1449 const GLushort *iter2;
1451 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/mapi/glapi/gen/gl_API.xml ./mesa/src/mapi/glapi/gen/gl_API.xml
1452 --- /data/deadwood/source/Mesa-7.11-staging/src/mapi/glapi/gen/gl_API.xml 2011-07-09 03:37:10.000000000 +0200
1453 +++ ./mesa/src/mapi/glapi/gen/gl_API.xml 2011-09-05 20:03:01.000000000 +0200
1454 @@ -12318,7 +12318,7 @@
1455 <function name="TextureRangeAPPLE" offset="assign" static_dispatch="false">
1456 <param name="target" type="GLenum"/>
1457 <param name="length" type="GLsizei"/>
1458 - <param name="pointer" type="GLvoid *"/>
1459 + <param name="pointer" type="const GLvoid *"/>
1461 <function name="GetTexParameterPointervAPPLE" offset="assign" static_dispatch="false">
1462 <param name="target" type="GLenum"/>
1463 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/mapi/glapi/gen/gl_procs.py ./mesa/src/mapi/glapi/gen/gl_procs.py
1464 --- /data/deadwood/source/Mesa-7.11-staging/src/mapi/glapi/gen/gl_procs.py 2011-01-06 01:19:15.000000000 +0100
1465 +++ ./mesa/src/mapi/glapi/gen/gl_procs.py 2011-09-08 18:20:04.000000000 +0200
1466 @@ -107,7 +107,11 @@
1467 for func in api.functionIterateByOffset():
1468 for n in func.entry_points:
1470 - name = func.dispatch_name()
1471 + # AROS: call into a static dispach instead of alliased function dispatch
1472 + # This will be needed as long as gl_procs.h is used to generate the
1473 + # AROSMesaGetProcAddress function table which is located in libGL.a
1474 + # name = func.dispatch_name()
1476 self.printFunctionString( n )
1478 if func.has_different_protocol(n):
1479 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/mapi/glapi/gen/gl_XML.py ./mesa/src/mapi/glapi/gen/gl_XML.py
1480 --- /data/deadwood/source/Mesa-7.11-staging/src/mapi/glapi/gen/gl_XML.py 2011-07-09 03:37:10.000000000 +0200
1481 +++ ./mesa/src/mapi/glapi/gen/gl_XML.py 2011-09-05 20:03:01.000000000 +0200
1483 name = element.nsProp( "name", None )
1484 alias = element.nsProp( "alias", None )
1486 - if is_attr_true(element, "static_dispatch"):
1487 - self.static_entry_points.append(name)
1488 + # if is_attr_true(element, "static_dispatch"):
1489 + # AROS version requires all entry points to be available in library base
1490 + self.static_entry_points.append( name )
1492 self.entry_points.append( name )
1494 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/mapi/glapi/gen/Makefile ./mesa/src/mapi/glapi/gen/Makefile
1495 --- /data/deadwood/source/Mesa-7.11-staging/src/mapi/glapi/gen/Makefile 2011-07-09 03:37:10.000000000 +0200
1496 +++ ./mesa/src/mapi/glapi/gen/Makefile 2011-09-05 20:03:01.000000000 +0200
1501 -include $(TOP)/configs/current
1502 +#include $(TOP)/configs/current
1504 +PYTHON_FLAGS = -t -O -O
1506 MESA_DIR = $(TOP)/src/mesa
1507 MESA_GLAPI_DIR = $(TOP)/src/mapi/glapi
1509 $(MESA_DIR)/main/enums.c \
1510 $(MESA_DIR)/main/dispatch.h \
1511 $(MESA_DIR)/main/remap_helper.h \
1512 - $(MESA_GLX_DIR)/indirect.c \
1513 - $(MESA_GLX_DIR)/indirect.h \
1514 - $(MESA_GLX_DIR)/indirect_init.c \
1515 - $(MESA_GLX_DIR)/indirect_size.h \
1516 - $(MESA_GLX_DIR)/indirect_size.c
1518 +# $(MESA_GLX_DIR)/indirect.c \
1519 +# $(MESA_GLX_DIR)/indirect.h \
1520 +# $(MESA_GLX_DIR)/indirect_init.c \
1521 +# $(MESA_GLX_DIR)/indirect_size.h \
1522 +# $(MESA_GLX_DIR)/indirect_size.c
1524 ######################################################################
1526 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/mapi/glapi/glapi_entrypoint.c ./mesa/src/mapi/glapi/glapi_entrypoint.c
1527 --- /data/deadwood/source/Mesa-7.11-staging/src/mapi/glapi/glapi_entrypoint.c 2010-10-19 19:58:29.000000000 +0200
1528 +++ ./mesa/src/mapi/glapi/glapi_entrypoint.c 2011-09-05 20:03:01.000000000 +0200
1529 @@ -309,10 +309,12 @@
1531 #else /* USE_*_ASM */
1533 +#if defined(PTHREADS) || defined(GLX_USE_TLS)
1535 init_glapi_relocs( void )
1542 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/mapi/glapi/glapi_gentable.c ./mesa/src/mapi/glapi/glapi_gentable.c
1543 --- /data/deadwood/source/Mesa-7.11-staging/src/mapi/glapi/glapi_gentable.c 2011-07-09 03:37:10.000000000 +0200
1544 +++ ./mesa/src/mapi/glapi/glapi_gentable.c 2011-09-07 20:43:14.000000000 +0200
1549 +#if !defined(__AROS__)
1551 #if defined(DEBUG) && !defined(_WIN32_WCE)
1552 #include <execinfo.h>
1553 @@ -8727,6 +8728,13 @@
1555 if(!disp->FramebufferTextureLayerEXT) {
1556 void ** procp = (void **) &disp->FramebufferTextureLayerEXT;
1557 + snprintf(symboln, sizeof(symboln), "%sFramebufferTextureLayerARB", symbol_prefix);
1558 + *procp = dlsym(handle, symboln);
1562 + if(!disp->FramebufferTextureLayerEXT) {
1563 + void ** procp = (void **) &disp->FramebufferTextureLayerEXT;
1564 snprintf(symboln, sizeof(symboln), "%sFramebufferTextureLayerEXT", symbol_prefix);
1565 *procp = dlsym(handle, symboln);
1567 @@ -9135,4 +9143,5 @@
1573 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/mapi/glapi/glapi.h ./mesa/src/mapi/glapi/glapi.h
1574 --- /data/deadwood/source/Mesa-7.11-staging/src/mapi/glapi/glapi.h 2011-07-09 03:37:10.000000000 +0200
1575 +++ ./mesa/src/mapi/glapi/glapi.h 2011-09-05 20:03:01.000000000 +0200
1577 # define GET_DISPATCH() _glapi_tls_Dispatch
1578 # define GET_CURRENT_CONTEXT(C) struct gl_context *C = (struct gl_context *) _glapi_tls_Context
1580 +#elif defined(__AROS__)
1582 +#define GET_DISPATCH() _glapi_get_dispatch()
1583 +#define GET_CURRENT_CONTEXT(C) struct gl_context *C = (struct gl_context *) _glapi_get_context()
1587 _GLAPI_EXPORT extern struct _glapi_table *_glapi_Dispatch;
1588 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/mapi/mapi/u_current.c ./mesa/src/mapi/mapi/u_current.c
1589 --- /data/deadwood/source/Mesa-7.11-staging/src/mapi/mapi/u_current.c 2011-07-09 03:37:10.000000000 +0200
1590 +++ ./mesa/src/mapi/mapi/u_current.c 2011-12-17 11:25:59.000000000 +0100
1591 @@ -108,9 +108,17 @@
1595 +#if defined(__AROS__)
1596 +#include "aros/tls.h"
1598 +DECLARE_STATIC_TLS(u_current_table);
1599 +DECLARE_STATIC_TLS(u_current_user);
1602 struct mapi_table *u_current_table =
1603 (struct mapi_table *) table_noop_array;
1604 void *u_current_user;
1608 struct u_tsd u_current_table_tsd;
1610 #elif defined(THREADS)
1611 u_tsd_set(&u_current_user_tsd, (void *) ptr);
1612 u_current_user = (ThreadSafe) ? NULL : (void *) ptr;
1613 +#elif defined(__AROS__)
1614 + InsertIntoTLS(u_current_user, (APTR)ptr);
1616 u_current_user = (void *) ptr;
1620 ? u_tsd_get(&u_current_user_tsd)
1622 +#elif defined(__AROS__)
1623 + return GetFromTLS(u_current_user);
1625 return u_current_user;
1628 #elif defined(THREADS)
1629 u_tsd_set(&u_current_table_tsd, (void *) tbl);
1630 u_current_table = (ThreadSafe) ? NULL : (void *) tbl;
1631 +#elif defined(__AROS__)
1632 + InsertIntoTLS(u_current_table, (APTR)tbl);
1634 u_current_table = (struct mapi_table *) tbl;
1636 @@ -260,6 +274,12 @@
1637 #elif defined(THREADS)
1638 return (struct mapi_table *) ((ThreadSafe) ?
1639 u_tsd_get(&u_current_table_tsd) : (void *) u_current_table);
1640 +#elif defined(__AROS__)
1641 + struct mapi_table *tbl;
1642 + tbl = (struct mapi_table *)GetFromTLS(u_current_table);
1644 + tbl = (struct mapi_table *) table_noop_array;
1647 return u_current_table;
1649 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/mapi/mapi/u_current.h ./mesa/src/mapi/mapi/u_current.h
1650 --- /data/deadwood/source/Mesa-7.11-staging/src/mapi/mapi/u_current.h 2011-05-13 01:47:18.000000000 +0200
1651 +++ ./mesa/src/mapi/mapi/u_current.h 2011-09-05 20:03:01.000000000 +0200
1653 extern __thread void *u_current_user
1654 __attribute__((tls_model("initial-exec")));
1656 +#elif defined(__AROS__)
1658 #else /* GLX_USE_TLS */
1660 extern struct mapi_table *u_current_table;
1664 return u_current_table;
1665 +#elif defined(__AROS__)
1666 + return u_current_get_internal();
1668 return (likely(u_current_table) ?
1669 u_current_table : u_current_get_internal());
1673 return u_current_user;
1674 +#elif defined(__AROS__)
1675 + return u_current_get_user_internal();
1677 return likely(u_current_user) ? u_current_user : u_current_get_user_internal();
1679 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/mesa/main/compiler.h ./mesa/src/mesa/main/compiler.h
1680 --- /data/deadwood/source/Mesa-7.11-staging/src/mesa/main/compiler.h 2011-07-09 03:37:10.000000000 +0200
1681 +++ ./mesa/src/mesa/main/compiler.h 2011-09-05 20:03:01.000000000 +0200
1683 #elif defined(__APPLE__)
1684 #include <CoreFoundation/CFByteOrder.h>
1685 #define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x )
1686 +#elif defined(__AROS__)
1687 +#define CPU_TO_LE32( x ) AROS_BE2LONG( x )
1688 #elif (defined(_AIX) || defined(__blrts))
1689 static INLINE GLuint CPU_TO_LE32(GLuint x)
1695 +#if defined(__AROS__)
1698 #if !defined(_WIN32_WCE)
1699 #if defined(BUILD_FOR_SNAP) && defined(CHECKED)
1700 # define ASSERT(X) _CHECK(X)
1701 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/mesa/main/dispatch.h ./mesa/src/mesa/main/dispatch.h
1702 --- /data/deadwood/source/Mesa-7.11-staging/src/mesa/main/dispatch.h 2011-07-09 03:37:10.000000000 +0200
1703 +++ ./mesa/src/mesa/main/dispatch.h 2011-09-07 20:43:00.000000000 +0200
1704 @@ -12099,14 +12099,14 @@
1705 SET_by_offset(disp, _gloffset_GetTexParameterPointervAPPLE, fn);
1708 -typedef void (GLAPIENTRYP _glptr_TextureRangeAPPLE)(GLenum, GLsizei, GLvoid *);
1709 +typedef void (GLAPIENTRYP _glptr_TextureRangeAPPLE)(GLenum, GLsizei, const GLvoid *);
1710 #define CALL_TextureRangeAPPLE(disp, parameters) \
1711 (* GET_TextureRangeAPPLE(disp)) parameters
1712 static INLINE _glptr_TextureRangeAPPLE GET_TextureRangeAPPLE(struct _glapi_table *disp) {
1713 return (_glptr_TextureRangeAPPLE) (GET_by_offset(disp, _gloffset_TextureRangeAPPLE));
1716 -static INLINE void SET_TextureRangeAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLvoid *)) {
1717 +static INLINE void SET_TextureRangeAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLvoid *)) {
1718 SET_by_offset(disp, _gloffset_TextureRangeAPPLE, fn);
1721 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/mesa/main/dlist.c ./mesa/src/mesa/main/dlist.c
1722 --- /data/deadwood/source/Mesa-7.11-staging/src/mesa/main/dlist.c 2011-07-09 03:37:10.000000000 +0200
1723 +++ ./mesa/src/mesa/main/dlist.c 2011-09-05 20:03:01.000000000 +0200
1724 @@ -7541,6 +7541,7 @@
1725 CALL_Clear(ctx->Exec, (n[1].bf));
1727 case OPCODE_CLEAR_BUFFER_IV:
1732 @@ -7549,8 +7550,10 @@
1734 /*CALL_ClearBufferiv(ctx->Exec, (n[1].e, n[2].i, value));*/
1738 case OPCODE_CLEAR_BUFFER_UIV:
1743 @@ -7559,8 +7562,10 @@
1745 /*CALL_ClearBufferiv(ctx->Exec, (n[1].e, n[2].i, value));*/
1749 case OPCODE_CLEAR_BUFFER_FV:
1754 @@ -7569,6 +7574,7 @@
1756 /*CALL_ClearBufferfv(ctx->Exec, (n[1].e, n[2].i, value));*/
1760 case OPCODE_CLEAR_BUFFER_FI:
1761 /*CALL_ClearBufferfi(ctx->Exec, (n[1].e, n[2].i, n[3].f, n[4].i));*/
1762 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/mesa/main/imports.c ./mesa/src/mesa/main/imports.c
1763 --- /data/deadwood/source/Mesa-7.11-staging/src/mesa/main/imports.c 2011-07-09 03:37:10.000000000 +0200
1764 +++ ./mesa/src/mesa/main/imports.c 2011-09-05 20:03:01.000000000 +0200
1765 @@ -453,14 +453,14 @@
1770 +#if !defined(__GNUC__) || defined(__AROS__)
1772 * Find the first bit set in a word.
1775 _mesa_ffs(int32_t i)
1777 -#if (defined(_WIN32) ) || defined(__IBMC__) || defined(__IBMCPP__)
1778 +#if (defined(_WIN32) ) || defined(__IBMC__) || defined(__IBMCPP__) || defined(__AROS__)
1779 register int bit = 0;
1781 if ((i & 0xffff) == 0) {
1786 -#if !defined(__GNUC__) ||\
1787 +#if !defined(__GNUC__) || defined(__AROS__) ||\
1788 ((_GNUC__ == 3 && __GNUC_MINOR__ < 4) && __GNUC__ < 4)
1790 * Return number of bits set in given GLuint.
1791 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/mesa/main/imports.h ./mesa/src/mesa/main/imports.h
1792 --- /data/deadwood/source/Mesa-7.11-staging/src/mesa/main/imports.h 2011-07-09 03:37:10.000000000 +0200
1793 +++ ./mesa/src/mesa/main/imports.h 2011-09-05 20:03:01.000000000 +0200
1796 _mesa_init_sqrt_table(void);
1799 +#if defined(__GNUC__) && !defined(__AROS__)
1802 #define ffs __builtin_ffs
1803 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/mesa/main/querymatrix.c ./mesa/src/mesa/main/querymatrix.c
1804 --- /data/deadwood/source/Mesa-7.11-staging/src/mesa/main/querymatrix.c 2010-12-14 22:43:15.000000000 +0100
1805 +++ ./mesa/src/mesa/main/querymatrix.c 2011-08-31 12:37:50.000000000 +0200
1807 (defined(__sun) && defined(__GNUC__))
1809 /* fpclassify is available. */
1810 +#elif defined(__AROS__)
1813 +#define fpclassify(x) FP_NORMAL
1815 #elif !defined(_XOPEN_SOURCE) || _XOPEN_SOURCE < 600
1817 diff -ur '--exclude-from=./mesa/src/aros/mesa.diff.excluded' -I '^.*\bRevision.*Date.*\b.*$' /data/deadwood/source/Mesa-7.11-staging/src/mesa/main/version.c ./mesa/src/mesa/main/version.c
1818 --- /data/deadwood/source/Mesa-7.11-staging/src/mesa/main/version.c 2011-07-09 03:37:10.000000000 +0200
1819 +++ ./mesa/src/mesa/main/version.c 2011-09-05 20:03:01.000000000 +0200
1821 #include "imports.h"
1823 #include "version.h"
1824 +#ifdef MESA_GIT_SHA1
1825 #include "git_sha1.h"