Mesa (master): gallium: fix a crash in drivers that don' t support stream output

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Thu Dec 15 19:54:08 UTC 2011


Module: Mesa
Branch: master
Commit: cf5948380829ff44aafb12c911b0fc064360d352
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf5948380829ff44aafb12c911b0fc064360d352

Author: Fredrik Höglund <fredrik at kde.org>
Date:   Thu Dec 15 20:41:42 2011 +0100

gallium: fix a crash in drivers that don't support stream output

---

 src/gallium/auxiliary/cso_cache/cso_context.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index 49318e7..b46e668 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -317,7 +317,8 @@ void cso_release_all( struct cso_context *ctx )
       ctx->pipe->set_fragment_sampler_views(ctx->pipe, 0, NULL);
       if (ctx->pipe->set_vertex_sampler_views)
          ctx->pipe->set_vertex_sampler_views(ctx->pipe, 0, NULL);
-      ctx->pipe->set_stream_output_targets(ctx->pipe, 0, NULL, 0);
+      if (ctx->pipe->set_stream_output_targets)
+         ctx->pipe->set_stream_output_targets(ctx->pipe, 0, NULL, 0);
    }
 
    /* free fragment samplers, views */




More information about the mesa-commit mailing list