Lines Matching refs:surf

1240 				  struct r600_surface *surf)  in evergreen_init_color_surface()  argument
1243 struct r600_texture *rtex = (struct r600_texture*)surf->base.texture; in evergreen_init_color_surface()
1244 struct pipe_resource *pipe_tex = surf->base.texture; in evergreen_init_color_surface()
1245 unsigned level = surf->base.u.tex.level; in evergreen_init_color_surface()
1264 surf->base.u.tex.first_layer; in evergreen_init_color_surface()
1304 if (util_format_get_blocksize(surf->base.format) >= 16) in evergreen_init_color_surface()
1308 desc = util_format_description(surf->base.format); in evergreen_init_color_surface()
1344 format = r600_translate_colorformat(surf->base.format); in evergreen_init_color_surface()
1347 swap = r600_translate_colorswap(surf->base.format); in evergreen_init_color_surface()
1370 surf->alphatest_bypass = ntype == V_028C70_NUMBER_UINT || ntype == V_028C70_NUMBER_SINT; in evergreen_init_color_surface()
1398 surf->export_16bpc = true; in evergreen_init_color_surface()
1408 surf->cb_color_base = (base_offset + offset) >> 8; in evergreen_init_color_surface()
1409 surf->cb_color_dim = color_dim; in evergreen_init_color_surface()
1410 surf->cb_color_info = color_info; in evergreen_init_color_surface()
1411 surf->cb_color_pitch = S_028C64_PITCH_TILE_MAX(pitch); in evergreen_init_color_surface()
1412 surf->cb_color_slice = S_028C68_SLICE_TILE_MAX(slice); in evergreen_init_color_surface()
1414 surf->cb_color_view = 0; in evergreen_init_color_surface()
1416 surf->cb_color_view = S_028C6C_SLICE_START(surf->base.u.tex.first_layer) | in evergreen_init_color_surface()
1417 S_028C6C_SLICE_MAX(surf->base.u.tex.last_layer); in evergreen_init_color_surface()
1419 surf->cb_color_attrib = color_attrib; in evergreen_init_color_surface()
1421 surf->cb_color_fmask = (base_offset + rtex->fmask_offset) >> 8; in evergreen_init_color_surface()
1422 surf->cb_color_cmask = (base_offset + rtex->cmask_offset) >> 8; in evergreen_init_color_surface()
1424 surf->cb_color_fmask = surf->cb_color_base; in evergreen_init_color_surface()
1425 surf->cb_color_cmask = surf->cb_color_base; in evergreen_init_color_surface()
1427 surf->cb_color_fmask_slice = S_028C88_TILE_MAX(slice); in evergreen_init_color_surface()
1428 surf->cb_color_cmask_slice = S_028C80_TILE_MAX(rtex->cmask_slice_tile_max); in evergreen_init_color_surface()
1430 surf->color_initialized = true; in evergreen_init_color_surface()
1434 struct r600_surface *surf) in evergreen_init_depth_surface() argument
1438 struct r600_texture *rtex = (struct r600_texture*)surf->base.texture; in evergreen_init_depth_surface()
1443 level = surf->base.u.tex.level; in evergreen_init_depth_surface()
1444 format = r600_translate_dbformat(surf->base.format); in evergreen_init_depth_surface()
1447 offset = r600_resource_va(screen, surf->base.texture); in evergreen_init_depth_surface()
1476 surf->db_depth_info = S_028040_ARRAY_MODE(array_mode) | in evergreen_init_depth_surface()
1484 surf->db_depth_info |= S_028040_NUM_SAMPLES(util_logbase2(rtex->resource.b.b.nr_samples)); in evergreen_init_depth_surface()
1486 surf->db_depth_base = offset; in evergreen_init_depth_surface()
1487 surf->db_depth_view = S_028008_SLICE_START(surf->base.u.tex.first_layer) | in evergreen_init_depth_surface()
1488 S_028008_SLICE_MAX(surf->base.u.tex.last_layer); in evergreen_init_depth_surface()
1489 surf->db_depth_size = S_028058_PITCH_TILE_MAX(pitch); in evergreen_init_depth_surface()
1490 surf->db_depth_slice = S_02805C_SLICE_TILE_MAX(slice); in evergreen_init_depth_surface()
1497 stencil_offset += r600_resource_va(screen, surf->base.texture); in evergreen_init_depth_surface()
1512 surf->db_stencil_base = stencil_offset; in evergreen_init_depth_surface()
1513 surf->db_stencil_info = 1 | S_028044_TILE_SPLIT(stile_split); in evergreen_init_depth_surface()
1515 surf->db_stencil_base = offset; in evergreen_init_depth_surface()
1516 surf->db_stencil_info = 1; in evergreen_init_depth_surface()
1519 surf->depth_initialized = true; in evergreen_init_depth_surface()
1697 struct r600_surface *surf; in evergreen_set_framebuffer_state() local
1720 surf = (struct r600_surface*)state->cbufs[i]; in evergreen_set_framebuffer_state()
1721 res = (struct r600_resource*)surf->base.texture; in evergreen_set_framebuffer_state()
1726 if (!surf->color_initialized) { in evergreen_set_framebuffer_state()
1727 evergreen_init_color_surface(rctx, surf); in evergreen_set_framebuffer_state()
1730 if (!surf->export_16bpc) { in evergreen_set_framebuffer_state()
1735 surf->cb_color_base, res, RADEON_USAGE_READWRITE); in evergreen_set_framebuffer_state()
1737 surf->cb_color_dim); in evergreen_set_framebuffer_state()
1739 surf->cb_color_info, res, RADEON_USAGE_READWRITE); in evergreen_set_framebuffer_state()
1741 surf->cb_color_pitch); in evergreen_set_framebuffer_state()
1743 surf->cb_color_slice); in evergreen_set_framebuffer_state()
1745 surf->cb_color_view); in evergreen_set_framebuffer_state()
1747 surf->cb_color_attrib, res, RADEON_USAGE_READWRITE); in evergreen_set_framebuffer_state()
1749 surf->cb_color_cmask, res, RADEON_USAGE_READWRITE); in evergreen_set_framebuffer_state()
1751 surf->cb_color_cmask_slice); in evergreen_set_framebuffer_state()
1753 surf->cb_color_fmask, res, RADEON_USAGE_READWRITE); in evergreen_set_framebuffer_state()
1755 surf->cb_color_fmask_slice); in evergreen_set_framebuffer_state()
1766 surf->cb_color_info, res, RADEON_USAGE_READWRITE); in evergreen_set_framebuffer_state()
1776 surf = (struct r600_surface*)state->cbufs[0]; in evergreen_set_framebuffer_state()
1777 if (rctx->alphatest_state.bypass != surf->alphatest_bypass) { in evergreen_set_framebuffer_state()
1778 rctx->alphatest_state.bypass = surf->alphatest_bypass; in evergreen_set_framebuffer_state()
1781 if (rctx->alphatest_state.cb0_export_16bpc != surf->export_16bpc) { in evergreen_set_framebuffer_state()
1782 rctx->alphatest_state.cb0_export_16bpc = surf->export_16bpc; in evergreen_set_framebuffer_state()
1789 surf = (struct r600_surface*)state->zsbuf; in evergreen_set_framebuffer_state()
1790 res = (struct r600_resource*)surf->base.texture; in evergreen_set_framebuffer_state()
1794 if (!surf->depth_initialized) { in evergreen_set_framebuffer_state()
1795 evergreen_init_depth_surface(rctx, surf); in evergreen_set_framebuffer_state()
1798 r600_pipe_state_add_reg_bo(rstate, R_028048_DB_Z_READ_BASE, surf->db_depth_base, in evergreen_set_framebuffer_state()
1800 r600_pipe_state_add_reg_bo(rstate, R_028050_DB_Z_WRITE_BASE, surf->db_depth_base, in evergreen_set_framebuffer_state()
1802 r600_pipe_state_add_reg(rstate, R_028008_DB_DEPTH_VIEW, surf->db_depth_view); in evergreen_set_framebuffer_state()
1804 r600_pipe_state_add_reg_bo(rstate, R_02804C_DB_STENCIL_READ_BASE, surf->db_stencil_base, in evergreen_set_framebuffer_state()
1806 r600_pipe_state_add_reg_bo(rstate, R_028054_DB_STENCIL_WRITE_BASE, surf->db_stencil_base, in evergreen_set_framebuffer_state()
1808 r600_pipe_state_add_reg_bo(rstate, R_028044_DB_STENCIL_INFO, surf->db_stencil_info, in evergreen_set_framebuffer_state()
1811 r600_pipe_state_add_reg_bo(rstate, R_028040_DB_Z_INFO, surf->db_depth_info, in evergreen_set_framebuffer_state()
1813 r600_pipe_state_add_reg(rstate, R_028058_DB_DEPTH_SIZE, surf->db_depth_size); in evergreen_set_framebuffer_state()
1814 r600_pipe_state_add_reg(rstate, R_02805C_DB_DEPTH_SLICE, surf->db_depth_slice); in evergreen_set_framebuffer_state()