return vk_error(VK_ERROR_EXTENSION_NOT_PRESENT);
}
- anv_set_dispatch_gen(physical_device->info->gen);
+ anv_set_dispatch_devinfo(physical_device->info);
device = anv_instance_alloc(instance, sizeof(*device), 8,
VK_SYSTEM_ALLOC_TYPE_API_OBJECT);
print " };\n"
print "};\n"
- print "void anv_set_dispatch_gen(uint32_t gen);\n"
+ print "void anv_set_dispatch_devinfo(const struct brw_device_info *info);\n"
for type, name, args, num, h in entrypoints:
print "%s anv_%s%s;" % (type, name, args)
enable_validate = atoi(s);
}
-static uint32_t dispatch_gen;
+static const struct brw_device_info *dispatch_devinfo;
void
-anv_set_dispatch_gen(uint32_t gen)
+anv_set_dispatch_devinfo(const struct brw_device_info *devinfo)
{
- dispatch_gen = gen;
+ dispatch_devinfo = devinfo;
}
void * __attribute__ ((noinline))
if (enable_validate && validate_layer.entrypoints[index])
return validate_layer.entrypoints[index];
- switch (dispatch_gen) {
+ if (dispatch_devinfo == NULL) {
+ assert(anv_layer.entrypoints[index]);
+ return anv_layer.entrypoints[index];
+ }
+
+ switch (dispatch_devinfo->gen) {
case 8:
if (gen8_layer.entrypoints[index])
return gen8_layer.entrypoints[index];