<br><br><div class="gmail_quote">On Wed, Dec 17, 2008 at 10:51 AM, Henri Verbeet <span dir="ltr">&lt;<a href="mailto:hverbeet@gmail.com">hverbeet@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2008/12/17 Pauli Nieminen &lt;<a href="mailto:suokkos@gmail.com">suokkos@gmail.com</a>&gt;:<br>
&gt; +static inline void test_create_vshader_version_check(IDirect3DDevice9 *device_ptr, const D3DCAPS9 *caps,<br>
&gt; + &nbsp; &nbsp; &nbsp; &nbsp;const DWORD version, const DWORD *shader_code)<br>
&gt; +{<br>
&gt; + &nbsp; &nbsp;IDirect3DVertexShader9 *vshader_ptr = 0;<br>
&gt; + &nbsp; &nbsp;HRESULT hret = 0;<br>
&gt; +<br>
&gt; + &nbsp; &nbsp;hret = IDirect3DDevice9_CreateVertexShader(device_ptr, shader_code, &amp;vshader_ptr);<br>
&gt; +<br>
&gt; +<br>
&gt; + &nbsp; &nbsp;if( version &lt;= caps-&gt;VertexShaderVersion )<br>
&gt; + &nbsp; &nbsp;{<br>
&gt; + &nbsp; &nbsp; &nbsp; &nbsp;ok(hret == D3D_OK &amp;&amp; vshader_ptr != NULL, &quot;Vertex shader (0x%x) creation failed but d3dcaps claim to support it. hret = 0x%x, vshader_ptr = %p&quot;, version, hret, vshader_ptr);<br>
&gt; + &nbsp; &nbsp;} else {<br>
&gt; + &nbsp; &nbsp; &nbsp; &nbsp;ok(hret == D3DERR_INVALIDCALL &amp;&amp; vshader_ptr == NULL,&quot;Vertex shader (0x%x) creation succesed but d3dcaps claim not to support it. hret = 0x%x, vshader_ptr = %p&quot;, version, hret, vshader_ptr);<br>

&gt; + &nbsp; &nbsp;}<br>
&gt; +<br>
&gt; +}<br>
If creation succeeds, you need to Release the shader again. Same goes<br>
for the pixel shader version of this function.<br>
</blockquote><div><br>I tried&nbsp; to search for example of releasing shaders from the test file but when I couldn&#39;t find any. Should others test in that file also include shader release?<br></div><div><br>Thanks for comments.<br>
&nbsp;</div></div>