Module: Mesa
Branch: main
Commit: 86d32eed38c62db2d73b0495eff5ca115a06d485
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=86d32eed38c62db2d73b0495eff5ca115a06d485

Author: Alyssa Rosenzweig <[email protected]>
Date:   Mon Apr 25 16:29:15 2022 -0400

panvk: Allocate stack for each thread

Rather than a single stack for all threads to share -- that can't work! :-) We
use the same helper that the GLES driver does. Fixes anything using scratch or
spilling, including:

dEQP-VK.glsl.indexing.varying_array.vec3_static_write_dynamic_read

Signed-off-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16283>

---

 src/panfrost/ci/deqp-panfrost-g52-vk.toml | 1 +
 src/panfrost/vulkan/panvk_vX_cmd_buffer.c | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/panfrost/ci/deqp-panfrost-g52-vk.toml 
b/src/panfrost/ci/deqp-panfrost-g52-vk.toml
index 54b60d7725c..c2220874daf 100644
--- a/src/panfrost/ci/deqp-panfrost-g52-vk.toml
+++ b/src/panfrost/ci/deqp-panfrost-g52-vk.toml
@@ -17,6 +17,7 @@ include = [
     "dEQP-VK.glsl.builtin.precision.frexp.*",
     "dEQP-VK.glsl.builtin.precision.ldexp.*",
     "dEQP-VK.glsl.builtin_var.*",
+    "dEQP-VK.glsl.indexing.varying_array.*",
     "dEQP-VK.glsl.conversions.*",
     "dEQP-VK.glsl.derivate.*.constant.*",
     "dEQP-VK.glsl.derivate.*.linear.*",
diff --git a/src/panfrost/vulkan/panvk_vX_cmd_buffer.c 
b/src/panfrost/vulkan/panvk_vX_cmd_buffer.c
index e9b36902f3c..0a613738d0c 100644
--- a/src/panfrost/vulkan/panvk_vX_cmd_buffer.c
+++ b/src/panfrost/vulkan/panvk_vX_cmd_buffer.c
@@ -165,8 +165,11 @@ panvk_per_arch(cmd_close_batch)(struct panvk_cmd_buffer 
*cmdbuf)
    }
 
    if (batch->tlsinfo.tls.size) {
+      unsigned size = panfrost_get_total_stack_size(batch->tlsinfo.tls.size,
+                                                    pdev->thread_tls_alloc,
+                                                    pdev->core_count);
       batch->tlsinfo.tls.ptr =
-         pan_pool_alloc_aligned(&cmdbuf->tls_pool.base, 
batch->tlsinfo.tls.size, 4096).gpu;
+         pan_pool_alloc_aligned(&cmdbuf->tls_pool.base, size, 4096).gpu;
    }
 
    if (batch->tlsinfo.wls.size) {

Reply via email to