From e1af20f18a86f52a9640faf2d4ff8a71b0a4fa9b Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 13 Oct 2016 11:41:23 +1100 Subject: 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 --- src/amd/vulkan/radv_meta_buffer.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/amd/vulkan/radv_meta_buffer.c') diff --git a/src/amd/vulkan/radv_meta_buffer.c b/src/amd/vulkan/radv_meta_buffer.c index adea25e02fb..05c49716678 100644 --- a/src/amd/vulkan/radv_meta_buffer.c +++ b/src/amd/vulkan/radv_meta_buffer.c @@ -10,17 +10,17 @@ build_buffer_fill_shader(struct radv_device *dev) nir_builder b; nir_builder_init_simple_shader(&b, NULL, MESA_SHADER_COMPUTE, NULL); - b.shader->info.name = ralloc_strdup(b.shader, "meta_buffer_fill"); - b.shader->info.cs.local_size[0] = 64; - b.shader->info.cs.local_size[1] = 1; - b.shader->info.cs.local_size[2] = 1; + b.shader->info->name = ralloc_strdup(b.shader, "meta_buffer_fill"); + b.shader->info->cs.local_size[0] = 64; + b.shader->info->cs.local_size[1] = 1; + b.shader->info->cs.local_size[2] = 1; nir_ssa_def *invoc_id = nir_load_system_value(&b, nir_intrinsic_load_local_invocation_id, 0); nir_ssa_def *wg_id = nir_load_system_value(&b, nir_intrinsic_load_work_group_id, 0); nir_ssa_def *block_size = nir_imm_ivec4(&b, - b.shader->info.cs.local_size[0], - b.shader->info.cs.local_size[1], - b.shader->info.cs.local_size[2], 0); + b.shader->info->cs.local_size[0], + b.shader->info->cs.local_size[1], + b.shader->info->cs.local_size[2], 0); nir_ssa_def *global_id = nir_iadd(&b, nir_imul(&b, wg_id, block_size), invoc_id); @@ -60,17 +60,17 @@ build_buffer_copy_shader(struct radv_device *dev) nir_builder b; nir_builder_init_simple_shader(&b, NULL, MESA_SHADER_COMPUTE, NULL); - b.shader->info.name = ralloc_strdup(b.shader, "meta_buffer_copy"); - b.shader->info.cs.local_size[0] = 64; - b.shader->info.cs.local_size[1] = 1; - b.shader->info.cs.local_size[2] = 1; + b.shader->info->name = ralloc_strdup(b.shader, "meta_buffer_copy"); + b.shader->info->cs.local_size[0] = 64; + b.shader->info->cs.local_size[1] = 1; + b.shader->info->cs.local_size[2] = 1; nir_ssa_def *invoc_id = nir_load_system_value(&b, nir_intrinsic_load_local_invocation_id, 0); nir_ssa_def *wg_id = nir_load_system_value(&b, nir_intrinsic_load_work_group_id, 0); nir_ssa_def *block_size = nir_imm_ivec4(&b, - b.shader->info.cs.local_size[0], - b.shader->info.cs.local_size[1], - b.shader->info.cs.local_size[2], 0); + b.shader->info->cs.local_size[0], + b.shader->info->cs.local_size[1], + b.shader->info->cs.local_size[2], 0); nir_ssa_def *global_id = nir_iadd(&b, nir_imul(&b, wg_id, block_size), invoc_id); -- cgit v1.2.3