diff --git a/run.c b/run.c
index a91a8af3ae0013423f324a6216d0ed82f348265a..4b82a3b19d2b909819bc653696e6357f5c01d498 100644
--- a/run.c
+++ b/run.c
@@ -739,6 +739,7 @@ main(int argc, char **argv)
 
         #pragma omp for schedule(dynamic)
         for (int i = 0; i < shader_test_length; i++) {
+            bool retry_ES = false;
             current_shader_name = shader_test[i].filename;
             current_shader_names[omp_get_thread_num()] = current_shader_name;
 
@@ -773,6 +774,7 @@ main(int argc, char **argv)
                 continue;
             }
 
+retry:
             if (current_type != type) {
                 EGLContext ctx;
 
@@ -835,6 +837,13 @@ main(int argc, char **argv)
                         else
                             glGetShaderInfoLog(s, 4096, &length, log);
 
+                        if (!retry_ES) {
+                            if (type == TYPE_CORE || type == TYPE_COMPAT) {
+                                retry_ES = true;
+                                type = TYPE_ES;
+                                goto retry;
+                            }
+                        }
                         fprintf(stderr, "ERROR: %s failed to compile:\n%s\n",
                                 current_shader_name, log);
                     }