PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.65k stars 1.61k forks source link

[BUG]: Burnout 3 Takedown - DX11 Crash #11749

Closed lightningterror closed 1 week ago

lightningterror commented 1 month ago

Describe the Bug

DX11 crashes running the provided dump. Regression from https://github.com/PCSX2/pcsx2/pull/8015

Reproduction Steps

Run the dump on DX11 hw renderer.

Expected Behavior

Not to crash.

PCSX2 Revision

v2.1.109

Operating System

Windows 11

If Linux - Specify Distro

No response

Logs & Dumps

Dump, rename to .xz: Burnout3-_Takedown__Demo_PAL-ESLED-52597.gs.zip

Address sanitizer dump: message.txt

lightningterror commented 3 weeks ago

So fobes found out the issue is in our pitch calculation here: https://github.com/PCSX2/pcsx2/blob/8d3f4fac238faa275a70fcbf1bfa8e13c5f8d1a6/pcsx2/GS/Renderers/HW/GSTextureCache.cpp#L6020

The reason it crashes is because dx11 doesn't support texture mapping, the other renderers use their own pitch when doing the mapping circumventing the issue, whereas dx11 uses the tc one.

dx11.3 does support texture mapping and can be added but that's still circumventing the underlying issue in the tc. Real solution is to fix it properly so it doesn't crash.