1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

LibGL: Remove stubbed border from glTexImage2D

Providing anything else than `border == 0` is deprecated and should
result in an invalid value error.
This commit is contained in:
Jelle Raaijmakers 2021-12-26 15:30:20 +01:00 committed by Andreas Kling
parent b2e75929f4
commit 7833f25f8f
3 changed files with 4 additions and 4 deletions

View file

@ -818,7 +818,7 @@ void SoftwareGLContext::gl_tex_image_2d(GLenum target, GLint level, GLint intern
// Check if width and height are a power of 2
RETURN_WITH_ERROR_IF((width & (width - 1)) != 0, GL_INVALID_VALUE);
RETURN_WITH_ERROR_IF((height & (height - 1)) != 0, GL_INVALID_VALUE);
RETURN_WITH_ERROR_IF(border < 0 || border > 1, GL_INVALID_VALUE);
RETURN_WITH_ERROR_IF(border != 0, GL_INVALID_VALUE);
if (level == 0) {
// FIXME: OpenGL has the concept of texture and mipmap completeness. A texture has to fulfill certain criteria to be considered complete.
@ -844,7 +844,7 @@ void SoftwareGLContext::gl_tex_image_2d(GLenum target, GLint level, GLint intern
m_sampler_config_is_dirty = true;
}
m_active_texture_unit->bound_texture_2d()->upload_texture_data(level, internal_format, width, height, border, format, type, data, m_unpack_row_length, m_unpack_alignment);
m_active_texture_unit->bound_texture_2d()->upload_texture_data(level, internal_format, width, height, format, type, data, m_unpack_row_length, m_unpack_alignment);
}
void SoftwareGLContext::gl_tex_sub_image_2d(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* data)