diff options
47 files changed, 750 insertions, 336 deletions
diff --git a/X11/extensions/shm.h b/X11/extensions/shm.h index e076402a8..be49f5e97 100644 --- a/X11/extensions/shm.h +++ b/X11/extensions/shm.h @@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group. #define SHMNAME "MIT-SHM" #define SHM_MAJOR_VERSION 1 /* current version numbers */ -#define SHM_MINOR_VERSION 1 +#define SHM_MINOR_VERSION 2 #define ShmCompletion 0 #define ShmNumberEvents (ShmCompletion + 1) diff --git a/X11/extensions/shmproto.h b/X11/extensions/shmproto.h index e5de377b9..8136aa9f7 100644 --- a/X11/extensions/shmproto.h +++ b/X11/extensions/shmproto.h @@ -43,6 +43,8 @@ in this Software without prior written authorization from The Open Group. #define X_ShmPutImage 3 #define X_ShmGetImage 4 #define X_ShmCreatePixmap 5 +#define X_ShmAttachFd 6 +#define X_ShmCreateSegment 7 typedef struct _ShmQueryVersion { CARD8 reqType; /* always ShmReqCode */ @@ -178,6 +180,46 @@ typedef struct _ShmCompletion { } xShmCompletionEvent; #define sz_xShmCompletionEvent 32 +/* Version 1.2 additions */ +typedef struct _ShmAttachFd { + CARD8 reqType; /* always ShmReqCode */ + CARD8 shmReqType; /* always X_ShmAttachFd */ + CARD16 length B16; + ShmSeg shmseg B32; + BOOL readOnly; + BYTE pad0; + CARD16 pad1 B16; +} xShmAttachFdReq; +/* File descriptor is passed with this request */ +#define sz_xShmAttachFdReq 12 + +typedef struct _ShmCreateSegment { + CARD8 reqType; /* always ShmReqCode */ + CARD8 shmReqType; /* always X_ShmAttachFd */ + CARD16 length B16; + ShmSeg shmseg B32; + CARD32 size B32; + BOOL readOnly; + BYTE pad0; + CARD16 pad1 B16; +} xShmCreateSegmentReq; +#define sz_xShmCreateSegmentReq 16 + +typedef struct { + CARD8 type; /* must be X_Reply */ + CARD8 nfd; /* must be 1 */ + CARD16 sequenceNumber B16; /* last sequence number */ + CARD32 length B32; /* 0 */ + CARD32 pad2 B32; /* unused */ + CARD32 pad3 B32; /* unused */ + CARD32 pad4 B32; /* unused */ + CARD32 pad5 B32; /* unused */ + CARD32 pad6 B32; /* unused */ + CARD32 pad7 B32; /* unused */ +} xShmCreateSegmentReply; +/* File descriptor is passed with this reply */ +#define sz_xShmCreateSegmentReply 32 + #undef ShmSeg #undef Drawable #undef VisualID diff --git a/fontconfig/fc-cache/fc-cache.c b/fontconfig/fc-cache/fc-cache.c index af7ba6dd6..27c751304 100644 --- a/fontconfig/fc-cache/fc-cache.c +++ b/fontconfig/fc-cache/fc-cache.c @@ -118,7 +118,7 @@ usage (char *program, int error) static FcStrSet *processed_dirs; static int -scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, FcBool verbose, FcBool recursive, int *changed) +scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, FcBool verbose, FcBool recursive, int *changed, FcStrSet *updateDirs) { int ret = 0; const FcChar8 *dir; @@ -137,7 +137,10 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, { if (verbose) { - printf ("%s: ", dir); + if (!recursive) + printf ("Re-scanning %s: ", dir); + else + printf ("%s: ", dir); fflush (stdout); } @@ -226,6 +229,8 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, } for (i = 0; i < FcCacheNumSubdir (cache); i++) FcStrSetAdd (subdirs, FcCacheSubdir (cache, i)); + if (updateDirs && FcCacheNumSubdir (cache) > 0) + FcStrSetAdd (updateDirs, dir); FcDirCacheUnload (cache); @@ -238,7 +243,7 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, continue; } FcStrSetAdd (processed_dirs, dir); - ret += scanDirs (sublist, config, force, really_force, verbose, recursive, changed); + ret += scanDirs (sublist, config, force, really_force, verbose, recursive, changed, updateDirs); FcStrListDone (sublist); } else @@ -271,7 +276,7 @@ cleanCacheDirectories (FcConfig *config, FcBool verbose) int main (int argc, char **argv) { - FcStrSet *dirs; + FcStrSet *dirs, *updateDirs; FcStrList *list; FcBool verbose = FcFalse; FcBool force = FcFalse; @@ -369,13 +374,18 @@ main (int argc, char **argv) fprintf(stderr, "Cannot malloc\n"); return 1; } - + + updateDirs = FcStrSetCreate (); changed = 0; - ret = scanDirs (list, config, force, really_force, verbose, FcTrue, &changed); + ret = scanDirs (list, config, force, really_force, verbose, FcTrue, &changed, updateDirs); /* Update the directory cache again to avoid the race condition as much as possible */ - FcStrListFirst (list); - ret += scanDirs (list, config, FcTrue, really_force, verbose, FcFalse, &changed); FcStrListDone (list); + list = FcStrListCreate (updateDirs); + if (list) + { + ret += scanDirs (list, config, FcTrue, really_force, verbose, FcFalse, &changed, NULL); + FcStrListDone (list); + } /* * Try to create CACHEDIR.TAG anyway. diff --git a/fontconfig/fc-glyphname/fc-glyphname.c b/fontconfig/fc-glyphname/fc-glyphname.c index 840278164..078490ae4 100644 --- a/fontconfig/fc-glyphname/fc-glyphname.c +++ b/fontconfig/fc-glyphname/fc-glyphname.c @@ -233,7 +233,7 @@ dump (FcGlyphName * const *table, const char *name) int main (int argc FC_UNUSED, char **argv) { - char *files[MAX_GLYPHFILE]; + char *files[MAX_GLYPHFILE + 1]; char line[1024]; FILE *f; int i; diff --git a/fontconfig/fc-lang/fc-lang.c b/fontconfig/fc-lang/fc-lang.c index 0f4217f78..38fc69735 100644 --- a/fontconfig/fc-lang/fc-lang.c +++ b/fontconfig/fc-lang/fc-lang.c @@ -254,7 +254,7 @@ static int compare (const void *a, const void *b) int main (int argc FC_UNUSED, char **argv) { - static Entry entries[MAX_LANG]; + static Entry entries[MAX_LANG + 1]; static FcCharSet *sets[MAX_LANG]; static int duplicate[MAX_LANG]; static int country[MAX_LANG]; diff --git a/fontconfig/src/fcname.c b/fontconfig/src/fcname.c index 712b2fad3..f302948dd 100644 --- a/fontconfig/src/fcname.c +++ b/fontconfig/src/fcname.c @@ -420,6 +420,8 @@ FcNameParse (const FcChar8 *name) if ((c = FcNameGetConstant (save))) { t = FcNameGetObjectType ((char *) c->object); + if (t == NULL) + goto bail2; switch ((int) t->type) { case FcTypeInteger: case FcTypeDouble: diff --git a/fontconfig/src/fcstr.c b/fontconfig/src/fcstr.c index 570717243..024dae325 100644 --- a/fontconfig/src/fcstr.c +++ b/fontconfig/src/fcstr.c @@ -924,12 +924,16 @@ FcStrBuildFilename (const FcChar8 *path, ...) { va_list ap; - FcStrSet *sset = FcStrSetCreate (); + FcStrSet *sset; FcStrList *list; FcChar8 *s, *ret = NULL, *p; size_t len = 0; - if (!sset || !path) + if (!path) + return NULL; + + sset = FcStrSetCreate (); + if (!sset) return NULL; if (!FcStrSetAdd (sset, path)) diff --git a/libxcb/xcb-proto/src/Makefile.am b/libxcb/xcb-proto/src/Makefile.am index eef2dbc45..d81d818a6 100644 --- a/libxcb/xcb-proto/src/Makefile.am +++ b/libxcb/xcb-proto/src/Makefile.am @@ -6,8 +6,10 @@ xcbinclude_HEADERS = \ damage.xml \ dpms.xml \ dri2.xml \ + dri3.xml \ ge.xml \ glx.xml \ + present.xml \ randr.xml \ record.xml \ render.xml \ diff --git a/libxcb/xcb-proto/src/dri3.xml b/libxcb/xcb-proto/src/dri3.xml new file mode 100644 index 000000000..608af3157 --- /dev/null +++ b/libxcb/xcb-proto/src/dri3.xml @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + +Copyright © 2013 Keith Packard + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting documentation, and +that the name of the copyright holders not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. The copyright holders make no representations +about the suitability of this software for any purpose. It is provided "as +is" without express or implied warranty. + +THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +OF THIS SOFTWARE. +--> + +<xcb header="dri3" extension-xname="DRI3" extension-name="DRI3" + major-version="1" minor-version="0"> + <import>xproto</import> + + <!-- Types --> + + <!-- Requests --> + <request name="QueryVersion" opcode="0"> + <field type="CARD32" name="major_version" /> + <field type="CARD32" name="minor_version" /> + <reply> + <pad bytes="1" /> + <field type="CARD32" name="major_version" /> + <field type="CARD32" name="minor_version" /> + </reply> + </request> + + <request name="Open" opcode="1"> + <field type="DRAWABLE" name="drawable" /> + <field type="CARD32" name="provider" /> + <reply> + <field type="CARD8" name="nfd"/> + <fd name="device_fd" /> + <pad bytes="24" /> + </reply> + </request> + + <request name="PixmapFromBuffer" opcode="2"> + <field type="PIXMAP" name="pixmap" /> + <field type="DRAWABLE" name="drawable" /> + <field type="CARD32" name="size" /> + <field type="CARD16" name="width" /> + <field type="CARD16" name="height" /> + <field type="CARD16" name="stride" /> + <field type="CARD8" name="depth" /> + <field type="CARD8" name="bpp" /> + <fd name="pixmap_fd" /> + </request> + + <request name="BufferFromPixmap" opcode="3"> + <field type="PIXMAP" name="pixmap" /> + <reply> + <field type="CARD8" name="nfd"/> + <field type="CARD32" name="size" /> + <field type="CARD16" name="width" /> + <field type="CARD16" name="height" /> + <field type="CARD16" name="stride" /> + <field type="CARD8" name="depth" /> + <field type="CARD8" name="bpp" /> + <fd name="pixmap_fd" /> + <pad bytes="12"/> + </reply> + </request> + + <request name="FenceFromFD" opcode="4"> + <field type="DRAWABLE" name="drawable" /> + <field type="CARD32" name="fence"/> + <field type="BOOL" name="initially_triggered"/> + <pad bytes="3"/> + <fd name="fence_fd"/> + </request> + + <request name="FDFromFence" opcode="5"> + <field type="DRAWABLE" name="drawable" /> + <field type="CARD32" name="fence"/> + <reply> + <field type="CARD8" name="nfd"/> + <fd name="fence_fd" /> + <pad bytes="24"/> + </reply> + </request> + +</xcb> diff --git a/libxcb/xcb-proto/src/present.xml b/libxcb/xcb-proto/src/present.xml new file mode 100644 index 000000000..d12ae4879 --- /dev/null +++ b/libxcb/xcb-proto/src/present.xml @@ -0,0 +1,205 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + +Copyright © 2013 Keith Packard + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting documentation, and +that the name of the copyright holders not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. The copyright holders make no representations +about the suitability of this software for any purpose. It is provided "as +is" without express or implied warranty. + +THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +OF THIS SOFTWARE. +--> + +<xcb header="present" extension-xname="Present" extension-name="Present" + major-version="1" minor-version="0"> + <import>xproto</import> + <import>randr</import> + <import>xfixes</import> + <import>sync</import> + + <!-- Types --> + + <enum name="Event"> + <item name="ConfigureNotify"><value>0</value></item> + <item name="CompleteNotify"><value>1</value></item> + <item name="IdleNotify"><value>2</value></item> + <item name="RedirectNotify"><value>3</value></item> + </enum> + + <enum name="EventMask"> + <item name="NoEvent"><value>0</value></item> + <item name="ConfigureNotify"><bit>0</bit></item> + <item name="CompleteNotify"><bit>1</bit></item> + <item name="IdleNotify"><bit>2</bit></item> + <item name="RedirectNotify"><bit>3</bit></item> + </enum> + + <enum name="Option"> + <item name="None"><value>0</value></item> + <item name="Async"><bit>0</bit></item> + <item name="Copy"><bit>1</bit></item> + <item name="UST"><bit>2</bit></item> + </enum> + + <enum name="Capability"> + <item name="None"><value>0</value></item> + <item name="Async"><bit>0</bit></item> + <item name="Fence"><bit>1</bit></item> + <item name="UST"><bit>2</bit></item> + </enum> + + <enum name="CompleteKind"> + <item name="Pixmap"><value>0</value></item> + <item name="NotifyMSC"><value>1</value></item> + </enum> + + <enum name="CompleteMode"> + <item name="Copy"><value>0</value></item> + <item name="Flip"><value>1</value></item> + <item name="Skip"><value>2</value></item> + </enum> + + <struct name="Notify"> + <field type="WINDOW" name="window" /> + <field type="CARD32" name="serial" /> + </struct> + + <!-- Requests --> + <request name="QueryVersion" opcode="0"> + <field type="CARD32" name="major_version" /> + <field type="CARD32" name="minor_version" /> + <reply> + <pad bytes="1" /> + <field type="CARD32" name="major_version" /> + <field type="CARD32" name="minor_version" /> + </reply> + </request> + + <request name="Pixmap" opcode="1"> + <field type="WINDOW" name="window" /> + <field type="PIXMAP" name="pixmap" /> + <field type="CARD32" name="serial" /> + <field type="REGION" name="valid" /> + <field type="REGION" name="update" /> + <field type="INT16" name="x_off" /> + <field type="INT16" name="y_off" /> + <field type="CRTC" name="target_crtc" /> + <field type="FENCE" name="wait_fence" /> + <field type="FENCE" name="idle_fence" /> + <field type="CARD32" name="options" /> + <pad bytes="4"/> + <field type="CARD64" name="target_msc" /> + <field type="CARD64" name="divisor" /> + <field type="CARD64" name="remainder" /> + <list type="Notify" name="notifies"/> + </request> + + <request name="NotifyMSC" opcode="2"> + <field type="WINDOW" name="window" /> + <field type="CARD32" name="serial" /> + <pad bytes="4"/> + <field type="CARD64" name="target_msc" /> + <field type="CARD64" name="divisor" /> + <field type="CARD64" name="remainder" /> + </request> + + <xidtype name="EVENT"/> + + <request name="SelectInput" opcode="3"> + <field type="EVENT" name="eid"/> + <field type="WINDOW" name="window" /> + <field type="CARD32" name="event_mask" mask="EventMask" /> + </request> + + <request name="QueryCapabilities" opcode="4"> + <field type="CARD32" name="target" /> + <reply> + <pad bytes="1" /> + <field type="CARD32" name="capabilities" /> + </reply> + </request> + + <!-- Events --> + + <event name="Generic"> + <field type="CARD8" name="extension" /> + <field type="CARD32" name="length" /> + <field type="CARD16" name="evtype" enum="EventType" /> + <pad bytes="2" /> + <field type="EVENT" name="event" /> + </event> + + <event name="ConfigureNotify" number="0" xge="true"> + <pad bytes="2" /> + <field type="EVENT" name="event" /> + <field type="WINDOW" name="window" /> + <field type="INT16" name="x" /> + <field type="INT16" name="y" /> + <field type="CARD16" name="width" /> + <field type="CARD16" name="height" /> + <field type="INT16" name="off_x" /> + <field type="INT16" name="off_y" /> + <field type="CARD16" name="pixmap_width" /> + <field type="CARD16" name="pixmap_height" /> + <field type="CARD32" name="pixmap_flags" /> + </event> + + <event name="CompleteNotify" number="1" xge="true"> + <field type="CARD8" name="kind" enum="CompleteKind" /> + <field type="CARD8" name="mode" enum="CompleteMode" /> + <field type="EVENT" name="event" /> + <field type="WINDOW" name="window" /> + <field type="CARD32" name="serial" /> + <field type="CARD64" name="ust" /> + <field type="CARD64" name="msc" /> + </event> + + <event name="IdleNotify" number="2" xge="true"> + <pad bytes="2"/> + <field type="EVENT" name="event" /> + <field type="WINDOW" name="window" /> + <field type="CARD32" name="serial" /> + <field type="PIXMAP" name="pixmap" /> + <field type="FENCE" name="idle_fence" /> + </event> + + <event name="RedirectNotify" number="3" xge="true"> + <field type="BOOL" name="update_window"/> + <pad bytes="1"/> + <field type="EVENT" name="event" /> + <field type="WINDOW" name="event_window" /> + <field type="WINDOW" name="window" /> + <field type="PIXMAP" name="pixmap" /> + <field type="CARD32" name="serial" /> + + <field type="REGION" name="valid_region" /> + <field type="REGION" name="update_region" /> + <field type="RECTANGLE" name="valid_rect" /> + <field type="RECTANGLE" name="update_rect" /> + + <field type="INT16" name="x_off" /> + <field type="INT16" name="y_off" /> + <field type="CRTC" name="target_crtc" /> + <field type="FENCE" name="wait_fence" /> + <field type="FENCE" name="idle_fence" /> + <field type="CARD32" name="options" /> + <pad bytes="4"/> + <field type="CARD64" name="target_msc" /> + <field type="CARD64" name="divisor" /> + <field type="CARD64" name="remainder" /> + <list type="Notify" name="notifies"/> + </event> + +</xcb> diff --git a/libxcb/xcb-proto/src/shm.xml b/libxcb/xcb-proto/src/shm.xml index adda50957..71fce14fa 100644 --- a/libxcb/xcb-proto/src/shm.xml +++ b/libxcb/xcb-proto/src/shm.xml @@ -26,7 +26,7 @@ sale, use or other dealings in this Software without prior written authorization from the authors. --> <xcb header="shm" extension-xname="MIT-SHM" extension-name="Shm" - major-version="1" minor-version="1"> + major-version="1" minor-version="2"> <import>xproto</import> <xidtype name="SEG" /> @@ -113,4 +113,23 @@ authorization from the authors. <field type="SEG" name="shmseg" /> <field type="CARD32" name="offset" /> </request> + + <request name="AttachFd" opcode="6"> + <field type="SEG" name="shmseg" /> + <fd name="shm_fd" /> + <field type="BOOL" name="read_only" /> + <pad bytes="3" /> + </request> + + <request name="CreateSegment" opcode="7"> + <field type="SEG" name="shmseg" /> + <field type="CARD32" name="size" /> + <field type="BOOL" name="read_only" /> + <pad bytes="3" /> + <reply> + <field type="CARD8" name="nfd" /> + <fd name="shm_fd" /> + <pad bytes="24" /> + </reply> + </request> </xcb> diff --git a/libxcb/xcb-proto/src/sync.xml b/libxcb/xcb-proto/src/sync.xml index 7bcf0ae32..bc07c5b63 100644 --- a/libxcb/xcb-proto/src/sync.xml +++ b/libxcb/xcb-proto/src/sync.xml @@ -48,7 +48,7 @@ for licensing information. <struct name="SYSTEMCOUNTER"> <field type="COUNTER" name="counter" /> - <field type="INT64" name="resolution" /> + <field type="sync:INT64" name="resolution" /> <field type="CARD16" name="name_len" /> <list type="char" name="name"> <fieldref>name_len</fieldref> @@ -58,13 +58,13 @@ for licensing information. <struct name="TRIGGER"> <field type="COUNTER" name="counter" /> <field type="CARD32" name="wait_type" enum="VALUETYPE" /> - <field type="INT64" name="wait_value" /> + <field type="sync:INT64" name="wait_value" /> <field type="CARD32" name="test_type" enum="TESTTYPE" /> </struct> <struct name="WAITCONDITION"> <field type="TRIGGER" name="trigger" /> - <field type="INT64" name="event_threshold" /> + <field type="sync:INT64" name="event_threshold" /> </struct> <error name="Counter" number="0"> @@ -103,7 +103,7 @@ for licensing information. <request name="CreateCounter" opcode="2"> <field type="COUNTER" name="id" /> - <field type="INT64" name="initial_value" /> + <field type="sync:INT64" name="initial_value" /> </request> <request name="DestroyCounter" opcode="6"> @@ -114,7 +114,7 @@ for licensing information. <field type="COUNTER" name="counter" /> <reply> <pad bytes="1" /> - <field type="INT64" name="counter_value" /> + <field type="sync:INT64" name="counter_value" /> </reply> </request> @@ -124,12 +124,12 @@ for licensing information. <request name="ChangeCounter" opcode="4"> <field type="COUNTER" name="counter" /> - <field type="INT64" name="amount" /> + <field type="sync:INT64" name="amount" /> </request> <request name="SetCounter" opcode="3"> <field type="COUNTER" name="counter" /> - <field type="INT64" name="value" /> + <field type="sync:INT64" name="value" /> </request> <request name="CreateAlarm" opcode="8"> @@ -205,7 +205,7 @@ for licensing information. <reply> <pad bytes="1" /> <field type="TRIGGER" name="trigger" /> - <field type="INT64" name="delta" /> + <field type="sync:INT64" name="delta" /> <field type="BOOL" name="events" /> <field type="CARD8" name="state" enum="ALARMSTATE" /> <pad bytes="2" /> @@ -259,8 +259,8 @@ for licensing information. <event name="CounterNotify" number="0"> <field type="CARD8" name="kind" /> <field type="COUNTER" name="counter" /> - <field type="INT64" name="wait_value" /> - <field type="INT64" name="counter_value" /> + <field type="sync:INT64" name="wait_value" /> + <field type="sync:INT64" name="counter_value" /> <field type="TIMESTAMP" name="timestamp" /> <field type="CARD16" name="count" /> <field type="BOOL" name="destroyed" /> @@ -270,8 +270,8 @@ for licensing information. <event name="AlarmNotify" number="1"> <field type="CARD8" name="kind" /> <field type="ALARM" name="alarm" /> - <field type="INT64" name="counter_value" /> - <field type="INT64" name="alarm_value" /> + <field type="sync:INT64" name="counter_value" /> + <field type="sync:INT64" name="alarm_value" /> <field type="TIMESTAMP" name="timestamp" /> <field type="CARD8" name="state" enum="ALARMSTATE" /> <pad bytes="3" /> diff --git a/libxcb/xcb-proto/src/xkb.xml b/libxcb/xcb-proto/src/xkb.xml index 45f64127e..2ea659c29 100644 --- a/libxcb/xcb-proto/src/xkb.xml +++ b/libxcb/xcb-proto/src/xkb.xml @@ -130,29 +130,21 @@ authorization from the authors. <item name="ControlsEnabled"> <bit>31</bit> </item> </enum> - <enum name="AXFBOpt"> + <enum name="AXOption"> <item name="SKPressFB"> <bit>0</bit> </item> <item name="SKAcceptFB"> <bit>1</bit> </item> <item name="FeatureFB"> <bit>2</bit> </item> <item name="SlowWarnFB"> <bit>3</bit> </item> <item name="IndicatorFB"> <bit>4</bit> </item> <item name="StickyKeysFB"> <bit>5</bit> </item> - <item name="SKReleaseFB"> <bit>6</bit> </item> - <item name="SKRejectFB"> <bit>7</bit> </item> - <item name="BKRejectFB"> <bit>8</bit> </item> - <item name="DumbBell"> <bit>9</bit> </item> + <item name="TwoKeys"> <bit>6</bit> </item> + <item name="LatchToLock"> <bit>7</bit> </item> + <item name="SKReleaseFB"> <bit>8</bit> </item> + <item name="SKRejectFB"> <bit>9</bit> </item> + <item name="BKRejectFB"> <bit>10</bit> </item> + <item name="DumbBell"> <bit>11</bit> </item> </enum> - <enum name="AXSKOpt"> - <item name="TwoKeys"> <bit>6</bit> </item> - <item name="LatchToLock"> <bit>7</bit> </item> - </enum> - - <union name="AXOption"> - <field name="fbopt" type="CARD16" enum="AXFBOpt" /> - <field name="skopt" type="CARD16" enum="AXSKOpt" /> - </union> - <typedef oldname="CARD16" newname="DeviceSpec" /> <enum name="LedClassResult"> @@ -1229,10 +1221,10 @@ authorization from the authors. <field name="mouseKeysTimeToMax" type="CARD16" /> <field name="mouseKeysMaxSpeed" type="CARD16" /> <field name="mouseKeysCurve" type="INT16" /> - <field name="accessXOption" type="AXOption" /> + <field name="accessXOption" type="CARD16" mask="AXOption" /> <field name="accessXTimeout" type="CARD16" /> - <field name="accessXTimeoutOptionsMask" type="AXOption" /> - <field name="accessXTimeoutOptionsValues" type="AXOption" /> + <field name="accessXTimeoutOptionsMask" type="CARD16" mask="AXOption" /> + <field name="accessXTimeoutOptionsValues" type="CARD16" mask="AXOption" /> <pad bytes="2" /> <field name="accessXTimeoutMask" type="CARD32" mask="BoolCtrl" /> <field name="accessXTimeoutValues" type="CARD32" mask="BoolCtrl" /> @@ -1255,7 +1247,7 @@ authorization from the authors. <field name="ignoreLockVirtualMods" type="CARD16" mask="VMod" /> <field name="mouseKeysDfltBtn" type="CARD8" /> <field name="groupsWrap" type="CARD8" /> - <field name="accessXOptions" type="AXOption" /> + <field name="accessXOptions" type="CARD16" mask="AXOption" /> <pad bytes="2" /> <field name="affectEnabledControls" type="CARD32" mask="BoolCtrl" /> <field name="enabledControls" type="CARD32" mask="BoolCtrl" /> @@ -1272,8 +1264,8 @@ authorization from the authors. <field name="accessXTimeout" type="CARD16" /> <field name="accessXTimeoutMask" type="CARD32" mask="BoolCtrl" /> <field name="accessXTimeoutValues" type="CARD32" mask="BoolCtrl" /> - <field name="accessXTimeoutOptionsMask" type="AXOption" /> - <field name="accessXTimeoutOptionsValues" type="AXOption" /> + <field name="accessXTimeoutOptionsMask" type="CARD16" mask="AXOption" /> + <field name="accessXTimeoutOptionsValues" type="CARD16" mask="AXOption" /> <list name="perKeyRepeat" type="CARD8"> <value>32</value> </list> diff --git a/libxcb/xcb-proto/src/xproto.xml b/libxcb/xcb-proto/src/xproto.xml index 16e04b442..defa11e6e 100644 --- a/libxcb/xcb-proto/src/xproto.xml +++ b/libxcb/xcb-proto/src/xproto.xml @@ -1080,7 +1080,21 @@ The number of keycodes altered. </doc> </event> - + <event name="ge" number="35" xge="true"> + <pad bytes="22" /> + <doc> + <brief>generic event (with length)</brief> + <field name="extension"><![CDATA[ +The major opcode of the extension creating this event + ]]></field> + <field name="length"><![CDATA[ +The amount (in 4-byte units) of data beyond 32 bytes + ]]></field> + <field name="evtype"><![CDATA[ +The extension-specific event type + ]]></field> + </doc> + </event> <!-- Core error types --> diff --git a/libxcb/xcb-proto/xcbgen/expr.py b/libxcb/xcb-proto/xcbgen/expr.py index 4f8af6f83..f9d5179f0 100644 --- a/libxcb/xcb-proto/xcbgen/expr.py +++ b/libxcb/xcb-proto/xcbgen/expr.py @@ -13,7 +13,7 @@ class Field(object): auto is true iff the field is on the wire but not in the request API (e.g. opcode) enum is the enum name this field refers to, if any. ''' - def __init__(self, type, field_type, field_name, visible, wire, auto, enum=None): + def __init__(self, type, field_type, field_name, visible, wire, auto, enum=None, isfd=False): self.type = type self.field_type = field_type self.field_name = field_name @@ -21,6 +21,7 @@ class Field(object): self.visible = visible self.wire = wire self.auto = auto + self.isfd = isfd class Expression(object): diff --git a/libxcb/xcb-proto/xcbgen/state.py b/libxcb/xcb-proto/xcbgen/state.py index ae3d2d45f..10a8722ea 100644 --- a/libxcb/xcb-proto/xcbgen/state.py +++ b/libxcb/xcb-proto/xcbgen/state.py @@ -74,9 +74,11 @@ class Module(object): self.add_type('CARD8', '', ('uint8_t',), tcard8) self.add_type('CARD16', '', ('uint16_t',), tcard16) self.add_type('CARD32', '', ('uint32_t',), tcard32) + self.add_type('CARD64', '', ('uint64_t',), tcard64) self.add_type('INT8', '', ('int8_t',), tint8) self.add_type('INT16', '', ('int16_t',), tint16) self.add_type('INT32', '', ('int32_t',), tint32) + self.add_type('INT64', '', ('int64_t',), tint64) self.add_type('BYTE', '', ('uint8_t',), tcard8) self.add_type('BOOL', '', ('uint8_t',), tcard8) self.add_type('char', '', ('char',), tchar) diff --git a/libxcb/xcb-proto/xcbgen/xtypes.py b/libxcb/xcb-proto/xcbgen/xtypes.py index a4614d9d2..6150d1818 100644 --- a/libxcb/xcb-proto/xcbgen/xtypes.py +++ b/libxcb/xcb-proto/xcbgen/xtypes.py @@ -75,6 +75,18 @@ class Type(object): complex_type.fields.append(new_field) + def make_fd_of(self, module, complex_type, fd_name): + ''' + Method for making a fd member of a structure. + ''' + new_fd = Field(self, module.get_type_name('INT32'), fd_name, True, False, False, None, True) + # We dump the _placeholder_byte if any fields are added. + for (idx, field) in enumerate(complex_type.fields): + if field == _placeholder_byte: + complex_type.fields[idx] = new_fd + return + + complex_type.fields.append(new_fd) class SimpleType(Type): ''' @@ -103,9 +115,11 @@ class SimpleType(Type): tcard8 = SimpleType(('uint8_t',), 1) tcard16 = SimpleType(('uint16_t',), 2) tcard32 = SimpleType(('uint32_t',), 4) +tcard64 = SimpleType(('uint64_t',), 8) tint8 = SimpleType(('int8_t',), 1) tint16 = SimpleType(('int16_t',), 2) tint32 = SimpleType(('int32_t',), 4) +tint64 = SimpleType(('int64_t',), 8) tchar = SimpleType(('char',), 1) tfloat = SimpleType(('float',), 4) tdouble = SimpleType(('double',), 8) @@ -150,6 +164,44 @@ class Enum(SimpleType): out = __main__.output['enum'] +class FileDescriptor(SimpleType): + ''' + Derived class which represents a file descriptor. Passed via magic kernel stuff + + Public fields added: + values contains a list of (name, value) tuples. value is empty, or a number. + bits contains a list of (name, bitnum) tuples. items only appear if specified as a bit. bitnum is a number. + ''' + def __init__(self, name, elt): + SimpleType.__init__(self, name, 4) + self.values = [] + self.bits = [] + self.doc = None + for item in list(elt): + if item.tag == 'doc': + self.doc = Doc(name, item) + + # First check if we're using a default value + if len(list(item)) == 0: + self.values.append((item.get('name'), '')) + continue + + # An explicit value or bit was specified. + value = list(item)[0] + if value.tag == 'value': + self.values.append((item.get('name'), value.text)) + elif value.tag == 'bit': + self.values.append((item.get('name'), '%u' % (1 << int(value.text, 0)))) + self.bits.append((item.get('name'), value.text)) + + def resolve(self, module): + self.resolved = True + + def fixed_size(self): + return True + + out = __main__.output['enum'] + class ListType(Type): ''' Derived class which represents a list of some other datatype. Fixed- or variable-sized. @@ -277,6 +329,7 @@ class ComplexType(Type): self.nmemb = 1 self.size = 0 self.lenfield_parent = [self] + self.fds = [] def resolve(self, module): if self.resolved: @@ -322,9 +375,14 @@ class ComplexType(Type): type.make_member_of(module, self, field_type, field_name, visible, True, False) type.resolve(module) continue + elif child.tag == 'fd': + fd_name = child.get('name') + type = module.get_type('INT32') + type.make_fd_of(module, self, fd_name) + continue else: # Hit this on Reply - continue + continue # Get the full type name for the field field_type = module.get_type_name(fkey) diff --git a/mesalib/Makefile.am b/mesalib/Makefile.am index 343badef4..361fb5122 100644 --- a/mesalib/Makefile.am +++ b/mesalib/Makefile.am @@ -64,7 +64,7 @@ IGNORE_FILES = \ parsers: configure $(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp glcpp/glcpp-lex.c glcpp/glcpp-parse.c glcpp/glcpp-parse.h - $(MAKE) -C src/mesa/program lex.yy.c program_parse.tab.c program_parse.tab.h + $(MAKE) -C src/mesa program/lex.yy.c program/program_parse.tab.c program/program_parse.tab.h # Everything for new a Mesa release: ARCHIVES = $(PACKAGE_NAME).tar.gz \ diff --git a/mesalib/configure.ac b/mesalib/configure.ac index 0a250471e..a8366ee2f 100644 --- a/mesalib/configure.ac +++ b/mesalib/configure.ac @@ -14,10 +14,6 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE([foreign]) -dnl http://people.gnome.org/~walters/docs/build-api.txt -dnl We don't support srcdir != builddir. -echo \#buildapi-variable-no-builddir >/dev/null - # Support silent build rules, requires at least automake-1.11. Disable # by either passing --disable-silent-rules to configure or passing V=1 # to make @@ -974,7 +970,7 @@ if test "x$enable_dri" = xyes; then ;; esac ;; - freebsd* | dragonfly* | *netbsd* | openbsd*) + *freebsd* | dragonfly* | *netbsd* | openbsd*) DEFINES="$DEFINES -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1" DEFINES="$DEFINES -DHAVE_ALIAS" @@ -2096,7 +2092,6 @@ AC_CONFIG_FILES([Makefile src/mesa/drivers/x11/Makefile src/mesa/main/tests/Makefile src/mesa/main/tests/hash_table/Makefile - src/mesa/program/Makefile src/mesa/x86-64/Makefile src/mesa/x86/Makefile]) diff --git a/mesalib/docs/GL3.txt b/mesalib/docs/GL3.txt index ff28ea6a8..7d100dff1 100644 --- a/mesalib/docs/GL3.txt +++ b/mesalib/docs/GL3.txt @@ -20,45 +20,45 @@ Feature Status GL 3.0: -GLSL 1.30 DONE +GLSL 1.30 DONE (i965, r600, radeonsi) glBindFragDataLocation, glGetFragDataLocation DONE -Conditional rendering (GL_NV_conditional_render) DONE (i965, r300, r600, swrast) -Map buffer subranges (GL_ARB_map_buffer_range) DONE (i965, r300, r600, swrast) -Clamping controls (GL_ARB_color_buffer_float) DONE (i965, r300, r600) -Float textures, renderbuffers (GL_ARB_texture_float) DONE (i965, r300, r600) -GL_EXT_packed_float DONE (i965, r600) -GL_EXT_texture_shared_exponent DONE (i965, r600, swrast) -Float depth buffers (GL_ARB_depth_buffer_float) DONE (i965, r600) -Framebuffer objects (GL_ARB_framebuffer_object) DONE (i965, r300, r600, swrast) -Half-float DONE -Non-normalized Integer texture/framebuffer formats DONE (i965, r600) -1D/2D Texture arrays DONE -Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE (i965, r600, swrast) -GL_EXT_texture_compression_rgtc DONE (i965, r300, r600, swrast) -Red and red/green texture formats DONE (i965, swrast, gallium) -Transform feedback (GL_EXT_transform_feedback) DONE (i965, r600) -Vertex array objects (GL_APPLE_vertex_array_object) DONE (i965, r300, r600, swrast) -sRGB framebuffer format (GL_EXT_framebuffer_sRGB) DONE (i965, r600) +Conditional rendering (GL_NV_conditional_render) DONE (i965, r300, r600, radeonsi, swrast) +Map buffer subranges (GL_ARB_map_buffer_range) DONE (i965, r300, r600, radeonsi, swrast) +Clamping controls (GL_ARB_color_buffer_float) DONE (i965, r300, r600, radeonsi) +Float textures, renderbuffers (GL_ARB_texture_float) DONE (i965, r300, r600, radeonsi) +GL_EXT_packed_float DONE (i965, r600, radeonsi) +GL_EXT_texture_shared_exponent DONE (i965, r600, radeonsi, swrast) +Float depth buffers (GL_ARB_depth_buffer_float) DONE (i965, r600, radeonsi) +Framebuffer objects (GL_ARB_framebuffer_object) DONE (i965, r300, r600, radeonsi, swrast) +Half-float DONE (i965, r300, r600, radeonsi, swrast) +Non-normalized Integer texture/framebuffer formats DONE (i965, r600, radeonsi) +1D/2D Texture arrays DONE (i965, r600, radeonsi) +Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE (i965, r600, radeonsi, swrast) +GL_EXT_texture_compression_rgtc DONE (i965, r300, r600, radeonsi, swrast) +Red and red/green texture formats DONE (i965, r300, r600, radeonsi, swrast) +Transform feedback (GL_EXT_transform_feedback) DONE (i965, r600, radeonsi) +Vertex array objects (GL_APPLE_vertex_array_object) DONE (all drivers) +sRGB framebuffer format (GL_EXT_framebuffer_sRGB) DONE (i965, r600, radeonsi) glClearBuffer commands DONE glGetStringi command DONE glTexParameterI, glGetTexParameterI commands DONE glVertexAttribI commands DONE -Depth format cube textures DONE +Depth format cube textures DONE (i965, r600, radeonsi) GLX_ARB_create_context (GLX 1.4 is required) DONE GL 3.1: -GLSL 1.40 DONE (i965, r600) -Forward compatibile context support/deprecations DONE (i965, r600) -Instanced drawing (GL_ARB_draw_instanced) DONE (i965, gallium, swrast) -Buffer copying (GL_ARB_copy_buffer) DONE (i965, r300, r600, swrast) -Primitive restart (GL_NV_primitive_restart) DONE (i965, r600) -16 vertex texture image units DONE -Texture buffer objs (GL_ARB_texture_buffer_object) DONE for OpenGL 3.1 contexts (i965, r600) -Rectangular textures (GL_ARB_texture_rectangle) DONE (i965, r300, r600, swrast) -Uniform buffer objs (GL_ARB_uniform_buffer_object) DONE (i965, r600, swrast) -Signed normalized textures (GL_EXT_texture_snorm) DONE (i965, r300, r600) +GLSL 1.40 DONE (i965, r600, radeonsi) +Forward compatible context support/deprecations DONE (i965, r600, radeonsi) +Instanced drawing (GL_ARB_draw_instanced) DONE (i965, r600, radeonsi, swrast) +Buffer copying (GL_ARB_copy_buffer) DONE (i965, r300, r600, radeonsi, swrast) +Primitive restart (GL_NV_primitive_restart) DONE (i965, r300, r600, radeonsi) +16 vertex texture image units DONE (i965, r600, radeonsi) +Texture buffer objs (GL_ARB_texture_buffer_object) DONE for OpenGL 3.1 contexts (i965, r600, radeonsi) +Rectangular textures (GL_ARB_texture_rectangle) DONE (i965, r300, r600, radeonsi, swrast) +Uniform buffer objs (GL_ARB_uniform_buffer_object) DONE (i965, r600, radeonsi, swrast) +Signed normalized textures (GL_EXT_texture_snorm) DONE (i965, r300, r600, radeonsi) GL 3.2: @@ -66,54 +66,54 @@ GL 3.2: Core/compatibility profiles DONE GLSL 1.50 DONE (i965) Geometry shaders DONE (i965) -BGRA vertex order (GL_ARB_vertex_array_bgra) DONE (i965, r300, r600, swrast) -Base vertex offset(GL_ARB_draw_elements_base_vertex) DONE (i965, r300, r600, swrast) -Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (i965, r300, r600, swrast) -Provoking vertex (GL_ARB_provoking_vertex) DONE (i965, r300, r600, swrast) -Seamless cubemaps (GL_ARB_seamless_cube_map) DONE (i965, r600) -Multisample textures (GL_ARB_texture_multisample) DONE (i965, r600) -Frag depth clamp (GL_ARB_depth_clamp) DONE (i965, r600, swrast) -Fence objects (GL_ARB_sync) DONE (i965, r300, r600, swrast) +BGRA vertex order (GL_ARB_vertex_array_bgra) DONE (i965, r300, r600, radeonsi, swrast) +Base vertex offset(GL_ARB_draw_elements_base_vertex) DONE (i965, r300, r600, radeonsi, swrast) +Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (i965, r300, r600, radeonsi, swrast) +Provoking vertex (GL_ARB_provoking_vertex) DONE (i965, r300, r600, radeonsi, swrast) +Seamless cubemaps (GL_ARB_seamless_cube_map) DONE (i965, r600, radeonsi) +Multisample textures (GL_ARB_texture_multisample) DONE (i965, r600, radeonsi) +Frag depth clamp (GL_ARB_depth_clamp) DONE (i965, r600, swrast, radeonsi) +Fence objects (GL_ARB_sync) DONE (i965, r300, r600, radeonsi, swrast) GLX_ARB_create_context_profile DONE GL 3.3: GLSL 3.30 DONE (i965) -GL_ARB_blend_func_extended DONE (i965, r600, softpipe) -GL_ARB_explicit_attrib_location DONE (i915, i965, r300, r600, swrast) -GL_ARB_occlusion_query2 DONE (i965, r300, r600, swrast) -GL_ARB_sampler_objects DONE (i965, r300, r600) -GL_ARB_shader_bit_encoding DONE -GL_ARB_texture_rgb10_a2ui DONE (i965, r600) -GL_ARB_texture_swizzle DONE (same as EXT version) (i965, r300, r600, swrast) -GL_ARB_timer_query DONE (i965, r600) -GL_ARB_instanced_arrays DONE (i965, r300, r600) -GL_ARB_vertex_type_2_10_10_10_rev DONE (i965, r600) +GL_ARB_blend_func_extended DONE (i965, r600, radeonsi, softpipe) +GL_ARB_explicit_attrib_location DONE (i915, i965, r300, r600, radeonsi, swrast) +GL_ARB_occlusion_query2 DONE (i965, r300, r600, radeonsi, swrast) +GL_ARB_sampler_objects DONE (i965, r300, r600, radeonsi) +GL_ARB_shader_bit_encoding DONE (i965, r600, radeonsi) +GL_ARB_texture_rgb10_a2ui DONE (i965, r600, radeonsi) +GL_ARB_texture_swizzle DONE (i965, r300, r600, radeonsi, swrast) +GL_ARB_timer_query DONE (i965, r600, radeonsi) +GL_ARB_instanced_arrays DONE (i965, r300, r600, radeonsi) +GL_ARB_vertex_type_2_10_10_10_rev DONE (i965, r600, radeonsi) GL 4.0: GLSL 4.0 not started GL_ARB_texture_query_lod DONE (i965) -GL_ARB_draw_buffers_blend DONE (i965, r600, softpipe) +GL_ARB_draw_buffers_blend DONE (i965, r600, radeonsi, softpipe) GL_ARB_draw_indirect started (Christoph) GL_ARB_gpu_shader5 started GL_ARB_gpu_shader_fp64 not started -GL_ARB_sample_shading started (Anuj) +GL_ARB_sample_shading DONE (i965) GL_ARB_shader_subroutine not started GL_ARB_tessellation_shader not started -GL_ARB_texture_buffer_object_rgb32 DONE (i965, softpipe) -GL_ARB_texture_cube_map_array DONE (i965, softpipe) +GL_ARB_texture_buffer_object_rgb32 DONE (i965, r600, radeonsi, softpipe) +GL_ARB_texture_cube_map_array DONE (i965, r600, softpipe) GL_ARB_texture_gather DONE (i965) -GL_ARB_transform_feedback2 DONE -GL_ARB_transform_feedback3 DONE +GL_ARB_transform_feedback2 DONE (r600, radeonsi) +GL_ARB_transform_feedback3 DONE (r600, radeonsi) GL 4.1: GLSL 4.1 not started -GL_ARB_ES2_compatibility DONE (i965, r300, r600) +GL_ARB_ES2_compatibility DONE (i965, r300, r600, radeonsi) GL_ARB_get_program_binary DONE (0 binary formats) GL_ARB_separate_shader_objects some infrastructure done GL_ARB_shader_precision not started @@ -127,55 +127,55 @@ GLSL 4.2 not started GL_ARB_texture_compression_bptc not started GL_ARB_compressed_texture_pixel_storage not started GL_ARB_shader_atomic_counters in progress (Curro) -GL_ARB_texture_storage DONE (i965, r300, r600, swrast, gallium) -GL_ARB_transform_feedback_instanced DONE +GL_ARB_texture_storage DONE (all drivers) +GL_ARB_transform_feedback_instanced DONE (r600, radeonsi) GL_ARB_base_instance DONE (i965, nv50, nvc0, r600, radeonsi) GL_ARB_shader_image_load_store not started -GL_ARB_conservative_depth DONE (i965, softpipe) -GL_ARB_shading_language_420pack DONE (i965, gallium) -GL_ARB_internalformat_query DONE (i965, gallium) +GL_ARB_conservative_depth DONE (all drivers that support GLSL 1.30) +GL_ARB_shading_language_420pack DONE (all drivers that support GLSL 1.30) +GL_ARB_internalformat_query DONE (i965, r300, r600, radeonsi) GL_ARB_map_buffer_alignment DONE (r300, r600, radeonsi) GL 4.3: GLSL 4.3 not started -ARB_arrays_of_arrays not started -ARB_ES3_compatibility DONE (i965) -ARB_clear_buffer_object not started -ARB_compute_shader started (gallium) -ARB_copy_image not started -KHR_debug DONE -ARB_explicit_uniform_location not started -ARB_fragment_layer_viewport not started -ARB_framebuffer_no_attachments not started -ARB_internalformat_query2 not started -ARB_invalidate_subdata not started -ARB_multi_draw_indirect not started -ARB_program_interface_query not started -ARB_robust_buffer_access_behavior not started -ARB_shader_image_size not started -ARB_shader_storage_buffer_object not started -ARB_stencil_texturing not started -ARB_texture_buffer_range DONE (nv50, nvc0, i965) -ARB_texture_query_levels DONE (i965) -ARB_texture_storage_multisample DONE (i965) -ARB_texture_view not started -ARB_vertex_attrib_binding started (Fredrik) +GL_ARB_arrays_of_arrays not started +GL_ARB_ES3_compatibility DONE (i965) +GL_ARB_clear_buffer_object not started +GL_ARB_compute_shader not started +GL_ARB_copy_image not started +GL_KHR_debug DONE (all drivers) +GL_ARB_explicit_uniform_location not started +GL_ARB_fragment_layer_viewport not started +GL_ARB_framebuffer_no_attachments not started +GL_ARB_internalformat_query2 not started +GL_ARB_invalidate_subdata DONE (all drivers) +GL_ARB_multi_draw_indirect not started +GL_ARB_program_interface_query not started +GL_ARB_robust_buffer_access_behavior not started +GL_ARB_shader_image_size not started +GL_ARB_shader_storage_buffer_object not started +GL_ARB_stencil_texturing not started +GL_ARB_texture_buffer_range DONE (nv50, nvc0, i965, r600, radeonsi) +GL_ARB_texture_query_levels DONE (i965) +GL_ARB_texture_storage_multisample DONE (all drivers that support GL_ARB_texture_multisample) +GL_ARB_texture_view not started +GL_ARB_vertex_attrib_binding started (Fredrik) GL 4.4: GLSL 4.4 not started -MAX_VERTEX_ATTRIB_STRIDE not started -ARB_buffer_storage not started -ARB_clear_texture not started -ARB_enhanced_layouts not started -ARB_multi_bind not started -ARB_query_buffer_object not started -ARB_texture_mirror_clamp_to_edge DONE (i965, nv30, nv50, nvc0, r300, r600, radeonsi, swrast) -ARB_texture_stencil8 not started -ARB_vertex_type_10f_11f_11f_rev not started +GL_MAX_VERTEX_ATTRIB_STRIDE not started +GL_ARB_buffer_storage not started +GL_ARB_clear_texture not started +GL_ARB_enhanced_layouts not started +GL_ARB_multi_bind not started +GL_ARB_query_buffer_object not started +GL_ARB_texture_mirror_clamp_to_edge DONE (i965, nv30, nv50, nvc0, r300, r600, radeonsi, swrast) +GL_ARB_texture_stencil8 not started +GL_ARB_vertex_type_10f_11f_11f_rev not started More info about these features and the work involved can be found at diff --git a/mesalib/docs/relnotes/10.0.html b/mesalib/docs/relnotes/10.0.html index 5ff53398e..b74d03dc2 100644 --- a/mesalib/docs/relnotes/10.0.html +++ b/mesalib/docs/relnotes/10.0.html @@ -50,6 +50,7 @@ Note: some of the new features are only available with certain drivers. <li>GL_ARB_texture_query_levels on i965.</li> <li>GL_ARB_texture_mirror_clamp_to_edge.</li> <li>GL_ARB_transform_feedback2, GL_ARB_transform_feedback3, and GL_ARB_transform_feedback_instanced on i965/Gen7 (with appropriate kernel support).</li> +<li>GL_ARB_sample_shading on i965.</li> <li>GL_KHR_debug</li> </ul> diff --git a/mesalib/include/GL/gl.h b/mesalib/include/GL/gl.h index 6b94e3fb0..b484b96ce 100644 --- a/mesalib/include/GL/gl.h +++ b/mesalib/include/GL/gl.h @@ -33,25 +33,14 @@ /********************************************************************** - * Begin system-specific stuff. Do not do any of this when building - * for SciTech SNAP, as this is all done before this header file is - * included. + * Begin system-specific stuff. */ -#if !defined(__SCITECH_SNAP__) - -#if defined(__BEOS__) -#include <stdlib.h> /* to get some BeOS-isms */ -#endif - -#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO)) -#define OPENSTEP -#endif #if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) #define __WIN32__ #endif -#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) +#if defined(__WIN32__) && !defined(__CYGWIN__) # if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ # define GLAPI __declspec(dllexport) # elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ @@ -72,10 +61,6 @@ # define GLAPIENTRY #endif /* WIN32 && !CYGWIN */ -#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) -# define PRAGMA_EXPORT_SUPPORTED 1 -#endif - /* * WINDOWS: Include windows.h here to define APIENTRY. * It is also useful when applications include this file by @@ -91,10 +76,6 @@ #include <windows.h> #endif -#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED -#pragma import on -#endif - #ifndef GLAPI #define GLAPI extern #endif @@ -116,15 +97,10 @@ #define GLAPIENTRYP GLAPIENTRY * #endif -#ifdef CENTERLINE_CLPP -#define signed -#endif - #if defined(PRAGMA_EXPORT_SUPPORTED) #pragma export on #endif -#endif /* !__SCITECH_SNAP__ */ /* * End system-specific stuff. **********************************************************************/ @@ -2177,9 +2153,6 @@ typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum t #pragma export off #endif -#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED -#pragma import off -#endif /* * End system-specific stuff **********************************************************************/ diff --git a/mesalib/include/GL/osmesa.h b/mesalib/include/GL/osmesa.h index c36f64981..10c472d49 100644 --- a/mesalib/include/GL/osmesa.h +++ b/mesalib/include/GL/osmesa.h @@ -101,11 +101,6 @@ extern "C" { typedef struct osmesa_context *OSMesaContext; -#if defined(__QUICKDRAW__) -#pragma export on -#endif - - /* * Create an Off-Screen Mesa rendering context. The only attribute needed is * an RGBA vs Color-Index mode flag. diff --git a/mesalib/scons/gallium.py b/mesalib/scons/gallium.py index be3c3e7d9..ea8bacdce 100644 --- a/mesalib/scons/gallium.py +++ b/mesalib/scons/gallium.py @@ -295,8 +295,6 @@ def generate(env): cppdefines += ['_DEBUG'] if platform == 'windows': cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_USER'] - if platform == 'haiku': - cppdefines += ['BEOS_THREADS'] if env['embedded']: cppdefines += ['PIPE_SUBSYSTEM_EMBEDDED'] if env['texture_float']: diff --git a/mesalib/src/gallium/auxiliary/util/u_format.h b/mesalib/src/gallium/auxiliary/util/u_format.h index dc777c35c..369c3994a 100644 --- a/mesalib/src/gallium/auxiliary/util/u_format.h +++ b/mesalib/src/gallium/auxiliary/util/u_format.h @@ -696,6 +696,9 @@ util_format_is_rgba8_variant(const struct util_format_description *desc) if(desc->channel[chan].type != UTIL_FORMAT_TYPE_UNSIGNED && desc->channel[chan].type != UTIL_FORMAT_TYPE_VOID) return FALSE; + if(desc->channel[chan].type == UTIL_FORMAT_TYPE_UNSIGNED && + !desc->channel[chan].normalized) + return FALSE; if(desc->channel[chan].size != 8) return FALSE; } diff --git a/mesalib/src/glsl/lower_packed_varyings.cpp b/mesalib/src/glsl/lower_packed_varyings.cpp index 2bcadfd55..61ee692f6 100644 --- a/mesalib/src/glsl/lower_packed_varyings.cpp +++ b/mesalib/src/glsl/lower_packed_varyings.cpp @@ -506,17 +506,16 @@ lower_packed_varyings_visitor::lower_arraylike(ir_rvalue *rvalue, ir_constant *constant = new(this->mem_ctx) ir_constant(i); ir_dereference_array *dereference_array = new(this->mem_ctx) ir_dereference_array(rvalue, constant); - char *subscripted_name - = ralloc_asprintf(this->mem_ctx, "%s[%d]", name, i); if (gs_input_toplevel) { /* Geometry shader inputs are a special case. Instead of storing * each element of the array at a different location, all elements * are at the same location, but with a different vertex index. */ (void) this->lower_rvalue(dereference_array, fine_location, - unpacked_var, subscripted_name, - false, i); + unpacked_var, name, false, i); } else { + char *subscripted_name + = ralloc_asprintf(this->mem_ctx, "%s[%d]", name, i); fine_location = this->lower_rvalue(dereference_array, fine_location, unpacked_var, subscripted_name, diff --git a/mesalib/src/mesa/Makefile.am b/mesalib/src/mesa/Makefile.am index f86caee35..a54b8ac1b 100644 --- a/mesalib/src/mesa/Makefile.am +++ b/mesalib/src/mesa/Makefile.am @@ -19,7 +19,7 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. -SUBDIRS = program x86 x86-64 . main/tests +SUBDIRS = x86 x86-64 . main/tests if HAVE_X11_DRIVER SUBDIRS += drivers/x11 @@ -59,11 +59,17 @@ main/git_sha1.h: main/git_sha1.h.tmp GLAPI = $(top_srcdir)/src/mapi/glapi/gen include $(GLAPI)/glapi_gen.mk +BUILDDIR = $(builddir)/ +include Makefile.sources + BUILT_SOURCES = \ main/git_sha1.h \ - main/get_hash.h + main/get_hash.h \ + $(BUILDDIR)program/program_parse.tab.c \ + $(BUILDDIR)program/lex.yy.c CLEANFILES = \ $(BUILT_SOURCES) \ + $(BUILDDIR)program/program_parse.tab.h \ git_sha1.h.tmp GET_HASH_GEN = main/get_hash_generator.py @@ -85,10 +91,6 @@ if HAVE_GALLIUM noinst_LTLIBRARIES += libmesagallium.la endif -SRCDIR = $(top_srcdir)/src/mesa/ -BUILDDIR = $(top_builddir)/src/mesa/ -include Makefile.sources - AM_CPPFLAGS = $(DEFINES) $(INCLUDE_DIRS) AM_CFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CFLAGS) AM_CXXFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CXXFLAGS) @@ -97,45 +99,46 @@ MESA_ASM_FILES_FOR_ARCH = if HAVE_X86_ASM MESA_ASM_FILES_FOR_ARCH += $(X86_FILES) -AM_CPPFLAGS += \ - -I$(top_builddir)/src/mesa/x86 \ - -I$(top_srcdir)/src/mesa/x86 +AM_CPPFLAGS += -I$(builddir)/x86 -I$(srcdir)/x86 endif if HAVE_X86_64_ASM MESA_ASM_FILES_FOR_ARCH += $(X86_64_FILES) -AM_CPPFLAGS += \ - -I$(top_builddir)/src/mesa/x86-64 \ - -I$(top_srcdir)/src/mesa/x86-64 +AM_CPPFLAGS += -I$(builddir)/x86-64 -I$(srcdir)/x86-64 endif if HAVE_SPARC_ASM MESA_ASM_FILES_FOR_ARCH += $(SPARC_FILES) -AM_CPPFLAGS += \ - -I$(top_builddir)/src/mesa/sparc \ - -I$(top_srcdir)/src/mesa/sparc +AM_CPPFLAGS += -I$(builddir)/sparc -I$(srcdir)/sparc endif libmesa_la_SOURCES = \ $(MESA_FILES) \ + $(PROGRAM_FILES) \ $(MESA_ASM_FILES_FOR_ARCH) libmesa_la_LIBADD = \ $(top_builddir)/src/glsl/libglsl.la \ - $(top_builddir)/src/mesa/program/libprogram.la \ $() -libmesa_la_LDFLAGS = libmesagallium_la_SOURCES = \ $(MESA_GALLIUM_FILES) \ + $(PROGRAM_FILES) \ $(MESA_ASM_FILES_FOR_ARCH) libmesagallium_la_LIBADD = \ $(top_builddir)/src/glsl/libglsl.la \ - $(top_builddir)/src/mesa/program/libprogram.la \ $() pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gl.pc +$(BUILDDIR)program/lex.yy.c: program/program_lexer.l + $(MKDIR_P) $(builddir)/program + $(AM_V_GEN) $(LEX) --never-interactive --outfile=$@ $< + +$(BUILDDIR)program/program_parse.tab.c $(BUILDDIR)program/program_parse.tab.h: program/program_parse.y + $(MKDIR_P) $(builddir)/program + $(AM_V_GEN) $(YACC) -p "_mesa_program_" -v -d --output=$(BUILDDIR)program/program_parse.tab.c $< + # Emacs tags tags: etags `find . -name \*.[ch]` $(top_srcdir)/include/GL/*.h diff --git a/mesalib/src/mesa/main/compiler.h b/mesalib/src/mesa/main/compiler.h index d806d5b9d..97075f58e 100644 --- a/mesalib/src/mesa/main/compiler.h +++ b/mesalib/src/mesa/main/compiler.h @@ -36,11 +36,7 @@ #include <assert.h> #include <ctype.h> -#if defined(__alpha__) && defined(CCPML) -#include <cpml.h> /* use Compaq's Fast Math Library on Alpha */ -#else #include <math.h> -#endif #include <limits.h> #include <stdlib.h> #include <stdio.h> @@ -84,15 +80,13 @@ extern "C" { */ #if defined(_MSC_VER) # define finite _finite -#elif defined(__WATCOMC__) -# define finite _finite #endif /** * Disable assorted warnings */ -#if !defined(OPENSTEP) && (defined(_WIN32) && !defined(__CYGWIN__)) && !defined(BUILD_FOR_SNAP) +#if defined(_WIN32) && !defined(__CYGWIN__) # if !defined(__GNUC__) /* mingw environment */ # pragma warning( disable : 4068 ) /* unknown pragma */ # pragma warning( disable : 4710 ) /* function 'foo' not inlined */ @@ -107,9 +101,6 @@ extern "C" { # endif # endif #endif -#if defined(__WATCOMC__) -# pragma disable_message(201) /* Disable unreachable code warnings */ -#endif @@ -198,7 +189,7 @@ static INLINE GLuint CPU_TO_LE32(GLuint x) -#if !defined(CAPI) && defined(_WIN32) && !defined(BUILD_FOR_SNAP) +#if !defined(CAPI) && defined(_WIN32) #define CAPI _cdecl #endif @@ -208,7 +199,7 @@ static INLINE GLuint CPU_TO_LE32(GLuint x) * than GNU C */ #ifndef _ASMAPI -#if defined(_WIN32) && !defined(BUILD_FOR_SNAP)/* was: !defined( __GNUC__ ) && !defined( VMS ) && !defined( __INTEL_COMPILER )*/ +#if defined(_WIN32) #define _ASMAPI __cdecl #else #define _ASMAPI @@ -239,9 +230,7 @@ static INLINE GLuint CPU_TO_LE32(GLuint x) * ASSERT macro */ #if !defined(_WIN32_WCE) -#if defined(BUILD_FOR_SNAP) && defined(CHECKED) -# define ASSERT(X) _CHECK(X) -#elif defined(DEBUG) +#if defined(DEBUG) # define ASSERT(X) assert(X) #else # define ASSERT(X) @@ -259,6 +248,21 @@ static INLINE GLuint CPU_TO_LE32(GLuint x) (void) sizeof(char [1 - 2*!(COND)]); \ } while (0) +/** + * Unreachable macro. Useful for suppressing "control reaches end of non-void + * function" warnings. + */ +#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 5 +#define unreachable() __builtin_unreachable() +#elif (defined(__clang__) && defined(__has_builtin)) +# if __has_builtin(__builtin_unreachable) +# define unreachable() __builtin_unreachable() +# endif +#endif + +#ifndef unreachable +#define unreachable() +#endif #if (__GNUC__ >= 3) #define PRINTFLIKE(f, a) __attribute__ ((format(__printf__, f, a))) @@ -322,7 +326,7 @@ static INLINE GLuint CPU_TO_LE32(GLuint x) defined(ia64) || defined(__ia64__) || \ defined(__hppa__) || defined(hpux) || \ defined(__mips) || defined(_MIPS_ARCH) || \ - defined(__arm__) || \ + defined(__arm__) || defined(__aarch64__) || \ defined(__sh__) || defined(__m32r__) || \ (defined(__sun) && defined(_IEEE_754)) || \ defined(__alpha__) @@ -383,36 +387,6 @@ do { \ __asm__ ( "fnclex ; fldcw %0" : : "m" (*&(x)) ); \ } while (0) -#elif defined(__WATCOMC__) && defined(__386__) -#define DEFAULT_X86_FPU 0x037f /* See GCC comments above */ -#define FAST_X86_FPU 0x003f /* See GCC comments above */ -void _watcom_start_fast_math(unsigned short *x,unsigned short *mask); -#pragma aux _watcom_start_fast_math = \ - "fnstcw word ptr [eax]" \ - "fldcw word ptr [ecx]" \ - parm [eax] [ecx] \ - modify exact []; -void _watcom_end_fast_math(unsigned short *x); -#pragma aux _watcom_end_fast_math = \ - "fnclex" \ - "fldcw word ptr [eax]" \ - parm [eax] \ - modify exact []; -#if defined(NO_FAST_MATH) -#define START_FAST_MATH(x) \ -do { \ - static GLushort mask = DEFAULT_X86_FPU; \ - _watcom_start_fast_math(&x,&mask); \ -} while (0) -#else -#define START_FAST_MATH(x) \ -do { \ - static GLushort mask = FAST_X86_FPU; \ - _watcom_start_fast_math(&x,&mask); \ -} while (0) -#endif -#define END_FAST_MATH(x) _watcom_end_fast_math(&x) - #elif defined(_MSC_VER) && defined(_M_IX86) #define DEFAULT_X86_FPU 0x037f /* See GCC comments above */ #define FAST_X86_FPU 0x003f /* See GCC comments above */ diff --git a/mesalib/src/mesa/main/glheader.h b/mesalib/src/mesa/main/glheader.h index 4ed51b317..7f7f9a39b 100644 --- a/mesalib/src/mesa/main/glheader.h +++ b/mesalib/src/mesa/main/glheader.h @@ -33,22 +33,6 @@ #define GLHEADER_H -#ifdef WGLAPI -#undef WGLAPI -#endif - - -#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) && !defined(BUILD_FOR_SNAP) -# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ -# define WGLAPI __declspec(dllexport) -# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ -# define WGLAPI __declspec(dllimport) -# else /* for use with static link lib build of Win32 edition only */ -# define WGLAPI __declspec(dllimport) -# endif /* _STATIC_MESA support */ -#endif /* WIN32 / CYGWIN bracket */ - - #define GL_GLEXT_PROTOTYPES #include "GL/gl.h" #include "GL/glext.h" diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c index 7da860ddf..1d9aac39d 100644 --- a/mesalib/src/mesa/main/shaderapi.c +++ b/mesalib/src/mesa/main/shaderapi.c @@ -825,6 +825,8 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj) fprintf(stderr, "GLSL source for %s shader %d:\n", _mesa_glsl_shader_target_name(sh->Type), sh->Name); fprintf(stderr, "%s\n", sh->Source); + fprintf(stderr, "Info Log:\n%s\n", sh->InfoLog); + fflush(stderr); } if (ctx->Shader.Flags & GLSL_REPORT_ERRORS) { diff --git a/mesalib/src/mesa/math/m_clip_tmp.h b/mesalib/src/mesa/math/m_clip_tmp.h index 5cfcf91dd..45dec47f0 100644 --- a/mesalib/src/mesa/math/m_clip_tmp.h +++ b/mesalib/src/mesa/math/m_clip_tmp.h @@ -60,7 +60,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points4)( GLvector4f *clip_vec, const GLfloat cy = from[1]; const GLfloat cz = from[2]; const GLfloat cw = from[3]; -#if defined(macintosh) || defined(__powerpc__) +#if defined(__powerpc__) /* on powerpc cliptest is 17% faster in this way. */ GLuint mask; mask = (((cw < cx) << CLIP_RIGHT_SHIFT)); @@ -71,7 +71,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points4)( GLvector4f *clip_vec, mask |= (((cw < cz) << CLIP_FAR_SHIFT)); mask |= (((cw < -cz) << CLIP_NEAR_SHIFT)); } -#else /* !defined(macintosh)) */ +#else GLubyte mask = 0; if (-cx + cw < 0) mask |= CLIP_RIGHT_BIT; if ( cx + cw < 0) mask |= CLIP_LEFT_BIT; @@ -81,7 +81,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points4)( GLvector4f *clip_vec, if (-cz + cw < 0) mask |= CLIP_FAR_BIT; if ( cz + cw < 0) mask |= CLIP_NEAR_BIT; } -#endif /* defined(macintosh) */ +#endif clipMask[i] = mask; if (mask) { @@ -140,7 +140,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_np_points4)( GLvector4f *clip_vec, const GLfloat cy = from[1]; const GLfloat cz = from[2]; const GLfloat cw = from[3]; -#if defined(macintosh) || defined(__powerpc__) +#if defined(__powerpc__) /* on powerpc cliptest is 17% faster in this way. */ GLuint mask; mask = (((cw < cx) << CLIP_RIGHT_SHIFT)); @@ -151,7 +151,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_np_points4)( GLvector4f *clip_vec, mask |= (((cw < cz) << CLIP_FAR_SHIFT)); mask |= (((cw < -cz) << CLIP_NEAR_SHIFT)); } -#else /* !defined(macintosh)) */ +#else GLubyte mask = 0; if (-cx + cw < 0) mask |= CLIP_RIGHT_BIT; if ( cx + cw < 0) mask |= CLIP_LEFT_BIT; @@ -161,7 +161,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_np_points4)( GLvector4f *clip_vec, if (-cz + cw < 0) mask |= CLIP_FAR_BIT; if ( cz + cw < 0) mask |= CLIP_NEAR_BIT; } -#endif /* defined(macintosh) */ +#endif clipMask[i] = mask; if (mask) { diff --git a/mesalib/src/mesa/math/m_debug_util.h b/mesalib/src/mesa/math/m_debug_util.h index d526e9656..d05da8994 100644 --- a/mesalib/src/mesa/math/m_debug_util.h +++ b/mesalib/src/mesa/math/m_debug_util.h @@ -305,8 +305,6 @@ enum { NIL = 0, ONE = 1, NEG = -1, VAR = 2 }; # define ALIGN16(type, array) type array __attribute__ ((aligned (16))) #elif defined(_MSC_VER) # define ALIGN16(type, array) type array __declspec(align(16)) /* GH: Does this work? */ -#elif defined(__WATCOMC__) -# define ALIGN16(type, array) /* Watcom does not support this */ #elif defined(__xlC__) # define ALIGN16(type, array) type __align (16) array #else diff --git a/mesalib/src/mesa/program/Makefile.am b/mesalib/src/mesa/program/Makefile.am deleted file mode 100644 index 5e05782fb..000000000 --- a/mesalib/src/mesa/program/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright © 2012 Intel Corporation -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. - -include ../Makefile.sources - -AM_CPPFLAGS = $(DEFINES) $(INCLUDE_DIRS) -AM_CFLAGS = $(VISIBILITY_CFLAGS) -AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS) - -SRCDIR = $(top_srcdir)/src/mesa/ -BUILDDIR = $(top_builddir)/src/mesa/ - -noinst_LTLIBRARIES = libprogram.la - -libprogram_la_SOURCES = $(PROGRAM_FILES) - -lex.yy.c: program_lexer.l - $(AM_V_GEN) $(LEX) --never-interactive --outfile=$@ $< - -program_parse.tab.c program_parse.tab.h: program_parse.y - $(AM_V_GEN) $(YACC) -p "_mesa_program_" -v -d --output=program_parse.tab.c $< - -BUILT_SOURCES = \ - program_parse.tab.c \ - program_parse.tab.h \ - lex.yy.c -CLEANFILES = $(BUILT_SOURCES) diff --git a/mesalib/src/mesa/x86/assyntax.h b/mesalib/src/mesa/x86/assyntax.h index 4a41812f6..fa7d92ea5 100644 --- a/mesalib/src/mesa/x86/assyntax.h +++ b/mesalib/src/mesa/x86/assyntax.h @@ -920,17 +920,9 @@ #define D_BYTE db /* #define SPACE */ /* #define COMM */ -#if defined(__WATCOMC__) -SECTION _TEXT public align=16 class=CODE use32 flat -SECTION _DATA public align=16 class=DATA use32 flat -#define SEG_TEXT SECTION _TEXT -#define SEG_DATA SECTION _DATA -#define SEG_BSS SECTION .bss -#else #define SEG_DATA SECTION .data #define SEG_TEXT SECTION .text #define SEG_BSS SECTION .bss -#endif #define D_SPACE(n) db n REP 0 diff --git a/xorg-server/Xext/sync.c b/xorg-server/Xext/sync.c index b956c9ec8..cd3f53e38 100644 --- a/xorg-server/Xext/sync.c +++ b/xorg-server/Xext/sync.c @@ -917,6 +917,7 @@ SyncCreate(ClientPtr client, XID id, unsigned char type) int SyncCreateFenceFromFD(ClientPtr client, DrawablePtr pDraw, XID id, int fd, BOOL initially_triggered) { +#if HAVE_XSHMFENCE SyncFence *pFence; int status; @@ -934,12 +935,19 @@ SyncCreateFenceFromFD(ClientPtr client, DrawablePtr pDraw, XID id, int fd, BOOL return BadAlloc; return Success; +#else + return BadImplementation; +#endif } int SyncFDFromFence(ClientPtr client, DrawablePtr pDraw, SyncFence *pFence) { +#if HAVE_XSHMFENCE return miSyncFDFromFence(pDraw, pFence); +#else + return BadImplementation; +#endif } static SyncCounter * diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac index 0d855f250..6925df814 100644 --- a/xorg-server/configure.ac +++ b/xorg-server/configure.ac @@ -792,6 +792,7 @@ DMXPROTO="dmxproto >= 2.2.99.1" VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1" WINDOWSWMPROTO="windowswmproto" APPLEWMPROTO="applewmproto >= 1.4" +XSHMFENCE="xshmfence" dnl Required modules XPROTO="xproto >= 7.0.22" @@ -1074,7 +1075,7 @@ if test "x$GLX" = xyes; then AC_SUBST(XLIB_CFLAGS) AC_DEFINE(GLXEXT, 1, [Build GLX extension]) GLX_LIBS='$(top_builddir)/glx/libglx.la' - GLX_SYS_LIBS="$GLX_SYS_LIBS -lGL" + GLX_SYS_LIBS="$GLX_SYS_LIBS $GL_LIBS" else GLX=no fi @@ -1119,17 +1120,60 @@ AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes) PKG_CHECK_MODULES([DRI3PROTO], $DRI3PROTO, [HAVE_DRI3PROTO=yes], [HAVE_DRI3PROTO=no]) + case "$DRI3,$HAVE_DRI3PROTO" in + yes,yes | auto,yes) + ;; yes,no) AC_MSG_ERROR([DRI3 requested, but dri3proto not found.]) + DRI3=no + ;; + no,*) + ;; + *) + AC_MSG_NOTICE([DRI3 disabled because dri3proto not found.]) + DRI3=no ;; +esac + +PKG_CHECK_MODULES([XSHMFENCE], $XSHMFENCE, + [HAVE_XSHMFENCE=yes], [HAVE_XSHMFENCE=no]) + +AM_CONDITIONAL(XSHMFENCE, test "x$HAVE_XSHMFENCE" = xyes) + +case x"$HAVE_XSHMFENCE" in + xyes) + AC_DEFINE(HAVE_XSHMFENCE, 1, [Have X Shared Memory Fence library]) + REQUIRED_LIBS="$REQUIRED_LIBS xshmfence" + ;; +esac + + +case "$DRI3,$HAVE_XSHMFENCE" in yes,yes | auto,yes) - AC_DEFINE(DRI3, 1, [Build DRI3 extension]) + ;; + yes,no) + AC_MSG_ERROR("DRI3 requested, but xshmfence not found.]) + DRI3=no + ;; + no,*) + ;; + *) + AC_MSG_NOTICE([DRI3 disabled because xshmfence not found.]) + DRI3=no + ;; +esac + +case x"$DRI3" in + xyes|xauto) DRI3=yes + AC_DEFINE(DRI3, 1, [Build DRI3 extension]) DRI3_LIB='$(top_builddir)/dri3/libdri3.la' SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI3PROTO" + AC_MSG_NOTICE([DRI3 enabled]); ;; esac + AM_CONDITIONAL(DRI3, test "x$DRI3" = xyes) if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$DRI3" = xyes || test "x$CONFIG_UDEV_KMS" = xyes; then @@ -1333,7 +1377,6 @@ if test "x$XDMAUTH" = xyes; then XDMCP_MODULES="xdmcp" fi fi -REQUIRED_LIBS="$REQUIRED_LIBS xshmfence" AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path]) AC_DEFINE_DIR(SERVER_MISC_CONFIG_PATH, SERVERCONFIG, [Server miscellaneous config path]) diff --git a/xorg-server/dri3/dri3.h b/xorg-server/dri3/dri3.h index 7774c8757..7c0c33018 100644 --- a/xorg-server/dri3/dri3.h +++ b/xorg-server/dri3/dri3.h @@ -23,6 +23,10 @@ #ifndef _DRI3_H_ #define _DRI3_H_ +#include <xorg-server.h> + +#ifdef DRI3 + #include <X11/extensions/dri3proto.h> #include <randrstr.h> @@ -56,4 +60,6 @@ typedef struct dri3_screen_info { extern _X_EXPORT Bool dri3_screen_init(ScreenPtr screen, dri3_screen_info_ptr info); +#endif + #endif /* _DRI3_H_ */ diff --git a/xorg-server/hw/xfree86/Makefile.am b/xorg-server/hw/xfree86/Makefile.am index eea16a851..485386fc5 100644 --- a/xorg-server/hw/xfree86/Makefile.am +++ b/xorg-server/hw/xfree86/Makefile.am @@ -9,6 +9,11 @@ DRI2_SUBDIR = dri2 DRI2_LIB = dri2/libdri2.la endif +if DRI3 +DRI3_BUILDDIR = $(top_builddir)/dri3 +DRI3_LIB = $(DRI3_BUILDDIR)/libdri3.la +endif + if XF86UTILS XF86UTILS_SUBDIR = utils endif @@ -59,7 +64,7 @@ LOCAL_LIBS = \ dixmods/libxorgxkb.la \ $(DRI_LIB) \ $(DRI2_LIB) \ - $(top_builddir)/dri3/libdri3.la \ + $(DRI3_LIB) \ $(top_builddir)/miext/sync/libsync.la \ $(top_builddir)/mi/libmi.la \ $(top_builddir)/os/libos.la diff --git a/xorg-server/hw/xfree86/common/compiler.h b/xorg-server/hw/xfree86/common/compiler.h index dc6f77318..afde9f9d3 100644 --- a/xorg-server/hw/xfree86/common/compiler.h +++ b/xorg-server/hw/xfree86/common/compiler.h @@ -1351,7 +1351,7 @@ stl_u(unsigned long val, unsigned int *p) #else /* ix86 */ #if !defined(__SUNPRO_C) -#if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__) +#if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__) && !defined(__aarch64__) #ifdef GCCUSESGAS /* diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c index d9a5da184..43d0a364a 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c @@ -58,7 +58,8 @@ static Bool ExtendedEnabled = FALSE; !defined(__sparc__) && \ !defined(__mips__) && \ !defined(__nds32__) && \ - !defined(__arm__) + !defined(__arm__) && \ + !defined(__aarch64__) /* * Due to conflicts with "compiler.h", don't rely on <sys/io.h> to declare diff --git a/xorg-server/hw/xfree86/sdksyms.sh b/xorg-server/hw/xfree86/sdksyms.sh index 7c9734c07..d7f259d28 100644 --- a/xorg-server/hw/xfree86/sdksyms.sh +++ b/xorg-server/hw/xfree86/sdksyms.sh @@ -44,6 +44,9 @@ cat > sdksyms.c << EOF /* miext/sync/Makefile.am */ #include "misync.h" #include "misyncstr.h" +#if HAVE_XSHMFENCE +#include "misyncshm.h" +#endif /* Xext/Makefile.am -- half is module, half is builtin */ #ifdef XV diff --git a/xorg-server/include/dix-config.h.in b/xorg-server/include/dix-config.h.in index 397ee967a..156383bf8 100644 --- a/xorg-server/include/dix-config.h.in +++ b/xorg-server/include/dix-config.h.in @@ -449,4 +449,7 @@ #include "dix-config-apple-verbatim.h" #endif +/* Have support for X shared memory fence library (xshmfence) */ +#undef HAVE_XSHMFENCE + #endif /* _DIX_CONFIG_H_ */ diff --git a/xorg-server/include/servermd.h b/xorg-server/include/servermd.h index be3963f4e..a7b9a686d 100644 --- a/xorg-server/include/servermd.h +++ b/xorg-server/include/servermd.h @@ -286,6 +286,20 @@ SOFTWARE. #define GLYPHPADBYTES 4 #endif /* linux/s390 */ +#ifdef __aarch64__ + +#ifdef __AARCH64EL__ +#define IMAGE_BYTE_ORDER LSBFirst +#define BITMAP_BIT_ORDER LSBFirst +#endif +#ifdef __AARCH64EB__ +#define IMAGE_BYTE_ORDER MSBFirst +#define BITMAP_BIT_ORDER MSBFirst +#endif +#define GLYPHPADBYTES 4 + +#endif /* __aarch64__ */ + #ifdef WIN32 #define IMAGE_BYTE_ORDER LSBFirst #define BITMAP_BIT_ORDER LSBFirst diff --git a/xorg-server/include/xorg-config.h.in b/xorg-server/include/xorg-config.h.in index 487d7addb..e3444da91 100644 --- a/xorg-server/include/xorg-config.h.in +++ b/xorg-server/include/xorg-config.h.in @@ -145,4 +145,7 @@ /* Support APM/ACPI power management in the server */ #undef XF86PM +/* Have support for X shared memory fence library (xshmfence) */ +#undef HAVE_XSHMFENCE + #endif /* _XORG_CONFIG_H_ */ diff --git a/xorg-server/include/xorg-server.h.in b/xorg-server/include/xorg-server.h.in index 1281b3e5e..960817e68 100644 --- a/xorg-server/include/xorg-server.h.in +++ b/xorg-server/include/xorg-server.h.in @@ -218,4 +218,7 @@ #define _XSERVER64 1 #endif +/* Have support for X shared memory fence library (xshmfence) */ +#undef HAVE_XSHMFENCE + #endif /* _XORG_SERVER_H_ */ diff --git a/xorg-server/miext/sync/Makefile.am b/xorg-server/miext/sync/Makefile.am index e25ceacb0..ac13c52e2 100644 --- a/xorg-server/miext/sync/Makefile.am +++ b/xorg-server/miext/sync/Makefile.am @@ -8,8 +8,13 @@ if XORG sdk_HEADERS = misync.h misyncstr.h misyncshm.h endif +XSHMFENCE_SRCS = misyncshm.c + libsync_la_SOURCES = \ misync.c \ misync.h \ - misyncshm.c \ misyncstr.h + +if XSHMFENCE +libsync_la_SOURCES += $(XSHMFENCE_SRCS) +endif diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c index 202e5da06..c40a938f7 100644 --- a/xorg-server/os/utils.c +++ b/xorg-server/os/utils.c @@ -501,7 +501,7 @@ GetTimeInMicros(void) else clockid = ~0L; } - if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) + if (clockid != ~0L && clock_gettime(clockid, &tp) == 0) return (CARD64) tp.tv_sec * (CARD64)1000000 + tp.tv_nsec / 1000; #endif |