[Mesa-dev] [PATCH] drisw: fix up context and apis for software context

Dave Airlie airlied at gmail.com
Sun Dec 9 03:07:26 PST 2012


On 9 Dec 2012 20:32, "Dave Airlie" <airlied at gmail.com> wrote:
>
> This ports over from the dri2 code to the drisw bits. It means 3.1
> core contexts now work for softpipe.
>

Well if soft pipe had msaa they would but its enough to hack so I can test
ubo/tbo better.

Dave.
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/mesa/drivers/dri/common/drisw_util.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/common/drisw_util.c
b/src/mesa/drivers/dri/common/drisw_util.c
> index 8fdb05e..cd5a39a 100644
> --- a/src/mesa/drivers/dri/common/drisw_util.c
> +++ b/src/mesa/drivers/dri/common/drisw_util.c
> @@ -126,7 +126,10 @@ driCreateContextAttribs(__DRIscreen *screen, int api,
>              mesa_api = API_OPENGLES2;
>              break;
>      case __DRI_API_OPENGL_CORE:
> +            mesa_api = API_OPENGL_CORE;
> +            break;
>      default:
> +            *error = __DRI_CTX_ERROR_BAD_API;
>              return NULL;
>      }
>
> @@ -149,6 +152,19 @@ driCreateContextAttribs(__DRIscreen *screen, int api,
>         }
>      }
>
> +    /* Mesa does not support the GL_ARB_compatibilty extension or the
> +     * compatibility profile.  This means that we treat a
API_OPENGL_COMPAT 3.1 as
> +     * API_OPENGL_CORE and reject API_OPENGL_COMPAT 3.2+.
> +     */
> +    if (mesa_api == API_OPENGL_COMPAT && major_version == 3 &&
minor_version == 1)
> +       mesa_api = API_OPENGL_CORE;
> +
> +    if (mesa_api == API_OPENGL_COMPAT
> +        && ((major_version > 3)
> +            || (major_version == 3 && minor_version >= 2))) {
> +       *error = __DRI_CTX_ERROR_BAD_API;
> +       return NULL;
> +    }
>      /* There are no forward-compatible contexts before OpenGL 3.0.  The
>       * GLX_ARB_create_context spec says:
>       *
> --
> 1.8.0.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121209/3806de14/attachment.html>


More information about the mesa-dev mailing list