See the patch for the new controls added.
Signed-off-by: Axel Davy <axel.davy@ens.fr>
int throttling_value;
int vblank_mode;
BOOL thread_submit;
+ BOOL discard_delayed_release;
+ BOOL tearfree_discard;
void (*destroy)( struct d3dadapter9_context *ctx );
};
D3DPRESENT_PARAMETERS2 params2;
memset(¶ms2, 0, sizeof(D3DPRESENT_PARAMETERS2));
- params2.AllowDISCARDDelayedRelease = TRUE;
- params2.TearFreeDISCARD = FALSE;
+ params2.AllowDISCARDDelayedRelease = This->actx->discard_delayed_release;
+ params2.TearFreeDISCARD = This->actx->tearfree_discard;
ID3DPresent_SetPresentParameters2(pPresent, ¶ms2);
}
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;
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);
DRI_CONF_OPT_BEGIN(override_vendorid, int, def) \
DRI_CONF_DESC(en,"Define the vendor_id to report. This allows faking another hardware vendor.") \
DRI_CONF_OPT_END
+
+#define DRI_CONF_NINE_ALLOWDISCARDDELAYEDRELEASE(def) \
+DRI_CONF_OPT_BEGIN_B(discard_delayed_release, def) \
+ DRI_CONF_DESC(en,gettext("Whether to allow the display server to release buffers with a delay when using d3d's presentation mode DISCARD. Default to true. Set to false if suffering from lag (thread_submit=true can also help in this situation).")) \
+DRI_CONF_OPT_END
+
+#define DRI_CONF_NINE_TEARFREEDISCARD(def) \
+DRI_CONF_OPT_BEGIN_B(tearfree_discard, def) \
+ DRI_CONF_DESC(en,gettext("Whether to make d3d's presentation mode DISCARD (games usually use that mode) Tear Free. If rendering above screen refresh, some frames will get skipped. false by default.")) \
+DRI_CONF_OPT_END