Skip to content

[d3d11] Fix missing argument reference#4627

Merged
doitsujin merged 1 commit intodoitsujin:masterfrom
ventureoo:fix-missed-reference
Jan 20, 2025
Merged

[d3d11] Fix missing argument reference#4627
doitsujin merged 1 commit intodoitsujin:masterfrom
ventureoo:fix-missed-reference

Conversation

@ventureoo
Copy link
Copy Markdown
Contributor

@ventureoo ventureoo commented Jan 20, 2025

I don't know if passing by value was intentional, but it seems to cause stack alignment issues when building DXVK with AVX2 and along with glibc assertions (_GLIBCXX_ASSERTIONS) enabled. DXVK crash is reproduced in game 20 Minute Till Dawn under the above conditions. GDB backtrace showed the following:

Thread 57 "UnityGfxDeviceWorker" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 528]
0x00006fffd95503ab in dxvk::CheckViewOverlap<dxvk::D3D11ShaderResourceView, dxvk::D3D11DepthStencilView> (a=0x66784000, b=0x72d2d0)
    at ../../dxvk/src/d3d11/d3d11_view.h:78
78	    return a && b && CheckViewOverlap(a->GetViewInfo(), b->GetViewInfo());

The crash issue is fixed when function takes both arguments by reference.

Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
@doitsujin
Copy link
Copy Markdown
Owner

Nice find.

@doitsujin doitsujin merged commit 6851264 into doitsujin:master Jan 20, 2025
@ventureoo ventureoo deleted the fix-missed-reference branch January 21, 2025 20:59
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.

3 participants