radv: Increase the number of dynamic uniform buffers.
[mesa.git] / src / amd / vulkan / radv_shader.h
index 952594a18e08de49db23189910923234cf016bdd..b07f8a89e74e9e6c54e830ae2b8e6fc1c7025cd2 100644 (file)
@@ -28,6 +28,7 @@
 #ifndef RADV_SHADER_H
 #define RADV_SHADER_H
 
+#include "radv_debug.h"
 #include "radv_private.h"
 
 #include "nir/nir.h"
@@ -103,10 +104,6 @@ void
 radv_shader_variant_destroy(struct radv_device *device,
                            struct radv_shader_variant *variant);
 
-uint32_t
-radv_shader_stage_to_user_data_0(gl_shader_stage stage, bool has_gs,
-                                bool has_tess);
-
 const char *
 radv_get_shader_name(struct radv_shader_variant *var, gl_shader_stage stage);
 
@@ -116,4 +113,22 @@ radv_shader_dump_stats(struct radv_device *device,
                       gl_shader_stage stage,
                       FILE *file);
 
+static inline bool
+radv_can_dump_shader(struct radv_device *device,
+                    struct radv_shader_module *module)
+{
+       /* Only dump non-meta shaders, useful for debugging purposes. */
+       return device->instance->debug_flags & RADV_DEBUG_DUMP_SHADERS &&
+              module && !module->nir;
+}
+
+static inline bool
+radv_can_dump_shader_stats(struct radv_device *device,
+                          struct radv_shader_module *module)
+{
+       /* Only dump non-meta shader stats. */
+       return device->instance->debug_flags & RADV_DEBUG_DUMP_SHADER_STATS &&
+              module && !module->nir;
+}
+
 #endif