virgl: handle NULL shader resource explicitly
authorChia-I Wu <olvaffe@gmail.com>
Mon, 13 May 2019 22:16:23 +0000 (15:16 -0700)
committerChia-I Wu <olvaffe@gmail.com>
Wed, 22 May 2019 16:28:19 +0000 (09:28 -0700)
commitfa9afb9de0379d47892eca2ec826c1bdb5caacd2
tree28d34c68696476bc3d5555cdd71c5bd4917fd7f8
parentcb7c9b2a9352cc73a2d3becc0427c53c8baf153a
virgl: handle NULL shader resource explicitly

When shader images/buffers are set, do not rely on
virgl_encoder_write_res and virgl_resource_dirty to do the implicit
NULL check.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
src/gallium/drivers/virgl/virgl_encode.c