Lines Matching refs:att
380 struct gl_renderbuffer_attachment *att)
382 struct gl_renderbuffer *rb = att->Renderbuffer;
388 if (att->Type == GL_TEXTURE) {
389 assert(att->Texture);
390 _mesa_reference_texobj(&att->Texture, NULL); /* unbind */
391 assert(!att->Texture);
393 if (att->Type == GL_TEXTURE || att->Type == GL_RENDERBUFFER_EXT) {
394 assert(!att->Texture);
395 _mesa_reference_renderbuffer(&att->Renderbuffer, NULL); /* unbind */
396 assert(!att->Renderbuffer);
398 att->Type = GL_NONE;
399 att->Complete = GL_TRUE;
407 driver_RenderTexture_is_safe(const struct gl_renderbuffer_attachment *att)
410 att->Texture->Image[att->CubeMapFace][att->TextureLevel];
417 && att->Zoffset >= texImage->Height)
419 && att->Zoffset >= texImage->Depth))
440 struct gl_renderbuffer_attachment *att)
445 texImage = att->Texture->Image[att->CubeMapFace][att->TextureLevel];
447 rb = att->Renderbuffer;
454 _mesa_reference_renderbuffer(&att->Renderbuffer, rb);
476 if (driver_RenderTexture_is_safe(att))
477 ctx->Driver.RenderTexture(ctx, fb, att);
487 struct gl_renderbuffer_attachment *att,
492 struct gl_renderbuffer *rb = att->Renderbuffer;
497 if (att->Texture == texObj) {
499 assert(att->Type == GL_TEXTURE);
503 remove_attachment(ctx, att);
504 att->Type = GL_TEXTURE;
505 assert(!att->Texture);
506 _mesa_reference_texobj(&att->Texture, texObj);
511 att->TextureLevel = level;
512 att->CubeMapFace = _mesa_tex_target_to_face(texTarget);
513 att->Zoffset = layer;
514 att->Layered = layered;
515 att->Complete = GL_FALSE;
517 _mesa_update_texture_renderbuffer(ctx, fb, att);
527 struct gl_renderbuffer_attachment *att,
531 remove_attachment(ctx, att);
532 att->Type = GL_RENDERBUFFER_EXT;
533 att->Texture = NULL; /* just to be safe */
534 att->Layered = GL_FALSE;
535 att->Complete = GL_FALSE;
536 _mesa_reference_renderbuffer(&att->Renderbuffer, rb);
550 struct gl_renderbuffer_attachment *att;
554 att = get_attachment(ctx, fb, attachment, NULL);
555 assert(att);
557 set_renderbuffer_attachment(ctx, att, rb);
560 att = get_attachment(ctx, fb, GL_STENCIL_ATTACHMENT_EXT, NULL);
561 assert(att);
562 set_renderbuffer_attachment(ctx, att, rb);
567 remove_attachment(ctx, att);
570 att = get_attachment(ctx, fb, GL_STENCIL_ATTACHMENT_EXT, NULL);
571 assert(att);
572 remove_attachment(ctx, att);
773 struct gl_renderbuffer_attachment *att)
778 att->Complete = GL_TRUE;
781 if (att->Type == GL_TEXTURE) {
782 const struct gl_texture_object *texObj = att->Texture;
788 att->Complete = GL_FALSE;
792 texImage = texObj->Image[att->CubeMapFace][att->TextureLevel];
795 att->Complete = GL_FALSE;
800 att->Complete = GL_FALSE;
806 if (att->Zoffset >= texImage->Depth) {
808 att->Complete = GL_FALSE;
813 if (att->Zoffset >= texImage->Height) {
815 att->Complete = GL_FALSE;
820 if (att->Zoffset >= texImage->Depth) {
822 att->Complete = GL_FALSE;
827 if (att->Zoffset >= texImage->Depth) {
829 att->Complete = GL_FALSE;
840 att->Complete = GL_FALSE;
845 att->Complete = GL_FALSE;
857 att->Complete = GL_FALSE;
870 att->Complete = GL_FALSE;
886 att->Complete = GL_FALSE;
891 else if (att->Type == GL_RENDERBUFFER_EXT) {
892 const GLenum baseFormat = att->Renderbuffer->_BaseFormat;
894 assert(att->Renderbuffer);
895 if (!att->Renderbuffer->InternalFormat ||
896 att->Renderbuffer->Width < 1 ||
897 att->Renderbuffer->Height < 1) {
899 att->Complete = GL_FALSE;
905 att->Complete = GL_FALSE;
918 att->Complete = GL_FALSE;
929 att->Complete = GL_FALSE;
936 assert(att->Type == GL_NONE);
989 struct gl_renderbuffer_attachment *att;
1002 att = &fb->Attachment[BUFFER_DEPTH];
1003 test_attachment_completeness(ctx, GL_DEPTH, att);
1004 if (!att->Complete) {
1008 } else if (att->Type != GL_NONE) {
1013 att = &fb->Attachment[BUFFER_STENCIL];
1014 test_attachment_completeness(ctx, GL_STENCIL, att);
1015 if (!att->Complete) {
1019 } else if (att->Type != GL_NONE) {
1024 att = &fb->Attachment[BUFFER_COLOR0 + i];
1025 test_attachment_completeness(ctx, GL_COLOR, att);
1026 if (!att->Complete) {
1035 if (att->Type == GL_TEXTURE) {
1036 const struct gl_texture_image *texImg = att->Renderbuffer->TexImage;
1037 att_tex_target = att->Texture->Target;
1071 else if (att->Type == GL_RENDERBUFFER_EXT) {
1072 minWidth = MIN2(minWidth, att->Renderbuffer->Width);
1073 maxWidth = MAX2(minWidth, att->Renderbuffer->Width);
1074 minHeight = MIN2(minHeight, att->Renderbuffer->Height);
1075 maxHeight = MAX2(minHeight, att->Renderbuffer->Height);
1076 f = att->Renderbuffer->InternalFormat;
1077 attFormat = att->Renderbuffer->Format;
1081 numSamples = att->Renderbuffer->NumSamples;
1082 else if (numSamples != att->Renderbuffer->NumSamples) {
1098 assert(att->Type == GL_NONE);
1145 if (att->Type == GL_RENDERBUFFER &&
1146 att->Renderbuffer->Format == MESA_FORMAT_NONE) {
1153 if (att->Layered) {
1157 att_layer_count = att->Renderbuffer->Height;
1159 att_layer_count = att->Renderbuffer->Depth;
1164 is_layered = att->Layered;
1172 } else if (is_layered != att->Layered) {
1229 const struct gl_renderbuffer_attachment *att
1231 assert(att);
1232 if (att->Type == GL_NONE) {
1242 const struct gl_renderbuffer_attachment *att
1244 assert(att);
1245 if (att->Type == GL_NONE) {
1557 const void *att)
1563 if (fb->Attachment[i].Texture == att
1564 || fb->Attachment[i].Renderbuffer == att) {
2027 struct gl_renderbuffer_attachment *att = fb->Attachment + i;
2028 if (att->Type == GL_RENDERBUFFER &&
2029 att->Renderbuffer == rb) {
2468 struct gl_renderbuffer_attachment *att = fb->Attachment + i;
2469 if (att->Texture && att->Renderbuffer->TexImage
2470 && driver_RenderTexture_is_safe(att)) {
2471 ctx->Driver.RenderTexture(ctx, fb, att);
2492 struct gl_renderbuffer_attachment *att = fb->Attachment + i;
2493 struct gl_renderbuffer *rb = att->Renderbuffer;
3152 struct gl_renderbuffer_attachment *att;
3162 att = get_attachment(ctx, fb, attachment, NULL);
3163 if (att == NULL) {
3196 set_texture_attachment(ctx, fb, att, texObj, textarget,
3204 assert(att == &fb->Attachment[BUFFER_DEPTH]);
3221 remove_attachment(ctx, att);
3223 assert(att == &fb->Attachment[BUFFER_DEPTH]);
3497 struct gl_renderbuffer_attachment *att;
3507 att = get_attachment(ctx, fb, attachment, &is_color_attachment);
3508 if (att == NULL) {
3630 const struct gl_renderbuffer_attachment *att;
3695 att = _mesa_get_fb0_attachment(ctx, buffer, attachment);
3699 att = get_attachment(ctx, buffer, attachment, &is_color_attachment);
3702 if (att == NULL) {
3760 (att->Type != GL_NONE)))
3761 ? GL_FRAMEBUFFER_DEFAULT : att->Type;
3764 if (att->Type == GL_RENDERBUFFER_EXT) {
3765 *params = att->Renderbuffer->Name;
3767 else if (att->Type == GL_TEXTURE) {
3768 *params = att->Texture->Name;
3771 assert(att->Type == GL_NONE);
3780 if (att->Type == GL_TEXTURE) {
3781 *params = att->TextureLevel;
3783 else if (att->Type == GL_NONE) {
3792 if (att->Type == GL_TEXTURE) {
3793 if (att->Texture && att->Texture->Target == GL_TEXTURE_CUBE_MAP) {
3794 *params = GL_TEXTURE_CUBE_MAP_POSITIVE_X + att->CubeMapFace;
3800 else if (att->Type == GL_NONE) {
3811 } else if (att->Type == GL_NONE) {
3814 } else if (att->Type == GL_TEXTURE) {
3815 if (att->Texture && (att->Texture->Target == GL_TEXTURE_3D ||
3816 att->Texture->Target == GL_TEXTURE_2D_ARRAY)) {
3817 *params = att->Zoffset;
3833 else if (att->Type == GL_NONE) {
3845 _mesa_get_format_color_encoding(att->Renderbuffer->Format);
3861 else if (att->Type == GL_NONE) {
3866 mesa_format format = att->Renderbuffer->Format;
3913 else if (att->Type == GL_NONE) {
3917 else if (att->Texture) {
3919 _mesa_select_tex_image(att->Texture, att->Texture->Target,
3920 att->TextureLevel);
3929 else if (att->Renderbuffer) {
3930 *params = get_component_bits(pname, att->Renderbuffer->_BaseFormat,
3931 att->Renderbuffer->Format);
3940 } else if (att->Type == GL_TEXTURE) {
3941 *params = att->Layered;
3942 } else if (att->Type == GL_NONE) {