Home | History | Annotate | Download | only in state_tracker

Lines Matching refs:stObj

136    struct st_texture_object *stObj = st_texture_object(texObj);
137 if (stObj->pt)
138 pipe_resource_reference(&stObj->pt, NULL);
139 if (stObj->sampler_view) {
140 pipe_sampler_view_release(st->pipe, &stObj->sampler_view);
324 struct st_texture_object *stObj,
334 assert(!stObj->pt);
336 if (!guess_base_level_size(stObj->base.Target,
343 stObj->width0 = stObj->height0 = stObj->depth0 = 0;
358 if ((stObj->base.Sampler.MinFilter == GL_NEAREST ||
359 stObj->base.Sampler.MinFilter == GL_LINEAR ||
362 !stObj->base.GenerateMipmap &&
369 lastLevel = _mesa_get_tex_max_num_levels(stObj->base.Target,
374 stObj->width0 = width;
375 stObj->height0 = height;
376 stObj->depth0 = depth;
382 st_gl_texture_dims_to_pipe_dims(stObj->base.Target,
386 stObj->pt = st_texture_create(st,
387 gl_target_to_pipe(stObj->base.Target),
396 stObj->lastLevel = lastLevel;
398 DBG("%s returning %d\n", __FUNCTION__, (stObj->pt != NULL));
400 return stObj->pt != NULL;
415 struct st_texture_object *stObj = st_texture_object(texImage->TexObject);
427 if (stObj->pt &&
428 level <= stObj->pt->last_level &&
429 st_texture_match_image(stObj->pt, texImage)) {
431 pipe_resource_reference(&stImage->pt, stObj->pt);
437 pipe_resource_reference(&stObj->pt, NULL);
438 pipe_sampler_view_release(st->pipe, &stObj->sampler_view);
440 if (!guess_and_alloc_texture(st, stObj, stImage)) {
445 if (!guess_and_alloc_texture(st, stObj, stImage)) {
451 if (stObj->pt &&
452 st_texture_match_image(stObj->pt, texImage)) {
454 pipe_resource_reference(&stImage->pt, stObj->pt);
470 st_gl_texture_dims_to_pipe_dims(stObj->base.Target,
475 gl_target_to_pipe(stObj->base.Target),
497 struct st_texture_object *stObj = st_texture_object(texObj);
500 if (stObj->surface_based) {
506 pipe_resource_reference(&stObj->pt, NULL);
518 stObj->surface_based = GL_FALSE;
557 struct st_texture_object *stObj = st_texture_object(texImage->TexObject);
584 u_sampler_view_default_template(&sv_temp, stObj->pt, stObj->pt->format);
590 src_view = pipe->create_sampler_view(pipe, stObj->pt, &sv_temp);
1103 * Copy image data from stImage into the texture object 'stObj' at level
1108 struct st_texture_object *stObj,
1115 stObj->base.Image[stImage->base.Face][dstLevel];
1139 stObj->pt, dstLevel, /* dest texture, level */
1148 GLuint blockSize = util_format_get_blocksize(stObj->pt->format);
1152 stObj->pt,
1162 pipe_resource_reference(&stImage->pt, stObj->pt);
1177 struct st_texture_object *stObj = st_texture_object(tObj);
1178 const GLuint nr_faces = (stObj->base.Target == GL_TEXTURE_CUBE_MAP) ? 6 : 1;
1188 * incomplete. In that case, we'll have set stObj->lastLevel before
1191 if (stObj->base.Sampler.MinFilter == GL_LINEAR ||
1192 stObj->base.Sampler.MinFilter == GL_NEAREST)
1193 stObj->lastLevel = stObj->base.BaseLevel;
1195 stObj->lastLevel = stObj->base._MaxLevel;
1198 firstImage = st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]);
1201 /* If both firstImage and stObj point to a texture which can contain
1207 firstImage->pt != stObj->pt &&
1208 (!stObj->pt || firstImage->pt->last_level >= stObj->pt->last_level)) {
1209 pipe_resource_reference(&stObj->pt, firstImage->pt);
1210 pipe_sampler_view_release(st->pipe, &stObj->sampler_view);
1219 if (!guess_base_level_size(stObj->base.Target,
1225 width = stObj->width0;
1226 height = stObj->height0;
1227 depth = stObj->depth0;
1230 st_gl_texture_dims_to_pipe_dims(stObj->base.Target, width, height, depth,
1237 if (stObj->pt) {
1238 if (stObj->pt->target != gl_target_to_pipe(stObj->base.Target) ||
1239 !st_sampler_compat_formats(stObj->pt->format, firstImageFormat) ||
1240 stObj->pt->last_level < stObj->lastLevel ||
1241 stObj->pt->width0 != ptWidth ||
1242 stObj->pt->height0 != ptHeight ||
1243 stObj->pt->depth0 != ptDepth ||
1244 stObj->pt->array_size != ptLayers)
1249 pipe_resource_reference(&stObj->pt, NULL);
1250 pipe_sampler_view_release(st->pipe, &stObj->sampler_view);
1257 if (!stObj->pt) {
1260 stObj->pt = st_texture_create(st,
1261 gl_target_to_pipe(stObj->base.Target),
1263 stObj->lastLevel,
1270 if (!stObj->pt) {
1280 for (level = stObj->base.BaseLevel; level <= stObj->lastLevel; level++) {
1282 st_texture_image(stObj->base.Image[face][level]);
1286 if (stImage && stObj->pt != stImage->pt) {
1288 (stImage->base.Width == u_minify(stObj->width0, level) &&
1289 stImage->base.Height == u_minify(stObj->height0, level) &&
1290 stImage->base.Depth == u_minify(stObj->depth0, level))) {
1292 copy_image_data_to_texture(st, stObj, level, stImage);
1314 struct st_texture_object *stObj = st_texture_object(texObj);
1322 stObj->width0 = width;
1323 stObj->height0 = height;
1324 stObj->depth0 = depth;
1325 stObj->lastLevel = levels - 1;
1335 stObj->pt = st_texture_create(st,
1344 if (!stObj->pt)
1353 pipe_resource_reference(&stImage->pt, stObj->pt);