self.exec_flavor = 'mesa'
self.desktop = True
self.deprecated = None
+ self.has_no_error_variant = False
# self.entry_point_api_map[name][api] is a decimal value
# indicating the earliest version of the given API in which
if not is_attr_true(element, 'desktop', 'true'):
self.desktop = False
+ if self.has_no_error_variant or is_attr_true(element, 'no_error'):
+ self.has_no_error_variant = True
+ else:
+ self.has_no_error_variant = False
+
if alias:
true_name = alias
else:
# This function is not implemented, or is dispatched
# dynamically.
continue
- settings_by_condition[condition].append(
- 'SET_{0}(exec, {1}{0});'.format(f.name, prefix, f.name))
+ if f.has_no_error_variant:
+ no_error_condition = '_mesa_is_no_error_enabled(ctx) && ({0})'.format(condition)
+ error_condition = '!_mesa_is_no_error_enabled(ctx) && ({0})'.format(condition)
+ settings_by_condition[no_error_condition].append(
+ 'SET_{0}(exec, {1}{0}_no_error);'.format(f.name, prefix, f.name))
+ settings_by_condition[error_condition].append(
+ 'SET_{0}(exec, {1}{0});'.format(f.name, prefix, f.name))
+ else:
+ settings_by_condition[condition].append(
+ 'SET_{0}(exec, {1}{0});'.format(f.name, prefix, f.name))
# Print out an if statement for each unique condition, with
# the SET_* calls nested inside it.
for condition in sorted(settings_by_condition.keys()):