i965: Check if the modifier is supported in select_best_modifier
Otherwise, if a client gave us a list of modifiers that contained a modifier we understand but which is not supported on the hardware, we might return that one and then fail to create the image. Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
ec4364d57e
commit
7947d05f84
|
@ -586,6 +586,9 @@ select_best_modifier(struct gen_device_info *devinfo,
|
|||
enum modifier_priority prio = MODIFIER_PRIORITY_INVALID;
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
if (!modifier_is_supported(devinfo, modifiers[i]))
|
||||
continue;
|
||||
|
||||
switch (modifiers[i]) {
|
||||
case I915_FORMAT_MOD_Y_TILED:
|
||||
prio = MAX2(prio, MODIFIER_PRIORITY_Y);
|
||||
|
|
Loading…
Reference in New Issue