Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement D3DKMTEnumAdapters2 and D3DKMTQueryAdapterInfo (for WDDM_2_7_CAPS) #259

Open
wants to merge 67 commits into
base: experimental_9.0
Choose a base branch
from

Conversation

liam-middlebrook
Copy link
Contributor

Implementations needed to support querying a D3DKMT adapter for WDDM_2_7_CAPS information. This work has partial overlap with commits which are already in upstream wine; individual commit messages contain reasoning for why they exist rather than cherry-picking patches from upstream.

Most notably, the third commit is the only commit which would need to be carried over in a rebase on-top of upstream Wine. It would need to be slightly re-written, some more notes in the commit message.

Hopefully the additional notes on change integration are helpful for you @ivyl

Paul Gofman and others added 30 commits October 2, 2024 17:26
(cherry picked from commit 8c02af2)

CW-Bug-Id: #24269
(cherry picked from commit 535c8a8)

CW-Bug-Id: #24269
(cherry picked from commit d9a123b)

CW-Bug-Id: #24269
(cherry picked from commit 3d1c2b0)

CW-Bug-Id: #24269
(cherry picked from commit 4e43a78)

CW-Bug-Id: #24269
…when appropriate.

Fixes heap corruption downstream in NsiEnumerateObjectsAllParametersEx.
Fixes a regression from 9085bc7.

(cherry picked from commit b81a189)
… when appropriate.

Fixes heap corruption downstream in NsiEnumerateObjectsAllParametersEx.
Fixes a regression from a3f737f.

(cherry picked from commit f84f270)
(cherry picked from commit ae2443a)

CW-Bug-Id: #24258
(cherry picked from commit 3b94e54)

CW-Bug-Id: #24258
(cherry picked from commit 68fe975)

CW-Bug-Id: #24258
(cherry picked from commit de23dfc)

CW-Bug-Id: #24258
…x64.

(cherry picked from commit 390d2d2)

CW-Bug-Id: #24198
… x64.

(cherry picked from commit 15bf582)

CW-Bug-Id: #24198
…essInstrumentationCallback ).

(cherry picked from commit 20c8c55)

CW-Bug-Id: #24198
Based on Wine RB tree implementation in include/wine/rbtree.h.

(cherry picked from commit 9a9bc22)

CW-Bug-Id: #24258
Based on Wine RB tree implementation in include/wine/rbtree.h.

(cherry picked from commit 067b6a8)

CW-Bug-Id: #24258
(cherry picked from commit 6772091)

CW-Bug-Id: #24258
(cherry picked from commit 4f3c7ef)

CW-Bug-Id: #24258
(cherry picked from commit f7867d5)

CW-Bug-Id: #24258
(cherry picked from commit 30cf3c4)

CW-Bug-Id: #24258
Paul Gofman and others added 11 commits October 2, 2024 17:26
…_message().

(cherry picked from commit 99bfda5)

CW-Bug-Id: #24294
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>

Note: This commit is specifically targeted towards ValveSoftware/wine experimental_9.0 branch.
Upstream wine contains commits which already implement this, but are part of a larger series of
changes inter-twined with WoW64 and unification of GDI backends.
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>

Note: This commit is specifically targeted towards ValveSoftware/wine experimental_9.0 branch.
Upstream wine contains commits which already implement this, but are part of a larger series of
changes inter-twined with WoW64 and unification of GDI backends.
@ryzendew
Copy link

ryzendew commented Oct 17, 2024

Not sure where to Report this but doing it here Black myth wukong starts with dlss FG enabled but than if you turn it off it refuses to turn back on and says this
image

Fast edit thanks for not deleting my report unlike on that other repo ...

@shelterx
Copy link

Not sure where to Report this but doing it here Black myth wukong starts with dlss FG enabled but than if you turn it off it refuses to turn back on and says this !

For me it started with FG off and I can't turn it on, so it's basically the same thing I mentioned here. But once DLSS-FG landed I think it's better to put an issue for each game, the HAGS issue must be resolved tho' since more games might depend on it.

@shelterx
Copy link

Hmm having HAGS exposed seem to cause stutter in Cyberpunk 2077 even if FG isn't enabled.

Used by applications to query support for "Hardware Scheduling" for GPU
workloads. This is used as a proxy to determine scheduling guarantees
between userspace command submission and GPU execution.

Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>

Note: This commit is specifically targeted towards ValveSoftware/wine experimental_9.0 branch.
Upstream wine contains commits which change how this would be implemented. Notably, the changes in
`dlls/winex11.drv/x11drv_main.c` should be instead made in `dlls/win32u/d3dkmt.c`.
Plagman pushed a commit that referenced this pull request Nov 6, 2024
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>

