Home | History | Annotate | Download | only in main

Lines Matching refs:attachment

252  * If \p attachment is GL_DEPTH_STENCIL_ATTACHMENT, return a pointer to
253 * the depth buffer attachment point.
254 * Returns if the attachment is a GL_COLOR_ATTACHMENTm_EXT on
256 * if they don't find the attachment.
260 GLenum attachment, bool *is_color_attachment)
269 switch (attachment) {
292 i = attachment - GL_COLOR_ATTACHMENT0_EXT;
297 assert(BUFFER_COLOR0 + i < ARRAY_SIZE(fb->Attachment));
298 return &fb->Attachment[BUFFER_COLOR0 + i];
304 return &fb->Attachment[BUFFER_DEPTH];
306 return &fb->Attachment[BUFFER_STENCIL];
319 GLenum attachment)
323 attachment = _mesa_back_to_front_if_single_buffered(fb, attachment);
326 switch (attachment) {
331 return &fb->Attachment[BUFFER_BACK_LEFT];
334 return &fb->Attachment[BUFFER_FRONT_LEFT];
336 return &fb->Attachment[BUFFER_DEPTH];
338 return &fb->Attachment[BUFFER_STENCIL];
340 unreachable("invalid attachment");
344 switch (attachment) {
352 if (fb->Attachment[BUFFER_FRONT_LEFT].Type == GL_NONE)
353 return &fb->Attachment[BUFFER_BACK_LEFT];
355 return &fb->Attachment[BUFFER_FRONT_LEFT];
358 if (fb->Attachment[BUFFER_FRONT_RIGHT].Type == GL_NONE)
359 return &fb->Attachment[BUFFER_BACK_RIGHT];
361 return &fb->Attachment[BUFFER_FRONT_RIGHT];
363 return &fb->Attachment[BUFFER_BACK_LEFT];
365 return &fb->Attachment[BUFFER_BACK_RIGHT];
370 * attachment, BACK is equivalent to BACK_LEFT."
373 return &fb->Attachment[BUFFER_BACK_LEFT];
380 * "If the default framebuffer is bound to target, then attachment must
389 * "If the default framebuffer is bound to <target>, then <attachment>
403 return &fb->Attachment[BUFFER_DEPTH];
405 return &fb->Attachment[BUFFER_STENCIL];
414 * Remove any texture or renderbuffer attached to the given attachment
521 * Bind a texture object to an attachment point.
542 /* new attachment */
563 * Bind a renderbuffer to an attachment point.
571 /* XXX check if re-doing same attachment, exit early */
588 GLenum attachment,
595 att = get_attachment(ctx, fb, attachment, NULL);
599 if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
600 /* do stencil attachment here (depth already done above) */
609 if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
634 const struct gl_renderbuffer *rb = fb->Attachment[buf].Renderbuffer;
669 &fb->Attachment[BUFFER_DEPTH];
671 &fb->Attachment[BUFFER_STENCIL];
694 _mesa_debug(NULL, "attachment incomplete: %s\n", msg);
890 * Test if an attachment point is complete and update its Complete field.
891 * \param format if GL_COLOR, this is a color attachment point,
892 * if GL_DEPTH, this is a depth component attachment point,
893 * if GL_STENCIL, this is a stencil component attachment point.
904 /* Look for reasons why the attachment might be incomplete */
923 /* Mutable non base level texture as framebuffer attachment
931 att_incomplete("texture attachment not mipmap complete");
1125 /* Start at -2 to more easily loop over all attachment points.
1142 /* check for attachment completeness
1145 att = &fb->Attachment[BUFFER_DEPTH];
1149 fbo_incomplete(ctx, "depth attachment incomplete", -1);
1156 att = &fb->Attachment[BUFFER_STENCIL];
1160 fbo_incomplete(ctx, "stencil attachment incomplete", -1);
1167 att = &fb->Attachment[BUFFER_COLOR0 + i];
1170 /* With EXT_color_buffer_half_float, check if attachment was incomplete
1181 fbo_incomplete(ctx, "color attachment incomplete", i);
1207 fbo_incomplete(ctx, "texture attachment incomplete", -1);
1338 fbo_incomplete(ctx, "attachment not cube complete", i);
1349 * "If any framebuffer attachment is layered, all populated
1357 * Setup the checked layer target with first color attachment here
1379 "framebuffer attachment layer mode is inconsistent",
1388 * requirement on each attachment. Those additional requirements are
1398 * array texture and the attachment is layered, the depth or layer count
1407 * Section 9.4.1 "Framebuffer Attachment Completeness", pg 310-311
1959 * Remove the specified renderbuffer or texture from any attachment point in
1963 * \c true if the renderbuffer was detached from an attachment point. \c
1975 if (fb->Attachment[i].Texture == att
1976 || fb->Attachment[i].Renderbuffer == att) {
1977 remove_attachment(ctx, &fb->Attachment[i]);
2031 * attached to one or more attachment points in the currently
2034 * attachment point to which this image was attached in the
2036 * renderbuffer image is first detached from all attachment
2492 * Invalidate a renderbuffer attachment. Called from _mesa_HashWalk().
2504 struct gl_renderbuffer_attachment *att = fb->Attachment + i;
3046 struct gl_renderbuffer_attachment *att = fb->Attachment + i;
3070 struct gl_renderbuffer_attachment *att = fb->Attachment + i;
3454 * Replicate the src attachment point. Used by framebuffer_texture() when
3463 struct gl_renderbuffer_attachment *dst_att = &fb->Attachment[dst];
3464 struct gl_renderbuffer_attachment *src_att = &fb->Attachment[src];
3533 * and decide whether or not the attachment should truly be considered
3536 * \param layered true if attachment should be considered layered, false if
3779 GLenum attachment, const char *caller)
3788 /* Not a hash lookup, so we can afford to get the attachment here. */
3791 get_attachment(ctx, fb, attachment, &is_color_attachment);
3795 "%s(invalid color attachment %s)", caller,
3796 _mesa_enum_to_string(attachment));
3799 "%s(invalid attachment %s)", caller,
3800 _mesa_enum_to_string(attachment));
3811 GLenum attachment,
3821 if (attachment == GL_DEPTH_ATTACHMENT &&
3822 texObj == fb->Attachment[BUFFER_STENCIL].Texture &&
3823 level == fb->Attachment[BUFFER_STENCIL].TextureLevel &&
3825 fb->Attachment[BUFFER_STENCIL].CubeMapFace &&
3826 samples == fb->Attachment[BUFFER_STENCIL].NumSamples &&
3827 layer == fb->Attachment[BUFFER_STENCIL].Zoffset) {
3828 /* The texture object is already attached to the stencil attachment
3830 * attachment's. This is required to prevent a GL error in
3835 } else if (attachment == GL_STENCIL_ATTACHMENT &&
3836 texObj == fb->Attachment[BUFFER_DEPTH].Texture &&
3837 level == fb->Attachment[BUFFER_DEPTH].TextureLevel &&
3839 fb->Attachment[BUFFER_DEPTH].CubeMapFace &&
3840 samples == fb->Attachment[BUFFER_DEPTH].NumSamples &&
3841 layer == fb->Attachment[BUFFER_DEPTH].Zoffset) {
3849 if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
3851 * depth attachment point. Now attach it to the stencil attachment
3854 assert(att == &fb->Attachment[BUFFER_DEPTH]);
3872 if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
3873 assert(att == &fb->Attachment[BUFFER_DEPTH]);
3874 remove_attachment(ctx, &fb->Attachment[BUFFER_STENCIL]);
3885 framebuffer_texture_with_dims_no_error(GLenum target, GLenum attachment,
3899 get_attachment(ctx, fb, attachment, NULL);
3901 _mesa_framebuffer_texture(ctx, fb, attachment, att, texObj, textarget,
3908 GLenum attachment, GLenum textarget,
3944 _mesa_get_and_validate_attachment(ctx, fb, attachment, caller);
3948 _mesa_framebuffer_texture(ctx, fb, attachment, att, texObj, textarget,
3954 _mesa_FramebufferTexture1D_no_error(GLenum target, GLenum attachment,
3958 framebuffer_texture_with_dims_no_error(target, attachment, textarget,
3964 _mesa_FramebufferTexture1D(GLenum target, GLenum attachment,
3967 framebuffer_texture_with_dims(1, target, 0, attachment, textarget, texture,
3973 _mesa_FramebufferTexture2D_no_error(GLenum target, GLenum attachment,
3977 framebuffer_texture_with_dims_no_error(target, attachment, textarget,
3983 _mesa_FramebufferTexture2D(GLenum target, GLenum attachment,
3986 framebuffer_texture_with_dims(2, target, 0, attachment, textarget, texture,
3992 _mesa_FramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment,
3996 framebuffer_texture_with_dims(2, target, 0, attachment, textarget, texture,
4004 _mesa_FramebufferTexture3D_no_error(GLenum target, GLenum attachment,
4008 framebuffer_texture_with_dims_no_error(target, attachment, textarget,
4014 _mesa_FramebufferTexture3D(GLenum target, GLenum attachment,
4018 framebuffer_texture_with_dims(3, target, 0, attachment, textarget, texture,
4025 GLenum attachment, GLuint texture,
4063 /* Get the texture object and framebuffer attachment*/
4068 att = get_attachment(ctx, fb, attachment, NULL);
4074 att = _mesa_get_and_validate_attachment(ctx, fb, attachment, func);
4108 _mesa_framebuffer_texture(ctx, fb, attachment, att, texObj, textarget,
4113 _mesa_FramebufferTextureLayer_no_error(GLenum target, GLenum attachment,
4117 frame_buffer_texture(0, target, attachment, texture, level, layer,
4123 _mesa_FramebufferTextureLayer(GLenum target, GLenum attachment,
4126 frame_buffer_texture(0, target, attachment, texture, level, layer,
4133 GLenum attachment,
4137 frame_buffer_texture(framebuffer, 0, attachment, texture, level, layer,
4143 _mesa_NamedFramebufferTextureLayer(GLuint framebuffer, GLenum attachment,
4146 frame_buffer_texture(framebuffer, 0, attachment, texture, level, layer,
4152 _mesa_FramebufferTexture_no_error(GLenum target, GLenum attachment,
4155 frame_buffer_texture(0, target, attachment, texture, level, 0,
4161 _mesa_FramebufferTexture(GLenum target, GLenum attachment,
4164 frame_buffer_texture(0, target, attachment, texture, level, 0,
4169 _mesa_NamedFramebufferTexture_no_error(GLuint framebuffer, GLenum attachment,
4172 frame_buffer_texture(framebuffer, 0, attachment, texture, level, 0,
4178 _mesa_NamedFramebufferTexture(GLuint framebuffer, GLenum attachment,
4181 frame_buffer_texture(framebuffer, 0, attachment, texture, level, 0,
4187 _mesa_NamedFramebufferTexture1DEXT(GLuint framebuffer, GLenum attachment,
4190 framebuffer_texture_with_dims(1, GL_FRAMEBUFFER, framebuffer, attachment,
4197 _mesa_NamedFramebufferTexture2DEXT(GLuint framebuffer, GLenum attachment,
4200 framebuffer_texture_with_dims(2, GL_FRAMEBUFFER, framebuffer, attachment,
4207 _mesa_NamedFramebufferTexture3DEXT(GLuint framebuffer, GLenum attachment,
4211 framebuffer_texture_with_dims(3, GL_FRAMEBUFFER, framebuffer, attachment,
4220 GLenum attachment,
4228 ctx->Driver.FramebufferRenderbuffer(ctx, fb, attachment, rb);
4238 GLenum attachment, GLenum renderbuffertarget,
4260 /* remove renderbuffer attachment */
4272 att = get_attachment(ctx, fb, attachment, &is_color_attachment);
4278 * "An INVALID_OPERATION error is generated if attachment is
4282 * If we are at this point, is because the attachment is not valid, so
4287 "%s(invalid color attachment %s)", func,
4288 _mesa_enum_to_string(attachment));
4291 "%s(invalid attachment %s)", func,
4292 _mesa_enum_to_string(attachment));
4298 if (attachment == GL_DEPTH_STENCIL_ATTACHMENT &&
4310 _mesa_framebuffer_renderbuffer(ctx, fb, attachment, rb);
4315 struct gl_framebuffer *fb, GLenum attachment,
4319 framebuffer_renderbuffer(ctx, fb, attachment, renderbuffertarget,
4325 struct gl_framebuffer *fb, GLenum attachment,
4329 framebuffer_renderbuffer(ctx, fb, attachment, renderbuffertarget,
4334 _mesa_FramebufferRenderbuffer_no_error(GLenum target, GLenum attachment,
4341 framebuffer_renderbuffer_no_error(ctx, fb, attachment, renderbuffertarget,
4346 _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment,
4361 framebuffer_renderbuffer_error(ctx, fb, attachment, renderbuffertarget,
4367 GLenum attachment,
4374 framebuffer_renderbuffer_no_error(ctx, fb, attachment, renderbuffertarget,
4380 _mesa_NamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment,
4392 framebuffer_renderbuffer_error(ctx, fb, attachment, renderbuffertarget,
4399 _mesa_NamedFramebufferRenderbufferEXT(GLuint framebuffer, GLenum attachment,
4411 framebuffer_renderbuffer_error(ctx, fb, attachment, renderbuffertarget,
4420 GLenum attachment, GLenum pname,
4427 /* The error code for an attachment type of GL_NONE differs between APIs.
4463 if (_mesa_is_gles3(ctx) && attachment != GL_BACK &&
4464 attachment != GL_DEPTH && attachment != GL_STENCIL) {
4466 "%s(invalid attachment %s)", caller,
4467 _mesa_enum_to_string(attachment));
4488 att = get_fb0_attachment(ctx, buffer, attachment);
4492 att = get_attachment(ctx, buffer, attachment, &is_color_attachment);
4500 * is bound to target and attachment is COLOR_ATTACHMENTm where m is
4503 * If we are at this point, is because the attachment is not valid, so
4507 _mesa_error(ctx, GL_INVALID_OPERATION, "%s(invalid color attachment %s)",
4508 caller, _mesa_enum_to_string(attachment));
4510 _mesa_error(ctx, GL_INVALID_ENUM, "%s(invalid attachment %s)", caller,
4511 _mesa_enum_to_string(attachment));
4516 if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
4523 * attachment, since it does not have a single format."
4527 " is invalid for depth+stencil attachment)", caller);
4548 * is bound, attachment is DEPTH or STENCIL, and the number of depth or
4630 (attachment == GL_DEPTH || attachment == GL_STENCIL)) {
4667 * attachment is DEPTH_STENCIL_ATTACHMENT the query will fail and
4671 attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
4684 /* depends on the attachment parameter */
4685 if (attachment == GL_STENCIL_ATTACHMENT) {
4768 _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
4782 get_framebuffer_attachment_parameter(ctx, buffer, attachment, pname,
4790 GLenum attachment,
4812 get_framebuffer_attachment_parameter(ctx, buffer, attachment, pname,
4820 GLenum attachment,
4842 get_framebuffer_attachment_parameter(ctx, buffer, attachment, pname,
5055 * "If an attachment is specified that does not exist in the
5102 /* GL_DEPTH_STENCIL_ATTACHMENT is a valid attachment point only
5104 * extension does not make this attachment point valid on ES 2.0.
5128 "%s(attachment >= max. color attachments)", name);
5145 _mesa_error(ctx, GL_INVALID_ENUM, "%s(invalid attachment %s)", name,
5152 const GLenum attachment)
5154 switch (attachment) {
5156 return &fb->Attachment[BUFFER_BACK_LEFT];
5173 const unsigned i = attachment - GL_COLOR_ATTACHMENT0;
5176 assert(BUFFER_COLOR0 + i < ARRAY_SIZE(fb->Attachment));
5177 return &fb->Attachment[BUFFER_COLOR0 + i];
5182 return &fb->Attachment[BUFFER_DEPTH];
5185 return &fb->Attachment[BUFFER_STENCIL];
5206 * attachment is packed depth/stencil, then we can only use
5224 if (fb->Attachment[BUFFER_DEPTH].Renderbuffer !=
5225 fb->Attachment[BUFFER_STENCIL].Renderbuffer || !has_both)
5433 "glDiscardFramebufferEXT(attachment %s)",