HyperZ related rendering issue in ARK: Survival Evolved
https://bugs.freedesktop.org/show_bug.cgi?id=102955
Bug ID: 102955
Summary: HyperZ related rendering issue in ARK: Survival
Evolved
Product: Mesa
Version: git
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/radeonsi
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Created attachment 134449
--> https://bugs.freedesktop.org/attachment.cgi?id=134449&action=edit
The back buffer of apitrace frame 1017, showing red lines along what looks like primitive edges.
Hi,
I've been poking "ARK: Survival Evolved", trying to get it playable. The game is notoriously buggy, particularly under Linux, however the biggest issue I've had seems to be a Mesa/Radeon bug.
Blocky "pixelated" lines are drawn across what look like edges (see attached). These lines are most frequently red, black or cyan in colour, and seem to disappear when the scene complexity is lower (like when looking at the floor or an area with no foliage or rocks).
Setting R600_DEBUG=nohyperz resolves the issue.
I've tested an apitrace of the game on both Mesa git, and 17.2.1 on a desktop with a POLARIS10 (RX580 8GiB), running the latest amd-staging-drm-next kernel, and on a laptop with both Intel integrated graphics and a HAINAN (Sun XT? 8670M), running a stock Archlinux kernel.
Both AMD cards have this rendering issue with HyperZ enabled. The Intel card renders without this particular problem (if slowly), and llvmpipe (eventually) renders without issue too.
Apitrace (~600MiB!):
https://drive.google.com/open?id=0B6RX1ZACoaJ5UmhDWDM3ZC03eUk
Desktop:
Linux 4.13.0-rc5-43dd6fde5df4 #3 SMP PREEMPT Thu Sep 21 19:15:33 BST 2017 x86_64 GNU/Linux
Mesa 17.3.0-devel (git hash #52ed3bca91ff13217378196d6800ca7113641a63) libdrm 2.4.83, LLVM 5.0.0
Laptop:
Linux 4.12.13-1-ARCH #1 SMP PREEMPT Fri Sep 15 06:36:43 UTC 2017 x86_64 GNU/Linux
Mesa 1.7.12,
libdrm 2.4.83, LLVM 5.0.0
The corruption does look somewhat like that of this bug, but applied to terrain as well. https://bugs.freedesktop.org/show_bug.cgi?id=74784
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102955
--- Comment #1 from Elliot Thomas <[email protected]> --- Created attachment 134450
--> https://bugs.freedesktop.org/attachment.cgi?id=134450&action=edit
glxinfo.log
Oh, should have probably mentioned X versions and such.
* Xorg 1.19.3
* xf86-video-amdgpu 1.4.0
Added glxinfo output.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102955
Christian Lanig <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #2 from Christian Lanig <[email protected]> --- I confirm this issue and that R600_DEBUG=nohyperz does fix it.
Thanks to Elliot Thomas for finding a temporary solution.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102955
--- Comment #3 from Marek Olšák <[email protected]> --- Workaround:
(quoted diff) +0 -0
b/src/gallium/drivers/radeonsi/si_blit.c
index 67972a2..dc71742 100644
src/gallium/drivers/radeonsi/si_blit.c +0 -0
@@ -903,6 +903,14 @@ static void si_clear(struct pipe_context *ctx, unsigned
buffers,
sctx->db_stencil_clear = true;
si_mark_atom_dirty(sctx, &sctx->db_render_state);
}
+
+ /* TODO: Find out what's wrong here. Fast depth clear with
+ * a dirty DB cache causes corruption in ARK: Survival Evolved.
+ * https://bugs.freedesktop.org/show_bug.cgi?id=102955
+ *
+ * This hack massively decreases back-to-back ClearDepth
performance.
+ */
+ sctx->b.flags |= SI_CONTEXT_FLUSH_AND_INV_DB;
}
si_blitter_begin(ctx, SI_CLEAR);Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102955
--- Comment #4 from Elliot Thomas <[email protected]> --- I can confirm Marek's workaround works.
For what it's worth, I couldn't really measure a difference in performance between the explicit DB flush/invalidation patch and using R600_DEBUG=nohyperz.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102955
Samuel Pitoiset <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED--- Comment #5 from Samuel Pitoiset <[email protected]> --- Should be "fixed" with c4d1a199f8379b3982a53fb18fe2b50fafd682df.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102955
Elliot Thomas <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |---
Status|RESOLVED |REOPENED--- Comment #6 from Elliot Thomas <[email protected]> --- The DB metadata flush workaround is broken as of mesa git 69ccb9dae7616038dd54d3833da9e7c68e28067d, "radeonsi: use new VS blit shaders (VS inputs in SGPRs)".
The R600_DEBUG=nohyperz workaround still works.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102955
Samuel Pitoiset <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED--- Comment #7 from Samuel Pitoiset <[email protected]> --- Should be fixed with dd79aa4ad30df205076be25f6bbf42768abea20a.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102955
[email protected] changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |------ Comment #8 from [email protected] --- Broken again in at latest 19.1.2.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102955
GitLab Migration User <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |MOVED
Status|REOPENED |RESOLVED--- Comment #9 from GitLab Migration User <[email protected]> --- -- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1283.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel