[Mesa-dev] [PATCH shader-db 1/2] run: Add compute shader support.

Kenneth Graunke kenneth at whitecape.org
Thu Jan 7 22:21:30 PST 2016


---
 run.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/run.c b/run.c
index 82d8c91..a91b18d 100644
--- a/run.c
+++ b/run.c
@@ -84,6 +84,7 @@ get_shaders(const struct context_info *core, const struct context_info *compat,
     static const char *vs = "vertex ";
     static const char *tcs = "tessellation control shader]\n";
     static const char *tes = "tessellation evaluation shader]\n";
+    static const char *cs = "compute shader]\n";
     static const char *shder = "shader]\n";
     static const char *program = "program]\n";
     static const char *test = "test]\n";
@@ -181,6 +182,10 @@ get_shaders(const struct context_info *core, const struct context_info *compat,
             text += strlen(tes);
             shader[i].type = GL_TESS_EVALUATION_SHADER;
             shader[i].text = text;
+        } else if (memcmp(text, cs, strlen(cs)) == 0) {
+            text += strlen(cs);
+            shader[i].type = GL_COMPUTE_SHADER;
+            shader[i].text = text;
         } else if (memcmp(text, test, strlen(test)) == 0) {
             shader[i - 1].length = save_text + 1 - shader[i - 1].text;
             goto out;
-- 
2.7.0



More information about the mesa-dev mailing list