[Mesa-dev] [PATCH] mesa: rename api_validate.{c, h} -> draw_validate.{c, h}

Mathias Fröhlich Mathias.Froehlich at gmx.net
Mon Apr 23 05:30:39 UTC 2018


Good Morning,

I was thinking to also basically 'move' vbo/vbo_exec_array.c to main/draw.c as 
drawing arrays is today largely independent of the vbo module. Its more the 
other way round that the vbo module utilizes the draw code path one notch 
below the opengl entry points (... validate, set the Array._DrawVAO 'state' 
and execute a draw). By that, the api_validate stuff would have fit into that 
potential new main/draw.c.

Brian what do you think?

Anyhow, if we want, we can do this as a followup to all of the VAO cleanup and 
on top of this patch, so for this one:

Reviewed-by: Mathias Fröhlich <mathias.froehlich at web.de>

best

Mathias

On Monday, 23 April 2018 05:47:24 CEST Timothy Arceri wrote:
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65422
> ---
>  src/mesa/Makefile.sources                         | 4 ++--
>  src/mesa/main/dlist.c                             | 2 +-
>  src/mesa/main/{api_validate.c => draw_validate.c} | 2 +-
>  src/mesa/main/{api_validate.h => draw_validate.h} | 0
>  src/mesa/main/drawpix.c                           | 2 +-
>  src/mesa/meson.build                              | 4 ++--
>  src/mesa/vbo/vbo_exec_api.c                       | 2 +-
>  src/mesa/vbo/vbo_exec_array.c                     | 2 +-
>  src/mesa/vbo/vbo_save_api.c                       | 2 +-
>  9 files changed, 10 insertions(+), 10 deletions(-)
>  rename src/mesa/main/{api_validate.c => draw_validate.c} (99%)
>  rename src/mesa/main/{api_validate.h => draw_validate.h} (100%)
> 
> diff --git a/src/mesa/Makefile.sources b/src/mesa/Makefile.sources
> index c1220b9edc1..08c43195901 100644
> --- a/src/mesa/Makefile.sources
> +++ b/src/mesa/Makefile.sources
> @@ -14,8 +14,6 @@ MAIN_FILES = \
>  	main/api_exec.h \
>  	main/api_loopback.c \
>  	main/api_loopback.h \
> -	main/api_validate.c \
> -	main/api_validate.h \
>  	main/arbprogram.c \
>  	main/arbprogram.h \
>  	main/arrayobj.c \
> @@ -70,6 +68,8 @@ MAIN_FILES = \
>  	main/drawpix.h \
>  	main/drawtex.c \
>  	main/drawtex.h \
> +	main/draw_validate.c \
> +	main/draw_validate.h \
>  	main/enable.c \
>  	main/enable.h \
>  	main/enums.c \
> diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
> index 2086611aa39..1b003c81a64 100644
> --- a/src/mesa/main/dlist.c
> +++ b/src/mesa/main/dlist.c
> @@ -35,7 +35,7 @@
>  #include "api_arrayelt.h"
>  #include "api_exec.h"
>  #include "api_loopback.h"
> -#include "api_validate.h"
> +#include "draw_validate.h"
>  #include "atifragshader.h"
>  #include "config.h"
>  #include "bufferobj.h"
> diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/draw_validate.c
> similarity index 99%
> rename from src/mesa/main/api_validate.c
> rename to src/mesa/main/draw_validate.c
> index 7b91fdff55f..bcb2d91306e 100644
> --- a/src/mesa/main/api_validate.c
> +++ b/src/mesa/main/draw_validate.c
> @@ -24,7 +24,7 @@
>  
>  #include <stdbool.h>
>  #include "glheader.h"
> -#include "api_validate.h"
> +#include "draw_validate.h"
>  #include "arrayobj.h"
>  #include "bufferobj.h"
>  #include "context.h"
> diff --git a/src/mesa/main/api_validate.h b/src/mesa/main/draw_validate.h
> similarity index 100%
> rename from src/mesa/main/api_validate.h
> rename to src/mesa/main/draw_validate.h
> diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
> index 4bf14fc4f28..2f55dde7b80 100644
> --- a/src/mesa/main/drawpix.c
> +++ b/src/mesa/main/drawpix.c
> @@ -24,7 +24,7 @@
>  
>  #include "glheader.h"
>  #include "imports.h"
> -#include "api_validate.h"
> +#include "draw_validate.h"
>  #include "bufferobj.h"
>  #include "context.h"
>  #include "drawpix.h"
> diff --git a/src/mesa/meson.build b/src/mesa/meson.build
> index 93d197e12ac..3259956ad0b 100644
> --- a/src/mesa/meson.build
> +++ b/src/mesa/meson.build
> @@ -63,8 +63,6 @@ files_libmesa_common = files(
>    'main/api_exec.h',
>    'main/api_loopback.c',
>    'main/api_loopback.h',
> -  'main/api_validate.c',
> -  'main/api_validate.h',
>    'main/arbprogram.c',
>    'main/arbprogram.h',
>    'main/arrayobj.c',
> @@ -119,6 +117,8 @@ files_libmesa_common = files(
>    'main/drawpix.h',
>    'main/drawtex.c',
>    'main/drawtex.h',
> +  'main/draw_validate.c',
> +  'main/draw_validate.h',
>    'main/enable.c',
>    'main/enable.h',
>    'main/enums.h',
> diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
> index b3971715b57..20148acce32 100644
> --- a/src/mesa/vbo/vbo_exec_api.c
> +++ b/src/mesa/vbo/vbo_exec_api.c
> @@ -40,7 +40,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
>  #include "main/state.h"
>  #include "main/light.h"
>  #include "main/api_arrayelt.h"
> -#include "main/api_validate.h"
> +#include "main/draw_validate.h"
>  #include "main/dispatch.h"
>  #include "util/bitscan.h"
>  
> diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
> index b3ce138a09e..e74e1bd458c 100644
> --- a/src/mesa/vbo/vbo_exec_array.c
> +++ b/src/mesa/vbo/vbo_exec_array.c
> @@ -31,7 +31,7 @@
>  #include "main/glheader.h"
>  #include "main/context.h"
>  #include "main/state.h"
> -#include "main/api_validate.h"
> +#include "main/draw_validate.h"
>  #include "main/dispatch.h"
>  #include "main/varray.h"
>  #include "main/bufferobj.h"
> diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
> index 71304ede498..3b0c4b77512 100644
> --- a/src/mesa/vbo/vbo_save_api.c
> +++ b/src/mesa/vbo/vbo_save_api.c
> @@ -75,7 +75,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
>  #include "main/enums.h"
>  #include "main/eval.h"
>  #include "main/macros.h"
> -#include "main/api_validate.h"
> +#include "main/draw_validate.h"
>  #include "main/api_arrayelt.h"
>  #include "main/vtxfmt.h"
>  #include "main/dispatch.h"
> 






More information about the mesa-dev mailing list