Mesa (master): radv: remove the validation layer and some related bits.

Dave Airlie airlied at kemper.freedesktop.org
Tue Oct 11 22:57:30 UTC 2016


Module: Mesa
Branch: master
Commit: 8cc9f89d2613da51db8f4d8516d450addf11c63f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8cc9f89d2613da51db8f4d8516d450addf11c63f

Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Oct 12 08:37:14 2016 +1000

radv: remove the validation layer and some related bits.

As pointed out by Emil this isn't used in anv anymore,
and it was totally unused in radv anyways.

Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/amd/vulkan/radv_entrypoints_gen.py | 28 ++--------------------------
 src/amd/vulkan/radv_private.h          | 11 -----------
 2 files changed, 2 insertions(+), 37 deletions(-)

diff --git a/src/amd/vulkan/radv_entrypoints_gen.py b/src/amd/vulkan/radv_entrypoints_gen.py
index d6c49ce..a6e832a 100644
--- a/src/amd/vulkan/radv_entrypoints_gen.py
+++ b/src/amd/vulkan/radv_entrypoints_gen.py
@@ -128,7 +128,6 @@ if opt_header:
     for type, name, args, num, h in entrypoints:
         print_guard_start(name)
         print "%s radv_%s%s;" % (type, name, args)
-        print "%s radv_validate_%s%s;" % (type, name, args)
         print_guard_end(name)
     exit()
 
@@ -181,7 +180,7 @@ for type, name, args, num, h in entrypoints:
     i += 2 + len(name) + 1
 print "   ;"
 
-# Now generate the table of all entry points and their validation functions
+# Now generate the table of all entry points
 
 print "\nstatic const struct radv_entrypoint entrypoints[] = {"
 for type, name, args, num, h in entrypoints:
@@ -196,7 +195,7 @@ print """
  */
 """
 
-for layer in [ "radv", "validate" ]:
+for layer in [ "radv" ]:
     for type, name, args, num, h in entrypoints:
         print_guard_start(name)
         print "%s %s_%s%s __attribute__ ((weak));" % (type, layer, name, args)
@@ -209,33 +208,10 @@ for layer in [ "radv", "validate" ]:
     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);
-}
 
 void * __attribute__ ((noinline))
 radv_resolve_entrypoint(uint32_t index)
 {
-   if (enable_validate && validate_layer.entrypoints[index])
-      return validate_layer.entrypoints[index];
-
    return radv_layer.entrypoints[index];
 }
 """
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
index 4fd4848..6db8c7a 100644
--- a/src/amd/vulkan/radv_private.h
+++ b/src/amd/vulkan/radv_private.h
@@ -39,7 +39,6 @@
 #include <valgrind.h>
 #include <memcheck.h>
 #define VG(x) x
-#define __gen_validate_value(x) VALGRIND_CHECK_MEM_IS_DEFINED(&(x), sizeof(x))
 #else
 #define VG(x)
 #endif
@@ -224,16 +223,6 @@ void radv_loge_v(const char *format, va_list va);
 #define radv_assert(x)
 #endif
 
-/**
- * If a block of code is annotated with radv_validate, then the block runs only
- * in debug builds.
- */
-#ifdef DEBUG
-#define radv_validate if (1)
-#else
-#define radv_validate if (0)
-#endif
-
 void radv_abortf(const char *format, ...) radv_noreturn radv_printflike(1, 2);
 void radv_abortfv(const char *format, va_list va) radv_noreturn;
 




More information about the mesa-commit mailing list