st/dri: check pipe_screen->resource_get_handle() return value
st/dri: check pipe_screen->resource_get_handle() return value

Change dri2_query_image to check the return value of resource_get_handle
and return GL_FALSE if an error occurs.

For reference this is an example callstack that should propagate the
error back to the user:

    i915_drm_buffer_get_handle
    i915_texture_get_handle
    u_resource_get_handle_vtbl
    dri2_query_image
    gbm_dri_bo_get_fd
    gbm_bo_get_fd

Cc: 59f39c0db42d4479a46b02d4d2bc11120e37bb44@lists.freedesktop.org
Signed-off-by: Nicholas Bishop <d533c24df9fbddb3b2cdf5ec72f42a98f9f9c267@neverware.com>
Reviewed-by: Eric Engestrom <de0b63cf2dfb1fae8ed3c3b4244856a05677d4f0@imgtec.com> (v1)
[Emil Velikov: Split from larger patch, polish coding style, cc stable]
Signed-off-by: Emil Velikov <f20878473f414da183da19ee25c8722cc1d711e4@collabora.com>

metora/MesaGLSLCompiler,metora/MesaGLSLCompiler,metora/MesaGLSLCompiler