Lines Matching defs:res
38 util_resource_size(const struct pipe_resource *res)
40 unsigned width = res->width0;
41 unsigned height = res->height0;
42 unsigned depth = res->depth0;
45 unsigned samples = MAX2(1, res->nr_samples);
47 for (level = 0; level <= res->last_level; level++) {
50 if (res->target == PIPE_TEXTURE_CUBE)
52 else if (res->target == PIPE_TEXTURE_3D)
55 slices = res->array_size;
57 size += (util_format_get_nblocksy(res->format, height) *
58 util_format_get_stride(res->format, width) * slices * samples);