mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-05 01:55:21 +03: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:
parent
b2e75929f4
commit
7833f25f8f
Notes:
sideshowbarker
2024-07-17 22:08:25 +09:00
Author: https://github.com/gmta Commit: https://github.com/SerenityOS/serenity/commit/7833f25f8f5 Pull-request: https://github.com/SerenityOS/serenity/pull/11397
@ -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)
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
namespace GL {
|
||||
|
||||
void Texture2D::upload_texture_data(GLuint lod, GLint internal_format, GLsizei width, GLsizei height, GLint, GLenum format, GLenum type, const GLvoid* pixels, GLsizei pixels_per_row, u8 byte_alignment)
|
||||
void Texture2D::upload_texture_data(GLuint lod, GLint internal_format, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels, GLsizei pixels_per_row, u8 byte_alignment)
|
||||
{
|
||||
// NOTE: Some target, format, and internal formats are currently unsupported.
|
||||
// Considering we control this library, and `gl.h` itself, we don't need to add any
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
public:
|
||||
virtual bool is_texture_2d() const override { return true; }
|
||||
|
||||
void upload_texture_data(GLuint lod, GLint internal_format, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels, GLsizei pixels_per_row, u8 byte_alignment);
|
||||
void upload_texture_data(GLuint lod, GLint internal_format, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels, GLsizei pixels_per_row, u8 byte_alignment);
|
||||
void replace_sub_texture_data(GLuint lod, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels, GLsizei pixels_per_row, u8 byte_alignment);
|
||||
|
||||
MipMap const& mipmap(unsigned lod) const
|
||||
|
Loading…
Reference in New Issue
Block a user