summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_entrypoints_gen.py
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2016-07-28 14:39:21 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2016-08-18 14:53:24 +0100
commitb0d56f2f4f1f4f7ecdf96f0a0246d0db5392e075 (patch)
tree5f56530281d6897b36928c97152057db59b13979 /src/intel/vulkan/anv_entrypoints_gen.py
parent3a9e6102b4baae3f50956e5f150c9e59138f4cc0 (diff)
downloadexternal_mesa3d-b0d56f2f4f1f4f7ecdf96f0a0246d0db5392e075.zip
external_mesa3d-b0d56f2f4f1f4f7ecdf96f0a0246d0db5392e075.tar.gz
external_mesa3d-b0d56f2f4f1f4f7ecdf96f0a0246d0db5392e075.tar.bz2
anv: remove internal 'validate' layer
Presently the layer has only a single entry point. As mentioned by Jason the function does not validate anything that isn't checked elsewhere, thus we can drop the whole thing. Cc: "12.0" <mesa-stable@lists.freedesktop.org> Cc: Jason Ekstrand <jason@jlekstrand.net> Suggested-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'src/intel/vulkan/anv_entrypoints_gen.py')
-rw-r--r--src/intel/vulkan/anv_entrypoints_gen.py46
1 files changed, 11 insertions, 35 deletions
diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py
index 2896174..c86548f 100644
--- a/src/intel/vulkan/anv_entrypoints_gen.py
+++ b/src/intel/vulkan/anv_entrypoints_gen.py
@@ -134,7 +134,6 @@ if opt_header:
print "%s gen75_%s%s;" % (type, name, args)
print "%s gen8_%s%s;" % (type, name, args)
print "%s gen9_%s%s;" % (type, name, args)
- print "%s anv_validate_%s%s;" % (type, name, args)
print_guard_end(name)
exit()
@@ -185,23 +184,24 @@ for type, name, args, num, h in entrypoints:
print " \"vk%s\\0\"" % name
offsets.append(i)
i += 2 + len(name) + 1
-print """ ;
+print " ;"
-/* Weak aliases for all potential validate functions. These will resolve to
- * NULL if they're not defined, which lets the resolve_entrypoint() function
- * either pick a validate wrapper if available or just plug in the actual
- * entry point.
- */
-"""
-
-# Now generate the table of all entry points and their validation functions
+# Now generate the table of all entry points
print "\nstatic const struct anv_entrypoint entrypoints[] = {"
for type, name, args, num, h in entrypoints:
print " { %5d, 0x%08x }," % (offsets[num], h)
print "};\n"
-for layer in [ "anv", "validate", "gen7", "gen75", "gen8", "gen9" ]:
+print """
+
+/* Weak aliases for all potential implementations. These will resolve to
+ * NULL if they're not defined, which lets the resolve_entrypoint() function
+ * either pick the correct entry point.
+ */
+"""
+
+for layer in [ "anv", "gen7", "gen75", "gen8", "gen9" ]:
for type, name, args, num, h in entrypoints:
print_guard_start(name)
print "%s %s_%s%s __attribute__ ((weak));" % (type, layer, name, args)
@@ -214,27 +214,6 @@ for layer in [ "anv", "validate", "gen7", "gen75", "gen8", "gen9" ]:
print "};\n"
print """
-#ifdef DEBUG
-static bool enable_validate = true;
-#else
-static bool enable_validate = false;
-#endif
-
-/* We can't use symbols that need resolving (like, oh, getenv) in the resolve
- * function. This means that we have to determine whether or not to use the
- * validation layer sometime before that. The constructor function attribute asks
- * the dynamic linker to invoke determine_validate() at dlopen() time which
- * works.
- */
-static void __attribute__ ((constructor))
-determine_validate(void)
-{
- const char *s = getenv("ANV_VALIDATE");
-
- if (s)
- enable_validate = atoi(s);
-}
-
static const struct brw_device_info *dispatch_devinfo;
void
@@ -246,9 +225,6 @@ anv_set_dispatch_devinfo(const struct brw_device_info *devinfo)
void * __attribute__ ((noinline))
anv_resolve_entrypoint(uint32_t index)
{
- if (enable_validate && validate_layer.entrypoints[index])
- return validate_layer.entrypoints[index];
-
if (dispatch_devinfo == NULL) {
return anv_layer.entrypoints[index];
}