Lines Matching defs:surface
1200 struct r300_surface* surface = CALLOC_STRUCT(r300_surface);
1205 if (surface) {
1208 pipe_reference_init(&surface->base.reference, 1);
1209 pipe_resource_reference(&surface->base.texture, texture);
1210 surface->base.context = ctx;
1211 surface->base.format = surf_tmpl->format;
1212 surface->base.width = u_minify(width0_override, level);
1213 surface->base.height = u_minify(height0_override, level);
1214 surface->base.u.tex.level = level;
1215 surface->base.u.tex.first_layer = surf_tmpl->u.tex.first_layer;
1216 surface->base.u.tex.last_layer = surf_tmpl->u.tex.last_layer;
1218 surface->buf = tex->buf;
1221 surface->domain = tex->domain;
1222 if (surface->domain & RADEON_DOMAIN_VRAM)
1223 surface->domain &= ~RADEON_DOMAIN_GTT;
1225 surface->offset = r300_texture_get_offset(tex, level,
1227 r300_texture_setup_fb_state(surface);
1230 surface->cbzb_allowed = tex->tex.cbzb_allowed[level];
1231 surface->cbzb_width = align(surface->base.width, 64);
1234 tile_height = r300_get_pixel_alignment(surface->base.format,
1240 surface->cbzb_height = align((surface->base.height + 1) / 2,
1245 offset = surface->offset +
1246 tex->tex.stride_in_bytes[level] * surface->cbzb_height;
1247 surface->cbzb_midpoint_offset = offset & ~2047;
1249 surface->cbzb_pitch = surface->pitch & 0x1ffffc;
1251 if (util_format_get_blocksizebits(surface->base.format) == 32)
1252 surface->cbzb_format = R300_DEPTHFORMAT_24BIT_INT_Z_8BIT_STENCIL;
1254 surface->cbzb_format = R300_DEPTHFORMAT_16BIT_INT_Z;
1258 surface->cbzb_allowed ? "YES" : " NO",
1259 surface->cbzb_width, surface->cbzb_height,
1265 return &surface->base;