trace: Don't set surface_[fill|copy] if not set on pipe
authorJakob Bornecrantz <jakob@vmware.com>
Tue, 1 Sep 2009 09:56:14 +0000 (11:56 +0200)
committerJakob Bornecrantz <jakob@vmware.com>
Tue, 1 Sep 2009 09:56:14 +0000 (11:56 +0200)
src/gallium/drivers/trace/tr_context.c

index 4ab718f233d4a5c854172263cf1f030a8ba8ad60..ae0af4d0557045d704d67030f22fb6797c128e83 100644 (file)
@@ -1277,8 +1277,10 @@ trace_context_create(struct pipe_screen *_screen,
    tr_ctx->base.set_sampler_textures = trace_context_set_sampler_textures;
    tr_ctx->base.set_vertex_buffers = trace_context_set_vertex_buffers;
    tr_ctx->base.set_vertex_elements = trace_context_set_vertex_elements;
-   tr_ctx->base.surface_copy = trace_context_surface_copy;
-   tr_ctx->base.surface_fill = trace_context_surface_fill;
+   if (pipe->surface_copy)
+      tr_ctx->base.surface_copy = trace_context_surface_copy;
+   if (pipe->surface_fill)
+      tr_ctx->base.surface_fill = trace_context_surface_fill;
    tr_ctx->base.clear = trace_context_clear;
    tr_ctx->base.flush = trace_context_flush;
    tr_ctx->base.is_texture_referenced = trace_is_texture_referenced;