No subject


Fri Sep 18 15:31:18 CDT 2009


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 (no error of the
application on that)

The implementation of wine then calls IWineD3D_CheckDepthStencilMatch which
then calls

IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt

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

Problem:

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

Possible solution: to do IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt
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_ARB 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?

The myriad of unnecessary checks and of reports of ERR causes a some slowness
that can be quantified eliminated unnecessary checks.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list