mirror of https://github.com/mpv-player/mpv
vo_opengl: never load vaapi GLX interop by default
Causes more harm than it helps. Will eventually be removed. Also rename the "reject_emulated" field to "probing" - this is more appropriate now.
This commit is contained in:
parent
76e50f6a3d
commit
11888a9270
|
@ -64,7 +64,7 @@ static struct gl_hwdec *load_hwdec_driver(struct mp_log *log, GL *gl,
|
|||
.log = mp_log_new(hwdec, log, drv->api_name),
|
||||
.gl = gl,
|
||||
.gl_texture_target = GL_TEXTURE_2D,
|
||||
.reject_emulated = is_auto,
|
||||
.probing = is_auto,
|
||||
};
|
||||
mp_verbose(log, "Loading hwdec driver '%s'\n", drv->api_name);
|
||||
if (hwdec->driver->create(hwdec) < 0) {
|
||||
|
|
|
@ -14,7 +14,7 @@ struct gl_hwdec {
|
|||
// For free use by hwdec driver
|
||||
void *priv;
|
||||
// For working around the vdpau vs. vaapi mess.
|
||||
bool reject_emulated;
|
||||
bool probing;
|
||||
// hwdec backends must set this to an IMGFMT_ that has an equivalent
|
||||
// internal representation in gl_video.c as the hardware texture.
|
||||
// It's used to build the rendering chain. For example, setting it to
|
||||
|
|
|
@ -216,7 +216,7 @@ static int create(struct gl_hwdec *hw)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (hw->reject_emulated && va_guess_if_emulated(p->ctx)) {
|
||||
if (hw->probing && va_guess_if_emulated(p->ctx)) {
|
||||
destroy(hw);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -74,6 +74,10 @@ static int create(struct gl_hwdec *hw)
|
|||
Display *x11disp = glXGetCurrentDisplay();
|
||||
if (!x11disp)
|
||||
return -1;
|
||||
if (hw->probing) {
|
||||
MP_VERBOSE(hw, "Not using this by default.\n");
|
||||
return -1;
|
||||
}
|
||||
int x11scr = DefaultScreen(x11disp);
|
||||
struct priv *p = talloc_zero(hw, struct priv);
|
||||
hw->priv = p;
|
||||
|
@ -96,10 +100,6 @@ static int create(struct gl_hwdec *hw)
|
|||
vaTerminate(p->display);
|
||||
return -1;
|
||||
}
|
||||
if (hw->reject_emulated && va_guess_if_emulated(p->ctx)) {
|
||||
destroy(hw);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int attribs[] = {
|
||||
GLX_BIND_TO_TEXTURE_RGBA_EXT, True,
|
||||
|
|
|
@ -116,7 +116,7 @@ static int create(struct gl_hwdec *hw)
|
|||
return -1;
|
||||
p->vdp_surface = VDP_INVALID_HANDLE;
|
||||
p->mixer = mp_vdpau_mixer_create(p->ctx, hw->log);
|
||||
if (hw->reject_emulated && mp_vdpau_guess_if_emulated(p->ctx)) {
|
||||
if (hw->probing && mp_vdpau_guess_if_emulated(p->ctx)) {
|
||||
destroy(hw);
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue