[PATCH] d3dx9_36: Implement D3DXCheckTextureRequirements + tests

Tony Wasserka tony.wasserka at freenet.de
Mon Apr 19 08:14:24 CDT 2010


> +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...

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.

Best regards, Tony





More information about the wine-devel mailing list