Note: This commit is specifically targeted towards ValveSoftware/wine experimental_9.0 branch.
Upstream wine contains commits which already implement this, but are part of a larger series of
changes inter-twined with WoW64 and unification of GDI backends.

Link: #259
Plagman pushed a commit that referenced this pull request Nov 6, 2024
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>

Note: This commit is specifically targeted towards ValveSoftware/wine experimental_9.0 branch.
Upstream wine contains commits which already implement this, but are part of a larger series of
changes inter-twined with WoW64 and unification of GDI backends.

Link: #259
Plagman pushed a commit that referenced this pull request Nov 6, 2024
Used by applications to query support for "Hardware Scheduling" for GPU
workloads. This is used as a proxy to determine scheduling guarantees
between userspace command submission and GPU execution.

Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>

Note: This commit is specifically targeted towards ValveSoftware/wine experimental_9.0 branch.
Upstream wine contains commits which change how this would be implemented. Notably, the changes in
`dlls/winex11.drv/x11drv_main.c` should be instead made in `dlls/win32u/d3dkmt.c`.

Link: #259
@philipl
Copy link

philipl commented Nov 13, 2024

I don't know how useful it is to mention here, but I tried the new Proton Experimental release and while FG works well in Cyberpunk, I cannot turn it on in Everspace 2 because the game reports that HAGS is not enabled. As I understand it, this PR is present in this Proton release so it ought to work.

bylaws pushed a commit to bylaws/wine that referenced this pull request Nov 15, 2024
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>

Note: This commit is specifically targeted towards ValveSoftware/wine experimental_9.0 branch.
Upstream wine contains commits which already implement this, but are part of a larger series of
changes inter-twined with WoW64 and unification of GDI backends.

Link: ValveSoftware/wine#259
bylaws pushed a commit to bylaws/wine that referenced this pull request Nov 15, 2024
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>

Note: This commit is specifically targeted towards ValveSoftware/wine experimental_9.0 branch.
Upstream wine contains commits which already implement this, but are part of a larger series of
changes inter-twined with WoW64 and unification of GDI backends.

Link: ValveSoftware/wine#259
bylaws pushed a commit to bylaws/wine that referenced this pull request Nov 15, 2024
Used by applications to query support for "Hardware Scheduling" for GPU
workloads. This is used as a proxy to determine scheduling guarantees
between userspace command submission and GPU execution.

Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>

Note: This commit is specifically targeted towards ValveSoftware/wine experimental_9.0 branch.
Upstream wine contains commits which change how this would be implemented. Notably, the changes in
`dlls/winex11.drv/x11drv_main.c` should be instead made in `dlls/win32u/d3dkmt.c`.

Link: ValveSoftware/wine#259
Plagman pushed a commit that referenced this pull request Nov 27, 2024
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>

Note: This commit is specifically targeted towards ValveSoftware/wine experimental_9.0 branch.
Upstream wine contains commits which already implement this, but are part of a larger series of
changes inter-twined with WoW64 and unification of GDI backends.

Link: #259
Plagman pushed a commit that referenced this pull request Nov 27, 2024
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>

Note: This commit is specifically targeted towards ValveSoftware/wine experimental_9.0 branch.
Upstream wine contains commits which already implement this, but are part of a larger series of
changes inter-twined with WoW64 and unification of GDI backends.

Link: #259
Plagman pushed a commit that referenced this pull request Nov 27, 2024
Used by applications to query support for "Hardware Scheduling" for GPU
workloads. This is used as a proxy to determine scheduling guarantees
between userspace command submission and GPU execution.

Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>

Note: This commit is specifically targeted towards ValveSoftware/wine experimental_9.0 branch.
Upstream wine contains commits which change how this would be implemented. Notably, the changes in
`dlls/winex11.drv/x11drv_main.c` should be instead made in `dlls/win32u/d3dkmt.c`.

Link: #259
@philipl
Copy link

philipl commented Dec 3, 2024

I don't know how useful it is to mention here, but I tried the new Proton Experimental release and while FG works well in Cyberpunk, I cannot turn it on in Everspace 2 because the game reports that HAGS is not enabled. As I understand it, this PR is present in this Proton release so it ought to work.

For the record, this seems to be specific to multi-GPU scenarios. I have the Intel iGPU active in the system, and it seems like HAGS detection failed when I was hiding the Intel GPU from Vulkan (due to the game crashing when it was visible). The developers gave me a work around to avoid hiding it and then detection worked. I assume, in some very hand wavy way that hiding the iGPU from the game while the system is able to see it leads to some kind of mismatch in device identification when querying the device properties in this change, but I'm not in a position to say precisely what's going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants