Skip to content
  • 小田喜陽彦's avatar
    vrend: Check GL errors · 8d452da8
    小田喜陽彦 authored and Marge Bot's avatar Marge Bot committed
    
    
    There are many combinations of invalid arguments for OpenGL functions
    and it is impractical to cover all of them.
    
    Even if nothing is wrong with the user, GL_CONTEXT_LOST and
    GL_OUT_OF_MEMORY can also occur in many GL functions due to hardware
    problems. They can leave the context in an invalid state which can
    result in a reliability or security issue.
    
    Check GL errors after an operation completes and prevent from using the
    GL context after a GL error occurred.
    
    spec@!opengl 1.5@draw-vertices, spec@!opengl 1.5@draw-vertices-user,
    and spec@!opengl 2.0@gl-2.0-vertexattribpointer are marked as crash in
    .gitlab-ci/expectations/host/piglit-virgl-gles-fails.txt because they
    require GL_DOUBLE specification for glVertexAttribPointer, which is
    not supported by OpenGL ES. Avoiding the crashes requires capability
    checks on the guest, which this change does not implement.
    
    Signed-off-by: default avatarAkihiko Odaki <akihiko.odaki@gmail.com>
    Part-of: <!715>
    8d452da8