[PATCH] d3dx9_36: Implement D3DXCheckTextureRequirements + tests

Christian Costa titan.costa at wanadoo.fr
Mon Apr 19 13:48:22 CDT 2010


Tony Wasserka a écrit :
>> +static inline void check_ref(IUnknown *obj, int exp)
>> +static inline void check_release(IUnknown *obj, int exp)
>>     
> We shouldn't use these function definitions anymore IMO, either do the ref check in the code itself, or replace the check_ref and check_release functions with macros; the reason is that if there really is a test error, the given line refers to the function source and thus won't help us at all, i.e. before actually examining an error you'd first have to find out what check actually failed...
>
>   
Well, it's your code, correct ?
I suggest to simply remove these checks. There does not bring any added 
values.
> Also I'm not too sure whether it's necessary to include resources.h ...
>   
>   
>> +        if (SUCCEEDED(hr)) {
>> +            if (*format == D3DFMT_UNKNOWN || *format == D3DX_DEFAULT) *format = D3DFMT_A8R8G8B8;
>> +
>> +            hr = IDirect3D9_CheckDeviceFormat(d3d, params.AdapterOrdinal, params.DeviceType, mode.Format, usage,
>> +                D3DRTYPE_TEXTURE, *format);
>> +        }
>> +
>> +        if (d3d)
>> +            IDirect3D9_Release(d3d);
>> +
>> +        if (FAILED(hr))
>> +            return D3DERR_INVALIDCALL;
>>     
> Maybe we should add a FIXME within that if (FAILED(hr)), since that part is something which still needs to be implemented.
>
>   
Could you be more specific on what's need to be implemented ?
The if statement catches several errors. Maybe you want to catch an 
error on CheckDeviceFormat, correct ?
> Best regards, Tony
>
>   

BTW, you are reviewing your own patch (albeit slighty modified) ;-) , 
does that mean you plan to make your work
go into mainline ?

Regards
Christian






More information about the wine-devel mailing list