~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/imagination/vulkan/pvr_job_render.h

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include "pvr_types.h"
34
34
 
35
35
struct pvr_device;
 
36
struct pvr_device_info;
36
37
struct pvr_free_list;
37
38
struct pvr_render_ctx;
38
39
struct pvr_rt_dataset;
39
40
struct vk_sync;
40
41
 
 
42
/* Macrotile information. */
 
43
struct pvr_rt_mtile_info {
 
44
   uint32_t tile_size_x;
 
45
   uint32_t tile_size_y;
 
46
 
 
47
   uint32_t num_tiles_x;
 
48
   uint32_t num_tiles_y;
 
49
 
 
50
   uint32_t tiles_per_mtile_x;
 
51
   uint32_t tiles_per_mtile_y;
 
52
 
 
53
   uint32_t x_tile_max;
 
54
   uint32_t y_tile_max;
 
55
 
 
56
   uint32_t mtiles_x;
 
57
   uint32_t mtiles_y;
 
58
 
 
59
   uint32_t mtile_x1;
 
60
   uint32_t mtile_y1;
 
61
   uint32_t mtile_x2;
 
62
   uint32_t mtile_y2;
 
63
   uint32_t mtile_x3;
 
64
   uint32_t mtile_y3;
 
65
};
 
66
 
41
67
/* FIXME: Turn 'struct pvr_sub_cmd' into 'struct pvr_job' and change 'struct
42
68
 * pvr_render_job' to subclass it? This is approximately what v3dv does
43
69
 * (although it doesn't subclass).
62
88
 
63
89
   pvr_dev_addr_t ctrl_stream_addr;
64
90
 
65
 
   pvr_dev_addr_t border_colour_table_addr;
66
91
   pvr_dev_addr_t depth_bias_table_addr;
67
92
   pvr_dev_addr_t scissor_table_addr;
68
93
 
72
97
    * has_stencil_attachment are false, the contents are undefined.
73
98
    */
74
99
   struct pvr_ds_attachment {
 
100
      struct {
 
101
         bool d : 1;
 
102
         bool s : 1;
 
103
      } load, store;
 
104
 
75
105
      pvr_dev_addr_t addr;
76
106
      uint32_t stride;
77
107
      uint32_t height;
78
 
      uint32_t physical_width;
79
 
      uint32_t physical_height;
 
108
      VkExtent2D physical_extent;
80
109
      uint32_t layer_size;
81
 
      VkFormat vk_format;
 
110
      enum PVRX(CR_ZLS_FORMAT_TYPE) zls_format;
82
111
      /* FIXME: This should be of type 'enum pvr_memlayout', but this is defined
83
112
       * in pvr_private.h, which causes a circular include dependency. For now,
84
113
       * treat it as a uint32_t. A couple of ways to possibly fix this:
88
117
       *      included by both this header and pvr_private.h.
89
118
       */
90
119
      uint32_t memlayout;
 
120
 
 
121
      /* TODO: Is this really necessary? Maybe we can extract all useful
 
122
       * information and drop this member. */
 
123
      const struct pvr_image_view *iview;
 
124
 
 
125
      bool has_alignment_transfers;
91
126
   } ds;
92
127
 
93
128
   VkClearDepthStencilValue ds_clear_value;
110
145
   uint64_t pds_pr_bgnd_reg_values[ROGUE_NUM_CR_PDS_BGRND_WORDS];
111
146
};
112
147
 
 
148
void pvr_rt_mtile_info_init(const struct pvr_device_info *dev_info,
 
149
                            struct pvr_rt_mtile_info *info,
 
150
                            uint32_t width,
 
151
                            uint32_t height,
 
152
                            uint32_t samples);
 
153
 
113
154
VkResult pvr_free_list_create(struct pvr_device *device,
114
155
                              uint32_t initial_size,
115
156
                              uint32_t max_size,