mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 12:28:07 +02:00
isl: handle DRM_FORMAT_MOD_INVALID in isl_drm_modifier_has_aux
This fixes crashes with piglit.spec.ext_external_objects.* tests on TGL
that started to trigger with commit 8bc7bcfa0c.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23718>
This commit is contained in:
parent
b8f8146c6e
commit
e1d7861dd6
1 changed files with 4 additions and 0 deletions
|
|
@ -42,6 +42,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "drm-uapi/drm_fourcc.h"
|
||||
#include "util/compiler.h"
|
||||
#include "util/macros.h"
|
||||
#include "util/format/u_format.h"
|
||||
|
|
@ -2246,6 +2247,9 @@ isl_drm_modifier_get_info(uint64_t modifier);
|
|||
static inline bool
|
||||
isl_drm_modifier_has_aux(uint64_t modifier)
|
||||
{
|
||||
if (modifier == DRM_FORMAT_MOD_INVALID)
|
||||
return false;
|
||||
|
||||
return isl_drm_modifier_get_info(modifier)->aux_usage != ISL_AUX_USAGE_NONE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue