No subject


Fri Sep 18 15:31:18 CDT 2009


<br>
err:d3d:getColorBits Unsupported format: WINED3DFMT_R16G16_FLOAT<br>
err:d3d:IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt Unable to
check compatibility for Format=WINED3DFMT_R16G16_FLOAT<br>
<br>
<br>
After looking in the wine code I have found out that what happens is
that Civ calls the function IDirect3D9Impl_CheckDepthStencilMatch<br>
<br>
The implementation of wine then calls IWineD3D_CheckDepthStencilMatch
which then calls<br>
<br>
<a
 href="http://source.winehq.org/ident?i=IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt">IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt</a><br>
<br>
for each format that the adapter supports until it finds a supported
format:<br>
<br>
Problem:<br>
<br>
<a
 href="http://source.winehq.org/ident?i=IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt">IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt</a>
tries to match the supported pixel format of the adapter with the
requested format.<br>
If the supported pixel format of the adapter is of type
WGL_TYPE_RGBA_ARB, it tries to getColorBits of the format even if the
format to try is a&nbsp; floating format, getColorBits responds with an
error and same does <a
 href="http://source.winehq.org/ident?i=IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt">IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt</a>.
Certainly, the answer is correct (FALSE) but the problem is that it
fills the screen with ERR that are due to wine checking things for
which there is no need as they are directly false.<br>
<br>
So my question is if it is possible to do <a
 href="http://source.winehq.org/ident?i=IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt">IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt</a>
right away check if:<br>
<pre>cfg-&gt;iPixelType == <a
 href="http://source.winehq.org/ident?i=WGL_TYPE_RGBA_ARB">WGL_TYPE_RGBA_ARB</a> and format_desc is a floating format</pre>
then return FALSE right away no need to fill ERR<br>
<br>
same if<br>
<pre>cfg-&gt;iPixelType == <a
 href="http://source.winehq.org/ident?i=WGL_TYPE_RGBA_FLOAT_ARB">WGL_TYPE_RGBA_FLOAT_AR</a><a
 href="http://source.winehq.org/ident?i=WGL_TYPE_RGBA_ARB">B</a> and format_desc is not a floating format</pre>
then return FALSE right away no need to fill ERR<br>
<br>
If you do not like this solution, getColorBits could be modified so
that it does not file an error for floating point formats but just
responds with 0 for all bit sizes when the format is a floating point
without filling an error.<br>
<br>
What do you prefer?<br>
<br>
Can somebody propose a patch with this kind of behaviour or something
better so that my Civ4 does not respond with this myriad of errors?<br>
<br>
<br>
<br>
<br>
<pre><a href="http://source.winehq.org/ident?i=WGL_TYPE_RGBA_ARB">
</a></pre>
<br>
<pre>

</pre>
<br>
</body>
</html>

--------------000707070503040800020208--



More information about the wine-devel mailing list