Lines Matching refs:surf

278 etna_rs_gen_clear_surface(struct etna_context *ctx, struct etna_surface *surf,
282 struct etna_resource *dst = etna_resource(surf->base.texture);
285 switch (util_format_get_blocksizebits(surf->base.format)) {
302 bool tiled_clear = (surf->surf.padded_width & ETNA_RS_WIDTH_MASK) == 0 &&
303 (surf->surf.padded_height & ETNA_RS_HEIGHT_MASK) == 0;
305 etna_compile_rs_state( ctx, &surf->clear_command, &(struct rs_state) {
309 .dest_offset = surf->surf.offset,
310 .dest_stride = surf->surf.stride,
311 .dest_padded_height = surf->surf.padded_height,
314 .width = surf->surf.padded_width, /* These must be padded to 16x4 if !LINEAR, otherwise RS will hang */
315 .height = surf->surf.padded_height,
327 struct etna_surface *surf = etna_surface(dst);
328 uint64_t new_clear_value = etna_clear_blit_pack_rgba(surf->base.format, color);
330 if (surf->surf.ts_size) { /* TS: use precompiled clear command */
337 surf->surf.padded_width * surf->surf.padded_height / 16);
341 surf->level->ts_valid = true;
343 } else if (unlikely(new_clear_value != surf->level->clear_value)) { /* Queue normal RS clear for non-TS surfaces */
345 etna_rs_gen_clear_surface(ctx, surf, new_clear_value);
348 etna_submit_rs_state(ctx, &surf->clear_command);
350 surf->level->clear_value = new_clear_value;
351 resource_written(ctx, surf->base.texture);
352 etna_resource(surf->base.texture)->seqno++;
360 struct etna_surface *surf = etna_surface(dst);
361 uint32_t new_clear_value = translate_clear_depth_stencil(surf->base.format, depth, stencil);
365 switch (surf->base.format) {
390 if (surf->surf.ts_size) { /* TS: use precompiled clear command */
396 surf->surf.padded_width * surf->surf.padded_height / 16);
400 surf->level->ts_valid = true;
403 if (unlikely(new_clear_value != surf->level->clear_value)) { /* Queue normal RS clear for non-TS surfaces */
405 etna_rs_gen_clear_surface(ctx, surf, new_clear_value);
408 etna_modify_rs_clearbits(&surf->clear_command, new_clear_bits);
411 etna_submit_rs_state(ctx, &surf->clear_command);
413 surf->level->clear_value = new_clear_value;
414 resource_written(ctx, surf->base.texture);
415 etna_resource(surf->base.texture)->seqno++;
434 struct etna_surface *surf = etna_surface(ctx->framebuffer_s.cbufs[0]);
435 if (surf->surf.ts_size)
439 struct etna_surface *surf = etna_surface(ctx->framebuffer_s.zsbuf);
441 if (surf->surf.ts_size)