mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 01:50:10 +01:00
gallium: fix update_textures() bug in pipe_texture binding logic
The 'st' pointer might not have changed, but st->pt might have. The dirtyData flag will indicate when that's happened, so check it.
This commit is contained in:
parent
5240cebb23
commit
c8bca8d8a9
1 changed files with 3 additions and 1 deletions
|
|
@ -67,7 +67,9 @@ update_textures(struct st_context *st)
|
|||
* this table before being deleted, otherwise the pointer
|
||||
* comparison below could fail.
|
||||
*/
|
||||
if (st->state.sampler_texture[unit] != stObj) {
|
||||
if (st->state.sampler_texture[unit] != stObj ||
|
||||
(stObj && stObj->dirtyData)) {
|
||||
/* should really test if the bound 'pt' is changing */
|
||||
struct pipe_texture *pt = st_get_stobj_texture(stObj);
|
||||
st->state.sampler_texture[unit] = stObj;
|
||||
st->pipe->set_sampler_texture(st->pipe, unit, pt);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue