[vlc-devel] [PATCH] Direct3D: implement HLSL pixel shading in the rendering pipeline

Rafaël Carré funman at videolan.org
Tue Jan 28 14:25:03 CET 2014


On 01/28/14 13:43, Felix Abecassis wrote:
> 2014-01-28 Rafaël Carré <funman at videolan.org>:
>> Do you want to add these to mingw-w64 ?
>>
>> It is very easy and I will gladly guide you through the process.
>>
>> In fact it might be as easy as pointing it out to jacek (caban) who's
>> working
>> on DirectX in wine (among other things).
> Sure, that would be great.

Great, let's continue on IRC!

>> msg_Err ?
> Not using shaders is not a fatal error for the module so I think
> msg_Warn should be used.

Well at this point shaders have been enabled, so while the module can
continue,
the shaders code could have run but didn't because of an error.

>> nit picking: no need to set sys->d3dx_shader if it's already NULL
> I think both way are fine, but still I prefer to do:
> if (A)
>     Destroy(A);
> if (B)
>     Destroy(B);
> A = NULL;
> B = NULL;
> 
> Instead of:
> if (A) {
>     Destroy(A);
>     A = NULL;
> }
> if (B) {
> ...
> Direct3DDestroy() uses the former.

ok

>> What's shaderPasses value here?
> A technique can have several passes, right now we only have only one
> pass in the provided shaders but we could have more. For instance the
> grayscale shader:
> technique Grayscale
> {
>     pass p1
>     {
>         PixelShader = compile ps_2_0 grayscale();
>     }
> }

Sorry, I meant it is not initialized if Effect_Begin() fails.

>> hd3d9x_dll is always non NULL
> No, see first line :).

Oops right, I would return directly if LibraryLoad fails though, since
there is no context to clean up.

>>> +static HINSTANCE Direct3DLoadShaderLibrary()
>>
>> (void)?
> I think it's only needed when declaring a prototype.

I don't know but I prefer the prototype and the definition to match.

> Thanks for your feedback.

By the way I meant to ask but didn't in my first mail,
What is this for? :) I honestly have no idea.



More information about the vlc-devel mailing list