On 09/11/2014 02:27 PM, Erik Faye-Lund wrote: > On Sat, Aug 2, 2014 at 4:09 AM, Ian Romanick <i...@freedesktop.org> 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) {
fix is here: http://lists.freedesktop.org/archives/mesa-dev/2014-August/066752.html remaptable contains entries that are set NULL for inactive uniforms > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev