v3d: Early return with handle 0 when getting a bo on the simulator
authorAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 4 Jul 2019 12:11:27 +0000 (14:11 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 9 Jul 2019 06:40:35 +0000 (08:40 +0200)
commit71446bf8e303089cf927412385e992fc70156261
treecb34c81d52d0e00f1fba3e65efecf7a9481bcb51
parentb031dd901064c5c560e1fce17139b34e45579a60
v3d: Early return with handle 0 when getting a bo on the simulator

Until now we were just asking entries on the bo hash table, and don't
worry if the handle was NULL, as we were just expecting to get a NULL
in return. It seems that now the hash table assert with some reserverd
pointers, included NULL. This commit just early returns with handle 0.

This change fixes several crashes on vk-gl-cts GLES tests when using
the v3d simulator, like:
KHR-GLES3.core.internalformat.copy_tex_image.*

Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/drivers/v3d/v3d_simulator.c