lima: add support for R and RG formats
[mesa.git] / src / gallium / drivers / lima / lima_util.h
index 30c97d2f8728459396c402a2b2c8a01239ec6625..3749523f3a122148af586ae48ab451af76cb4b87 100644 (file)
@@ -45,7 +45,13 @@ void lima_dump_rsw_command_stream_print(struct lima_dump *dump, void *data,
                                         int size, uint32_t start);
 void lima_dump_texture_descriptor(struct lima_dump *dump, void *data,
                                   int size, uint32_t start, uint32_t offset);
-void lima_dump_command_stream_print(struct lima_dump *dump, void *data,
-                                    int size, bool is_float, const char *fmt, ...);
+
+void _lima_dump_command_stream_print(struct lima_dump *dump, void *data,
+                                     int size, bool is_float, const char *fmt, ...);
+#define lima_dump_command_stream_print(dump, ...) \
+   do { \
+      if (dump) \
+         _lima_dump_command_stream_print(dump, __VA_ARGS__); \
+   } while (0)
 
 #endif