loader: fix the no-modifiers case
Normally modifiers take precendence over use flags, as they are more
explicit. But if the driver supports modifiers, but the xserver does
not, then we should fallback to the old mechanism of allocating a buffer
using 'use' flags.
Fixes: 069fdd5f9f
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
This commit is contained in:
parent
7c4b9510d1
commit
c56fe4118a
|
@ -1319,12 +1319,20 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format,
|
||||||
|
|
||||||
free(mod_reply);
|
free(mod_reply);
|
||||||
|
|
||||||
buffer->image = draw->ext->image->createImageWithModifiers(draw->dri_screen,
|
/* don't use createImageWithModifiers() if we have no
|
||||||
width, height,
|
* modifiers, other things depend on the use flags when
|
||||||
format,
|
* there are no modifiers to know that a buffer can be
|
||||||
modifiers,
|
* shared.
|
||||||
count,
|
*/
|
||||||
buffer);
|
if (modifiers) {
|
||||||
|
buffer->image = draw->ext->image->createImageWithModifiers(draw->dri_screen,
|
||||||
|
width, height,
|
||||||
|
format,
|
||||||
|
modifiers,
|
||||||
|
count,
|
||||||
|
buffer);
|
||||||
|
}
|
||||||
|
|
||||||
free(modifiers);
|
free(modifiers);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue