Mesa (master): nvc0: avoid tex read fault from compute shaders on GK110

Samuel Pitoiset hakzsam at kemper.freedesktop.org
Wed Apr 20 16:29:31 UTC 2016


Module: Mesa
Branch: master
Commit: 7143068296aaca8c5af3469c013a7c2a850aee84
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7143068296aaca8c5af3469c013a7c2a850aee84

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Sun Apr 10 22:08:34 2016 +0200

nvc0: avoid tex read fault from compute shaders on GK110

After some investigation, it seems like that disabling the UNK02C4
command avoid a read fault with texelFetch() from a compute shader.

I have no clue on what this method actually does, but this avoid the
GPU to hang with basic-texelFetch.shader_test without introducing any
compute-related regressions.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Acked-by: Ilia Mirkin <imirkin at alum.mit.edu>

---

 src/gallium/drivers/nouveau/nvc0/nve4_compute.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
index 3d01909..3d5f84d 100644
--- a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
+++ b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
@@ -134,8 +134,11 @@ nve4_screen_compute_setup(struct nvc0_screen *screen,
    BEGIN_NVC0(push, NVE4_CP(TEX_CB_INDEX), 1);
    PUSH_DATA (push, 7); /* does not interfere with 3D */
 
+   /* Disabling this UNK command avoid a read fault when using texelFetch()
+    * from a compute shader for weird reasons.
    if (obj_class == NVF0_COMPUTE_CLASS)
       IMMED_NVC0(push, SUBC_CP(0x02c4), 1);
+   */
 
    address = screen->uniform_bo->offset + NVC0_CB_AUX_INFO(5);
 




More information about the mesa-commit mailing list