struct fdl_slice slices[FDL_MAX_MIP_LEVELS];
struct fdl_slice ubwc_slices[FDL_MAX_MIP_LEVELS];
uint32_t layer_size;
+ uint32_t ubwc_layer_size; /* in bytes */
bool layer_first : 1; /* see above description */
/* Note that for tiled textures, beyond a certain mipmap level (ie.
uint8_t cpp;
uint32_t width0, height0, depth0;
+ uint32_t nr_samples;
+ enum pipe_format format;
uint32_t size; /* Size of the whole image, in bytes. */
-
- uint32_t ubwc_size;
};
static inline uint32_t
/* for now this doesn't do anything clever, but when UBWC is enabled
* for multi layer/level images, it will.
*/
- if (layout->ubwc_size) {
+ if (layout->ubwc_layer_size) {
assert(level == 0);
assert(layer == 0);
}
static inline bool
fdl_ubwc_enabled(const struct fdl_layout *layout, int level)
{
- return layout->ubwc_size && fdl_tile_mode(layout, level);
+ return layout->ubwc_layer_size && fdl_tile_mode(layout, level);
}
void
fdl6_layout(struct fdl_layout *layout,
enum pipe_format format, uint32_t nr_samples,
uint32_t width0, uint32_t height0, uint32_t depth0,
- uint32_t mip_levels, uint32_t array_size, bool is_3d);
+ uint32_t mip_levels, uint32_t array_size, bool is_3d, bool ubwc);
+
+void
+fdl_dump_layout(struct fdl_layout *layout);
+
+void
+fdl6_get_ubwc_blockwidth(struct fdl_layout *layout,
+ uint32_t *blockwidth, uint32_t *blockheight);
#endif /* FREEDRENO_LAYOUT_H_ */