[Mesa-dev] [PATCH v3 1/4] softpipe: Add assert verifying successful pipe_transfer_map

Robert Foss robert.foss at collabora.com
Tue Jul 24 09:09:36 UTC 2018


This failure mode is a bit tricky to debug and manifests itself
later as a null pointer dereference, for which finding the origin
is needlessly tricky.

Signed-off-by: Robert Foss <robert.foss at collabora.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
---

Changes since v2:
  - Added r-b

Changes since v1:
  - Patch added

 src/gallium/drivers/softpipe/sp_tile_cache.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index 351736ee421..211cc5ef4b0 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -209,6 +209,7 @@ sp_tile_cache_set_surface(struct softpipe_tile_cache *tc,
                                                     PIPE_TRANSFER_UNSYNCHRONIZED,
                                                     0, 0, ps->width, ps->height,
                                                     &tc->transfer[i]);
+            assert(tc->transfer_map[i]);
          }
       }
       else {
-- 
2.17.1



More information about the mesa-dev mailing list