[Mesa-dev] [RFC 0/4] Compute version during _mesa_initialize_context

Jordan Justen jljusten at gmail.com
Thu Nov 15 10:28:23 PST 2012


Ian gave some off-list feedback for this list.

This series has this code flow: The driver.context_init calls
_mesa_initialize_context which in turn calls back into the driver
(driver.InitializeVersionFeatures).

But, Ian suggested that instead I pull the dispatch table init
functions out of _mesa_initialize_context, and have drivers call
_mesa_compute_version and then a new _mesa_initialize_dispatch
function. So, something like this:

driver.context_init
{
  _mesa_initialize_context (dispatch init removed)
  driver specific context init ...
  _mesa_compute_version
  _mesa_initialize_dispatch (new)
}

I'll work on a v2 of this series with that code flow instead.

-Jordan

On Wed, Nov 14, 2012 at 10:32 AM, Jordan Justen
<jordan.l.justen at intel.com> wrote:
> Within _mesa_initialize_context the call to _mesa_create_exec_table
> now depends on ctx->Version being set. (For GLES3 support.)
>
> This series adds a driver callback function that allows each driver
> to enable features that are significant for computing to version.
>
> Now _mesa_initialize_context will:
>  * basic context init
>  * call driver.InitializeVersionFeatures
>  * compute version
>  * initialize dispatch tables, etc.
>
> v1:
>  * Implement support for swrast & i965 drivers
>
> Jordan Justen (4):
>   mesa: add driver callback "InitializeVersionFeatures"
>   swrast: add InitializeVersionFeatures driver function
>   intel/i965: add InitializeVersionFeatures driver function
>   mesa: compute version in _mesa_initialize_context
>
>  src/mesa/drivers/common/driverfuncs.c      |    1 +
>  src/mesa/drivers/dri/i965/brw_context.c    |   23 +++++++--
>  src/mesa/drivers/dri/intel/intel_context.c |   18 ++++---
>  src/mesa/drivers/dri/intel/intel_context.h |    3 ++
>  src/mesa/drivers/dri/swrast/swrast.c       |   74 +++++++++++++++-------------
>  src/mesa/main/context.c                    |   13 ++++-
>  src/mesa/main/dd.h                         |    6 +++
>  7 files changed, 92 insertions(+), 46 deletions(-)
>  mode change 100644 => 100755 src/mesa/drivers/dri/intel/intel_context.c
>
> --
> 1.7.9.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list