Update HotSort cl/vk.

NOTREECHECKS=true
NOTRY=true
NOPRESUBMIT=true
Bug: skia:
Change-Id: I19914ac9f1e97edaa4a1ca88d6121b27c3e31ad4
Reviewed-on: https://skia-review.googlesource.com/150336
Reviewed-by: Allan MacKinnon <allanmac@google.com>
Commit-Queue: Allan MacKinnon <allanmac@google.com>
Auto-Submit: Allan MacKinnon <allanmac@google.com>
diff --git a/src/compute/hs/cl/intel/gen8/u32/hs_kernels.cl b/src/compute/hs/cl/intel/gen8/u32/hs_kernels.cl
index be7cae7..cfa3e00 100644
--- a/src/compute/hs/cl/intel/gen8/u32/hs_kernels.cl
+++ b/src/compute/hs/cl/intel/gen8/u32/hs_kernels.cl
@@ -5,6 +5,10 @@
 // license that can be found in the LICENSE file.
 //
 
+// target-specific config
+#include "hs_config.h"
+
+// arch/target-specific macros
 #include "hs_cl_macros.h"
 
 //
diff --git a/src/compute/hs/cl/intel/gen8/u64/hs_kernels.cl b/src/compute/hs/cl/intel/gen8/u64/hs_kernels.cl
index 44f526c..bf6b038 100644
--- a/src/compute/hs/cl/intel/gen8/u64/hs_kernels.cl
+++ b/src/compute/hs/cl/intel/gen8/u64/hs_kernels.cl
@@ -5,6 +5,10 @@
 // license that can be found in the LICENSE file.
 //
 
+// target-specific config
+#include "hs_config.h"
+
+// arch/target-specific macros
 #include "hs_cl_macros.h"
 
 //
diff --git a/src/compute/hs/cl/intel/hs_cl_macros.h b/src/compute/hs/cl/intel/hs_cl_macros.h
index 61844c7..93170ea 100644
--- a/src/compute/hs/cl/intel/hs_cl_macros.h
+++ b/src/compute/hs/cl/intel/hs_cl_macros.h
@@ -9,12 +9,6 @@
 #define HS_CL_MACROS_ONCE
 
 //
-//
-//
-
-#include "hs_config.h"
-
-//
 // Define the type based on key and val sizes
 //
 
diff --git a/src/compute/hs/gen/target_glsl.c b/src/compute/hs/gen/target_glsl.c
index bd0a10a..b5fe0a8 100644
--- a/src/compute/hs/gen/target_glsl.c
+++ b/src/compute/hs/gen/target_glsl.c
@@ -91,11 +91,18 @@
 hsg_macros(FILE * file)
 {
   fprintf(file,
-          "#include \"hs_glsl_macros.h\" \n"
-          "    \n"
-          "//  \n"
-          "//  \n"
-          "//  \n"
+          "// target-specific config      \n"
+          "#include \"hs_config.h\"       \n"
+          "                               \n"
+          "// GLSL preamble               \n"
+          "#include \"hs_glsl_preamble.h\"\n"
+          "                               \n"
+          "// arch/target-specific macros \n"
+          "#include \"hs_glsl_macros.h\"  \n"
+          "                               \n"
+          "//                             \n"
+          "//                             \n"
+          "//                             \n"
           "\n");
 }
 
diff --git a/src/compute/hs/gen/target_opencl.c b/src/compute/hs/gen/target_opencl.c
index 5f911c6..202a242 100644
--- a/src/compute/hs/gen/target_opencl.c
+++ b/src/compute/hs/gen/target_opencl.c
@@ -86,6 +86,22 @@
           "\n");
 }
 
+static
+void
+hsg_macros(FILE * file)
+{
+  fprintf(file,
+          "// target-specific config     \n"
+          "#include \"hs_config.h\"      \n"
+          "                              \n"
+          "// arch/target-specific macros\n"
+          "#include \"hs_cl_macros.h\"   \n"
+          "                              \n"
+          "//                            \n"
+          "//                            \n"
+          "//                            \n");
+}
+
 //
 //
 //
@@ -216,12 +232,7 @@
 
         hsg_copyright(target->state->source);
 
-        fprintf(target->state->source,
-                "#include \"hs_cl_macros.h\" \n"
-                "                            \n"
-                "//                          \n"
-                "//                          \n"
-                "//                          \n");
+        hsg_macros(target->state->source);
       }
       break;
 
