summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/cso_cache
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2022-02-01 14:38:19 -0500
committerMarge Bot <emma+marge@anholt.net>2022-03-09 03:54:37 +0000
commit6ab720f1f495e6e768d8254b0bf005e79aacb8f9 (patch)
tree4a8dcf69fae15a3cdd06aee039898b3377d776ae /src/gallium/auxiliary/cso_cache
parent0e51c478162e9f711d42cd479de677e539e88ded (diff)
aux/cso: stop tracing during cso_unbind()
this unnecessarily bloats lavapipe traces Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14854>
Diffstat (limited to 'src/gallium/auxiliary/cso_cache')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index 1f3685155e1..111de3f0e24 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -49,7 +49,7 @@
#include "cso_cache/cso_cache.h"
#include "cso_cache/cso_hash.h"
#include "cso_context.h"
-
+#include "driver_trace/tr_dump.h"
/**
* Per-shader sampler information.
@@ -296,6 +296,9 @@ void cso_unbind_context(struct cso_context *ctx)
{
unsigned i;
+ bool dumping = trace_dumping_enabled_locked();
+ if (dumping)
+ trace_dumping_stop_locked();
if (ctx->pipe) {
ctx->pipe->bind_blend_state( ctx->pipe, NULL );
ctx->pipe->bind_rasterizer_state( ctx->pipe, NULL );
@@ -399,6 +402,8 @@ void cso_unbind_context(struct cso_context *ctx)
ctx->pipe->set_sample_mask(ctx->pipe, ctx->sample_mask);
if (ctx->pipe->set_min_samples)
ctx->pipe->set_min_samples(ctx->pipe, ctx->min_samples);
+ if (dumping)
+ trace_dumping_start_locked();
}
/**