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

Henri Verbeet hverbeet at gmail.com
Mon Nov 23 08:54:34 CST 2020


On Mon, 23 Nov 2020 at 18:06, Zhiyi Zhang <zzhang at codeweavers.com> wrote:
> 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?
>
Mostly just making sure that you're aware there are other places
affected by this. I also don't particularly love introducing an extra
wined3d export for this though; shouldn't the 2/2 patch on its own be
enough to fix the immediate regression?



More information about the wine-devel mailing list