[PATCH 1/2] wined3d: Introduce wined3d_output_get_ordinal().

Zhiyi Zhang zzhang at codeweavers.com
Mon Nov 23 08:36:48 CST 2020



On 2020/11/23 21:32, Henri Verbeet wrote:
> On Fri, 13 Nov 2020 at 11:19, Zhiyi Zhang <zzhang at codeweavers.com> wrote:
>> Secondhand Lands calls d3d9_device_GetDeviceCaps() frequently. Introduce a wined3d_output_get_ordinal()
>> to get output ordinal only instead of using the more expensive wined3d_output_get_desc().
>>
> Avoiding calls to EnumDisplaySettingsExW() is fine in principle, but I
> don't think these two patches are quite enough to avoid the underlying
> issue. In particular, wined3d_output_get_raster_status() is a
> potential source of frequent wined3d_output_get_display_mode() calls,
> either through d3d9_swapchain_GetRasterStatus() or
> ddraw7_GetVerticalBlankStatus()/ddraw7_GetScanLine(). See also bug
> 30538 and related bugs.
Yes. I am aware of the root cause being that EnumDisplaySettingsExW() is too expensive.
I plan to optimize it later. Meanwhile, I think these two patches are reasonable. Are you
proposing another way to fix this?

Thanks,
Zhiyi




More information about the wine-devel mailing list