Skip to content
Snippets Groups Projects
Commit 18aca7ac authored by Lina Versace's avatar Lina Versace Committed by Jordan Justen
Browse files

intel: Move validation of context version into intelInitContext


Each driver (i830, i915, i965) used independent but similar code to
validate the requested context version. With the rececnt arrival of GLES3,
that logic has needed an update. Rather than apply identical updates to
each drivers validation code, let's just move the validation into the
shared routine intelInitContext.

This refactor required some incidental changes to functions
i830CreateContext and intelInitContext. For each function, this patch:
    - Adds context version parameters to the signature.
    - Adds a DRI_CTX_ERROR out param to the signature.
    - Sets the DRI_CTX_ERROR at each early return.

Tested against gen6 with piglit egl-create-context-verify-gl-flavor.
Verified that this patch does not change the set of exposed EGL context
flavors.

Signed-off-by: default avatarChad Versace <chad.versace@linux.intel.com>
Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
parent 4dd38352
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment