Lines Matching refs:surf
1255 struct r600_surface *surf, in r600_init_color_surface() argument
1259 struct r600_texture *rtex = (struct r600_texture*)surf->base.texture; in r600_init_color_surface()
1260 unsigned level = surf->base.u.tex.level; in r600_init_color_surface()
1270 r600_init_flushed_depth_texture(&rctx->context, surf->base.texture, NULL); in r600_init_color_surface()
1278 surf->base.u.tex.first_layer; in r600_init_color_surface()
1302 desc = util_format_description(surf->base.format); in r600_init_color_surface()
1325 format = r600_translate_colorformat(surf->base.format); in r600_init_color_surface()
1328 swap = r600_translate_colorswap(surf->base.format); in r600_init_color_surface()
1346 surf->alphatest_bypass = ntype == V_0280A0_NUMBER_UINT || ntype == V_0280A0_NUMBER_SINT; in r600_init_color_surface()
1372 surf->export_16bpc = true; in r600_init_color_surface()
1386 surf->export_16bpc = true; in r600_init_color_surface()
1391 surf->cb_color_base = offset >> 8; in r600_init_color_surface()
1392 surf->cb_color_size = S_028060_PITCH_TILE_MAX(pitch) | in r600_init_color_surface()
1394 surf->cb_color_fmask = surf->cb_color_base; in r600_init_color_surface()
1395 surf->cb_color_cmask = surf->cb_color_base; in r600_init_color_surface()
1396 surf->cb_color_mask = 0; in r600_init_color_surface()
1398 pipe_resource_reference((struct pipe_resource**)&surf->cb_buffer_cmask, in r600_init_color_surface()
1400 pipe_resource_reference((struct pipe_resource**)&surf->cb_buffer_fmask, in r600_init_color_surface()
1404 surf->cb_color_cmask = rtex->cmask_offset >> 8; in r600_init_color_surface()
1405 surf->cb_color_mask |= S_028100_CMASK_BLOCK_MAX(rtex->cmask_slice_tile_max); in r600_init_color_surface()
1409 surf->cb_color_fmask = rtex->fmask_offset >> 8; in r600_init_color_surface()
1410 surf->cb_color_mask |= S_028100_FMASK_TILE_MAX(slice); in r600_init_color_surface()
1442 pipe_resource_reference((struct pipe_resource**)&surf->cb_buffer_cmask, in r600_init_color_surface()
1453 pipe_resource_reference((struct pipe_resource**)&surf->cb_buffer_fmask, in r600_init_color_surface()
1458 surf->cb_color_cmask = 0; in r600_init_color_surface()
1459 surf->cb_color_fmask = 0; in r600_init_color_surface()
1460 surf->cb_color_mask = S_028100_CMASK_BLOCK_MAX(cmask.slice_tile_max) | in r600_init_color_surface()
1464 surf->cb_color_info = color_info; in r600_init_color_surface()
1467 surf->cb_color_view = 0; in r600_init_color_surface()
1469 surf->cb_color_view = S_028080_SLICE_START(surf->base.u.tex.first_layer) | in r600_init_color_surface()
1470 S_028080_SLICE_MAX(surf->base.u.tex.last_layer); in r600_init_color_surface()
1473 surf->color_initialized = true; in r600_init_color_surface()
1477 struct r600_surface *surf) in r600_init_depth_surface() argument
1479 struct r600_texture *rtex = (struct r600_texture*)surf->base.texture; in r600_init_depth_surface()
1482 level = surf->base.u.tex.level; in r600_init_depth_surface()
1501 format = r600_translate_dbformat(surf->base.format); in r600_init_depth_surface()
1504 surf->db_depth_info = S_028010_ARRAY_MODE(array_mode) | S_028010_FORMAT(format); in r600_init_depth_surface()
1505 surf->db_depth_base = offset >> 8; in r600_init_depth_surface()
1506 surf->db_depth_view = S_028004_SLICE_START(surf->base.u.tex.first_layer) | in r600_init_depth_surface()
1507 S_028004_SLICE_MAX(surf->base.u.tex.last_layer); in r600_init_depth_surface()
1508 surf->db_depth_size = S_028000_PITCH_TILE_MAX(pitch) | S_028000_SLICE_TILE_MAX(slice); in r600_init_depth_surface()
1509 surf->db_prefetch_limit = (rtex->surface.level[level].nblk_y / 8) - 1; in r600_init_depth_surface()
1511 surf->depth_initialized = true; in r600_init_depth_surface()
1585 struct r600_surface *surf; in r600_set_framebuffer_state() local
1614 surf = (struct r600_surface*)state->cbufs[i]; in r600_set_framebuffer_state()
1615 res = (struct r600_resource*)surf->base.texture; in r600_set_framebuffer_state()
1620 if (!surf->color_initialized || force_cmask_fmask) { in r600_set_framebuffer_state()
1621 r600_init_color_surface(rctx, surf, force_cmask_fmask); in r600_set_framebuffer_state()
1624 surf->color_initialized = false; in r600_set_framebuffer_state()
1628 if (!surf->export_16bpc) { in r600_set_framebuffer_state()
1633 surf->cb_color_base, res, RADEON_USAGE_READWRITE); in r600_set_framebuffer_state()
1635 surf->cb_color_info, res, RADEON_USAGE_READWRITE); in r600_set_framebuffer_state()
1637 surf->cb_color_size); in r600_set_framebuffer_state()
1639 surf->cb_color_view); in r600_set_framebuffer_state()
1641 surf->cb_color_fmask, surf->cb_buffer_fmask, in r600_set_framebuffer_state()
1644 surf->cb_color_cmask, surf->cb_buffer_cmask, in r600_set_framebuffer_state()
1647 surf->cb_color_mask); in r600_set_framebuffer_state()
1656 surf->cb_color_info, res, RADEON_USAGE_READWRITE); in r600_set_framebuffer_state()
1666 surf = (struct r600_surface*)state->cbufs[0]; in r600_set_framebuffer_state()
1667 if (rctx->alphatest_state.bypass != surf->alphatest_bypass) { in r600_set_framebuffer_state()
1668 rctx->alphatest_state.bypass = surf->alphatest_bypass; in r600_set_framebuffer_state()
1675 surf = (struct r600_surface*)state->zsbuf; in r600_set_framebuffer_state()
1676 res = (struct r600_resource*)surf->base.texture; in r600_set_framebuffer_state()
1680 if (!surf->depth_initialized) { in r600_set_framebuffer_state()
1681 r600_init_depth_surface(rctx, surf); in r600_set_framebuffer_state()
1684 r600_pipe_state_add_reg_bo(rstate, R_02800C_DB_DEPTH_BASE, surf->db_depth_base, in r600_set_framebuffer_state()
1686 r600_pipe_state_add_reg(rstate, R_028000_DB_DEPTH_SIZE, surf->db_depth_size); in r600_set_framebuffer_state()
1687 r600_pipe_state_add_reg(rstate, R_028004_DB_DEPTH_VIEW, surf->db_depth_view); in r600_set_framebuffer_state()
1688 r600_pipe_state_add_reg_bo(rstate, R_028010_DB_DEPTH_INFO, surf->db_depth_info, in r600_set_framebuffer_state()
1690 r600_pipe_state_add_reg(rstate, R_028D34_DB_PREFETCH_LIMIT, surf->db_prefetch_limit); in r600_set_framebuffer_state()