[PATCH] wined3d: Implement check for shader creation if hardware supports requested version.
Pauli Nieminen
suokkos at gmail.com
Wed Dec 17 04:22:05 CST 2008
On Wed, Dec 17, 2008 at 10:51 AM, Henri Verbeet <hverbeet at gmail.com> wrote:
> 2008/12/17 Pauli Nieminen <suokkos at gmail.com>:
> > +static inline void test_create_vshader_version_check(IDirect3DDevice9
> *device_ptr, const D3DCAPS9 *caps,
> > + const DWORD version, const DWORD *shader_code)
> > +{
> > + IDirect3DVertexShader9 *vshader_ptr = 0;
> > + HRESULT hret = 0;
> > +
> > + hret = IDirect3DDevice9_CreateVertexShader(device_ptr, shader_code,
> &vshader_ptr);
> > +
> > +
> > + if( version <= caps->VertexShaderVersion )
> > + {
> > + ok(hret == D3D_OK && vshader_ptr != NULL, "Vertex shader (0x%x)
> creation failed but d3dcaps claim to support it. hret = 0x%x, vshader_ptr =
> %p", version, hret, vshader_ptr);
> > + } else {
> > + ok(hret == D3DERR_INVALIDCALL && vshader_ptr == NULL,"Vertex
> shader (0x%x) creation succesed but d3dcaps claim not to support it. hret =
> 0x%x, vshader_ptr = %p", version, hret, vshader_ptr);
> > + }
> > +
> > +}
> If creation succeeds, you need to Release the shader again. Same goes
> for the pixel shader version of this function.
>
I tried to search for example of releasing shaders from the test file but
when I couldn't find any. Should others test in that file also include
shader release?
Thanks for comments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-devel/attachments/20081217/8aef071f/attachment.htm
More information about the wine-devel
mailing list