nir/i965/anv/radv/gallium: make shader info a pointer
When restoring something from shader cache we won't have and don't want to create a nir_shader this change detaches the two. There are other advantages such as being able to reuse the shader info populated by GLSL IR. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
@@ -49,7 +49,7 @@ build_nir_vs(void)
|
||||
nir_variable *v_tex_position;
|
||||
|
||||
nir_builder_init_simple_shader(&b, NULL, MESA_SHADER_VERTEX, NULL);
|
||||
b.shader->info.name = ralloc_strdup(b.shader, "meta_resolve_vs");
|
||||
b.shader->info->name = ralloc_strdup(b.shader, "meta_resolve_vs");
|
||||
|
||||
a_position = nir_variable_create(b.shader, nir_var_shader_in, vec4,
|
||||
"a_position");
|
||||
@@ -83,8 +83,8 @@ build_nir_fs(void)
|
||||
nir_variable *f_color; /* vec4, fragment output color */
|
||||
|
||||
nir_builder_init_simple_shader(&b, NULL, MESA_SHADER_FRAGMENT, NULL);
|
||||
b.shader->info.name = ralloc_asprintf(b.shader,
|
||||
"meta_resolve_fs");
|
||||
b.shader->info->name = ralloc_asprintf(b.shader,
|
||||
"meta_resolve_fs");
|
||||
|
||||
v_tex_position = nir_variable_create(b.shader, nir_var_shader_in, vec4,
|
||||
"v_tex_position");
|
||||
|
Reference in New Issue
Block a user