gallium/trace: check bind_vertex_sampler_states and set_vertex_sampler_views
authorXavier Chantry <chantry.xavier@gmail.com>
Sun, 5 Dec 2010 11:12:20 +0000 (12:12 +0100)
committerPatrice Mandin <patmandin@gmail.com>
Sun, 5 Dec 2010 11:12:25 +0000 (12:12 +0100)
Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Reviewed-by: Jakob Bornecrantz <wallbraker at gmail.com>
Signed-off-by: Patrice Mandin <patmandin@gmail.com>
src/gallium/drivers/trace/tr_context.c

index 2fdb6c91d0031dc5e34b46e0292d6b6606df9b42..eaabae8ce422137eb4564fc9d6a1035cd9ad3557 100644 (file)
@@ -314,6 +314,9 @@ trace_context_bind_vertex_sampler_states(struct pipe_context *_pipe,
    struct trace_context *tr_ctx = trace_context(_pipe);
    struct pipe_context *pipe = tr_ctx->pipe;
 
+   if (!pipe->bind_vertex_sampler_states)
+      return;
+
    trace_dump_call_begin("pipe_context", "bind_vertex_sampler_states");
 
    trace_dump_arg(ptr, pipe);
@@ -980,6 +983,9 @@ trace_context_set_vertex_sampler_views(struct pipe_context *_pipe,
    struct pipe_sampler_view *unwrapped_views[PIPE_MAX_VERTEX_SAMPLERS];
    unsigned i;
 
+   if (!pipe->set_vertex_sampler_views)
+      return;
+
    for(i = 0; i < num; ++i) {
       tr_view = trace_sampler_view(views[i]);
       unwrapped_views[i] = tr_view ? tr_view->sampler_view : NULL;