Home | History | Annotate | Download | only in core

Lines Matching refs:img

198 ilo_image_init(struct ilo_image *img,
203 ilo_image_can_enable_aux(const struct ilo_image *img, unsigned level)
205 return (img->aux.enables & (1 << level));
212 ilo_image_pos_to_mem(const struct ilo_image *img,
216 assert(pos_x % img->block_width == 0);
217 assert(pos_y % img->block_height == 0);
219 *mem_x = pos_x / img->block_width * img->block_size;
220 *mem_y = pos_y / img->block_height;
227 ilo_image_mem_to_linear(const struct ilo_image *img,
230 return mem_y * img->bo_stride + mem_x;
237 ilo_image_mem_to_raw(const struct ilo_image *img,
242 switch (img->tiling) {
269 return mem_y * img->bo_stride + mem_x * tile_h;
276 ilo_image_get_slice_stride(const struct ilo_image *img, unsigned level)
280 switch (img->walk) {
282 h = img->walk_layer_height;
285 h = img->lods[level].slice_height;
289 h = img->lods[0].slice_height;
299 assert(h % img->block_height == 0);
301 return (h / img->block_height) * img->bo_stride;
308 ilo_image_get_slice_size(const struct ilo_image *img, unsigned level)
310 const unsigned w = img->lods[level].slice_width;
311 const unsigned h = img->lods[level].slice_height;
313 assert(w % img->block_width == 0);
314 assert(h % img->block_height == 0);
316 return (w / img->block_width * img->block_size) *
317 (h / img->block_height);
324 ilo_image_get_slice_pos(const struct ilo_image *img,
328 switch (img->walk) {
330 *x = img->lods[level].x;
331 *y = img->lods[level].y + img->walk_layer_height * slice;
334 *x = img->lods[level].x;
335 *y = img->lods[level].y + img->lods[level].slice_height * slice;
343 assert(slice < u_minify(img->depth0, level));
345 *x = img->lods[level].x + img->lods[level].slice_width * sx;
346 *y = img->lods[level].y + img->lods[level].slice_height * sy;
350 assert(!"unknown img walk type");
357 assert(*y + img->lods[level].slice_height <=
358 img->bo_height * img->block_height);