diff options
author | Nicolai Hähnle <[email protected]> | 2017-10-22 17:38:33 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-11-09 11:50:54 +0100 |
commit | 0dcf30e55091a0c78fc84d98f5ea36286f3f1961 (patch) | |
tree | b206ab6e846d2741653c0637ba29d2be9d57da6d /src/gallium/include/pipe/p_context.h | |
parent | 0f54ee6072d067027c389d61abc7aea8956b2c1e (diff) |
gallium: clarify the constraints on sampler_view_destroy
r600 expects the context that created the sampler view to still be alive
(there is a per-context list of sampler views).
svga currently bails when the context of destruction is not the same as
creation.
The GL state tracker, which is the only one that runs into the
multi-context subtleties (due to share groups), already guarantees that
sampler views are destroyed before their context of creation is destroyed.
Most drivers are context-agnostic, so the warning message in
pipe_sampler_view_release doesn't really make sense.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe/p_context.h')
-rw-r--r-- | src/gallium/include/pipe/p_context.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index 4609d4dbf23..087836d1c0c 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -508,6 +508,16 @@ struct pipe_context { struct pipe_resource *texture, const struct pipe_sampler_view *templat); + /** + * Destroy a view on a texture. + * + * \param ctx the current context + * \param view the view to be destroyed + * + * \note The current context may not be the context in which the view was + * created (view->context). However, the caller must guarantee that + * the context which created the view is still alive. + */ void (*sampler_view_destroy)(struct pipe_context *ctx, struct pipe_sampler_view *view); |