[Mesa-dev] [PATCH 7/9] gallium: Wire up flush control
Marek Olšák
maraeo at gmail.com
Tue May 12 11:05:09 PDT 2015
Patches 7 & 8:
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Tue, May 12, 2015 at 5:54 PM, Adam Jackson <ajax at redhat.com> wrote:
> This still doesn't do anything unless your driver exposes the flush
> control extension.
>
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
> src/gallium/include/state_tracker/st_api.h | 1 +
> src/gallium/state_trackers/dri/dri_context.c | 7 ++++++-
> src/mesa/state_tracker/st_manager.c | 3 +++
> 3 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h
> index 86fdc69..4e18f10 100644
> --- a/src/gallium/include/state_tracker/st_api.h
> +++ b/src/gallium/include/state_tracker/st_api.h
> @@ -89,6 +89,7 @@ enum st_api_feature
> #define ST_CONTEXT_FLAG_DEBUG (1 << 0)
> #define ST_CONTEXT_FLAG_FORWARD_COMPATIBLE (1 << 1)
> #define ST_CONTEXT_FLAG_ROBUST_ACCESS (1 << 2)
> +#define ST_CONTEXT_FLAG_RELEASE_NONE (1 << 3)
>
> /**
> * Reasons that context creation might fail.
> diff --git a/src/gallium/state_trackers/dri/dri_context.c b/src/gallium/state_trackers/dri/dri_context.c
> index f332ee9..3c0c1e7 100644
> --- a/src/gallium/state_trackers/dri/dri_context.c
> +++ b/src/gallium/state_trackers/dri/dri_context.c
> @@ -86,11 +86,16 @@ dri_create_context(gl_api api, const struct gl_config * visual,
> goto fail;
> }
>
> - if (ctx_config->attribute_mask != 0) {
> + if (ctx_config->attribute_mask &
> + ~(__DRIVER_CONTEXT_ATTRIB_RELEASE_BEHAVIOR)) {
> *error = __DRI_CTX_ERROR_UNKNOWN_ATTRIBUTE;
> goto fail;
> }
>
> + if ((ctx_config->attribute_mask & __DRIVER_CONTEXT_ATTRIB_RELEASE_BEHAVIOR)
> + && (ctx_config->release_behavior == __DRI_CTX_RELEASE_BEHAVIOR_NONE))
> + attribs.flags |= ST_CONTEXT_FLAG_RELEASE_NONE;
> +
> if (sharedContextPrivate) {
> st_share = ((struct dri_context *)sharedContextPrivate)->st;
> }
> diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
> index 840f76a..c1987f3 100644
> --- a/src/mesa/state_tracker/st_manager.c
> +++ b/src/mesa/state_tracker/st_manager.c
> @@ -681,6 +681,9 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
> if (attribs->flags & ST_CONTEXT_FLAG_FORWARD_COMPATIBLE)
> st->ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT;
>
> + if (attribs->flags & ST_CONTEXT_FLAG_RELEASE_NONE)
> + st->ctx->Const.ContextReleaseBehavior = GL_NONE;
> +
> /* need to perform version check */
> if (attribs->major > 1 || attribs->minor > 0) {
> /* Is the actual version less than the requested version?
> --
> 2.4.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list