[PATCH] d3dx9: Use struct d3dx_object for objects.

Rico Schüller kgbricola at web.de
Wed Sep 25 08:32:06 CDT 2013


On 25.09.2013 14:02, Matteo Bruni wrote:
> 2013/9/24 Rico Schüller <kgbricola at web.de>:
>> ---
>>   dlls/d3dx9_36/effect.c | 248
>> +++++++++++++++++++------------------------------
>>   1 Datei geändert, 95 Zeilen hinzugefügt(+), 153 Zeilen entfernt(-)
>>
>
> I definitely like the direction this patch takes.
>
> @@ -5068,6 +5009,9 @@ static HRESULT d3dx9_parse_resource(struct
> d3dx9_base_effect *base, const char *
>
>       param = state->parameter;
>
> +    /*
> +     * TODO: Do we need to create the shader/string here or later
> when we access them?
> +     */
>
> Here it's fine AFAICS. What are the other options you are thinking
> about? Something like creating the shaders at the first Begin /
> BeginPass call?
>
Yes. Depending on the use case we may create it on the Begin/BeginPass 
when the shader is needed the first time (this may also be something 
like isParameterUsed or GetVertexShader). We don't need the shaders for 
cases like GetPassDesc, where only the shader blob is used and in cases 
the shaders are not used at all (e.g. if some technique is for shader 
version 2 and one for shader version 3). That's why I think it may be an 
option to defer the shader creation. Imho this needs some tests first 
before an useful decision could be made. The comment was added, because 
I removed the previously available shader creation (which had some flaws).

Cheers
Rico



More information about the wine-devel mailing list