• Home
  • Raw
  • Download

Lines Matching refs:att

303                         struct gl_renderbuffer_attachment *att)  in _mesa_remove_attachment()  argument
305 if (att->Type == GL_TEXTURE) { in _mesa_remove_attachment()
306 ASSERT(att->Texture); in _mesa_remove_attachment()
309 ctx->Driver.FinishRenderTexture(ctx, att); in _mesa_remove_attachment()
311 _mesa_reference_texobj(&att->Texture, NULL); /* unbind */ in _mesa_remove_attachment()
312 ASSERT(!att->Texture); in _mesa_remove_attachment()
314 if (att->Type == GL_TEXTURE || att->Type == GL_RENDERBUFFER_EXT) { in _mesa_remove_attachment()
315 ASSERT(!att->Texture); in _mesa_remove_attachment()
316 _mesa_reference_renderbuffer(&att->Renderbuffer, NULL); /* unbind */ in _mesa_remove_attachment()
317 ASSERT(!att->Renderbuffer); in _mesa_remove_attachment()
319 att->Type = GL_NONE; in _mesa_remove_attachment()
320 att->Complete = GL_TRUE; in _mesa_remove_attachment()
331 struct gl_renderbuffer_attachment *att, in _mesa_set_texture_attachment() argument
335 if (att->Texture == texObj) { in _mesa_set_texture_attachment()
337 ASSERT(att->Type == GL_TEXTURE); in _mesa_set_texture_attachment()
339 ctx->Driver.FinishRenderTexture(ctx, att); in _mesa_set_texture_attachment()
343 if (ctx->Driver.FinishRenderTexture && att->Texture) in _mesa_set_texture_attachment()
344 ctx->Driver.FinishRenderTexture(ctx, att); in _mesa_set_texture_attachment()
345 _mesa_remove_attachment(ctx, att); in _mesa_set_texture_attachment()
346 att->Type = GL_TEXTURE; in _mesa_set_texture_attachment()
347 assert(!att->Texture); in _mesa_set_texture_attachment()
348 _mesa_reference_texobj(&att->Texture, texObj); in _mesa_set_texture_attachment()
352 att->TextureLevel = level; in _mesa_set_texture_attachment()
353 att->CubeMapFace = _mesa_tex_target_to_face(texTarget); in _mesa_set_texture_attachment()
354 att->Zoffset = zoffset; in _mesa_set_texture_attachment()
355 att->Complete = GL_FALSE; in _mesa_set_texture_attachment()
357 if (_mesa_get_attachment_teximage(att)) { in _mesa_set_texture_attachment()
358 ctx->Driver.RenderTexture(ctx, fb, att); in _mesa_set_texture_attachment()
371 struct gl_renderbuffer_attachment *att, in _mesa_set_renderbuffer_attachment() argument
375 _mesa_remove_attachment(ctx, att); in _mesa_set_renderbuffer_attachment()
376 att->Type = GL_RENDERBUFFER_EXT; in _mesa_set_renderbuffer_attachment()
377 att->Texture = NULL; /* just to be safe */ in _mesa_set_renderbuffer_attachment()
378 att->Complete = GL_FALSE; in _mesa_set_renderbuffer_attachment()
379 _mesa_reference_renderbuffer(&att->Renderbuffer, rb); in _mesa_set_renderbuffer_attachment()
392 struct gl_renderbuffer_attachment *att; in _mesa_framebuffer_renderbuffer() local
396 att = _mesa_get_attachment(ctx, fb, attachment); in _mesa_framebuffer_renderbuffer()
397 ASSERT(att); in _mesa_framebuffer_renderbuffer()
399 _mesa_set_renderbuffer_attachment(ctx, att, rb); in _mesa_framebuffer_renderbuffer()
402 att = _mesa_get_attachment(ctx, fb, GL_STENCIL_ATTACHMENT_EXT); in _mesa_framebuffer_renderbuffer()
403 assert(att); in _mesa_framebuffer_renderbuffer()
404 _mesa_set_renderbuffer_attachment(ctx, att, rb); in _mesa_framebuffer_renderbuffer()
409 _mesa_remove_attachment(ctx, att); in _mesa_framebuffer_renderbuffer()
528 struct gl_renderbuffer_attachment *att) in test_attachment_completeness() argument
533 att->Complete = GL_TRUE; in test_attachment_completeness()
536 if (att->Type == GL_TEXTURE) { in test_attachment_completeness()
537 const struct gl_texture_object *texObj = att->Texture; in test_attachment_completeness()
543 att->Complete = GL_FALSE; in test_attachment_completeness()
547 texImage = texObj->Image[att->CubeMapFace][att->TextureLevel]; in test_attachment_completeness()
550 att->Complete = GL_FALSE; in test_attachment_completeness()
556 printf("level = %d\n", att->TextureLevel); in test_attachment_completeness()
557 att->Complete = GL_FALSE; in test_attachment_completeness()
560 if (texObj->Target == GL_TEXTURE_3D && att->Zoffset >= texImage->Depth) { in test_attachment_completeness()
562 att->Complete = GL_FALSE; in test_attachment_completeness()
571 att->Complete = GL_FALSE; in test_attachment_completeness()
576 att->Complete = GL_FALSE; in test_attachment_completeness()
590 att->Complete = GL_FALSE; in test_attachment_completeness()
605 att->Complete = GL_FALSE; in test_attachment_completeness()
610 else if (att->Type == GL_RENDERBUFFER_EXT) { in test_attachment_completeness()
612 _mesa_get_format_base_format(att->Renderbuffer->Format); in test_attachment_completeness()
614 ASSERT(att->Renderbuffer); in test_attachment_completeness()
615 if (!att->Renderbuffer->InternalFormat || in test_attachment_completeness()
616 att->Renderbuffer->Width < 1 || in test_attachment_completeness()
617 att->Renderbuffer->Height < 1) { in test_attachment_completeness()
619 att->Complete = GL_FALSE; in test_attachment_completeness()
625 att->Complete = GL_FALSE; in test_attachment_completeness()
639 att->Complete = GL_FALSE; in test_attachment_completeness()
653 att->Complete = GL_FALSE; in test_attachment_completeness()
660 ASSERT(att->Type == GL_NONE); in test_attachment_completeness()
701 struct gl_renderbuffer_attachment *att; in _mesa_test_framebuffer_completeness() local
713 att = &fb->Attachment[BUFFER_DEPTH]; in _mesa_test_framebuffer_completeness()
714 test_attachment_completeness(ctx, GL_DEPTH, att); in _mesa_test_framebuffer_completeness()
715 if (!att->Complete) { in _mesa_test_framebuffer_completeness()
722 att = &fb->Attachment[BUFFER_STENCIL]; in _mesa_test_framebuffer_completeness()
723 test_attachment_completeness(ctx, GL_STENCIL, att); in _mesa_test_framebuffer_completeness()
724 if (!att->Complete) { in _mesa_test_framebuffer_completeness()
731 att = &fb->Attachment[BUFFER_COLOR0 + i]; in _mesa_test_framebuffer_completeness()
732 test_attachment_completeness(ctx, GL_COLOR, att); in _mesa_test_framebuffer_completeness()
733 if (!att->Complete) { in _mesa_test_framebuffer_completeness()
742 if (att->Type == GL_TEXTURE) { in _mesa_test_framebuffer_completeness()
744 _mesa_get_attachment_teximage(att); in _mesa_test_framebuffer_completeness()
759 else if (att->Type == GL_RENDERBUFFER_EXT) { in _mesa_test_framebuffer_completeness()
760 minWidth = MIN2(minWidth, att->Renderbuffer->Width); in _mesa_test_framebuffer_completeness()
761 maxWidth = MAX2(minWidth, att->Renderbuffer->Width); in _mesa_test_framebuffer_completeness()
762 minHeight = MIN2(minHeight, att->Renderbuffer->Height); in _mesa_test_framebuffer_completeness()
763 maxHeight = MAX2(minHeight, att->Renderbuffer->Height); in _mesa_test_framebuffer_completeness()
764 f = att->Renderbuffer->InternalFormat; in _mesa_test_framebuffer_completeness()
765 attFormat = att->Renderbuffer->Format; in _mesa_test_framebuffer_completeness()
769 assert(att->Type == GL_NONE); in _mesa_test_framebuffer_completeness()
773 if (att->Renderbuffer && numSamples < 0) { in _mesa_test_framebuffer_completeness()
775 numSamples = att->Renderbuffer->NumSamples; in _mesa_test_framebuffer_completeness()
804 if (att->Renderbuffer && in _mesa_test_framebuffer_completeness()
805 att->Renderbuffer->NumSamples != numSamples) { in _mesa_test_framebuffer_completeness()
814 if (att->Type == GL_RENDERBUFFER && in _mesa_test_framebuffer_completeness()
815 att->Renderbuffer->Format == MESA_FORMAT_NONE) { in _mesa_test_framebuffer_completeness()
827 const struct gl_renderbuffer_attachment *att in _mesa_test_framebuffer_completeness() local
829 assert(att); in _mesa_test_framebuffer_completeness()
830 if (att->Type == GL_NONE) { in _mesa_test_framebuffer_completeness()
840 const struct gl_renderbuffer_attachment *att in _mesa_test_framebuffer_completeness() local
842 assert(att); in _mesa_test_framebuffer_completeness()
843 if (att->Type == GL_NONE) { in _mesa_test_framebuffer_completeness()
1388 struct gl_renderbuffer_attachment *att = fb->Attachment + i; in invalidate_rb() local
1389 if (att->Type == GL_RENDERBUFFER && in invalidate_rb()
1390 att->Renderbuffer == rb) { in invalidate_rb()
1682 struct gl_renderbuffer_attachment *att = fb->Attachment + i; in check_begin_texture_render() local
1683 if (att->Texture && _mesa_get_attachment_teximage(att)) { in check_begin_texture_render()
1684 ctx->Driver.RenderTexture(ctx, fb, att); in check_begin_texture_render()
1704 struct gl_renderbuffer_attachment *att = fb->Attachment + i; in check_end_texture_render() local
1705 if (att->Texture && att->Renderbuffer) { in check_end_texture_render()
1706 ctx->Driver.FinishRenderTexture(ctx, att); in check_end_texture_render()
1999 struct gl_renderbuffer_attachment *att; in framebuffer_texture() local
2086 att = _mesa_get_attachment(ctx, fb, attachment); in framebuffer_texture()
2087 if (att == NULL) { in framebuffer_texture()
2120 _mesa_set_texture_attachment(ctx, fb, att, texObj, textarget, in framebuffer_texture()
2127 assert(att == &fb->Attachment[BUFFER_DEPTH]); in framebuffer_texture()
2144 _mesa_remove_attachment(ctx, att); in framebuffer_texture()
2146 assert(att == &fb->Attachment[BUFFER_DEPTH]); in framebuffer_texture()
2271 struct gl_renderbuffer_attachment *att; in _mesa_FramebufferRenderbufferEXT() local
2296 att = _mesa_get_attachment(ctx, fb, attachment); in _mesa_FramebufferRenderbufferEXT()
2297 if (att == NULL) { in _mesa_FramebufferRenderbufferEXT()
2354 const struct gl_renderbuffer_attachment *att; in _mesa_GetFramebufferAttachmentParameterivEXT() local
2388 att = _mesa_get_fb0_attachment(ctx, buffer, attachment); in _mesa_GetFramebufferAttachmentParameterivEXT()
2392 att = _mesa_get_attachment(ctx, buffer, attachment); in _mesa_GetFramebufferAttachmentParameterivEXT()
2395 if (att == NULL) { in _mesa_GetFramebufferAttachmentParameterivEXT()
2419 ? GL_FRAMEBUFFER_DEFAULT : att->Type; in _mesa_GetFramebufferAttachmentParameterivEXT()
2422 if (att->Type == GL_RENDERBUFFER_EXT) { in _mesa_GetFramebufferAttachmentParameterivEXT()
2423 *params = att->Renderbuffer->Name; in _mesa_GetFramebufferAttachmentParameterivEXT()
2425 else if (att->Type == GL_TEXTURE) { in _mesa_GetFramebufferAttachmentParameterivEXT()
2426 *params = att->Texture->Name; in _mesa_GetFramebufferAttachmentParameterivEXT()
2429 assert(att->Type == GL_NONE); in _mesa_GetFramebufferAttachmentParameterivEXT()
2438 if (att->Type == GL_TEXTURE) { in _mesa_GetFramebufferAttachmentParameterivEXT()
2439 *params = att->TextureLevel; in _mesa_GetFramebufferAttachmentParameterivEXT()
2441 else if (att->Type == GL_NONE) { in _mesa_GetFramebufferAttachmentParameterivEXT()
2450 if (att->Type == GL_TEXTURE) { in _mesa_GetFramebufferAttachmentParameterivEXT()
2451 if (att->Texture && att->Texture->Target == GL_TEXTURE_CUBE_MAP) { in _mesa_GetFramebufferAttachmentParameterivEXT()
2452 *params = GL_TEXTURE_CUBE_MAP_POSITIVE_X + att->CubeMapFace; in _mesa_GetFramebufferAttachmentParameterivEXT()
2458 else if (att->Type == GL_NONE) { in _mesa_GetFramebufferAttachmentParameterivEXT()
2469 } else if (att->Type == GL_NONE) { in _mesa_GetFramebufferAttachmentParameterivEXT()
2472 } else if (att->Type == GL_TEXTURE) { in _mesa_GetFramebufferAttachmentParameterivEXT()
2473 if (att->Texture && att->Texture->Target == GL_TEXTURE_3D) { in _mesa_GetFramebufferAttachmentParameterivEXT()
2474 *params = att->Zoffset; in _mesa_GetFramebufferAttachmentParameterivEXT()
2489 else if (att->Type == GL_NONE) { in _mesa_GetFramebufferAttachmentParameterivEXT()
2495 *params = _mesa_get_format_color_encoding(att->Renderbuffer->Format); in _mesa_GetFramebufferAttachmentParameterivEXT()
2510 else if (att->Type == GL_NONE) { in _mesa_GetFramebufferAttachmentParameterivEXT()
2515 gl_format format = att->Renderbuffer->Format; in _mesa_GetFramebufferAttachmentParameterivEXT()
2544 else if (att->Type == GL_NONE) { in _mesa_GetFramebufferAttachmentParameterivEXT()
2548 else if (att->Texture) { in _mesa_GetFramebufferAttachmentParameterivEXT()
2550 _mesa_select_tex_image(ctx, att->Texture, att->Texture->Target, in _mesa_GetFramebufferAttachmentParameterivEXT()
2551 att->TextureLevel); in _mesa_GetFramebufferAttachmentParameterivEXT()
2560 else if (att->Renderbuffer) { in _mesa_GetFramebufferAttachmentParameterivEXT()
2561 *params = get_component_bits(pname, att->Renderbuffer->_BaseFormat, in _mesa_GetFramebufferAttachmentParameterivEXT()
2562 att->Renderbuffer->Format); in _mesa_GetFramebufferAttachmentParameterivEXT()
3071 const struct gl_renderbuffer_attachment *att; in _mesa_BlitFramebufferEXT() local
3073 att = find_attachment(readFb, colorReadRb); in _mesa_BlitFramebufferEXT()
3077 if (att && att->Texture) { in _mesa_BlitFramebufferEXT()
3079 att->Texture->Name, in _mesa_BlitFramebufferEXT()
3080 att->Texture->Target, in _mesa_BlitFramebufferEXT()
3081 att->TextureLevel, in _mesa_BlitFramebufferEXT()
3082 att->CubeMapFace); in _mesa_BlitFramebufferEXT()
3086 att = find_attachment(drawFb, colorDrawRb); in _mesa_BlitFramebufferEXT()
3090 if (att && att->Texture) { in _mesa_BlitFramebufferEXT()
3092 att->Texture->Name, in _mesa_BlitFramebufferEXT()
3093 att->Texture->Target, in _mesa_BlitFramebufferEXT()
3094 att->TextureLevel, in _mesa_BlitFramebufferEXT()
3095 att->CubeMapFace); in _mesa_BlitFramebufferEXT()