Mesa (staging/22.1): etnaviv: don't halve max_instructions for GC400

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 3 19:54:05 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: 6195ecc599c8acd0eafb67181f57b59c93bf9b86
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6195ecc599c8acd0eafb67181f57b59c93bf9b86

Author: Kyle Russell <bkylerussell at gmail.com>
Date:   Sat May  7 17:56:09 2022 -0400

etnaviv: don't halve max_instructions for GC400

This allows glamor to successfully compile its shaders on the GC400.

When running glamor using the GC400, Xorg reports that the compiled
shaders exceed the maximum allowed instructions because the value
reported from the kernel is halved.

Xserver[314]: etna_draw_vbo:318: compiled shaders are not okay

$ cat /sys/kernel/debug/dri/128/gpu | grep instruction_count
         instruction_count: 256

However, the spec for the Unified vertex-fragment shader explicitly
lists 256 as the maximum number of instructions for each shader
("256 for vertex shaders; 256 for fragment shaders").

Signed-off-by: Kyle Russell <bkylerussell at gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>
(cherry picked from commit aa29e0d858799554396bedefbdcf64a6185d0c47)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16661>

---

 src/gallium/drivers/etnaviv/etnaviv_screen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index 3e803c8a2bd..985ff2ddf86 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -871,7 +871,7 @@ etna_get_specs(struct etna_screen *screen)
       } else {
          screen->specs.vs_offset = 0x4000;
          screen->specs.ps_offset = 0x6000;
-         screen->specs.max_instructions = instruction_count / 2;
+         screen->specs.max_instructions = instruction_count;
       }
       screen->specs.has_icache = false;
    }



More information about the mesa-commit mailing list