Lines Matching refs:spr
35 get_image_offset(const struct softpipe_resource *spr, in get_image_offset() argument
41 if (spr->base.target == PIPE_BUFFER) in get_image_offset()
44 if (spr->base.target == PIPE_TEXTURE_1D_ARRAY || in get_image_offset()
45 spr->base.target == PIPE_TEXTURE_2D_ARRAY || in get_image_offset()
46 spr->base.target == PIPE_TEXTURE_CUBE_ARRAY || in get_image_offset()
47 spr->base.target == PIPE_TEXTURE_CUBE || in get_image_offset()
48 spr->base.target == PIPE_TEXTURE_3D) in get_image_offset()
50 return softpipe_get_tex_image_offset(spr, iview->u.tex.level, base_layer); in get_image_offset()
148 const struct softpipe_resource *spr, in get_dimensions() argument
164 util_format_get_stride(spr->base.format, spr->base.width0)) in get_dimensions()
169 level = spr->base.target == PIPE_BUFFER ? 0 : iview->u.tex.level; in get_dimensions()
170 *width = u_minify(spr->base.width0, level); in get_dimensions()
171 *height = u_minify(spr->base.height0, level); in get_dimensions()
173 if (spr->base.target == PIPE_TEXTURE_3D) in get_dimensions()
174 *depth = u_minify(spr->base.depth0, level); in get_dimensions()
176 *depth = spr->base.array_size; in get_dimensions()
180 util_format_get_blocksize(spr->base.format)) in get_dimensions()
213 struct softpipe_resource *spr; in sp_tgsi_load() local
223 spr = (struct softpipe_resource *)iview->resource; in sp_tgsi_load()
224 if (!spr) in sp_tgsi_load()
227 if (!has_compat_target(spr->base.target, params->tgsi_tex_instr)) in sp_tgsi_load()
230 if (!get_dimensions(iview, spr, params->tgsi_tex_instr, in sp_tgsi_load()
262 offset = get_image_offset(spr, iview, params->format, r_coord); in sp_tgsi_load()
263 data_ptr = (char *)spr->data + offset; in sp_tgsi_load()
296 struct softpipe_resource *spr; in sp_tgsi_store() local
307 spr = (struct softpipe_resource *)iview->resource; in sp_tgsi_store()
308 if (!spr) in sp_tgsi_store()
310 if (!has_compat_target(spr->base.target, params->tgsi_tex_instr)) in sp_tgsi_store()
314 pformat = spr->base.format; in sp_tgsi_store()
316 if (!get_dimensions(iview, spr, params->tgsi_tex_instr, in sp_tgsi_store()
333 offset = get_image_offset(spr, iview, pformat, r_coord); in sp_tgsi_store()
334 data_ptr = (char *)spr->data + offset; in sp_tgsi_store()
629 struct softpipe_resource *spr; in sp_tgsi_op() local
639 spr = (struct softpipe_resource *)iview->resource; in sp_tgsi_op()
640 if (!spr) in sp_tgsi_op()
642 if (!has_compat_target(spr->base.target, params->tgsi_tex_instr)) in sp_tgsi_op()
645 if (!get_dimensions(iview, spr, params->tgsi_tex_instr, in sp_tgsi_op()
649 stride = util_format_get_stride(spr->base.format, width); in sp_tgsi_op()
678 offset = get_image_offset(spr, iview, params->format, r_coord); in sp_tgsi_op()
679 data_ptr = (char *)spr->data + offset; in sp_tgsi_op()
711 struct softpipe_resource *spr; in sp_tgsi_get_dims() local
717 spr = (struct softpipe_resource *)iview->resource; in sp_tgsi_get_dims()
718 if (!spr) in sp_tgsi_get_dims()
728 dims[0] = u_minify(spr->base.width0, level); in sp_tgsi_get_dims()
741 dims[1] = u_minify(spr->base.height0, level); in sp_tgsi_get_dims()
744 dims[1] = u_minify(spr->base.height0, level); in sp_tgsi_get_dims()
745 dims[2] = u_minify(spr->base.depth0, level); in sp_tgsi_get_dims()
748 dims[1] = u_minify(spr->base.height0, level); in sp_tgsi_get_dims()