Isn't it a bug?

Luis Busquets luis.busquets at
Sun Dec 20 02:20:04 CST 2009

 From some time when I run Civilization4 I get a myriad of these 
messages and others with other formats:

err:d3d:getColorBits Unsupported format: WINED3DFMT_R16G16_FLOAT
err:d3d:IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt Unable to 
check compatibility for Format=WINED3DFMT_R16G16_FLOAT

After looking in the wine code I have found out that what happens is 
that Civ calls the function IDirect3D9Impl_CheckDepthStencilMatch

The implementation of wine then calls IWineD3D_CheckDepthStencilMatch 
which then calls


for each format that the adapter supports until it finds a supported format:


tries to match the supported pixel format of the adapter with the 
requested format.
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  floating format, getColorBits responds with an error 
and same does IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt 
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.

So my question is if it is possible to do 
right away check if:

cfg->iPixelType ==WGL_TYPE_RGBA_ARB  <>  and format_desc is a floating format

then return FALSE right away no need to fill ERR

same if

cfg->iPixelType ==WGL_TYPE_RGBA_FLOAT_AR  <>B  <>  and format_desc is not a floating format

then return FALSE right away no need to fill ERR

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.

What do you prefer?

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?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the wine-devel mailing list