LibGL: Generate GL_OUT_OF_MEMORY error in glBufferData when OOM

This commit is contained in:
Marcus Nilsson 2022-12-06 20:37:53 +01:00 committed by Andreas Kling
parent 54abfcf835
commit f76c7f3788
Notes: sideshowbarker 2024-07-17 03:41:43 +09:00

View file

@ -51,8 +51,7 @@ void GLContext::gl_buffer_data(GLenum target, GLsizeiptr size, void const* data,
auto& target_buffer = target == GL_ELEMENT_ARRAY_BUFFER ? m_element_array_buffer : m_array_buffer;
RETURN_WITH_ERROR_IF(!target_buffer, GL_INVALID_OPERATION);
// FIXME: Report GL_OUT_OF_MEMORY or other errors as needed here
MUST(target_buffer->set_data(data, size));
RETURN_WITH_ERROR_IF(target_buffer->set_data(data, size).is_error(), GL_OUT_OF_MEMORY);
}
void GLContext::gl_buffer_sub_data(GLenum target, GLintptr offset, GLsizeiptr size, void const* data)