On Wed, Mar 2, 2016 at 12:33 AM, Brian Paul <[email protected]> wrote:
> On 03/01/2016 02:45 PM, Thomas Hindoe Paaboel Andersen wrote:
>
>> We should not dereference shader before we have done the
>> null check.
>> ---
>> src/mesa/state_tracker/st_atom_image.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/state_tracker/st_atom_image.c
>> b/src/mesa/state_tracker/st_atom_image.c
>> index 4b48bc3..d0f0c42 100644
>> --- a/src/mesa/state_tracker/st_atom_image.c
>> +++ b/src/mesa/state_tracker/st_atom_image.c
>> @@ -48,11 +48,13 @@ st_bind_images(struct st_context *st, struct
>> gl_shader *shader,
>> {
>> unsigned i;
>> struct pipe_image_view images[MAX_IMAGE_UNIFORMS];
>> - struct gl_program_constants *c =
>> &st->ctx->Const.Program[shader->Stage];
>> + struct gl_program_constants *c;
>>
>> if (!shader || !st->pipe->set_shader_images)
>> return;
>>
>> + c = &st->ctx->Const.Program[shader->Stage];
>> +
>> for (i = 0; i < shader->NumImages; i++) {
>> struct gl_image_unit *u =
>> &st->ctx->ImageUnits[shader->ImageUnits[i]];
>> struct st_texture_object *stObj = st_texture_object(u->TexObj);
>>
>>
> For both:
> Reviewed-by: Brian Paul <[email protected]>
>
> Do you need someone to push these for you?
>
Yes, please push. Thanks!
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev