nvc0: reduce likelihood of collision for real buffers on Kepler
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 22 Feb 2016 20:44:25 +0000 (21:44 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 1 Apr 2016 20:26:24 +0000 (22:26 +0200)
Reduce likelihood of collision with real buffers by placing the
hole at the top of the 4G area. This fixes some indirect draw+compute
tests with large buffers.

Suggested by Ilia Mirkin.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nvc0/nve4_compute.c

index b1450f80023ce93f0969ed74965d0c2aab475679..04ede3e51e1f171f2097d0bb88379f7ed3e6fc3b 100644 (file)
@@ -96,9 +96,9 @@ nve4_screen_compute_setup(struct nvc0_screen *screen,
     *  accessible. We cannot prevent that at the moment, so expect failure.
     */
    BEGIN_NVC0(push, NVE4_CP(LOCAL_BASE), 1);
-   PUSH_DATA (push, 1 << 24);
+   PUSH_DATA (push, 0xff << 24);
    BEGIN_NVC0(push, NVE4_CP(SHARED_BASE), 1);
-   PUSH_DATA (push, 2 << 24);
+   PUSH_DATA (push, 0xfe << 24);
 
    BEGIN_NVC0(push, NVE4_CP(CODE_ADDRESS_HIGH), 2);
    PUSH_DATAh(push, screen->text->offset);