intel: implement intelCmd*Query()
diff --git a/icd/intel/cmd_pipeline.c b/icd/intel/cmd_pipeline.c
index 37395ad..99489b2 100644
--- a/icd/intel/cmd_pipeline.c
+++ b/icd/intel/cmd_pipeline.c
@@ -1205,6 +1205,18 @@
     gen6_PIPE_CONTROL(cmd, pipe_control_dw0, NULL, 0);
 }
 
+void cmd_batch_depth_count(struct intel_cmd *cmd,
+                           struct intel_bo *bo,
+                           XGL_GPU_SIZE offset)
+{
+    cmd_wa_gen6_pre_depth_stall_write(cmd);
+
+    gen6_PIPE_CONTROL(cmd,
+            GEN6_PIPE_CONTROL_DEPTH_STALL |
+            GEN6_PIPE_CONTROL_WRITE_PS_DEPTH_COUNT,
+            bo, offset);
+}
+
 static void gen6_cc_states(struct intel_cmd *cmd)
 {
     const struct intel_blend_state *blend = cmd->bind.state.blend;