[Xcb-commit] 3 commits - src xcbgen

Julien Danjou jdanjou at kemper.freedesktop.org
Fri May 14 04:20:36 PDT 2010


 src/dri2.xml        |   14 ++++++++++++++
 src/xf86vidmode.xml |   28 +++++++++++++++++++++-------
 xcbgen/expr.py      |    9 ++++++++-
 3 files changed, 43 insertions(+), 8 deletions(-)

New commits:
commit f91186b9f3e55e1d478476749c929b86e2865cc8
Author: Marcin Kościelnicki <koriakin at 0x04.net>
Date:   Thu May 13 21:06:00 2010 +0000

    dri2: Add proper padding before driver_name
    
    Reviewed-by: Julien Cristau <jcristau at debian.org>
    Signed-off-by: Julien Danjou <julien at danjou.info>

diff --git a/src/dri2.xml b/src/dri2.xml
index 7fea948..dbd43f8 100644
--- a/src/dri2.xml
+++ b/src/dri2.xml
@@ -85,6 +85,20 @@ authorization from the authors.
       <list type="char" name="driver_name">
         <fieldref>driver_name_length</fieldref>
       </list>
+      <list type="void" name="alignment_pad">
+	  <op op="-">
+	      <op op="&amp;">
+		  <op op="+">
+		      <fieldref>driver_name_length</fieldref>
+		      <value> 3 </value>
+		  </op>
+		  <unop op="~">
+		      <value>3</value>
+		  </unop>
+	      </op>
+	      <fieldref>driver_name_length</fieldref>
+	  </op>
+      </list>
       <list type="char" name="device_name">
         <fieldref>device_name_length</fieldref>
       </list>
commit 0188b175cc5e2ef61396e237657ac109757a3265
Author: Marcin Kościelnicki <koriakin at 0x04.net>
Date:   Thu May 13 21:05:59 2010 +0000

    xf86vidmode: Fix padding expressions
    
    Reviewed-by: Julien Cristau <jcristau at debian.org>
    Signed-off-by: Julien Danjou <julien at danjou.info>

diff --git a/src/xf86vidmode.xml b/src/xf86vidmode.xml
index 718240c..9dacaef 100644
--- a/src/xf86vidmode.xml
+++ b/src/xf86vidmode.xml
@@ -161,7 +161,9 @@ authorization from the authors.
 			    <fieldref>vendor_length</fieldref>
 			    <value> 3 </value>
 			</op>
-			<value>0xFFFFFFFC</value>
+			<unop op="~">
+			    <value>3</value>
+			</unop>
 		    </op>
 		    <fieldref>vendor_length</fieldref>
 		</op>
@@ -377,7 +379,9 @@ authorization from the authors.
 			<fieldref>size</fieldref>
 			<value>1</value>
 		    </op>
-		    <value>0xFFFFFFFE</value>
+		    <unop op="~">
+			<value>1</value>
+		    </unop>
 		</op>
 	    </list>
 	    <list type="CARD16" name="green">
@@ -386,7 +390,9 @@ authorization from the authors.
 			<fieldref>size</fieldref>
 			<value>1</value>
 		    </op>
-		    <value>0xFFFFFFFE</value>
+		    <unop op="~">
+			<value>1</value>
+		    </unop>
 		</op>
 	    </list>
 	    <list type="CARD16" name="blue">
@@ -395,7 +401,9 @@ authorization from the authors.
 			<fieldref>size</fieldref>
 			<value>1</value>
 		    </op>
-		    <value>0xFFFFFFFE</value>
+		    <unop op="~">
+			<value>1</value>
+		    </unop>
 		</op>
 	    </list>
 	</reply>
@@ -410,7 +418,9 @@ authorization from the authors.
 		    <fieldref>size</fieldref>
 		    <value>1</value>
 		</op>
-		<value>0xFFFFFFFE</value>
+		<unop op="~">
+		    <value>1</value>
+		</unop>
 	    </op>
 	</list>
 	<list type="CARD16" name="green">
@@ -419,7 +429,9 @@ authorization from the authors.
 		    <fieldref>size</fieldref>
 		    <value>1</value>
 		</op>
-		<value>0xFFFFFFFE</value>
+		<unop op="~">
+		    <value>1</value>
+		</unop>
 	    </op>
 	</list>
 	<list type="CARD16" name="blue">
@@ -428,7 +440,9 @@ authorization from the authors.
 		    <fieldref>size</fieldref>
 		    <value>1</value>
 		</op>
-		<value>0xFFFFFFFE</value>
+		<unop op="~">
+		    <value>1</value>
+		</unop>
 	    </op>
 	</list>
     </request>
commit 70e270182fd523a6ea2270d8cf9ad21960dd0f74
Author: Marcin Kościelnicki <koriakin at 0x04.net>
Date:   Thu May 13 21:05:58 2010 +0000

    xcbgen: Add unop support
    
    Reviewed-by: Julien Cristau <jcristau at debian.org>
    Signed-off-by: Julien Danjou <julien at danjou.info>

diff --git a/xcbgen/expr.py b/xcbgen/expr.py
index ed4b975..79ad8f6 100644
--- a/xcbgen/expr.py
+++ b/xcbgen/expr.py
@@ -26,7 +26,7 @@ class Expression(object):
     Represents a mathematical expression for a list length or exprfield.
 
     Public fields:
-    op is the operation (text +,*,/,<<) or None.
+    op is the operation (text +,*,/,<<,~) or None.
     lhs and rhs are the sub-Expressions if op is set.
     lenfield_name is the name of the length field, or None for request lists.
     lenfield is the Field object for the length field, or None.
@@ -75,6 +75,13 @@ class Expression(object):
             if self.lenfield_name == None:
                 self.lenfield_name = self.rhs.lenfield_name
 
+        elif elt.tag == 'unop':
+            # Op field.  Need to recurse.
+            self.op = elt.get('op')
+            self.rhs = Expression(list(elt)[0], parent)
+
+            self.lenfield_name = self.rhs.lenfield_name
+
         elif elt.tag == 'value':
             # Constant expression
             self.nmemb = int(elt.text, 0)


More information about the xcb-commit mailing list