diff --git a/src/compute/hs/vk/hs_glsl_macros.h b/src/compute/hs/vk/hs_glsl_macros.h
index 4dc0872..abd2e94 100644
--- a/src/compute/hs/vk/hs_glsl_macros.h
+++ b/src/compute/hs/vk/hs_glsl_macros.h
@@ -9,34 +9,6 @@
 #define HS_GLSL_MACROS_ONCE
 
 //
-//
-//
-
-#include "hs_config.h"
-
-//
-//
-//
-
-#define HS_HASH                   #
-#define HS_EVAL(a)                a
-#define HS_GLSL_EXT()             HS_EVAL(HS_HASH)##extension
-#define HS_GLSL_EXT_REQUIRE(name) HS_GLSL_EXT() name : require
-#define HS_GLSL_VERSION(ver)      HS_EVAL(HS_HASH)##version ver
-
-//
-//
-//
-
-HS_GLSL_VERSION(450)
-HS_GLSL_EXT_REQUIRE(GL_KHR_shader_subgroup_basic)
-HS_GLSL_EXT_REQUIRE(GL_KHR_shader_subgroup_shuffle)
-
-#if HS_KEY_WORDS == 2
-HS_GLSL_EXT_REQUIRE(GL_ARB_gpu_shader_int64)
-#endif
-
-//
 // Define the type based on key and val sizes
 //
 
@@ -78,10 +50,10 @@
   HS_GLSL_BINDING(1) readonly  buffer Vin  { HS_KEY_TYPE vin[];  };     \
   void main()
 
-#define HS_BC_KERNEL_PROTO(slab_count,slab_count_log2)        \
-  HS_GLSL_SUBGROUP_SIZE()                                     \
-  HS_GLSL_WORKGROUP_SIZE(HS_SLAB_THREADS*slab_count,1,1);     \
-  HS_GLSL_BINDING(0) buffer Vout { HS_KEY_TYPE vout[]; };     \
+#define HS_BC_KERNEL_PROTO(slab_count,slab_count_log2)          \
+  HS_GLSL_SUBGROUP_SIZE()                                       \
+  HS_GLSL_WORKGROUP_SIZE(HS_SLAB_THREADS*slab_count,1,1);       \
+  HS_GLSL_BINDING(0) buffer Vout { HS_KEY_TYPE vout[]; };       \
   void main()
 
 #define HS_FM_KERNEL_PROTO(s,r)                                 \
