1 /* 2 * Copyright 2008 Corbin Simpson <[email protected]> 3 * Copyright 2010 Marek Olšák <[email protected]> 4 * SPDX-License-Identifier: MIT 5 */ 6 7 #ifndef R300_TEXTURE_DESC_H 8 #define R300_TEXTURE_DESC_H 9 10 #include "util/format/u_formats.h" 11 #include "r300_context.h" 12 13 struct pipe_resource; 14 struct r300_screen; 15 struct r300_texture_desc; 16 struct r300_resource; 17 18 enum r300_dim { 19 DIM_WIDTH = 0, 20 DIM_HEIGHT = 1 21 }; 22 23 unsigned r300_get_pixel_alignment(enum pipe_format format, 24 unsigned num_samples, 25 enum radeon_bo_layout microtile, 26 enum radeon_bo_layout macrotile, 27 enum r300_dim dim, bool is_rs690, 28 bool scanout); 29 30 void r300_texture_desc_init(struct r300_screen *rscreen, 31 struct r300_resource *tex, 32 const struct pipe_resource *base); 33 34 unsigned r300_texture_get_offset(struct r300_resource *tex, 35 unsigned level, unsigned layer); 36 37 unsigned r300_stride_to_width(enum pipe_format format, 38 unsigned stride_in_bytes); 39 40 #endif 41