frontends/va: correct check for invalid format
We need to check against the correct define, DRM_FORMAT_INVALID.
Checking an uint32_t against DRM_FORMAT_MOD_INVALID will always produce
false anyway.
Caught by Coverity.
Fixes: b85c6531f6
("frontends/va: add support for VA_EXPORT_SURFACE_COMPOSED_LAYERS")
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9897>
This commit is contained in:
parent
f891c78a14
commit
837f76edb8
|
@ -1117,7 +1117,7 @@ vlVaExportSurfaceHandle(VADriverContextP ctx,
|
|||
|
||||
if (flags & VA_EXPORT_SURFACE_COMPOSED_LAYERS) {
|
||||
uint32_t drm_format = pipe_format_to_drm_format(surf->buffer->buffer_format);
|
||||
if (drm_format == DRM_FORMAT_MOD_INVALID) {
|
||||
if (drm_format == DRM_FORMAT_INVALID) {
|
||||
ret = VA_STATUS_ERROR_UNSUPPORTED_MEMORY_TYPE;
|
||||
goto fail;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue