On Sunday, September 25, 2016 10:50:24 PM PDT Timothy Arceri wrote: > This makes link_assign_uniform_locations() easier to follow. > --- > src/compiler/glsl/link_uniforms.cpp | 330 > +++++++++++++++++++----------------- > src/compiler/glsl/linker.cpp | 4 +- > src/compiler/glsl/linker.h | 5 +- > 3 files changed, 177 insertions(+), 162 deletions(-) > > diff --git a/src/compiler/glsl/link_uniforms.cpp > b/src/compiler/glsl/link_uniforms.cpp > index 4d3fc6d..11204fc 100644 > --- a/src/compiler/glsl/link_uniforms.cpp > +++ b/src/compiler/glsl/link_uniforms.cpp > @@ -997,12 +997,168 @@ find_empty_block(struct gl_shader_program *prog, > return -1; > } > > +static void > +link_setup_uniform_remap_tables(struct gl_context *ctx,
const struct gl_context *ctx,
> + struct gl_shader_program *prog,
> + unsigned num_explicit_uniform_locs)
> +{
[snip]
> +}
> void
> link_assign_uniform_locations(struct gl_shader_program *prog,
> - unsigned int boolean_true,
> - unsigned int num_explicit_uniform_locs,
> - unsigned int max_uniform_locs)
> + struct gl_context *ctx,
const struct gl_context *ctx,
> + unsigned int num_explicit_uniform_locs)
> {
> + unsigned int boolean_true = ctx->Const.UniformBooleanTrue;
> +
> ralloc_free(prog->UniformStorage);
> prog->UniformStorage = NULL;
> prog->NumUniformStorage = 0;
> @@ -1067,7 +1223,7 @@ link_assign_uniform_locations(struct gl_shader_program
> *prog,
> }
> }
>
> - const unsigned num_uniforms = uniform_size.num_active_uniforms;
> + prog->NumUniformStorage = uniform_size.num_active_uniforms;
You can delete the earlier prog->NumUniformStorage = 0 if you like.
Then again, it isn't hurting anything, either.
Patches 1-2 are:
Reviewed-by: Kenneth Graunke <[email protected]>
I don't understand patches 3-4.
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
