cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

OpenGL ARB_sparse_texture (Driver crash, texture issues)

Currently we (PCSX2 Team) are trying to implement Sparse Texture support and seem to have stumbled on to several issues on AMD cards which are not present at all on Nvidia (tested by several people).

Major issue: Garbage textures on amd cards whenever sparse is enabled.
Major issue: As of 19.3.1 enabling Sparse also causes a driver crash on amd cards, this wasn't an issue on the previous driver 19.2.3 where it just caused garbage textures, driver 19.2.1 or 19.2.2 just caused an entire black screen window. So far 19.2.3 seems to behave the best out of the bunch that were tested.

Small issue: Gregory (pr author) read the sparse spec on amd and it looks like sparse depth isn't actually supported, Gregory said that driver reports a compatible sparse format for depth texture but it isn't attachable to a frame buffer. Link to detection here.

Here is our current progress, this is the commit and pr that added sparse detection only
Greg/gsdx gl by gregory38 · Pull Request #2837 · PCSX2/pcsx2 · GitHub 

And this is the current active PR where we are implementing the feature
Greg/gsdx sparse by gregory38 · Pull Request #2843 · PCSX2/pcsx2 · GitHub 

Specs: GPU: R7 360, CPU i3 4160, RAM 16GB, OS Win7 64bit

Testcase Download (file was too large to attach so uploaded on Google Drive instead).

https://drive.google.com/open?id=122GiNDpb3cG0OZtiEoeI6aPcfoDyr4Y_ 

GSDumpGui instructions: Directories should be where the extracted files are located. Sparse texture is enabled in the testcase, OGL HW should be selected before running.

15 Replies
dorisyan
Staff

Hi lightningterror‌, Thanks for your report, we will investigate this issue as soon as possible.

0 Likes
dorisyan
Staff

Hi lightningterror‌, This bug has been fixed, and the change will be released in the next driver. Thanks!

Driver release 19.6.1, issues still persist.

dorisyan
Staff

Hi lightningterror‌, this fix was not released in 19.6.1, if all the things go well, it should be released soon. Thanks for your patience!

Hello dorisyan‌ the situation has improved on driver 19.7.1 but there are still some major issues remaining.
Here's what's been fixed: Driver crash and graphical corruption when using sparse color texture, opengl no longer throws fatal error messages when using sparse depth texture.

Here are the remaining major issues:

Major issue: Memory leak or a similar issue when using sparse color texture. Monitoring gpuz doesn't show any abnormal/high vram usage however our plugin reports that it's running out of memory which is odd and eventually leading in to a crash, we noticed the same on previous driver releases but we thought it was the same problem related with the previous fixed issues.

Major issue: Graphical corruptions and driver crash when using/enabling sparse depth texture.

Here is the Sparse detection code if it can help. Sparse depth texture can be enabled by removing !vendor_id_amd from the function.

Here is a new testcase containing 3 dumps and 2 dlls/plugins. Each dump can be tested with either dll/plugin. The difference between the two dlls is one has sparse depth texture disabled while the other does not, also both plugins have sparse color texture enabled. OGL HW should be selected before running the dumps.

https://drive.google.com/open?id=1t6UnpKN5IuXlHd48HOqXitnX9XYYU1qo 

Hi lightningterror‌, AMD's HW doesn't support stencil for sparse textures, you can try to use sparse depth texture instead of sparse depth-stencil texture.

I'm looking forward to your feedback.

0 Likes

In the future we may make the changes since it's an experimental feature for us but shouldn't there be some kind of fallback driver side when select features aren't supported instead of causing driver crashes?

Thanks for looking in to it btw.

0 Likes

Hi lightningterror‌, I have fixed this crash, but our HW can't read PRT's stencil data, so the texture is black now, you can delete this PRT's stencil data to avoid this HW limitation.

Now your app works well on my computer(image below). No crash.

This change may be released in the next driver.

Thanks for your report.PRT.png

Nice work, even if hw doesn't supported it is nice that at least it doesn't cause a driver crash anymore.

19.8.2, crash issue still present.

Maybe they didn't port my change into the latest released driver, I need to have a check.

0 Likes

I just found this change was not in 19.8.2, that should be released in the next version.

0 Likes

I just tested 19.9.3 and the issue persists.

dorisyan
Staff

OK, I will investigate it soon. Thanks for your feedback!

0 Likes
dorisyan
Staff

OK lightningterror, I think this is a good suggestion, I will fix it.

0 Likes