anv: refresh cached current batch bo after emitting some commands
[mesa.git] / src / intel / vulkan / anv_entrypoints_gen.py
index 6b90786577da282e89de931bc55cbd887d371324..ff166186a0b6a9369a88b5bf6d7173af3d6f7f72 100644 (file)
@@ -25,7 +25,7 @@
 import argparse
 import math
 import os
-import xml.etree.cElementTree as et
+import xml.etree.ElementTree as et
 
 from collections import OrderedDict, namedtuple
 from mako.template import Template
@@ -302,45 +302,30 @@ const struct anv_instance_dispatch_table anv_instance_dispatch_table = {
 % endfor
 };
 
-% for layer in LAYERS:
-  % for e in physical_device_entrypoints:
-    % if e.alias:
-      <% continue %>
-    % endif
-    % if e.guard is not None:
+% for e in physical_device_entrypoints:
+  % if e.alias and e.alias.enabled:
+    <% continue %>
+  % endif
+  % if e.guard is not None:
 #ifdef ${e.guard}
-    % endif
-    % if layer == 'anv':
-      ${e.return_type} __attribute__ ((weak))
-      ${e.prefixed_name('anv')}(${e.decl_params()})
-      {
-        % if e.params[0].type == 'VkPhysicalDevice':
-          ANV_FROM_HANDLE(anv_physical_device, anv_physical_device, ${e.params[0].name});
-          return anv_physical_device->dispatch.${e.name}(${e.call_params()});
-        % else:
-          assert(!"Unhandled device child trampoline case: ${e.params[0].type}");
-        % endif
-      }
-    % else:
-      ${e.return_type} ${e.prefixed_name(layer)}(${e.decl_params()}) __attribute__ ((weak));
-    % endif
-    % if e.guard is not None:
+  % endif
+  ${e.return_type} ${e.prefixed_name('anv')}(${e.decl_params()}) __attribute__ ((weak));
+  % if e.guard is not None:
 #endif // ${e.guard}
-    % endif
-  % endfor
+  % endif
+% endfor
 
-  const struct anv_physical_device_dispatch_table ${layer}_physical_device_dispatch_table = {
-  % for e in physical_device_entrypoints:
-    % if e.guard is not None:
+const struct anv_physical_device_dispatch_table anv_physical_device_dispatch_table = {
+% for e in physical_device_entrypoints:
+  % if e.guard is not None:
 #ifdef ${e.guard}
-    % endif
-    .${e.name} = ${e.prefixed_name(layer)},
-    % if e.guard is not None:
+  % endif
+  .${e.name} = ${e.prefixed_name('anv')},
+  % if e.guard is not None:
 #endif // ${e.guard}
-    % endif
-  % endfor
-  };
+  % endif
 % endfor
+};
 
 
 % for layer in LAYERS:
@@ -528,7 +513,7 @@ anv_get_device_entry_name(int index)
    return device_entry_name(index);
 }
 
-static void * __attribute__ ((noinline))
+void * __attribute__ ((noinline))
 anv_resolve_device_entrypoint(const struct gen_device_info *devinfo, uint32_t index)
 {
    const struct anv_device_dispatch_table *genX_table;