Lines Matching refs:texObj
131 struct gl_texture_object *texObj = NULL;
146 _mesa_reference_texobj(&texObj, texHandleObj->texObj);
159 texObj = texHandleObj->texObj;
160 _mesa_reference_texobj(&texObj, NULL);
180 struct gl_texture_object *texObj = NULL;
195 _mesa_reference_texobj(&texObj, imgHandleObj->imgObj.TexObj);
206 texObj = imgHandleObj->imgObj.TexObj;
207 _mesa_reference_texobj(&texObj, NULL);
212 find_texhandleobj(struct gl_texture_object *texObj,
215 util_dynarray_foreach(&texObj->SamplerHandles,
224 new_texture_handle(struct gl_context *ctx, struct gl_texture_object *texObj,
232 if (texObj->Target != GL_TEXTURE_BUFFER) {
233 if (!st_finalize_texture(ctx, pipe, texObj, 0))
236 st_convert_sampler(st, texObj, sampObj, 0, &sampler, false);
239 view = st_get_texture_sampler_view_from_stobj(st, texObj, sampObj, 0,
242 view = st_get_buffer_sampler_view_from_stobj(st, texObj, false);
250 get_texture_handle(struct gl_context *ctx, struct gl_texture_object *texObj,
253 bool separate_sampler = &texObj->Sampler != sampObj;
265 texHandleObj = find_texhandleobj(texObj, separate_sampler ? sampObj : NULL);
272 handle = new_texture_handle(ctx, texObj, sampObj);
287 texHandleObj->texObj = texObj;
290 util_dynarray_append(&texObj->SamplerHandles,
300 texObj->HandleAllocated = true;
301 if (texObj->Target == GL_TEXTURE_BUFFER)
302 texObj->BufferObject->HandleAllocated = true;
314 find_imghandleobj(struct gl_texture_object *texObj, GLint level,
317 util_dynarray_foreach(&texObj->ImageHandles,
321 if (u->TexObj == texObj && u->Level == level && u->Layered == layered &&
329 get_image_handle(struct gl_context *ctx, struct gl_texture_object *texObj,
344 imgHandleObj = find_imghandleobj(texObj, level, layered, layer, format);
350 imgObj.TexObj = texObj; /* weak reference */
356 if (_mesa_tex_target_is_layered(texObj->Target)) {
386 util_dynarray_append(&texObj->ImageHandles,
390 texObj->HandleAllocated = true;
391 if (texObj->Target == GL_TEXTURE_BUFFER)
392 texObj->BufferObject->HandleAllocated = true;
393 texObj->Sampler.HandleAllocated = true;
446 _mesa_init_texture_handles(struct gl_texture_object *texObj)
448 util_dynarray_init(&texObj->SamplerHandles, NULL);
449 util_dynarray_init(&texObj->ImageHandles, NULL);
454 struct gl_texture_object *texObj)
459 util_dynarray_foreach(&texObj->SamplerHandles,
466 util_dynarray_foreach(&texObj->ImageHandles,
477 struct gl_texture_object *texObj)
480 util_dynarray_foreach(&texObj->SamplerHandles,
493 util_dynarray_fini(&texObj->SamplerHandles);
496 util_dynarray_foreach(&texObj->ImageHandles,
501 util_dynarray_fini(&texObj->ImageHandles);
519 struct gl_texture_object *texObj = (*texHandleObj)->texObj;
522 util_dynarray_delete_unordered(&texObj->SamplerHandles,
578 struct gl_texture_object *texObj;
582 texObj = _mesa_lookup_texture(ctx, texture);
583 if (!_mesa_is_texture_complete(texObj, &texObj->Sampler,
585 _mesa_test_texobj_completeness(ctx, texObj);
587 return get_texture_handle(ctx, texObj, &texObj->Sampler);
593 struct gl_texture_object *texObj = NULL;
610 texObj = _mesa_lookup_texture(ctx, texture);
612 if (!texObj) {
623 if (!_mesa_is_texture_complete(texObj, &texObj->Sampler,
625 _mesa_test_texobj_completeness(ctx, texObj);
626 if (!_mesa_is_texture_complete(texObj, &texObj->Sampler,
634 if (!is_sampler_border_color_valid(&texObj->Sampler)) {
640 return get_texture_handle(ctx, texObj, &texObj->Sampler);
646 struct gl_texture_object *texObj;
651 texObj = _mesa_lookup_texture(ctx, texture);
654 if (!_mesa_is_texture_complete(texObj, sampObj,
656 _mesa_test_texobj_completeness(ctx, texObj);
658 return get_texture_handle(ctx, texObj, sampObj);
664 struct gl_texture_object *texObj = NULL;
682 texObj = _mesa_lookup_texture(ctx, texture);
684 if (!texObj) {
708 if (!_mesa_is_texture_complete(texObj, sampObj,
710 _mesa_test_texobj_completeness(ctx, texObj);
711 if (!_mesa_is_texture_complete(texObj, sampObj,
725 return get_texture_handle(ctx, texObj, sampObj);
824 struct gl_texture_object *texObj;
828 texObj = _mesa_lookup_texture(ctx, texture);
829 if (!_mesa_is_texture_complete(texObj, &texObj->Sampler,
831 _mesa_test_texobj_completeness(ctx, texObj);
833 return get_image_handle(ctx, texObj, level, layered, layer, format);
840 struct gl_texture_object *texObj = NULL;
860 texObj = _mesa_lookup_texture(ctx, texture);
862 if (!texObj) {
867 if (level < 0 || level >= _mesa_max_texture_levels(ctx, texObj->Target)) {
872 if (!layered && layer > _mesa_get_texture_layers(texObj, level)) {
889 if (!_mesa_is_texture_complete(texObj, &texObj->Sampler,
891 _mesa_test_texobj_completeness(ctx, texObj);
892 if (!_mesa_is_texture_complete(texObj, &texObj->Sampler,
900 if (layered && !_mesa_tex_target_is_layered(texObj->Target)) {
906 return get_image_handle(ctx, texObj, level, layered, layer, format);