[Mesa-dev] [PATCH] st/mesa: use pipe_sampler_view_release()

Jonathan Liu net147 at gmail.com
Sun Dec 22 02:28:18 PST 2013


On 15/12/2013 4:14 AM, Brian Paul wrote:
> On 12/14/2013 07:15 AM, Jonathan Liu wrote:
>> This fixes a crash where old_view->context was already freed in the
>> pipe_sampler_view_reference function contained in
>> src/gallium/auxiliary/utils/u_inlines.h. As a result, the
>> sampler_view_destroy function pointer contained 0xfeeefeee indicating
>> freed heap memory.
>>
>> Signed-off-by: Jonathan Liu <net147 at gmail.com>
>> ---
>>   src/mesa/state_tracker/st_atom_texture.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/state_tracker/st_atom_texture.c 
>> b/src/mesa/state_tracker/st_atom_texture.c
>> index d79e04c..bd0a22d 100644
>> --- a/src/mesa/state_tracker/st_atom_texture.c
>> +++ b/src/mesa/state_tracker/st_atom_texture.c
>> @@ -255,7 +255,7 @@ update_single_texture(struct st_context *st,
>>                   stObj->base.DepthMode) ||
>>         (view_format != stObj->sampler_view->format) ||
>>         stObj->base.BaseLevel != 
>> stObj->sampler_view->u.tex.first_level) {
>> -     pipe_sampler_view_reference(&stObj->sampler_view, NULL);
>> +     pipe_sampler_view_release(pipe, &stObj->sampler_view);
>>         }
>>      }
>>
>>
>
> Reviewed-by: Brian Paul <brianp at vmware.com>
>
Are you able to commit the patch? I don't have commit access.

Regards,
Jonathan


More information about the mesa-dev mailing list