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