[MPlayer-dev-eng] [PATCH] Re : Direct3D vo performance increase

Jim Hauxwell james at dattrax.co.uk
Sat Nov 22 23:43:04 CET 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> Ok, here is the (untested) patch that only move the
> BeginScene/StretchRect. I think previous was actually incorrect, since
> BeginScene/EndScene would be called multiple times with slices, which I
> think is not allowed.


from msdn...

Applications must call IDirect3DDevice9::BeginScene before performing
any rendering and must call IDirect3DDevice9::EndScene when rendering is
complete and before calling IDirect3DDevice9::BeginScene again.

So no, it wasn't a bug, but it wasn't very optimal, which is why I
removed the superfluous calls.

I have a question?

what's priv->is_cfg_finished for?

1) If it for multithreading race condition avoidance then it's broken.
The only safe way to do this is with interlocks.
2) The destroy_d3d_context() and reconfigure_d3d() are designed not to
leak resource, so it doesn't help for this.

I did some initial checking and preinit() and config() both run from the
same thread, so it seems a little odd.

Can anyone answer?

Patch looks OK as a first stab at folding everything together.

Jim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkoivgACgkQhrNWoHjgI1DDuACgheFSMev9mbgGDhryRXERYH0F
MLcAn2nHmgfWk2EEqrR5r2brlmkXMEmd
=jlS+
-----END PGP SIGNATURE-----




More information about the MPlayer-dev-eng mailing list