Re: [Mesa-dev] [PATCH 1/4] mesa: add scaffolding for OES/EXT_primitive_bounding_box
Series is Reviewed-by: Ian RomanickOn 08/28/2016 11:32 AM, Ilia Mirkin wrote: > Signed-off-by: Ilia Mirkin > --- > src/compiler/glsl/glsl_parser_extras.cpp | 2 ++ > src/compiler/glsl/glsl_parser_extras.h | 4 +++ > src/mapi/glapi/gen/es_EXT.xml| 49 > > src/mapi/glapi/gen/gl_genexec.py | 1 + > src/mesa/Makefile.sources| 2 ++ > src/mesa/main/bbox.c | 44 > src/mesa/main/bbox.h | 42 +++ > src/mesa/main/context.c | 2 ++ > src/mesa/main/extensions_table.h | 2 ++ > src/mesa/main/mtypes.h | 1 + > src/mesa/main/tests/dispatch_sanity.cpp | 3 ++ > src/mesa/main/version.c | 2 +- > 12 files changed, 153 insertions(+), 1 deletion(-) > create mode 100644 src/mesa/main/bbox.c > create mode 100644 src/mesa/main/bbox.h > > diff --git a/src/compiler/glsl/glsl_parser_extras.cpp > b/src/compiler/glsl/glsl_parser_extras.cpp > index f393278..2c7e015 100644 > --- a/src/compiler/glsl/glsl_parser_extras.cpp > +++ b/src/compiler/glsl/glsl_parser_extras.cpp > @@ -631,6 +631,7 @@ static const _mesa_glsl_extension > _mesa_glsl_supported_extensions[] = { > EXT(OES_geometry_point_size), > EXT(OES_geometry_shader), > EXT(OES_gpu_shader5), > + EXT(OES_primitive_bounding_box), > EXT(OES_sample_variables), > EXT(OES_shader_image_atomic), > EXT(OES_shader_io_blocks), > @@ -656,6 +657,7 @@ static const _mesa_glsl_extension > _mesa_glsl_supported_extensions[] = { > EXT(EXT_geometry_point_size), > EXT(EXT_geometry_shader), > EXT(EXT_gpu_shader5), > + EXT(EXT_primitive_bounding_box), > EXT(EXT_separate_shader_objects), > EXT(EXT_shader_framebuffer_fetch), > EXT(EXT_shader_integer_mix), > diff --git a/src/compiler/glsl/glsl_parser_extras.h > b/src/compiler/glsl/glsl_parser_extras.h > index 6d408ef..e146fe1 100644 > --- a/src/compiler/glsl/glsl_parser_extras.h > +++ b/src/compiler/glsl/glsl_parser_extras.h > @@ -672,6 +672,8 @@ struct _mesa_glsl_parse_state { > bool OES_geometry_shader_warn; > bool OES_gpu_shader5_enable; > bool OES_gpu_shader5_warn; > + bool OES_primitive_bounding_box_enable; > + bool OES_primitive_bounding_box_warn; > bool OES_sample_variables_enable; > bool OES_sample_variables_warn; > bool OES_shader_image_atomic_enable; > @@ -719,6 +721,8 @@ struct _mesa_glsl_parse_state { > bool EXT_geometry_shader_warn; > bool EXT_gpu_shader5_enable; > bool EXT_gpu_shader5_warn; > + bool EXT_primitive_bounding_box_enable; > + bool EXT_primitive_bounding_box_warn; > bool EXT_separate_shader_objects_enable; > bool EXT_separate_shader_objects_warn; > bool EXT_shader_framebuffer_fetch_enable; > diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml > index 6f2d643..b9fbec4 100644 > --- a/src/mapi/glapi/gen/es_EXT.xml > +++ b/src/mapi/glapi/gen/es_EXT.xml > @@ -939,6 +939,21 @@ > > > > + > + > + alias="PrimitiveBoundingBox"> > + > + > + > + > + > + > + > + > + > + > + > + > xmlns:xi="http://www.w3.org/2001/XInclude"/> > > > @@ -1094,6 +1109,21 @@ > > > > + > + > + alias="PrimitiveBoundingBox"> > + > + > + > + > + > + > + > + > + > + > + > + > > > > @@ -1312,4 +1342,23 @@ > > > > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > > diff --git a/src/mapi/glapi/gen/gl_genexec.py > b/src/mapi/glapi/gen/gl_genexec.py > index 85e7990..183e6ff 100644 > --- a/src/mapi/glapi/gen/gl_genexec.py > +++ b/src/mapi/glapi/gen/gl_genexec.py > @@ -56,6 +56,7 @@ header = """/** > #include "main/blit.h" > #include "main/bufferobj.h" > #include "main/arrayobj.h" > +#include "main/bbox.h" > #include "main/buffers.h" > #include "main/clear.h" > #include "main/clip.h" > diff --git a/src/mesa/Makefile.sources b/src/mesa/Makefile.sources > index 3622760..969f711 100644 > --- a/src/mesa/Makefile.sources > +++ b/src/mesa/Makefile.sources > @@ -26,6 +26,8 @@ MAIN_FILES = \ > main/attrib.h \ > main/barrier.c \ > main/barrier.h \ > + main/bbox.c \ > + main/bbox.h \ > main/blend.c \ > main/blend.h \ > main/blit.c \ > diff --git a/src/mesa/main/bbox.c b/src/mesa/main/bbox.c > new file mode 100644 > index 000..0ef5705 > --- /dev/null > +++ b/src/mesa/main/bbox.c > @@ -0,0 +1,44 @@ > +/* > + * Mesa 3-D graphics library > + * > + * Copyright (C) 2016 Ilia Mirkin. All Rights Reserved. > + * > + * Permission is hereby granted, free of charge, to any person obtaining a > + * copy of this software and associated
[Mesa-dev] [PATCH 1/4] mesa: add scaffolding for OES/EXT_primitive_bounding_box
Signed-off-by: Ilia Mirkin--- src/compiler/glsl/glsl_parser_extras.cpp | 2 ++ src/compiler/glsl/glsl_parser_extras.h | 4 +++ src/mapi/glapi/gen/es_EXT.xml| 49 src/mapi/glapi/gen/gl_genexec.py | 1 + src/mesa/Makefile.sources| 2 ++ src/mesa/main/bbox.c | 44 src/mesa/main/bbox.h | 42 +++ src/mesa/main/context.c | 2 ++ src/mesa/main/extensions_table.h | 2 ++ src/mesa/main/mtypes.h | 1 + src/mesa/main/tests/dispatch_sanity.cpp | 3 ++ src/mesa/main/version.c | 2 +- 12 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 src/mesa/main/bbox.c create mode 100644 src/mesa/main/bbox.h diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index f393278..2c7e015 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -631,6 +631,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = { EXT(OES_geometry_point_size), EXT(OES_geometry_shader), EXT(OES_gpu_shader5), + EXT(OES_primitive_bounding_box), EXT(OES_sample_variables), EXT(OES_shader_image_atomic), EXT(OES_shader_io_blocks), @@ -656,6 +657,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = { EXT(EXT_geometry_point_size), EXT(EXT_geometry_shader), EXT(EXT_gpu_shader5), + EXT(EXT_primitive_bounding_box), EXT(EXT_separate_shader_objects), EXT(EXT_shader_framebuffer_fetch), EXT(EXT_shader_integer_mix), diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h index 6d408ef..e146fe1 100644 --- a/src/compiler/glsl/glsl_parser_extras.h +++ b/src/compiler/glsl/glsl_parser_extras.h @@ -672,6 +672,8 @@ struct _mesa_glsl_parse_state { bool OES_geometry_shader_warn; bool OES_gpu_shader5_enable; bool OES_gpu_shader5_warn; + bool OES_primitive_bounding_box_enable; + bool OES_primitive_bounding_box_warn; bool OES_sample_variables_enable; bool OES_sample_variables_warn; bool OES_shader_image_atomic_enable; @@ -719,6 +721,8 @@ struct _mesa_glsl_parse_state { bool EXT_geometry_shader_warn; bool EXT_gpu_shader5_enable; bool EXT_gpu_shader5_warn; + bool EXT_primitive_bounding_box_enable; + bool EXT_primitive_bounding_box_warn; bool EXT_separate_shader_objects_enable; bool EXT_separate_shader_objects_warn; bool EXT_shader_framebuffer_fetch_enable; diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml index 6f2d643..b9fbec4 100644 --- a/src/mapi/glapi/gen/es_EXT.xml +++ b/src/mapi/glapi/gen/es_EXT.xml @@ -939,6 +939,21 @@ + + + + + + + + + + + + + + + http://www.w3.org/2001/XInclude"/> @@ -1094,6 +1109,21 @@ + + + + + + + + + + + + + + + @@ -1312,4 +1342,23 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/mapi/glapi/gen/gl_genexec.py b/src/mapi/glapi/gen/gl_genexec.py index 85e7990..183e6ff 100644 --- a/src/mapi/glapi/gen/gl_genexec.py +++ b/src/mapi/glapi/gen/gl_genexec.py @@ -56,6 +56,7 @@ header = """/** #include "main/blit.h" #include "main/bufferobj.h" #include "main/arrayobj.h" +#include "main/bbox.h" #include "main/buffers.h" #include "main/clear.h" #include "main/clip.h" diff --git a/src/mesa/Makefile.sources b/src/mesa/Makefile.sources index 3622760..969f711 100644 --- a/src/mesa/Makefile.sources +++ b/src/mesa/Makefile.sources @@ -26,6 +26,8 @@ MAIN_FILES = \ main/attrib.h \ main/barrier.c \ main/barrier.h \ + main/bbox.c \ + main/bbox.h \ main/blend.c \ main/blend.h \ main/blit.c \ diff --git a/src/mesa/main/bbox.c b/src/mesa/main/bbox.c new file mode 100644 index 000..0ef5705 --- /dev/null +++ b/src/mesa/main/bbox.c @@ -0,0 +1,44 @@ +/* + * Mesa 3-D graphics library + * + * Copyright (C) 2016 Ilia Mirkin. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS