diff options
Diffstat (limited to 'src/gallium/targets/d3dadapter9/drm.c')
-rw-r--r-- | src/gallium/targets/d3dadapter9/drm.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/targets/d3dadapter9/drm.c b/src/gallium/targets/d3dadapter9/drm.c index 767a17a55da..e0c2e26c02f 100644 --- a/src/gallium/targets/d3dadapter9/drm.c +++ b/src/gallium/targets/d3dadapter9/drm.c @@ -56,6 +56,8 @@ DRI_CONF_BEGIN DRI_CONF_NINE_OVERRIDEVENDOR(-1) DRI_CONF_NINE_THROTTLE(-2) DRI_CONF_NINE_THREADSUBMIT("false") + DRI_CONF_NINE_ALLOWDISCARDDELAYEDRELEASE("true") + DRI_CONF_NINE_TEARFREEDISCARD("false") DRI_CONF_SECTION_END DRI_CONF_END; @@ -284,6 +286,21 @@ drm_create_adapter( int fd, override_vendorid = driQueryOptioni(&userInitOptions, "override_vendorid"); } + if (driCheckOption(&userInitOptions, "discard_delayed_release", DRI_BOOL)) + ctx->base.discard_delayed_release = driQueryOptionb(&userInitOptions, "discard_delayed_release"); + else + ctx->base.discard_delayed_release = TRUE; + + if (driCheckOption(&userInitOptions, "tearfree_discard", DRI_BOOL)) + ctx->base.tearfree_discard = driQueryOptionb(&userInitOptions, "tearfree_discard"); + else + ctx->base.tearfree_discard = FALSE; + + if (ctx->base.tearfree_discard && !ctx->base.discard_delayed_release) { + ERR("tearfree_discard requires discard_delayed_release\n"); + ctx->base.tearfree_discard = FALSE; + } + driDestroyOptionCache(&userInitOptions); driDestroyOptionInfo(&defaultInitOptions); |