On Sat, Aug 2, 2014 at 4:09 AM, Ian Romanick <[email protected]> wrote:
> diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
> index 609d94b..7b089fa 100644
> --- a/src/mesa/main/uniform_query.cpp
> +++ b/src/mesa/main/uniform_query.cpp
> @@ -266,30 +265,32 @@ validate_uniform_parameters(struct gl_context *ctx,
> */
> if (shProg->UniformRemapTable[location] ==
> INACTIVE_UNIFORM_EXPLICIT_LOCATION)
> - return false;
> + return NULL;
>
> - _mesa_uniform_split_location_offset(shProg, location, loc, array_index);
> + unsigned loc;
> + _mesa_uniform_split_location_offset(shProg, location, &loc, array_index);
> + struct gl_uniform_storage *const uni = &shProg->UniformStorage[loc];
>
> - if (shProg->UniformStorage[*loc].array_elements == 0 && count > 1) {
> + if (uni->array_elements == 0 && count > 1) {
I'm getting a NULL-pointer deference here when running piglit's
spec/ARB_explicit_uniform_location/arb_explicit_uniform_location-use-of-unused-loc
on yesterday's master. A quick git-log doesn't seem to contain a fix
in today's master either.
Perhaps something like this is in order?
- if (uni->array_elements == 0 && count > 1) {
+ if (uni && uni->array_elements == 0 && count > 1) {
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev