dri: fix error value returned by driGLFormatToImageFormat()
authorEric Engestrom <eric.engestrom@intel.com>
Fri, 18 May 2018 14:53:58 +0000 (15:53 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Tue, 29 May 2018 16:44:13 +0000 (17:44 +0100)
commitd3ca7bd45223aefc60174ad7c5957d3d5792192a
tree6b4ea9ed507e3eb152908b04670b63c887d9a555
parent1945231b48df8ffcfa2eb168f81c3f5984433b01
dri: fix error value returned by driGLFormatToImageFormat()

0 is not a valid value for the __DRI_IMAGE_FORMAT_* enum.
It is, however, the value of MESA_FORMAT_NONE, which two of the callers
(i915 & i965) checked for.

The other callers (that check for errors, ie. st/dri) already check for
__DRI_IMAGE_FORMAT_NONE.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/i915/intel_screen.c
src/mesa/drivers/dri/i965/intel_screen.c