tgsi: report opcode name in addition to the number when translation fails
[mesa.git] / src / gallium / auxiliary / cso_cache / cso_cache.c
index 6b1754ea00230d7da6b431ec79286fcf74e210fe..e6dce3f0e5bc07fa81c8de4be2c019e410209844 100644 (file)
@@ -28,7 +28,7 @@
 /* Authors:  Zack Rusin <zack@tungstengraphics.com>
  */
 
-#include "pipe/p_debug.h"
+#include "util/u_debug.h"
 
 #include "util/u_memory.h"
 
@@ -361,6 +361,10 @@ void cso_for_each_state(struct cso_cache *sc, enum cso_cache_type type,
 void cso_cache_delete(struct cso_cache *sc)
 {
    assert(sc);
+
+   if (!sc)
+      return;
+
    /* delete driver data */
    cso_for_each_state(sc, CSO_BLEND, delete_blend_state, 0);
    cso_for_each_state(sc, CSO_DEPTH_STENCIL_ALPHA, delete_depth_stencil_state, 0);