diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2017-05-22 16:28:14 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2019-03-01 11:43:07 -0800 |
commit | 12f2f98bee2d9312d9a35e3b8bde8ae49962f4fa (patch) | |
tree | 243dbc4582e2fccbca1c7ec75117a7ce78a29649 | |
parent | 64798b37a1eb1821f7075d7d33ee20ed027208c7 (diff) |
mesa: Remove _EXT suffixes from FBO related enumsalways-ARB_framebuffer_object
All of the enums from GL_EXT_framebuffer_object,
GL_EXT_framebuffer_blit, GL_EXT_framebuffer_multisample,
GL_EXT_framebuffer_sRGB, and GL_EXT_packed_depth_stencil that were
eventually given unsuffixed names. Generated by the following script:
find src -name *.h -o -name *.c -o -name *.cpp -o -name *.hpp |\
while read f; do
if [ ! -h $f ]; then
sed --in-place -e 's/\(COLOR_ATTACHMENT.\)_EXT/\1/g' \
-e 's/\(GL_COLOR_ATTACHMENT..\)_EXT/\1/g' \
-e 's/\(GL_DEPTH24_STENCIL8\)_EXT/\1/g' \
-e 's/\(GL_DEPTH_ATTACHMENT\)_EXT/\1/g' \
-e 's/\(GL_DEPTH_STENCIL\)_EXT/\1/g' \
-e 's/\(GL_DRAW_FRAMEBUFFER\)_EXT/\1/g' \
-e 's/\(GL_DRAW_FRAMEBUFFER_BINDING\)_EXT/\1/g' \
-e 's/\(GL_FRAMEBUFFER\)_EXT/\1/g' \
-e 's/\(GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\)_EXT/\1/g' \
-e 's/\(GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\)_EXT/\1/g' \
-e 's/\(GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE\)_EXT/\1/g' \
-e 's/\(GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\)_EXT/\1/g' \
-e 's/\(GL_FRAMEBUFFER_BINDING\)_EXT/\1/g' \
-e 's/\(GL_FRAMEBUFFER_COMPLETE\)_EXT/\1/g' \
-e 's/\(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT\)_EXT/\1/g' \
-e 's/\(GL_FRAMEBUFFER_INCOMPLETE_FORMATS\)_EXT/\1/g' \
-e 's/\(GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER\)_EXT/\1/g' \
-e 's/\(GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\)_EXT/\1/g' \
-e 's/\(GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE\)_EXT/\1/g' \
-e 's/\(GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER\)_EXT/\1/g' \
-e 's/\(GL_FRAMEBUFFER_SRGB\)_EXT/\1/g' \
-e 's/\(GL_FRAMEBUFFER_UNSUPPORTED\)_EXT/\1/g' \
-e 's/\(GL_INVALID_FRAMEBUFFER_OPERATION\)_EXT/\1/g' \
-e 's/\(GL_MAX_COLOR_ATTACHMENTS\)_EXT/\1/g' \
-e 's/\(GL_MAX_RENDERBUFFER_SIZE\)_EXT/\1/g' \
-e 's/\(GL_MAX_SAMPLES\)_EXT/\1/g' \
-e 's/\(GL_READ_FRAMEBUFFER\)_EXT/\1/g' \
-e 's/\(GL_READ_FRAMEBUFFER_BINDING\)_EXT/\1/g' \
-e 's/\(GL_RENDERBUFFER\)_EXT/\1/g' \
-e 's/\(GL_RENDERBUFFER_ALPHA_SIZE\)_EXT/\1/g' \
-e 's/\(GL_RENDERBUFFER_BINDING\)_EXT/\1/g' \
-e 's/\(GL_RENDERBUFFER_BLUE_SIZE\)_EXT/\1/g' \
-e 's/\(GL_RENDERBUFFER_DEPTH_SIZE\)_EXT/\1/g' \
-e 's/\(GL_RENDERBUFFER_GREEN_SIZE\)_EXT/\1/g' \
-e 's/\(GL_RENDERBUFFER_HEIGHT\)_EXT/\1/g' \
-e 's/\(GL_RENDERBUFFER_INTERNAL_FORMAT\)_EXT/\1/g' \
-e 's/\(GL_RENDERBUFFER_RED_SIZE\)_EXT/\1/g' \
-e 's/\(GL_RENDERBUFFER_SAMPLES\)_EXT/\1/g' \
-e 's/\(GL_RENDERBUFFER_STENCIL_SIZE\)_EXT/\1/g' \
-e 's/\(GL_RENDERBUFFER_WIDTH\)_EXT/\1/g' \
-e 's/\(GL_STENCIL_ATTACHMENT\)_EXT/\1/g' \
-e 's/\(GL_STENCIL_INDEX?\)_EXT/\1/g' \
-e 's/\(GL_STENCIL_INDEX16\)_EXT/\1/g' \
-e 's/\(GL_TEXTURE_STENCIL_SIZE\)_EXT/\1/g' $f
fi
done
v2: Prepend GL_ in sed expressions to avoid stripping _EXT from
VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT.
45 files changed, 194 insertions, 194 deletions
diff --git a/src/mesa/drivers/common/meta_generate_mipmap.c b/src/mesa/drivers/common/meta_generate_mipmap.c index 99d0931694d..38cdaa9c1f4 100644 --- a/src/mesa/drivers/common/meta_generate_mipmap.c +++ b/src/mesa/drivers/common/meta_generate_mipmap.c @@ -114,7 +114,7 @@ fallback_required(struct gl_context *ctx, GLenum target, GL_COLOR_ATTACHMENT0, baseImage, 0); status = _mesa_check_framebuffer_status(ctx, mipmap->fb); - if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { + if (status != GL_FRAMEBUFFER_COMPLETE) { _mesa_perf_debug(ctx, MESA_DEBUG_SEVERITY_HIGH, "glGenerateMipmap() got incomplete FBO\n"); return true; diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c index 8ed8ff555ba..3c5802638c9 100644 --- a/src/mesa/drivers/dri/i915/i830_vtbl.c +++ b/src/mesa/drivers/dri/i915/i830_vtbl.c @@ -735,7 +735,7 @@ i830_update_draw_buffer(struct intel_context *intel) _mesa_update_draw_buffer_bounds(ctx, ctx->DrawBuffer); } - if (fb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { + if (fb->_Status != GL_FRAMEBUFFER_COMPLETE) { /* this may occur when we're called by glBindFrameBuffer() during * the process of someone setting up renderbuffers, etc. */ diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c index 562c83a665f..43ccc83d3ce 100644 --- a/src/mesa/drivers/dri/i915/i915_vtbl.c +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c @@ -723,7 +723,7 @@ i915_update_draw_buffer(struct intel_context *intel) _mesa_update_draw_buffer_bounds(ctx, ctx->DrawBuffer); } - if (fb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { + if (fb->_Status != GL_FRAMEBUFFER_COMPLETE) { /* this may occur when we're called by glBindFrameBuffer() during * the process of someone setting up renderbuffers, etc. */ diff --git a/src/mesa/drivers/dri/i915/intel_fbo.c b/src/mesa/drivers/dri/i915/intel_fbo.c index 78e2c1e6614..f6ea543649c 100644 --- a/src/mesa/drivers/dri/i915/intel_fbo.c +++ b/src/mesa/drivers/dri/i915/intel_fbo.c @@ -178,13 +178,13 @@ intel_renderbuffer_format(struct gl_context * ctx, GLenum internalFormat) case GL_DEPTH_COMPONENT24: case GL_DEPTH_COMPONENT32: return MESA_FORMAT_Z24_UNORM_X8_UINT; - case GL_DEPTH_STENCIL_EXT: - case GL_DEPTH24_STENCIL8_EXT: + case GL_DEPTH_STENCIL: + case GL_DEPTH24_STENCIL8: case GL_STENCIL_INDEX: case GL_STENCIL_INDEX1_EXT: case GL_STENCIL_INDEX4_EXT: case GL_STENCIL_INDEX8_EXT: - case GL_STENCIL_INDEX16_EXT: + case GL_STENCIL_INDEX16: /* These aren't actual texture formats, so force them here. */ return MESA_FORMAT_Z24_UNORM_S8_UINT; } @@ -402,11 +402,11 @@ intel_bind_framebuffer(struct gl_context * ctx, GLenum target, UNUSED struct gl_framebuffer *fb, UNUSED struct gl_framebuffer *fbread) { - if (target == GL_FRAMEBUFFER_EXT || target == GL_DRAW_FRAMEBUFFER_EXT) { + if (target == GL_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER) { intel_draw_buffer(ctx); } else { - /* don't need to do anything if target == GL_READ_FRAMEBUFFER_EXT */ + /* don't need to do anything if target == GL_READ_FRAMEBUFFER */ } } diff --git a/src/mesa/drivers/dri/i915/intel_pixel_copy.c b/src/mesa/drivers/dri/i915/intel_pixel_copy.c index 1b1993ea728..bafc8a0b36b 100644 --- a/src/mesa/drivers/dri/i915/intel_pixel_copy.c +++ b/src/mesa/drivers/dri/i915/intel_pixel_copy.c @@ -76,7 +76,7 @@ do_blit_copypixels(struct gl_context * ctx, draw_irb = intel_renderbuffer(fb->_ColorDrawBuffers[0]); read_irb = intel_renderbuffer(read_fb->_ColorReadBuffer); break; - case GL_DEPTH_STENCIL_EXT: + case GL_DEPTH_STENCIL: draw_irb = intel_renderbuffer(fb->Attachment[BUFFER_DEPTH].Renderbuffer); read_irb = intel_renderbuffer(read_fb->Attachment[BUFFER_DEPTH].Renderbuffer); diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c index 5bcd846a1bc..99ae8b9c77f 100644 --- a/src/mesa/drivers/dri/i965/intel_fbo.c +++ b/src/mesa/drivers/dri/i965/intel_fbo.c @@ -267,7 +267,7 @@ intel_renderbuffer_format(struct gl_context * ctx, GLenum internalFormat) case GL_STENCIL_INDEX1_EXT: case GL_STENCIL_INDEX4_EXT: case GL_STENCIL_INDEX8_EXT: - case GL_STENCIL_INDEX16_EXT: + case GL_STENCIL_INDEX16: /* These aren't actual texture formats, so force them here. */ if (brw->has_separate_stencil) { return MESA_FORMAT_S_UINT8; diff --git a/src/mesa/drivers/dri/i965/intel_pixel_copy.c b/src/mesa/drivers/dri/i965/intel_pixel_copy.c index b5c3f6a8e8f..c7019f52cba 100644 --- a/src/mesa/drivers/dri/i965/intel_pixel_copy.c +++ b/src/mesa/drivers/dri/i965/intel_pixel_copy.c @@ -75,7 +75,7 @@ do_blit_copypixels(struct gl_context * ctx, draw_irb = intel_renderbuffer(fb->_ColorDrawBuffers[0]); read_irb = intel_renderbuffer(read_fb->_ColorReadBuffer); break; - case GL_DEPTH_STENCIL_EXT: + case GL_DEPTH_STENCIL: draw_irb = intel_renderbuffer(fb->Attachment[BUFFER_DEPTH].Renderbuffer); read_irb = intel_renderbuffer(read_fb->Attachment[BUFFER_DEPTH].Renderbuffer); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c index ee1a2055445..d3e6414f87c 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c @@ -66,7 +66,7 @@ set_renderbuffer_format(struct gl_renderbuffer *rb, GLenum internalFormat) case GL_DEPTH_COMPONENT: case GL_DEPTH_COMPONENT24: case GL_STENCIL_INDEX8_EXT: - case GL_DEPTH24_STENCIL8_EXT: + case GL_DEPTH24_STENCIL8: rb->_BaseFormat = GL_DEPTH_STENCIL; rb->Format = MESA_FORMAT_S8_UINT_Z24_UNORM; s->cpp = 4; @@ -323,7 +323,7 @@ nouveau_check_framebuffer_complete(struct gl_context *ctx, return; err: - fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT; + fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED; return; } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index a3be805d048..e0c6a66f891 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -269,7 +269,7 @@ nouveau_create_buffer(__DRIscreen *dri_screen, /* Depth/stencil buffer. */ if (visual->depthBits == 24 && visual->stencilBits == 8) { - rb = nouveau_renderbuffer_dri_new(GL_DEPTH24_STENCIL8_EXT, drawable); + rb = nouveau_renderbuffer_dri_new(GL_DEPTH24_STENCIL8, drawable); _mesa_attach_and_own_rb(fb, BUFFER_DEPTH, rb); _mesa_attach_and_reference_rb(fb, BUFFER_STENCIL, rb); diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c index 4c17190b8c4..57c734fc620 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c +++ b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c @@ -56,7 +56,7 @@ nv04_emit_framebuffer(struct gl_context *ctx, int emit) uint32_t rt_pitch = 0, zeta_pitch = 0; unsigned bo_flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR; - if (fb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) + if (fb->_Status != GL_FRAMEBUFFER_COMPLETE) return; PUSH_RESET(push, BUFCTX_FB); diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c index 75931849eb9..039e4aea000 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c @@ -99,7 +99,7 @@ nv10_emit_framebuffer(struct gl_context *ctx, int emit) unsigned rt_pitch = 0, zeta_pitch = 0; unsigned bo_flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR; - if (fb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) + if (fb->_Status != GL_FRAMEBUFFER_COMPLETE) return; PUSH_RESET(push, BUFCTX_FB); diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c index cc6b6b06196..e7ad67e5801 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c +++ b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c @@ -84,7 +84,7 @@ nv20_emit_framebuffer(struct gl_context *ctx, int emit) unsigned rt_pitch = 0, zeta_pitch = 0; unsigned bo_flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR; - if (fb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) + if (fb->_Status != GL_FRAMEBUFFER_COMPLETE) return; PUSH_RESET(push, BUFCTX_FB); diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c index a3bf00b09f7..700e13cdb0d 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common.c +++ b/src/mesa/drivers/dri/radeon/radeon_common.c @@ -204,7 +204,7 @@ void radeon_draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb) _mesa_update_draw_buffer_bounds(ctx, ctx->DrawBuffer); } - if (fb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { + if (fb->_Status != GL_FRAMEBUFFER_COMPLETE) { /* this may occur when we're called by glBindFrameBuffer() during * the process of someone setting up renderbuffers, etc. */ diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c index 5f4485de1f7..8ec6e49475d 100644 --- a/src/mesa/drivers/dri/radeon/radeon_fbo.c +++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c @@ -505,7 +505,7 @@ radeon_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffe case GL_STENCIL_INDEX1_EXT: case GL_STENCIL_INDEX4_EXT: case GL_STENCIL_INDEX8_EXT: - case GL_STENCIL_INDEX16_EXT: + case GL_STENCIL_INDEX16: /* alloc a depth+stencil buffer */ rb->Format = MESA_FORMAT_Z24_UNORM_S8_UINT; cpp = 4; @@ -520,8 +520,8 @@ radeon_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffe rb->Format = MESA_FORMAT_Z24_UNORM_X8_UINT; cpp = 4; break; - case GL_DEPTH_STENCIL_EXT: - case GL_DEPTH24_STENCIL8_EXT: + case GL_DEPTH_STENCIL: + case GL_DEPTH24_STENCIL8: rb->Format = MESA_FORMAT_Z24_UNORM_S8_UINT; cpp = 4; break; @@ -705,11 +705,11 @@ radeon_bind_framebuffer(struct gl_context * ctx, GLenum target, __func__, ctx, fb, _mesa_enum_to_string(target)); - if (target == GL_FRAMEBUFFER_EXT || target == GL_DRAW_FRAMEBUFFER_EXT) { + if (target == GL_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER) { radeon_draw_buffer(ctx, fb); } else { - /* don't need to do anything if target == GL_READ_FRAMEBUFFER_EXT */ + /* don't need to do anything if target == GL_READ_FRAMEBUFFER */ } } diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index f2d435a375f..0fed42220ae 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -443,8 +443,8 @@ mesa_format radeonChooseTextureFormat(struct gl_context * ctx, case GL_DEPTH_COMPONENT16: case GL_DEPTH_COMPONENT24: case GL_DEPTH_COMPONENT32: - case GL_DEPTH_STENCIL_EXT: - case GL_DEPTH24_STENCIL8_EXT: + case GL_DEPTH_STENCIL: + case GL_DEPTH24_STENCIL8: return MESA_FORMAT_Z24_UNORM_S8_UINT; /* EXT_texture_sRGB */ diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c index a0a206bea67..de2b0bf633b 100644 --- a/src/mesa/main/accum.c +++ b/src/mesa/main/accum.c @@ -485,8 +485,8 @@ _mesa_Accum( GLenum op, GLfloat value ) if (ctx->NewState) _mesa_update_state(ctx); - if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, + if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE) { + _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION, "glAccum(incomplete framebuffer)"); return; } diff --git a/src/mesa/main/blit.c b/src/mesa/main/blit.c index 8bb3ba328a3..b183829ba51 100644 --- a/src/mesa/main/blit.c +++ b/src/mesa/main/blit.c @@ -368,9 +368,9 @@ blit_framebuffer(struct gl_context *ctx, GL_STENCIL_BUFFER_BIT); /* check for complete framebuffers */ - if (drawFb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT || - readFb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, + if (drawFb->_Status != GL_FRAMEBUFFER_COMPLETE || + readFb->_Status != GL_FRAMEBUFFER_COMPLETE) { + _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION, "%s(incomplete draw/read buffers)", func); return; } diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index d98c015bb24..8a4d3a1ccf4 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -141,21 +141,21 @@ draw_buffer_enum_to_bitmask(const struct gl_context *ctx, GLenum buffer) case GL_AUX2: case GL_AUX3: return 1 << BUFFER_COUNT; /* invalid, but not BAD_MASK */ - case GL_COLOR_ATTACHMENT0_EXT: + case GL_COLOR_ATTACHMENT0: return BUFFER_BIT_COLOR0; - case GL_COLOR_ATTACHMENT1_EXT: + case GL_COLOR_ATTACHMENT1: return BUFFER_BIT_COLOR1; - case GL_COLOR_ATTACHMENT2_EXT: + case GL_COLOR_ATTACHMENT2: return BUFFER_BIT_COLOR2; - case GL_COLOR_ATTACHMENT3_EXT: + case GL_COLOR_ATTACHMENT3: return BUFFER_BIT_COLOR3; - case GL_COLOR_ATTACHMENT4_EXT: + case GL_COLOR_ATTACHMENT4: return BUFFER_BIT_COLOR4; - case GL_COLOR_ATTACHMENT5_EXT: + case GL_COLOR_ATTACHMENT5: return BUFFER_BIT_COLOR5; - case GL_COLOR_ATTACHMENT6_EXT: + case GL_COLOR_ATTACHMENT6: return BUFFER_BIT_COLOR6; - case GL_COLOR_ATTACHMENT7_EXT: + case GL_COLOR_ATTACHMENT7: return BUFFER_BIT_COLOR7; default: /* not an error, but also not supported */ @@ -211,21 +211,21 @@ read_buffer_enum_to_index(const struct gl_context *ctx, GLenum buffer) case GL_AUX2: case GL_AUX3: return BUFFER_COUNT; /* invalid, but not -1 */ - case GL_COLOR_ATTACHMENT0_EXT: + case GL_COLOR_ATTACHMENT0: return BUFFER_COLOR0; - case GL_COLOR_ATTACHMENT1_EXT: + case GL_COLOR_ATTACHMENT1: return BUFFER_COLOR1; - case GL_COLOR_ATTACHMENT2_EXT: + case GL_COLOR_ATTACHMENT2: return BUFFER_COLOR2; - case GL_COLOR_ATTACHMENT3_EXT: + case GL_COLOR_ATTACHMENT3: return BUFFER_COLOR3; - case GL_COLOR_ATTACHMENT4_EXT: + case GL_COLOR_ATTACHMENT4: return BUFFER_COLOR4; - case GL_COLOR_ATTACHMENT5_EXT: + case GL_COLOR_ATTACHMENT5: return BUFFER_COLOR5; - case GL_COLOR_ATTACHMENT6_EXT: + case GL_COLOR_ATTACHMENT6: return BUFFER_COLOR6; - case GL_COLOR_ATTACHMENT7_EXT: + case GL_COLOR_ATTACHMENT7: return BUFFER_COLOR7; default: /* not an error, but also not supported */ diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c index 6beff9ed842..34e7f2fafbb 100644 --- a/src/mesa/main/clear.c +++ b/src/mesa/main/clear.c @@ -169,8 +169,8 @@ clear(struct gl_context *ctx, GLbitfield mask, bool no_error) _mesa_update_state( ctx ); /* update _Xmin, etc */ } - if (!no_error && ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, + if (!no_error && ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE) { + _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION, "glClear(incomplete framebuffer)"); return; } diff --git a/src/mesa/main/draw_validate.c b/src/mesa/main/draw_validate.c index 779cd1c12c7..ac62831bc8b 100644 --- a/src/mesa/main/draw_validate.c +++ b/src/mesa/main/draw_validate.c @@ -180,8 +180,8 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where) } } - if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, + if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE) { + _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION, "%s(incomplete framebuffer)", where); return GL_FALSE; } diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c index 2f55dde7b80..b5badbebbfc 100644 --- a/src/mesa/main/drawpix.c +++ b/src/mesa/main/drawpix.c @@ -105,7 +105,7 @@ _mesa_DrawPixels( GLsizei width, GLsizei height, switch (format) { case GL_STENCIL_INDEX: case GL_DEPTH_COMPONENT: - case GL_DEPTH_STENCIL_EXT: + case GL_DEPTH_STENCIL: /* these buffers must exist */ if (!_mesa_dest_buffer_exists(ctx, format)) { _mesa_error(ctx, GL_INVALID_OPERATION, @@ -233,8 +233,8 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height, } /* Check read buffer's status (draw buffer was already checked) */ - if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, + if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE) { + _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION, "glCopyPixels(incomplete framebuffer)" ); goto end; } diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 386556edeed..f6bc7cb4afc 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -1124,7 +1124,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) break; /* GL3.0 - GL_framebuffer_sRGB */ - case GL_FRAMEBUFFER_SRGB_EXT: + case GL_FRAMEBUFFER_SRGB: CHECK_EXTENSION(EXT_framebuffer_sRGB, cap); _mesa_set_framebuffer_srgb(ctx, state); return; @@ -1761,7 +1761,7 @@ _mesa_IsEnabled( GLenum cap ) return ctx->Array.PrimitiveRestartFixedIndex; /* GL3.0 - GL_framebuffer_sRGB */ - case GL_FRAMEBUFFER_SRGB_EXT: + case GL_FRAMEBUFFER_SRGB: CHECK_EXTENSION(EXT_framebuffer_sRGB); return ctx->Color.sRGBEnabled; 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; diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index 935a21624af..d879e0f8203 100644 --- a/src/mesa/main/ff_fragment_shader.cpp +++ b/src/mesa/main/ff_fragment_shader.cpp @@ -287,7 +287,7 @@ static GLuint make_state_key( struct gl_context *ctx, struct state_key *key ) if (samp->CompareMode == GL_COMPARE_R_TO_TEXTURE) { const GLenum format = _mesa_texture_base_format(texObj); key->unit[i].shadow = (format == GL_DEPTH_COMPONENT || - format == GL_DEPTH_STENCIL_EXT); + format == GL_DEPTH_STENCIL); } key->unit[i].ModeRGB = comb->ModeRGB; diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index cf2d2bc555a..76efb617422 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c @@ -136,25 +136,25 @@ _mesa_get_format_bits(mesa_format format, GLenum pname) switch (pname) { case GL_RED_BITS: case GL_TEXTURE_RED_SIZE: - case GL_RENDERBUFFER_RED_SIZE_EXT: + case GL_RENDERBUFFER_RED_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE: case GL_INTERNALFORMAT_RED_SIZE: return info->RedBits; case GL_GREEN_BITS: case GL_TEXTURE_GREEN_SIZE: - case GL_RENDERBUFFER_GREEN_SIZE_EXT: + case GL_RENDERBUFFER_GREEN_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: case GL_INTERNALFORMAT_GREEN_SIZE: return info->GreenBits; case GL_BLUE_BITS: case GL_TEXTURE_BLUE_SIZE: - case GL_RENDERBUFFER_BLUE_SIZE_EXT: + case GL_RENDERBUFFER_BLUE_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: case GL_INTERNALFORMAT_BLUE_SIZE: return info->BlueBits; case GL_ALPHA_BITS: case GL_TEXTURE_ALPHA_SIZE: - case GL_RENDERBUFFER_ALPHA_SIZE_EXT: + case GL_RENDERBUFFER_ALPHA_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: case GL_INTERNALFORMAT_ALPHA_SIZE: return info->AlphaBits; @@ -166,13 +166,13 @@ _mesa_get_format_bits(mesa_format format, GLenum pname) return 0; case GL_DEPTH_BITS: case GL_TEXTURE_DEPTH_SIZE_ARB: - case GL_RENDERBUFFER_DEPTH_SIZE_EXT: + case GL_RENDERBUFFER_DEPTH_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: case GL_INTERNALFORMAT_DEPTH_SIZE: return info->DepthBits; case GL_STENCIL_BITS: - case GL_TEXTURE_STENCIL_SIZE_EXT: - case GL_RENDERBUFFER_STENCIL_SIZE_EXT: + case GL_TEXTURE_STENCIL_SIZE: + case GL_RENDERBUFFER_STENCIL_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: case GL_INTERNALFORMAT_STENCIL_SIZE: return info->StencilBits; diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index c94e8b54b51..399f46f191b 100644 --- a/src/mesa/main/framebuffer.c +++ b/src/mesa/main/framebuffer.c @@ -155,7 +155,7 @@ _mesa_initialize_window_framebuffer(struct gl_framebuffer *fb, } fb->Delete = _mesa_destroy_framebuffer; - fb->_Status = GL_FRAMEBUFFER_COMPLETE_EXT; + fb->_Status = GL_FRAMEBUFFER_COMPLETE; fb->_AllColorBuffersFixedPoint = !visual->floatMode; fb->_HasSNormOrFloatColorBuffer = visual->floatMode; fb->_HasAttachments = true; @@ -184,9 +184,9 @@ _mesa_initialize_user_framebuffer(struct gl_framebuffer *fb, GLuint name) fb->Name = name; fb->RefCount = 1; fb->_NumColorDrawBuffers = 1; - fb->ColorDrawBuffer[0] = GL_COLOR_ATTACHMENT0_EXT; + fb->ColorDrawBuffer[0] = GL_COLOR_ATTACHMENT0; fb->_ColorDrawBufferIndexes[0] = BUFFER_COLOR0; - fb->ColorReadBuffer = GL_COLOR_ATTACHMENT0_EXT; + fb->ColorReadBuffer = GL_COLOR_ATTACHMENT0; fb->_ColorReadBufferIndex = BUFFER_COLOR0; fb->SampleLocationTable = NULL; fb->ProgrammableSampleLocations = 0; @@ -298,7 +298,7 @@ _mesa_resize_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb, for (unsigned i = 0; i < BUFFER_COUNT; i++) { struct gl_renderbuffer_attachment *att = &fb->Attachment[i]; - if (att->Type == GL_RENDERBUFFER_EXT && att->Renderbuffer) { + if (att->Type == GL_RENDERBUFFER && att->Renderbuffer) { struct gl_renderbuffer *rb = att->Renderbuffer; /* only resize if size is changing */ if (rb->Width != width || rb->Height != height) { @@ -732,7 +732,7 @@ renderbuffer_exists(struct gl_context *ctx, _mesa_test_framebuffer_completeness(ctx, fb); } - if (fb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { + if (fb->_Status != GL_FRAMEBUFFER_COMPLETE) { return GL_FALSE; } @@ -791,7 +791,7 @@ renderbuffer_exists(struct gl_context *ctx, return GL_FALSE; } break; - case GL_DEPTH_STENCIL_EXT: + case GL_DEPTH_STENCIL: if (att[BUFFER_DEPTH].Type == GL_NONE || att[BUFFER_STENCIL].Type == GL_NONE) { return GL_FALSE; diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index a6ef2e5bd24..0242458cdd8 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1026,10 +1026,10 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu v->value_int = ctx->Shader.ActiveProgram ? ctx->Shader.ActiveProgram->Name : 0; break; - case GL_READ_FRAMEBUFFER_BINDING_EXT: + case GL_READ_FRAMEBUFFER_BINDING: v->value_int = ctx->ReadBuffer->Name; break; - case GL_RENDERBUFFER_BINDING_EXT: + case GL_RENDERBUFFER_BINDING: v->value_int = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0; break; diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index ea72cab5b3e..f46b7a5af2e 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -389,7 +389,7 @@ _mesa_components_in_format(GLenum format) case GL_LUMINANCE_ALPHA_INTEGER_EXT: case GL_RG: case GL_YCBCR_MESA: - case GL_DEPTH_STENCIL_EXT: + case GL_DEPTH_STENCIL: case GL_RG_INTEGER: return 2; @@ -496,7 +496,7 @@ _mesa_bytes_per_pixel(GLenum format, GLenum type) return -1; case GL_UNSIGNED_INT_24_8_EXT: if (format == GL_DEPTH_COMPONENT || - format == GL_DEPTH_STENCIL_EXT) + format == GL_DEPTH_STENCIL) return sizeof(GLuint); else return -1; @@ -1296,8 +1296,8 @@ GLboolean _mesa_is_depthstencil_format(GLenum format) { switch (format) { - case GL_DEPTH24_STENCIL8_EXT: - case GL_DEPTH_STENCIL_EXT: + case GL_DEPTH24_STENCIL8: + case GL_DEPTH_STENCIL: case GL_DEPTH32F_STENCIL8: return GL_TRUE; default: @@ -1321,9 +1321,9 @@ _mesa_is_depth_or_stencil_format(GLenum format) case GL_STENCIL_INDEX1_EXT: case GL_STENCIL_INDEX4_EXT: case GL_STENCIL_INDEX8_EXT: - case GL_STENCIL_INDEX16_EXT: - case GL_DEPTH_STENCIL_EXT: - case GL_DEPTH24_STENCIL8_EXT: + case GL_STENCIL_INDEX16: + case GL_DEPTH_STENCIL: + case GL_DEPTH24_STENCIL8: case GL_DEPTH_COMPONENT32F: case GL_DEPTH32F_STENCIL8: return GL_TRUE; @@ -1533,7 +1533,7 @@ _mesa_base_format_has_channel(GLenum base_format, GLenum pname) switch (pname) { case GL_TEXTURE_RED_SIZE: case GL_TEXTURE_RED_TYPE: - case GL_RENDERBUFFER_RED_SIZE_EXT: + case GL_RENDERBUFFER_RED_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE: case GL_INTERNALFORMAT_RED_SIZE: case GL_INTERNALFORMAT_RED_TYPE: @@ -1546,7 +1546,7 @@ _mesa_base_format_has_channel(GLenum base_format, GLenum pname) return GL_FALSE; case GL_TEXTURE_GREEN_SIZE: case GL_TEXTURE_GREEN_TYPE: - case GL_RENDERBUFFER_GREEN_SIZE_EXT: + case GL_RENDERBUFFER_GREEN_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: case GL_INTERNALFORMAT_GREEN_SIZE: case GL_INTERNALFORMAT_GREEN_TYPE: @@ -1558,7 +1558,7 @@ _mesa_base_format_has_channel(GLenum base_format, GLenum pname) return GL_FALSE; case GL_TEXTURE_BLUE_SIZE: case GL_TEXTURE_BLUE_TYPE: - case GL_RENDERBUFFER_BLUE_SIZE_EXT: + case GL_RENDERBUFFER_BLUE_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: case GL_INTERNALFORMAT_BLUE_SIZE: case GL_INTERNALFORMAT_BLUE_TYPE: @@ -1569,7 +1569,7 @@ _mesa_base_format_has_channel(GLenum base_format, GLenum pname) return GL_FALSE; case GL_TEXTURE_ALPHA_SIZE: case GL_TEXTURE_ALPHA_TYPE: - case GL_RENDERBUFFER_ALPHA_SIZE_EXT: + case GL_RENDERBUFFER_ALPHA_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: case GL_INTERNALFORMAT_ALPHA_SIZE: case GL_INTERNALFORMAT_ALPHA_TYPE: @@ -1594,7 +1594,7 @@ _mesa_base_format_has_channel(GLenum base_format, GLenum pname) return GL_FALSE; case GL_TEXTURE_DEPTH_SIZE: case GL_TEXTURE_DEPTH_TYPE: - case GL_RENDERBUFFER_DEPTH_SIZE_EXT: + case GL_RENDERBUFFER_DEPTH_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: case GL_INTERNALFORMAT_DEPTH_SIZE: case GL_INTERNALFORMAT_DEPTH_TYPE: @@ -1603,7 +1603,7 @@ _mesa_base_format_has_channel(GLenum base_format, GLenum pname) return GL_TRUE; } return GL_FALSE; - case GL_RENDERBUFFER_STENCIL_SIZE_EXT: + case GL_RENDERBUFFER_STENCIL_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: case GL_INTERNALFORMAT_STENCIL_SIZE: case GL_INTERNALFORMAT_STENCIL_TYPE: diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index cfccdc55520..bcabccfd89b 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -873,7 +873,7 @@ struct gl_texture_image GLenum16 _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_ALPHA, * GL_LUMINANCE, GL_LUMINANCE_ALPHA, * GL_INTENSITY, GL_DEPTH_COMPONENT or - * GL_DEPTH_STENCIL_EXT only. Used for + * GL_DEPTH_STENCIL only. Used for * choosing TexEnv arithmetic. */ mesa_format TexFormat; /**< The actual texture memory format */ @@ -3394,11 +3394,11 @@ struct gl_renderbuffer */ struct gl_renderbuffer_attachment { - GLenum16 Type; /**< \c GL_NONE or \c GL_TEXTURE or \c GL_RENDERBUFFER_EXT */ + GLenum16 Type; /**< \c GL_NONE or \c GL_TEXTURE or \c GL_RENDERBUFFER */ GLboolean Complete; /** - * If \c Type is \c GL_RENDERBUFFER_EXT, this stores a pointer to the + * If \c Type is \c GL_RENDERBUFFER, this stores a pointer to the * application supplied renderbuffer object. */ struct gl_renderbuffer *Renderbuffer; diff --git a/src/mesa/main/objectpurge.c b/src/mesa/main/objectpurge.c index d730f46b8ec..56ce5a37f83 100644 --- a/src/mesa/main/objectpurge.c +++ b/src/mesa/main/objectpurge.c @@ -162,7 +162,7 @@ _mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option) case GL_TEXTURE: retval = texture_object_purgeable(ctx, name, option); break; - case GL_RENDERBUFFER_EXT: + case GL_RENDERBUFFER: retval = renderbuffer_purgeable(ctx, name, option); break; case GL_BUFFER_OBJECT_APPLE: @@ -303,7 +303,7 @@ _mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option) return buffer_object_unpurgeable(ctx, name, option); case GL_TEXTURE: return texture_object_unpurgeable(ctx, name, option); - case GL_RENDERBUFFER_EXT: + case GL_RENDERBUFFER: return renderbuffer_unpurgeable(ctx, name, option); default: _mesa_error(ctx, GL_INVALID_ENUM, @@ -405,7 +405,7 @@ _mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, case GL_BUFFER_OBJECT_APPLE: get_buffer_object_parameteriv(ctx, name, pname, params); break; - case GL_RENDERBUFFER_EXT: + case GL_RENDERBUFFER: get_renderbuffer_parameteriv(ctx, name, pname, params); break; default: diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index 556c860d393..cacbd1a4392 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -829,10 +829,10 @@ read_depth_stencil_pixels(struct gl_context *ctx, dst = (GLubyte *) _mesa_image_address2d(packing, pixels, width, height, - GL_DEPTH_STENCIL_EXT, + GL_DEPTH_STENCIL, type, 0, 0); dstStride = _mesa_image_row_stride(packing, width, - GL_DEPTH_STENCIL_EXT, type); + GL_DEPTH_STENCIL, type); /* Fast 24/8 reads. */ if (type == GL_UNSIGNED_INT_24_8 && @@ -887,7 +887,7 @@ _mesa_readpixels(struct gl_context *ctx, read_depth_pixels(ctx, x, y, width, height, type, pixels, packing); break; - case GL_DEPTH_STENCIL_EXT: + case GL_DEPTH_STENCIL: read_depth_stencil_pixels(ctx, x, y, width, height, type, pixels, packing); break; @@ -1053,8 +1053,8 @@ read_pixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, if (ctx->NewState) _mesa_update_state(ctx); - if (!no_error && ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, + if (!no_error && ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE) { + _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION, "glReadPixels(incomplete framebuffer)" ); return; } diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c index 0e017125ac0..8fc84ae75d5 100644 --- a/src/mesa/main/renderbuffer.c +++ b/src/mesa/main/renderbuffer.c @@ -131,7 +131,7 @@ validate_and_init_renderbuffer_attachment(struct gl_framebuffer *fb, assert(!rb->Name); } - fb->Attachment[bufferName].Type = GL_RENDERBUFFER_EXT; + fb->Attachment[bufferName].Type = GL_RENDERBUFFER; fb->Attachment[bufferName].Complete = GL_TRUE; } diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c index 381edd55451..59dd6e6b2b5 100644 --- a/src/mesa/main/texformat.c +++ b/src/mesa/main/texformat.c @@ -360,8 +360,8 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, assert(ctx->TextureFormatSupported[MESA_FORMAT_R11G11B10_FLOAT]); return MESA_FORMAT_R11G11B10_FLOAT; - case GL_DEPTH_STENCIL_EXT: - case GL_DEPTH24_STENCIL8_EXT: + case GL_DEPTH_STENCIL: + case GL_DEPTH24_STENCIL8: RETURN_IF_SUPPORTED(MESA_FORMAT_S8_UINT_Z24_UNORM); RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_S8_UINT); break; diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index bb4f7006618..658b2333a79 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -735,7 +735,7 @@ _mesa_GetTexSubImage_sw(struct gl_context *ctx, get_tex_depth(ctx, dimensions, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, texImage); } - else if (format == GL_DEPTH_STENCIL_EXT) { + else if (format == GL_DEPTH_STENCIL) { get_tex_depth_stencil(ctx, dimensions, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, texImage); diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index a43915e18d9..fd0057ac9c3 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -2321,8 +2321,8 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions, if (ctx->ReadBuffer->_Status == 0) { _mesa_test_framebuffer_completeness(ctx, ctx->ReadBuffer); } - if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, + if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE) { + _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION, "glCopyTexImage%dD(invalid readbuffer)", dimensions); return GL_TRUE; } @@ -2574,8 +2574,8 @@ copytexsubimage_error_check(struct gl_context *ctx, GLuint dimensions, if (ctx->ReadBuffer->_Status == 0) { _mesa_test_framebuffer_completeness(ctx, ctx->ReadBuffer); } - if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, + if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE) { + _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION, "%s(invalid readbuffer)", caller); return GL_TRUE; } diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index a3ec7241986..79d0e21f654 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -1614,7 +1614,7 @@ get_tex_level_parameter_buffer(struct gl_context *ctx, } break; case GL_TEXTURE_DEPTH_SIZE_ARB: - case GL_TEXTURE_STENCIL_SIZE_EXT: + case GL_TEXTURE_STENCIL_SIZE: *params = _mesa_get_format_bits(texFormat, pname); break; diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 9b64b64ae58..b7f7110f270 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -531,7 +531,7 @@ update_tex_combine(struct gl_context *ctx, const struct gl_texture_object *texObj = texUnit->_Current; GLenum format = texObj->Image[0][texObj->BaseLevel]->_BaseFormat; - if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { + if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL) { format = texObj->DepthMode; } calculate_derived_texenv(&fftexUnit->_EnvMode, fftexUnit->EnvMode, format); diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 2913d4bc067..c19b2de2197 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -333,10 +333,10 @@ _mesa_texstore_z24_s8(TEXSTORE_PARAMS) GLubyte *stencil = malloc(srcWidth * sizeof(GLubyte)); assert(dstFormat == MESA_FORMAT_S8_UINT_Z24_UNORM); - assert(srcFormat == GL_DEPTH_STENCIL_EXT || + assert(srcFormat == GL_DEPTH_STENCIL || srcFormat == GL_DEPTH_COMPONENT || srcFormat == GL_STENCIL_INDEX); - assert(srcFormat != GL_DEPTH_STENCIL_EXT || + assert(srcFormat != GL_DEPTH_STENCIL || srcType == GL_UNSIGNED_INT_24_8_EXT || srcType == GL_FLOAT_32_UNSIGNED_INT_24_8_REV); @@ -412,10 +412,10 @@ _mesa_texstore_s8_z24(TEXSTORE_PARAMS) GLubyte *stencil; assert(dstFormat == MESA_FORMAT_Z24_UNORM_S8_UINT); - assert(srcFormat == GL_DEPTH_STENCIL_EXT || + assert(srcFormat == GL_DEPTH_STENCIL || srcFormat == GL_DEPTH_COMPONENT || srcFormat == GL_STENCIL_INDEX); - assert(srcFormat != GL_DEPTH_STENCIL_EXT || + assert(srcFormat != GL_DEPTH_STENCIL || srcType == GL_UNSIGNED_INT_24_8_EXT || srcType == GL_FLOAT_32_UNSIGNED_INT_24_8_REV); diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index b420f0d62d6..92f6df09ee6 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -383,7 +383,7 @@ st_new_renderbuffer_fb(enum pipe_format format, unsigned samples, boolean sw) break; case PIPE_FORMAT_Z24_UNORM_S8_UINT: case PIPE_FORMAT_S8_UINT_Z24_UNORM: - strb->Base.InternalFormat = GL_DEPTH24_STENCIL8_EXT; + strb->Base.InternalFormat = GL_DEPTH24_STENCIL8; break; case PIPE_FORMAT_Z24X8_UNORM: case PIPE_FORMAT_X8Z24_UNORM: @@ -705,20 +705,20 @@ st_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb) if (depth->Type && stencil->Type && depth->Type != stencil->Type) { st_fbo_invalid("Different Depth/Stencil buffer formats"); - fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT; + fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED; return; } - if (depth->Type == GL_RENDERBUFFER_EXT && - stencil->Type == GL_RENDERBUFFER_EXT && + if (depth->Type == GL_RENDERBUFFER && + stencil->Type == GL_RENDERBUFFER && depth->Renderbuffer != stencil->Renderbuffer) { st_fbo_invalid("Separate Depth/Stencil buffers"); - fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT; + fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED; return; } if (depth->Type == GL_TEXTURE && stencil->Type == GL_TEXTURE && depth->Texture != stencil->Texture) { - fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT; + fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED; st_fbo_invalid("Different Depth/Stencil textures"); return; } @@ -730,12 +730,12 @@ st_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb) } if (!st_validate_attachment(ctx, screen, depth, PIPE_BIND_DEPTH_STENCIL)) { - fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT; + fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED; st_fbo_invalid("Invalid depth attachment"); return; } if (!st_validate_attachment(ctx, screen, stencil, PIPE_BIND_DEPTH_STENCIL)) { - fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT; + fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED; st_fbo_invalid("Invalid stencil attachment"); return; } @@ -745,7 +745,7 @@ st_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb) enum pipe_format format; if (!st_validate_attachment(ctx, screen, att, PIPE_BIND_RENDER_TARGET)) { - fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT; + fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED; st_fbo_invalid("Invalid color attachment"); return; } @@ -761,7 +761,7 @@ st_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb) if (first_format == PIPE_FORMAT_NONE) { first_format = format; } else if (format != first_format) { - fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT; + fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED; st_fbo_invalid("Mixed color formats"); return; } diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 47fe88c40e4..60500b19f43 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -509,7 +509,7 @@ allocate_full_mipmap(const struct st_texture_object *stObj, return TRUE; if (stImage->base._BaseFormat == GL_DEPTH_COMPONENT || - stImage->base._BaseFormat == GL_DEPTH_STENCIL_EXT) + stImage->base._BaseFormat == GL_DEPTH_STENCIL) /* depth/stencil textures are seldom mipmapped */ return FALSE; diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index febde1a5e97..1450059092f 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -1372,7 +1372,7 @@ static const struct format_mapping format_map[] = { /* stencil formats */ { { GL_STENCIL_INDEX, GL_STENCIL_INDEX1_EXT, GL_STENCIL_INDEX4_EXT, - GL_STENCIL_INDEX8_EXT, GL_STENCIL_INDEX16_EXT, 0 }, + GL_STENCIL_INDEX8_EXT, GL_STENCIL_INDEX16, 0 }, { PIPE_FORMAT_S8_UINT, PIPE_FORMAT_Z24_UNORM_S8_UINT, PIPE_FORMAT_S8_UINT_Z24_UNORM, 0 @@ -1381,7 +1381,7 @@ static const struct format_mapping format_map[] = { /* Depth / Stencil formats */ { - { GL_DEPTH_STENCIL_EXT, GL_DEPTH24_STENCIL8_EXT, 0 }, + { GL_DEPTH_STENCIL, GL_DEPTH24_STENCIL8, 0 }, { PIPE_FORMAT_Z24_UNORM_S8_UINT, PIPE_FORMAT_S8_UINT_Z24_UNORM, 0 } }, { diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c index d0703fa07a6..198926ddd9e 100644 --- a/src/mesa/swrast/s_copypix.c +++ b/src/mesa/swrast/s_copypix.c @@ -457,7 +457,7 @@ swrast_fast_copy_pixels(struct gl_context *ctx, dstRb = dstFb->Attachment[BUFFER_DEPTH].Renderbuffer; } else { - assert(type == GL_DEPTH_STENCIL_EXT); + assert(type == GL_DEPTH_STENCIL); /* XXX correct? */ srcRb = srcFb->Attachment[BUFFER_DEPTH].Renderbuffer; dstRb = dstFb->Attachment[BUFFER_DEPTH].Renderbuffer; @@ -649,7 +649,7 @@ _swrast_CopyPixels(struct gl_context *ctx, case GL_STENCIL: copy_stencil_pixels( ctx, srcx, srcy, width, height, destx, desty ); break; - case GL_DEPTH_STENCIL_EXT: + case GL_DEPTH_STENCIL: /* Copy buffers separately (if the fast copy path wasn't taken) */ copy_depth_pixels(ctx, srcx, srcy, width, height, destx, desty); copy_stencil_pixels(ctx, srcx, srcy, width, height, destx, desty); diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index 7ee401b2d4c..d82ab6a3606 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -567,7 +567,7 @@ fast_draw_depth_stencil(struct gl_context *ctx, GLint x, GLint y, const struct gl_pixelstore_attrib *unpack, const GLvoid *pixels) { - const GLenum format = GL_DEPTH_STENCIL_EXT; + const GLenum format = GL_DEPTH_STENCIL; const GLenum type = GL_UNSIGNED_INT_24_8; struct gl_renderbuffer *rb = ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer; @@ -657,7 +657,7 @@ draw_depth_stencil_pixels(struct gl_context *ctx, GLint x, GLint y, for (i = 0; i < height; i++) { const GLuint *depthStencilSrc = (const GLuint *) _mesa_image_address2d(&clippedUnpack, pixels, width, height, - GL_DEPTH_STENCIL_EXT, type, i, 0); + GL_DEPTH_STENCIL, type, i, 0); if (ctx->Depth.Mask) { _mesa_unpack_depth_span(ctx, width, @@ -750,7 +750,7 @@ _swrast_DrawPixels( struct gl_context *ctx, draw_depth_pixels( ctx, x, y, width, height, type, unpack, pixels ); swrast_render_finish(ctx); break; - case GL_DEPTH_STENCIL_EXT: + case GL_DEPTH_STENCIL: swrast_render_start(ctx); draw_depth_stencil_pixels(ctx, x, y, width, height, type, unpack, pixels); swrast_render_finish(ctx); diff --git a/src/mesa/swrast/s_renderbuffer.c b/src/mesa/swrast/s_renderbuffer.c index 8c97e4e11b4..4cb70a7b7b1 100644 --- a/src/mesa/swrast/s_renderbuffer.c +++ b/src/mesa/swrast/s_renderbuffer.c @@ -94,7 +94,7 @@ soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, case GL_STENCIL_INDEX1_EXT: case GL_STENCIL_INDEX4_EXT: case GL_STENCIL_INDEX8_EXT: - case GL_STENCIL_INDEX16_EXT: + case GL_STENCIL_INDEX16: rb->Format = MESA_FORMAT_S_UINT8; break; case GL_DEPTH_COMPONENT: @@ -107,8 +107,8 @@ soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, case GL_DEPTH_COMPONENT32: rb->Format = MESA_FORMAT_Z_UNORM32; break; - case GL_DEPTH_STENCIL_EXT: - case GL_DEPTH24_STENCIL8_EXT: + case GL_DEPTH_STENCIL: + case GL_DEPTH24_STENCIL8: rb->Format = MESA_FORMAT_S8_UINT_Z24_UNORM; break; default: diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c index 314170fc751..b8f7ff21f7b 100644 --- a/src/mesa/swrast/s_texfilter.c +++ b/src/mesa/swrast/s_texfilter.c @@ -835,7 +835,7 @@ static GLboolean is_depth_texture(const struct gl_texture_object *tObj) { GLenum format = _mesa_texture_base_format(tObj); - return format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT; + return format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL; } @@ -3557,7 +3557,7 @@ sample_depth_texture( struct gl_context *ctx, GLfloat result; assert(img->_BaseFormat == GL_DEPTH_COMPONENT || - img->_BaseFormat == GL_DEPTH_STENCIL_EXT); + img->_BaseFormat == GL_DEPTH_STENCIL); assert(tObj->Target == GL_TEXTURE_1D || tObj->Target == GL_TEXTURE_2D || |