diff --git a/src/compute/hs/vk/hs_glsl_preamble.h b/src/compute/hs/vk/hs_glsl_preamble.h
new file mode 100644
index 0000000..90e0891
--- /dev/null
+++ b/src/compute/hs/vk/hs_glsl_preamble.h
@@ -0,0 +1,41 @@
+//
+// Copyright 2016 Google Inc.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+//
+
+#ifndef HS_GLSL_PREAMBLE_ONCE
+#define HS_GLSL_PREAMBLE_ONCE
+
+//
+//
+//
+
+#define HS_HASH                   #
+#define HS_EVAL(a)                a
+#define HS_GLSL_EXT()             HS_EVAL(HS_HASH)##extension
+#define HS_GLSL_EXT_REQUIRE(name) HS_GLSL_EXT() name : require
+#define HS_GLSL_VERSION(ver)      HS_EVAL(HS_HASH)##version ver
+
+//
+//
+//
+
+HS_GLSL_VERSION(450)
+HS_GLSL_EXT_REQUIRE(GL_KHR_shader_subgroup_basic)
+HS_GLSL_EXT_REQUIRE(GL_KHR_shader_subgroup_shuffle)
+
+#if HS_KEY_WORDS == 2
+HS_GLSL_EXT_REQUIRE(GL_ARB_gpu_shader_int64)
+#endif
+
+//
+//
+//
+
+#endif
+
+//
+//
+//
diff --git a/src/compute/hs/vk/intel/gen8/u32/make_all.bat b/src/compute/hs/vk/intel/gen8/u32/make_all.bat
index ff67bde..b18af05 100644
--- a/src/compute/hs/vk/intel/gen8/u32/make_all.bat
+++ b/src/compute/hs/vk/intel/gen8/u32/make_all.bat
@@ -51,7 +51,7 @@
 for %%f in (*.comp) do (
     dos2unix %%f
     clang-format -style=Mozilla -i %%f                                   || goto :error
-    cl -I ../.. -EP %%f -P -Fi%%~nf.pre.comp                             || goto :error
+    cl -I ../.. -I ../../.. -EP %%f -P -Fi%%~nf.pre.comp                 || goto :error
     clang-format -style=Mozilla -i %%~nf.pre.comp                        || goto :error
     glslangValidator --target-env vulkan1.1 -o %%~nf.spv %%~nf.pre.comp  || goto :error
     spirv-opt -O %%~nf.spv -o %%~nf.spv                                  || goto :error
@@ -67,7 +67,7 @@
 :: dump a binary
 ::
 
-cl -I ../../../../.. -I ../../.. /DHS_DUMP /Fe:hs_dump.exe *.c
+cl -I ../../.. -I ../../../../.. /DHS_DUMP /Fe:hs_dump.exe *.c
 hs_dump
 
 ::
diff --git a/src/compute/hs/vk/intel/gen8/u64/make_all.bat b/src/compute/hs/vk/intel/gen8/u64/make_all.bat
index b3f038f..2bd0b6f 100644
--- a/src/compute/hs/vk/intel/gen8/u64/make_all.bat
+++ b/src/compute/hs/vk/intel/gen8/u64/make_all.bat
@@ -48,7 +48,7 @@
 for %%f in (*.comp) do (
     dos2unix %%f
     clang-format -style=Mozilla -i %%f                                   || goto :error
-    cl -I ../.. -EP %%f -P -Fi%%~nf.pre.comp                             || goto :error
+    cl -I ../.. -I ../../.. -EP %%f -P -Fi%%~nf.pre.comp                 || goto :error
     clang-format -style=Mozilla -i %%~nf.pre.comp                        || goto :error
     glslangValidator --target-env vulkan1.1 -o %%~nf.spv %%~nf.pre.comp  || goto :error
     spirv-opt -O %%~nf.spv -o %%~nf.spv                                  || goto :error
@@ -64,7 +64,7 @@
 :: dump a binary
 ::
 
-cl -I ../../../../.. -I ../../.. /DHS_DUMP /Fe:hs_dump.exe *.c
+cl -I ../../.. -I ../../../../.. /DHS_DUMP /Fe:hs_dump.exe *.c
 hs_dump
 
 ::
diff --git a/src/compute/hs/vk/intel/hs_glsl_macros.h b/src/compute/hs/vk/intel/hs_glsl_macros.h
index b5498b7..c9022c6 100644
--- a/src/compute/hs/vk/intel/hs_glsl_macros.h
+++ b/src/compute/hs/vk/intel/hs_glsl_macros.h
@@ -12,7 +12,6 @@
 //
 //
 
-#include "hs_config.h"
 #include "../hs_glsl_macros.h"
 
 //
diff --git a/src/compute/hs/vk/nvidia/hs_glsl_macros.h b/src/compute/hs/vk/nvidia/hs_glsl_macros.h
index a4d47ec..d0a3cf2 100644
--- a/src/compute/hs/vk/nvidia/hs_glsl_macros.h
+++ b/src/compute/hs/vk/nvidia/hs_glsl_macros.h
@@ -12,7 +12,6 @@
 //
 //
 
-#include "hs_config.h"
 #include "../hs_glsl_macros.h"
 
 //
diff --git a/src/compute/hs/vk/nvidia/sm_35/u32/make_all.bat b/src/compute/hs/vk/nvidia/sm_35/u32/make_all.bat
index 6647163..1711981 100644
--- a/src/compute/hs/vk/nvidia/sm_35/u32/make_all.bat
+++ b/src/compute/hs/vk/nvidia/sm_35/u32/make_all.bat
@@ -40,7 +40,7 @@
 for %%f in (*.comp) do (
     dos2unix %%f
     clang-format -style=Mozilla -i %%f                                   || goto :error
-    cl -I ../.. -EP %%f -P -Fi%%~nf.pre.comp                             || goto :error
+    cl -I ../.. -I ../../.. -EP %%f -P -Fi%%~nf.pre.comp                 || goto :error
     clang-format -style=Mozilla -i %%~nf.pre.comp                        || goto :error
     glslangValidator --target-env vulkan1.1 -o %%~nf.spv %%~nf.pre.comp  || goto :error
     spirv-opt -O %%~nf.spv -o %%~nf.spv                                  || goto :error
@@ -56,7 +56,7 @@
 :: dump a binary
 ::
 
-cl -I ../../../../.. -I ../../.. /DHS_DUMP /Fe:hs_dump.exe *.c
+cl -I ../../.. -I ../../../../.. /DHS_DUMP /Fe:hs_dump.exe *.c
 hs_dump
 
 ::
diff --git a/src/compute/hs/vk/nvidia/sm_35/u64/make_all.bat b/src/compute/hs/vk/nvidia/sm_35/u64/make_all.bat
index ba92751..88eb6b7 100644
--- a/src/compute/hs/vk/nvidia/sm_35/u64/make_all.bat
+++ b/src/compute/hs/vk/nvidia/sm_35/u64/make_all.bat
@@ -40,7 +40,7 @@
 for %%f in (*.comp) do (
     dos2unix %%f
     clang-format -style=Mozilla -i %%f                                   || goto :error
-    cl -I ../.. -EP %%f -P -Fi%%~nf.pre.comp                             || goto :error
+    cl -I ../.. -I ../../.. -EP %%f -P -Fi%%~nf.pre.comp                 || goto :error
     clang-format -style=Mozilla -i %%~nf.pre.comp                        || goto :error
     glslangValidator --target-env vulkan1.1 -o %%~nf.spv %%~nf.pre.comp  || goto :error
     spirv-opt -O %%~nf.spv -o %%~nf.spv                                  || goto :error
@@ -56,7 +56,7 @@
 :: dump a binary
 ::
 
-cl -I ../../../../.. -I ../../.. /DHS_DUMP /Fe:hs_dump.exe *.c
+cl -I ../../.. -I ../../../../.. /DHS_DUMP /Fe:hs_dump.exe *.c
 hs_dump
 
 ::
diff --git a/src/compute/skc/main.c b/src/compute/skc/main.c
index 2af8ebb..f791c57 100644
--- a/src/compute/skc/main.c
+++ b/src/compute/skc/main.c
@@ -19,7 +19,7 @@
 
 #include "svg/svg_doc.h"
 #include "svg2skc/svg2skc.h"
-#include "svg2skc/transform_stack.h"
+#include "ts/transform_stack.h"
 
 //
 //
diff --git a/src/compute/skc/platforms/cl_12/interop/interop_glfw.c b/src/compute/skc/platforms/cl_12/interop/interop_glfw.c
index f3c11ee..1e81f2c 100644
--- a/src/compute/skc/platforms/cl_12/interop/interop_glfw.c
+++ b/src/compute/skc/platforms/cl_12/interop/interop_glfw.c
@@ -45,7 +45,7 @@
 //
 //
 
-#include "svg2skc/transform_stack.h"
+#include "ts/transform_stack.h"
 
 //
 //
diff --git a/src/compute/skc/platforms/cl_12/kernels/render.cl b/src/compute/skc/platforms/cl_12/kernels/render.cl
index a7b3229..9f9530d 100644
--- a/src/compute/skc/platforms/cl_12/kernels/render.cl
+++ b/src/compute/skc/platforms/cl_12/kernels/render.cl
@@ -2113,11 +2113,11 @@
                 break;
 
               case SKC_STYLING_OPCODE_COVER_WIP_MOVE_TO_MASK:
-                // skc_tile_cover_msk_copy_wip(&cover_msk,&cover_wip);
+                skc_tile_cover_msk_copy_wip(&cover_msk,&cover_wip);
                 break;
 
               case SKC_STYLING_OPCODE_COVER_ACC_MOVE_TO_MASK:
-                // skc_tile_cover_msk_copy_acc(&cover_msk,&cover_acc);
+                skc_tile_cover_msk_copy_acc(&cover_msk,&cover_acc);
                 break;
 
               case SKC_STYLING_OPCODE_BACKGROUND_OVER:
diff --git a/src/compute/skc/platforms/cl_12/kernels/segment_ttck.cl b/src/compute/skc/platforms/cl_12/kernels/segment_ttck.cl
index a6a2df6..2373e1c 100644
--- a/src/compute/skc/platforms/cl_12/kernels/segment_ttck.cl
+++ b/src/compute/skc/platforms/cl_12/kernels/segment_ttck.cl
@@ -15,7 +15,8 @@
 #include "tile.h"
 #include "atomic_cl.h"
 #include "kernel_cl_12.h"
-#include "hs/cl/intel/gen8/u64/hs_cl_macros.h"
+#include "hs/cl/intel/gen8/u64/hs_config.h"
+#include "hs/cl/intel/hs_cl_macros.h"
 
 //
 //
diff --git a/src/compute/skc/platforms/cl_12/kernels/segment_ttrk.cl b/src/compute/skc/platforms/cl_12/kernels/segment_ttrk.cl
index c4ace0b..f631268 100644
--- a/src/compute/skc/platforms/cl_12/kernels/segment_ttrk.cl
+++ b/src/compute/skc/platforms/cl_12/kernels/segment_ttrk.cl
@@ -15,7 +15,8 @@
 #include "tile.h"
 #include "kernel_cl_12.h"
 #include "raster_builder_cl_12.h" // need meta_in structure
-#include "hs/cl/intel/gen8/u64/hs_cl_macros.h"
+#include "hs/cl/intel/gen8/u64/hs_config.h"
+#include "hs/cl/intel/hs_cl_macros.h"
 
 //
 //