[Mesa-dev] Using the right context in st_texture_release_all_sampler_views()

Roland Scheidegger sroland at vmware.com
Thu Jul 23 09:53:53 PDT 2015


Well they are not sharable by definition (per-context entities), it is
not meant to work. So, it definitely should be fixed one way or another.

Roland

Am 23.07.2015 um 17:44 schrieb Marek Olšák:
> Hi Brian,
> 
> Like the commit message says, I have no idea how Firefox does it. My
> commit only changed the situation from "crash on all drivers" to
> "undefined behavior on drivers where sampler views are not sharable by
> contexts".
> 
> Marek
> 
> On Thu, Jul 23, 2015 at 12:32 AM, Brian Paul <brianp at vmware.com> wrote:
>> Hi Marek,
>>
>> This is regarding your commit "st/mesa: use pipe_sampler_view_release for
>> releasing sampler views" from last October.
>>
>> Basically, we have:
>>
>> void
>> st_texture_release_all_sampler_views(struct st_context *st,
>>                                      struct st_texture_object *stObj)
>> {
>>    GLuint i;
>>
>>    /* XXX This should use sampler_views[i]->pipe, not st->pipe */
>>    for (i = 0; i < stObj->num_sampler_views; ++i)
>>       pipe_sampler_view_release(st->pipe, &stObj->sampler_views[i]);
>> }
>>
>> Our VMware/svga driver has an issue when
>> pipe_context::sampler_view_destroy() is called with one context and a
>> sampler view which was created with another context.  I can hack around it
>> in our driver code, but it would be nice to fix this in the state tracker.
>>
>> Ideally, the above code should be something like:
>>
>>    for (i = 0; i < stObj->num_sampler_views; ++i)
>>       pipe_sampler_view_reference(&stObj->sampler_views[i], NULL);
>>
>> The current code which uses the st->pipe context came from the bug
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D81680&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=Vjtt0vs_iqoI31UfJxBl7yv9I2FeiaeAYgMTLKRBc_I&m=FGWCHiCWF_kKOrz3GGFZs2eE5PJ6gogqQtCGDvlLEsU&s=2-K92NTpbFj795AUuoUYUlI7jffzjyIiQuUtpWKyUvo&e= 
>>
>> AFAICT, you were just working around an R600 driver issue.  Any chance we
>> could fix the state tracker and re-test Firefox on R600?
>>
>> -Brian
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.freedesktop.org_mailman_listinfo_mesa-2Ddev&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=Vjtt0vs_iqoI31UfJxBl7yv9I2FeiaeAYgMTLKRBc_I&m=FGWCHiCWF_kKOrz3GGFZs2eE5PJ6gogqQtCGDvlLEsU&s=njTPf-sJsv16EvoeG-bqTYvtKbaeJ9KHP-nkVboj8ac&e= 
> 



More information about the mesa-dev mailing list