OSDN Git Service

anv/meta: Name the nir shaders
authorChad Versace <chad.versace@intel.com>
Thu, 14 Jan 2016 02:09:01 +0000 (18:09 -0800)
committerChad Versace <chad.versace@intel.com>
Fri, 15 Jan 2016 06:53:05 +0000 (22:53 -0800)
The names appear in debug output.

src/vulkan/anv_meta.c
src/vulkan/anv_meta_clear.c

index 3cbb3a6..3ddeab1 100644 (file)
@@ -42,6 +42,7 @@ build_nir_vertex_shader(bool attr_flat)
    const struct glsl_type *vertex_type = glsl_vec4_type();
 
    nir_builder_init_simple_shader(&b, NULL, MESA_SHADER_VERTEX, NULL);
+   b.shader->info.name = ralloc_strdup(b.shader, "meta_blit_vs");
 
    nir_variable *pos_in = nir_variable_create(b.shader, nir_var_shader_in,
                                               vertex_type, "a_pos");
@@ -74,6 +75,7 @@ build_nir_copy_fragment_shader(enum glsl_sampler_dim tex_dim)
    nir_builder b;
 
    nir_builder_init_simple_shader(&b, NULL, MESA_SHADER_FRAGMENT, NULL);
+   b.shader->info.name = ralloc_strdup(b.shader, "meta_blit_fs");
 
    const struct glsl_type *color_type = glsl_vec4_type();
 
index 9a572ba..5eea023 100644 (file)
@@ -69,6 +69,9 @@ build_color_shaders(struct nir_shader **out_vs,
    nir_builder_init_simple_shader(&vs_b, NULL, MESA_SHADER_VERTEX, NULL);
    nir_builder_init_simple_shader(&fs_b, NULL, MESA_SHADER_FRAGMENT, NULL);
 
+   vs_b.shader->info.name = ralloc_strdup(vs_b.shader, "meta_clear_color_vs");
+   fs_b.shader->info.name = ralloc_strdup(fs_b.shader, "meta_clear_color_fs");
+
    const struct glsl_type *position_type = glsl_vec4_type();
    const struct glsl_type *color_type = glsl_vec4_type();
 
@@ -381,6 +384,9 @@ build_depthstencil_shaders(struct nir_shader **out_vs,
    nir_builder_init_simple_shader(&vs_b, NULL, MESA_SHADER_VERTEX, NULL);
    nir_builder_init_simple_shader(&fs_b, NULL, MESA_SHADER_FRAGMENT, NULL);
 
+   vs_b.shader->info.name = ralloc_strdup(vs_b.shader, "meta_clear_depthstencil_vs");
+   fs_b.shader->info.name = ralloc_strdup(fs_b.shader, "meta_clear_depthstencil_fs");
+
    const struct glsl_type *position_type = glsl_vec4_type();
 
    nir_variable *vs_in_pos =