summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/freedreno/a2xx/fd2_program.h
diff options
context:
space:
mode:
authorRob Clark <robdclark@chromium.org>2021-02-12 12:42:01 -0800
committerMarge Bot <eric+marge@anholt.net>2021-02-18 00:27:49 +0000
commit3f776046238e1ae153f24b332e29718681829027 (patch)
tree504389f4005d7a6bb1198c351b6c95cf4895ed61 /src/gallium/drivers/freedreno/a2xx/fd2_program.h
parente7e19c6a4f433186b134ca796143c48c4c4f7792 (diff)
freedreno: driver-thread annotations
Use clangs thread-safety annotations to implement a virtual lock protecting context fields that should only be accessed from driver- thread. This should let the compiler help us detect problems where ctx is used unsafely from things that could be called by the fe/st thread. This does end up sprinkled far and wide, it would be nice if the compiler could be a bit smarter about understanding call-graphs (at least with static fxns), but at least it makes it clear where things are called from which thread. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9061>
Diffstat (limited to 'src/gallium/drivers/freedreno/a2xx/fd2_program.h')
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_program.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_program.h b/src/gallium/drivers/freedreno/a2xx/fd2_program.h
index 00e89d4e0a6..fdca2a2aebc 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_program.h
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_program.h
@@ -63,7 +63,7 @@ struct fd2_shader_stateobj {
};
void fd2_program_emit(struct fd_context *ctx, struct fd_ringbuffer *ring,
- struct fd_program_stateobj *prog);
+ struct fd_program_stateobj *prog) assert_dt;
void fd2_prog_init(struct pipe_context *pctx);