[Mesa-dev] [PATCH 1/2] svga: replace an assertion with warning

Brian Paul brianp at vmware.com
Thu Jan 16 13:55:26 PST 2014


We trip on this in some environments but it's not a fatal error.

Signed-off-by: Brian Paul <brianp at vmware.com>
---
 src/gallium/drivers/svga/svga_resource_texture.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c
index 4feca53..109897f 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.c
+++ b/src/gallium/drivers/svga/svga_resource_texture.c
@@ -205,7 +205,10 @@ svga_texture_get_handle(struct pipe_screen *screen,
    struct svga_winsys_screen *sws = svga_winsys_screen(texture->screen);
    unsigned stride;
 
-   assert(svga_texture(texture)->key.cachable == 0);
+   if (svga_texture(texture)->key.cachable) {
+      debug_warn_once("svga: texture->key.cachable=1");
+   }
+
    svga_texture(texture)->key.cachable = 0;
    stride = util_format_get_nblocksx(texture->format, texture->width0) *
             util_format_get_blocksize(texture->format);
-- 
1.8.3.2



More information about the mesa-dev mailing list