[vlc-devel] [PATCH] Direct3D shader support (HLSL)

xxcv xxcv07 at gmail.com
Sat Aug 14 12:13:21 CEST 2010


Hi,
On 14/08/2010 7:47 PM, Sasha Koruga wrote:
> Hi,
> I'm very relieved to hear that, Xxcv!  ^_^  Thank you for testing and
> reviewing the patch.
Here's what I found out on your original patch, as well as this one,
"0001-added-HLSL-support.patch"
> @@ -833,14 +1067,15 @@ static int Direct3DCreatePool(vout_display_t *vd, video_format_t *fmt)
>          return VLC_ENOMEM;
>      }
>      rsc->p_sys->surface = surface;
> -    rsc->p_sys->fallback = NULL;
Right here you removed ^^^ the initialization for fallback code.
This caused the crash on start / loading of video. I guess this also 
caused problem crash on exit.
When I restore this line of code the problem #2 and #3 went away.
However the 1.2-git that I tested on with your patch is the git clone 
from 28/Jun this means that the commit 
9381877a72a850aa13051a91a1e86938e19b3cac
on fallback code wasn't added and thus it didn't show a problem, I guess 
it would still crash on today's 1.2-git because of the removal of this line.
> -    for (int i = 0; i < PICTURE_PLANE_MAX; i++) {
> +    for (int i = 0; i < PICTURE_PLANE_MAX; i++)
> +	{
>          rsc->p[i].p_pixels = NULL;
>          rsc->p[i].i_pitch = 0;
>          rsc->p[i].i_lines = fmt->i_height / (i > 0 ? 2 : 1);
>      }
>      picture_t *picture = picture_NewFromResource(fmt, rsc);
> -    if (!picture) {
> +    if (!picture)
> +	{
>          IDirect3DSurface9_Release(surface);
>          free(rsc->p_sys);
>          return VLC_ENOMEM;


> I did change the D3DXFX_NOT_CLONEABLE to (1<<  11), as Xxvc said to
Well, I think it would be more politically correct to use the define and 
not the value, I have already asked in #mingw-w64 to have this define 
added into the headers for support and I hope it will be added.
> do. I also added support for nVidia's PerfHUD (a Direct3D profiler).
>

As a user, I can't review your code more thoroughly, I will leave the 
rest of this to the vlc developer nefrir and others to review for you 
before it enters vlc.git repository. Good luck!!



Best Regards,

-- 
My VLC, My Way, My Style~



More information about the vlc-devel mailing list