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

Author: Caio Oliveira <[email protected]>
Date:   Thu Feb 23 19:40:47 2023 -0800

spirv/tests: Parametrize stage in get_nir() helper

Reviewed-by: Jesse Natalie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21512>

---

 src/compiler/spirv/tests/helpers.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compiler/spirv/tests/helpers.h 
b/src/compiler/spirv/tests/helpers.h
index 23396467881..c2082ddd74b 100644
--- a/src/compiler/spirv/tests/helpers.h
+++ b/src/compiler/spirv/tests/helpers.h
@@ -41,7 +41,7 @@ protected:
       glsl_type_singleton_decref();
    }
 
-   void get_nir(size_t num_words, const uint32_t *words)
+   void get_nir(size_t num_words, const uint32_t *words, gl_shader_stage stage 
= MESA_SHADER_COMPUTE)
    {
       spirv_to_nir_options spirv_options;
       memset(&spirv_options, 0, sizeof(spirv_options));
@@ -60,7 +60,7 @@ protected:
       nir_options.use_scoped_barrier = true;
 
       shader = spirv_to_nir(words, num_words, NULL, 0,
-                            MESA_SHADER_COMPUTE, "main", &spirv_options, 
&nir_options);
+                            stage, "main", &spirv_options, &nir_options);
    }
 
    nir_intrinsic_instr *find_intrinsic(nir_intrinsic_op op, unsigned index=0)

Reply via email to