From: Timothy Arceri Date: Wed, 19 Oct 2016 01:09:09 +0000 (+1100) Subject: mesa: set cs shader_info metadata directly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a228c0aae347ce68009f165427581e149611d65;p=mesa.git mesa: set cs shader_info metadata directly Reviewed-by: Jason Ekstrand --- diff --git a/src/compiler/shader_info.c b/src/compiler/shader_info.c index 20422eff0d9..9329e518a37 100644 --- a/src/compiler/shader_info.c +++ b/src/compiler/shader_info.c @@ -51,15 +51,6 @@ copy_shader_info(const struct gl_shader_program *shader_prog, break; } - case MESA_SHADER_COMPUTE: { - struct gl_compute_program *cp = (struct gl_compute_program *)sh->Program; - info->cs.local_size[0] = cp->LocalSize[0]; - info->cs.local_size[1] = cp->LocalSize[1]; - info->cs.local_size[2] = cp->LocalSize[2]; - info->cs.shared_size = cp->SharedSize; - break; - } - default: break; /* No stage-specific info */ } diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index b681534ddbf..bcf53bb679f 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -2201,11 +2201,9 @@ _mesa_copy_linked_program_data(const struct gl_shader_program *src, break; } case MESA_SHADER_COMPUTE: { - struct gl_compute_program *dst_cp = (struct gl_compute_program *) dst; - int i; - for (i = 0; i < 3; i++) - dst_cp->LocalSize[i] = src->Comp.LocalSize[i]; - dst_cp->SharedSize = src->Comp.SharedSize; + for (int i = 0; i < 3; i++) + dst->info.cs.local_size[i] = src->Comp.LocalSize[i]; + dst->info.cs.shared_size = src->Comp.SharedSize; break; } default: