From fdb0527ddce8eb2927631d4fbf38e6625b0af8b1 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 28 Jan 2005 17:30:25 +0000 Subject: Slightly modify the meaning of the 'handcode' attribute in a 'glx' element. The attribute can now take one of 4 states. "false" (the default value) means that no handcoding is required for the function. "client" means that the function must be handcoded on the client-side only. "server" means that the function must be handcoded on the server-side only. "true" menas that the function must be handcoded on both the client-side and the server-side. Version 1.14 of glX_proto_send.py accidentally contained a line of this change. --- src/mesa/glapi/glX_XML.py | 29 +++++++++++++++++++++++------ src/mesa/glapi/glX_doc.py | 2 +- src/mesa/glapi/gl_API.xml | 34 +++++++++++++++++----------------- 3 files changed, 41 insertions(+), 24 deletions(-) (limited to 'src/mesa/glapi') diff --git a/src/mesa/glapi/glX_XML.py b/src/mesa/glapi/glX_XML.py index df3e6bb1cb..6eb2f553f9 100644 --- a/src/mesa/glapi/glX_XML.py +++ b/src/mesa/glapi/glX_XML.py @@ -328,8 +328,6 @@ class glXFunction(gl_XML.glFunction): glx_doubles_in_order = 0 vectorequiv = None - handcode = 0 - ignore = 0 can_be_large = 0 def __init__(self, context, name, attrs): @@ -340,6 +338,10 @@ class glXFunction(gl_XML.glFunction): self.can_be_large = 0 self.reply_always_array = 0 + self.server_handcode = 0 + self.client_handcode = 0 + self.ignore = 0 + gl_XML.glFunction.__init__(self, context, name, attrs) return @@ -356,10 +358,25 @@ class glXFunction(gl_XML.glFunction): self.glx_sop = int(attrs.get('sop', "0")) self.glx_vendorpriv = int(attrs.get('vendorpriv', "0")) - if attrs.get('handcode', "false") == "true": - self.handcode = 1 + # The 'handcode' attribute can be one of 'true', + # 'false', 'client', or 'server'. + + handcode = attrs.get('handcode', "false") + if handcode == "false": + self.server_handcode = 0 + self.client_handcode = 0 + elif handcode == "true": + self.server_handcode = 1 + self.client_handcode = 1 + elif handcode == "client": + self.server_handcode = 0 + self.client_handcode = 1 + elif handcode == "server": + self.server_handcode = 1 + self.client_handcode = 0 else: - self.handcode = 0 + raise RuntimeError('Invalid handcode mode "%s" in function "%s".' % (handcode, self.name)) + if attrs.get('ignore', "false") == "true": self.ignore = 1 @@ -395,7 +412,7 @@ class glXFunction(gl_XML.glFunction): # This will also mark functions that don't have a # dispatch offset at ignored. - if (self.fn_offset == -1 and not self.fn_alias) or not (self.handcode or self.glx_rop or self.glx_sop or self.glx_vendorpriv or self.vectorequiv or self.fn_alias): + if (self.fn_offset == -1 and not self.fn_alias) or not (self.client_handcode or self.server_handcode or self.glx_rop or self.glx_sop or self.glx_vendorpriv or self.vectorequiv or self.fn_alias): #if not self.ignore: # if self.fn_offset == -1: # print '/* %s ignored becuase no offset assigned. */' % (self.name) diff --git a/src/mesa/glapi/glX_doc.py b/src/mesa/glapi/glX_doc.py index 3755dbe586..8a2ecb79e8 100644 --- a/src/mesa/glapi/glX_doc.py +++ b/src/mesa/glapi/glX_doc.py @@ -234,7 +234,7 @@ class PrintGlxProtoText(glX_XML.GlxProto): # At some point this should be expanded to support pixel # functions, but I'm not going to lose any sleep over it now. - if f.fn_offset < 0 or f.handcode or f.ignore or f.vectorequiv or f.image: + if f.fn_offset < 0 or f.client_handcode or f.server_handcode or f.ignore or f.vectorequiv or f.image: return print ' %s' % (f.name) diff --git a/src/mesa/glapi/gl_API.xml b/src/mesa/glapi/gl_API.xml index 5f9c83ce47..d3c4d81684 100644 --- a/src/mesa/glapi/gl_API.xml +++ b/src/mesa/glapi/gl_API.xml @@ -2064,12 +2064,12 @@ glx: - + - + @@ -2293,13 +2293,13 @@ glx: - + - + @@ -2360,7 +2360,7 @@ glx: - + @@ -2372,24 +2372,24 @@ glx: - + - + - + - + @@ -2547,7 +2547,7 @@ glx: - + @@ -2827,7 +2827,7 @@ glx: - + @@ -4887,7 +4887,7 @@ glx: - + @@ -4899,7 +4899,7 @@ glx: - + @@ -4910,7 +4910,7 @@ glx: - + @@ -4925,7 +4925,7 @@ glx: - + @@ -4938,7 +4938,7 @@ glx: - + @@ -4949,7 +4949,7 @@ glx: - + -- cgit v1.2.3