Lines Matching refs:texObj
125 struct gl_texture_object *texObj = NULL;
140 _mesa_reference_texobj(&texObj, texHandleObj->texObj);
153 texObj = texHandleObj->texObj;
154 _mesa_reference_texobj(&texObj, NULL);
174 struct gl_texture_object *texObj = NULL;
189 _mesa_reference_texobj(&texObj, imgHandleObj->imgObj.TexObj);
200 texObj = imgHandleObj->imgObj.TexObj;
201 _mesa_reference_texobj(&texObj, NULL);
206 find_texhandleobj(struct gl_texture_object *texObj,
209 util_dynarray_foreach(&texObj->SamplerHandles,
218 get_texture_handle(struct gl_context *ctx, struct gl_texture_object *texObj,
221 bool separate_sampler = &texObj->Sampler != sampObj;
233 texHandleObj = find_texhandleobj(texObj, separate_sampler ? sampObj : NULL);
240 handle = ctx->Driver.NewTextureHandle(ctx, texObj, sampObj);
255 texHandleObj->texObj = texObj;
258 util_dynarray_append(&texObj->SamplerHandles,
268 texObj->HandleAllocated = true;
269 if (texObj->Target == GL_TEXTURE_BUFFER)
270 texObj->BufferObject->HandleAllocated = true;
282 find_imghandleobj(struct gl_texture_object *texObj, GLint level,
285 util_dynarray_foreach(&texObj->ImageHandles,
289 if (u->TexObj == texObj && u->Level == level && u->Layered == layered &&
297 get_image_handle(struct gl_context *ctx, struct gl_texture_object *texObj,
312 imgHandleObj = find_imghandleobj(texObj, level, layered, layer, format);
318 imgObj.TexObj = texObj; /* weak reference */
324 if (_mesa_tex_target_is_layered(texObj->Target)) {
352 util_dynarray_append(&texObj->ImageHandles,
356 texObj->HandleAllocated = true;
357 if (texObj->Target == GL_TEXTURE_BUFFER)
358 texObj->BufferObject->HandleAllocated = true;
359 texObj->Sampler.HandleAllocated = true;
412 _mesa_init_texture_handles(struct gl_texture_object *texObj)
414 util_dynarray_init(&texObj->SamplerHandles, NULL);
415 util_dynarray_init(&texObj->ImageHandles, NULL);
420 struct gl_texture_object *texObj)
425 util_dynarray_foreach(&texObj->SamplerHandles,
432 util_dynarray_foreach(&texObj->ImageHandles,
443 struct gl_texture_object *texObj)
446 util_dynarray_foreach(&texObj->SamplerHandles,
459 util_dynarray_fini(&texObj->SamplerHandles);
462 util_dynarray_foreach(&texObj->ImageHandles,
467 util_dynarray_fini(&texObj->ImageHandles);
485 struct gl_texture_object *texObj = (*texHandleObj)->texObj;
488 util_dynarray_delete_unordered(&texObj->SamplerHandles,
544 struct gl_texture_object *texObj;
548 texObj = _mesa_lookup_texture(ctx, texture);
549 if (!_mesa_is_texture_complete(texObj, &texObj->Sampler,
551 _mesa_test_texobj_completeness(ctx, texObj);
553 return get_texture_handle(ctx, texObj, &texObj->Sampler);
559 struct gl_texture_object *texObj = NULL;
576 texObj = _mesa_lookup_texture(ctx, texture);
578 if (!texObj) {
589 if (!_mesa_is_texture_complete(texObj, &texObj->Sampler,
591 _mesa_test_texobj_completeness(ctx, texObj);
592 if (!_mesa_is_texture_complete(texObj, &texObj->Sampler,
600 if (!is_sampler_border_color_valid(&texObj->Sampler)) {
606 return get_texture_handle(ctx, texObj, &texObj->Sampler);
612 struct gl_texture_object *texObj;
617 texObj = _mesa_lookup_texture(ctx, texture);
620 if (!_mesa_is_texture_complete(texObj, sampObj,
622 _mesa_test_texobj_completeness(ctx, texObj);
624 return get_texture_handle(ctx, texObj, sampObj);
630 struct gl_texture_object *texObj = NULL;
648 texObj = _mesa_lookup_texture(ctx, texture);
650 if (!texObj) {
674 if (!_mesa_is_texture_complete(texObj, sampObj,
676 _mesa_test_texobj_completeness(ctx, texObj);
677 if (!_mesa_is_texture_complete(texObj, sampObj,
691 return get_texture_handle(ctx, texObj, sampObj);
790 struct gl_texture_object *texObj;
794 texObj = _mesa_lookup_texture(ctx, texture);
795 if (!_mesa_is_texture_complete(texObj, &texObj->Sampler,
797 _mesa_test_texobj_completeness(ctx, texObj);
799 return get_image_handle(ctx, texObj, level, layered, layer, format);
806 struct gl_texture_object *texObj = NULL;
826 texObj = _mesa_lookup_texture(ctx, texture);
828 if (!texObj) {
833 if (level < 0 || level >= _mesa_max_texture_levels(ctx, texObj->Target)) {
838 if (!layered && layer > _mesa_get_texture_layers(texObj, level)) {
855 if (!_mesa_is_texture_complete(texObj, &texObj->Sampler,
857 _mesa_test_texobj_completeness(ctx, texObj);
858 if (!_mesa_is_texture_complete(texObj, &texObj->Sampler,
866 if (layered && !_mesa_tex_target_is_layered(texObj->Target)) {
872 return get_image_handle(ctx, texObj, level, layered, layer, format);