intel/blorp: Add an entrypoint for clearing depth and stencil
[mesa.git] / src / intel / blorp / blorp.h
index d562b17c2685d4aea2dbe08b859adabe3910a980..b178ae374d60e15ac8d14112080da3154978f990 100644 (file)
@@ -21,7 +21,8 @@
  * IN THE SOFTWARE.
  */
 
-#pragma once
+#ifndef BLORP_H
+#define BLORP_H
 
 #include <stdint.h>
 #include <stdbool.h>
@@ -108,6 +109,16 @@ blorp_blit(struct blorp_batch *batch,
            float dst_x1, float dst_y1,
            uint32_t filter, bool mirror_x, bool mirror_y);
 
+void
+blorp_copy(struct blorp_batch *batch,
+           const struct blorp_surf *src_surf,
+           unsigned src_level, unsigned src_layer,
+           const struct blorp_surf *dst_surf,
+           unsigned dst_level, unsigned dst_layer,
+           uint32_t src_x, uint32_t src_y,
+           uint32_t dst_x, uint32_t dst_y,
+           uint32_t src_width, uint32_t src_height);
+
 void
 blorp_fast_clear(struct blorp_batch *batch,
                  const struct blorp_surf *surf, enum isl_format format,
@@ -117,10 +128,21 @@ blorp_fast_clear(struct blorp_batch *batch,
 void
 blorp_clear(struct blorp_batch *batch,
             const struct blorp_surf *surf,
+            enum isl_format format, struct isl_swizzle swizzle,
             uint32_t level, uint32_t start_layer, uint32_t num_layers,
             uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1,
-            enum isl_format format, union isl_color_value clear_color,
-            bool color_write_disable[4]);
+            union isl_color_value clear_color,
+            const bool color_write_disable[4]);
+
+void
+blorp_clear_depth_stencil(struct blorp_batch *batch,
+                          const struct blorp_surf *depth,
+                          const struct blorp_surf *stencil,
+                          uint32_t level, uint32_t start_layer,
+                          uint32_t num_layers,
+                          uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1,
+                          bool clear_depth, float depth_value,
+                          uint8_t stencil_mask, uint8_t stencil_value);
 
 void
 blorp_ccs_resolve(struct blorp_batch *batch,
@@ -151,3 +173,5 @@ blorp_gen6_hiz_op(struct blorp_batch *batch,
 #ifdef __cplusplus
 } /* end extern "C" */
 #endif /* __cplusplus */
+
+#endif /* BLORP_H */