Lines Matching refs:attachment

224  * If \p attachment is GL_DEPTH_STENCIL_ATTACHMENT, return a pointer to
225 * the depth buffer attachment point.
226 * Returns if the attachment is a GL_COLOR_ATTACHMENTm_EXT on
228 * if they don't find the attachment.
232 GLenum attachment, bool *is_color_attachment)
241 switch (attachment) {
264 i = attachment - GL_COLOR_ATTACHMENT0_EXT;
290 GLenum attachment)
295 assert(attachment == GL_BACK ||
296 attachment == GL_DEPTH ||
297 attachment == GL_STENCIL);
298 switch (attachment) {
313 switch (attachment) {
338 * attachment, BACK is equivalent to BACK_LEFT."
351 * "If the default framebuffer is bound to target, then attachment must
360 * "If the default framebuffer is bound to <target>, then <attachment>
385 * Remove any texture or renderbuffer attached to the given attachment
492 * Bind a texture object to an attachment point.
513 /* new attachment */
534 * Bind a renderbuffer to an attachment point.
542 /* XXX check if re-doing same attachment, exit early */
559 GLenum attachment,
566 att = get_attachment(ctx, fb, attachment, NULL);
570 if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
571 /* do stencil attachment here (depth already done above) */
580 if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
665 _mesa_debug(NULL, "attachment incomplete: %s\n", msg);
789 * Test if an attachment point is complete and update its Complete field.
790 * \param format if GL_COLOR, this is a color attachment point,
791 * if GL_DEPTH, this is a depth component attachment point,
792 * if GL_STENCIL, this is a stencil component attachment point.
803 /* Look for reasons why the attachment might be incomplete */
1009 /* Start at -2 to more easily loop over all attachment points.
1026 /* check for attachment completeness
1033 fbo_incomplete(ctx, "depth attachment incomplete", -1);
1044 fbo_incomplete(ctx, "stencil attachment incomplete", -1);
1055 fbo_incomplete(ctx, "color attachment incomplete", i);
1081 fbo_incomplete(ctx, "texture attachment incomplete", -1);
1228 "framebuffer attachment layer mode is inconsistent",
1237 * requirement on each attachment. Those additional requirements are
1247 * array texture and the attachment is layered, the depth or layer count
1769 * Remove the specified renderbuffer or texture from any attachment point in
1773 * \c true if the renderbuffer was detached from an attachment point. \c
1841 * attached to one or more attachment points in the currently
1844 * attachment point to which this image was attached in the
1846 * renderbuffer image is first detached from all attachment
2285 * Invalidate a renderbuffer attachment. Called from _mesa_HashWalk().
3156 * Replicate the src attachment point. Used by framebuffer_texture() when
3235 * and decide whether or not the attachment should truly be considered
3238 * \param layered true if attachment should be considered layered, false if
3481 GLenum attachment, const char *caller)
3490 /* Not a hash lookup, so we can afford to get the attachment here. */
3493 get_attachment(ctx, fb, attachment, &is_color_attachment);
3497 "%s(invalid color attachment %s)", caller,
3498 _mesa_enum_to_string(attachment));
3501 "%s(invalid attachment %s)", caller,
3502 _mesa_enum_to_string(attachment));
3513 GLenum attachment,
3523 if (attachment == GL_DEPTH_ATTACHMENT &&
3530 /* The texture object is already attached to the stencil attachment
3532 * attachment's. This is required to prevent a GL error in
3537 } else if (attachment == GL_STENCIL_ATTACHMENT &&
3551 if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
3553 * depth attachment point. Now attach it to the stencil attachment
3574 if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
3587 framebuffer_texture_with_dims_no_error(GLenum target, GLenum attachment,
3601 get_attachment(ctx, fb, attachment, NULL);
3603 _mesa_framebuffer_texture(ctx, fb, attachment, att, texObj, textarget,
3610 GLenum attachment, GLenum textarget,
3642 _mesa_get_and_validate_attachment(ctx, fb, attachment, caller);
3646 _mesa_framebuffer_texture(ctx, fb, attachment, att, texObj, textarget,
3652 _mesa_FramebufferTexture1D_no_error(GLenum target, GLenum attachment,
3656 framebuffer_texture_with_dims_no_error(target, attachment, textarget,
3662 _mesa_FramebufferTexture1D(GLenum target, GLenum attachment,
3665 framebuffer_texture_with_dims(1, target, attachment, textarget, texture,
3671 _mesa_FramebufferTexture2D_no_error(GLenum target, GLenum attachment,
3675 framebuffer_texture_with_dims_no_error(target, attachment, textarget,
3681 _mesa_FramebufferTexture2D(GLenum target, GLenum attachment,
3684 framebuffer_texture_with_dims(2, target, attachment, textarget, texture,
3690 _mesa_FramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment,
3694 framebuffer_texture_with_dims(2, target, attachment, textarget, texture,
3700 _mesa_FramebufferTexture3D_no_error(GLenum target, GLenum attachment,
3704 framebuffer_texture_with_dims_no_error(target, attachment, textarget,
3710 _mesa_FramebufferTexture3D(GLenum target, GLenum attachment,
3714 framebuffer_texture_with_dims(3, target, attachment, textarget, texture,
3721 GLenum attachment, GLuint texture,
3759 /* Get the texture object and framebuffer attachment*/
3764 att = get_attachment(ctx, fb, attachment, NULL);
3770 att = _mesa_get_and_validate_attachment(ctx, fb, attachment, func);
3804 _mesa_framebuffer_texture(ctx, fb, attachment, att, texObj, textarget,
3809 _mesa_FramebufferTextureLayer_no_error(GLenum target, GLenum attachment,
3813 frame_buffer_texture(0, target, attachment, texture, level, layer,
3819 _mesa_FramebufferTextureLayer(GLenum target, GLenum attachment,
3822 frame_buffer_texture(0, target, attachment, texture, level, layer,
3829 GLenum attachment,
3833 frame_buffer_texture(framebuffer, 0, attachment, texture, level, layer,
3839 _mesa_NamedFramebufferTextureLayer(GLuint framebuffer, GLenum attachment,
3842 frame_buffer_texture(framebuffer, 0, attachment, texture, level, layer,
3848 _mesa_FramebufferTexture_no_error(GLenum target, GLenum attachment,
3851 frame_buffer_texture(0, target, attachment, texture, level, 0,
3857 _mesa_FramebufferTexture(GLenum target, GLenum attachment,
3860 frame_buffer_texture(0, target, attachment, texture, level, 0,
3865 _mesa_NamedFramebufferTexture_no_error(GLuint framebuffer, GLenum attachment,
3868 frame_buffer_texture(framebuffer, 0, attachment, texture, level, 0,
3874 _mesa_NamedFramebufferTexture(GLuint framebuffer, GLenum attachment,
3877 frame_buffer_texture(framebuffer, 0, attachment, texture, level, 0,
3885 GLenum attachment,
3893 ctx->Driver.FramebufferRenderbuffer(ctx, fb, attachment, rb);
3903 GLenum attachment, GLenum renderbuffertarget,
3925 /* remove renderbuffer attachment */
3937 att = get_attachment(ctx, fb, attachment, &is_color_attachment);
3943 * "An INVALID_OPERATION error is generated if attachment is
3947 * If we are at this point, is because the attachment is not valid, so
3952 "%s(invalid color attachment %s)", func,
3953 _mesa_enum_to_string(attachment));
3956 "%s(invalid attachment %s)", func,
3957 _mesa_enum_to_string(attachment));
3963 if (attachment == GL_DEPTH_STENCIL_ATTACHMENT &&
3975 _mesa_framebuffer_renderbuffer(ctx, fb, attachment, rb);
3980 struct gl_framebuffer *fb, GLenum attachment,
3984 framebuffer_renderbuffer(ctx, fb, attachment, renderbuffertarget,
3990 struct gl_framebuffer *fb, GLenum attachment,
3994 framebuffer_renderbuffer(ctx, fb, attachment, renderbuffertarget,
3999 _mesa_FramebufferRenderbuffer_no_error(GLenum target, GLenum attachment,
4006 framebuffer_renderbuffer_no_error(ctx, fb, attachment, renderbuffertarget,
4011 _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment,
4026 framebuffer_renderbuffer_error(ctx, fb, attachment, renderbuffertarget,
4032 GLenum attachment,
4039 framebuffer_renderbuffer_no_error(ctx, fb, attachment, renderbuffertarget,
4045 _mesa_NamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment,
4057 framebuffer_renderbuffer_error(ctx, fb, attachment, renderbuffertarget,
4066 GLenum attachment, GLenum pname,
4073 /* The error code for an attachment type of GL_NONE differs between APIs.
4109 if (_mesa_is_gles3(ctx) && attachment != GL_BACK &&
4110 attachment != GL_DEPTH && attachment != GL_STENCIL) {
4112 "%s(invalid attachment %s)", caller,
4113 _mesa_enum_to_string(attachment));
4134 att = get_fb0_attachment(ctx, buffer, attachment);
4138 att = get_attachment(ctx, buffer, attachment, &is_color_attachment);
4146 * is bound to target and attachment is COLOR_ATTACHMENTm where m is
4149 * If we are at this point, is because the attachment is not valid, so
4153 _mesa_error(ctx, GL_INVALID_OPERATION, "%s(invalid color attachment %s)",
4154 caller, _mesa_enum_to_string(attachment));
4156 _mesa_error(ctx, GL_INVALID_ENUM, "%s(invalid attachment %s)", caller,
4157 _mesa_enum_to_string(attachment));
4162 if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
4169 * attachment, since it does not have a single format."
4173 " is invalid for depth+stencil attachment)", caller);
4194 * is bound, attachment is DEPTH or STENCIL, and the number of depth or
4276 (attachment == GL_DEPTH || attachment == GL_STENCIL)) {
4313 * attachment is DEPTH_STENCIL_ATTACHMENT the query will fail and
4317 attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
4330 /* depends on the attachment parameter */
4331 if (attachment == GL_STENCIL_ATTACHMENT) {
4414 _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
4428 get_framebuffer_attachment_parameter(ctx, buffer, attachment, pname,
4436 GLenum attachment,
4458 get_framebuffer_attachment_parameter(ctx, buffer, attachment, pname,
4556 * "If an attachment is specified that does not exist in the
4603 /* GL_DEPTH_STENCIL_ATTACHMENT is a valid attachment point only
4605 * extension does not make this attachment point valid on ES 2.0.
4629 "%s(attachment >= max. color attachments)", name);
4646 _mesa_error(ctx, GL_INVALID_ENUM, "%s(invalid attachment %s)", name,
4653 const GLenum attachment)
4655 switch (attachment) {
4674 const unsigned i = attachment - GL_COLOR_ATTACHMENT0;
4706 * attachment is packed depth/stencil, then we can only use
4932 "glDiscardFramebufferEXT(attachment %s)",