def process_element(self, element): gl_XML.gl_function.process_element(self, element) # If the function already has a vector equivalent set, don't # set it again. This can happen if an alias to a function # appears after the function that it aliases. if not self.vectorequiv: self.vectorequiv = element.nsProp("vectorequiv", None) name = element.nsProp("name", None) if name == self.name: for param in self.parameters: self.parameters_by_name[ param.name ] = param if len(param.count_parameter_list): self.count_parameter_list.extend( param.count_parameter_list ) if param.counter and param.counter not in self.counter_list: self.counter_list.append(param.counter) child = element.children while child: if child.type == "element" and child.name == "glx": rop = child.nsProp( 'rop', None ) sop = child.nsProp( 'sop', None ) vop = child.nsProp( 'vendorpriv', None ) if rop: self.glx_rop = int(rop) if sop: self.glx_sop = int(sop) if vop: self.glx_vendorpriv = int(vop) self.glx_vendorpriv_names.append(name) self.img_reset = child.nsProp( 'img_reset', None ) # The 'handcode' attribute can be one of 'true', # 'false', 'client', or 'server'. handcode = child.nsProp( 'handcode', None ) 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: raise RuntimeError('Invalid handcode mode "%s" in function "%s".' % (handcode, self.name)) self.ignore = gl_XML.is_attr_true( child, 'ignore' ) self.can_be_large = gl_XML.is_attr_true( child, 'large' ) self.glx_doubles_in_order = gl_XML.is_attr_true( child, 'doubles_in_order' ) self.reply_always_array = gl_XML.is_attr_true( child, 'always_array' ) self.dimensions_in_reply = gl_XML.is_attr_true( child, 'dimensions_in_reply' ) child = child.next # Do some validation of the GLX protocol information. As # new tests are discovered, they should be added here. for param in self.parameters: if param.is_output and self.glx_rop != 0: raise RuntimeError("Render / RenderLarge commands cannot have outputs (%s)." % (self.name)) return
def process_element(self, element): gl_XML.gl_function.process_element(self, element) # If the function already has a vector equivalent set, don't # set it again. This can happen if an alias to a function # appears after the function that it aliases. if not self.vectorequiv: self.vectorequiv = element.get("vectorequiv") name = element.get("name") if name == self.name: for param in self.parameters: self.parameters_by_name[param.name] = param if len(param.count_parameter_list): self.count_parameter_list.extend( param.count_parameter_list) if param.counter and param.counter not in self.counter_list: self.counter_list.append(param.counter) for child in element.getchildren(): if child.tag == "glx": rop = child.get('rop') sop = child.get('sop') vop = child.get('vendorpriv') if rop: self.glx_rop = int(rop) if sop: self.glx_sop = int(sop) if vop: self.glx_vendorpriv = int(vop) self.glx_vendorpriv_names.append(name) self.img_reset = child.get('img_reset') # The 'handcode' attribute can be one of 'true', # 'false', 'client', or 'server'. handcode = child.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: raise RuntimeError( 'Invalid handcode mode "%s" in function "%s".' % (handcode, self.name)) self.ignore = gl_XML.is_attr_true(child, 'ignore') self.can_be_large = gl_XML.is_attr_true(child, 'large') self.glx_doubles_in_order = gl_XML.is_attr_true( child, 'doubles_in_order') self.reply_always_array = gl_XML.is_attr_true( child, 'always_array') self.dimensions_in_reply = gl_XML.is_attr_true( child, 'dimensions_in_reply') # Do some validation of the GLX protocol information. As # new tests are discovered, they should be added here. for param in self.parameters: if param.is_output and self.glx_rop != 0: raise RuntimeError( "Render / RenderLarge commands cannot have outputs (%s)." % (self.name)) return
def process_element(self, element): gl_XML.gl_function.process_element(self, element) self.vectorequiv = element.nsProp( "vectorequiv", None ) if element.nsProp( "name", None ) == self.name: for param in self.parameters: self.parameters_by_name[ param.name ] = param if len(param.count_parameter_list): self.count_parameter_list.extend( param.count_parameter_list ) if param.counter and param.counter not in self.counter_list: self.counter_list.append(param.counter) child = element.children while child: if child.type == "element": if child.name == "glx": rop = child.nsProp( 'rop', None ) sop = child.nsProp( 'sop', None ) vop = child.nsProp( 'vendorpriv', None ) if rop: self.glx_rop = int(rop) else: self.glx_rop = 0 if sop: self.glx_sop = int(sop) else: self.glx_sop = 0 if vop: self.glx_vendorpriv = int(vop) else: self.glx_vendorpriv = 0 self.img_reset = child.nsProp( 'img_reset', None ) # The 'handcode' attribute can be one of 'true', # 'false', 'client', or 'server'. handcode = child.nsProp( 'handcode', None ) 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: raise RuntimeError('Invalid handcode mode "%s" in function "%s".' % (handcode, self.name)) self.ignore = gl_XML.is_attr_true( child, 'ignore' ) self.can_be_large = gl_XML.is_attr_true( child, 'large' ) self.glx_doubles_in_order = gl_XML.is_attr_true( child, 'doubles_in_order' ) self.reply_always_array = gl_XML.is_attr_true( child, 'always_array' ) self.dimensions_in_reply = gl_XML.is_attr_true( child, 'dimensions_in_reply' ) child = child.next # Do some validation of the GLX protocol information. As # new tests are discovered, they should be added here. for param in self.parameters: if param.is_output and self.glx_rop != 0: raise RuntimeError("Render / RenderLarge commands cannot have outputs (%s)." % (self.name)) return