Lines Matching refs:res
76 static void virgl_init_temp_resource_from_box(struct pipe_resource *res,
82 memset(res, 0, sizeof(*res));
83 res->bind = temp_bind(orig->bind);
84 res->format = fmt;
85 res->width0 = box->width;
86 res->height0 = box->height;
87 res->depth0 = 1;
88 res->array_size = 1;
89 res->usage = PIPE_USAGE_STAGING;
90 res->flags = flags;
94 res->target = orig->target;
96 res->target = PIPE_TEXTURE_2D;
98 if (res->target != PIPE_BUFFER)
99 res->bind = PIPE_BIND_RENDER_TARGET;
101 switch (res->target) {
105 res->array_size = box->depth;
108 res->depth0 = box->depth;
308 void virgl_texture_init(struct virgl_resource *res)