Home | History | Annotate | Download | only in core

Lines Matching refs:info

63                  const struct ilo_state_zs_info *info)
65 const struct ilo_image *img = (info->z_img) ? info->z_img : info->s_img;
69 assert(!info->z_img == !info->z_vma);
70 assert(!info->s_img == !info->s_vma);
73 if (info->z_img) {
74 assert(info->z_img->tiling == GEN6_TILING_Y);
75 assert(info->z_vma->vm_alignment % 4096 == 0);
77 if (info->s_img) {
78 assert(info->s_img->tiling == GEN8_TILING_W);
79 assert(info->s_vma->vm_alignment % 4096 == 0);
81 if (info->hiz_vma) {
82 assert(info->z_img &&
83 ilo_image_can_enable_aux(info->z_img, info->level));
84 assert(info->z_vma->vm_alignment % 4096 == 0);
95 if (info->z_img && info->s_img && info->z_img != info->s_img) {
96 assert(info->z_img->type == info->s_img->type &&
97 info->z_img->height0 == info->s_img->height0 &&
98 info->z_img->depth0 == info->s_img->depth0);
101 if (info->type != img->type) {
102 assert(info->type == GEN6_SURFTYPE_2D &&
107 switch (info->format) {
129 if (info->hiz_vma)
130 assert(info->format != GEN6_ZFORMAT_D24_UNORM_S8_UINT);
132 assert(info->format != GEN6_ZFORMAT_D24_UNORM_X8_UINT);
135 assert(info->level < img->level_count);
143 if (info->type == GEN6_SURFTYPE_CUBE)
151 const struct ilo_state_zs_info *info,
158 switch (info->type) {
243 const struct ilo_state_zs_info *info,
246 const struct ilo_image *img = (info->z_img) ? info->z_img : info->s_img;
254 if (info->hiz_vma) {
257 get_gen6_hiz_alignments(dev, info->z_img, &align_w, &align_h);
263 if (info->level)
270 zs_get_gen6_max_extent(dev, info, &max_w, &max_h);
281 const struct ilo_state_zs_info *info,
285 const struct ilo_image *img = (info->z_img) ? info->z_img : info->s_img;
299 switch (info->type) {
308 d = info->slice_count;
309 if (info->type == GEN6_SURFTYPE_CUBE) {
314 if (info->slice_base || d != 6) {
326 max_slice = u_minify(img->depth0, info->level);
336 if (!info->slice_count ||
337 info->slice_base + info->slice_count > max_slice) {
362 *min_array_elem = info->slice_base;
378 *rt_view_extent = info->slice_count - 1;
386 const struct ilo_state_zs_info *info)
393 if (!zs_validate_gen6(dev, info) ||
394 !zs_get_gen6_depth_extent(dev, info, &width, &height) ||
395 !zs_get_gen6_depth_slices(dev, info, &depth, &array_base,
399 /* info->z_readonly and info->s_readonly are ignored on Gen6 */
400 dw1 = info->type << GEN6_DEPTH_DW1_TYPE__SHIFT |
402 info->format << GEN6_DEPTH_DW1_FORMAT__SHIFT;
404 if (info->z_img)
405 dw1 |= (info->z_img->bo_stride - 1) << GEN6_DEPTH_DW1_PITCH__SHIFT;
407 if (info->hiz_vma || !info->z_img) {
415 info->level << GEN6_DEPTH_DW3_LOD__SHIFT |
434 const struct ilo_state_zs_info *info)
442 if (!zs_validate_gen6(dev, info) ||
443 !zs_get_gen6_depth_extent(dev, info, &width, &height) ||
444 !zs_get_gen6_depth_slices(dev, info, &depth, &array_base,
448 dw1 = info->type << GEN7_DEPTH_DW1_TYPE__SHIFT |
449 info->format << GEN7_DEPTH_DW1_FORMAT__SHIFT;
451 if (info->z_img) {
452 if (!info->z_readonly)
454 if (info->hiz_vma)
457 dw1 |= (info->z_img->bo_stride - 1) << GEN7_DEPTH_DW1_PITCH__SHIFT;
460 if (info->s_img && !info->s_readonly)
466 info->level << GEN7_DEPTH_DW3_LOD__SHIFT;
471 if (ilo_dev_gen(dev) >= ILO_GEN(8) && info->z_img) {
472 assert(info->z_img->walk_layer_height % 4 == 0);
474 dw6 |= (info->z_img->walk_layer_height / 4) <<
506 const struct ilo_state_zs_info *info)
508 const struct ilo_image *img = info->s_img;
534 ilo_image_get_slice_pos(img, info->level, 0, &x, &y);
573 const struct ilo_state_zs_info *info)
575 const struct ilo_image *img = info->z_img;
587 dw2 |= img->aux.walk_lod_offsets[info->level];
607 const struct ilo_state_zs_info *info)
613 if (info->z_img || info->s_img) {
615 ret &= zs_set_gen7_3DSTATE_DEPTH_BUFFER(zs, dev, info);
617 ret &= zs_set_gen6_3DSTATE_DEPTH_BUFFER(zs, dev, info);
622 if (info->s_img)
623 ret &= zs_set_gen6_3DSTATE_STENCIL_BUFFER(zs, dev, info);
627 if (info->z_img && info->hiz_vma)
628 ret &= zs_set_gen6_3DSTATE_HIER_DEPTH_BUFFER(zs, dev, info);
632 zs->z_vma = info->z_vma;
633 zs->s_vma = info->s_vma;
634 zs->hiz_vma = info->hiz_vma;
636 zs->z_readonly = info->z_readonly;
637 zs->s_readonly = info->s_readonly;
648 struct ilo_state_zs_info info;
650 memset(&info, 0, sizeof(info));
651 info.type = GEN6_SURFTYPE_NULL;
652 info.format = GEN6_ZFORMAT_D32_FLOAT;
654 return ilo_state_zs_init(zs, dev, &info);