Textures are filled with garbage
https://bugs.freedesktop.org/show_bug.cgi?id=93178
Bug ID: 93178
Summary: Textures are filled with garbage
Product: Mesa
Version: git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/radeonsi
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Created attachment 120218
--> https://bugs.freedesktop.org/attachment.cgi?id=120218&action=edit
Frame 1 rendered on Radeonsi
The following apitrace renders garbage (see the attached screenshot) when replayed on radeonsi. The same apitrace is rendered correctly on nouveau and nvidia. The cause of the problem seems to be textures filled with garbage.
apitrace: https://drive.google.com/file/d/0Bz0HXJUyjAh3Z0Z2SW9tNUJ3bXM/view
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD CAPE VERDE (DRM 2.43.0, LLVM 3.8.0) OpenGL core profile version string: 4.1 (Core Profile) Mesa 11.2.0-devel (git-2571a76)
OpenGL core profile shading language version string: 4.10
OpenGL core profile context flags: (none)
AMD Radeon R9 M375
04:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Venus XTX [Radeon HD 8890M / R9 M275X/M375X] (rev ff)
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=93178
Ilia Mirkin <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #120218|text/plain |image/png
mime type| |Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=93178
--- Comment #1 from Józef Kucia <[email protected]> --- Created attachment 120219
--> https://bugs.freedesktop.org/attachment.cgi?id=120219&action=edit
The expected image to be rendered for frame 1 in the attached apitrace
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=93178
--- Comment #2 from Michel Dänzer <[email protected]> --- Replaying the trace on radeonsi generates lots of GL API errors:
Mesa: User error: GL_INVALID_FRAMEBUFFER_OPERATION in glClear(incomplete framebuffer)
Mesa: User error: GL_INVALID_FRAMEBUFFER_OPERATION in glDrawArrays(incomplete framebuffer)
Mesa: 1 similar GL_INVALID_FRAMEBUFFER_OPERATION errors
(repeated several times)
Mesa: User error: GL_INVALID_ENUM in glRenderbufferStorage(internalFormat=GL_SLUMINANCE8)
Mesa: User error: GL_INVALID_ENUM in glRenderbufferStorage(internalFormat=GL_SLUMINANCE8_ALPHA8)
(the first three lines repeated several times again)
I think those errors could explain the incorrect rendering. Which driver was the apitrace captured with? Does the same problem occur when running the application with radeonsi directly?
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=93178
--- Comment #3 from Józef Kucia <[email protected]> --- (In reply to Michel Dänzer from comment #2)
Quoted 5 lines
Replaying the trace on radeonsi generates lots of GL API errors:
I think those errors could explain the incorrect rendering. Which driver was the apitrace captured with? Does the same problem occur when running the application with radeonsi directly?
The GL errors should not be related. Those are generated by format support detection code.
This particular apitrace was captured with nouveau. The application generates different GL errors in this part of code when run with radeonsi. However, it exhibits exactly the same problem when run directly. I'll upload another apitrace later.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=93178
--- Comment #4 from Józef Kucia <[email protected]> ---
https://drive.google.com/file/d/0Bz0HXJUyjAh3ZkFEOHdNVnAyWWM/view
This apitrace was captured with radeonsi. It is not trimmed. The problem appears at 935th frame. The previous frames are rendered correctly.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=93178
Józef Kucia <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Hardware|Other |x86-64 (AMD64)
OS|All |Linux (All)Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=93178
Nicolai H�hnle <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |NOTOURBUG
Status|NEW |RESOLVED--- Comment #5 from Nicolai H�hnle <[email protected]> --- This is a game bug.
The game tries to be clever by uploading some of its textures from a different OpenGL context, but never uses any kind of synchronization between the texture upload and the main context, so the texture upload never actually happens. This is a serious programming mistake, and it is merely by chance that this works on other drivers.
For your own purposes, you can work around the game bug in the driver by applying the following patch:
---- SNIP ----
src/gallium/drivers/radeon/r600_texture.c +0 -0
@@ -105,6 +105,7 @@ static void r600_copy_from_staging_texture(struct
pipe_context *ctx, struct r600
rctx->dma_copy(ctx, dst, transfer->level,
transfer->box.x, transfer->box.y, transfer->box.z,
src, 0, &sbox);+ rctx->b.flush(&rctx->b, NULL, 0);
}
static unsigned r600_texture_get_offset(struct r600_texture *rtex, unsigned
level,
---- SNIP ----
However, doing this seriously hurts the performance of games that are programmed properly. I encourage you to forward this message to the developers, telling them they should take a look at Section 5.3.1 of the OpenGL 4.5 (Compatibility Profile) specification, specifically the part about using Finish or FenceSync/WaitSync.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=93178
J�zef Kucia <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--- Comment #6 from J�zef Kucia <[email protected]> --- (In reply to Nicolai H�hnle from comment #5)
Quoted 1 line
This is a game bug.
Thanks for debugging this. I am sorry for reporting invalid bug. This is actually a bug in Wine. For now the workaround is to enable StrictDrawOrdering. I will do more investigation before reporting a bug next time.
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