wined3d: Rename IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt() to wined3d_check_pixel_format_color().

This commit is contained in:
Henri Verbeet 2011-06-07 19:44:47 +02:00 committed by Alexandre Julliard
parent 90d673e961
commit c24c2d1eac
1 changed files with 10 additions and 14 deletions

View File

@ -2931,7 +2931,7 @@ HRESULT CDECL wined3d_get_adapter_identifier(const struct wined3d *wined3d,
return WINED3D_OK; return WINED3D_OK;
} }
static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(const struct wined3d_gl_info *gl_info, static BOOL wined3d_check_pixel_format_color(const struct wined3d_gl_info *gl_info,
const struct wined3d_pixel_format *cfg, const struct wined3d_format *format) const struct wined3d_pixel_format *cfg, const struct wined3d_format *format)
{ {
BYTE redSize, greenSize, blueSize, alphaSize, colorBits; BYTE redSize, greenSize, blueSize, alphaSize, colorBits;
@ -3038,16 +3038,14 @@ HRESULT CDECL wined3d_check_depth_stencil_match(const struct wined3d *wined3d,
cfg_count = adapter->nCfgs; cfg_count = adapter->nCfgs;
for (i = 0; i < cfg_count; ++i) for (i = 0; i < cfg_count; ++i)
{ {
if (IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&adapter->gl_info, &cfgs[i], rt_format)) if (wined3d_check_pixel_format_color(&adapter->gl_info, &cfgs[i], rt_format)
{ && wined3d_check_pixel_format_depth(&adapter->gl_info, &cfgs[i], ds_format))
if (wined3d_check_pixel_format_depth(&adapter->gl_info, &cfgs[i], ds_format))
{ {
TRACE_(d3d_caps)("Formats match.\n"); TRACE_(d3d_caps)("Formats match.\n");
return WINED3D_OK; return WINED3D_OK;
} }
} }
} }
}
TRACE_(d3d_caps)("Unsupported format pair: %s and %s.\n", TRACE_(d3d_caps)("Unsupported format pair: %s and %s.\n",
debug_d3dformat(render_target_format_id), debug_d3dformat(render_target_format_id),
@ -3185,13 +3183,11 @@ static BOOL CheckDepthStencilCapability(const struct wined3d_adapter *adapter,
for (it = 0; it < adapter->nCfgs; ++it) for (it = 0; it < adapter->nCfgs; ++it)
{ {
const struct wined3d_pixel_format *cfg = &adapter->cfgs[it]; const struct wined3d_pixel_format *cfg = &adapter->cfgs[it];
if (IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&adapter->gl_info, cfg, display_format)) if (wined3d_check_pixel_format_color(&adapter->gl_info, cfg, display_format)
{ && wined3d_check_pixel_format_depth(&adapter->gl_info, cfg, ds_format))
if (wined3d_check_pixel_format_depth(&adapter->gl_info, cfg, ds_format))
return TRUE; return TRUE;
} }
} }
}
return FALSE; return FALSE;
} }
@ -3231,8 +3227,8 @@ static BOOL CheckRenderTargetCapability(const struct wined3d_adapter *adapter,
* drawable (not offscreen; e.g. Nvidia offers R5G6B5 for pbuffers even when X is running at 24bit) */ * drawable (not offscreen; e.g. Nvidia offers R5G6B5 for pbuffers even when X is running at 24bit) */
for (it = 0; it < adapter->nCfgs; ++it) for (it = 0; it < adapter->nCfgs; ++it)
{ {
if (cfgs[it].windowDrawable && IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&adapter->gl_info, if (cfgs[it].windowDrawable
&cfgs[it], check_format)) && wined3d_check_pixel_format_color(&adapter->gl_info, &cfgs[it], check_format))
{ {
TRACE_(d3d_caps)("Pixel format %d is compatible with format %s.\n", TRACE_(d3d_caps)("Pixel format %d is compatible with format %s.\n",
cfgs[it].iPixelFormat, debug_d3dformat(check_format->id)); cfgs[it].iPixelFormat, debug_d3dformat(check_format->id));