Re: [Mesa-dev] Mesa 19.2.0 release plan
Hi Jason, On 21 August 2019 01:22:00 EEST, Jason Ekstrand wrote: >Sorry for the late breaking hold but I just realized that >GL_ARB_gl_spirv >and OpenGL 4.6 for Intel is 1 regression (I think it's not even a >regression) away from landing. Can I have 24 hours? > As you have noticed I've rolled our RC1 just after your email went out. From a quick look we are talking about 20 or so patches. I'm fine with cherry-picking the work for RC2 if we get a couple of acks. We had the odd exception in the past, I see no reason why we cannot do one here GL4.6 is a worthy addition :-) Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] Mesa 19.2.0 release plan
Hi Jason, On 21 August 2019 01:22:00 EEST, Jason Ekstrand wrote: >Sorry for the late breaking hold but I just realized that >GL_ARB_gl_spirv >and OpenGL 4.6 for Intel is 1 regression (I think it's not even a >regression) away from landing. Can I have 24 hours? > As you have noticed I've rolled our RC1 just after your email went out. From a quick look we are talking about 20 or so patches. I'm fine with cherry-picking the work for RC2 if we get a couple of +1 from other developers. We had the odd exception in the past, I see no reason why we cannot do one here - GL4.6 is a worthy addition :-) Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 5/7] targets/nine: link against libnir/libglsl_util
Based on commit 101142c4010(xa: support for drivers which use NIR) Cc: "10.6" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90466 Signed-off-by: Emil Velikov --- src/gallium/targets/d3dadapter9/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/targets/d3dadapter9/Makefile.am b/src/gallium/targets/d3dadapter9/Makefile.am index 1dc55f5..591978f 100644 --- a/src/gallium/targets/d3dadapter9/Makefile.am +++ b/src/gallium/targets/d3dadapter9/Makefile.am @@ -74,6 +74,8 @@ endif # HAVE_LD_VERSION_SCRIPT d3dadapter9_la_LIBADD = \ $(top_builddir)/src/gallium/auxiliary/libgalliumvl_stub.la \ $(top_builddir)/src/gallium/auxiliary/libgallium.la \ + $(top_builddir)/src/glsl/libnir.la \ + $(top_builddir)/src/libglsl_util.la \ $(top_builddir)/src/gallium/state_trackers/nine/libninetracker.la \ $(top_builddir)/src/util/libmesautil.la \ $(top_builddir)/src/gallium/winsys/sw/wrapper/libwsw.la \ -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/7] gallium: use $(top_builddir) when referencing static archives
Just like every other place in gallium. Signed-off-by: Emil Velikov --- src/gallium/drivers/freedreno/Makefile.am | 2 +- src/gallium/drivers/nouveau/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/freedreno/Makefile.am b/src/gallium/drivers/freedreno/Makefile.am index e798e44..cbf62c6 100644 --- a/src/gallium/drivers/freedreno/Makefile.am +++ b/src/gallium/drivers/freedreno/Makefile.am @@ -28,7 +28,7 @@ ir3_compiler_SOURCES = \ ir3_compiler_LDADD = \ libfreedreno.la \ - ../../auxiliary/libgallium.la \ + $(top_builddir)/src/gallium/auxiliary/libgallium.la \ $(top_builddir)/src/glsl/libnir.la \ $(top_builddir)/src/libglsl_util.la \ $(top_builddir)/src/util/libmesautil.la \ diff --git a/src/gallium/drivers/nouveau/Makefile.am b/src/gallium/drivers/nouveau/Makefile.am index 0aefc03..d05f0a1 100644 --- a/src/gallium/drivers/nouveau/Makefile.am +++ b/src/gallium/drivers/nouveau/Makefile.am @@ -48,7 +48,7 @@ nouveau_compiler_SOURCES = \ nouveau_compiler_LDADD = \ libnouveau.la \ - ../../auxiliary/libgallium.la \ + $(top_builddir)/src/gallium/auxiliary/libgallium.la \ $(top_builddir)/src/util/libmesautil.la \ $(GALLIUM_COMMON_LIB_DEPS) -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 6/7] mesa: build xmlconfig to a separate static library
From: Erik Faye-Lund As we use the file from both the dri modules and loader, we end up with multiple definition of the symbols provided in our gallium dri modules. Additionally we compile the file twice. Resolve both issues, effectively enabling the build on toolchains which don't support -Wl,--allow-multiple-definition. v2: [Emil Velikov] - Fix the Scons/Android build. - Resolve libgbm build issues (bring back the missing -lm) Cc: Julien Isorce Cc: "10.5 10.6" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90310 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90905 Signed-off-by: Emil Velikov --- src/gallium/targets/dri/Makefile.am | 6 -- src/loader/Makefile.am | 10 +++--- src/mesa/drivers/dri/Makefile.am | 1 + src/mesa/drivers/dri/common/Android.mk | 4 +++- src/mesa/drivers/dri/common/Makefile.am | 6 +- src/mesa/drivers/dri/common/Makefile.sources | 4 +++- src/mesa/drivers/dri/common/SConscript | 2 +- src/mesa/drivers/dri/i965/Makefile.am| 1 + 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am index f9e4ada..9648396 100644 --- a/src/gallium/targets/dri/Makefile.am +++ b/src/gallium/targets/dri/Makefile.am @@ -53,12 +53,6 @@ gallium_dri_la_LIBADD = \ $(LIBDRM_LIBS) \ $(GALLIUM_COMMON_LIB_DEPS) -# XXX: Temporary allow duplicated symbols, as the loader pulls in xmlconfig.c -# which already provides driParse* and driQuery* amongst others. -# Remove this hack as we come up with a cleaner solution. -gallium_dri_la_LDFLAGS += \ - -Wl,--allow-multiple-definition - EXTRA_gallium_dri_la_DEPENDENCIES = \ dri.sym \ $(top_srcdir)/src/gallium/targets/dri-vdpau.dyn diff --git a/src/loader/Makefile.am b/src/loader/Makefile.am index 36ddba8..aef1bd6 100644 --- a/src/loader/Makefile.am +++ b/src/loader/Makefile.am @@ -41,15 +41,11 @@ libloader_la_CPPFLAGS += \ -I$(top_builddir)/src/mesa/drivers/dri/common/ \ -I$(top_srcdir)/src/mesa/ \ -I$(top_srcdir)/src/mapi/ \ - -DUSE_DRICONF \ - $(EXPAT_CFLAGS) + -DUSE_DRICONF -libloader_la_SOURCES += \ - $(top_srcdir)/src/mesa/drivers/dri/common/xmlconfig.c + libloader_la_LIBADD += \ + $(top_builddir)/src/mesa/drivers/dri/common/libxmlconfig.la -libloader_la_LIBADD += \ - -lm \ - $(EXPAT_LIBS) endif if !HAVE_LIBDRM diff --git a/src/mesa/drivers/dri/Makefile.am b/src/mesa/drivers/dri/Makefile.am index fa1de10..08a8e64 100644 --- a/src/mesa/drivers/dri/Makefile.am +++ b/src/mesa/drivers/dri/Makefile.am @@ -60,6 +60,7 @@ mesa_dri_drivers_la_LIBADD = \ ../../libmesa.la \ common/libmegadriver_stub.la \ common/libdricommon.la \ +common/libxmlconfig.la \ $(MEGADRIVERS_DEPS) \ $(DRI_LIB_DEPS) \ $() diff --git a/src/mesa/drivers/dri/common/Android.mk b/src/mesa/drivers/dri/common/Android.mk index c003c94..6986f5e 100644 --- a/src/mesa/drivers/dri/common/Android.mk +++ b/src/mesa/drivers/dri/common/Android.mk @@ -50,7 +50,9 @@ else LOCAL_SHARED_LIBRARIES := libdrm endif -LOCAL_SRC_FILES := $(DRI_COMMON_FILES) +LOCAL_SRC_FILES := \ + $(DRI_COMMON_FILES) \ + $(XMLCONFIG_FILES) MESA_DRI_OPTIONS_H := $(intermediates)/xmlpool/options.h LOCAL_GENERATED_SOURCES := $(MESA_DRI_OPTIONS_H) diff --git a/src/mesa/drivers/dri/common/Makefile.am b/src/mesa/drivers/dri/common/Makefile.am index da8f97a..ae19fcb 100644 --- a/src/mesa/drivers/dri/common/Makefile.am +++ b/src/mesa/drivers/dri/common/Makefile.am @@ -33,16 +33,20 @@ AM_CFLAGS = \ -I$(top_srcdir)/src/gallium/include \ -I$(top_srcdir)/src/gallium/auxiliary \ $(DEFINES) \ - $(EXPAT_CFLAGS) \ $(VISIBILITY_CFLAGS) noinst_LTLIBRARIES = \ libdricommon.la \ + libxmlconfig.la \ libmegadriver_stub.la \ libdri_test_stubs.la libdricommon_la_SOURCES = $(DRI_COMMON_FILES) +libxmlconfig_la_SOURCES = $(XMLCONFIG_FILES) +libxmlconfig_la_CFLAGS = $(AM_CFLAGS) $(EXPAT_CFLAGS) +libxmlconfig_la_LIBADD = $(EXPAT_LIBS) -lm + libdri_test_stubs_la_SOURCES = $(test_stubs_FILES) libdri_test_stubs_la_CFLAGS = $(AM_CFLAGS) -DNO_MAIN diff --git a/src/mesa/drivers/dri/common/Makefile.sources b/src/mesa/drivers/dri/common/Makefile.sources index d00ec5f..d5d8da8 100644 --- a/src/mesa/drivers/dri/common/Makefile.sources +++ b/src/mesa/drivers/dri/common/Makefile.sources @@ -2,7 +2,9 @@ DRI_COMMON_FILES := \ utils.c \ utils.h \ dri_util.c \ - dri_util.h \ + dri_util.h + +XMLCONFIG_FILES := \ xmlconfig.c \ xmlconfig.h diff --git a/src/mesa/drivers/dri/common/SConscript b/src/mesa/drivers/dri/common/SConscript index 0bee1b4..b402736 100644 --- a/src/mesa/drivers/dri/common/SConscript +++ b/src/mesa/drivers/dri/common/SConscript
[Mesa-dev] [PATCH 1/7] freedreno: use CXX linker rather than explicit link against libstdc++
Cc: Rob Clark Cc: "10.6" Signed-off-by: Emil Velikov --- src/gallium/drivers/freedreno/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/Makefile.am b/src/gallium/drivers/freedreno/Makefile.am index 4b2629f..e798e44 100644 --- a/src/gallium/drivers/freedreno/Makefile.am +++ b/src/gallium/drivers/freedreno/Makefile.am @@ -21,6 +21,8 @@ libfreedreno_la_SOURCES = \ noinst_PROGRAMS = ir3_compiler +# XXX: Required due to the C++ sources in libnir/libglsl_util +nodist_EXTRA_ir3_compiler_SOURCES = dummy.cpp ir3_compiler_SOURCES = \ ir3/ir3_cmdline.c @@ -29,7 +31,6 @@ ir3_compiler_LDADD = \ ../../auxiliary/libgallium.la \ $(top_builddir)/src/glsl/libnir.la \ $(top_builddir)/src/libglsl_util.la \ - -lstdc++ \ $(top_builddir)/src/util/libmesautil.la \ $(GALLIUM_COMMON_LIB_DEPS) \ $(FREEDRENO_LIBS) -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 4/7] pipe-loader: add libnir and libglsl_util to the link
Based on commit 101142c4010(xa: support for drivers which use NIR) Cc: Rob Clark Cc: "10.6" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90466 Signed-off-by: Emil Velikov --- src/gallium/targets/pipe-loader/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/targets/pipe-loader/Makefile.am b/src/gallium/targets/pipe-loader/Makefile.am index 967cdb7..e4048b5 100644 --- a/src/gallium/targets/pipe-loader/Makefile.am +++ b/src/gallium/targets/pipe-loader/Makefile.am @@ -52,6 +52,8 @@ endif PIPE_LIBS += \ $(top_builddir)/src/gallium/auxiliary/libgallium.la \ + $(top_builddir)/src/glsl/libnir.la \ + $(top_builddir)/src/libglsl_util.la \ $(top_builddir)/src/util/libmesautil.la \ $(top_builddir)/src/gallium/drivers/rbug/librbug.la \ $(top_builddir)/src/gallium/drivers/trace/libtrace.la \ -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/7] mesa; add a dummy _mesa_error_no_memory() symbol to libglsl_util
Rather than forcing everyone to provide their own definition of the symbol provide a common (dummy) one. This helps us resolve the build of the standalone pipe-drivers (amongst others), which are missing the symbol. Cc: Rob Clark Cc: "10.6" Signed-off-by: Emil Velikov --- src/Makefile.am | 3 ++- src/gallium/drivers/freedreno/ir3/ir3_cmdline.c | 8 --- src/gallium/state_trackers/xa/xa_tracker.c | 12 -- src/glsl/Makefile.am| 13 --- src/glsl/SConscript | 4 +++- src/glsl/main.cpp | 6 - src/glsl/tests/common.c | 30 - src/mesa/Android.libmesa_glsl_utils.mk | 6 +++-- src/mesa/program/dummy_errors.c | 30 + 9 files changed, 43 insertions(+), 69 deletions(-) delete mode 100644 src/glsl/tests/common.c create mode 100644 src/mesa/program/dummy_errors.c diff --git a/src/Makefile.am b/src/Makefile.am index 18cb4ce..5d69abd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -72,4 +72,5 @@ noinst_LTLIBRARIES = libglsl_util.la libglsl_util_la_SOURCES = \ mesa/main/imports.c \ mesa/program/prog_hash_table.c \ - mesa/program/symbol_table.c + mesa/program/symbol_table.c \ + mesa/program/dummy_errors.c diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c index d0517aa..0b16cc1 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c @@ -360,11 +360,3 @@ int main(int argc, char **argv) } dump_info(&v, info); } - -void _mesa_error_no_memory(const char *caller); - -void -_mesa_error_no_memory(const char *caller) -{ - fprintf(stderr, "Mesa error: out of memory in %s", caller); -} diff --git a/src/gallium/state_trackers/xa/xa_tracker.c b/src/gallium/state_trackers/xa/xa_tracker.c index 8901998..f69ac8e 100644 --- a/src/gallium/state_trackers/xa/xa_tracker.c +++ b/src/gallium/state_trackers/xa/xa_tracker.c @@ -535,15 +535,3 @@ xa_surface_format(const struct xa_surface *srf) { return srf->fdesc.xa_format; } - -/* - * _mesa_error_no_memory() is expected by NIR to be provided by the - * user. Normally this is in mesa st, but other state trackers - * must provide their own. - */ -void _mesa_error_no_memory(const char *caller); -void -_mesa_error_no_memory(const char *caller) -{ - debug_printf("Mesa error: out of memory in %s", caller); -} diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am index 1b7b1f8..fa8c9f5 100644 --- a/src/glsl/Makefile.am +++ b/src/glsl/Makefile.am @@ -89,8 +89,7 @@ tests_general_ir_test_SOURCES = \ tests/builtin_variable_test.cpp \ tests/invalidate_locations_test.cpp \ tests/general_ir_test.cpp \ - tests/varyings_test.cpp \ - tests/common.c + tests/varyings_test.cpp tests_general_ir_test_CFLAGS = \ $(PTHREAD_CFLAGS) tests_general_ir_test_LDADD = \ @@ -103,8 +102,7 @@ tests_uniform_initializer_test_SOURCES =\ tests/copy_constant_to_storage_tests.cpp\ tests/set_uniform_initializer_tests.cpp \ tests/uniform_initializer_utils.cpp \ - tests/uniform_initializer_utils.h \ - tests/common.c + tests/uniform_initializer_utils.h tests_uniform_initializer_test_CFLAGS =\ $(PTHREAD_CFLAGS) tests_uniform_initializer_test_LDADD = \ @@ -114,8 +112,7 @@ tests_uniform_initializer_test_LDADD = \ $(PTHREAD_LIBS) tests_sampler_types_test_SOURCES = \ - tests/sampler_types_test.cpp\ - tests/common.c + tests/sampler_types_test.cpp tests_sampler_types_test_CFLAGS = \ $(PTHREAD_CFLAGS) tests_sampler_types_test_LDADD = \ @@ -133,8 +130,7 @@ libglcpp_la_SOURCES = \ $(LIBGLCPP_FILES) glcpp_glcpp_SOURCES = \ - glcpp/glcpp.c \ - tests/common.c + glcpp/glcpp.c glcpp_glcpp_LDADD =\ libglcpp.la \ $(top_builddir)/src/libglsl_util.la \ @@ -164,7 +160,6 @@ glsl_compiler_LDADD = \ glsl_test_SOURCES = \ standalone_scaffolding.cpp \ - tests/common.c \ test.cpp \ test_optpass.cpp \ test_optpass.h diff --git a/src/glsl/SConscript b/src/glsl/SConscript index 284b375..89c6035 10064
[Mesa-dev] [PATCH 7/7] vc4: automake: enable subdir-objects
Silence the warnings about the future incompatibility with automake 2.0 Cc: Eric Anholt Signed-off-by: Emil Velikov --- src/gallium/drivers/vc4/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/vc4/Makefile.am b/src/gallium/drivers/vc4/Makefile.am index 7744631..3f62ce2 100644 --- a/src/gallium/drivers/vc4/Makefile.am +++ b/src/gallium/drivers/vc4/Makefile.am @@ -19,6 +19,8 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. +AUTOMAKE_OPTIONS = subdir-objects + include Makefile.sources include $(top_srcdir)/src/gallium/Automake.inc -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] Request for Mentorship
On 5 June 2015 at 22:08, Rob Clark wrote: > so, maybe a bit off topic (and maybe doesn't really help with the > whole finding a mentor thing).. but a sort of wish-list thing for > piglit that I've had in the back of my head is something like "tig" > for piglit. I suppose it doesn't have to necessarily be a curses > based UI, it could be gui.. but a lot of times while I find myself > searching through results.json to find cmdline to re-run failed tests, > which is kind of time consuming. Some sort of front-end to piglit > which would let me do things like filter on test status, then see > output/results and if I want re-run the selected test(s) would be kind > of nice. > Sounds like exactly what the html test summary provides. Although I'm not sure how many people actually use it - json seems to be more popular nowadays :-) I even recall naggin' on Dylan when things broke on an occasion or two. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v3] egl/dri2: implement platform_surfaceless (v3)
Hi gents, On 10 June 2015 at 23:20, Zach Reizner wrote: > From: Haixia Shi > > The surfaceless platform is for off-screen rendering only. Render node support > is required. > > Only consider the render nodes. Do not use normal nodes as they require > auth hooks. > > v3: egl/dri2: change platform_null to platform_surfaceless > Normal approach in mesa is to list the changes in each version either in the commit message or after the --- line. Resending revised patch while keeping the same version tag is confusing/misleading. > Signed-off-by: Haixia Shi > Signed-off-by: Zach Reizner > --- > configure.ac| 3 +- > src/egl/drivers/dri2/Makefile.am| 5 + > src/egl/drivers/dri2/egl_dri2.c | 13 ++- > src/egl/drivers/dri2/egl_dri2.h | 3 + > src/egl/drivers/dri2/platform_surfaceless.c | 167 > > src/egl/main/Makefile.am| 4 + > src/egl/main/egldisplay.c | 3 +- > src/egl/main/egldisplay.h | 1 + > 8 files changed, 194 insertions(+), 5 deletions(-) > create mode 100644 src/egl/drivers/dri2/platform_surfaceless.c > > diff --git a/configure.ac b/configure.ac > index 4ed4b74..c91c616 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1789,7 +1789,7 @@ for plat in $egl_platforms; do > AC_MSG_ERROR([EGL platform drm requires libdrm >= > $LIBDRM_REQUIRED]) > ;; > > - android|gdi|null) > + android|gdi|surfaceless|null) Afaict surfaceless does require libdrm. Would be nice to check if the LIBDRM_REQUIRED provides all the requirements, and bump it otherwise. > diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c > index a428f28..b7ec811 100644 > --- a/src/egl/drivers/dri2/egl_dri2.c > +++ b/src/egl/drivers/dri2/egl_dri2.c > @@ -541,7 +541,7 @@ dri2_setup_screen(_EGLDisplay *disp) > disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE; > disp->Extensions.KHR_gl_texture_cubemap_image = EGL_TRUE; >} > -#ifdef HAVE_LIBDRM > +#if defined(HAVE_DRM_PLATFORM) || defined(HAVE_SURFACELESS_PLATFORM) Why change HAVE_LIBDRM to HAVE_DRM_PLATFORM - rebase slip ? If so we can drop these changes altogether. > --- /dev/null > +++ b/src/egl/drivers/dri2/platform_surfaceless.c > +EGLBoolean > +dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp) > +{ > + for (i = 0; dri2_dpy->driver_configs[i]; i++) { > + EGLint attr_list[1]; > + attr_list[0] = EGL_NONE; Bikeshed: Please add an empty line between variable declaration and code + initialise the variable on declaration. Just like you've already done in other parts of the patch. > + dri2_add_config(disp, dri2_dpy->driver_configs[i], > + i + 1, EGL_WINDOW_BIT, attr_list, NULL); > + } > + > + disp->Extensions.KHR_image_base = EGL_TRUE; > + > + /* we're supporting EGL 1.4 */ > + disp->VersionMajor = 1; > + disp->VersionMinor = 4; > + Marek had a patch that drops these from the platform backends yet it seems like it never landed :'-( Cheers, Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] Request for Mentorship
On 10 June 2015 at 23:56, Rob Clark wrote: > On Wed, Jun 10, 2015 at 7:28 PM, Emil Velikov > wrote: >> On 5 June 2015 at 22:08, Rob Clark wrote: >>> so, maybe a bit off topic (and maybe doesn't really help with the >>> whole finding a mentor thing).. but a sort of wish-list thing for >>> piglit that I've had in the back of my head is something like "tig" >>> for piglit. I suppose it doesn't have to necessarily be a curses >>> based UI, it could be gui.. but a lot of times while I find myself >>> searching through results.json to find cmdline to re-run failed tests, >>> which is kind of time consuming. Some sort of front-end to piglit >>> which would let me do things like filter on test status, then see >>> output/results and if I want re-run the selected test(s) would be kind >>> of nice. >>> >> Sounds like exactly what the html test summary provides. Although I'm >> not sure how many people actually use it - json seems to be more >> popular nowadays :-) I even recall naggin' on Dylan when things broke >> on an occasion or two. > > except html is neither interactive nor fast/convenient ;-) > > The use case I'm thinking of is mostly driver devel/debug where I want > to check if some updated version of a change I am working on fixed the > regressions, and that sort of thing. (Or re-run the failed tests with > some FD_MESA_DEBUG env var debug flag.) So ability to re-run > individual tests (or group of tests based on filtered result status, > etc) is what I'm looking for. Versus digging through .json or html to > find individual cmdlines for some 100's of tests ;-) > I see. I was fortunate enough to rerun only 2-3 regressing tests, rather than 100's, so html was convenient enough :) The "rerun all {failing,...} tests" does sound like a useful feature. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v3] egl/dri2: implement platform_surfaceless (v3)
On 11 June 2015 at 10:02, Marek Olšák wrote: > On Thu, Jun 11, 2015 at 1:59 AM, Emil Velikov > wrote: >> Hi gents, >> >> On 10 June 2015 at 23:20, Zach Reizner wrote: >>> From: Haixia Shi >>> >>> The surfaceless platform is for off-screen rendering only. Render node >>> support >>> is required. >>> >>> Only consider the render nodes. Do not use normal nodes as they require >>> auth hooks. >>> >>> v3: egl/dri2: change platform_null to platform_surfaceless >>> >> Normal approach in mesa is to list the changes in each version either >> in the commit message or after the --- line. Resending revised patch >> while keeping the same version tag is confusing/misleading. >> >>> Signed-off-by: Haixia Shi >>> Signed-off-by: Zach Reizner >>> --- >>> configure.ac| 3 +- >>> src/egl/drivers/dri2/Makefile.am| 5 + >>> src/egl/drivers/dri2/egl_dri2.c | 13 ++- >>> src/egl/drivers/dri2/egl_dri2.h | 3 + >>> src/egl/drivers/dri2/platform_surfaceless.c | 167 >>> >>> src/egl/main/Makefile.am| 4 + >>> src/egl/main/egldisplay.c | 3 +- >>> src/egl/main/egldisplay.h | 1 + >>> 8 files changed, 194 insertions(+), 5 deletions(-) >>> create mode 100644 src/egl/drivers/dri2/platform_surfaceless.c >>> >>> diff --git a/configure.ac b/configure.ac >>> index 4ed4b74..c91c616 100644 >>> --- a/configure.ac >>> +++ b/configure.ac >>> @@ -1789,7 +1789,7 @@ for plat in $egl_platforms; do >>> AC_MSG_ERROR([EGL platform drm requires libdrm >= >>> $LIBDRM_REQUIRED]) >>> ;; >>> >>> - android|gdi|null) >>> + android|gdi|surfaceless|null) >> Afaict surfaceless does require libdrm. Would be nice to check if the >> LIBDRM_REQUIRED provides all the requirements, and bump it otherwise. >> >>> diff --git a/src/egl/drivers/dri2/egl_dri2.c >>> b/src/egl/drivers/dri2/egl_dri2.c >>> index a428f28..b7ec811 100644 >>> --- a/src/egl/drivers/dri2/egl_dri2.c >>> +++ b/src/egl/drivers/dri2/egl_dri2.c >>> @@ -541,7 +541,7 @@ dri2_setup_screen(_EGLDisplay *disp) >>> disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE; >>> disp->Extensions.KHR_gl_texture_cubemap_image = EGL_TRUE; >>>} >>> -#ifdef HAVE_LIBDRM >>> +#if defined(HAVE_DRM_PLATFORM) || defined(HAVE_SURFACELESS_PLATFORM) >> Why change HAVE_LIBDRM to HAVE_DRM_PLATFORM - rebase slip ? If so we >> can drop these changes altogether. >> >> >>> --- /dev/null >>> +++ b/src/egl/drivers/dri2/platform_surfaceless.c >> >>> +EGLBoolean >>> +dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp) >>> +{ >> >>> + for (i = 0; dri2_dpy->driver_configs[i]; i++) { >>> + EGLint attr_list[1]; >>> + attr_list[0] = EGL_NONE; >> Bikeshed: >> Please add an empty line between variable declaration and code + >> initialise the variable on declaration. Just like you've already done >> in other parts of the patch. >> >>> + dri2_add_config(disp, dri2_dpy->driver_configs[i], >>> + i + 1, EGL_WINDOW_BIT, attr_list, NULL); >>> + } >>> + >>> + disp->Extensions.KHR_image_base = EGL_TRUE; >>> + >>> + /* we're supporting EGL 1.4 */ >>> + disp->VersionMajor = 1; >>> + disp->VersionMinor = 4; >>> + >> Marek had a patch that drops these from the platform backends yet it >> seems like it never landed :'-( > > It did land: > http://cgit.freedesktop.org/mesa/mesa/commit/?id=efda9c56491f5cb90e77f5fe7979477fc9b2b529 > Ouch I had 10.6 checked out. Thanks ! Looks like we're missed Haiku with the follow up change (egl: combine VersionMajor and VersionMinor into one variable) - will send a patch in a second. Cheers Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v3] egl/dri2: implement platform_surfaceless
Hi Zach, On 11 June 2015 at 03:25, Zach Reizner wrote: > From: Haixia Shi > > The surfaceless platform is for off-screen rendering only. Render node support > is required. > > Only consider the render nodes. Do not use normal nodes as they require > auth hooks. > > v3: change platform_null to platform_surfaceless > v4: make libdrm required for surfaceless v4: make libdrm required for surfaceless, make sure it compiles :-) > diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c > index 82f8843..877cf70 100644 > --- a/src/egl/drivers/dri2/egl_dri2.c > +++ b/src/egl/drivers/dri2/egl_dri2.c > @@ -1604,7 +1611,7 @@ dri2_create_wayland_buffer_from_image(_EGLDriver *drv, > _EGLDisplay *dpy, > return dri2_dpy->vtbl->create_wayland_buffer_from_image(drv, dpy, img); > } > > -#ifdef HAVE_LIBDRM > +#if defined(HAVE_DRM_PLATFORM) || defined(HAVE_SURFACELESS_PLATFORM) My earlier comment was aimed at every instance of such change - perhaps I was unclear about it. I.e. the one you're dropped, this ... > static EGLBoolean > dri2_check_dma_buf_attribs(const _EGLImageAttribs *attrs) > { > @@ -1862,7 +1869,7 @@ dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay > *disp, > case EGL_WAYLAND_BUFFER_WL: >return dri2_create_image_wayland_wl_buffer(disp, ctx, buffer, > attr_list); > #endif > -#ifdef HAVE_LIBDRM > +#if defined(HAVE_DRM_PLATFORM) || defined(HAVE_SURFACELESS_PLATFORM) ... and this should go imho. Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 01/10] egl/haiku: use correct version variable
Earlier commitfolded the two separate variables into one, but forgot to update the haiku driver. Fixes: 0e4b564ef28(egl: combine VersionMajor and VersionMinor into one variable) Cc: Marek Olšák > Cc: Alexander von Gluck IV Signed-off-by: Emil Velikov --- src/egl/drivers/haiku/egl_haiku.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index 4d9888d..b347eb6 100644 --- a/src/egl/drivers/haiku/egl_haiku.cpp +++ b/src/egl/drivers/haiku/egl_haiku.cpp @@ -304,8 +304,7 @@ init_haiku(_EGLDriver *drv, _EGLDisplay *dpy) _eglLog(_EGL_DEBUG,"Add configs"); haiku_add_configs_for_visuals(dpy); - dpy->VersionMajor=1; - dpy->VersionMinor=4; + dpy->Version = 14; //dpy->Extensions.KHR_create_context = true; -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 04/10] egl/haiku: handle memory allocation failure
Cc: Alexander von Gluck IV Signed-off-by: Emil Velikov --- src/egl/drivers/haiku/egl_haiku.cpp | 35 --- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index 36e1277..760ee45 100644 --- a/src/egl/drivers/haiku/egl_haiku.cpp +++ b/src/egl/drivers/haiku/egl_haiku.cpp @@ -42,8 +42,6 @@ #include -#define CALLOC_STRUCT(T) (struct T *) calloc(1, sizeof(struct T)) - #ifdef DEBUG # define TRACE(x...) printf("egl_haiku: " x) # define CALLED() TRACE("CALLED: %s\n", __PRETTY_FUNCTION__) @@ -126,9 +124,15 @@ haiku_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp, CALLED(); struct haiku_egl_surface* surface; - surface = (struct haiku_egl_surface*)calloc(1,sizeof (*surface)); + surface = (struct haiku_egl_surface*) calloc(1, sizeof (*surface)); + if (!surface) { + _eglError(EGL_BAD_ALLOC, "haiku_create_window_surface"); + return NULL; + } + + if (!_eglInitSurface(&surface->surf, disp, EGL_WINDOW_BIT, conf, attrib_list)) + goto cleanup_surface; - _eglInitSurface(&surface->surf, disp, EGL_WINDOW_BIT, conf, attrib_list); (&surface->surf)->SwapInterval = 1; TRACE("Creating window\n"); @@ -144,6 +148,10 @@ haiku_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp, TRACE("Showing window\n"); win->Show(); return &surface->surf; + +cleanup_surface: + free(surface); + return NULL; } @@ -176,7 +184,11 @@ haiku_add_configs_for_visuals(_EGLDisplay *dpy) CALLED(); struct haiku_egl_config* conf; - conf = CALLOC_STRUCT(haiku_egl_config); + conf = (struct haiku_egl_config*) calloc(1, sizeof (*conf)); + if (!conf) { + _eglError(EGL_BAD_ALLOC, "haiku_add_configs_for_visuals"); + return NULL; + } _eglInitConfig(&conf->base, dpy, 1); TRACE("Config inited\n"); @@ -265,7 +277,11 @@ haiku_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf, CALLED(); struct haiku_egl_context* context; - context=(struct haiku_egl_context*)calloc(1,sizeof (*context)); + context = (struct haiku_egl_context*) calloc(1, sizeof (*context)); + if (!context) { + _eglError(EGL_BAD_ALLOC, "haiku_create_context"); + return NULL; + } if (!_eglInitContext(&context->ctx, disp, conf, attrib_list)) ERROR("ERROR creating context"); @@ -332,7 +348,12 @@ _eglBuiltInDriverHaiku(const char *args) CALLED(); struct haiku_egl_driver* driver; - driver=(struct haiku_egl_driver*)calloc(1,sizeof(*driver)); + driver = (struct haiku_egl_driver*) calloc(1, sizeof(*driver)); + if (!driver) { + _eglError(EGL_BAD_ALLOC, "_eglBuiltInDriverHaiku"); + return NULL; + } + _eglInitDriverFallbacks(&driver->base); driver->base.API.Initialize = init_haiku; driver->base.API.Terminate = haiku_terminate; -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 05/10] egl/haiku: remove unused variables in struct haiku_egl_driver
Cc: Alexander von Gluck IV Signed-off-by: Emil Velikov --- src/egl/drivers/haiku/egl_haiku.cpp | 4 1 file changed, 4 deletions(-) diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index 760ee45..cfe8817 100644 --- a/src/egl/drivers/haiku/egl_haiku.cpp +++ b/src/egl/drivers/haiku/egl_haiku.cpp @@ -58,10 +58,6 @@ _EGL_DRIVER_STANDARD_TYPECASTS(haiku_egl) struct haiku_egl_driver { _EGLDriver base; - - void *handle; - _EGLProc (*get_proc_address)(const char *procname); - void (*glFlush)(void); }; struct haiku_egl_config -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 06/10] egl/haiku: we don't use src/loader, drop all the references to it
Cc: Alexander von Gluck IV Signed-off-by: Emil Velikov --- src/egl/drivers/haiku/SConscript| 5 - src/egl/drivers/haiku/egl_haiku.cpp | 3 --- 2 files changed, 8 deletions(-) diff --git a/src/egl/drivers/haiku/SConscript b/src/egl/drivers/haiku/SConscript index 9dd2f70..ec6020e 100644 --- a/src/egl/drivers/haiku/SConscript +++ b/src/egl/drivers/haiku/SConscript @@ -9,7 +9,6 @@ env.Append(CPPDEFINES = [ env.Append(CPPPATH = [ '#/include', '#/src/egl/main', - '#/src/loader', ]) sources = [ @@ -22,10 +21,6 @@ if env['platform'] == 'haiku': '_EGL_NATIVE_PLATFORM=haiku', ]) -env.Prepend(LIBS = [ - libloader, -]) - egl_haiku = env.ConvenienceLibrary( target = 'egl_haiku', source = sources, diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index cfe8817..056fafc 100644 --- a/src/egl/drivers/haiku/egl_haiku.cpp +++ b/src/egl/drivers/haiku/egl_haiku.cpp @@ -27,7 +27,6 @@ #include #include -#include "loader.h" #include "eglconfig.h" #include "eglcontext.h" #include "egldisplay.h" @@ -244,8 +243,6 @@ init_haiku(_EGLDriver *drv, _EGLDisplay *dpy) _eglSetLogProc(haiku_log); - loader_set_logger(_eglLog); - TRACE("Add configs\n"); haiku_add_configs_for_visuals(dpy); -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 09/10] egl/haiku: plug some obvious memory leaks
Cc: Alexander von Gluck IV Signed-off-by: Emil Velikov --- src/egl/drivers/haiku/egl_haiku.cpp | 32 +--- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index 154b3af..da72895 100644 --- a/src/egl/drivers/haiku/egl_haiku.cpp +++ b/src/egl/drivers/haiku/egl_haiku.cpp @@ -192,18 +192,22 @@ haiku_add_configs_for_visuals(_EGLDisplay *dpy) TRACE("Config configuated\n"); if (!_eglValidateConfig(&conf->base, EGL_FALSE)) { _eglLog(_EGL_DEBUG, "Haiku: failed to validate config"); - return EGL_FALSE; + goto cleanup; } TRACE("Validated config\n"); _eglLinkConfig(&conf->base); if (!_eglGetArraySize(dpy->Configs)) { _eglLog(_EGL_WARNING, "Haiku: failed to create any config"); - return EGL_FALSE; + goto cleanup; } TRACE("Config successfull\n"); - + return EGL_TRUE; + +cleanup: + free(conf); + return EGL_FALSE; } extern "C" @@ -213,7 +217,8 @@ init_haiku(_EGLDriver *drv, _EGLDisplay *dpy) CALLED(); TRACE("Add configs\n"); - haiku_add_configs_for_visuals(dpy); + if (!haiku_add_configs_for_visuals(dpy)) + return EGL_FALSE; dpy->Version = 14; @@ -246,10 +251,14 @@ haiku_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf, } if (!_eglInitContext(&context->ctx, disp, conf, attrib_list)) - ERROR("ERROR creating context"); + goto cleanup; TRACE("Context created\n"); return &context->ctx; + +cleanup: + free(context); + return NULL; } @@ -257,7 +266,13 @@ extern "C" EGLBoolean haiku_destroy_context(_EGLDriver* drv, _EGLDisplay *disp, _EGLContext* ctx) { - ctx=NULL; + struct haiku_egl_context* context = haiku_egl_context(ctx); + + if (_eglPutContext(ctx)) { + // XXX: teardown the context ? + free(context); + ctx = NULL + } return EGL_TRUE; } @@ -273,7 +288,10 @@ haiku_make_current(_EGLDriver* drv, _EGLDisplay* dpy, _EGLSurface *dsurf, struct haiku_egl_surface* surf=haiku_egl_surface(dsurf); _EGLContext *old_ctx; _EGLSurface *old_dsurf, *old_rsurf; - _eglBindContext(ctx, dsurf, rsurf, &old_ctx, &old_dsurf, &old_rsurf); + + if (!_eglBindContext(ctx, dsurf, rsurf, &old_ctx, &old_dsurf, &old_rsurf)) + return EGL_FALSE; + //cont->ctx.DrawSurface=&surf->surf; surf->gl->LockGL(); return EGL_TRUE; -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 08/10] egl/haiku: minor surface management cleanups
Drop the stub/unused function haiku_create_surface() and add some basic implementation for destroy_surface() Cc: Alexander von Gluck IV Signed-off-by: Emil Velikov --- src/egl/drivers/haiku/egl_haiku.cpp | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index 2933acc..154b3af 100644 --- a/src/egl/drivers/haiku/egl_haiku.cpp +++ b/src/egl/drivers/haiku/egl_haiku.cpp @@ -80,17 +80,6 @@ struct haiku_egl_surface * Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface(). */ static _EGLSurface * -haiku_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type, - _EGLConfig *conf, void *native_surface, const EGLint *attrib_list) -{ - return NULL; -} - - -/** - * Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface(). - */ -static _EGLSurface * haiku_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf, void *native_window, const EGLint *attrib_list) { @@ -147,6 +136,10 @@ haiku_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp, static EGLBoolean haiku_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf) { + if (_eglPutSurface(surf)) { + // XXX: detach haiku_egl_surface::gl from the native window and destroy it + free(surf); +} return EGL_TRUE; } -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 02/10] egl/haiku: remove commented out code
It serves little to no purpose. As the driver gets updated, one can look at the existing implementation (dri2) for reference rather than letting the commented functions bitrot. Cc: Alexander von Gluck IV Signed-off-by: Emil Velikov --- src/egl/drivers/haiku/egl_haiku.cpp | 93 - 1 file changed, 93 deletions(-) diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index b347eb6..b09239c 100644 --- a/src/egl/drivers/haiku/egl_haiku.cpp +++ b/src/egl/drivers/haiku/egl_haiku.cpp @@ -74,48 +74,6 @@ struct haiku_egl_surface }; -/* -static void -swrastCreateDrawable(struct dri2_egl_display * dri2_dpy, - struct dri2_egl_surface * dri2_surf, int depth) -{ - -} - - -static void -swrastDestroyDrawable(struct dri2_egl_display * dri2_dpy, - struct dri2_egl_surface * dri2_surf) -{ - -} - - -static void -swrastGetDrawableInfo(__DRIdrawable * draw, int *x, int *y, - int *w, int *h, void *loaderPrivate) -{ - -} - - -static void -swrastPutImage(__DRIdrawable * draw, int op, int x, int y, - int w, int h, char *data, void *loaderPrivate) -{ - -} - - -static void -swrastGetImage(__DRIdrawable * read, int x, int y, - int w, int h, char *data, void *loaderPrivate) -{ - -} -*/ - - static void haiku_log(EGLint level, const char *msg) { @@ -263,44 +221,12 @@ EGLBoolean init_haiku(_EGLDriver *drv, _EGLDisplay *dpy) { _eglLog(_EGL_DEBUG,"\nInitializing Haiku EGL\n"); - //_EGLDisplay* egl_dpy; printf("Initializing Haiku EGL\n"); _eglSetLogProc(haiku_log); loader_set_logger(_eglLog); - /*egl_dpy = (_EGLDisplay*) calloc(1, sizeof(_EGLDisplay)); - if (!egl_dpy) - return _eglError(EGL_BAD_ALLOC, "eglInitialize"); - - dpy->DriverData=(void*) egl_dpy; - if (!dpy->PlatformDisplay) { - // OPEN DEVICE - //dri2_dpy->bwindow = (void*)haiku_create_window(); - //dri2_dpy->own_device = true; - } else { - //dri2_dpy->bwindow = (BWindow*)dpy->PlatformDisplay; - }*/ - - //dri2_dpy->driver_name = strdup("swrast"); - //if (!dri2_load_driver_swrast(dpy)) - // goto cleanup_conn; - - /*dri2_dpy->swrast_loader_extension.base.name = __DRI_SWRAST_LOADER; - dri2_dpy->swrast_loader_extension.base.version = __DRI_SWRAST_LOADER_VERSION; - dri2_dpy->swrast_loader_extension.getDrawableInfo = swrastGetDrawableInfo; - dri2_dpy->swrast_loader_extension.putImage = swrastPutImage; - dri2_dpy->swrast_loader_extension.getImage = swrastGetImage; - - dri2_dpy->extensions[0] = &dri2_dpy->swrast_loader_extension.base; - dri2_dpy->extensions[1] = NULL; - dri2_dpy->extensions[2] = NULL;*/ - - /*if (dri2_dpy->bwindow) { - if (!dri2_haiku_add_configs_for_visuals(dri2_dpy, dpy)) - goto cleanup_configs; - }*/ _eglLog(_EGL_DEBUG,"Add configs"); haiku_add_configs_for_visuals(dpy); @@ -403,27 +329,8 @@ _eglBuiltInDriverHaiku(const char *args) driver->base.API.CreatePixmapSurface = haiku_create_pixmap_surface; driver->base.API.CreatePbufferSurface = haiku_create_pbuffer_surface; driver->base.API.DestroySurface = haiku_destroy_surface; - /* - driver->API.GetProcAddress = dri2_get_proc_address; - driver->API.WaitClient = dri2_wait_client; - driver->API.WaitNative = dri2_wait_native; - driver->API.BindTexImage = dri2_bind_tex_image; - driver->API.ReleaseTexImage = dri2_release_tex_image; - driver->API.SwapInterval = dri2_swap_interval; - */ driver->base.API.SwapBuffers = haiku_swap_buffers; - /* - driver->API.SwapBuffersWithDamageEXT = dri2_swap_buffers_with_damage; - driver->API.SwapBuffersRegionNOK = dri2_swap_buffers_region; - driver->API.PostSubBufferNV = dri2_post_sub_buffer; - driver->API.CopyBuffers = dri2_copy_buffers, - driver->API.QueryBufferAge = dri2_query_buffer_age; - driver->API.CreateImageKHR = dri2_create_image; - driver->API.DestroyImageKHR = dri2_destroy_image_khr; - driver->API.CreateWaylandBufferFromImageWL = dri2_create_wayland_buffer_from_image; - driver->API.GetSyncValuesCHROMIUM = dri2_get_sync_values_chromium; - */ driver->base.Name = "Haiku"; driver->base.Unload = haiku_unload; -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 10/10] egl/haiku: coding style fixes
Cc: Alexander von Gluck IV Signed-off-by: Emil Velikov --- src/egl/drivers/haiku/egl_haiku.cpp | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index da72895..3d00e47 100644 --- a/src/egl/drivers/haiku/egl_haiku.cpp +++ b/src/egl/drivers/haiku/egl_haiku.cpp @@ -284,10 +284,10 @@ haiku_make_current(_EGLDriver* drv, _EGLDisplay* dpy, _EGLSurface *dsurf, { CALLED(); - struct haiku_egl_context* cont=haiku_egl_context(ctx); - struct haiku_egl_surface* surf=haiku_egl_surface(dsurf); + struct haiku_egl_context* cont = haiku_egl_context(ctx); + struct haiku_egl_surface* surf = haiku_egl_surface(dsurf); _EGLContext *old_ctx; -_EGLSurface *old_dsurf, *old_rsurf; + _EGLSurface *old_dsurf, *old_rsurf; if (!_eglBindContext(ctx, dsurf, rsurf, &old_ctx, &old_dsurf, &old_rsurf)) return EGL_FALSE; @@ -302,7 +302,8 @@ extern "C" EGLBoolean haiku_swap_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf) { - struct haiku_egl_surface* surface=haiku_egl_surface(surf); + struct haiku_egl_surface* surface = haiku_egl_surface(surf); + surface->gl->SwapBuffers(); //gl->Render(); return EGL_TRUE; -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 07/10] egl/haiku: kill off haiku_log()
It's an incompletecopy of the default _eglLog() implementation. Just use the default logger. Cc: Alexander von Gluck IV Signed-off-by: Emil Velikov --- src/egl/drivers/haiku/egl_haiku.cpp | 24 1 file changed, 24 deletions(-) diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index 056fafc..2933acc 100644 --- a/src/egl/drivers/haiku/egl_haiku.cpp +++ b/src/egl/drivers/haiku/egl_haiku.cpp @@ -76,28 +76,6 @@ struct haiku_egl_surface }; -static void -haiku_log(EGLint level, const char *msg) -{ - switch (level) { - case _EGL_DEBUG: - fprintf(stderr,"%s", msg); - break; - case _EGL_INFO: - fprintf(stderr,"%s", msg); - break; - case _EGL_WARNING: - fprintf(stderr,"%s", msg); - break; - case _EGL_FATAL: - fprintf(stderr,"%s", msg); - break; - default: - break; - } -} - - /** * Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface(). */ @@ -241,8 +219,6 @@ init_haiku(_EGLDriver *drv, _EGLDisplay *dpy) { CALLED(); - _eglSetLogProc(haiku_log); - TRACE("Add configs\n"); haiku_add_configs_for_visuals(dpy); -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 03/10] egl/haiku: use CALL/TRACE/ERROR over _eglLog() for haiku specifics
Cc: Alexander von Gluck IV Signed-off-by: Emil Velikov --- src/egl/drivers/haiku/egl_haiku.cpp | 64 ++--- 1 file changed, 39 insertions(+), 25 deletions(-) diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index b09239c..36e1277 100644 --- a/src/egl/drivers/haiku/egl_haiku.cpp +++ b/src/egl/drivers/haiku/egl_haiku.cpp @@ -44,6 +44,15 @@ #define CALLOC_STRUCT(T) (struct T *) calloc(1, sizeof(struct T)) +#ifdef DEBUG +# define TRACE(x...) printf("egl_haiku: " x) +# define CALLED() TRACE("CALLED: %s\n", __PRETTY_FUNCTION__) +#else +# define TRACE(x...) +# define CALLED() +#endif +#define ERROR(x...) printf("egl_haiku: " x) + _EGL_DRIVER_STANDARD_TYPECASTS(haiku_egl) @@ -114,23 +123,25 @@ static _EGLSurface * haiku_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf, void *native_window, const EGLint *attrib_list) { + CALLED(); + struct haiku_egl_surface* surface; surface = (struct haiku_egl_surface*)calloc(1,sizeof (*surface)); _eglInitSurface(&surface->surf, disp, EGL_WINDOW_BIT, conf, attrib_list); (&surface->surf)->SwapInterval = 1; - _eglLog(_EGL_DEBUG, "Creating window"); + TRACE("Creating window\n"); BWindow* win = (BWindow*)native_window; - _eglLog(_EGL_DEBUG, "Creating GL view"); + TRACE("Creating GL view\n"); surface->gl = new BGLView(win->Bounds(), "OpenGL", B_FOLLOW_ALL_SIDES, 0, BGL_RGB | BGL_DOUBLE | BGL_ALPHA); - _eglLog(_EGL_DEBUG, "Adding GL"); + TRACE("Adding GL\n"); win->AddChild(surface->gl); - _eglLog(_EGL_DEBUG, "Showing window"); + TRACE("Showing window\n"); win->Show(); return &surface->surf; } @@ -162,13 +173,14 @@ haiku_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf) static EGLBoolean haiku_add_configs_for_visuals(_EGLDisplay *dpy) { - printf("Adding configs\n"); + CALLED(); struct haiku_egl_config* conf; conf = CALLOC_STRUCT(haiku_egl_config); _eglInitConfig(&conf->base, dpy, 1); - _eglLog(_EGL_DEBUG,"Config inited\n"); + TRACE("Config inited\n"); + _eglSetConfigKey(&conf->base, EGL_RED_SIZE, 8); _eglSetConfigKey(&conf->base, EGL_BLUE_SIZE, 8); _eglSetConfigKey(&conf->base, EGL_GREEN_SIZE, 8); @@ -199,19 +211,19 @@ haiku_add_configs_for_visuals(_EGLDisplay *dpy) _eglSetConfigKey(&conf->base, EGL_MAX_PBUFFER_PIXELS, 0); // TODO: How to get the right value ? _eglSetConfigKey(&conf->base, EGL_SURFACE_TYPE, EGL_WINDOW_BIT /*| EGL_PIXMAP_BIT | EGL_PBUFFER_BIT*/); - printf("Config configuated\n"); + TRACE("Config configuated\n"); if (!_eglValidateConfig(&conf->base, EGL_FALSE)) { - _eglLog(_EGL_DEBUG, "Haiku failed to validate config"); + _eglLog(_EGL_DEBUG, "Haiku: failed to validate config"); return EGL_FALSE; } - printf("Validated config\n"); + TRACE("Validated config\n"); _eglLinkConfig(&conf->base); if (!_eglGetArraySize(dpy->Configs)) { _eglLog(_EGL_WARNING, "Haiku: failed to create any config"); return EGL_FALSE; } - printf("Config successful!\n"); + TRACE("Config successfull\n"); return EGL_TRUE; } @@ -220,22 +232,18 @@ extern "C" EGLBoolean init_haiku(_EGLDriver *drv, _EGLDisplay *dpy) { - _eglLog(_EGL_DEBUG,"\nInitializing Haiku EGL\n"); + CALLED(); - printf("Initializing Haiku EGL\n"); _eglSetLogProc(haiku_log); loader_set_logger(_eglLog); - _eglLog(_EGL_DEBUG,"Add configs"); -haiku_add_configs_for_visuals(dpy); + TRACE("Add configs\n"); + haiku_add_configs_for_visuals(dpy); dpy->Version = 14; - //dpy->Extensions.KHR_create_context = true; - - //dri2_dpy->vtbl = &dri2_haiku_display_vtbl; - _eglLog(_EGL_DEBUG, "Initialization finished"); + TRACE("Initialization finished\n"); return EGL_TRUE; } @@ -254,12 +262,15 @@ _EGLContext* haiku_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf, _EGLContext *share_list, const EGLint *attrib_list) { - _eglLog(_EGL_DEBUG,"Creating context"); + CALLED(); + struct haiku_egl_context* context; context=(struct haiku_egl_context*)calloc(1,sizeof (*context)); - if(!_e
Re: [Mesa-dev] [PATCH 01/10] egl/haiku: use correct version variable
Forgot to mention: The series is untested, although it should not have any negative effects. Everyone familiar with Haiku is welcome to test it. Afaict the current implementation is a simple wrapper around BGLView and looks rather incomplete - patches with implementation and/or comments on the missing parts are welcome :-) -Emil On 11 June 2015 at 13:15, Emil Velikov wrote: > Earlier commitfolded the two separate variables into one, but forgot to > update the haiku driver. > > Fixes: 0e4b564ef28(egl: combine VersionMajor and VersionMinor into one > variable) > Cc: Marek Olšák > > Cc: Alexander von Gluck IV > Signed-off-by: Emil Velikov > --- > src/egl/drivers/haiku/egl_haiku.cpp | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/src/egl/drivers/haiku/egl_haiku.cpp > b/src/egl/drivers/haiku/egl_haiku.cpp > index 4d9888d..b347eb6 100644 > --- a/src/egl/drivers/haiku/egl_haiku.cpp > +++ b/src/egl/drivers/haiku/egl_haiku.cpp > @@ -304,8 +304,7 @@ init_haiku(_EGLDriver *drv, _EGLDisplay *dpy) > _eglLog(_EGL_DEBUG,"Add configs"); > haiku_add_configs_for_visuals(dpy); > > - dpy->VersionMajor=1; > - dpy->VersionMinor=4; > + dpy->Version = 14; > > //dpy->Extensions.KHR_create_context = true; > > -- > 2.4.2 > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 6/7] mesa: build xmlconfig to a separate static library
On 11 June 2015 at 00:19, Matt Turner wrote: > On Wed, Jun 10, 2015 at 3:54 PM, Emil Velikov > wrote: >> From: Erik Faye-Lund >> >> As we use the file from both the dri modules and loader, we end up with >> multiple definition of the symbols provided in our gallium dri modules. >> Additionally we compile the file twice. >> >> Resolve both issues, effectively enabling the build on toolchains which >> don't support -Wl,--allow-multiple-definition. >> >> v2: [Emil Velikov] >> - Fix the Scons/Android build. >> - Resolve libgbm build issues (bring back the missing -lm) >> >> Cc: Julien Isorce >> Cc: "10.5 10.6" >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90310 >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90905 >> Signed-off-by: Emil Velikov >> --- >> src/gallium/targets/dri/Makefile.am | 6 -- >> src/loader/Makefile.am | 10 +++--- >> src/mesa/drivers/dri/Makefile.am | 1 + >> src/mesa/drivers/dri/common/Android.mk | 4 +++- >> src/mesa/drivers/dri/common/Makefile.am | 6 +- >> src/mesa/drivers/dri/common/Makefile.sources | 4 +++- >> src/mesa/drivers/dri/common/SConscript | 2 +- >> src/mesa/drivers/dri/i965/Makefile.am| 1 + >> 8 files changed, 17 insertions(+), 17 deletions(-) >> >> diff --git a/src/gallium/targets/dri/Makefile.am >> b/src/gallium/targets/dri/Makefile.am >> index f9e4ada..9648396 100644 >> --- a/src/gallium/targets/dri/Makefile.am >> +++ b/src/gallium/targets/dri/Makefile.am >> @@ -53,12 +53,6 @@ gallium_dri_la_LIBADD = \ >> $(LIBDRM_LIBS) \ >> $(GALLIUM_COMMON_LIB_DEPS) >> >> -# XXX: Temporary allow duplicated symbols, as the loader pulls in >> xmlconfig.c >> -# which already provides driParse* and driQuery* amongst others. >> -# Remove this hack as we come up with a cleaner solution. >> -gallium_dri_la_LDFLAGS += \ >> - -Wl,--allow-multiple-definition >> - >> EXTRA_gallium_dri_la_DEPENDENCIES = \ >> dri.sym \ >> $(top_srcdir)/src/gallium/targets/dri-vdpau.dyn >> diff --git a/src/loader/Makefile.am b/src/loader/Makefile.am >> index 36ddba8..aef1bd6 100644 >> --- a/src/loader/Makefile.am >> +++ b/src/loader/Makefile.am >> @@ -41,15 +41,11 @@ libloader_la_CPPFLAGS += \ >> -I$(top_builddir)/src/mesa/drivers/dri/common/ \ >> -I$(top_srcdir)/src/mesa/ \ >> -I$(top_srcdir)/src/mapi/ \ >> - -DUSE_DRICONF \ >> - $(EXPAT_CFLAGS) >> + -DUSE_DRICONF >> >> -libloader_la_SOURCES += \ >> - $(top_srcdir)/src/mesa/drivers/dri/common/xmlconfig.c >> + libloader_la_LIBADD += \ > > Looks like we have an extra leading space here. > > Do I understand correctly that after this patch the Gallium drivers > will get their only copy of xmlconfig via linking against > libloader.la? > As Erik mentioned - you're bang on the spot. The alternative solutions did end up way messier/longer. Props to Erik for this approach ! -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] egl/drm: Try to use CLOEXEC for drm fds
Hi Derek, On 1 May 2015 at 18:34, Derek Foreman wrote: > These fds can propagate to child processes if we don't set CLOEXEC, > so make a best effort to do that. > > Signed-off-by: Derek Foreman > --- > Noticed this when fixing up similar problems in weston - weston's > drm fd gets dup()ed here and loses CLOEXEC and ends up in every child > process the shell launches. > > src/egl/drivers/dri2/platform_drm.c | 14 +++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > > diff --git a/src/egl/drivers/dri2/platform_drm.c > b/src/egl/drivers/dri2/platform_drm.c > index 486b003..c326d6c 100644 > --- a/src/egl/drivers/dri2/platform_drm.c > +++ b/src/egl/drivers/dri2/platform_drm.c > @@ -596,7 +596,11 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp) > struct dri2_egl_display *dri2_dpy; > struct gbm_device *gbm; > int fd = -1; > - int i; > + int i, flags = O_RDWR; > + > +#ifdef O_CLOEXEC > + flags |= O_CLOEXEC; > +#endif > > loader_set_logger(_eglLog); > > @@ -611,9 +615,9 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp) >char buf[64]; >int n = snprintf(buf, sizeof(buf), DRM_DEV_NAME, DRM_DIR_NAME, 0); >if (n != -1 && n < sizeof(buf)) > - fd = open(buf, O_RDWR); > + fd = open(buf, flags); >if (fd < 0) > - fd = open("/dev/dri/card0", O_RDWR); > + fd = open("/dev/dri/card0", flags); >dri2_dpy->own_device = 1; >gbm = gbm_create_device(fd); >if (gbm == NULL) > @@ -639,6 +643,10 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp) >} > } > > + flags = fcntl(dri2_dpy->fd, F_GETFD); > + if (flags >= 0 && !(flags & FD_CLOEXEC)) > + fcntl(fd, F_SETFD, flags | FD_CLOEXEC); > + In other places in mesa we explicitly check for EINVAL if open() fails, and use that as indication that O_CLOEXEC is not supported (note that we only use the O_RDWR and O_CLOEXEC flags). Curious which would be the better approach to use through mesa ? -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 3/4] vc4: Add support for building on Android.
On 09/06/15 20:06, Eric Anholt wrote: > --- > Android.mk| 2 +- > src/gallium/Android.mk| 5 + > src/gallium/drivers/vc4/Android.mk| 39 > +++ > src/gallium/targets/dri/Android.mk| 4 > src/gallium/winsys/vc4/drm/Android.mk | 34 ++ > 5 files changed, 83 insertions(+), 1 deletion(-) > create mode 100644 src/gallium/drivers/vc4/Android.mk > create mode 100644 src/gallium/winsys/vc4/drm/Android.mk > > diff --git a/Android.mk b/Android.mk > index 341978a..7497748 100644 > --- a/Android.mk > +++ b/Android.mk > @@ -48,7 +48,7 @@ MESA_PYTHON2 := python > DRM_GRALLOC_TOP := hardware/drm_gralloc > > classic_drivers := i915 i965 > -gallium_drivers := swrast freedreno i915g ilo nouveau r300g r600g radeonsi > vmwgfx > +gallium_drivers := swrast freedreno i915g ilo nouveau r300g r600g radeonsi > vmwgfx vc4 > Please add vc4 to the other gallium_drivers list (the comments section). It's slightly annoying but it's a once of thing :-) > MESA_GPU_DRIVERS := $(strip $(BOARD_GPU_DRIVERS)) > > diff --git a/src/gallium/Android.mk b/src/gallium/Android.mk > index a9c34d9..b946681 100644 > --- a/src/gallium/Android.mk > +++ b/src/gallium/Android.mk > @@ -76,6 +76,11 @@ endif > endif > endif > > +# vc4 > +ifneq ($(filter vc4, $(MESA_GPU_DRIVERS)),) > +SUBDIRS += winsys/vc4/drm drivers/vc4 > +endif > + > # vmwgfx > ifneq ($(filter vmwgfx, $(MESA_GPU_DRIVERS)),) > SUBDIRS += winsys/svga/drm drivers/svga > diff --git a/src/gallium/drivers/vc4/Android.mk > b/src/gallium/drivers/vc4/Android.mk > new file mode 100644 > index 000..d048435 > --- /dev/null > +++ b/src/gallium/drivers/vc4/Android.mk > @@ -0,0 +1,39 @@ > +# Copyright (C) 2014 Emil Velikov > +# > +# 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 IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL > +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER > +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > +# DEALINGS IN THE SOFTWARE. > + > +LOCAL_PATH := $(call my-dir) > + > +# get C_SOURCES > +include $(LOCAL_PATH)/Makefile.sources > + > +include $(CLEAR_VARS) > + > +LOCAL_SRC_FILES := \ > + $(C_SOURCES) > + > +LOCAL_CFLAGS := \ > + -Wno-packed-bitfield-compat I think that you can drop this. I've only added it for freedreno, as that was explicitly handled by the automake build. > + > +LOCAL_SHARED_LIBRARIES := libdrm > +LOCAL_STATIC_LIBRARIES := libmesa_glsl Why do we need this one ... is it for the nir generated sources includes path ? Can you add a comment please. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 4/4] gallium: Drop the gallium-specific Android sw winsys.
On 09/06/15 20:06, Eric Anholt wrote: > This was part of gallium_egl, and we now have the normal libEGL Android > winsys support to handle it. I was wondering if we'll ever have a user for this one, while I was purging through the other winsys. With the minor comment in patch 3 addressed, the series is Reviewed-by: Emil Velikov /me now runs to updates the "die gallium_dri.so, die" patches -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] egl/drm: Try to use CLOEXEC for drm fds
On 12/06/15 19:05, Derek Foreman wrote: > On 12/06/15 11:29 AM, Emil Velikov wrote: >> Hi Derek, > > Hi, thanks for looking at this. :) > Props goes to Matt, for the reminder. It kind of fell of my radar. >> On 1 May 2015 at 18:34, Derek Foreman wrote: >>> These fds can propagate to child processes if we don't set CLOEXEC, >>> so make a best effort to do that. >>> >>> Signed-off-by: Derek Foreman >>> --- >>> Noticed this when fixing up similar problems in weston - weston's >>> drm fd gets dup()ed here and loses CLOEXEC and ends up in every child >>> process the shell launches. >>> >>> src/egl/drivers/dri2/platform_drm.c | 14 +++--- >>> 1 file changed, 11 insertions(+), 3 deletions(-) >>> >>> diff --git a/src/egl/drivers/dri2/platform_drm.c >>> b/src/egl/drivers/dri2/platform_drm.c >>> index 486b003..c326d6c 100644 >>> --- a/src/egl/drivers/dri2/platform_drm.c >>> +++ b/src/egl/drivers/dri2/platform_drm.c >>> @@ -596,7 +596,11 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp) >>> struct dri2_egl_display *dri2_dpy; >>> struct gbm_device *gbm; >>> int fd = -1; >>> - int i; >>> + int i, flags = O_RDWR; >>> + >>> +#ifdef O_CLOEXEC >>> + flags |= O_CLOEXEC; >>> +#endif >>> >>> loader_set_logger(_eglLog); >>> >>> @@ -611,9 +615,9 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp) >>>char buf[64]; >>>int n = snprintf(buf, sizeof(buf), DRM_DEV_NAME, DRM_DIR_NAME, 0); >>>if (n != -1 && n < sizeof(buf)) >>> - fd = open(buf, O_RDWR); >>> + fd = open(buf, flags); >>>if (fd < 0) >>> - fd = open("/dev/dri/card0", O_RDWR); >>> + fd = open("/dev/dri/card0", flags); >>>dri2_dpy->own_device = 1; >>>gbm = gbm_create_device(fd); >>>if (gbm == NULL) >>> @@ -639,6 +643,10 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp) >>>} >>> } >>> >>> + flags = fcntl(dri2_dpy->fd, F_GETFD); >>> + if (flags >= 0 && !(flags & FD_CLOEXEC)) >>> + fcntl(fd, F_SETFD, flags | FD_CLOEXEC); >>> + >> In other places in mesa we explicitly check for EINVAL if open() >> fails, and use that as indication that O_CLOEXEC is not supported >> (note that we only use the O_RDWR and O_CLOEXEC flags). Curious which >> would be the better approach to use through mesa ? > > Oops - I think that way is better. > > There's a simple function in loader.c called drm_open_device() that does > the open that way, could we just rename that to loader_open_device() and > make it non-static and call it from dri2_initialize_drm()? > That's exactly what I was thinking actually :-) > That said... > > Unfortunately, it appears my previous testing was insufficient and > there's still a leaked fd - dup() creates fds without CLOEXEC set. > Seems that we ignore that in a few places through mesa - how about we replace dup() + fcntl(F_SETFD, fcntl(F_GETFD)|FD_CLOEXEC) with fcntl(F_DUPFD_CLOEXEC) ? Its requirements are almost the same as O_CLOEXEC (kernel 2.6.{23,24} and glibc 2.7) as opposed to dup2/dup3 which requires glibc 2.9 (not sure about the kernel). Cheers, Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v6] egl/dri2: implement platform_surfaceless
On 12/06/15 17:29, Chad Versace wrote: > On Fri 12 Jun 2015, Zach Reizner wrote: >> From: Haixia Shi >> >> The surfaceless platform is for off-screen rendering only. Render node >> support >> is required. >> >> Only consider the render nodes. Do not use normal nodes as they require >> auth hooks. >> >> v3: change platform_null to platform_surfaceless >> v4: make libdrm required for surfaceless >> v5: remove modified include guards with defined(HAVE_SURFACELESS_PLATFORM) >> v6: use O_CLOEXEC for drm fd >> >> Signed-off-by: Haixia Shi >> Signed-off-by: Zach Reizner >> --- >> configure.ac| 6 + >> src/egl/drivers/dri2/Makefile.am| 5 + >> src/egl/drivers/dri2/egl_dri2.c | 7 ++ >> src/egl/drivers/dri2/egl_dri2.h | 3 + >> src/egl/drivers/dri2/platform_surfaceless.c | 171 >> >> src/egl/main/Makefile.am| 4 + >> src/egl/main/egldisplay.c | 3 +- >> src/egl/main/egldisplay.h | 1 + >> 8 files changed, 199 insertions(+), 1 deletion(-) >> create mode 100644 src/egl/drivers/dri2/platform_surfaceless.c > > >> +#ifdef O_CLOEXEC >> + dri2_dpy->fd = open(card_path, O_RDWR | O_CLOEXEC); >> + if (dri2_dpy->fd < 0 && errno == EINVAL) >> +#endif >> + { >> + dri2_dpy->fd = open(card_path, O_RDWR); >> + if (dri2_dpy->fd >= 0) >> +fcntl(dri2_dpy->fd, F_SETFD, fcntl(dri2_dpy->fd, F_GETFD) | >> + FD_CLOEXEC); >> + } > > The #ifdef and fallback path here look strange to me because Linux has > supported O_CLOEXEC for a lng time. After grepping for O_CLOEXEC, > though, I discovered that this pattern is common throughout Mesa. So... > ok. > On the Linux side, the minimum requirement (kernel 2.6.23 and glibc 2.7) were released in 2007. I'm finding it hard to believe that anyone uses older kernel/glibc than that, although I don't know AMD/Intel's POV on supporting such setups. Whereas for other platforms - *BSD, Solaris, Haiku, Darwin/MacOS, Cygwin... we can check/confirm as we fold the duplication. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v5] egl/dri2: implement platform_surfaceless
On 11/06/15 17:43, Zach Reizner wrote: > From: Haixia Shi > > The surfaceless platform is for off-screen rendering only. Render node support > is required. > > Only consider the render nodes. Do not use normal nodes as they require > auth hooks. > > v3: change platform_null to platform_surfaceless > v4: make libdrm required for surfaceless > v5: remove modified include guards with defined(HAVE_SURFACELESS_PLATFORM) > > Signed-off-by: Haixia Shi > Signed-off-by: Zach Reizner Thanks it looks great. There is a minor comment about a follow-up/future work, although feel free to add, fwiw Reviewed-by: Emil Velikov > --- > configure.ac| 6 ++ > src/egl/drivers/dri2/Makefile.am| 5 + > src/egl/drivers/dri2/egl_dri2.c | 7 ++ > src/egl/drivers/dri2/egl_dri2.h | 3 + > src/egl/drivers/dri2/platform_surfaceless.c | 161 > > src/egl/main/Makefile.am| 4 + > src/egl/main/egldisplay.c | 3 +- > src/egl/main/egldisplay.h | 1 + > 8 files changed, 189 insertions(+), 1 deletion(-) > create mode 100644 src/egl/drivers/dri2/platform_surfaceless.c > > --- /dev/null > +++ b/src/egl/drivers/dri2/platform_surfaceless.c > +EGLBoolean > +dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp) > +{ > + struct dri2_egl_display *dri2_dpy; > + const char* err; > + int i; > + int driver_loaded = 0; > + > + loader_set_logger(_eglLog); > + > + dri2_dpy = calloc(1, sizeof *dri2_dpy); > + if (!dri2_dpy) > + return _eglError(EGL_BAD_ALLOC, "eglInitialize"); > + > + disp->DriverData = (void *) dri2_dpy; > + > + const int limit = 64; > + const int base = 128; > + for (i = 0; i < limit; ++i) { > + char *card_path; > + if (asprintf(&card_path, DRM_RENDER_DEV_NAME, DRM_DIR_NAME, base + i) > < 0) > + continue; > + > + dri2_dpy->fd = open(card_path, O_RDWR); Pretty sure that we'd want some O_CLOEXEC/fcntl() magic but that can be done as a separate patch. Cheers Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/2] egl/glx: Use helper function to open devices to ensure CLOEXEC is set
On 12/06/15 19:07, Derek Foreman wrote: > We do this right almost everywhere already, but the idiom is a little > gruesome. This moves it into loader.c and fixes dri2_initialize_drm() > which could open without CLOEXEC in some cases. > > Signed-off-by: Derek Foreman > --- > src/egl/drivers/dri2/platform_drm.c | 4 ++-- > src/egl/drivers/dri2/platform_wayland.c | 11 +-- > src/egl/drivers/dri2/platform_x11.c | 12 ++-- > src/glx/dri2_glx.c | 10 +- > src/loader/loader.c | 6 +++--- > src/loader/loader.h | 3 +++ > 6 files changed, 12 insertions(+), 34 deletions(-) Despite that it's on the trivial side, can we please split this into 3 patches: 1) s/static int drm_open_device/int loader_drm_open_device/ 2) Use in libEGL (new EGL platform - "surfaceless" will land on Monday, so better wait for that one to land as well) 3) Use in libGL I'll throw in with similar patches for VL (for the video targets/drivers) and pipe-loader (OpenCL). Thank you Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] Mesa 10.6.0
Mesa 10.6.0 is now available. It's the three month effort of approximately 100 individuals, resulting in well over 2000 commits. Big thanks to all the developers, testers, bug-reporters and everyone else for their hard work ! The following extensions are now supported by the said drivers: - GL_AMD_pinned_memory on r600, radeonsi - GL_ARB_clip_control on i965 - GL_ARB_depth_buffer_float on freedreno - GL_ARB_depth_clamp on freedreno - GL_ARB_direct_state_access on all drivers for Core GL contexts. - GL_ARB_draw_indirect, GL_ARB_multi_draw_indirect on r600 - GL_ARB_draw_instanced on freedreno - GL_ARB_gpu_shader_fp64 on nvc0, softpipe - GL_ARB_gpu_shader5 on i965/gen8+ - GL_ARB_instanced_arrays on freedreno - GL_ARB_pipeline_statistics_query on i965, nv50, nvc0, r600, radeonsi, softpipe - GL_ARB_program_interface_query (all drivers) - GL_ARB_texture_stencil8 on nv50, nvc0, r600, radeonsi, softpipe - GL_ARB_texture_view on llvmpipe, softpipe - GL_ARB_uniform_buffer_object on freedreno - GL_ARB_vertex_attrib_64bit on nvc0, softpipe - GL_ARB_viewport_array, GL_AMD_vertex_shader_viewport_index on i965/gen6 - GL_EXT_draw_buffers2 on freedreno - GL_OES_EGL_sync on all drivers - EGL_KHR_fence_sync on i965, freedreno, nv50, nvc0, r600, radeonsi - EGL_KHR_wait_sync on i965, freedreno, nv50, nvc0, r600, radeonsi - EGL_KHR_cl_event2 on freedreno, nv50, nvc0, r600, radeonsi - GL_AMD_performance_monitor on nvc0 git tag: mesa-10.6.0 ftp://ftp.freedesktop.org/pub/mesa/10.6.0/mesa-10.6.0.tar.gz MD5: 04a5fb8122a79b253d270c6bfafce7d3 mesa-10.6.0.tar.gz SHA1: ced55dc430f15a168b7bae908bd2eb3cb973694c mesa-10.6.0.tar.gz SHA256: 9bc659abdba26202509304f259723aaa4343dba6aac4bd87d5baea11d23c8c63 mesa-10.6.0.tar.gz PGP: ftp://ftp.freedesktop.org/pub/mesa/10.6.0/mesa-10.6.0.tar.gz.sig ftp://ftp.freedesktop.org/pub/mesa/10.6.0/mesa-10.6.0.tar.xz MD5: 1a7e2e9f17eff9307fd14fb6cc70783b mesa-10.6.0.tar.xz SHA1: 860569c4ed8bdd335800e4743045cd7a48e7b7cb mesa-10.6.0.tar.xz SHA256: f37e2633978deed02ff0522abc36c709586e2b555fd439a82ab71dce2c866c76 mesa-10.6.0.tar.xz PGP: ftp://ftp.freedesktop.org/pub/mesa/10.6.0/mesa-10.6.0.tar.xz.sig -- -Emil signature.asc Description: OpenPGP digital signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] Mesa 10.6.0
Mesa 10.6.0 is now available. It's the three month effort of approximately 100 individuals, resulting in well over 2000 commits. Big thanks to all the developers, testers, bug-reporters and everyone else for their hard work ! The following extensions are now supported by the said drivers: - GL_AMD_pinned_memory on r600, radeonsi - GL_ARB_clip_control on i965 - GL_ARB_depth_buffer_float on freedreno - GL_ARB_depth_clamp on freedreno - GL_ARB_direct_state_access on all drivers for Core GL contexts. - GL_ARB_draw_indirect, GL_ARB_multi_draw_indirect on r600 - GL_ARB_draw_instanced on freedreno - GL_ARB_gpu_shader_fp64 on nvc0, softpipe - GL_ARB_gpu_shader5 on i965/gen8+ - GL_ARB_instanced_arrays on freedreno - GL_ARB_pipeline_statistics_query on i965, nv50, nvc0, r600, radeonsi, softpipe - GL_ARB_program_interface_query (all drivers) - GL_ARB_texture_stencil8 on nv50, nvc0, r600, radeonsi, softpipe - GL_ARB_texture_view on llvmpipe, softpipe - GL_ARB_uniform_buffer_object on freedreno - GL_ARB_vertex_attrib_64bit on nvc0, softpipe - GL_ARB_viewport_array, GL_AMD_vertex_shader_viewport_index on i965/gen6 - GL_EXT_draw_buffers2 on freedreno - GL_OES_EGL_sync on all drivers - EGL_KHR_fence_sync on i965, freedreno, nv50, nvc0, r600, radeonsi - EGL_KHR_wait_sync on i965, freedreno, nv50, nvc0, r600, radeonsi - EGL_KHR_cl_event2 on freedreno, nv50, nvc0, r600, radeonsi - GL_AMD_performance_monitor on nvc0 git tag: mesa-10.6.0 ftp://ftp.freedesktop.org/pub/mesa/10.6.0/mesa-10.6.0.tar.gz MD5: 04a5fb8122a79b253d270c6bfafce7d3 mesa-10.6.0.tar.gz SHA1: ced55dc430f15a168b7bae908bd2eb3cb973694c mesa-10.6.0.tar.gz SHA256: 9bc659abdba26202509304f259723aaa4343dba6aac4bd87d5baea11d23c8c63 mesa-10.6.0.tar.gz PGP: ftp://ftp.freedesktop.org/pub/mesa/10.6.0/mesa-10.6.0.tar.gz.sig ftp://ftp.freedesktop.org/pub/mesa/10.6.0/mesa-10.6.0.tar.xz MD5: 1a7e2e9f17eff9307fd14fb6cc70783b mesa-10.6.0.tar.xz SHA1: 860569c4ed8bdd335800e4743045cd7a48e7b7cb mesa-10.6.0.tar.xz SHA256: f37e2633978deed02ff0522abc36c709586e2b555fd439a82ab71dce2c866c76 mesa-10.6.0.tar.xz PGP: ftp://ftp.freedesktop.org/pub/mesa/10.6.0/mesa-10.6.0.tar.xz.sig -- -Emil signature.asc Description: OpenPGP digital signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] configure.ac: rename LLVM_VERSION_PATCH to avoid conflict with llvm-config.h
On 13 June 2015 at 19:16, Marek Olšák wrote: > From: Marek Olšák > > --- > configure.ac | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure.ac b/configure.ac > index 34d1ac9..e6d947e 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1929,7 +1929,7 @@ if test "x$enable_gallium_llvm" = xyes; then > LLVM_COMPONENTS="${LLVM_COMPONENTS} all-targets ipo linker > instrumentation" > LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader option objcarcopts > profiledata" > fi > -DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT > -DLLVM_VERSION_PATCH=$LLVM_VERSION_PATCH" > +DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT > -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH" Silly questions: If LLVM already sets LLVM_VERSION_PATCH shouldn't we be using it, rather than setting our own ? Perhaps we can drop the define altogether, considering that we're not using it ? Cheers, Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 5/6] mesa: don't rebind constant buffers after every state change if GS is active
Hi Marek, Out of curiosity: Any rough idea of how much of a perf. improvement this might bring ? Would the hardware ignore the newly (re)bound const. bufs, when the values are unchanged ? Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [Mesa-stable] [PATCH] egl/x11: Set version of swrastLoader to 2
On 16 June 2015 at 16:39, Ian Romanick wrote: > Gak... I thought we fixed all of those. :( > Ops seems like I've missed it. Good news is that this is the last one :-) > Reviewed-by: Ian Romanick > > On 06/15/2015 08:08 PM, Boyan Ding wrote: >> which it actually implements instead of the newest version defined in >> dri_interface.h >> >> Cc: "10.5 10.6" >> Signed-off-by: Boyan Ding Reviewed-by: Emil Velikov and committed to master. Thanks ! Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [Mesa-stable] [PATCH] egl/x11: Remove duplicate call to dri2_x11_add_configs_for_visuals
Hi Boyan, On 13 June 2015 at 08:33, Boyan Ding wrote: > The call to dri2_x11_add_configs_for_visuals (previously > dri2_add_configs_for_visuals) was moved downwards in commit f8c5b8a1, > but appeared again in its original position after its rename in > d019cd81. Remove it. > I believe you're bang on the spot here. The latter commit mentions only about the renaming, so it seems that the hunk got back in as the patch was rebased. Adding Chad to the Cc list, just in case we've missed something :-) Fwiw the patch is Reviewed-by: Emil Velikov -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 5/6] mesa: don't rebind constant buffers after every state change if GS is active
Strange I was under the impression that there are apps that make use of GS, albeit not too many. On the perf side - I was thinking about the hardware (i.e. regardless if the driver does extra state-tracking or not) - would there be the optimisation mentioned, would there be a "stall" in the pipeline, due to the "new" values being flushed/fetched/etc. Now that I think about it, only a few of the HW guys may know the answer on this one, so don't bother with this. Thanks Emil On 16 June 2015 at 20:56, Marek Olšák wrote: > There are probably 0 apps using GS, so the answer is 0. > > The hardware doesn't ignore anything. It only does what it's told to do. > > The radeonsi driver doesn't check if the state change is redundant or not. > > Marek > > On Tue, Jun 16, 2015 at 10:13 PM, Emil Velikov > wrote: >> Hi Marek, >> >> Out of curiosity: >> Any rough idea of how much of a perf. improvement this might bring ? >> Would the hardware ignore the newly (re)bound const. bufs, when the >> values are unchanged ? >> >> Thanks >> Emil >> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] configure.ac: rename LLVM_VERSION_PATCH to avoid conflict with llvm-config.h
On 16 June 2015 at 20:18, Tom Stellard wrote: > On Tue, Jun 16, 2015 at 08:07:57PM +0100, Emil Velikov wrote: >> On 13 June 2015 at 19:16, Marek Olšák wrote: >> > From: Marek Olšák >> > >> > --- >> > configure.ac | 2 +- >> > 1 file changed, 1 insertion(+), 1 deletion(-) >> > >> > diff --git a/configure.ac b/configure.ac >> > index 34d1ac9..e6d947e 100644 >> > --- a/configure.ac >> > +++ b/configure.ac >> > @@ -1929,7 +1929,7 @@ if test "x$enable_gallium_llvm" = xyes; then >> > LLVM_COMPONENTS="${LLVM_COMPONENTS} all-targets ipo linker >> > instrumentation" >> > LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader option >> > objcarcopts profiledata" >> > fi >> > -DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT >> > -DLLVM_VERSION_PATCH=$LLVM_VERSION_PATCH" >> > +DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT >> > -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH" >> >> Silly questions: >> If LLVM already sets LLVM_VERSION_PATCH shouldn't we be using it, >> rather than setting our own ? Perhaps we can drop the define >> altogether, considering that we're not using it ? >> > > Depending on the version of llvm and the build system that was used > LLVM_VERSION_PATH may or not be defined, Is there a version where this is resolved, for all build systems ? > so we can't rely on it. > Currently none of code does, thus my question about dropping it altogether. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] New stable-branch 10.5 candidate pushed
Hello list, The candidate for the Mesa 10.5.8 is now available. Currently we have: - 11 queued - 10 nominated (outstanding) - and 0 rejected (obsolete) patches The present queue consist of a few nouveau and i965 patches, along with couple libEGL hit bug fixes and a build fix for people using llvm/clang. Take a look at section "Mesa stable queue" for more information. Testing --- The following results are against piglit 305ecc3ac89. Changes - classic i965(snb) --- None. Changes - swrast classic None. Changes - gallium softpipe -- None. Changes - gallium llvmpipe (LLVM 3.6) - None. Testing reports/general approval Any testing reports (or general approval of the state of the branch) will be greatly appreciated. Trivial merge conflicts --- commit bb00457f49177d8d43417855f843887de3148e99 Author: Jason Ekstrand i965/fs: Don't let the EOT send message interfere with the MRF hack (cherry picked from commit 86e5afbfee5492235cab1a7be4ea49ac02be1644) The plan is to have 10.5.8 this Friday(19th of June). If you have any questions or comments that you would like to share before the release, please go ahead. Cheers, Emil Mesa stable queue - Nominated (10) == Boyan Ding (2): egl/x11: Remove duplicate call to dri2_x11_add_configs_for_visuals i915: Add XRGB format to intel_screen_make_configs Brian Paul (1): configure: don't try to build gallium DRI drivers if --disable-dri is set Ilia Mirkin (1): glsl: add version checks to conditionals for builtin variable enablement mesa: add GL_PROGRAM_PIPELINE support in KHR_debug calls Mario Kleiner(1): nouveau: Use dup fd as key in drm-winsys hash table to fix ZaphodHeads Tapani Pälli (2): glsl: Allow dynamic sampler array indexing with GLSL ES < 3.00 glsl: validate sampler array indexing for 'constant-index-expression' Tom Stellard (3): clover: Call clBuildProgram() notification function when build completes v2 gallium/drivers: Add threadsafe wrappers for pipe_context and pipe_screen clover: Use threadsafe wrappers for pipe_screen and pipe_context Queued (11) === Ben Widawsky (1): i965: Disable compaction for EOT send messages Boyan Ding (1): egl/x11: Set version of swrastLoader to 2 Emil Velikov (1): docs: Add sha256sums for the 10.5.7 release Erik Faye-Lund (1): mesa: build xmlconfig to a separate static library Francisco Jerez (1): i965: Don't compact instructions with unmapped bits. Ilia Mirkin (3): nvc0/ir: fix collection of first uses for texture barrier insertion nv50,nvc0: clamp uniform size to 64k nvc0/ir: can't have a join on a load with an indirect source Jason Ekstrand (1): i965/fs: Don't let the EOT send message interfere with the MRF hack Marek Olšák (1): egl: fix setting context flags Roland Scheidegger (1): draw: (trivial) fix NULL pointer dereference ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] configure.ac: rename LLVM_VERSION_PATCH to avoid conflict with llvm-config.h
On 18 June 2015 at 13:32, Marek Olšák wrote: > We'll need to check the patch version for tessellation and amdgpu. > Did not see that one. Thanks ! -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/5] darwin: Suppress type conversion warnings for GLhandleARB
On 18 June 2015 at 06:53, Julien Isorce wrote: > From: Jon TURNEY > > On darwin, GLhandleARB is defined as a void *, not the unsigned int it is on > linux. > > For the moment, apply a cast to supress the warning > > Possibly this is safe, as for the mesa software renderer the shader program > handle is not a real pointer, but a integer handle > > Probably this is not the right thing to do, and we should pay closer attention > to how the GLhandlerARB type is used. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66346 Imho one's goal should not be to find the quickest solution to shut warnings up, but to understand them. As mentioned by Jeremy Huddleston in comment 11, this approach only masks the issue. There was a lengthy discussion(s) on the topic a while back and one of the objections on the proposed fixes (from Ian iirc) was that it will break the libglapi ABI. As Jeremy did not see that as a concern perhaps we can revive them and make sure that the ABI change does not happen in the non-Mac world. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/5] applegl: Provide requirements of _SET_DrawBuffers
On 18 June 2015 at 06:53, Julien Isorce wrote: > From: Jon TURNEY > > _SET_DrawBuffers requires driDispatchRemapTable, > so we need to link with libmesa for remap.c. > libmesa requires the C++ linker. > > Also need to arrange to call _mesa_init_remap_table() > to initialize the remap table. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90311 > Signed-off-by: Jon TURNEY > --- > src/glx/Makefile.am | 5 - > src/glx/apple/apple_glapi.c | 3 +++ > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am > index 6e50e09..de24496 100644 > --- a/src/glx/Makefile.am > +++ b/src/glx/Makefile.am > @@ -139,7 +139,10 @@ libglx_la_SOURCES += \ > applegl_glx.c > > SUBDIRS += apple > -libglx_la_LIBADD += $(builddir)/apple/libappleglx.la > +libglx_la_LIBADD += \ > + $(builddir)/apple/libappleglx.la \ > + $(top_builddir)/src/mesa/libmesa.la > +nodist_EXTRA_lib@GL_LIB@_la_SOURCES = dummy.cpp Pulling hunks of mesa into libGL does not sounds like a reasonable thing. There is a reason why Jon had that XXX: in the original commit message. Cheers, Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 3/5] egl/dri2: load libglapi.0.dylib on osx
On 18 June 2015 at 06:53, Julien Isorce wrote: > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90903 > Signed-off-by: Julien Isorce > --- > src/egl/drivers/dri2/egl_dri2.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c > index a1cbd43..90b9648 100644 > --- a/src/egl/drivers/dri2/egl_dri2.c > +++ b/src/egl/drivers/dri2/egl_dri2.c > @@ -2354,6 +2354,8 @@ dri2_load(_EGLDriver *drv) > #ifdef HAVE_SHARED_GLAPI > #ifdef HAVE_ANDROID_PLATFORM > const char *libname = "libglapi.so"; > +#elif defined(__APPLE__) > + const char *libname = "libglapi.0.dylib"; > #else Is this enough to get dri modules (suspecting only swrast atm) working with EGL ? Note that currently libEGL already explicitly links against libglapi, so imho we can just drop the whole thing. Haven't really looked but do we use glFlush() as a workaround or it's something required by the EGL standard ? Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 4/5] egl: use unix defines on osx with clang
On 18 June 2015 at 06:53, Julien Isorce wrote: > CC egl_dri2.lo > include/EGL/eglplatform.h:135:2: > error: "Platform not recognized" > include/EGL/eglplatform.h:140:9: > error: unknown type name 'EGLNativeDisplayType' > typedef EGLNativeDisplayType NativeDisplayType; > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90249 > Signed-off-by: Julien Isorce > --- > include/EGL/eglplatform.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h > index 7802542..b376e64 100644 > --- a/include/EGL/eglplatform.h > +++ b/include/EGL/eglplatform.h > @@ -77,7 +77,7 @@ typedef HDC EGLNativeDisplayType; > typedef HBITMAP EGLNativePixmapType; > typedef HWNDEGLNativeWindowType; > > -#elif defined(__APPLE__) || defined(__WINSCW__) || defined(__SYMBIAN32__) > /* Symbian */ > +#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ > > typedef int EGLNativeDisplayType; > typedef void *EGLNativeWindowType; > @@ -105,7 +105,7 @@ typedef struct ANativeWindow* > EGLNativeWindowType; > typedef struct egl_native_pixmap_t* EGLNativePixmapType; > typedef void* EGLNativeDisplayType; > > -#elif defined(__unix__) > +#elif defined(__unix__) || defined(__APPLE__) > > #if defined(MESA_EGL_NO_X11_HEADERS) > > -- > 1.9.5 (Apple Git-50.3) > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 4/5] egl: use unix defines on osx with clang
On 18 June 2015 at 19:29, Emil Velikov wrote: Sorry about that. Unintentionally hit send ;-\ > On 18 June 2015 at 06:53, Julien Isorce wrote: >> CC egl_dri2.lo >> include/EGL/eglplatform.h:135:2: >> error: "Platform not recognized" >> include/EGL/eglplatform.h:140:9: >> error: unknown type name 'EGLNativeDisplayType' >> typedef EGLNativeDisplayType NativeDisplayType; >> You should not longer see this message. Did you try building things, with the updated eglplatform.h ? >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90249 >> Signed-off-by: Julien Isorce >> --- >> include/EGL/eglplatform.h | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h >> index 7802542..b376e64 100644 >> --- a/include/EGL/eglplatform.h >> +++ b/include/EGL/eglplatform.h >> @@ -77,7 +77,7 @@ typedef HDC EGLNativeDisplayType; >> typedef HBITMAP EGLNativePixmapType; >> typedef HWNDEGLNativeWindowType; >> >> -#elif defined(__APPLE__) || defined(__WINSCW__) || defined(__SYMBIAN32__) >> /* Symbian */ >> +#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ >> The above "defined(__APPLE__))" comes from Khronos, so if it's wrong perhaps it should be reported to them ? Afaict with current mesa this patch is not needed, and things will just work. Cheers, Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 5/5] osx: fix asm support on darwin
mesa_3dnow_transform_points4_2d > -.hidden _mesa_3dnow_transform_points4_2d > -_mesa_3dnow_transform_points4_2d: > +GLOBL GLNAME(_mesa_3dnow_transform_points4_2d) > +HIDDEN(_mesa_3dnow_transform_points4_2d) > +GLNAME(_mesa_3dnow_transform_points4_2d): > > movl V4F_COUNT(%rdx), %ecx /* count */ > movzbl V4F_STRIDE(%rdx), %eax /* stride */ > diff --git a/src/mesa/x86/assyntax.h b/src/mesa/x86/assyntax.h > index 67867bd..8ba7e50 100644 > --- a/src/mesa/x86/assyntax.h > +++ b/src/mesa/x86/assyntax.h > @@ -255,7 +255,7 @@ > #endif /* ACK_ASSEMBLER */ > > > -#if defined(__QNX__) || defined(Lynx) || (defined(SYSV) || defined(SVR4)) && > !defined(ACK_ASSEMBLER) || defined(__ELF__) || defined(__GNU__) || > defined(__GNUC__) && !defined(__MINGW32__) > +#if defined(__QNX__) || defined(Lynx) || (defined(SYSV) || defined(SVR4)) && > !defined(ACK_ASSEMBLER) || defined(__ELF__) || defined(__GNU__) || > defined(__GNUC__) && !defined(__MINGW32__) && !defined(__APPLE__) > #define GLNAME(a) a > #else > #define GLNAME(a) CONCAT(_,a) Considering that this is a fragile area in mesa, can you confirm what kind of testing you've done ? Would be nice to avoid breaking things in various subtle ways. Note to self: Upon a closer look, I'm not sure of many of the assemblers mentioned in assyntax.h are available/used nowadays. Maybe we can have a crazy^W brave soul that does some cleanup in here :-) -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/4] CLOEXEC fix-ups
On 17 June 2015 at 17:28, Derek Foreman wrote: > This series catches a couple of places where we forget to set CLOEXEC on > file descriptors, and makes a helper function for the necessarily ugly > way we have to open fds to make sure CLOEXEC is set. > > Derek Foreman (4): > egl/drm: Duplicate fd with F_DUPFD_CLOEXEC to prevent leak > loader: Rename drm_open_device() to loader_open_device() and share it > glx: Use loader_open_device() helper > egl: Use the loader_open_device() helper to do open with CLOEXEC > > src/egl/drivers/dri2/platform_drm.c | 6 +++--- > src/egl/drivers/dri2/platform_surfaceless.c | 11 +-- > src/egl/drivers/dri2/platform_wayland.c | 11 +-- > src/egl/drivers/dri2/platform_x11.c | 12 ++-- > src/glx/dri2_glx.c | 10 +- > src/loader/loader.c | 6 +++--- > src/loader/loader.h | 3 +++ > 7 files changed, 14 insertions(+), 45 deletions(-) Series looks great. Thanks for the help Derek. Reviewed-by: Emil Velikov Will give it a couple of days, and barring any objections I'll push this to master. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] EGL: Add pbuffer support for drm platform
On 18 June 2015 at 17:11, Liu, Ying2 wrote: > Hi, Chad, > > Thank you so much for reviewing my patch. I am in vacation and sabbatical > right now. I will talk with our customer about your suggestion. I will fix > the patch when I come back. > Enjoy your sabbatical Ying ! As you come back, please look closer at in dri2_drm_create_surface(). Matt did mention that the !dri2_dpy->dri2 case hasn't been updated, albeit used by swrast. So as-is things will end up pretty bad. Cheers, Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 3/5] egl/dri2: load libglapi.0.dylib on osx
On 19 June 2015 at 00:14, Julien Isorce wrote: > On 18 June 2015 at 19:29, Emil Velikov wrote: >> >> On 18 June 2015 at 06:53, Julien Isorce wrote: >> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90903 >> > Signed-off-by: Julien Isorce >> > --- >> > src/egl/drivers/dri2/egl_dri2.c | 2 ++ >> > 1 file changed, 2 insertions(+) >> > >> > diff --git a/src/egl/drivers/dri2/egl_dri2.c >> > b/src/egl/drivers/dri2/egl_dri2.c >> > index a1cbd43..90b9648 100644 >> > --- a/src/egl/drivers/dri2/egl_dri2.c >> > +++ b/src/egl/drivers/dri2/egl_dri2.c >> > @@ -2354,6 +2354,8 @@ dri2_load(_EGLDriver *drv) >> > #ifdef HAVE_SHARED_GLAPI >> > #ifdef HAVE_ANDROID_PLATFORM >> > const char *libname = "libglapi.so"; >> > +#elif defined(__APPLE__) >> > + const char *libname = "libglapi.0.dylib"; >> > #else >> Is this enough to get dri modules (suspecting only swrast atm) working >> with EGL ? > > > Well at least es2_info and es2gears_x11 are working (with both > GALLIUM_DRIVER=softpipe and llvmpipe). I have attached a screenshot: > https://bugs.freedesktop.org/attachment.cgi?id=116583 > Great news. Thanks for the confirmation. >> >> >> Note that currently libEGL already explicitly links against libglapi, >> so imho we can just drop the whole thing. Haven't really looked but do >> we use glFlush() as a workaround or it's something required by the EGL >> standard ? > > > No idea but without the patch you get: > > EGL_LOG_LEVEL=debug es2_info > > libEGL debug: Native platform type: x11 (autodetected) > > libEGL debug: added egl_dri2 to module array > > libEGL warning: DRI2: failed to find _glapi_get_proc_address > > libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglInitialize > > Error: eglInitialize() failed > I never meant that it will work as is, but mentioned a few things about simplifying/cleaning-up the whole thing. I have some ancient fixes in the area that I'll respin and send out in a few hours. Cheers Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 4/5] egl: use unix defines on osx with clang
On 19 June 2015 at 00:23, Julien Isorce wrote: > On 18 June 2015 at 19:33, Emil Velikov wrote: >> >> On 18 June 2015 at 19:29, Emil Velikov wrote: >> Sorry about that. Unintentionally hit send ;-\ >> >> > On 18 June 2015 at 06:53, Julien Isorce wrote: >> >> CC egl_dri2.lo >> >> include/EGL/eglplatform.h:135:2: >> >> error: "Platform not recognized" >> >> include/EGL/eglplatform.h:140:9: >> >> error: unknown type name 'EGLNativeDisplayType' >> >> typedef EGLNativeDisplayType NativeDisplayType; >> >> >> You should not longer see this message. Did you try building things, >> with the updated eglplatform.h ? > > > You are right I forgot to update the new error message with current > eglplatform.h. > >> >> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90249 >> >> Signed-off-by: Julien Isorce >> >> --- >> >> include/EGL/eglplatform.h | 4 ++-- >> >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> >> >> diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h >> >> index 7802542..b376e64 100644 >> >> --- a/include/EGL/eglplatform.h >> >> +++ b/include/EGL/eglplatform.h >> >> @@ -77,7 +77,7 @@ typedef HDC EGLNativeDisplayType; >> >> typedef HBITMAP EGLNativePixmapType; >> >> typedef HWNDEGLNativeWindowType; >> >> >> >> -#elif defined(__APPLE__) || defined(__WINSCW__) || >> >> defined(__SYMBIAN32__) /* Symbian */ >> >> +#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ >> >> >> The above "defined(__APPLE__))" comes from Khronos, so if it's wrong >> perhaps it should be reported to them ? Afaict with current mesa this >> patch is not needed, and things will just work. > > > I remember that with the latest eglplatform.h I had to manually include > #include / #include where they are used (because > not hitting their inclusion by eglplatform.h) > But then build was complaining about converting int to Display*, and void* > to Pixmap/Window. A naive cast could silenced the build error but then it > was crashing at runtime. > I'll have another try. > So it seems that we need something like MESA_EGL_NO_X11_HEADERS for __APPLE__. If anyone has personal experience with upstreaming/discussing such changes to Khronos, some input would be appreciated :-) I think that updating the commit message (and of course getting in touch with the Khronos guys). With Samsung being a "Promoter member" there should be a few people from Samsung that can help sort/speed things up. Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/5] applegl: Provide requirements of _SET_DrawBuffers
On 19 June 2015 at 00:05, Julien Isorce wrote: > Sorry for removing the XXX line. Original message is here: > https://bugs.freedesktop.org/attachment.cgi?id=115539 > > At the time src/glx/apple/apple_glapi.c has been developed this patch was > not needed I guess so I wonder which change made the regression. > That's one way to get to the bottom of it. Alternatively we can take a look at how other glx (indirect, xlib) handle it. As is, the patch gets a big fat NACK, sorry. Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/2] glapi: gl_table.py: remove unused variable 'es'
None of the three build systems ever set it, as such we can clear things up a bit. Cc: Dylan Baker Cc: Jose Fonseca Signed-off-by: Emil Velikov --- src/mapi/glapi/gen/gl_table.py | 57 ++ 1 file changed, 8 insertions(+), 49 deletions(-) diff --git a/src/mapi/glapi/gen/gl_table.py b/src/mapi/glapi/gen/gl_table.py index 3f02902..e25971a 100644 --- a/src/mapi/glapi/gen/gl_table.py +++ b/src/mapi/glapi/gen/gl_table.py @@ -33,10 +33,9 @@ import license class PrintGlTable(gl_XML.gl_print_base): -def __init__(self, es=False): +def __init__(self): gl_XML.gl_print_base.__init__(self) -self.es = es self.header_tag = '_GLAPI_TABLE_H_' self.name = "gl_table.py (from Mesa)" self.license = license.bsd_license_template % ( \ @@ -76,10 +75,9 @@ class PrintGlTable(gl_XML.gl_print_base): class PrintRemapTable(gl_XML.gl_print_base): -def __init__(self, es=False): +def __init__(self): gl_XML.gl_print_base.__init__(self) -self.es = es self.header_tag = '_DISPATCH_H_' self.name = "gl_table.py (from Mesa)" self.license = license.bsd_license_template % ( @@ -123,7 +121,6 @@ class PrintRemapTable(gl_XML.gl_print_base): functions = [] abi_functions = [] -alias_functions = [] count = 0 for f in api.functionIterateByOffset(): if not f.is_abi(): @@ -132,11 +129,6 @@ class PrintRemapTable(gl_XML.gl_print_base): else: abi_functions.append([f, -1]) -if self.es: -# remember functions with aliases -if len(f.entry_points) > 1: -alias_functions.append(f) - print '/* total number of offsets below */' print '#define _gloffset_COUNT %d' % (len(abi_functions + functions)) print '' @@ -144,18 +136,11 @@ class PrintRemapTable(gl_XML.gl_print_base): for f, index in abi_functions: print '#define _gloffset_%s %d' % (f.name, f.offset) -if self.es: -remap_table = "esLocalRemapTable" - -print '#define %s_size %u' % (remap_table, count) -print 'static int %s[ %s_size ];' % (remap_table, remap_table) -print '' -else: -remap_table = "driDispatchRemapTable" +remap_table = "driDispatchRemapTable" -print '#define %s_size %u' % (remap_table, count) -print 'extern int %s[ %s_size ];' % (remap_table, remap_table) -print '' +print '#define %s_size %u' % (remap_table, count) +print 'extern int %s[ %s_size ];' % (remap_table, remap_table) +print '' for f, index in functions: print '#define %s_remap_index %u' % (f.name, index) @@ -182,23 +167,6 @@ class PrintRemapTable(gl_XML.gl_print_base): print '}' print -if alias_functions: -print '' -print '/* define aliases for compatibility */' -for f in alias_functions: -for name in f.entry_points: -if name != f.name: -print '#define CALL_%s(disp, parameters) CALL_%s(disp, parameters)' % (name, f.name) -print '#define GET_%s(disp) GET_%s(disp)' % (name, f.name) -print '#define SET_%s(disp, fn) SET_%s(disp, fn)' % (name, f.name) -print '' - -for f in alias_functions: -for name in f.entry_points: -if name != f.name: -print '#define %s_remap_index %s_remap_index' % (name, f.name) -print '' - return @@ -215,12 +183,6 @@ def _parser(): default='table', metavar="mode", help="Generate either a table or a remap_table") -parser.add_argument('-c', '--es-version', -choices=[None, 'es1', 'es2'], -default=None, -metavar="ver", -dest='es', -help="filter functions for es") return parser.parse_args() @@ -231,12 +193,9 @@ def main(): api = gl_XML.parse_GL_API(args.file_name) if args.mode == "table": -printer = PrintGlTable(args.es) +printer = PrintGlTable() elif args.mode == "remap_table": -printer = PrintRemapTable(args.es) - -if args.es is not None: -api.filter_functions_by_api(args.es) +printer = PrintRemapTable() printer.Print(api) -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/2] glapi: remap_helper.py: remove unused argument 'es'
Identical to the previous commit - unused by neither the Autotools, Android or SCons build. XXX: There are no more users of gl_api.filter_functions_by_api(). Should we just nuke it ? Cc: Dylan Baker Cc: Jose Fonseca Signed-off-by: Emil Velikov --- src/mapi/glapi/gen/remap_helper.py | 8 1 file changed, 8 deletions(-) diff --git a/src/mapi/glapi/gen/remap_helper.py b/src/mapi/glapi/gen/remap_helper.py index 94ae193..edc6c3e 100644 --- a/src/mapi/glapi/gen/remap_helper.py +++ b/src/mapi/glapi/gen/remap_helper.py @@ -174,12 +174,6 @@ def _parser(): metavar="input_file_name", dest='file_name', help="An xml description file.") -parser.add_argument('-c', '--es-version', -choices=[None, 'es1', 'es2'], -default=None, -metavar='ver', -dest='es', -help='A GLES version to support') return parser.parse_args() @@ -188,8 +182,6 @@ def main(): args = _parser() api = gl_XML.parse_GL_API(args.file_name) -if args.es is not None: -api.filter_functions_by_api(args.es) printer = PrintGlRemap() printer.Print(api) -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] New stable-branch 10.5 candidate pushed
On 18/06/15 23:35, Jason Ekstrand wrote: > We should also pull in Chris' 3-patch drawbuffers series if it applies: > > http://lists.freedesktop.org/archives/mesa-dev/2015-June/085851.html > Seems like these never made it to mesa-stable nor have 10.5 in the commit msg. So... I've missed them :-( It's a bit late for 10.5.8, but I will scoop them up immediately after the release. Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] gbm: dlopen libglapi so gbm_create_device works
Hi Franks, On 9 November 2014 at 15:17, Frank Henigman wrote: > On Sat, Nov 8, 2014 at 7:13 PM, Emil Velikov wrote: >> On 06/11/14 21:29, Frank Henigman wrote: >>> From: Frank Henigman >>> >>> Dri driver libs are not linked to pull in libglapi so gbm_create_device() >>> fails when it tries to dlopen them (unless the application is linked >>> with something that does pull in libglapi, like libGL). >>> Until dri drivers can be fixed properly, dlopen libglapi before trying >>> to dlopen them. >>> https://bugs.freedesktop.org/show_bug.cgi?id=57702 >>> >> Hi Frank, >> >> I think I can understand the frustration that this has caused you, so >> unless there are any objections I will gladly pick it up for the 10.4 >> (and if there are no side effects for the stable 10.3 branch). >> >> Just a couple of nits, which I'm planning to make prior to pushing this >> (a week from now, just before the branchpoint) >> * the bugzilla report mentiones libglapi, but in a different light so >> I'll rephase the commit msg a bit. >> * we might as well print out an error message and bail out when we >> dlopen fails. > > I think the check should be after the dlopen() of blah_dri.so, a few lines > down, > and show the dlerror() message if that fails. That's the code I've > put in in the > past to diagnose this issue, and I really should have included it in my patch. > Then there's probably no need to error check the new dlopen, and the later > check can stay in when the new dlopen is removed. > Thanks! > Apologies for dropping the ball on this one - I managed to get it mangled somehow. There shouldn't be (m)any problems with pre-emptively dlopen-ing the library, and I'll resent this (plus a small note that the libname differs across platforms) as part of a larger series. Cheers, Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v2 1/3] nv50/ir: support different unordered_set implementations
Hi Chih-Wei, On 19 June 2015 at 19:00, Chih-Wei Huang wrote: > If build with C++11 standard, use std::unordered_set. > > Otherwise if build on old Android version with stlport, > use std::tr1::unordered_set with a wrapper class. > > Otherwise use std::tr1::unordered_set. > > Signed-off-by: Chih-Wei Huang > --- > Android.common.mk | 2 +- > src/gallium/drivers/nouveau/codegen/nv50_ir.h | 8 ++-- > .../nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 4 +- > .../nouveau/codegen/nv50_ir_lowering_nvc0.h| 4 +- > src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 5 +-- > .../drivers/nouveau/codegen/unordered_set.h| 48 > ++ > 6 files changed, 58 insertions(+), 13 deletions(-) > create mode 100644 src/gallium/drivers/nouveau/codegen/unordered_set.h > > diff --git a/Android.common.mk b/Android.common.mk > index d662d60..35dcda2 100644 > --- a/Android.common.mk > +++ b/Android.common.mk > @@ -77,7 +77,7 @@ LOCAL_CFLAGS += \ > endif > > LOCAL_CPPFLAGS += \ > - $(if $(filter true,$(MESA_LOLLIPOP_BUILD)),-D_USING_LIBCXX) \ > + $(if $(filter true,$(MESA_LOLLIPOP_BUILD)),-std=c++11) \ Please expand like elsewhere in the build. Additionally this is a C++ only flag, so LOCAL_CPPFLAGS does not sound like the right place. Shame that the Android folk did not like (f'd up) the standard CXXFLAGS. ifeq MESA_LOLLIPOP_BUILD... LOCAL_C??FLAGS += \ -std=c++11 endif Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 3/3] egl/main: expose the EGL_RECORDABLE_ANDROID extension
Hi Chih-Wei, On 19 June 2015 at 17:50, Chih-Wei Huang wrote: > Signed-off-by: Chih-Wei Huang > --- > src/egl/main/eglconfig.c | 5 - > src/egl/main/eglconfig.h | 2 ++ > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c > index cf65c69..d9971ed 100644 > --- a/src/egl/main/eglconfig.c > +++ b/src/egl/main/eglconfig.c > @@ -245,7 +245,10 @@ static const struct { > /* extensions */ > { EGL_Y_INVERTED_NOK,ATTRIB_TYPE_BOOLEAN, > ATTRIB_CRITERION_EXACT, > -EGL_DONT_CARE } > +EGL_DONT_CARE }, > + { EGL_RECORDABLE_ANDROID,ATTRIB_TYPE_BOOLEAN, > +ATTRIB_CRITERION_EXACT, > +EGL_DONT_CARE }, > }; > > > diff --git a/src/egl/main/eglconfig.h b/src/egl/main/eglconfig.h > index 84cb227..7121b3d 100644 > --- a/src/egl/main/eglconfig.h > +++ b/src/egl/main/eglconfig.h > @@ -86,6 +86,7 @@ struct _egl_config > > /* extensions */ > EGLint YInvertedNOK; > + EGLint RecordableAndroid; > }; > > > @@ -133,6 +134,7 @@ _eglOffsetOfConfig(EGLint attr) > ATTRIB_MAP(EGL_CONFORMANT,Conformant); > /* extensions */ > ATTRIB_MAP(EGL_Y_INVERTED_NOK,YInvertedNOK); > + ATTRIB_MAP(EGL_RECORDABLE_ANDROID,RecordableAndroid); I believe what Eric meant earlier was that - in order for the extra token to be recognised one needs to implement(and advertise) the whole EGL_ANDROID_recordable extension. From a quick look at the spec, this means adding a _EGL_CHECK_EXTENSION() _eglCreateExtensionsString and making use of the value, rather than just accepting the new token. If you write a piglit test or two that would be amazing :-) Cheers, Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] bugzilla_mesa.sh: sort the bugs list by number
Cc: "10.5 10.6" Suggested-by: Ilia Mirkin Signed-off-by: Emil Velikov --- bin/bugzilla_mesa.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/bugzilla_mesa.sh b/bin/bugzilla_mesa.sh index 491ca0e..9b0cbbc 100755 --- a/bin/bugzilla_mesa.sh +++ b/bin/bugzilla_mesa.sh @@ -25,7 +25,7 @@ trim_after='s/\(show_bug.cgi?id=[0-9]*\).*/\1/' use_https='s/http:/https:/' # extract fdo urls from commit log -urls=$(git log $* | grep 'bugs.freedesktop.org/show_bug' | sed -e $trim_before -e $trim_after -e $use_https | sort | uniq) +urls=$(git log $* | grep 'bugs.freedesktop.org/show_bug' | sed -e $trim_before -e $trim_after -e $use_https | sort-n | uniq) # if DRYRUN is set to "yes", simply print the URLs and don't fetch the # details from fdo bugzilla. -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 00/11] glapi fixes - build whole of mesa with
Hi all, A lovely series inspired (more like 'was awaken to send these out') by Pal Rohár, who was having issues when building xlib-libgl (plus the now enabled gles*) So here, we teach the final two static glapi users about shared-glapi, plus some related fixes. After this is done we can finally start transitioning to shared-only glapi, with some more details as mentioned in one of the patches: XXX: With this one done, we can finally transition with enforcing shared-glapi, and - link the dri modules against libglapi.so, add --no-undefined to the LDFLAGS - drop the dlopen(libglapi.so/libGL.so, RTLD_GLOBAL) workarounds in the loaders - libGL, libEGL and libgbm. - start killing off/cleaning up the dispatch ? The caveats: 1) up to what stage do we care about static libraries - libgl (either dri or xlib based) - osmesa - libEGL 2) how about other platforms (scons) ? - currently the scons uses static glapi, - would we need the dlopen(...) on windows ? Hope everyone is excited about this one as I am :-) Cheers, Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 02/11] drivers/x11: fix the build against shared_glapi
Cc: Brian Paul Signed-off-by: Emil Velikov --- src/mesa/drivers/x11/Makefile.am | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/mesa/drivers/x11/Makefile.am b/src/mesa/drivers/x11/Makefile.am index c0596f8..a8847e8 100644 --- a/src/mesa/drivers/x11/Makefile.am +++ b/src/mesa/drivers/x11/Makefile.am @@ -25,6 +25,11 @@ EXTRA_DIST = SConscript +if HAVE_SHARED_GLAPI +SHARED_GLAPI_CFLAGS = -DGLX_SHARED_GLAPI +SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la +endif + AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/src/mapi \ @@ -34,6 +39,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/gallium/auxiliary \ -I$(top_srcdir)/src/mesa/main \ $(X11_INCLUDES) \ + $(SHARED_GLAPI_CFLAGS) \ $(DEFINES) if HAVE_X11_DRIVER @@ -66,6 +72,7 @@ GL_PATCH = 0 lib@GL_LIB@_la_LIBADD = \ $(top_builddir)/src/mesa/libmesa.la \ $(top_builddir)/src/mapi/glapi/libglapi.la \ + $(SHARED_GLAPI_LIB) \ $(GL_LIB_DEPS) lib@GL_LIB@_la_LDFLAGS = \ -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 04/11] configure: allow building shared-glapi powered libgl-xlib
XXX: With this one done, we can finally transition with enforcing shared-glapi, and - link the dri modules against libglapi.so, add --no-undefined to the LDFLAGS - drop the dlopen(libglapi.so/libGL.so, RTLD_GLOBAL) workarounds in the loaders - libGL, libEGL and libgbm. - start killing off/cleaning up the dispatch ? The caveats: 1) up-to what stage do we care about static libraries - libgl (either dri or xlib based) - osmesa - libEGL 2) how about other platforms (scons) ? - currently the scons uses static glapi, - would we need the dlopen(...) on windows ? Cc: Brian Paul Cc: Jose Fonseca Cc: Adam Jackson Signed-off-by: Emil Velikov --- configure.ac | 6 -- 1 file changed, 6 deletions(-) diff --git a/configure.ac b/configure.ac index 5161361..677fb5b 100644 --- a/configure.ac +++ b/configure.ac @@ -941,12 +941,6 @@ x*yes*yes*) ;; esac -# Building Xlib-GLX requires shared glapi to be disabled. -if test "x$enable_shared_glapi$enable_xlib_glx" = xyesyes; then -AC_MSG_NOTICE([Shared GLAPI should not used with Xlib-GLX, disabling]) -enable_shared_glapi=no -fi - AM_CONDITIONAL(HAVE_SHARED_GLAPI, test "x$enable_shared_glapi" = xyes) # Build the pipe-drivers as separate libraries/modules. -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 06/11] configure: error out when building backend-less libEGL
Signed-off-by: Emil Velikov --- configure.ac | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 677fb5b..8e62bd8 100644 --- a/configure.ac +++ b/configure.ac @@ -1542,8 +1542,12 @@ if test "x$enable_egl" = xyes; then if test "$enable_static" != yes; then if test "x$enable_dri" = xyes; then - HAVE_EGL_DRIVER_DRI2=1 - fi +HAVE_EGL_DRIVER_DRI2=1 +else +# Avoid building an "empty" libEGL. Drop/update this +# when other backends (haiku?) come along. +AC_MSG_ERROR([egl requires --enable-dri]) +fi fi fi -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 07/11] configure: error out when building libEGL without shared-glapi
The latter is a hard requirement and without it we'll error out later on in the build. Cc: "10.5 10.6" Signed-off-by: Emil Velikov --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 8e62bd8..56095ba 100644 --- a/configure.ac +++ b/configure.ac @@ -1543,6 +1543,9 @@ if test "x$enable_egl" = xyes; then if test "$enable_static" != yes; then if test "x$enable_dri" = xyes; then HAVE_EGL_DRIVER_DRI2=1 +if test "x$enable_shared_glapi" = xno; then +AC_MSG_ERROR([egl_dri2 requires --enable-shared-glapi]) +fi else # Avoid building an "empty" libEGL. Drop/update this # when other backends (haiku?) come along. -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 11/11] android: egl: do not link against libglapi
The only reason we touch glapi is to dlopen it to: - make sure that the unresolved _glapi* symbols in the dri modules are provided. - fetch glFlush() and use it at various stages in the dri2 driver. XXX: If anyone has suggestions why the latter is required (or can recommend any reading material) I'm all ears. Cc: Chih-Wei Huang Cc: Eric Anholt Signed-off-by: Emil Velikov --- src/egl/main/Android.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/src/egl/main/Android.mk b/src/egl/main/Android.mk index 8f687e9..0ba7295 100644 --- a/src/egl/main/Android.mk +++ b/src/egl/main/Android.mk @@ -44,7 +44,6 @@ LOCAL_CFLAGS := \ -D_EGL_OS_UNIX=1 LOCAL_SHARED_LIBRARIES := \ - libglapi \ libdl \ libhardware \ liblog \ -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 10/11] gbm: do not (over)link against libglapi.so
The whole of GBM does not rely on even a single symbol from the GL dispatch library, unsuprisingly. The only need for it comes from the unresolved symbols in the DRI modules, which are now correctly handled with Frank's commit. Cc: "10.5 10.6" Signed-off-by: Emil Velikov --- src/gbm/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gbm/Makefile.am b/src/gbm/Makefile.am index dbd4f83..918fdf7 100644 --- a/src/gbm/Makefile.am +++ b/src/gbm/Makefile.am @@ -52,7 +52,8 @@ libgbm_dri_la_CFLAGS = \ $(LIBDRM_CFLAGS) libgbm_la_LIBADD += \ - libgbm_dri.la $(top_builddir)/src/mapi/shared-glapi/libglapi.la $(LIBDRM_LIBS) + libgbm_dri.la \ + $(LIBDRM_LIBS) endif TESTS = gbm-symbols-check -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 09/11] gbm: dlopen libglapi so gbm_create_device works
From: Frank Henigman Dri driver libs are not linked to pull in libglapi so gbm_create_device() fails when it tries to dlopen them (unless the application is linked with something that does pull in libglapi, like libGL). Until dri drivers can be fixed properly, dlopen libglapi before trying to dlopen them. Cc: "10.5 10.6" Signed-off-by: Frank Henigman [Emil Velikov: Drop misleading bugzilla link, mention that libname differs] Reviewed-by: Emil Velikov --- src/gbm/backends/dri/gbm_dri.c | 8 1 file changed, 8 insertions(+) diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 62bdf89..ccc3cc6 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -311,6 +311,14 @@ dri_open_driver(struct gbm_dri_device *dri) if (search_paths == NULL) search_paths = DEFAULT_DRIVER_DIR; + /* Temporarily work around dri driver libs that need symbols in libglapi +* but don't automatically link it in. +*/ + /* XXX: Library name differs on per platforms basis. Update this as +* osx/cygwin/windows/bsd gets support for GBM.. +*/ + dlopen("libglapi.so.0", RTLD_LAZY | RTLD_GLOBAL); + dri->driver = NULL; end = search_paths + strlen(search_paths); for (p = search_paths; p < end && dri->driver == NULL; p = next + 1) { -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 08/11] confiigure: drop unused variable GBM_BACKEND_DIRS
Signed-off-by: Emil Velikov --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index 56095ba..ddc757e 100644 --- a/configure.ac +++ b/configure.ac @@ -1507,7 +1507,6 @@ if test "x$enable_gbm" = xyes; then fi if test "x$enable_dri" = xyes; then -GBM_BACKEND_DIRS="$GBM_BACKEND_DIRS dri" if test "x$enable_shared_glapi" = xno; then AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi]) fi -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 03/11] targets/libgl-xlib: fix the build against shared_glapi
Cc: Brian Paul Cc: Jose Fonseca Signed-off-by: Emil Velikov --- src/gallium/targets/libgl-xlib/Makefile.am | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/targets/libgl-xlib/Makefile.am b/src/gallium/targets/libgl-xlib/Makefile.am index 33b0d13..d99caae 100644 --- a/src/gallium/targets/libgl-xlib/Makefile.am +++ b/src/gallium/targets/libgl-xlib/Makefile.am @@ -24,6 +24,11 @@ GL_MAJOR = 1 GL_MINOR = 5 GL_TINY = $(MESA_MAJOR)$(MESA_MINOR)0$(MESA_TINY) +if HAVE_SHARED_GLAPI +SHARED_GLAPI_CFLAGS = -DGLX_SHARED_GLAPI +SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la +endif + AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/src \ @@ -35,6 +40,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/gallium/state_trackers/glx/xlib \ -I$(top_srcdir)/src/gallium/auxiliary \ -I$(top_srcdir)/src/gallium/winsys \ + $(SHARED_GLAPI_CFLAGS) \ -DGALLIUM_SOFTPIPE \ -DGALLIUM_RBUG \ -DGALLIUM_TRACE @@ -65,6 +71,7 @@ lib@GL_LIB@_la_LIBADD = \ $(top_builddir)/src/mapi/glapi/libglapi.la \ $(top_builddir)/src/mesa/libmesagallium.la \ $(top_builddir)/src/gallium/auxiliary/libgallium.la \ + $(SHARED_GLAPI_LIB) \ $(GL_LIB_DEPS) \ $(CLOCK_LIB) -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 01/11] configure: warn about shared_glapi & xlib-glx only when both are set
Printing out the message when shared_glapi is disabled only leads to confusion. Cc: "10.5 10.6" Signed-off-by: Emil Velikov --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3c763c2..5161361 100644 --- a/configure.ac +++ b/configure.ac @@ -942,7 +942,7 @@ x*yes*yes*) esac # Building Xlib-GLX requires shared glapi to be disabled. -if test "x$enable_xlib_glx" = xyes; then +if test "x$enable_shared_glapi$enable_xlib_glx" = xyesyes; then AC_MSG_NOTICE([Shared GLAPI should not used with Xlib-GLX, disabling]) enable_shared_glapi=no fi -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 05/11] drivers/x11: drop unneeded HAVE_X11_DRIVER check
Already handled in the Makefile which includes the drivers/x11 subdir. Signed-off-by: Emil Velikov --- src/mesa/drivers/x11/Makefile.am | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mesa/drivers/x11/Makefile.am b/src/mesa/drivers/x11/Makefile.am index a8847e8..ba79f69 100644 --- a/src/mesa/drivers/x11/Makefile.am +++ b/src/mesa/drivers/x11/Makefile.am @@ -42,9 +42,7 @@ AM_CPPFLAGS = \ $(SHARED_GLAPI_CFLAGS) \ $(DEFINES) -if HAVE_X11_DRIVER lib_LTLIBRARIES = lib@GL_LIB@.la -endif lib@GL_LIB@_la_SOURCES = \ glxapi.h \ -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 00/11] glapi fixes - build whole of mesa with
On 19 June 2015 at 21:26, Jose Fonseca wrote: > On 19/06/15 20:56, Emil Velikov wrote: >> >> Hi all, >> >> A lovely series inspired (more like 'was awaken to send these out') by >> Pal Rohár, who was having issues when building xlib-libgl (plus the now >> enabled gles*) >> >> So here, we teach the final two static glapi users about shared-glapi, >> plus some related fixes. After this is done we can finally start >> transitioning to shared-only glapi, with some more details as mentioned >> in one of the patches: >> >> XXX: With this one done, we can finally transition with enforcing >> shared-glapi, and >> >> - link the dri modules against libglapi.so, add --no-undefined to >> the LDFLAGS >> - drop the dlopen(libglapi.so/libGL.so, RTLD_GLOBAL) workarounds >> in the loaders - libGL, libEGL and libgbm. >> - start killing off/cleaning up the dispatch ? >> >> The caveats: >> 1) up to what stage do we care about static libraries >> - libgl (either dri or xlib based) >> - osmesa >> - libEGL >> >> 2) how about other platforms (scons) ? >> - currently the scons uses static glapi, >> - would we need the dlopen(...) on windows ? >> >> Hope everyone is excited about this one as I am :-) > > > Maybe I missed the context of this changes, but why this matters or is an > improvement? > If one goes the extra mile (which this series doesn't) - one configure option less, substantial some code de-duplication and consistent use of the code amongst all components provided. This way any improvements/cleanups made to the shared glapi will be available to osmesa/xlib-libgl. > > I understand the rationale for EGL and DRI. But I'm asking specifically > about xlib libgl, osmesa, and Windows ICD drivers. > You and Brian being one of the few few people that use/work on the latter three, I'm really glad that to hear any feedback. Note that this series does not force anything - just allows one to use shared-glapi with the final remaining GL* providers - xlib-libgl. OSMESA already has that capability. > > At a glance, for osmesa and xlib-libgl, forcing to split into multiple .so > seems a step backwards. Rather than making these easy to use and embedded, > it adds complexity, plus potentially prevents using os mesa and libgl-xlib > along side with the system's true libGL.so. > I would say that the biggest complexity is within the presence of both static and shared glapi and the ton of spaghetti code and gets conditionally build. After all, you know better than me the monsters that lie in src/mapi. I'm not sure that having an extra .so makes things that harder to use or embed, although I do see the concern. Needless to say this is one of the reasons why I've been sitting on these for so long. I had most of them for well over 3 months anticipating the interesting discussion and/or bikeshed (even some on my end :-P) > > Finally, it's not clear whether this would force Windows OpenGL ICD drivers > to be split into two multiple DLLs, but I'm afraid that's a big show > stopper. > As mentioned above, nothing is forced and the scons/windows topics are more than welcome for discussions. I'm secretly hoping thst someone will come along with a genius hack which we can use to "fold" the shared glapi back into the original library. > > In summary, having the ability of using a shared glapi sounds great, but > forcing shared glapi everywhere, sounds a bad idea. > I'm suspecting that people might be keen on the following idea - use static glapi for osmesa/xlib-libgl and shared one everywhere else? I fear that this will lead to further separation/bit-rot between the different implementations, but it seems like the bester compromise. Cheers, Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] Mesa 10.5.8
Mesa 10.5.8 is now available. This release contains nouveau and i965 driver fixes, along with a couple of patches for the libEGL library and a build fix for toolchains that don't support -Wl,--allow-multiple-definition. Ben Widawsky (1): i965: Disable compaction for EOT send messages Boyan Ding (1): egl/x11: Set version of swrastLoader to 2 Emil Velikov (3): docs: Add sha256sums for the 10.5.7 release Update version to 10.5.8 Add release notes for the 10.5.8 release Erik Faye-Lund (1): mesa: build xmlconfig to a separate static library Francisco Jerez (1): i965: Don't compact instructions with unmapped bits. Ilia Mirkin (3): nvc0/ir: fix collection of first uses for texture barrier insertion nv50,nvc0: clamp uniform size to 64k nvc0/ir: can't have a join on a load with an indirect source Jason Ekstrand (1): i965/fs: Don't let the EOT send message interfere with the MRF hack Marek Olšák (1): egl: fix setting context flags Roland Scheidegger (1): draw: (trivial) fix NULL pointer dereference git tag: mesa-10.5.8 ftp://ftp.freedesktop.org/pub/mesa/10.5.8/mesa-10.5.8.tar.gz MD5: bd8ecb8f2432a768cca116d072cbec10 mesa-10.5.8.tar.gz SHA1: 864cc4ed60e776bd545eb4638f667dcd7097bb46 mesa-10.5.8.tar.gz SHA256: 611ddcfa3c1bf13f7e6ccac785c8749c3b74c9a78452bac70f8372cf6b209aa0 mesa-10.5.8.tar.gz PGP: ftp://ftp.freedesktop.org/pub/mesa/10.5.8/mesa-10.5.8.tar.gz.sig ftp://ftp.freedesktop.org/pub/mesa/10.5.8/mesa-10.5.8.tar.xz MD5: 5332a3576c5e3a0c3947ee6668dd4157 mesa-10.5.8.tar.xz SHA1: f1b72b0ce0221429249485fd97f39775bc1148bf mesa-10.5.8.tar.xz SHA256: 2866b855c5299a4aed066338c77ff6467c389b2c30ada7647be8758663da2b54 mesa-10.5.8.tar.xz PGP: ftp://ftp.freedesktop.org/pub/mesa/10.5.8/mesa-10.5.8.tar.xz.sig -- -Emil signature.asc Description: OpenPGP digital signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/2] glapi: remap_helper.py: remove unused argument 'es'
On 19/06/15 18:43, Dylan Baker wrote: > This one is reviewed too. I'm on my phone and typing the reviewed by is > hard though, so you'll have to copy from the last one. > > I'm currently in the process of writing a series to replace the mesa XML > with the khronos XML, and as part of that I was planning to rewrite the > underlying representation of the XML. We can delete things now if you > like or we we can wait and they'll jus disappear on their own soon enough. > What is your plan with that work - is your main/primary focus on the transition to the upstream XML, or you'll be able to do some cleanup alongside it ? Would you happen to have any wip branches publicly available ? If these two hinder that work in any way we can drop it. Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/2] glapi: remap_helper.py: remove unused argument 'es'
On 19/06/15 12:29, Jose Fonseca wrote: > I only did minor tweaks to these files, but the series LGTM. > Being the ancient beast this is, I've merely picked of the last two people that had "fun" in the area. Never meant to "target" you/others in any way :-) > Reviewed-by: Jose Fonseca > Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 04/11] configure: allow building shared-glapi powered libgl-xlib
On 19/06/15 19:56, Emil Velikov wrote: > XXX: With this one done, we can finally transition with enforcing > shared-glapi, and > > - link the dri modules against libglapi.so, add --no-undefined to the > LDFLAGS > - drop the dlopen(libglapi.so/libGL.so, RTLD_GLOBAL) workarounds > in the loaders - libGL, libEGL and libgbm. > - start killing off/cleaning up the dispatch ? > > The caveats: > 1) up-to what stage do we care about static libraries > - libgl (either dri or xlib based) > - osmesa > - libEGL > > 2) how about other platforms (scons) ? > - currently the scons uses static glapi, > - would we need the dlopen(...) on windows ? > FTR, the above message will go before committing. It has been added as adding comments below the --- line has backfired on a few occasions (editor/git send-email mangling the whole thing as base64) Cheers, Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 08/11] confiigure: drop unused variable GBM_BACKEND_DIRS
On 19/06/15 22:00, Eric Anholt wrote: > Emil Velikov writes: >> Signed-off-by: Emil Velikov > > s/confiigure/configure/ in the subject. > Will fix. > After that, and some cleanup of the commit message in 4, patches 1-8 > will be: > > Reviewed-by: Eric Anholt > Thanks. > I find 9/10 weird -- if the DRI drivers need libglapi, why aren't they > just linking libglapi? > Short version - currently they don't because of hysterical raisins, once we move to shared-glapi only libGL we'll add the link. Long version - the dri modules require glapi provider. Which could be either one of: 1) the xserver glapi (no longer there since ~1.14) 2) libGL with static glapi 3) the shared glapi Thanks to some interesting overlinking of libgbm, which itself has propagated to libEGL, people won't notice the issue if they're not using 1) or 2). So people working directly with EGL/gbm (wayland/weston folk, everyone writing their wayland compositor, Google with their gbm work) has noticed those and had the same workaround for a while. While most of us working with X and/or GLX did not see it. This of course is prominent, (only?) when using dlopen(libgbm/libEGL), rather than linking against them. When 1) and 2) are gone (second is on it's way out), we can add the link to the dri modules. Although neither helps in the case of "using old dri module with new loader", thus the need for the explicit dlopen(). Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] abundance of branches in mesa.git
On 20/06/15 10:01, Eirik Byrkjeflot Anonsen wrote: > Ilia Mirkin writes: > >> Hello, >> >> There are a *ton* of branches in the upstream mesa git. Here is a full list: >> > [...] >> is there >> any reason to keep these around with the exception of: >> >> master >> $version (i.e. 9.0, 10.0, mesa_7_7_branch, etc) > > Instead of outright deleting old branches, it would be possible to set > up an "archive" repository which mirrors all branches of the main > repository. And then delete "obsolete" branches only from the main > repository. Ideally, you would want a git hook to refuse to create a new > branch (in the main repository) if a branch by that name already exists > in the archive repository. Possibly with the exception that creating a > same-named branch on the same commit would be allowed. > > (And the same for tags, of course) > Personally I am fine with either approach - stay/nuke/move. But I'm thinking that having a mix of the two suggestions might be a nice middle ground. Write a script that nukes branches that are merged in master (check the top commit of the branch) and have an 'archive' repo that contains everything else (minus the stable branches). On a mildly related topic - does anyone know what the 'mesa-test' repo is all about ? There is a similar one for xorg-server, both of which seems like a temporary experiment, which someone forgot to delete. There hasn't been any response on #freedesktop on the topic. Cheers Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 11/11] android: egl: do not link against libglapi
Niiice, thank you. For most drivers - gallium, i965 this is implemented, leaving nouveau_vieux, radeon, r200 and i915. From these i915 does work with EGL, while nouveau_vieux dies miserably (missing __DRI_IMAGE v7 iirc). How well does radeon/r200 fair ? So as a nice starter task one can, modify EGL to use flush_with_flags and fall-back do glFlush. Hmm... seems perfect for Google Code-In (junior GSoC). The application for mentoring org. is around October, perhaps we can give it a bash :-) You did bring a very nice topic though... up-to when are we going to support every loader/dri module combination out there ? Emil On 21 June 2015 at 10:22, Marek Olšák wrote: > FWIW, flushing can be done through > flush_with_flags(__DRI2_FLUSH_CONTEXT), so glFlush shouldn't be > needed, but some drivers don't implement flush_with_flags and I've > heard libEGL and libGL need to support DRI drivers from older Mesas too. > > Marek > > On Fri, Jun 19, 2015 at 9:56 PM, Emil Velikov > wrote: >> The only reason we touch glapi is to dlopen it to: >> - make sure that the unresolved _glapi* symbols in the dri modules are >> provided. >> - fetch glFlush() and use it at various stages in the dri2 driver. >> >> XXX: If anyone has suggestions why the latter is required (or can >> recommend any reading material) I'm all ears. >> >> Cc: Chih-Wei Huang >> Cc: Eric Anholt >> Signed-off-by: Emil Velikov >> --- >> src/egl/main/Android.mk | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/src/egl/main/Android.mk b/src/egl/main/Android.mk >> index 8f687e9..0ba7295 100644 >> --- a/src/egl/main/Android.mk >> +++ b/src/egl/main/Android.mk >> @@ -44,7 +44,6 @@ LOCAL_CFLAGS := \ >> -D_EGL_OS_UNIX=1 >> >> LOCAL_SHARED_LIBRARIES := \ >> - libglapi \ >> libdl \ >> libhardware \ >> liblog \ >> -- >> 2.4.2 >> >> ___ >> mesa-dev mailing list >> mesa-dev@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [RFC] Compatibility between old dri modules and new loaders, and vice verse
Hi all, As kindly hinted by Marek, currently we do have a wide selection of supported dri <> loader combinations. Although we like to think that things never break, we have to admit that not many of us test every possible combinations of dri modules and loaders. With the chances getting smaller as the time gap (age) between the two increases. As such I would like to ask if we're interested in gradually depreciating as the gap grows beyond X years. The rough idea that I have in my mind is: - Check for obsolete extensions (requirements for such) - both in the dri modules and the loaders (including the xserver). - Add some WARN messages ("You're using an old loader/DRI module. Update to XXX or later") when such code path is hit. - After X mesa releases, we remove the dri extension from the module(s) and bump the requirement(s) in the loader(s). And now the more important question why ? - Very rarely tested and not actively supported - if it works it works, we only cover one stable branch. - Having a quick look at the the "if extension && extension.version >= y" maze does leave most of us speechless. - Will allow us to start removing a few of the nasty quirks/hacks that we currently have laying around. Worth mentioning: - Depreciation period will be based on the longest time frame set by LTS versions of distros. For example if Debian A ships X and mesa 3 years apart, while Ubuntu does is ~2.5 and RedHat ~2.8, we'll stick with 3 years. - libGL dri1 support... it's been almost four years since the removal of the dri1 modules. Since then the only activity that I've noticed by Connor Behan on the r128 front. Although it seems that he has covered the ddx and is just looking at the kernel side of things. Should we consider mesa X (10.6 ?) as the last one that supports such old modules in it's libGL and give it a much needed cleanup ? How would people feel about this - do we have any strong ack/nack about the idea ? Are there many people/companies that support distros where the xserver <> mesa gap is over, say 2 years ? Looking forward to any feedback, Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 00/11] glapi fixes - build whole of mesa with
On 22 June 2015 at 15:01, Jose Fonseca wrote: > On 19/06/15 23:09, Emil Velikov wrote: >> >> On 19 June 2015 at 21:26, Jose Fonseca wrote: >>> >>> On 19/06/15 20:56, Emil Velikov wrote: >>>> >>>> >>>> Hi all, >>>> >>>> A lovely series inspired (more like 'was awaken to send these out') by >>>> Pal Rohár, who was having issues when building xlib-libgl (plus the now >>>> enabled gles*) >>>> >>>> So here, we teach the final two static glapi users about shared-glapi, >>>> plus some related fixes. After this is done we can finally start >>>> transitioning to shared-only glapi, with some more details as mentioned >>>> in one of the patches: >>>> >>>> XXX: With this one done, we can finally transition with enforcing >>>> shared-glapi, and >>>> >>>>- link the dri modules against libglapi.so, add --no-undefined to >>>> the LDFLAGS >>>>- drop the dlopen(libglapi.so/libGL.so, RTLD_GLOBAL) workarounds >>>> in the loaders - libGL, libEGL and libgbm. >>>>- start killing off/cleaning up the dispatch ? >>>> >>>> The caveats: >>>> 1) up to what stage do we care about static libraries >>>>- libgl (either dri or xlib based) >>>>- osmesa >>>>- libEGL >>>> >>>> 2) how about other platforms (scons) ? >>>>- currently the scons uses static glapi, >>>>- would we need the dlopen(...) on windows ? >>>> >>>> Hope everyone is excited about this one as I am :-) >>> >>> >>> >>> Maybe I missed the context of this changes, but why this matters or is an >>> improvement? >>> >> If one goes the extra mile (which this series doesn't) - one configure >> option less, substantial some code de-duplication and consistent use >> of the code amongst all components provided. This way any >> improvements/cleanups made to the shared glapi will be available to >> osmesa/xlib-libgl. > > > I'm perfectly happy with removing the configure option. > > And I understand the benefits of unified code paths, but I believe that for > this particular case, the difference in requirements really demands the > separate code paths. > >>> In summary, having the ability of using a shared glapi sounds great, but >>> forcing shared glapi everywhere, sounds a bad idea. >>> >> I'm suspecting that people might be keen on the following idea - use >> static glapi for osmesa/xlib-libgl and shared one everywhere else? > > > Yes, that sounds reasonable for me. (Needs libgl-gdi too.) > Indeed. Everything gdi is build only via scons so we'll touch it only if needed. >> >> I fear that this will lead to further separation/bit-rot between the >> different implementations, but it seems like the bester compromise. > > > I don't feel strongly between: a) using the same source code for both > static/shared glapi (switched by a pre-processor define), or b) only share > the interface but have shared/static glapi implementations. I'm actually > not that familiar with that code. > > > Either way, we can have two glapi build targets (a shared-glapi and a > static-glapipe) side-by-side, so that there are no more source-wide > configure flags. > In theory it should be fine, in practise... I'm rather cautious as mapi is the most convoluted part in mesa, and with the "subdir-objects" option being toggled soon things may go (albeit unlikely) subtly haywire. > > I believe a lot of the complexity of that code comes from assembly. I > wonder if it's really justified nowadays (and even if it is, whether it > would be better served with GNU C assembly.) Futhermore, I believe on > Windows we use any assembly, so if we split shared/static glapi source code, > we could probably abandon assembly from the static-glapi. > I'm not 100% sure but I'd suspect that Cygwin might use it when combined with swrast_dri. Don't know what others use - iirc some of the BSD folks are moving over to llvm. That I aside there is a massive amount of #ifdef spaghetti, apart from the assembly code. Can I have your ack/nack on the idea of having shared-glapi available for xlib-libgl (patches 2, 3 and 4), until we have both glapi's built in in parallel ? As mentioned originally, currently we fail to build if one enabled gles* and xlib-libgl and adding another hack in configure.ac is feel like flocking up a dead horse. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] u_vbuf: fix src_offset alignment in u_vbuf_create_vertex_elements()
Hello gents, On 19 June 2015 at 15:39, Brian Paul wrote: > If the driver says PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY=1, > the driver should never receive a pipe_vertex_element::src_offset value > that's not a multiple of four. But the vbuf code wasn't actually adjusting > the src_offset value when creating the vertex element state object. > > We just need to align the src_offset values put in the driver_attribs[] > array. > > See the piglit gl-1.5-vertex-buffer-offsets test. Is this something we want in the 10.6 stable branch ? According to the comment in the piglit test, the spec does not explicitly state what should happen in the particular case, but I'd assume that we want to provide some safe behaviour ? -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: move ARB_gs5 enums to core, EXT_polygon_offset_clamp to desktop
Hi Ilia, On 19 June 2015 at 17:23, Ilia Mirkin wrote: > When adding EXT_polygon_offset_clamp, I first made it core-only, and > never moved the enum getter back to the GL/GL_CORE section. Similarly, > ARB_gs5 is a core-only extension, so move its getters to the GL_CORE > section. > Would this be worthy for 10.6 ? Afaict without it, attempting to query POLYGON_OFFSET_CLAMP_EXT will return an error. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] mesa: fold duplicated GL/GL_CORE/GLES3 entry in get_hash_params.py
Signed-off-by: Emil Velikov --- src/mesa/main/get_hash_params.py | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py index 74ff3ba..c25e1b6 100644 --- a/src/mesa/main/get_hash_params.py +++ b/src/mesa/main/get_hash_params.py @@ -351,6 +351,9 @@ descriptor=[ # GL_ARB_framebuffer_object [ "MAX_SAMPLES", "CONTEXT_INT(Const.MaxSamples), extra_ARB_framebuffer_object_EXT_framebuffer_multisample" ], +# GL_ARB_sampler_objects / GL 3.3 / GLES 3.0 + [ "SAMPLER_BINDING", "LOC_CUSTOM, TYPE_INT, GL_SAMPLER_BINDING, NO_EXTRA" ], + # GL_ARB_sync [ "MAX_SERVER_WAIT_TIMEOUT", "CONTEXT_INT64(Const.MaxServerWaitTimeout), extra_ARB_sync" ], @@ -404,11 +407,6 @@ descriptor=[ [ "TEXTURE_EXTERNAL_OES", "LOC_CUSTOM, TYPE_BOOLEAN, 0, extra_OES_EGL_image_external" ], ]}, -{ "apis": ["GL", "GL_CORE", "GLES3"], "params": [ -# GL_ARB_sampler_objects / GL 3.3 / GLES 3.0 - [ "SAMPLER_BINDING", "LOC_CUSTOM, TYPE_INT, GL_SAMPLER_BINDING, NO_EXTRA" ], -]}, - # Enums in OpenGL Core profile and ES 3.1 { "apis": ["GL_CORE", "GLES3"], "params": [ # GL_ARB_draw_indirect / GLES 3.1 -- 2.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] configure: use $target_cpu, not $host_cpu when setting asm_arch
On 24 June 2015 at 10:28, Marek Olšák wrote: > Hi, > > This is how I build 32-bit Mesa: > > # Mandatory for 32-bit > dir=i386-linux-gnu > build=i686-linux-gnu > export CFLAGS="-m32 -O2 -g" > export CXXFLAGS="$CFLAGS" > export LDFLAGS="-L/usr/lib/$dir" On Arch/Gentoo (and maybe others) don't need the LDFLAGS, but I'd suspect it's essential for Debian based distros. If any anyone has some tips that might be I'll appreciate the input :-) Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [Mesa-stable] [PATCH 2/6] clover: Call clBuildProgram() notification function when build completes v2
On 3 June 2015 at 14:27, Francisco Jerez wrote: > Emil Velikov writes: > >> Hi Tom, >> >> On 31 March 2015 at 15:29, Francisco Jerez wrote: >>> Tom Stellard writes: >>> >>>> v2: >>>> - Only call notification for build errors >>>> - Fix clCompileProgram() >>>> >>>> Cc: 10.5 10.4 >>>> --- >>>> src/gallium/state_trackers/clover/api/program.cpp | 16 ++-- >>>> 1 file changed, 14 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/src/gallium/state_trackers/clover/api/program.cpp >>>> b/src/gallium/state_trackers/clover/api/program.cpp >>>> index 60184ed..5cd543c 100644 >>>> --- a/src/gallium/state_trackers/clover/api/program.cpp >>>> +++ b/src/gallium/state_trackers/clover/api/program.cpp >>>> @@ -180,12 +180,18 @@ clBuildProgram(cl_program d_prog, cl_uint num_devs, >>>> validate_build_program_common(prog, num_devs, d_devs, pfn_notify, >>>> user_data); >>>> >>>> prog.build(devs, opts); >>>> + if (pfn_notify) >>>> + pfn_notify(d_prog, user_data); >>> >>> Maybe leave blank lines around the conditional where preceded/followed >>> by another statement? >>> >>>> return CL_SUCCESS; >>>> +} catch (const build_error &e) { >>>> + if (pfn_notify) >>>> + pfn_notify(d_prog, user_data); >>>> + if (e.get() == CL_COMPILE_PROGRAM_FAILURE) >>>> + return CL_BUILD_PROGRAM_FAILURE; >>>> + return e.get(); >>> >>> You can just return CL_BUILD_PROGRAM_FAILURE here unconditionally. >>> >>>> } catch (error &e) { >>>> if (e.get() == CL_INVALID_COMPILER_OPTIONS) >>>>return CL_INVALID_BUILD_OPTIONS; >>>> - if (e.get() == CL_COMPILE_PROGRAM_FAILURE) >>>> - return CL_BUILD_PROGRAM_FAILURE; >>>> return e.get(); >>>> } >>>> >>>> @@ -223,8 +229,14 @@ clCompileProgram(cl_program d_prog, cl_uint num_devs, >>>>objs(d_header_progs, num_headers)); >>>> >>>> prog.build(devs, opts, headers); >>>> + if (pfn_notify) >>>> + pfn_notify(d_prog, user_data); >>> >>> Same here. >>> >> Did you had the chance to address Francisco's comments ? Did this >> patch fell through the cracks, or should I consider it >> obsolete/rejected ? >> > > I think the patch was good it just fell through the cracks. Tom? > Humble reminder. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [Mesa-stable] [PATCH 4/4] glsl: validate sampler array indexing for 'constant-index-expression'
Hi gents, On 9 June 2015 at 14:09, Francisco Jerez wrote: > Francisco Jerez writes: > >> Tapani Pälli writes: >> >>> Desktop GLSL < 130 and GLSL ES < 300 allow sampler array indexing where >>> index can contain a loop induction variable. This extra check will warn >>> during linking if some of the indexes could not be turned in to constant >>> expressions. >>> >>> v2: warning instead of error for backends that did not enable >>> UnrollSamplerArrayDynamicIndexing option (have dynamic indexing) >>> >>> Signed-off-by: Tapani Pälli >>> Cc: "10.5" and "10.6" >>> --- >>> src/glsl/linker.cpp | 77 >>> + >>> 1 file changed, 77 insertions(+) >>> >>> diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp >>> index 9978380..27d7c18 100644 >>> --- a/src/glsl/linker.cpp >>> +++ b/src/glsl/linker.cpp >>> @@ -346,6 +346,39 @@ private: >>> bool uses_non_zero_stream; >>> }; >>> >>> +/* Class that finds array derefs and check if indexes are dynamic. */ >>> +class dynamic_sampler_array_indexing_visitor : public >>> ir_hierarchical_visitor >>> +{ >>> +public: >>> + dynamic_sampler_array_indexing_visitor() : >>> + dynamic_sampler_array_indexing(false) >>> + { >>> + } >>> + >>> + ir_visitor_status visit_enter(ir_dereference_array *ir) >>> + { >>> + if (!ir->variable_referenced()) >>> + return visit_continue; >>> + >>> + if (!ir->variable_referenced()->type->contains_sampler()) >>> + return visit_continue; >>> + >>> + if (!ir->array_index->constant_expression_value()) { >>> + dynamic_sampler_array_indexing = true; >>> + return visit_stop; >>> + } >>> + return visit_continue; >>> + } >>> + >>> + bool uses_dynamic_sampler_array_indexing() >>> + { >>> + return dynamic_sampler_array_indexing; >>> + } >>> + >>> +private: >>> + bool dynamic_sampler_array_indexing; >>> +}; >>> + >>> } /* anonymous namespace */ >>> >>> void >>> @@ -2736,6 +2769,40 @@ build_program_resource_list(struct gl_context *ctx, >>> */ >>> } >>> >>> +/** >>> + * This check is done to make sure we allow only constant expression >>> + * indexing and "constant-index-expression" (indexing with an expression >>> + * that includes loop induction variable). >>> + */ >>> +static bool >>> +validate_sampler_array_indexing(struct gl_context *ctx, >>> +struct gl_shader_program *prog) >>> +{ >>> + dynamic_sampler_array_indexing_visitor v; >>> + for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) { >>> + if (prog->_LinkedShaders[i] == NULL) >>> + continue; >>> + >>> + bool no_dynamic_indexing = >>> + >>> ctx->Const.ShaderCompilerOptions[i].UnrollSamplerArrayDynamicIndexing; >>> + >>> + /* Search for array derefs in shader. */ >>> + v.run(prog->_LinkedShaders[i]->ir); >>> + if (v.uses_dynamic_sampler_array_indexing()) { >>> + const char *msg = "sampler arrays indexed with non-constant " >>> + "expressions is forbidden in GLSL %s %u"; >> >> For the sake of clarity, maybe add that it's sampler array indexing with >> *general* non-constant expressions what is forbidden, loop induction >> variables are allowed and they are technically a kind of non-constant >> expression. >> >>> + /* Backend has indicated that it has no dynamic indexing support. >>> */ >>> + if (no_dynamic_indexing) { >>> +linker_error(prog, msg, prog->IsES ? "ES" : "", prog->Version); >>> +return false; >>> + } else { >>> +linker_warning(prog, msg, prog->IsES ? "ES" : "", >>> prog->Version); >> >> It seems a bit mean to spam the user with another warning at link time, >> you've already warned in PATCH 01 that this feature will be removed in >> more recent GLSL versions. If you drop the warning: >> > Er, nevermind, the warning here is indeed subtly different (you are > doing a kind of indexing not considered under the > constant-index-expression wording), disregard my comment about dropping > the warning, it seems fine to warn the user twice. > >> Reviewed-by: Francisco Jerez >> If I understand things correctly the series (patches 1/4 and 4/4 from stable pov) are reviewed but are not in master. Are there any obstacles/objections against doing so ? Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] New stable-branch 10.6 candidate pushed
Hello list, The candidate for the Mesa 10.6.1 is now available. Currently we have: - 22 queued - 19 nominated (outstanding) - and 0 rejected (obsolete) patches The present queue consist of core mesa and glsl patches (amonst which a Dota2 Reborn bugfix) affecting all dri drivers, nouveau specific fixes and a selection of shared-glapi commits - from build fixes, to ones ensuring that the dri modules can be loaded. Take a look at section "Mesa stable queue" for more information. Testing --- The following results are against piglit 246791c51ec. Changes - classic i965(snb) --- None. Changes - swrast classic None. Changes - gallium softpipe -- None. Changes - gallium llvmpipe (LLVM 3.6) - None. Testing reports/general approval Any testing reports (or general approval of the state of the branch) will be greatly appreciated. Trivial merge conflicts --- None. The plan is to have 10.6.1 this Friday(26th of June). If you have any questions or comments that you would like to share before the release, please go ahead. Cheers, Emil Mesa stable queue - Nominated (19) == Anuj Phogat (8): mesa: Turn get_readpixels_transfer_ops() in to a global function meta: Fix transfer operations check in meta pbo path for readpixels mesa: Fix conditions to test signed, unsigned integer format mesa: Add a mesa utility function _mesa_need_signed_unsigned_int_conversion() meta: Abort meta pbo path if readpixels need signed-unsigned meta: Don't do fragment color clamping in case of ReadPixels mesa: Add a helper function _mesa_need_luminance_to_rgb_conversion() meta: Fix reading luminance texture as rgba in _mesa_meta_pbo_GetTexSubImage() Boyan Ding (1): i915: Add XRGB format to intel_screen_make_configs Brian Paul (1): configure: don't try to build gallium DRI drivers if --disable-dri is set Emil Velikov (1): bugzilla_mesa.sh: sort the bugs list by number Kenneth Graunke (1) i965/fs: Fix ir_txs in emit_texture_gen4_simd16(). Mario Kleiner(1): nouveau: Use dup fd as key in drm-winsys hash table to fix ZaphodHeads Matt Turner (1): i965/fs: Don't mess up stride for uniform integer multiplication. Tapani Pälli (2): glsl: Allow dynamic sampler array indexing with GLSL ES < 3.00 glsl: validate sampler array indexing for 'constant-index-expression' Tom Stellard (3): clover: Call clBuildProgram() notification function when build completes v2 gallium/drivers: Add threadsafe wrappers for pipe_context and pipe_screen clover: Use threadsafe wrappers for pipe_screen and pipe_context Queued (22) === Anuj Phogat (4): mesa: Handle integer formats in need_rgb_to_luminance_conversion() mesa: Use helper function need_rgb_to_luminance_conversion() mesa: Turn need_rgb_to_luminance_conversion() in to a global function meta: Abort meta path if ReadPixels need rgb to luminance conversion Ben Widawsky (1): i965/gen9: Implement Push Constant Buffer workaround Boyan Ding (2): egl/x11: Set version of swrastLoader to 2 egl/x11: Remove duplicate call to dri2_x11_add_configs_for_visuals Emil Velikov (5): docs: Add sha256sums for the 10.6.0 release configure: warn about shared_glapi & xlib-glx only when both are set configure: error out when building backend-less libEGL configure: error out when building libEGL without shared-glapi gbm: do not (over)link against libglapi.so Frank Henigman (1): gbm: dlopen libglapi so gbm_create_device works Ilia Mirkin (9): nvc0/ir: fix collection of first uses for texture barrier insertion nv50,nvc0: clamp uniform size to 64k nvc0/ir: can't have a join on a load with an indirect source glsl: handle conversions to double when comparing param matches glsl: add version checks to conditionals for builtin variable enablement mesa: add GL_PROGRAM_PIPELINE support in KHR_debug calls glsl: binding point is a texture unit, which is a combined space nvc0: always put all tfb bufs into bufctx nv50,nvc0: make sure to pushbuf_refn before putting bo into pushbuf_data ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] configure: use $target_cpu, not $host_cpu when setting asm_arch
On 25 June 2015 at 14:39, Brian Paul wrote: > > I've got 32-bit libs building on 64-bit Ubuntu and Fedora. But I've found a > weird problem. > > On Fedora 22, for example, Mesa's make install creates a /usr/lib/libGL.la > file which contains the line: > > dependency_libs=' -L/usr/lib -lexpat -L/usr/lib64 /usr/lib64/libglapi.la > -lXext -lXdamage -lXfixes -lX11-xcb -lX11 -lxcb-glx -lxcb-dri2 -lxcb > -lXxf86vm /usr/lib/libdrm.la -ludev -lm -lpthread -ldl' > > Note the -L/usr/lib/64 and /usr/lib64/libglapi.la parts. > > When I try to build 32-bit Mesa demos, libtools finds this libGL.la file and > tries to link the 32-bit glxgears.o (for example) with > /usr/lib64/libglapi.so. That fails, of course. > > Removing the /usr/lib/libGL.la file is a work-around but I'm interested in > finding a better solution. > Ahh yes the lovely .la files. Short version - just delete them. Slightly loner version: Most distros explicitly remove them as they tend to wreck chavok as you've noticed. Unfortunatelly the only answer that I've got at #autotools was that autotools was doing the right thing, and I failed to squese any hints about "why" or "how to get things working without nuking the .la files". -Emil P.S. I'm guessing you have other ones (libdrm) that caused your earlier problem ? ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: Enable subdir-objects globally.
On 11 June 2015 at 00:30, Matt Turner wrote: > --- > Emil, > > With your series, I think we can enable subdir-objects globally! > > Please give it a test. > Thanks. I haven't noticed any problems with a few build permutations, plus a piglit run of the resulting binaries. It did point out that static glapi and make check are broken even without this patch though :-P I guess I'll be looking at building it alongside the shared one, mandating the latter for dri builds and using the former for xlib-libgl/osmesa while dropping the configure option next. Pushed to master. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/4] egl/drm: plug memory leak
Free the memory for dri2_surf in the unlikely case that one provides NULL for native_window. Also set the relevant EGL_ERROR to provide feedback to the user. Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/platform_drm.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index a62da41..0d1f4c6 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -115,8 +115,11 @@ dri2_drm_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type, switch (type) { case EGL_WINDOW_BIT: - if (!window) - return NULL; + if (!window) { + _eglError(EGL_BAD_NATIVE_WINDOW, "dri2_create_surface"); + goto cleanup_surf; + } + surf = gbm_dri_surface(window); dri2_surf->gbm_surf = surf; dri2_surf->base.Width = surf->base.width; -- 2.4.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/4] egl/wayland: handle NULL native_window in create_surface
Rise EGL_BAD_NATIVE_WINDOW instead of crashing. Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/platform_wayland.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 1c98552..052b0e9 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -149,6 +149,11 @@ dri2_wl_create_surface(_EGLDriver *drv, _EGLDisplay *disp, else dri2_surf->format = WL_DRM_FORMAT_ARGB; + if (!window) { + _eglError(EGL_BAD_NATIVE_WINDOW, "dri2_create_surface"); + goto cleanup_surf; + } + dri2_surf->wl_win = window; dri2_surf->wl_win->private = dri2_surf; -- 2.4.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 4/4] egl/x11: handle when invalid drawable is passed in create_surface
0 is not used as a valid drawable id, as such there is no point in attempting to query it's geometry. Just bail out early and provide the more meaningful EGL_BAD_NATIVE_WINDOW to the user. Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/platform_x11.c | 4 1 file changed, 4 insertions(+) diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c index 56c1428..9114074 100644 --- a/src/egl/drivers/dri2/platform_x11.c +++ b/src/egl/drivers/dri2/platform_x11.c @@ -235,6 +235,10 @@ dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type, dri2_surf->drawable, screen->root, dri2_surf->base.Width, dri2_surf->base.Height); } else { + if (!drawable) { + _eglError(EGL_BAD_NATIVE_WINDOW, "dri2_create_surface"); + goto cleanup_surf; + } dri2_surf->drawable = drawable; } -- 2.4.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/4] egl/wayland: cleanup dri2_wl_create_surface error path
Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/platform_wayland.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 052b0e9..5b3a155 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -168,13 +168,11 @@ dri2_wl_create_surface(_EGLDriver *drv, _EGLDisplay *disp, dri2_surf); if (dri2_surf->dri_drawable == NULL) { _eglError(EGL_BAD_ALLOC, "dri2->createNewDrawable"); - goto cleanup_dri_drawable; + goto cleanup_surf; } return &dri2_surf->base; - cleanup_dri_drawable: - dri2_dpy->core->destroyDrawable(dri2_surf->dri_drawable); cleanup_surf: free(dri2_surf); -- 2.4.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v2 0/7] port _mesa_strto[df] to C
On 25 June 2015 at 23:10, Matt Turner wrote: > On Thu, Jun 25, 2015 at 2:05 PM, Erik Faye-Lund wrote: >> Back in March[1], I sent a patch porting _mesa_strto[df] to >> C rather than C++. I fixed up the patch according to the >> criticism, but unfortunately I dropped the ball before I sent >> out the result. So here I am, picking it back up! >> >> This time I've taken a deeper dive into the whole init/deinit >> of Mesa, and cleaned up a bunch of stuff in that area. And as >> a result, this time we end up freeing the locale also. >> >> No Piglit regressions observed. >> >> [1]: <1426446329-23984-1-git-send-email-kusmab...@gmail.com> >> >> Erik Faye-Lund (7): >> mesa/main: Get rid of outdated GDB-hack >> dri: don't touch the shader compiler >> mesa/main: only call _mesa_destroy_shader_compiler once on exit >> glsl: No need to lock in _mesa_glsl_release_types >> util: port _mesa_strto[df] to C >> mesa/main: free locale at exit >> util: assert to verify that locale is initialized > > Thanks for this! The series looks good to me. > > I'm slightly worried about 2/7, but not for any reasons other than I'm > not very familiar with that code. > > 1-6 (with the caveat that I may not have any idea what I'm saying > about 2/7 ;) are: > > Reviewed-by: Matt Turner > > 7/7 looks like it may have been useful for debugging, but I don't > think we should necessarily commit it. 7/7 was suggested when the conversion was hooked up in mesa alone ;-) So I've hinted that glsl-compiler (and maybe others) are left out and adding an assert will help us catch them. If they are fixed now we can drop the patch. I'm fairly confident that the offline compilers (i965?, nouveau and freedreno) and the i965 tests do not use _mesa_strto{d,f} (either directly or not). I'm believe that you've already checked ? Cheers Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] egl_dri2: Remove trailing whitespaces
On 26 June 2015 at 13:54, Boyan Ding wrote: > Can someone help me push this please? > Added Marek's r-b and pushed to master. Thanks for the patch ! -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] Mesa 10.6.1
Mesa 10.6.1 is now available. This release includes core mesa and glsl patches (amonst which a Dota2 Reborn bugfix) affecting all dri drivers, nouveau specific fixes and a selection of shared-glapi commits - from build fixes, to ones ensuring that the dri modules can be loaded. Anuj Phogat (4): mesa: Handle integer formats in need_rgb_to_luminance_conversion() mesa: Use helper function need_rgb_to_luminance_conversion() mesa: Turn need_rgb_to_luminance_conversion() in to a global function meta: Abort meta path if ReadPixels need rgb to luminance conversion Ben Widawsky (1): i965/gen9: Implement Push Constant Buffer workaround Boyan Ding (2): egl/x11: Set version of swrastLoader to 2 egl/x11: Remove duplicate call to dri2_x11_add_configs_for_visuals Emil Velikov (7): docs: Add sha256sums for the 10.6.0 release configure: warn about shared_glapi & xlib-glx only when both are set configure: error out when building backend-less libEGL configure: error out when building libEGL without shared-glapi gbm: do not (over)link against libglapi.so Update version to 10.6.1 Add release notes for the 10.6.1 release Frank Henigman (1): gbm: dlopen libglapi so gbm_create_device works Ilia Mirkin (9): nvc0/ir: fix collection of first uses for texture barrier insertion nv50,nvc0: clamp uniform size to 64k nvc0/ir: can't have a join on a load with an indirect source glsl: handle conversions to double when comparing param matches glsl: add version checks to conditionals for builtin variable enablement mesa: add GL_PROGRAM_PIPELINE support in KHR_debug calls glsl: binding point is a texture unit, which is a combined space nvc0: always put all tfb bufs into bufctx nv50,nvc0: make sure to pushbuf_refn before putting bo into pushbuf_data git tag: mesa-10.6.1 ftp://ftp.freedesktop.org/pub/mesa/10.6.1/mesa-10.6.1.tar.gz MD5: 95e8064f8a335ae07fc6619023960331 mesa-10.6.1.tar.gz SHA1: 00b0b142c83f5d3d6b37cff8c6d8f7eaffb6d56c mesa-10.6.1.tar.gz SHA256: b4cccd4d0eabcc2bca00c3175d3ad88fdda57ffdb883a7998525b873a21fe607 mesa-10.6.1.tar.gz PGP: ftp://ftp.freedesktop.org/pub/mesa/10.6.1/mesa-10.6.1.tar.gz.sig ftp://ftp.freedesktop.org/pub/mesa/10.6.1/mesa-10.6.1.tar.xz MD5: 4f5293b26f8f7d585063832625277c90 mesa-10.6.1.tar.xz SHA1: 3c36021388955a46333ccd80650cc2dce330476c mesa-10.6.1.tar.xz SHA256: 6c80a2b647e57c85dc36e609d9aed17f878f0d8e0cf9ace86d14cf604101e1eb mesa-10.6.1.tar.xz PGP: ftp://ftp.freedesktop.org/pub/mesa/10.6.1/mesa-10.6.1.tar.xz.sig -- -Emil signature.asc Description: OpenPGP digital signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] git fsck errors on mesa repo
Hi Liam, On 29/06/15 18:23, Liam R. Howlett wrote: > Hello, > > Since git 2.3, there have been a number of new fsck options added which > produce issues when I clone the repository > git://anongit.freedesktop.org/git/mesa/mesa > Can you be more specific about the fsck options and the messages that you're seeing ? > These new tests are enabled by default when using git fsck. I have been > testing with git version 2.4.4.409.g5b1d901 and thought you might want > to know so the error/warning messages can be avoided. > From a quick look (running git 2.4.4) there are 68 "error in tag $sha: unterminated header" messages. By the looks of it most/all of those are old tags (which we don't care too much nowdays) and they are lacking the trailing \n. Afaict other projects have the same "problem", and the git devs are working on a fix [1]. Cheers, Emil [1] http://www.spinics.net/lists/git/msg254657.html ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev