• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright © 2016 Red Hat.
3  * Copyright © 2016 Bas Nieuwenhuizen
4  * SPDX-License-Identifier: MIT
5  *
6  * based in part on anv driver which is:
7  * Copyright © 2015 Intel Corporation
8  */
9 
10 #ifndef TU_CLEAR_BLIT_H
11 #define TU_CLEAR_BLIT_H
12 
13 #include "tu_common.h"
14 
15 void tu_init_clear_blit_shaders(struct tu_device *dev);
16 
17 void tu_destroy_clear_blit_shaders(struct tu_device *dev);
18 
19 template <chip CHIP>
20 void
21 tu6_clear_lrz(struct tu_cmd_buffer *cmd, struct tu_cs *cs, struct tu_image* image, const VkClearValue *value);
22 
23 template <chip CHIP>
24 void
25 tu6_dirty_lrz_fc(struct tu_cmd_buffer *cmd, struct tu_cs *cs, struct tu_image* image);
26 
27 template <chip CHIP>
28 void
29 tu_resolve_sysmem(struct tu_cmd_buffer *cmd,
30                   struct tu_cs *cs,
31                   const struct tu_image_view *src,
32                   const struct tu_image_view *dst,
33                   uint32_t layer_mask,
34                   uint32_t layers,
35                   const VkRect2D *rect);
36 
37 template <chip CHIP>
38 void
39 tu_clear_sysmem_attachment(struct tu_cmd_buffer *cmd,
40                            struct tu_cs *cs,
41                            uint32_t a);
42 
43 template <chip CHIP>
44 void
45 tu_clear_gmem_attachment(struct tu_cmd_buffer *cmd,
46                          struct tu_cs *cs,
47                          uint32_t a);
48 
49 template <chip CHIP>
50 void
51 tu_load_gmem_attachment(struct tu_cmd_buffer *cmd,
52                         struct tu_cs *cs,
53                         uint32_t a,
54                         bool cond_exec_allowed,
55                         bool force_load);
56 
57 /* note: gmem store can also resolve */
58 template <chip CHIP>
59 void
60 tu_store_gmem_attachment(struct tu_cmd_buffer *cmd,
61                          struct tu_cs *cs,
62                          uint32_t a,
63                          uint32_t gmem_a,
64                          uint32_t layers,
65                          uint32_t layer_mask,
66                          bool cond_exec_allowed);
67 
68 void
69 tu_choose_gmem_layout(struct tu_cmd_buffer *cmd);
70 
71 #endif /* TU_CLEAR_BLIT_H */
72