diff options
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r-- | src/mesa/main/fbobject.c | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index d9696997f64..2aec5cda6c6 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -208,7 +208,7 @@ get_framebuffer_target(struct gl_context *ctx, GLenum target) return have_fb_blit ? ctx->DrawBuffer : NULL; case GL_READ_FRAMEBUFFER: return have_fb_blit ? ctx->ReadBuffer : NULL; - case GL_FRAMEBUFFER_EXT: + case GL_FRAMEBUFFER: return ctx->DrawBuffer; default: return NULL; @@ -223,7 +223,7 @@ get_framebuffer_target(struct gl_context *ctx, GLenum target) * default / window-system FB object. * If \p attachment is GL_DEPTH_STENCIL_ATTACHMENT, return a pointer to * the depth buffer attachment point. - * Returns if the attachment is a GL_COLOR_ATTACHMENTm_EXT on + * Returns if the attachment is a GL_COLOR_ATTACHMENTm on * is_color_attachment, because several callers would return different errors * if they don't find the attachment. */ @@ -239,29 +239,29 @@ get_attachment(struct gl_context *ctx, struct gl_framebuffer *fb, *is_color_attachment = false; switch (attachment) { - case GL_COLOR_ATTACHMENT0_EXT: - case GL_COLOR_ATTACHMENT1_EXT: - case GL_COLOR_ATTACHMENT2_EXT: - case GL_COLOR_ATTACHMENT3_EXT: - case GL_COLOR_ATTACHMENT4_EXT: - case GL_COLOR_ATTACHMENT5_EXT: - case GL_COLOR_ATTACHMENT6_EXT: - case GL_COLOR_ATTACHMENT7_EXT: - case GL_COLOR_ATTACHMENT8_EXT: - case GL_COLOR_ATTACHMENT9_EXT: - case GL_COLOR_ATTACHMENT10_EXT: - case GL_COLOR_ATTACHMENT11_EXT: - case GL_COLOR_ATTACHMENT12_EXT: - case GL_COLOR_ATTACHMENT13_EXT: - case GL_COLOR_ATTACHMENT14_EXT: - case GL_COLOR_ATTACHMENT15_EXT: + case GL_COLOR_ATTACHMENT0: + case GL_COLOR_ATTACHMENT1: + case GL_COLOR_ATTACHMENT2: + case GL_COLOR_ATTACHMENT3: + case GL_COLOR_ATTACHMENT4: + case GL_COLOR_ATTACHMENT5: + case GL_COLOR_ATTACHMENT6: + case GL_COLOR_ATTACHMENT7: + case GL_COLOR_ATTACHMENT8: + case GL_COLOR_ATTACHMENT9: + case GL_COLOR_ATTACHMENT10: + case GL_COLOR_ATTACHMENT11: + case GL_COLOR_ATTACHMENT12: + case GL_COLOR_ATTACHMENT13: + case GL_COLOR_ATTACHMENT14: + case GL_COLOR_ATTACHMENT15: if (is_color_attachment) *is_color_attachment = true; /* Only OpenGL ES 1.x forbids color attachments other than * GL_COLOR_ATTACHMENT0. For all other APIs the limit set by the * hardware is used. */ - i = attachment - GL_COLOR_ATTACHMENT0_EXT; + i = attachment - GL_COLOR_ATTACHMENT0; if (i >= ctx->Const.MaxColorAttachments || (i > 0 && ctx->API == API_OPENGLES)) { return NULL; @@ -271,9 +271,9 @@ get_attachment(struct gl_context *ctx, struct gl_framebuffer *fb, if (!_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx)) return NULL; /* fall-through */ - case GL_DEPTH_ATTACHMENT_EXT: + case GL_DEPTH_ATTACHMENT: return &fb->Attachment[BUFFER_DEPTH]; - case GL_STENCIL_ATTACHMENT_EXT: + case GL_STENCIL_ATTACHMENT: return &fb->Attachment[BUFFER_STENCIL]; default: return NULL; @@ -400,7 +400,7 @@ remove_attachment(struct gl_context *ctx, _mesa_reference_texobj(&att->Texture, NULL); /* unbind */ assert(!att->Texture); } - if (att->Type == GL_TEXTURE || att->Type == GL_RENDERBUFFER_EXT) { + if (att->Type == GL_TEXTURE || att->Type == GL_RENDERBUFFER) { assert(!att->Texture); _mesa_reference_renderbuffer(&att->Renderbuffer, NULL); /* unbind */ assert(!att->Renderbuffer); @@ -541,7 +541,7 @@ set_renderbuffer_attachment(struct gl_context *ctx, { /* XXX check if re-doing same attachment, exit early */ remove_attachment(ctx, att); - att->Type = GL_RENDERBUFFER_EXT; + att->Type = GL_RENDERBUFFER; att->Texture = NULL; /* just to be safe */ att->Layered = GL_FALSE; att->Complete = GL_FALSE; @@ -569,7 +569,7 @@ _mesa_FramebufferRenderbuffer_sw(struct gl_context *ctx, set_renderbuffer_attachment(ctx, att, rb); if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) { /* do stencil attachment here (depth already done above) */ - att = get_attachment(ctx, fb, GL_STENCIL_ATTACHMENT_EXT, NULL); + att = get_attachment(ctx, fb, GL_STENCIL_ATTACHMENT, NULL); assert(att); set_renderbuffer_attachment(ctx, att, rb); } @@ -579,7 +579,7 @@ _mesa_FramebufferRenderbuffer_sw(struct gl_context *ctx, remove_attachment(ctx, att); if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) { /* detach stencil (depth was detached above) */ - att = get_attachment(ctx, fb, GL_STENCIL_ATTACHMENT_EXT, NULL); + att = get_attachment(ctx, fb, GL_STENCIL_ATTACHMENT, NULL); assert(att); remove_attachment(ctx, att); } @@ -642,7 +642,7 @@ _mesa_has_depthstencil_combined(const struct gl_framebuffer *fb) &fb->Attachment[BUFFER_STENCIL]; if (depth->Type == stencil->Type) { - if (depth->Type == GL_RENDERBUFFER_EXT && + if (depth->Type == GL_RENDERBUFFER && depth->Renderbuffer == stencil->Renderbuffer) return GL_TRUE; @@ -776,7 +776,7 @@ is_legal_depth_format(const struct gl_context *ctx, GLenum baseFormat) { switch (baseFormat) { case GL_DEPTH_COMPONENT: - case GL_DEPTH_STENCIL_EXT: + case GL_DEPTH_STENCIL: return GL_TRUE; default: return GL_FALSE; @@ -909,7 +909,7 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format, } } } - else if (att->Type == GL_RENDERBUFFER_EXT) { + else if (att->Type == GL_RENDERBUFFER) { const GLenum baseFormat = att->Renderbuffer->_BaseFormat; assert(att->Renderbuffer); @@ -1028,7 +1028,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, att = &fb->Attachment[BUFFER_DEPTH]; test_attachment_completeness(ctx, GL_DEPTH, att); if (!att->Complete) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT; + fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT; fbo_incomplete(ctx, "depth attachment incomplete", -1); return; } else if (att->Type != GL_NONE) { @@ -1039,7 +1039,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, att = &fb->Attachment[BUFFER_STENCIL]; test_attachment_completeness(ctx, GL_STENCIL, att); if (!att->Complete) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT; + fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT; fbo_incomplete(ctx, "stencil attachment incomplete", -1); return; } else if (att->Type != GL_NONE) { @@ -1050,7 +1050,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, att = &fb->Attachment[BUFFER_COLOR0 + i]; test_attachment_completeness(ctx, GL_COLOR, att); if (!att->Complete) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT; + fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT; fbo_incomplete(ctx, "color attachment incomplete", i); return; } @@ -1095,7 +1095,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, attNumSamples = texImg->NumSamples; attNumStorageSamples = attNumSamples; } - else if (att->Type == GL_RENDERBUFFER_EXT) { + else if (att->Type == GL_RENDERBUFFER) { minWidth = MIN2(minWidth, att->Renderbuffer->Width); maxWidth = MAX2(minWidth, att->Renderbuffer->Width); minHeight = MIN2(minHeight, att->Renderbuffer->Height); @@ -1291,13 +1291,13 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, fb->_HasAttachments = false; if (!ctx->Extensions.ARB_framebuffer_no_attachments) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT; + fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT; fbo_incomplete(ctx, "no attachments", -1); return; } if (fb->DefaultGeometry.Width == 0 || fb->DefaultGeometry.Height == 0) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT; + fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT; fbo_incomplete(ctx, "no attachments and default width or height is 0", -1); return; } @@ -1311,7 +1311,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, = get_attachment(ctx, fb, fb->ColorDrawBuffer[j], NULL); assert(att); if (att->Type == GL_NONE) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT; + fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER; fbo_incomplete(ctx, "missing drawbuffer", j); return; } @@ -1324,7 +1324,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, = get_attachment(ctx, fb, fb->ColorReadBuffer, NULL); assert(att); if (att->Type == GL_NONE) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT; + fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER; fbo_incomplete(ctx, "missing readbuffer", -1); return; } @@ -1346,7 +1346,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, } /* Provisionally set status = COMPLETE ... */ - fb->_Status = GL_FRAMEBUFFER_COMPLETE_EXT; + fb->_Status = GL_FRAMEBUFFER_COMPLETE; /* ... but the driver may say the FB is incomplete. * Drivers will most likely set the status to GL_FRAMEBUFFER_UNSUPPORTED @@ -1354,7 +1354,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, */ if (ctx->Driver.ValidateFramebuffer) { ctx->Driver.ValidateFramebuffer(ctx, fb); - if (fb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { + if (fb->_Status != GL_FRAMEBUFFER_COMPLETE) { fbo_incomplete(ctx, "driver marked FBO as incomplete", -1); return; } @@ -1413,7 +1413,7 @@ bind_renderbuffer(GLenum target, GLuint renderbuffer) struct gl_renderbuffer *newRb; GET_CURRENT_CONTEXT(ctx); - if (target != GL_RENDERBUFFER_EXT) { + if (target != GL_RENDERBUFFER) { _mesa_error(ctx, GL_INVALID_ENUM, "glBindRenderbufferEXT(target)"); return; } @@ -1812,7 +1812,7 @@ _mesa_DeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers) if (rb == ctx->CurrentRenderbuffer) { /* bind default */ assert(rb->RefCount >= 2); - _mesa_BindRenderbuffer(GL_RENDERBUFFER_EXT, 0); + _mesa_BindRenderbuffer(GL_RENDERBUFFER, 0); } /* Section 4.4.2 (Attaching Images to Framebuffer Objects), @@ -1937,7 +1937,7 @@ _mesa_CreateRenderbuffers(GLsizei n, GLuint *renderbuffers) /** * Given an internal format token for a render buffer, return the * corresponding base format (one of GL_RGB, GL_RGBA, GL_STENCIL_INDEX, - * GL_DEPTH_COMPONENT, GL_DEPTH_STENCIL_EXT, GL_ALPHA, GL_LUMINANCE, + * GL_DEPTH_COMPONENT, GL_DEPTH_STENCIL, GL_ALPHA, GL_LUMINANCE, * GL_LUMINANCE_ALPHA, GL_INTENSITY, etc). * * This is similar to _mesa_base_tex_format() but the set of valid @@ -2012,7 +2012,7 @@ _mesa_base_fbo_format(const struct gl_context *ctx, GLenum internalFormat) case GL_STENCIL_INDEX: case GL_STENCIL_INDEX1_EXT: case GL_STENCIL_INDEX4_EXT: - case GL_STENCIL_INDEX16_EXT: + case GL_STENCIL_INDEX16: /* There are extensions for GL_STENCIL_INDEX1 and GL_STENCIL_INDEX4 in * OpenGL ES, but Mesa does not currently support them. */ @@ -2470,7 +2470,7 @@ renderbuffer_storage_target(GLenum target, GLenum internalFormat, width, height, samples); } - if (target != GL_RENDERBUFFER_EXT) { + if (target != GL_RENDERBUFFER) { _mesa_error(ctx, GL_INVALID_ENUM, "%s(target)", func); return; } @@ -2636,21 +2636,21 @@ get_render_buffer_parameteriv(struct gl_context *ctx, */ switch (pname) { - case GL_RENDERBUFFER_WIDTH_EXT: + case GL_RENDERBUFFER_WIDTH: *params = rb->Width; return; - case GL_RENDERBUFFER_HEIGHT_EXT: + case GL_RENDERBUFFER_HEIGHT: *params = rb->Height; return; - case GL_RENDERBUFFER_INTERNAL_FORMAT_EXT: + case GL_RENDERBUFFER_INTERNAL_FORMAT: *params = rb->InternalFormat; return; - case GL_RENDERBUFFER_RED_SIZE_EXT: - case GL_RENDERBUFFER_GREEN_SIZE_EXT: - case GL_RENDERBUFFER_BLUE_SIZE_EXT: - case GL_RENDERBUFFER_ALPHA_SIZE_EXT: - case GL_RENDERBUFFER_DEPTH_SIZE_EXT: - case GL_RENDERBUFFER_STENCIL_SIZE_EXT: + case GL_RENDERBUFFER_RED_SIZE: + case GL_RENDERBUFFER_GREEN_SIZE: + case GL_RENDERBUFFER_BLUE_SIZE: + case GL_RENDERBUFFER_ALPHA_SIZE: + case GL_RENDERBUFFER_DEPTH_SIZE: + case GL_RENDERBUFFER_STENCIL_SIZE: *params = get_component_bits(pname, rb->_BaseFormat, rb->Format); return; case GL_RENDERBUFFER_SAMPLES: @@ -2677,7 +2677,7 @@ _mesa_GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params) { GET_CURRENT_CONTEXT(ctx); - if (target != GL_RENDERBUFFER_EXT) { + if (target != GL_RENDERBUFFER) { _mesa_error(ctx, GL_INVALID_ENUM, "glGetRenderbufferParameterivEXT(target)"); return; @@ -2784,15 +2784,15 @@ bind_framebuffer(GLenum target, GLuint framebuffer) GET_CURRENT_CONTEXT(ctx); switch (target) { - case GL_DRAW_FRAMEBUFFER_EXT: + case GL_DRAW_FRAMEBUFFER: bindDrawBuf = GL_TRUE; bindReadBuf = GL_FALSE; break; - case GL_READ_FRAMEBUFFER_EXT: + case GL_READ_FRAMEBUFFER: bindDrawBuf = GL_FALSE; bindReadBuf = GL_TRUE; break; - case GL_FRAMEBUFFER_EXT: + case GL_FRAMEBUFFER: bindDrawBuf = GL_TRUE; bindReadBuf = GL_TRUE; break; @@ -3033,7 +3033,7 @@ _mesa_check_framebuffer_status(struct gl_context *ctx, if (_mesa_is_winsys_fbo(buffer)) { /* EGL_KHR_surfaceless_context allows the winsys FBO to be incomplete. */ if (buffer != &IncompleteFramebuffer) { - return GL_FRAMEBUFFER_COMPLETE_EXT; + return GL_FRAMEBUFFER_COMPLETE; } else { return GL_FRAMEBUFFER_UNDEFINED; } @@ -4152,7 +4152,7 @@ get_framebuffer_attachment_parameter(struct gl_context *ctx, /* No need to flush here */ switch (pname) { - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: /* From the OpenGL spec, 9.2. Binding and Managing Framebuffer Objects: * * "If the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is NONE, then @@ -4167,8 +4167,8 @@ get_framebuffer_attachment_parameter(struct gl_context *ctx, *params = (_mesa_is_winsys_fbo(buffer) && att->Type != GL_NONE) ? GL_FRAMEBUFFER_DEFAULT : att->Type; return; - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT: - if (att->Type == GL_RENDERBUFFER_EXT) { + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: + if (att->Type == GL_RENDERBUFFER) { *params = att->Renderbuffer->Name; } else if (att->Type == GL_TEXTURE) { @@ -4183,7 +4183,7 @@ get_framebuffer_attachment_parameter(struct gl_context *ctx, } } return; - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: if (att->Type == GL_TEXTURE) { *params = att->TextureLevel; } @@ -4195,7 +4195,7 @@ get_framebuffer_attachment_parameter(struct gl_context *ctx, goto invalid_pname_enum; } return; - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: if (att->Type == GL_TEXTURE) { if (att->Texture && att->Texture->Target == GL_TEXTURE_CUBE_MAP) { *params = GL_TEXTURE_CUBE_MAP_POSITIVE_X + att->CubeMapFace; |