[Bug 93178] Textures are filled with garbage

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jan 25 17:27:55 PST 2016


https://bugs.freedesktop.org/show_bug.cgi?id=93178

Nicolai Hähnle <nhaehnle at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |NOTOURBUG
             Status|NEW                         |RESOLVED

--- Comment #5 from Nicolai Hähnle <nhaehnle at gmail.com> ---
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 ----
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20160126/8e0f24c1/attachment.html>


More information about the dri-devel mailing list