Prevent crashing when no current program is set.
This fixes a regression caused by
https://swiftshader-review.googlesource.com/14489
Context::applyVertexBuffer() expects a valid program, so we need to
check for it sooner. Not having a current program is not an error and
makes the draw call a no-op, but
dEQP-GLES3.functional.negative_api.vertex_array.* still expects
validation to happen before leaving the function. In particular,
the framebuffer completeness check has to be performed. Note that
ConvertPrimitiveType() should never return an error because we already
check the primitive type in the entry function, sampler validation
can only be done when we have a valid program, and likewise
applyVertexBuffer() requires a program, so these validations can still
happen after the early-out.
Change-Id: I7036ca59d37ea0385f79bf87afd1eeeb9728f7af
Reviewed-on: https://swiftshader-review.googlesource.com/17228Tested-by:
Nicolas Capens <nicolascapens@google.com>
Reviewed-by:
Lingfeng Yang <lfy@google.com>
Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Showing
Please
register
or
sign in
to comment