[Mesa-dev] [PATCH] android: build i965_compile_FILES sources
i965_compile_FILES need to be built, in order to avoid following building errors: target SharedLib: i915_dri (out/target/product/x86/obj/SHARED_LIBRARIES/i915_dri_intermediates/LINKED/i915_dri.so) external/mesa/src/mesa/drivers/dri/i965/brw_ir_fs.h:181: error: undefined reference to 'fs_inst::~fs_inst()' ... ... external/mesa/src/mesa/drivers/dri/i965/intel_screen.c:1484: error: undefined reference to 'brw_compiler_create' collect2: error: ld returned 1 exit status build/core/shared_library.mk:81: recipe for target 'out/target/product/x86/obj/SHARED_LIBRARIES/i965_dri_intermediates/LINKED/i965_dri.so' failed make: *** [out/target/product/x86/obj/SHARED_LIBRARIES/i965_dri_intermediates/LINKED/i965_dri.so] Error 1 --- src/mesa/drivers/dri/i965/Android.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk index a9b963a..d30a053 100644 --- a/src/mesa/drivers/dri/i965/Android.mk +++ b/src/mesa/drivers/dri/i965/Android.mk @@ -48,6 +48,7 @@ LOCAL_C_INCLUDES := \ $(MESA_DRI_C_INCLUDES) LOCAL_SRC_FILES := \ + $(i965_compiler_FILES) \ $(i965_FILES) LOCAL_WHOLE_STATIC_LIBRARIES := \ -- 2.1.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] android: fix shader_enums.c building error
Hi, this proposed patch is not necessary anymore, ../glsl/ dislocated paths are not present anymore in src/mesa/program/Makefile.sources , it was a temporary change in mesa 11.1.0devel sources, much better this way because to use dislocated paths is not recommended. Thanks Mauro 2015-09-23 22:33 GMT+02:00 Mauro Rossi : > Android.mk in src/mesa/program folder needs an adjustement, > because shader_enums.c can only be found in the relative path > ../../glsl/shader_enums.c > --- > src/mesa/program/Android.mk | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mesa/program/Android.mk b/src/mesa/program/Android.mk > index ccb0fa5..bcb0ed1 100644 > --- a/src/mesa/program/Android.mk > +++ b/src/mesa/program/Android.mk > @@ -56,7 +56,7 @@ generated_sources_basenames := \ > program_parse.tab.h > > LOCAL_SRC_FILES := \ > - $(filter-out $(generated_sources_basenames),$(subst > program/,,$(PROGRAM_FILES))) \ > + $(filter-out $(generated_sources_basenames),$(subst > ../glsl/,../../glsl/,$(subst program/,,$(PROGRAM_FILES \ > $(subst program/,,$(PROGRAM_NIR_FILES)) > > LOCAL_GENERATED_SOURCES := \ > -- > 2.1.4 > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] android: build i965_compile_FILES sources
The response is in the first line of the of the patch motivations, the build error affects lollipop-x86 build and it would have affected marshmallow-x86 too, if not addressed. There is still no solution for the fonts problems Mauro Il giorno lunedì 12 ottobre 2015 14:15:51 UTC+2, Florian Wiedemann ha scritto: > > Hi Mauro, > > is it a patch to compile Android Marshmallow or is it a patch to fix the > fonts problem on Intel graphics hardware? > > Florian > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] android: fix LOCAL_C_INCLUDES to find glsl_types.h
These changes are necessary to avoid building errors in glsl and i965 --- src/glsl/Android.mk | 6 -- src/mesa/drivers/dri/i965/Android.mk | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/glsl/Android.mk b/src/glsl/Android.mk index f63b7da..6902ea4 100644 --- a/src/glsl/Android.mk +++ b/src/glsl/Android.mk @@ -42,7 +42,8 @@ LOCAL_C_INCLUDES := \ $(MESA_TOP)/src/mapi \ $(MESA_TOP)/src/mesa \ $(MESA_TOP)/src/gallium/include \ - $(MESA_TOP)/src/gallium/auxiliary + $(MESA_TOP)/src/gallium/auxiliary \ + $(MESA_TOP)/src/glsl/nir LOCAL_MODULE := libmesa_glsl @@ -63,7 +64,8 @@ LOCAL_C_INCLUDES := \ $(MESA_TOP)/src/mapi \ $(MESA_TOP)/src/mesa \ $(MESA_TOP)/src/gallium/include \ - $(MESA_TOP)/src/gallium/auxiliary + $(MESA_TOP)/src/gallium/auxiliary \ + $(MESA_TOP)/src/glsl/nir LOCAL_STATIC_LIBRARIES := libmesa_glsl libmesa_glsl_utils libmesa_util diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk index d30a053..f9a914a 100644 --- a/src/mesa/drivers/dri/i965/Android.mk +++ b/src/mesa/drivers/dri/i965/Android.mk @@ -45,7 +45,8 @@ LOCAL_CFLAGS += \ endif LOCAL_C_INCLUDES := \ - $(MESA_DRI_C_INCLUDES) + $(MESA_DRI_C_INCLUDES) \ + $(MESA_TOP)/src/glsl/nir LOCAL_SRC_FILES := \ $(i965_compiler_FILES) \ -- 2.5.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] android: fix LOCAL_C_INCLUDES to find glsl_types.h
Hi Emil, by exporting the path of glsl nir headers, mesa builds without problems. You can find in the attachment the formatted patch. Thanks Mauro 2015-11-06 18:26 GMT+01:00 Emil Velikov : > Hi Mauro > > On 6 November 2015 at 03:31, Mauro Rossi wrote: > > These changes are necessary to avoid building errors in glsl and i965 > > --- > > src/glsl/Android.mk | 6 -- > > src/mesa/drivers/dri/i965/Android.mk | 3 ++- > > 2 files changed, 6 insertions(+), 3 deletions(-) > > > > diff --git a/src/glsl/Android.mk b/src/glsl/Android.mk > > index f63b7da..6902ea4 100644 > > --- a/src/glsl/Android.mk > > +++ b/src/glsl/Android.mk > > @@ -42,7 +42,8 @@ LOCAL_C_INCLUDES := \ > > $(MESA_TOP)/src/mapi \ > > $(MESA_TOP)/src/mesa \ > > $(MESA_TOP)/src/gallium/include \ > > - $(MESA_TOP)/src/gallium/auxiliary > > + $(MESA_TOP)/src/gallium/auxiliary \ > > + $(MESA_TOP)/src/glsl/nir > > > > LOCAL_MODULE := libmesa_glsl > > > > @@ -63,7 +64,8 @@ LOCAL_C_INCLUDES := \ > > $(MESA_TOP)/src/mapi \ > > $(MESA_TOP)/src/mesa \ > > $(MESA_TOP)/src/gallium/include \ > > - $(MESA_TOP)/src/gallium/auxiliary > > + $(MESA_TOP)/src/gallium/auxiliary \ > > + $(MESA_TOP)/src/glsl/nir > > > > LOCAL_STATIC_LIBRARIES := libmesa_glsl libmesa_glsl_utils libmesa_util > > > > diff --git a/src/mesa/drivers/dri/i965/Android.mk > b/src/mesa/drivers/dri/i965/Android.mk > > index d30a053..f9a914a 100644 > > --- a/src/mesa/drivers/dri/i965/Android.mk > > +++ b/src/mesa/drivers/dri/i965/Android.mk > > @@ -45,7 +45,8 @@ LOCAL_CFLAGS += \ > > endif > > > > LOCAL_C_INCLUDES := \ > > - $(MESA_DRI_C_INCLUDES) > > + $(MESA_DRI_C_INCLUDES) \ > > + $(MESA_TOP)/src/glsl/nir > > > > LOCAL_SRC_FILES := \ > > $(i965_compiler_FILES) \ > > Following the Android way of exporting includes I believe you want the > following > > diff --git a/src/glsl/Android.gen.mk b/src/glsl/Android.gen.mk > index 6898fb0..59cc857 100644 > --- a/src/glsl/Android.gen.mk > +++ b/src/glsl/Android.gen.mk > @@ -38,7 +38,8 @@ LOCAL_C_INCLUDES += \ > $(MESA_TOP)/src/glsl/nir > > LOCAL_EXPORT_C_INCLUDE_DIRS += \ > - $(intermediates)/nir > + $(intermediates)/nir \ > + $(MESA_TOP)/src/glsl/nir > > LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \ > $(LIBGLCPP_GENERATED_FILES) \ > > > Formatting might be broken (thanks gmail), although the gist is there. > Can you give it a try (note the order is important) > > Thanks > Emil > From 4afd21bdd79811d65163eeedc24fc2ef4295630d Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 7 Nov 2015 01:23:46 +0100 Subject: [PATCH] android: export the path of glsl nir headers The change is necessary to avoid building errors in glsl and i965 modules due to missing glsl_types.h header --- src/glsl/Android.gen.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/glsl/Android.gen.mk b/src/glsl/Android.gen.mk index 6898fb0..59cc857 100644 --- a/src/glsl/Android.gen.mk +++ b/src/glsl/Android.gen.mk @@ -38,7 +38,8 @@ LOCAL_C_INCLUDES += \ $(MESA_TOP)/src/glsl/nir LOCAL_EXPORT_C_INCLUDE_DIRS += \ - $(intermediates)/nir + $(intermediates)/nir \ + $(MESA_TOP)/src/glsl/nir LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \ $(LIBGLCPP_GENERATED_FILES) \ -- 2.5.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] android: fix LOCAL_C_INCLUDES to find glsl_types.h
Hi, Sending an update because with the export android_x86 target builds ok, but I'm getting again the "glsl_types.h not found" building error with android_x86_64 target (specifically for 64 bit modules). I'll report as soon I may be able to understand what's going on, added other android-x86 developers in CC. Mauro 2015-11-07 1:29 GMT+01:00 Mauro Rossi : > Hi Emil, > > by exporting the path of glsl nir headers, mesa builds without problems. > > You can find in the attachment the formatted patch. > Thanks > > Mauro > > > > 2015-11-06 18:26 GMT+01:00 Emil Velikov : > >> Hi Mauro >> >> On 6 November 2015 at 03:31, Mauro Rossi wrote: >> > These changes are necessary to avoid building errors in glsl and i965 >> > --- >> > src/glsl/Android.mk | 6 -- >> > src/mesa/drivers/dri/i965/Android.mk | 3 ++- >> > 2 files changed, 6 insertions(+), 3 deletions(-) >> > >> > diff --git a/src/glsl/Android.mk b/src/glsl/Android.mk >> > index f63b7da..6902ea4 100644 >> > --- a/src/glsl/Android.mk >> > +++ b/src/glsl/Android.mk >> > @@ -42,7 +42,8 @@ LOCAL_C_INCLUDES := \ >> > $(MESA_TOP)/src/mapi \ >> > $(MESA_TOP)/src/mesa \ >> > $(MESA_TOP)/src/gallium/include \ >> > - $(MESA_TOP)/src/gallium/auxiliary >> > + $(MESA_TOP)/src/gallium/auxiliary \ >> > + $(MESA_TOP)/src/glsl/nir >> > >> > LOCAL_MODULE := libmesa_glsl >> > >> > @@ -63,7 +64,8 @@ LOCAL_C_INCLUDES := \ >> > $(MESA_TOP)/src/mapi \ >> > $(MESA_TOP)/src/mesa \ >> > $(MESA_TOP)/src/gallium/include \ >> > - $(MESA_TOP)/src/gallium/auxiliary >> > + $(MESA_TOP)/src/gallium/auxiliary \ >> > + $(MESA_TOP)/src/glsl/nir >> > >> > LOCAL_STATIC_LIBRARIES := libmesa_glsl libmesa_glsl_utils libmesa_util >> > >> > diff --git a/src/mesa/drivers/dri/i965/Android.mk >> b/src/mesa/drivers/dri/i965/Android.mk >> > index d30a053..f9a914a 100644 >> > --- a/src/mesa/drivers/dri/i965/Android.mk >> > +++ b/src/mesa/drivers/dri/i965/Android.mk >> > @@ -45,7 +45,8 @@ LOCAL_CFLAGS += \ >> > endif >> > >> > LOCAL_C_INCLUDES := \ >> > - $(MESA_DRI_C_INCLUDES) >> > + $(MESA_DRI_C_INCLUDES) \ >> > + $(MESA_TOP)/src/glsl/nir >> > >> > LOCAL_SRC_FILES := \ >> > $(i965_compiler_FILES) \ >> >> Following the Android way of exporting includes I believe you want the >> following >> >> diff --git a/src/glsl/Android.gen.mk b/src/glsl/Android.gen.mk >> index 6898fb0..59cc857 100644 >> --- a/src/glsl/Android.gen.mk >> +++ b/src/glsl/Android.gen.mk >> @@ -38,7 +38,8 @@ LOCAL_C_INCLUDES += \ >> $(MESA_TOP)/src/glsl/nir >> >> LOCAL_EXPORT_C_INCLUDE_DIRS += \ >> - $(intermediates)/nir >> + $(intermediates)/nir \ >> + $(MESA_TOP)/src/glsl/nir >> >> LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \ >> $(LIBGLCPP_GENERATED_FILES) \ >> >> >> Formatting might be broken (thanks gmail), although the gist is there. >> Can you give it a try (note the order is important) >> >> Thanks >> Emil >> > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] android: fix LOCAL_C_INCLUDES to find glsl_types.h
Update2: I'm getting the building error in both x86 target and x86_64 target. I'm relieved it's not arch dependend, I suspect that export will require a dependency to be declared, because if i965_dri module is built before glsl ones we will have the error. The LOCAL_C_INCLUDES even if not elegant, avoided the problem in the first place, but I'd like to learn the by the best practice and apply it in the future. Emil, Chih-Wei what is your thought on this? Added also other android-x86 developers in CC Mauro In file included from external/mesa/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp:34:0: external/mesa/src/glsl/ir.h:33:24: fatal error: glsl_types.h: No such file or directory #include "glsl_types.h" ^ compilation terminated. build/core/binary.mk:620: recipe for target 'out/target/product/x86/obj/SHARED_LIBRARIES/i965_dri_intermediates/brw_cubemap_normalize.o' failed make: *** [out/target/product/x86/obj/SHARED_LIBRARIES/i965_dri_intermediates/brw_cubemap_normalize.o] Error 1 make: *** Waiting for unfinished jobs target C++: i965_dri <= external/mesa/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp In file included from external/mesa/src/mesa/drivers/dri/i965/brw_shader.h:29:0, from external/mesa/src/mesa/drivers/dri/i965/brw_dead_control_flow.cpp:29: external/mesa/src/glsl/ir.h:33:24: fatal error: glsl_types.h: No such file or directory #include "glsl_types.h" ^ compilation terminated. In file included from external/mesa/src/mesa/drivers/dri/i965/brw_shader.h:29:0, from external/mesa/src/mesa/drivers/dri/i965/brw_cfg.h:32, from external/mesa/src/mesa/drivers/dri/i965/brw_cfg.cpp:28: external/mesa/src/glsl/ir.h:33:24: fatal error: glsl_types.h: No such file or directory #include "glsl_types.h" ^ compilation terminated. build/core/binary.mk:620: recipe for target 'out/target/product/x86/obj/SHARED_LIBRARIES/i965_dri_intermediates/brw_dead_control_flow.o' failed make: *** [out/target/product/x86/obj/SHARED_LIBRARIES/i965_dri_intermediates/brw_dead_control_flow.o] Error 1 build/core/binary.mk:620: recipe for target 'out/target/product/x86/obj/SHARED_LIBRARIES/i965_dri_intermediates/brw_cfg.o' failed make: *** [out/target/product/x86/obj/SHARED_LIBRARIES/i965_dri_intermediates/brw_cfg.o] Error 1 In file included from external/mesa/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp:46:0: external/mesa/src/glsl/ir.h:33:24: fatal error: glsl_types.h: No such file or directory #include "glsl_types.h" ^ compilation terminated. build/core/binary.mk:620: recipe for target 'out/target/product/x86/obj/SHARED_LIBRARIES/i965_dri_intermediates/brw_fs_channel_expressions.o' failed make: *** [out/target/product/x86/obj/SHARED_LIBRARIES/i965_dri_intermediates/brw_fs_channel_expressions.o] Error 1 2015-11-08 13:36 GMT+01:00 Mauro Rossi : > Hi, > > Sending an update because with the export android_x86 target builds ok, > but I'm getting again the "glsl_types.h not found" building error with > android_x86_64 target (specifically for 64 bit modules). > > I'll report as soon I may be able to understand what's going on, > added other android-x86 developers in CC. > > Mauro > > 2015-11-07 1:29 GMT+01:00 Mauro Rossi : > >> Hi Emil, >> >> by exporting the path of glsl nir headers, mesa builds without problems. >> >> You can find in the attachment the formatted patch. >> Thanks >> >> Mauro >> >> >> >> 2015-11-06 18:26 GMT+01:00 Emil Velikov : >> >>> Hi Mauro >>> >>> On 6 November 2015 at 03:31, Mauro Rossi wrote: >>> > These changes are necessary to avoid building errors in glsl and i965 >>> > --- >>> > src/glsl/Android.mk | 6 -- >>> > src/mesa/drivers/dri/i965/Android.mk | 3 ++- >>> > 2 files changed, 6 insertions(+), 3 deletions(-) >>> > >>> > diff --git a/src/glsl/Android.mk b/src/glsl/Android.mk >>> > index f63b7da..6902ea4 100644 >>> > --- a/src/glsl/Android.mk >>> > +++ b/src/glsl/Android.mk >>> > @@ -42,7 +42,8 @@ LOCAL_C_INCLUDES := \ >>> > $(MESA_TOP)/src/mapi \ >>> > $(MESA_TOP)/src/mesa \ >>> > $(MESA_TOP)/src/gallium/include \ >>> > - $(MESA_TOP)/src/gallium/auxiliary >>> > + $(MESA_TOP)/src/gallium/auxiliary \ >>> > + $(MESA_TOP)/src/glsl/nir >>> > >>> > LOCAL_MODULE := libmesa_glsl >>> > >>> > @@ -63,7 +64,8 @@ LOCAL_C_INCLUDES := \ >>> >
Re: [Mesa-dev] [PATCH] android: fix LOCAL_C_INCLUDES to find glsl_types.h
Hi Emil, I checked with Chih-Wei and LOCAL_EXPORT_C_INCLUDE_DIRS is the preferred way. I took the chance to finally understand why the single line of change you proposed will suffice, it's because glsl_compiler module invokes libmesa_glsl as static library and the same applies to i965_dri module. My last problem was probably due to uncleaned mesa targets folders in $OUT path, now I have checked again and building errors are gone. Thanks a lot Emil and Chih-Wei Mauro 2015-11-08 14:12 GMT+01:00 Emil Velikov : > Hi Mauro, > > On 8 November 2015 at 12:59, Mauro Rossi wrote: > > Update2: I'm getting the building error in both x86 target and x86_64 > > target. > > > > I'm relieved it's not arch dependend, I suspect that export will require > a > > dependency to be declared, > > because if i965_dri module is built before glsl ones we will have the > > error. > > > > The LOCAL_C_INCLUDES even if not elegant, avoided the problem in the > first > > place, > > but I'd like to learn the by the best practice and apply it in the > future. > > > Fwiw I'm all for LOCAL_C_INCLUDES (I even mentioned a few times a way > that we can share those and minimise these issues), but I believe > Chih-Wei was not really a fan of them. If he's ok with it I'll push > your original patch. > > Regards, > Emil > > P.S. Typos - for each one we fix, another we introduce another one or > more :-P > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] android: fix llvm, elf dependencies for M, N releases
These changes set the correct llvm version and elf include path which differ for Marshmallow and Nougat --- Android.common.mk | 14 -- src/amd/Android.common.mk | 2 +- src/gallium/Android.common.mk | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Android.common.mk b/Android.common.mk index 1cd238e..798318a 100644 --- a/Android.common.mk +++ b/Android.common.mk @@ -82,8 +82,18 @@ endif endif ifeq ($(MESA_ENABLE_LLVM),true) -LOCAL_CFLAGS += \ - -DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2 + ifeq ($(MESA_ANDROID_MAJOR_VERSION),5) +LOCAL_CFLAGS += -DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2 +ELF_INCLUDES := external/elfutils/0.153/libelf + endif + ifeq ($(MESA_ANDROID_MAJOR_VERSION),6) +LOCAL_CFLAGS += -DHAVE_LLVM=0x0307 -DMESA_LLVM_VERSION_PATCH=0 +ELF_INCLUDES := external/elfutils/src/libelf + endif + ifeq ($(MESA_ANDROID_MAJOR_VERSION),7) +LOCAL_CFLAGS += -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_PATCH=0 +ELF_INCLUDES := external/elfutils/libelf + endif endif ifneq ($(LOCAL_IS_HOST_MODULE),true) diff --git a/src/amd/Android.common.mk b/src/amd/Android.common.mk index dfa7e59..faace71 100644 --- a/src/amd/Android.common.mk +++ b/src/amd/Android.common.mk @@ -55,7 +55,7 @@ LOCAL_C_INCLUDES := \ external/llvm/include \ external/llvm/device/include \ external/libcxx/include \ - external/elfutils/$(if $(filter 5,$(MESA_ANDROID_MAJOR_VERSION)),0.153/,$(if $(filter 6,$(MESA_ANDROID_MAJOR_VERSION)),src/))libelf + $(ELF_INCLUDES) LOCAL_STATIC_LIBRARIES := libLLVMCore diff --git a/src/gallium/Android.common.mk b/src/gallium/Android.common.mk index 7c6c7ac..8559b5b 100644 --- a/src/gallium/Android.common.mk +++ b/src/gallium/Android.common.mk @@ -34,7 +34,7 @@ LOCAL_C_INCLUDES += \ external/llvm/include \ external/llvm/device/include \ external/libcxx/include \ - external/elfutils/$(if $(filter true,$(MESA_LOLLIPOP_BUILD)),0.153/)libelf + $(ELF_INCLUDES) endif include $(MESA_COMMON_MK) -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] android: radeonsi: fix sid_table.h generated header include path
generated-sources-dir-for macro replaces intermediates-dir-for and LOCAL_MODULE_CLASS is defined as required by new macro, in order to avoid the following building error: external/mesa/src/gallium/drivers/radeonsi/si_debug.c:29:10: fatal error: 'sid_tables.h' file not found ^ 1 error generated. --- src/gallium/drivers/radeonsi/Android.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/Android.mk b/src/gallium/drivers/radeonsi/Android.mk index d8bc990..d1e323a 100644 --- a/src/gallium/drivers/radeonsi/Android.mk +++ b/src/gallium/drivers/radeonsi/Android.mk @@ -32,9 +32,11 @@ LOCAL_SRC_FILES := $(C_SOURCES) LOCAL_CFLAGS += -DFORCE_BUILD_AMDGPU # instructs LLVM to declare LLVMInitializeAMDGPU* functions +LOCAL_MODULE_CLASS := STATIC_LIBRARIES + LOCAL_C_INCLUDES := \ $(MESA_TOP)/src/amd/common \ - $(call intermediates-dir-for,STATIC_LIBRARIES,libmesa_amd_common)/common + $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_amd_common,,)/common LOCAL_SHARED_LIBRARIES := libdrm_radeon LOCAL_MODULE := libmesa_pipe_radeonsi -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] android: glsl: build shader cache sources
Fixes the following building errors: external/mesa/src/compiler/glsl/linker.cpp:4642: error: undefined reference to 'shader_cache_read_program_metadata(gl_context*, gl_shader_program*)' external/mesa/src/mesa/program/ir_to_mesa.cpp:3135: error: undefined reference to 'shader_cache_write_program_metadata(gl_context*, gl_shader_program*)' clang++: error: linker command failed with exit code 1 ... external/mesa/src/mesa/program/ir_to_mesa.cpp:3135: error: undefined reference to 'shader_cache_write_program_metadata(gl_context*, gl_shader_program*)' external/mesa/src/compiler/glsl/linker.cpp:4642: error: undefined reference to 'shader_cache_read_program_metadata(gl_context*, gl_shader_program*)' clang++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed make: *** [ninja_wrapper] Error 1 --- src/compiler/Android.glsl.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/Android.glsl.mk b/src/compiler/Android.glsl.mk index dcc356f..0aabafa 100644 --- a/src/compiler/Android.glsl.mk +++ b/src/compiler/Android.glsl.mk @@ -36,6 +36,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := \ $(LIBGLCPP_FILES) \ $(LIBGLSL_FILES) \ + $(LIBGLSL_SHADER_CACHE_FILES) LOCAL_C_INCLUDES := \ $(MESA_TOP)/src/mapi \ -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] android: define HAVE_DL_ITERATE_PHDR for build-id code
Required due to d4fa083 "util: Add utility build-id code." to avoid following build error and warnings: external/mesa/src/intel/vulkan/anv_device.c:60:32: error: incompatible integer to pointer conversion initializing 'const struct build_id_note *' with an expression of type 'int' [-Werror,-Wint-conversion] const struct build_id_note *note = build_id_find_nhdr("libvulkan_intel.so"); ^ external/mesa/src/intel/vulkan/anv_device.c:64:19: warning: implicit declaration of function 'build_id_length' is invalid in C99 [-Wimplicit-function-declaration] unsigned len = build_id_length(note); ^ external/mesa/src/intel/vulkan/anv_device.c:68:4: warning: implicit declaration of function 'build_id_read' is invalid in C99 [-Wimplicit-function-declaration] build_id_read(note, uuid, VK_UUID_SIZE); ^ 3 warnings and 1 error generated. [ 40% 1438/3588] target C: libmesa_vulkan_common_32 <= external/mesa/src/intel/vulkan/anv_image.c ninja: build stopped: subcommand failed. build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed make: *** [ninja_wrapper] Error 1 --- Android.common.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/Android.common.mk b/Android.common.mk index d01b1b5..c27a77e 100644 --- a/Android.common.mk +++ b/Android.common.mk @@ -62,6 +62,7 @@ LOCAL_CFLAGS += \ -DHAVE___BUILTIN_UNREACHABLE \ -DHAVE_PTHREAD=1 \ -DHAVE_DLOPEN \ + -DHAVE_DL_ITERATE_PHDR \ -DTEXTURE_FLOAT_ENABLED \ -fvisibility=hidden \ -Wno-sign-compare -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RESEND 08/13] anv: generate anv_entrypoints.{h, c} in one command
2017-02-23 12:41 GMT+01:00 Tapani Pälli : > > > On 02/23/2017 12:32 PM, Emil Velikov wrote: > >> On 22 February 2017 at 23:35, Dylan Baker wrote: >> >>> This changes the python generator to write the files itself, rather than >>> piping them out. This has a couple of advantages: first, it encapsulates >>> the encoding. Second, it ensures that the header file and code file are >>> generated at the same time with the same data. >>> >>> Last time there were some serious objections to doing this. Glad that >> you got those covered ;-) >> >> Signed-off-by: Dylan Baker >>> --- >>> src/intel/vulkan/Makefile.am| 7 ++ >>> src/intel/vulkan/anv_entrypoints_gen.py | 38 >>> - >>> 2 files changed, 16 insertions(+), 29 deletions(-) >>> >>> diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am >>> index 5a0e4ef4ff..68bc5ccf86 100644 >>> --- a/src/intel/vulkan/Makefile.am >>> +++ b/src/intel/vulkan/Makefile.am >>> @@ -145,11 +145,8 @@ libvulkan_intel_la_SOURCES = $(VULKAN_GEM_FILES) >>> >>> vulkan_api_xml = $(top_srcdir)/src/vulkan/registry/vk.xml >>> >>> -anv_entrypoints.h : anv_entrypoints_gen.py $(vulkan_api_xml) >>> - $(AM_V_GEN)$(PYTHON2) $(srcdir)/anv_entrypoints_gen.py header > >>> $@ >>> - >>> -anv_entrypoints.c : anv_entrypoints_gen.py $(vulkan_api_xml) >>> - $(AM_V_GEN)$(PYTHON2) $(srcdir)/anv_entrypoints_gen.py code > $@ >>> +anv_entrypoints.h anv_entrypoints.c: anv_entrypoints_gen.py >>> $(vulkan_api_xml) >>> + $(AM_V_GEN)$(PYTHON2) $(srcdir)/anv_entrypoints_gen.py >>> >>> Please pass a "-o $dst_dir" type of argument. It will be/is broken >> otherwise. >> >> Small suggestion to update the Android.mk file. Feel free to Cc >> Tapani/Mauro so that they can test/address any concerns. >> >> Mauro, Tapani, >> Afaict earlier series [1] have broken things on your end, but do >> suggest some fixes that one can squash with this batch. >> > > introduction of 'build-id' usage broke Vulkan on Android: > 656e30b6860461b2bd725590488126d5e7e10ec1 > > So we've been staying on commit before that for now. I've been busy on > other things so haven't taken much look. I only did try to add > "-Wl,--build-id=sha1" to LOCAL_LDFLAGS for vulkan library but that alone > does not fix it. I can make required build system changes after I get that > mystery solved. Besides this issue, also 8e03250fcf4fc5de31e92ca4919959d932888a69 "vulkan: Combine wsi and util makefiles" requires changes/an Android.mk makefile Regarding the -o argument, it is indeed essential for Android Build System that generated sources/headers go in $(OUT)/gen/{EXECUTABLE,{SHARED,STATIC}_LIBRARIES}/[module]_intermediates so the possibility to direct the generated files is needed, but at this point I'm not even sure Android Build System will not complain, I need to check. Mauro ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RESEND 08/13] anv: generate anv_entrypoints.{h, c} in one command
> > Besides this issue, also 8e03250fcf4fc5de31e92ca4919959d932888a69 > "vulkan: Combine wsi and util makefiles" requires changes/an Android.mk > makefile > > Regarding the -o argument, > it is indeed essential for Android Build System that generated > sources/headers > go in $(OUT)/gen/{EXECUTABLE,{SHARED,STATIC}_LIBRARIES}/[ > module]_intermediates > so the possibility to direct the generated files is needed, > but at this point I'm not even sure Android Build System will not complain, > I need to check. > > Mauro > Hi, the problem mentioned above is confirmed, due to: e9dcb17 "vulkan/util: Add generator for enum_to_str functions" 8e03250 "vulkan: Combine wsi and util makefiles" I will send patch in separate ML thread to fix the necessary -o OUTPUT_PATH option for this pre-exiting problem. After that we will tackle with anv_entrypoints.{h, c} generation rules. For Tapani, I could build mesa-dev with vulkan.mesa_intel module and I don't see the build-id error, could you send me a PM with info? Thanks Mauro ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] android: vulkan: add support for libmesa_vulkan_{util, wsi}
The following commits require android porting: e9dcb17 "vulkan/util: Add generator for enum_to_str functions" 8e03250 "vulkan: Combine wsi and util makefiles" The following changes are implemented in this patch: Add src/vulkan/Android.mk to build libmesa_vulkan_util and libmesa_vulkan_wsi Android.mk: add src/vulkan to SUBDIR to build new modules intel/vulkan: fix libmesa_vulkan_util,vk_enum_to_str.h dependencies Add -o OUTPUT_PATH option in src/vulkan/util/gen_enum_to_str.py script Use -o OUTPUT_PATH option in automake generation rules for vk_enum_to_str.{c,h} Tested with nougat-x86 32bit and 64bit builds --- Android.mk | 3 +- src/intel/vulkan/Android.mk| 8 +++-- src/vulkan/Android.mk | 70 ++ src/vulkan/Makefile.am | 2 +- src/vulkan/util/gen_enum_to_str.py | 13 +-- 5 files changed, 90 insertions(+), 6 deletions(-) create mode 100644 src/vulkan/Android.mk diff --git a/Android.mk b/Android.mk index 4168b4d..bb70321 100644 --- a/Android.mk +++ b/Android.mk @@ -92,7 +92,8 @@ SUBDIRS := \ src/egl \ src/amd \ src/intel \ - src/mesa/drivers/dri + src/mesa/drivers/dri \ + src/vulkan INC_DIRS := $(call all-named-subdir-makefiles,$(SUBDIRS)) diff --git a/src/intel/vulkan/Android.mk b/src/intel/vulkan/Android.mk index 1e53970..a6a7d26 100644 --- a/src/intel/vulkan/Android.mk +++ b/src/intel/vulkan/Android.mk @@ -74,7 +74,8 @@ include $(BUILD_STATIC_LIBRARY) ANV_INCLUDES := \ $(VULKAN_COMMON_INCLUDES) \ $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_anv_entrypoints,,) \ - $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir + $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir \ + $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_vulkan_util,,)/util # # libanv for gen7 @@ -172,7 +173,10 @@ LOCAL_C_INCLUDES := \ $(ANV_INCLUDES) \ $(MESA_TOP)/src/compiler -LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml +LOCAL_WHOLE_STATIC_LIBRARIES := \ + libmesa_anv_entrypoints \ + libmesa_genxml \ + libmesa_vulkan_util LOCAL_GENERATED_SOURCES += $(intermediates)/anv_entrypoints.c diff --git a/src/vulkan/Android.mk b/src/vulkan/Android.mk new file mode 100644 index 000..4ba5750 --- /dev/null +++ b/src/vulkan/Android.mk @@ -0,0 +1,70 @@ +# Copyright © 2017 Mauro Rossi +# +# 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 (including the next +# paragraph) 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) + +# Import variables +include $(LOCAL_PATH)/Makefile.sources + +# +# libmesa_vulkan_util +# + +include $(CLEAR_VARS) +LOCAL_MODULE := libmesa_vulkan_util +LOCAL_MODULE_CLASS := STATIC_LIBRARIES + +intermediates := $(call local-generated-sources-dir) + +LOCAL_C_INCLUDES := \ + $(MESA_TOP)/include/vulkan + +LOCAL_GENERATED_SOURCES := \ + $(intermediates)/util/vk_enum_to_str.c \ + $(intermediates)/util/vk_enum_to_str.h + +vulkan_api_xml = $(MESA_TOP)/src/vulkan/registry/vk.xml + +$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2) +$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL := $(PRIVATE_PYTHON) $(MESA_TOP)/src/vulkan/util/gen_enum_to_str.py -o $(intermediates)/util +$(LOCAL_GENERATED_SOURCES): $(MESA_TOP)/src/vulkan/util/gen_enum_to_str.py $(vulkan_api_xml) + $(transform-generated-source) + +LOCAL_EXPORT_C_INCLUDE_DIRS := \ +$(intermediates) + +include $(MESA_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) + +# +# libmesa_vulkan_wsi +# + +include $(CLEAR_VARS) +LOCAL_MODULE := libmesa_vulkan_wsi + +LOCAL_SRC_FILES := $(VULKAN_WSI_SOURCES) + +LOCAL_C_INCLUDES := \ + $(MESA_TOP)/include/vulkan + +include $(MESA_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am index 5cdffbf..019da13 100644 --- a
Re: [Mesa-dev] [PATCH] android: vulkan: add support for libmesa_vulkan_{util, wsi}
Thanks a lot for your feedbacks. Here follows final version. Mauro >From d0db1d0fd07fd0b5fb7580bb8dddf109389f28ba Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Tue, 28 Feb 2017 01:24:41 +0100 Subject: [PATCH] android: vulkan: add support for libmesa_vulkan_util The following changes are implemented: Add src/vulkan/Android.mk to build libmesa_vulkan_util Android.mk: add src/vulkan to SUBDIR to build new module intel/vulkan: fix libmesa_vulkan_util,vk_enum_to_str.h dependencies Add -o OUTPUT_PATH option in src/vulkan/util/gen_enum_to_str.py script Use -o OUTPUT_PATH option in automake generation rules for vk_enum_to_str.{c,h} Fixes: e9dcb17 "vulkan/util: Add generator for enum_to_str functions" Fixes: 8e03250 "vulkan: Combine wsi and util makefiles" --- Android.mk | 3 ++- src/intel/vulkan/Android.mk| 8 -- src/vulkan/Android.mk | 55 ++ src/vulkan/Makefile.am | 2 +- src/vulkan/util/gen_enum_to_str.py | 9 +-- 5 files changed, 71 insertions(+), 6 deletions(-) create mode 100644 src/vulkan/Android.mk diff --git a/Android.mk b/Android.mk index 4168b4d..bb70321 100644 --- a/Android.mk +++ b/Android.mk @@ -92,7 +92,8 @@ SUBDIRS := \ src/egl \ src/amd \ src/intel \ - src/mesa/drivers/dri + src/mesa/drivers/dri \ + src/vulkan INC_DIRS := $(call all-named-subdir-makefiles,$(SUBDIRS)) diff --git a/src/intel/vulkan/Android.mk b/src/intel/vulkan/Android.mk index 1e53970..a6a7d26 100644 --- a/src/intel/vulkan/Android.mk +++ b/src/intel/vulkan/Android.mk @@ -74,7 +74,8 @@ include $(BUILD_STATIC_LIBRARY) ANV_INCLUDES := \ $(VULKAN_COMMON_INCLUDES) \ $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_anv_entrypoints,,) \ - $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir + $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir \ + $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_vulkan_util,,)/util # # libanv for gen7 @@ -172,7 +173,10 @@ LOCAL_C_INCLUDES := \ $(ANV_INCLUDES) \ $(MESA_TOP)/src/compiler -LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml +LOCAL_WHOLE_STATIC_LIBRARIES := \ + libmesa_anv_entrypoints \ + libmesa_genxml \ + libmesa_vulkan_util LOCAL_GENERATED_SOURCES += $(intermediates)/anv_entrypoints.c diff --git a/src/vulkan/Android.mk b/src/vulkan/Android.mk new file mode 100644 index 000..871d7f3 --- /dev/null +++ b/src/vulkan/Android.mk @@ -0,0 +1,55 @@ +# Copyright © 2017 Mauro Rossi +# +# 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 (including the next +# paragraph) 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) + +# Import variables +include $(LOCAL_PATH)/Makefile.sources + +# +# libmesa_vulkan_util +# + +include $(CLEAR_VARS) +LOCAL_MODULE := libmesa_vulkan_util +LOCAL_MODULE_CLASS := STATIC_LIBRARIES + +intermediates := $(call local-generated-sources-dir) + +LOCAL_C_INCLUDES := \ + $(MESA_TOP)/include/vulkan + +LOCAL_GENERATED_SOURCES := \ + $(intermediates)/util/vk_enum_to_str.c \ + $(intermediates)/util/vk_enum_to_str.h + +vulkan_api_xml = $(MESA_TOP)/src/vulkan/registry/vk.xml + +$(LOCAL_GENERATED_SOURCES): $(MESA_TOP)/src/vulkan/util/gen_enum_to_str.py $(vulkan_api_xml) + @echo "target Generated: $(PRIVATE_MODULE) <= $(notdir $(@))" + @mkdir -p $(dir $@) + $(hide) $(MESA_PYTHON2) $(MESA_TOP)/src/vulkan/util/gen_enum_to_str.py -o $(intermediates)/util + +LOCAL_EXPORT_C_INCLUDE_DIRS := \ +$(intermediates) + +include $(MESA_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am index 5cdffbf..019da13 100644 --- a/src/vulkan/Makefile.am +++ b/src/vulkan/Makefile.am @@ -17,7 +17,7 @@ BUILT_SOURCES = \ util/vk_enum_to_str.c util/vk_enum_to_str.h: util/gen_enum_to_str.py $(vulkan_api_xml) $(MKDIR_GEN) - $(PYTHON_GEN) $(srcdir)/util/gen_enum_to_str.py + $(PYTHON_GEN) $(srcdir)/ut
[Mesa-dev] [PATCH 2/2] android: enable amdgpu winsys in radeonsi driver
--- src/gallium/targets/dri/Android.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/targets/dri/Android.mk b/src/gallium/targets/dri/Android.mk index 7168e1d..a33d7f8 100644 --- a/src/gallium/targets/dri/Android.mk +++ b/src/gallium/targets/dri/Android.mk @@ -77,8 +77,8 @@ gallium_DRIVERS += libmesa_pipe_r600 LOCAL_CFLAGS += -DGALLIUM_R600 endif ifneq ($(filter radeonsi,$(MESA_GPU_DRIVERS)),) -gallium_DRIVERS += libmesa_pipe_radeonsi -LOCAL_SHARED_LIBRARIES += libLLVM +gallium_DRIVERS += libmesa_pipe_radeonsi libmesa_winsys_amdgpu +LOCAL_SHARED_LIBRARIES += libLLVM libdrm_amdgpu LOCAL_CFLAGS += -DGALLIUM_RADEONSI endif gallium_DRIVERS += libmesa_winsys_radeon libmesa_pipe_radeon -- 2.1.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/2] android: fix cflags and includes for amdgpu winsys
--- src/gallium/winsys/amdgpu/drm/Android.mk | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/gallium/winsys/amdgpu/drm/Android.mk b/src/gallium/winsys/amdgpu/drm/Android.mk index 7d507aa..5773234 100644 --- a/src/gallium/winsys/amdgpu/drm/Android.mk +++ b/src/gallium/winsys/amdgpu/drm/Android.mk @@ -30,6 +30,16 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(C_SOURCES) +LOCAL_CFLAGS := \ + $(AMDGPU_CFLAGS) \ + -DBRAHMA_BUILD=1 + +LOCAL_C_INCLUDES := \ + $(LOCAL_PATH)/addrlib \ + $(LOCAL_PATH)/addrlib/core \ + $(LOCAL_PATH)/addrlib/inc/chip/r800 \ + $(LOCAL_PATH)/addrlib/r800/chip + LOCAL_SHARED_LIBRARIES := libdrm libdrm_amdgpu LOCAL_MODULE := libmesa_winsys_amdgpu -- 2.1.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/3] android: rename LLVM_VERSION_PATCH to MESA_LLVM_VERSION_PATCH
--- Android.common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Android.common.mk b/Android.common.mk index d662d60..f7556d7 100644 --- a/Android.common.mk +++ b/Android.common.mk @@ -70,7 +70,7 @@ endif ifeq ($(MESA_ENABLE_LLVM),true) LOCAL_CFLAGS += \ - -DHAVE_LLVM=0x0305 -DLLVM_VERSION_PATCH=2 \ + -DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2 \ -D__STDC_CONSTANT_MACROS \ -D__STDC_FORMAT_MACROS \ -D__STDC_LIMIT_MACROS -- 2.1.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/3] android: fix nv50_ir_print.cpp buiding error with operator PRIx64
--- src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp index 9ebdc65..5f30f3d 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp @@ -411,7 +411,7 @@ int ImmediateValue::print(char *buf, size_t size, DataType ty) const case TYPE_U64: case TYPE_S64: default: - PRINT("0x%016"PRIx64, reg.data.u64); + PRINT("0x%016" PRIx64, reg.data.u64); break; } return pos; -- 2.1.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/3] android: Always define __STDC_LIMIT_MACROS.
--- Android.common.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Android.common.mk b/Android.common.mk index f7556d7..466e306 100644 --- a/Android.common.mk +++ b/Android.common.mk @@ -42,6 +42,7 @@ LOCAL_CFLAGS += \ -DANDROID_VERSION=0x0$(MESA_ANDROID_MAJOR_VERSION)0$(MESA_ANDROID_MINOR_VERSION) LOCAL_CFLAGS += \ + -D__STDC_LIMIT_MACROS \ -DHAVE___BUILTIN_EXPECT \ -DHAVE___BUILTIN_FFS \ -DHAVE___BUILTIN_FFSLL \ @@ -72,8 +73,7 @@ ifeq ($(MESA_ENABLE_LLVM),true) LOCAL_CFLAGS += \ -DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2 \ -D__STDC_CONSTANT_MACROS \ - -D__STDC_FORMAT_MACROS \ - -D__STDC_LIMIT_MACROS + -D__STDC_FORMAT_MACROS endif LOCAL_CPPFLAGS += \ -- 2.1.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 0/3] A few fixes of building errors with Android-x86
Here follow three trivial patches for android. Kind regards Mauro [PATCH 1/3] android: fix nv50_ir_print.cpp buiding error with operator PRIx64 The PRINT function will not complain anymore with the additional space. [PATCH 2/3] android: rename LLVM_VERSION_PATCH to MESA_LLVM_VERSION_PATCH Due to renaming of variable. [PATCH 3/3] android: Always define __STDC_LIMIT_MACROS. This is equivalent to what happened to scons build. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] android: intel/genxml: add rules to generate xml headers
Hi Jason, I'm sending a patch to add rules for Android, even if those headers are not yet used there they are inducing a minor building error on Android. Cheers and congratulations for your nice presentation on vulkan at XDC2016 Mauro >From 52c9b2d9a7d7fc962d7a8c30fc412387a74bf554 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sun, 9 Oct 2016 11:40:42 +0200 Subject: [PATCH] android: intel/genxml: add rules to generate xml headers New generated headers were introduced by commit 63a366a "intel: aubinator: generate a standalone binary" Once the generated files are listed in Makefile.sources variables, Android build system requires rules to avoid building error. New macro xml-header-gen is basically a copy&paste of automake rules, but xxd is invoked directly, as Android build systems stops and shows the error in case of xxd missing. Existing macro header-gen is renamed to pack-header-gen as a refinement. --- src/intel/Android.genxml.mk | 42 +- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/src/intel/Android.genxml.mk b/src/intel/Android.genxml.mk index 79de784..8991563 100644 --- a/src/intel/Android.genxml.mk +++ b/src/intel/Android.genxml.mk @@ -43,7 +43,7 @@ $(intermediates)/dummy.c: # This is the list of auto-generated files headers LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, $(GENXML_GENERATED_FILES)) -define header-gen +define pack-header-gen @mkdir -p $(dir $@) @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))" $(hide) $(PRIVATE_SCRIPT) $(PRIVATE_XML) > $@ @@ -52,42 +52,66 @@ endef $(intermediates)/genxml/gen4_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/genxml/gen_pack_header.py $(intermediates)/genxml/gen4_pack.h: PRIVATE_XML := $(LOCAL_PATH)/genxml/gen4.xml $(intermediates)/genxml/gen4_pack.h: $(LOCAL_PATH)/genxml/gen4.xml $(LOCAL_PATH)/genxml/gen_pack_header.py - $(call header-gen) + $(call pack-header-gen) $(intermediates)/genxml/gen45_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/genxml/gen_pack_header.py $(intermediates)/genxml/gen45_pack.h: PRIVATE_XML := $(LOCAL_PATH)/genxml/gen45.xml $(intermediates)/genxml/gen45_pack.h: $(LOCAL_PATH)/genxml/gen45.xml $(LOCAL_PATH)/genxml/gen_pack_header.py - $(call header-gen) + $(call pack-header-gen) $(intermediates)/genxml/gen5_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/genxml/gen_pack_header.py $(intermediates)/genxml/gen5_pack.h: PRIVATE_XML := $(LOCAL_PATH)/genxml/gen5.xml $(intermediates)/genxml/gen5_pack.h: $(LOCAL_PATH)/genxml/gen5.xml $(LOCAL_PATH)/genxml/gen_pack_header.py - $(call header-gen) + $(call pack-header-gen) $(intermediates)/genxml/gen6_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/genxml/gen_pack_header.py $(intermediates)/genxml/gen6_pack.h: PRIVATE_XML := $(LOCAL_PATH)/genxml/gen6.xml $(intermediates)/genxml/gen6_pack.h: $(LOCAL_PATH)/genxml/gen6.xml $(LOCAL_PATH)/genxml/gen_pack_header.py - $(call header-gen) + $(call pack-header-gen) $(intermediates)/genxml/gen7_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/genxml/gen_pack_header.py $(intermediates)/genxml/gen7_pack.h: PRIVATE_XML := $(LOCAL_PATH)/genxml/gen7.xml $(intermediates)/genxml/gen7_pack.h: $(LOCAL_PATH)/genxml/gen7.xml $(LOCAL_PATH)/genxml/gen_pack_header.py - $(call header-gen) + $(call pack-header-gen) $(intermediates)/genxml/gen75_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/genxml/gen_pack_header.py $(intermediates)/genxml/gen75_pack.h: PRIVATE_XML := $(LOCAL_PATH)/genxml/gen75.xml $(intermediates)/genxml/gen75_pack.h: $(LOCAL_PATH)/genxml/gen75.xml $(LOCAL_PATH)/genxml/gen_pack_header.py - $(call header-gen) + $(call pack-header-gen) $(intermediates)/genxml/gen8_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/genxml/gen_pack_header.py $(intermediates)/genxml/gen8_pack.h: PRIVATE_XML := $(LOCAL_PATH)/genxml/gen8.xml $(intermediates)/genxml/gen8_pack.h: $(LOCAL_PATH)/genxml/gen8.xml $(LOCAL_PATH)/genxml/gen_pack_header.py - $(call header-gen) + $(call pack-header-gen) $(intermediates)/genxml/gen9_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/genxml/gen_pack_header.py $(intermediates)/genxml/gen9_pack.h: PRIVATE_XML := $(LOCAL_PATH)/genxml/gen9.xml $(intermediates)/genxml/gen9_pack.h: $(LOCAL_PATH)/genxml/gen9.xml $(LOCAL_PATH)/genxml/gen_pack_header.py - $(call header-gen) + $(call pack-header-gen) + +define xml-header-gen + @mkdir -p $(dir $@) + @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))" + $(hide) echo -n "static const uint8_t " > $@; \ + sed -e 's,_xml.h,,' <<< "`basename $@`_xml[] = {" >> $@; \ + cat $< | xxd -i >> $@; \ + echo "};" >> $@ +endef + +$(intermediates)/genxml/gen6_xml.h: $(LOCAL_PATH)/genxml/gen6.xml + $(call xml-header-gen) + +$(intermediates)/genxml/gen7_xml.h: $(LOCAL_PATH)/genxml/gen7.xml + $(call xml-he
Re: [Mesa-dev] [PATCH] android: intel/genxml: add rules to generate xml headers
2016-10-10 13:04 GMT+02:00 Emil Velikov : > Hi Mauro, > > On 9 October 2016 at 11:13, Mauro Rossi wrote: > >> New generated headers were introduced by commit 63a366a >> "intel: aubinator: generate a standalone binary" >> >> Once the generated files are listed in Makefile.sources variables, >> Android build system requires rules to avoid building error. >> >> New macro xml-header-gen is basically a copy&paste of automake rules, >> but xxd is invoked directly, as Android build systems stops and shows the >> error >> in case of xxd missing. >> >> Existing macro header-gen is renamed to pack-header-gen as a refinement. >> --- >> src/intel/Android.genxml.mk | 42 +- >> 1 file changed, 33 insertions(+), 9 deletions(-) >> > I second Jason here - the headers are not (and likely won't be anytime > soon) applicable for Android. > > The simple fix would be to split the headers introduced with above > commit to a separate list in the Makefile.sources file and append that > one to the BUILT_SOURCES list in src/intel/Makefile.genxml.am. Please > give that a try. > > Thanks > Emil Hi Jason, Emil, thanks for the explanations, at this point intel/tools is not built in android. Here follows the minimal patch with changes suggested by Emil Mauro >From 5ea801cd3edb6657fd6e73ac6f476459e328e48d Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Mon, 10 Oct 2016 23:43:42 +0200 Subject: [PATCH] intel/genxml: fix building rules for aubinator required headers New generated headers were introduced by commit 63a366a "intel: aubinator: generate a standalone binary" Android does not need aubinator yet, so in order to avoid building error, aubinator required new genxml headers are defined in a separate list. If required, building rules for Android will be added later. --- src/intel/Makefile.genxml.am | 2 +- src/intel/Makefile.sources | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/intel/Makefile.genxml.am b/src/intel/Makefile.genxml.am index 160a411..08ac81b 100644 --- a/src/intel/Makefile.genxml.am +++ b/src/intel/Makefile.genxml.am @@ -19,7 +19,7 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. -BUILT_SOURCES += $(GENXML_GENERATED_FILES) +BUILT_SOURCES += $(GENXML_GENERATED_FILES) $(AUBINATOR_GENXML_HEADERS) SUFFIXES = _pack.h _xml.h .xml diff --git a/src/intel/Makefile.sources b/src/intel/Makefile.sources index 5b759bf..272e3c8 100644 --- a/src/intel/Makefile.sources +++ b/src/intel/Makefile.sources @@ -21,7 +21,9 @@ GENXML_GENERATED_FILES = \ genxml/gen7_pack.h \ genxml/gen75_pack.h \ genxml/gen8_pack.h \ - genxml/gen9_pack.h \ + genxml/gen9_pack.h + +AUBINATOR_GENXML_HEADERS = \ genxml/gen6_xml.h \ genxml/gen7_xml.h \ genxml/gen75_xml.h \ -- 2.9.3 From 5ea801cd3edb6657fd6e73ac6f476459e328e48d Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Mon, 10 Oct 2016 23:43:42 +0200 Subject: [PATCH] intel/genxml: fix building rules for aubinator required headers New generated headers were introduced by commit 63a366a "intel: aubinator: generate a standalone binary" Android does not need aubinator yet, so in order to avoid building error, aubinator required new genxml headers are defined in a separate list. If required, building rules for Android will be added later. --- src/intel/Makefile.genxml.am | 2 +- src/intel/Makefile.sources | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/intel/Makefile.genxml.am b/src/intel/Makefile.genxml.am index 160a411..08ac81b 100644 --- a/src/intel/Makefile.genxml.am +++ b/src/intel/Makefile.genxml.am @@ -19,7 +19,7 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. -BUILT_SOURCES += $(GENXML_GENERATED_FILES) +BUILT_SOURCES += $(GENXML_GENERATED_FILES) $(AUBINATOR_GENXML_HEADERS) SUFFIXES = _pack.h _xml.h .xml diff --git a/src/intel/Makefile.sources b/src/intel/Makefile.sources index 5b759bf..272e3c8 100644 --- a/src/intel/Makefile.sources +++ b/src/intel/Makefile.sources @@ -21,7 +21,9 @@ GENXML_GENERATED_FILES = \ genxml/gen7_pack.h \ genxml/gen75_pack.h \ genxml/gen8_pack.h \ - genxml/gen9_pack.h \ + genxml/gen9_pack.h + +AUBINATOR_GENXML_HEADERS = \ genxml/gen6_xml.h \ genxml/gen7_xml.h \ genxml/gen75_xml.h \ -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 25/32] i965: Move gen6_blorp.c to a file that gets recompiled per-gen
2016-08-15 18:43 GMT+02:00 Jason Ekstrand : >> >> > --- >> > src/mesa/drivers/dri/i965/Makefile.am | 14 +- >> > src/mesa/drivers/dri/i965/Makefile.sources | 5 +- >> > src/mesa/drivers/dri/i965/gen6_blorp.c | 400 >> > >> > src/mesa/drivers/dri/i965/genX_blorp_exec.c | 399 >> > +++ >> > 4 files changed, 416 insertions(+), 402 deletions(-) >> > delete mode 100644 src/mesa/drivers/dri/i965/gen6_blorp.c >> > create mode 100644 src/mesa/drivers/dri/i965/genX_blorp_exec.c >> > >> Humble request: please run the following in your repo (or even with >> --global) >> $ git config diff.renames true >> >> Mauro, this change will break the Android build. Feel free to cook up >> a patch so that Jason can squash it here. This way we'll avoid the >> interment breakage. > > > Sure, I'd love a hunk to squash in. If it looks reasonably like the ISL > patches, I should be able to do the copy+pasting for gen7, 7.5, 8, and 9 > throughout the series. Hi Emil, Jason, I've finalized and tested the patches to fix android build, I will send them here as follow-up. New libmesa_gen{6,7,75,8,9} static libraries modules are generated with a common set of variables definitions. For genX_blorp.c source existing i965_dri shared library dependencie are applicable, while dependencies on nir and genxml generated headers required to define static libraries dependencies on libmesa_genxml and libmesa_nir, to easily get the needed script generated headers, because android build system will automatically exported those generated headers. Build tested successfully with marshmallow-x86 Feel free to merge the 3 patches or pick them separately as you prefer. Mauro ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 25/32] i965: Move gen6_blorp.c to a file that gets recompiled per-gen
From 4f105a68918b6ee25f1d0d71bc26dc39abed61d7 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Fri, 19 Aug 2016 23:36:11 +0200 Subject: [PATCH 1/3] android: i965: add per-gen libmesa_i965_gen6 static library Needed to fix android build after commit c8bc1ae where new per-gen genX_blorp.c source replaced gen6_blorp.c for gen6 Android build fixes for gen{7,75} and gen{8,9} will follow as incremental patches, build tested successfully with all per-gen patches applied. --- src/mesa/drivers/dri/i965/Android.mk | 48 +--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk index 07f5f6b..70c31e1 100644 --- a/src/mesa/drivers/dri/i965/Android.mk +++ b/src/mesa/drivers/dri/i965/Android.mk @@ -23,6 +23,50 @@ # LOCAL_PATH := $(call my-dir) + +# Import variables i965_FILES. +include $(LOCAL_PATH)/Makefile.sources + +I965_PERGEN_COMMON_INCLUDES := \ + $(MESA_DRI_C_INCLUDES) \ + $(MESA_TOP)/src/intel + +I965_PERGEN_SHARED_LIBRARIES := \ + $(MESA_DRI_SHARED_LIBRARIES) \ + libdrm_intel + +I965_PERGEN_STATIC_LIBRARIES := \ + libmesa_genxml \ + libmesa_nir + +I965_PERGEN_LIBS := \ + libmesa_i965_gen6 + +# --- +# Build libmesa_i965_gen6 +# --- + +include $(CLEAR_VARS) + +LOCAL_MODULE := libmesa_i965_gen6 + +LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES) + +LOCAL_SRC_FILES := $(i965_gen6_FILES) + +LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES) + +LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES) + +LOCAL_CFLAGS := -DGEN_VERSIONx10=60 + +include $(MESA_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) + +# --- +# Build i965_dri +# --- + include $(CLEAR_VARS) LOCAL_MODULE := i965_dri @@ -33,9 +77,6 @@ LOCAL_MODULE_PATH := $(MESA_DRI_MODULE_PATH) LOCAL_UNSTRIPPED_PATH := $(MESA_DRI_MODULE_UNSTRIPPED_PATH) endif -# Import variables i965_FILES. -include $(LOCAL_PATH)/Makefile.sources - LOCAL_CFLAGS := \ $(MESA_DRI_CFLAGS) @@ -48,6 +89,7 @@ LOCAL_SRC_FILES := \ LOCAL_WHOLE_STATIC_LIBRARIES := \ $(MESA_DRI_WHOLE_STATIC_LIBRARIES) \ + $(I965_PERGEN_LIBS) \ libmesa_isl LOCAL_SHARED_LIBRARIES := \ -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 25/32] i965: Move gen6_blorp.c to a file that gets recompiled per-gen
From 6a20bec0a5947cd9c33024db3af51546eeac3062 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Fri, 19 Aug 2016 23:55:54 +0200 Subject: [PATCH 2/3] android: i965: add per-gen libmesa_i965_gen{7,75} static libraries Needed to fix android build after commit e198983 which enabled genxml for gen{7,75} state setup Android build fix for gen{8,9} will follow as incremental patch, build tested successfully with all per-gen patches applied. --- src/mesa/drivers/dri/i965/Android.mk | 46 +++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk index 70c31e1..9dea20b 100644 --- a/src/mesa/drivers/dri/i965/Android.mk +++ b/src/mesa/drivers/dri/i965/Android.mk @@ -40,7 +40,9 @@ I965_PERGEN_STATIC_LIBRARIES := \ libmesa_nir I965_PERGEN_LIBS := \ - libmesa_i965_gen6 + libmesa_i965_gen6 \ + libmesa_i965_gen7 \ + libmesa_i965_gen75 # --- # Build libmesa_i965_gen6 @@ -64,6 +66,48 @@ include $(MESA_COMMON_MK) include $(BUILD_STATIC_LIBRARY) # --- +# Build libmesa_i965_gen7 +# --- + +include $(CLEAR_VARS) + +LOCAL_MODULE := libmesa_i965_gen7 + +LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES) + +LOCAL_SRC_FILES := $(i965_gen7_FILES) + +LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES) + +LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES) + +LOCAL_CFLAGS := -DGEN_VERSIONx10=70 + +include $(MESA_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) + +# --- +# Build libmesa_i965_gen75 +# --- + +include $(CLEAR_VARS) + +LOCAL_MODULE := libmesa_i965_gen75 + +LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES) + +LOCAL_SRC_FILES := $(i965_gen75_FILES) + +LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES) + +LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES) + +LOCAL_CFLAGS := -DGEN_VERSIONx10=75 + +include $(MESA_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) + +# --- # Build i965_dri # --- -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 25/32] i965: Move gen6_blorp.c to a file that gets recompiled per-gen
From 88e08ee520b7c8a14b17160a9e7102d72fed8ecb Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 20 Aug 2016 00:04:29 +0200 Subject: [PATCH 3/3] android: i965: add per-gen libmesa_i965_gen{8,9} static Needed to fix android build after commit 16a9fcb which enabled genxml for gen{8,9} state setup This is the last patch needed, android build tested successfully. --- src/mesa/drivers/dri/i965/Android.mk | 46 +++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk index 9dea20b..e6bcedb 100644 --- a/src/mesa/drivers/dri/i965/Android.mk +++ b/src/mesa/drivers/dri/i965/Android.mk @@ -42,7 +42,9 @@ I965_PERGEN_STATIC_LIBRARIES := \ I965_PERGEN_LIBS := \ libmesa_i965_gen6 \ libmesa_i965_gen7 \ - libmesa_i965_gen75 + libmesa_i965_gen75 \ + libmesa_i965_gen8 \ + libmesa_i965_gen9 # --- # Build libmesa_i965_gen6 @@ -108,6 +110,48 @@ include $(MESA_COMMON_MK) include $(BUILD_STATIC_LIBRARY) # --- +# Build libmesa_i965_gen8 +# --- + +include $(CLEAR_VARS) + +LOCAL_MODULE := libmesa_i965_gen8 + +LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES) + +LOCAL_SRC_FILES := $(i965_gen8_FILES) + +LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES) + +LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES) + +LOCAL_CFLAGS := -DGEN_VERSIONx10=80 + +include $(MESA_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) + +# --- +# Build libmesa_i965_gen9 +# --- + +include $(CLEAR_VARS) + +LOCAL_MODULE := libmesa_i965_gen9 + +LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES) + +LOCAL_SRC_FILES := $(i965_gen9_FILES) + +LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES) + +LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES) + +LOCAL_CFLAGS := -DGEN_VERSIONx10=90 + +include $(MESA_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) + +# --- # Build i965_dri # --- -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 3/3] isl: add support for Android libmesa_isl static library
2016-08-26 12:27 GMT+02:00 Tapani Pälli : > Hi; > > This is patch is causing build issues for me, how was this tested? > Hi, thanks for highlighting the issue, My patch was tested and reviewed, the current android build breakage due to following commit, upstreamed 13 hours ago: https://cgit.freedesktop.org/mesa/mesa/commit/src/intel?id=bebc1a1d995e33f173ea207848bcddd81f6dd19a TMK there is a collaboration in place to quickly fix this kind of situations: - mesa-devs highlight potential build breakage issues, usually within a few hours, one day top - Rob Herring has a CI job used for alerting about build breakages - android-x86 team members periodically check (in my case usually on a per weekly basis) In this case I've seen you already submitted the correction patch, I'll check with my usual weekly schedule and report if I see any trouble. Kind regards Mauro ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] android: fix build issues with genxml, isl
Hi Emil, Jason, Tapani, this weekend I had planned to check mesa-dev with marshmallow-x86 and nougat-x86,builds, so here you can find the port to android of commit bebc1a1d995e33f173ea207848bcddd81f6dd19a Built successfully and tested on Sandybridge. Added also the same formatted patch as attachment in case gmail causes problems. Mauro >From 4769f3e4b51fc804676d2b7b2ea320cfa5fffdde Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 27 Aug 2016 17:19:34 +0200 Subject: [PATCH] android: intel: Flatten the makefile structure Android porting of commit bebc1a1 "intel: Flatten the makefile structure" Automake approach was followed, by moving makefiles a level up, naming them Android.genxml.mk and Android.isl.mk, performing the necessary adjustments to the paths, adding src/intel/Android.mk and fixing mesa top level makefile. --- Android.mk | 3 +- src/intel/Android.genxml.mk | 97 src/intel/Android.isl.mk| 216 +++ src/intel/Android.mk| 29 ++ src/intel/genxml/Android.mk | 97 src/intel/isl/Android.mk| 217 6 files changed, 343 insertions(+), 316 deletions(-) create mode 100644 src/intel/Android.genxml.mk create mode 100644 src/intel/Android.isl.mk create mode 100644 src/intel/Android.mk delete mode 100644 src/intel/genxml/Android.mk delete mode 100644 src/intel/isl/Android.mk diff --git a/Android.mk b/Android.mk index f673029..4a63384 100644 --- a/Android.mk +++ b/Android.mk @@ -90,8 +90,7 @@ SUBDIRS := \ src/mesa \ src/util \ src/egl \ - src/intel/genxml \ - src/intel/isl \ + src/intel \ src/mesa/drivers/dri INC_DIRS := $(call all-named-subdir-makefiles,$(SUBDIRS)) diff --git a/src/intel/Android.genxml.mk b/src/intel/Android.genxml.mk new file mode 100644 index 000..79de784 --- /dev/null +++ b/src/intel/Android.genxml.mk @@ -0,0 +1,97 @@ +# Copyright © 2016 Intel Corporation +# Copyright © 2016 Mauro Rossi +# +# 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. +# + +# --- +# Build libmesa_genxml +# --- + +include $(CLEAR_VARS) + +LOCAL_MODULE := libmesa_genxml + +LOCAL_MODULE_CLASS := STATIC_LIBRARIES + +intermediates := $(call local-generated-sources-dir) + +# dummy.c source file is generated to meet the build system's rules. +LOCAL_GENERATED_SOURCES += $(intermediates)/dummy.c + +$(intermediates)/dummy.c: + @mkdir -p $(dir $@) + @echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))" + $(hide) touch $@ + +# This is the list of auto-generated files headers +LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, $(GENXML_GENERATED_FILES)) + +define header-gen + @mkdir -p $(dir $@) + @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))" + $(hide) $(PRIVATE_SCRIPT) $(PRIVATE_XML) > $@ +endef + +$(intermediates)/genxml/gen4_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/genxml/gen_pack_header.py +$(intermediates)/genxml/gen4_pack.h: PRIVATE_XML := $(LOCAL_PATH)/genxml/gen4.xml +$(intermediates)/genxml/gen4_pack.h: $(LOCAL_PATH)/genxml/gen4.xml $(LOCAL_PATH)/genxml/gen_pack_header.py + $(call header-gen) + +$(intermediates)/genxml/gen45_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/genxml/gen_pack_header.py +$(intermediates)/genxml/gen45_pack.h: PRIVATE_XML := $(LOCAL_PATH)/genxml/gen45.xml +$(intermediates)/genxml/gen45_pack.h: $(LOCAL_PATH)/genxml/gen45.xml $(LOCAL_PATH)/genxml/gen_pack_header.py + $(call header-gen) + +$(intermediates)/genxml/gen5_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/genxml/gen_pack_header.py +$(intermediates)/genxml/gen5_pack.h: PRIVATE_XML := $(LOCAL_PATH)/genxml/gen5.xml +$(intermediates)/genxml/gen5_pack.h: $(LOCAL_PATH)/genxml/gen5.xml $(LOCAL_PATH)/genxml/gen_pack_header.py + $(call header-gen) + +$(
Re: [Mesa-dev] [PATCH] android: fix build issues with genxml, isl
> While you're at it, I've got another build-breaking branch here: > > https://cgit.freedesktop.org/~jekstrand/mesa/log/?h=wip/blorp-vulkan > > It's almost reviewed so I'll be pushing soon. If you could provide a > squash-in, that would be great. > > --Jason Hi Jason, here it is, built marshmallow-x86 successfully after breaking commit "i965: Move blorp into src/intel/blorp" also attached to email, in case of gmail issues. This patch has to be applied on top of my former "[PATCH] android: intel: Flatten the makefile structure" KR Mauro >From 3ae8ea625b5cb091438de421d9762ea8bcb8e2bc Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Mon, 29 Aug 2016 03:08:02 +0200 Subject: [PATCH] android: i965: Move blorp into src/intel/blorp Port to android of commit "i965: Move blorp into src/intel/blorp" libmesa_blorp static library module is built by Android.blorp.mk the necessary dependencies and includes are declared and nir_opcodes.h generated header is included by using the macro generated-sources-dir-for which requires LOCAL_MODULE_CLASS --- src/intel/Android.blorp.mk | 47 src/intel/Android.mk | 1 + src/mesa/drivers/dri/i965/Android.mk | 1 + 3 files changed, 49 insertions(+) create mode 100644 src/intel/Android.blorp.mk diff --git a/src/intel/Android.blorp.mk b/src/intel/Android.blorp.mk new file mode 100644 index 000..268d5eb --- /dev/null +++ b/src/intel/Android.blorp.mk @@ -0,0 +1,47 @@ +# Copyright © 2016 Intel Corporation +# Copyright © 2016 Mauro Rossi +# +# 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. + +# --- +# Build libmesa_blorp +# --- + +include $(CLEAR_VARS) + +LOCAL_MODULE := libmesa_blorp + +LOCAL_MODULE_CLASS := STATIC_LIBRARIES + +LOCAL_SRC_FILES := $(BLORP_FILES) + +LOCAL_C_INCLUDES := := \ + $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir \ + $(MESA_TOP)/src/gallium/auxiliary \ + $(MESA_TOP)/src/gallium/include \ + $(MESA_TOP)/src/mapi \ + $(MESA_TOP)/src/mesa \ + $(MESA_TOP)/src/mesa/drivers/dri/i965 + +LOCAL_STATIC_LIBRARIES := libmesa_nir + +LOCAL_SHARED_LIBRARIES := libdrm_intel + +include $(MESA_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/intel/Android.mk b/src/intel/Android.mk index 114b111..0e9c29d 100644 --- a/src/intel/Android.mk +++ b/src/intel/Android.mk @@ -25,5 +25,6 @@ LOCAL_PATH := $(call my-dir) # Import variables include $(LOCAL_PATH)/Makefile.sources +include $(LOCAL_PATH)/Android.blorp.mk include $(LOCAL_PATH)/Android.genxml.mk include $(LOCAL_PATH)/Android.isl.mk diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk index e6bcedb..32adb9a 100644 --- a/src/mesa/drivers/dri/i965/Android.mk +++ b/src/mesa/drivers/dri/i965/Android.mk @@ -178,6 +178,7 @@ LOCAL_SRC_FILES := \ LOCAL_WHOLE_STATIC_LIBRARIES := \ $(MESA_DRI_WHOLE_STATIC_LIBRARIES) \ $(I965_PERGEN_LIBS) \ + libmesa_blorp \ libmesa_isl LOCAL_SHARED_LIBRARIES := \ -- 2.7.4 From 3ae8ea625b5cb091438de421d9762ea8bcb8e2bc Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Mon, 29 Aug 2016 03:08:02 +0200 Subject: [PATCH] android: i965: Move blorp into src/intel/blorp Port to android of commit "i965: Move blorp into src/intel/blorp" libmesa_blorp static library module is built by Android.blorp.mk the necessary dependencies and includes are declared and nir_opcodes.h generated header is included by using the macro generated-sources-dir-for which requires LOCAL_MODULE_CLASS --- src/intel/Android.blorp.mk | 47 src/intel/Android.mk | 1 + src/mesa/drivers/dri/i965/Android.mk | 1 + 3 files changed, 49 insertions(+) create mode 100644 src/intel/Android.blorp.mk diff --git a/src/intel/Android.blorp.mk b/src/intel/
Re: [Mesa-dev] [PATCH 1/8] intel: Add a new "common" library for more code sharing
Thanks Doing a first attempt in building, there is currently some generated code missing in android build for recent gsls changes, due to commit ee3cdac7857a5c0f30108e1b1963d042f2a5e8e6 "glsl: Use the generated constant expression code" I'll send a patch for that problem soon and I'll check and report about this series. KR Mauro 2016-08-31 22:59 GMT+02:00 Jason Ekstrand : > +Mauro > > On Wed, Aug 31, 2016 at 1:56 PM, Jason Ekstrand > wrote: >> >> The first thing to go in this new library is brw_device_info. >> >> Signed-off-by: Jason Ekstrand >> Cc: Rob Herring >> --- >> >> The android build files I just copied-and-pasted from blorp but I don't >> have an android build setup so I can't test them. >> >> src/intel/Android.common.mk| 37 >> ++ >> src/intel/Android.mk | 1 + >> src/intel/Makefile.am | 1 + >> src/intel/Makefile.common.am | 24 ++ >> src/intel/Makefile.isl.am | 1 + >> src/intel/Makefile.sources | 4 +++ >> src/intel/blorp/blorp_genX_exec.h | 2 +- >> .../dri/i965 => intel/common}/brw_device_info.c| 0 >> .../dri/i965 => intel/common}/brw_device_info.h| 0 >> src/intel/isl/isl_format.c | 2 +- >> src/intel/isl/isl_priv.h | 2 +- >> .../isl/tests/isl_surf_get_image_offset_test.c | 2 +- >> src/intel/tools/Makefile.am| 1 + >> src/intel/vulkan/Makefile.am | 1 + >> src/intel/vulkan/anv_private.h | 2 +- >> src/mesa/drivers/dri/i965/Android.mk | 1 + >> src/mesa/drivers/dri/i965/Makefile.am | 1 + >> src/mesa/drivers/dri/i965/Makefile.sources | 2 -- >> src/mesa/drivers/dri/i965/brw_compiler.h | 2 +- >> src/mesa/drivers/dri/i965/intel_screen.h | 2 +- >> 20 files changed, 79 insertions(+), 9 deletions(-) >> create mode 100644 src/intel/Android.common.mk >> create mode 100644 src/intel/Makefile.common.am >> rename src/{mesa/drivers/dri/i965 => intel/common}/brw_device_info.c >> (100%) >> rename src/{mesa/drivers/dri/i965 => intel/common}/brw_device_info.h >> (100%) >> >> diff --git a/src/intel/Android.common.mk b/src/intel/Android.common.mk >> new file mode 100644 >> index 000..512bcd7 >> --- /dev/null >> +++ b/src/intel/Android.common.mk >> @@ -0,0 +1,37 @@ >> +# Copyright © 2016 Intel Corporation >> +# Copyright © 2016 Mauro Rossi >> +# >> +# 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. >> + >> +# --- >> +# Build libintel_common >> +# --- >> + >> +include $(CLEAR_VARS) >> + >> +LOCAL_MODULE := libintel_common >> + >> +LOCAL_MODULE_CLASS := STATIC_LIBRARIES >> + >> +LOCAL_SRC_FILES := $(COMMON_FILES) >> + >> +LOCAL_C_INCLUDES := >> + >> +include $(MESA_COMMON_MK) >> +include $(BUILD_STATIC_LIBRARY) >> diff --git a/src/intel/Android.mk b/src/intel/Android.mk >> index 0e9c29d..3d501ab 100644 >> --- a/src/intel/Android.mk >> +++ b/src/intel/Android.mk >> @@ -26,5 +26,6 @@ LOCAL_PATH := $(call my-dir) >> inc
Re: [Mesa-dev] [PATCH] Android: glsl: add rules to generate ir_expression*.h header files
2016-09-02 11:50 GMT+02:00 Emil Velikov : > On 2 September 2016 at 05:35, Tapani Pälli wrote: >> Hi; >> >> Thanks, I was trying to work on the same issue but did not quite get it >> working .. will test this one with N build. >> >> FYI this patch contains both of these (which I believe were issues already >> before mentioned changes, just somehow revealed only with N build?): >> > The issue is makefile order/parallel jobs related. > > IIRC latest builds use intermediate tools to convert the makefiles, > thus they could easily reshuffle the former or make the latter easier > to hit. I've also notice that android 7.0 build system is more unforgiving and some build errors appear just in x86 32bit builds > >> https://patchwork.freedesktop.org/patch/107759/ >> https://patchwork.freedesktop.org/patch/106788/ >> > Was going to ask the question that Rob covered in his summary - why > don't we opt for the 'Android way' of pulling dependencies (generated > files and/or includes) by referencing the respective static/shared > lib. > >> >> >> On 09/01/2016 10:06 PM, Rob Herring wrote: >>> >>> Recent changes to generate ir_expression*.h header files broke Android >>> builds. This adds the generation rules. This change is complicated due to >>> creating a circular dependency between libmesa_glsl, libmesa_nir, and >>> libmesa_compiler. Normally, we add static libraries so that include paths >>> are added even if there's no linking dependency. That is the case here. >>> Instead, we explicitly add the include path using $(MESA_GEN_GLSL_H) to >>> libmesa_compiler. This in turn requires shuffling the order of make >>> includes. It also uncovered missing dependency tracking of glsl_parser.h. >>> > Looking at this and the inherent over-linking that one gets when > referencing shared libraries makes me wonder if those were things > considered by the Android build system engineers. > /me bites his tongue not to prevent ranting on the topic. Hi, in principle the macro local-generated-sources-dir-for would cover any case were in automake we have include like -I$(top_builddir)/src/compiler/glsl\ In this case -I$(top_builddir)/src/compiler/glsl\ would become: LOCAL_C_INCLUDES := \ $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_glsl,,)/glsl but I've also seen that defining LOCAL_GENERATED_SOURCES to reach for other modules generated sources works ok > Have you seen/heard anything on the topic of deprecating the old > Android.mk files and/or a tool to assist/automate the conversion ? I've just seen this "improvement on the way", but I hope Android 7.0 will continue to allow using kati /Android.mk [1] https://news.ycombinator.com/item?id=10509843 [2] https://groups.google.com/forum/#!topic/ninja-build/YPby3GRBqHA [3] https://android.googlesource.com/platform/build/soong/ "Convert Android.mk files Soong includes a tool perform a first pass at converting Android.mk files to Android.bp files: androidmk Android.mk > Android.bp The tool converts variables, modules, comments, and some conditionals, but any custom Makefile rules or complex conditionals must be converted by hand." Yeah-ggg! :-( New scripting language, at least for me, still to check what would be the threshold for defining 'custom' and 'complex', which would require handwritten parts in Android.bp files M. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/8] intel: Add a new "common" library for more code sharing
Hi, minor changes are required to Android.common.mk include paths. Build tested with android 7.0 Cheers M. >From e783a73d15e0e49bb323b2e47bc2de0b51ceffa2 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sun, 4 Sep 2016 00:50:48 +0200 Subject: [PATCH] android: intel: fix include paths in new "common" library Fixes building error in libmesa_intel_common static library --- src/intel/Android.common.mk | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/intel/Android.common.mk b/src/intel/Android.common.mk index dcc0140..f056f0a 100644 --- a/src/intel/Android.common.mk +++ b/src/intel/Android.common.mk @@ -31,5 +31,11 @@ LOCAL_MODULE_CLASS := STATIC_LIBRARIES LOCAL_SRC_FILES := $(COMMON_FILES) +LOCAL_C_INCLUDES := \ + $(MESA_TOP)/src/gallium/include \ + $(MESA_TOP)/src/gallium/auxiliary \ + $(MESA_TOP)/src/mapi \ + $(MESA_TOP)/src/mesa + include $(MESA_COMMON_MK) include $(BUILD_STATIC_LIBRARY) -- 2.7.4 From e783a73d15e0e49bb323b2e47bc2de0b51ceffa2 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sun, 4 Sep 2016 00:50:48 +0200 Subject: [PATCH] android: intel: fix include paths in new "common" library Fixes building error in libmesa_intel_common static library --- src/intel/Android.common.mk | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/intel/Android.common.mk b/src/intel/Android.common.mk index dcc0140..f056f0a 100644 --- a/src/intel/Android.common.mk +++ b/src/intel/Android.common.mk @@ -31,5 +31,11 @@ LOCAL_MODULE_CLASS := STATIC_LIBRARIES LOCAL_SRC_FILES := $(COMMON_FILES) +LOCAL_C_INCLUDES := \ + $(MESA_TOP)/src/gallium/include \ + $(MESA_TOP)/src/gallium/auxiliary \ + $(MESA_TOP)/src/mapi \ + $(MESA_TOP)/src/mesa + include $(MESA_COMMON_MK) include $(BUILD_STATIC_LIBRARY) -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] android: fix a build issue with libmesa_st_mesa_32
Hi Tapani, does moving the declaration of the dependency to src/mesa/drivers/dri/i965/Android.mk also work? Mauro LOCAL_WHOLE_STATIC_LIBRARIES := \ $(MESA_DRI_WHOLE_STATIC_LIBRARIES) \ + libmesa_genxml \ libmesa_isl ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] android: fix a build issue with libmesa_st_mesa_32
2016-09-07 12:56 GMT+02:00 Emil Velikov : > On 7 September 2016 at 11:01, Mauro Rossi wrote: > > Hi Tapani, > > > > does moving the declaration of the dependency to > > src/mesa/drivers/dri/i965/Android.mk also work? > > Mauro > > > > LOCAL_WHOLE_STATIC_LIBRARIES := \ > > $(MESA_DRI_WHOLE_STATIC_LIBRARIES) \ > > + libmesa_genxml \ > > libmesa_isl > > > > > Mauro, it's very unlikely that this will work. Afaict the static lib > is required to pull the generated XML headers into the generated C > file. > > Adding libmesa_genxml to LOCAL_WHOLE_STATIC_LIBRARIES will move the > dependency (and thus generation) of the said headers to the (final) > link stage. At which point all the files are (should be) compiled. > > Tapani, please send a patch with your fix with a line worth of commit > message (feel free to copy mine you want) ? Feel free to add > Reviewed-by: Emil Velikov > Just a final check, minor aesthetics, should the libmesa_genxml static library dependency be declared in src/mesa/drivers/dri/i965/Android.mk instead of doing it src/mesa/drivers/dri/i965/Android.gen.mk, which sole purpose is to generate sources? M. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] Check about recent changes in amdgpu
Hi Dave, while checking mesa-dev with android build, I'm porting the necessary changes to to have amd/addrlib in Android build, but I have also encountered a building error related to commit https://cgit.freedesktop.org/mesa/mesa/commit/?id=1add3562e33f0234da50e54dda8cfa6dac613125 In the attachment the full build log, under my signatue short error log. If I revert 1add3562e33f0234da50e54dda8cfa6dac613125 and after that I modify src/amd/common/amdgpu_id.h in this way... -#include "util/u_endian.h" +#include "pipe/p_config.h" ...I can build mesa and complete Android 7.0, build, so there may be some part missing in the new util/u_endian.h header compared to the old one. Would you like to check when you have time, please? Pardon me if I may have wrote something wrong, beacuse I'm more involved android build system than in coding. After your feedback, I will submit the final version of patch to fix android build for review, while in the following brach I have the workaround I've mentioned: https://github.com/maurossi/mesa/commits/12.1.0devel_nougat-x86_10-sep-2016 Mauro Rossi issor.or...@gmail.com In file included from external/mesa/src/amd/addrlib/r800/ciaddrlib.cpp:36: external/mesa/src/amd/addrlib/inc/chip/r800/si_gb_reg.h:36:2: error: "BIGENDIAN_CPU or LITTLEENDIAN_CPU must be defined" #error "BIGENDIAN_CPU or LITTLEENDIAN_CPU must be defined" ^ external/mesa/src/amd/addrlib/inc/chip/r800/si_gb_reg.h:91:6: error: unknown type name 'GB_ADDR_CONFIG_T' GB_ADDR_CONFIG_T f; ^ external/mesa/src/amd/addrlib/inc/chip/r800/si_gb_reg.h:146:6: error: unknown type name 'GB_TILE_MODE_T' GB_TILE_MODE_T f; ^ external/mesa/src/amd/addrlib/inc/chip/r800/si_gb_reg.h:151:6: error: unknown type name 'GB_MACROTILE_MODE_T' GB_MACROTILE_MODE_T f; ^ 4 errors generated. [ 20% 391/1939] target C++: libmesa_amdgpu_addrlib <= external/mesa/src/amd/addrlib/r800/egbaddrlib.cpp ninja: build stopped: subcommand failed. build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed make: *** [ninja_wrapper] Error 1 make failed to build some targets (01:33 (mm:ss)) utente@utente-MS-7576:~/nougat-x86$ make -j5 iso_img TARGET_KERNEL_CONFIG=480_defconfig FOR_RELEASE=1 PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=7.0 TARGET_PRODUCT=android_x86 TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=x86 TARGET_ARCH_VARIANT=x86 TARGET_CPU_VARIANT= TARGET_2ND_ARCH= TARGET_2ND_ARCH_VARIANT= TARGET_2ND_CPU_VARIANT= HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-4.4.0-38-generic-x86_64-with-Ubuntu-16.04-xenial HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=NRD90M OUT_DIR=out Running kati to generate build-android_x86.ninja... external/mesa/src/gallium/winsys/amdgpu/drm/Android.mk was modified, regenerating... PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=7.0 TARGET_PRODUCT=android_x86 TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=x86 TARGET_ARCH_VARIANT=x86 TARGET_CPU_VARIANT= TARGET_2ND_ARCH= TARGET_2ND_ARCH_VARIANT= TARGET_2ND_CPU_VARIANT= HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-4.4.0-38-generic-x86_64-with-Ubuntu-16.04-xenial HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=NRD90M OUT_DIR=out including ./abi/cpp/Android.mk ... including ./art/Android.mk ... including ./bionic/Android.mk ... including ./bootable/newinstaller/Android.mk ... including ./bootable/recovery/Android.mk ... including ./build/libs/host/Android.mk ... including ./build/target/board/Android.mk ... including ./build/target/product/security/Android.mk ... including ./build/tools/Android.mk ... including ./dalvik/Android.mk ... including ./development/apps/BluetoothDebug/Android.mk ... including ./development/apps/BuildWidget/Android.mk ... including ./development/apps/CustomLocale/Android.mk ... including ./development/apps/Development/Android.mk ... including ./development/apps/DevelopmentSettings/Android.mk ... including ./development/apps/Fallback/Android.mk ... including ./development/apps/GestureBuilder/Android.mk ... including ./development/apps/NinePatchLab/Android.mk ... including ./development/apps/OBJViewer/Android.mk ... including ./development/apps/SdkSetup/Android.mk ... including ./development/apps/SettingInjectorSample/Android.mk ... including ./development/apps/WidgetPreview/Android.mk ... including ./development/apps/launchperf/Android.mk ... including ./development/build/Android.mk ... including ./development/cmds/monkey/Android.mk ... including ./development/host/windows/prebuilt/usb/Android.mk ..
Re: [Mesa-dev] Check about recent changes in amdgpu
2016-09-12 3:22 GMT+02:00 Dave Airlie : > Does android have an endian.h? does the attached patch work? > Yes, bionic libc has endian.h and the patch you provided works Thanks a lot I'm sending in the attachment the cumulative patch to fix android building errors due to following commits: f1f1ba3 "radeonsi: move sid.h/r600d_common.h to a common place." 69fca64 "amd/addrlib: move addrlib from amdgpu winsys to common code" Tested by building nougat-x86 branch and applicable to mesa-dev git, after your/Emil review KR Mauro From 63fc17feef58effe19b95785f85dbccfa9b18a3f Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Tue, 13 Sep 2016 01:15:16 +0200 Subject: [PATCH] android: add support for libmesa_amdgpu_addrlib Android porting of the following commits: f1f1ba3 "radeonsi: move sid.h/r600d_common.h to a common place." 69fca64 "amd/addrlib: move addrlib from amdgpu winsys to common code" This patch fixes android building errors --- Android.mk | 1 + src/amd/Android.addrlib.mk | 44 src/amd/Android.mk | 28 src/gallium/drivers/r600/Android.mk | 2 ++ src/gallium/drivers/radeonsi/Android.mk | 4 ++- src/gallium/targets/dri/Android.mk | 2 +- src/gallium/winsys/amdgpu/drm/Android.mk | 9 --- 7 files changed, 84 insertions(+), 6 deletions(-) create mode 100644 src/amd/Android.addrlib.mk create mode 100644 src/amd/Android.mk diff --git a/Android.mk b/Android.mk index 5ab0ef9..e97307d 100644 --- a/Android.mk +++ b/Android.mk @@ -90,6 +90,7 @@ SUBDIRS := \ src/mesa \ src/util \ src/egl \ + src/amd \ src/intel \ src/mesa/drivers/dri diff --git a/src/amd/Android.addrlib.mk b/src/amd/Android.addrlib.mk new file mode 100644 index 000..d296ce0 --- /dev/null +++ b/src/amd/Android.addrlib.mk @@ -0,0 +1,44 @@ +# Copyright © 2016 Red Hat. +# Copyright © 2016 Mauro Rossi +# +# 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 (including the next +# paragraph) 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. + +# --- +# Build libmesa_amdgpu_addrlib +# --- + +include $(CLEAR_VARS) + +LOCAL_MODULE := libmesa_amdgpu_addrlib + +LOCAL_SRC_FILES := $(ADDRLIB_FILES) + +LOCAL_CFLAGS := -DBRAHMA_BUILD=1 + +LOCAL_C_INCLUDES := \ + $(MESA_TOP)/src \ + $(MESA_TOP)/src/amd/common \ + $(MESA_TOP)/src/amd/addrlib \ + $(MESA_TOP)/src/amd/addrlib/core \ + $(MESA_TOP)/src/amd/addrlib/inc/chip/r800 \ + $(MESA_TOP)/src/amd/addrlib/r800/chip + +include $(MESA_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/amd/Android.mk b/src/amd/Android.mk new file mode 100644 index 000..7b745fe --- /dev/null +++ b/src/amd/Android.mk @@ -0,0 +1,28 @@ +# Copyright © 2016 Red Hat. +# Copyright © 2016 Mauro Rossi +# +# 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 (including the next +# paragraph) 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
Re: [Mesa-dev] [RFC] mesa: drop current draw/read buffer when ctx is released
> Mauro or Chih-Wei should be able to answer this (being do static > wallpapers work in i965?). > > Rob Hi, I've perfomed tests with mesa https://github.com/maurossi/mesa/commits/13.0.0_nougat-x86 and the deafult pink wallpaper of nougat-x86 is working on i965 NOTE: I have cherry-picked android-ia "Add the RGBA and RGBX back to Intel screen config", which solved some black rendering issue in Basemark ES2 Taiji 3d render and in OpenGL ES Examples (last two demos) but Android wallpaper was working also without it. Androdi wallpapers are also working on gallium drivers and swrast llvmppipe (Wu Zhen implementation). I've also re-checked what is rendered black with gallium drivers as we speak and all cases (Rajawali app background, Basemark ES2 app background, Gears black surface) seem directly related to pixel format 2 (RGBX). There are no segfaults or other crash signals in dmesg, here are logcat traces of the common issue collected on Radeon RV630: 11-01 21:36:57.321 1498 1528 I ActivityManager: Displayed com.monyetmabuk.rajawali.tutorials/.RajawaliExamplesActivity: +159ms 11-01 21:36:57.324 1229 1229 E GLConsumer: error creating EGLImage: 0x3003 11-01 21:36:57.324 1229 1229 E GLConsumer: Failed to create image. size=1024x720 st=1024 usage=0x933 fmt=2 11-01 21:36:57.324 1229 1229 W GLConsumer: [com.monyetmabuk.rajawali.tutorials/com.monyetmabuk.rajawali.tutorials.RajawaliExamplesActivity] updateAndRelease: unable to createImage on display=0x1 slot=0 ... 11-01 21:37:13.500 1498 2552 I ActivityManager: START u0 {act=SPLASH_BASEMARK cmp=com.rightware.tdmm2v10jnifree/.SplashView} from uid 10070 on display 0 11-01 21:37:13.573 1229 1229 E GLConsumer: error creating EGLImage: 0x3003 11-01 21:37:13.573 1229 1229 E GLConsumer: Failed to create image. size=1024x720 st=1024 usage=0x933 fmt=2 11-01 21:37:13.573 1229 1229 W GLConsumer: [Starting com.rightware.tdmm2v10jnifree] updateAndRelease: unable to createImage on display=0x1 slot=0 ... 11-01 21:58:37.205 1498 2051 I ActivityManager: Start proc 5579:com.jeffboody.GearsES2eclair/u0a74 for activity com.jeffboody.GearsES2eclair/.GearsES2eclair 11-01 21:58:28.508 1229 1229 E GLConsumer: error creating EGLImage: 0x3003 11-01 21:58:28.508 1229 1229 E GLConsumer: Failed to create image. size=1024x720 st=1024 usage=0x933 fmt=2 11-01 21:58:28.508 1229 1229 W GLConsumer: [Starting com.jeffboody.GearsES2eclair] updateAndRelease: unable to createImage on display=0x1 slot=0 Mauro ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] android: amd/common: add support for libmesa_amd_common
Hi Nicolai, please review the attached patch which is necessary fix android build, as per https://bugs.freedesktop.org/show_bug.cgi?id=98573 Tested with nougat-x86 build Kind regards Mauro >From 36777861d42ec5ae0c0ed6a60835c76d13e38555 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 5 Nov 2016 00:00:29 +0100 Subject: [PATCH] android: amd/common: add support for libmesa_amd_common Fixes the following building error introduced with commit 7115e56 and related amd/common dependencies: external/mesa/src/gallium/drivers/radeonsi/si_shader.c:6861: error: undefined reference to 'ac_is_sgpr_param' external/mesa/src/gallium/drivers/radeonsi/si_shader.c:6951: error: undefined reference to 'ac_is_sgpr_param' clang++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed make: *** [ninja_wrapper] Error 1 --- src/amd/Android.common.mk | 47 ++ src/amd/Android.mk | 1 + src/amd/Makefile.sources | 11 + src/gallium/targets/dri/Android.mk | 2 +- 4 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 src/amd/Android.common.mk diff --git a/src/amd/Android.common.mk b/src/amd/Android.common.mk new file mode 100644 index 000..0dbb299 --- /dev/null +++ b/src/amd/Android.common.mk @@ -0,0 +1,47 @@ +# Copyright © 2016 Red Hat. +# Copyright © 2016 Mauro Rossi +# +# 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 (including the next +# paragraph) 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. + +# --- +# Build libmesa_amd_common +# --- + +include $(CLEAR_VARS) + +LOCAL_MODULE := libmesa_amd_common + +LOCAL_SRC_FILES := $(AMD_COMPILER_SOURCES) + +LOCAL_C_INCLUDES := \ + $(MESA_TOP)/include \ + $(MESA_TOP)/src \ + $(MESA_TOP)/src/amd/common \ + $(MESA_TOP)/src/gallium/include \ + $(MESA_TOP)/src/gallium/auxiliary \ + external/llvm/include \ + external/llvm/device/include \ + external/libcxx/include \ + external/elfutils/$(if $(filter 5,$(MESA_ANDROID_MAJOR_VERSION)),0.153/,$(if $(filter 6,$(MESA_ANDROID_MAJOR_VERSION)),src/))libelf + +LOCAL_STATIC_LIBRARIES := libLLVMCore + +include $(MESA_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/amd/Android.mk b/src/amd/Android.mk index 7b745fe..07af052 100644 --- a/src/amd/Android.mk +++ b/src/amd/Android.mk @@ -26,3 +26,4 @@ LOCAL_PATH := $(call my-dir) include $(LOCAL_PATH)/Makefile.sources include $(LOCAL_PATH)/Android.addrlib.mk +include $(LOCAL_PATH)/Android.common.mk diff --git a/src/amd/Makefile.sources b/src/amd/Makefile.sources index 3114a21..5cbefa3 100644 --- a/src/amd/Makefile.sources +++ b/src/amd/Makefile.sources @@ -25,3 +25,14 @@ ADDRLIB_FILES = \ addrlib/r800/egbaddrlib.h \ addrlib/r800/siaddrlib.cpp \ addrlib/r800/siaddrlib.h + +AMD_COMPILER_SOURCES = \ + common/ac_binary.c \ + common/ac_binary.h \ + common/ac_llvm_helper.cpp \ + common/ac_llvm_util.c \ + common/ac_llvm_util.h + +AMD_NIR_SOURCES = \ + common/ac_nir_to_llvm.c \ + common/ac_nir_to_llvm.h diff --git a/src/gallium/targets/dri/Android.mk b/src/gallium/targets/dri/Android.mk index 18aefe3..90bb879 100644 --- a/src/gallium/targets/dri/Android.mk +++ b/src/gallium/targets/dri/Android.mk @@ -81,7 +81,7 @@ gallium_DRIVERS += libmesa_pipe_r600 LOCAL_CFLAGS += -DGALLIUM_R600 endif ifneq ($(filter radeonsi,$(MESA_GPU_DRIVERS)),) -gallium_DRIVERS += libmesa_pipe_radeonsi libmesa_winsys_amdgpu +gallium_DRIVERS += libmesa_pipe_radeonsi libmesa_winsys_amdgpu libmesa_amd_common LOCAL_SHARED_LIBRARIES += libLLVM libdrm_amdgpu LOCAL_CFLAGS += -DGALLIUM_RADEONSI endif -- 2.9.3 From 36777861d42ec5ae0c0ed6a60835c76d13e38555 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 5 Nov 2016 00:00:29 +0100 Subject: [PATCH] android: amd/common: add support for libmesa_amd_common Fixe
Re: [Mesa-dev] [PATCH] android: amd/common: add support for libmesa_amd_common
2016-11-05 18:58 GMT+01:00 Marek Olšák : > Hi, > > I pushed the patch from the bug report. Hopefully it's the same as this one. > > Marek Hi Marek, thanks, it is identical. As a side note, for any people trying to build mesa-dev for android, a problem affecting our nougat-x86 x84_64 build is that we (android-x86 volounteers) haven't managed to properly fix llvm to export prototypes of LLVMInitializeAMDGPU* functions, even if AMDGPU backend was bullt. The problem is the same mentioned here: https://lists.freedesktop.org/archives/mesa-dev/2016-March/109602.html where issue seems related to missing porting of ./include/llvm/Config/Target.def processing in Android makefiles in llvm. At the moment in my personal branch I'm using the -Wno-error=implicit-function-declaration LOCAL_CFLAG, but it can't be upstreamed to mesa-dev I will need to knock at the door of llvm/aosp experts, in the appropriate forums or just continue my trial and error progression. Mauro ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] android: amd/common: add support for libmesa_amd_common
> We'd really want to do: > > git rm src/amd/common/Makefile.sources > git mv src/amd/common/Makefile.am src/amd/Makefile.common.am > sed -i s|common/||g src/amd/Makefile.common.am > + fix the odd piece throughout. > > As-is we have the sources lists duplicated and makefiles async from > one another. And if history has thought us anything - this will break > all the everytime. > > Mauro, can you give it a try ? > > Thanks > Emil Hi, sed command was not necessary but I had to add $(top_src)/src/amd/common include, change configure.ac (like Jason Ekstrand had to do when isl makefile structure was flattened), modify Makefile.common.am as Makefile.addrlib.am I've tried to build and there is no amd related error, it should be ok, but in my "mesa for linux" build system I am lacking proper llvm installation and I see llvm building errors, probably related to this fact. Please review and check by launching a build on your more stable linux build systems/CI jobs, before pushing to mesa-dev Thanks Mauro >From f78f66049118db3ed9b241dfd020418efe52c10b Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 12 Nov 2016 22:10:44 +0100 Subject: [PATCH] amd: flatten amd/common makefile structure This pulls amd/common build rules into upper level makefile, along with amd/addlib which is already there. --- configure.ac | 1 - src/amd/Makefile.am| 1 + src/amd/{common/Makefile.am => Makefile.common.am} | 15 ++- src/amd/common/Makefile.sources| 31 -- 4 files changed, 9 insertions(+), 39 deletions(-) rename src/amd/{common/Makefile.am => Makefile.common.am} (83%) delete mode 100644 src/amd/common/Makefile.sources diff --git a/configure.ac b/configure.ac index 4761c59..ebe0a2a 100644 --- a/configure.ac +++ b/configure.ac @@ -2682,7 +2682,6 @@ dnl Substitute the config AC_CONFIG_FILES([Makefile src/Makefile src/amd/Makefile -src/amd/common/Makefile src/amd/vulkan/Makefile src/compiler/Makefile src/egl/Makefile diff --git a/src/amd/Makefile.am b/src/amd/Makefile.am index d01d435..1402ca5 100644 --- a/src/amd/Makefile.am +++ b/src/amd/Makefile.am @@ -25,3 +25,4 @@ noinst_LTLIBRARIES = EXTRA_DIST = $(COMMON_HEADER_FILES) include Makefile.addrlib.am +include Makefile.common.am diff --git a/src/amd/common/Makefile.am b/src/amd/Makefile.common.am similarity index 83% rename from src/amd/common/Makefile.am rename to src/amd/Makefile.common.am index bc269ab..4ae8e28 100644 --- a/src/amd/common/Makefile.am +++ b/src/amd/Makefile.common.am @@ -19,15 +19,16 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. -include Makefile.sources +COMMON_LIBS = common/libamd_common.la # TODO cleanup these -AM_CPPFLAGS = \ +common_libamd_common_la_AM_CPPFLAGS = \ $(VALGRIND_CFLAGS) \ $(DEFINES) \ -I$(top_srcdir)/include \ -I$(top_builddir)/src \ -I$(top_srcdir)/src \ +-I$(top_srcdir)/src/amd/common \ -I$(top_builddir)/src/compiler \ -I$(top_builddir)/src/compiler/nir \ -I$(top_srcdir)/src/compiler \ @@ -37,21 +38,21 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/gallium/auxiliary \ -I$(top_srcdir)/src/gallium/include -AM_CFLAGS = $(VISIBILITY_CFLAGS) \ +common_libamd_common_la_AM_CFLAGS = $(VISIBILITY_CFLAGS) \ $(PTHREAD_CFLAGS) \ $(LLVM_CFLAGS) \ $(LIBELF_CFLAGS) -AM_CXXFLAGS = \ +common_libamd_common_la_AM_CXXFLAGS = \ $(VISIBILITY_CXXFLAGS) \ $(LLVM_CXXFLAGS) -noinst_LTLIBRARIES = libamd_common.la +noinst_LTLIBRARIES += $(COMMON_LIBS) -libamd_common_la_SOURCES = $(AMD_COMPILER_SOURCES) +common_libamd_common_la_SOURCES = $(AMD_COMPILER_SOURCES) # nir_to_llvm requires LLVM 3.9, which is only required as a minimum when # radv is built. if HAVE_RADEON_VULKAN -libamd_common_la_SOURCES += $(AMD_NIR_SOURCES) +common_libamd_common_la_SOURCES += $(AMD_NIR_SOURCES) endif diff --git a/src/amd/common/Makefile.sources b/src/amd/common/Makefile.sources deleted file mode 100644 index 0aff73b..000 --- a/src/amd/common/Makefile.sources +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright © 2016 Bas Nieuwenhuizen -# -# 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 (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS I
[Mesa-dev] i915: Enable EGL_KHR_{fence,wait}_sync
Sending patches to implement DRI2_Fence extension for i915, to enable EGL_KHR_fence_sync and EGL_KHR_wait_sync. It is the step-by-step porting to i915 of i965/sync, plus patch to support {server,client}_wait_sync without bound context. [PATCH 1/3] i915/sync: Replace prefix 'intel_sync' -> 'intel_gl_sync' [PATCH 2/3] i915/sync: Implement DRI2_Fence extension [PATCH 3/3] i915: store reference to the context within struct Motivation is to support (web)chromium which requires EGL_KHR_{fence,wait}_sync Tested with marshmallow-x86 build on Asus Eee PC 1015PEM Spotted by Paulo Travaglia Cc: "12.0" ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/3] i915: store reference to the context within struct intel_fence
Porting of the corresponding experimental patch for i965, i.e. commit 67adb45 in external/mesa project branch x86/marshmallow-x86 in Android-x86 repo. Here follows the original commit message by Emil Velikov: "As the spec allows for {server,client}_wait_sync to be called without currently bound context, while our implementation requires context pointer. Untested" Now the changes have been tested for some months. Cc: "12.0" --- src/mesa/drivers/dri/i915/intel_syncobj.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i915/intel_syncobj.c b/src/mesa/drivers/dri/i915/intel_syncobj.c index 18d1546..39bb9ee 100644 --- a/src/mesa/drivers/dri/i915/intel_syncobj.c +++ b/src/mesa/drivers/dri/i915/intel_syncobj.c @@ -46,6 +46,7 @@ #include "intel_reg.h" struct intel_fence { + struct intel_context *intel; /** The fence waits for completion of this batch. */ drm_intel_bo *batch_bo; @@ -215,6 +216,7 @@ intel_dri_create_fence(__DRIcontext *ctx) if (!fence) return NULL; + fence->intel = intel; intel_fence_insert(intel, fence); return fence; @@ -233,19 +235,17 @@ static GLboolean intel_dri_client_wait_sync(__DRIcontext *ctx, void *driver_fence, unsigned flags, uint64_t timeout) { - struct intel_context *intel = ctx->driverPrivate; struct intel_fence *fence = driver_fence; - return intel_fence_client_wait(intel, fence, timeout); + return intel_fence_client_wait(fence->intel, fence, timeout); } static void intel_dri_server_wait_sync(__DRIcontext *ctx, void *driver_fence, unsigned flags) { - struct intel_context *intel = ctx->driverPrivate; struct intel_fence *fence = driver_fence; - intel_fence_server_wait(intel, fence); + intel_fence_server_wait(fence->intel, fence); } const __DRI2fenceExtension intelFenceExtension = { -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/3] i915/sync: Replace prefix 'intel_sync' -> 'intel_gl_sync'
This is the porting of corresponding patch for i965, i.e. commit 2516d83 i965/sync: Replace prefix 'intel_sync' -> 'intel_gl_sync' The only difference compared to i965 one is that intel_check_sync() was renamed to intel_gl_check_sync() here, as it is more appropriate. Here follows original commit message by Chad Versace: "I'm about to implement DRI2_Fenc in intel_syncobj.c. To prevent madness, we need to prefix functions for GL_ARB_sync with 'gl' and functions for DRI2_Fence with 'dri'. Otherwise, the file will become a jumble of similiarly named functions. For example: old-name: intel_client_wait_sync() new-name: intel_gl_client_wait_sync() soon-to-come: intel_dri_client_wait_sync() I wrote this renaming commit separately from the commit that implements DRI2_Fence because I wanted the latter diff to be reviewable." Cc: "12.0" --- src/mesa/drivers/dri/i915/intel_context.h | 7 - src/mesa/drivers/dri/i915/intel_syncobj.c | 49 +++ 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/src/mesa/drivers/dri/i915/intel_context.h b/src/mesa/drivers/dri/i915/intel_context.h index 39b328a..5832169 100644 --- a/src/mesa/drivers/dri/i915/intel_context.h +++ b/src/mesa/drivers/dri/i915/intel_context.h @@ -104,13 +104,6 @@ extern void intelFallback(struct intel_context *intel, GLbitfield bit, #endif #endif -struct intel_sync_object { - struct gl_sync_object Base; - - /** Batch associated with this sync object */ - drm_intel_bo *bo; -}; - struct intel_batchbuffer { /** Current batchbuffer being queued up. */ drm_intel_bo *bo; diff --git a/src/mesa/drivers/dri/i915/intel_syncobj.c b/src/mesa/drivers/dri/i915/intel_syncobj.c index 92b5b63..33f2fd4 100644 --- a/src/mesa/drivers/dri/i915/intel_syncobj.c +++ b/src/mesa/drivers/dri/i915/intel_syncobj.c @@ -45,12 +45,19 @@ #include "intel_batchbuffer.h" #include "intel_reg.h" +struct intel_gl_sync_object { + struct gl_sync_object Base; + + /** Batch associated with this sync object */ + drm_intel_bo *bo; +}; + static struct gl_sync_object * -intel_new_sync_object(struct gl_context *ctx, GLuint id) +intel_gl_new_sync_object(struct gl_context *ctx, GLuint id) { - struct intel_sync_object *sync; + struct intel_gl_sync_object *sync; - sync = calloc(1, sizeof(struct intel_sync_object)); + sync = calloc(1, sizeof(*sync)); if (!sync) return NULL; @@ -58,9 +65,9 @@ intel_new_sync_object(struct gl_context *ctx, GLuint id) } static void -intel_delete_sync_object(struct gl_context *ctx, struct gl_sync_object *s) +intel_gl_delete_sync_object(struct gl_context *ctx, struct gl_sync_object *s) { - struct intel_sync_object *sync = (struct intel_sync_object *)s; + struct intel_gl_sync_object *sync = (struct intel_sync_object *)s; if (sync->bo) drm_intel_bo_unreference(sync->bo); @@ -69,11 +76,11 @@ intel_delete_sync_object(struct gl_context *ctx, struct gl_sync_object *s) } static void -intel_fence_sync(struct gl_context *ctx, struct gl_sync_object *s, +intel_gl_fence_sync(struct gl_context *ctx, struct gl_sync_object *s, GLenum condition, GLbitfield flags) { struct intel_context *intel = intel_context(ctx); - struct intel_sync_object *sync = (struct intel_sync_object *)s; + struct intel_gl_sync_object *sync = (struct intel_sync_object *)s; assert(condition == GL_SYNC_GPU_COMMANDS_COMPLETE); intel_batchbuffer_emit_mi_flush(intel); @@ -84,10 +91,11 @@ intel_fence_sync(struct gl_context *ctx, struct gl_sync_object *s, intel_flush(ctx); } -static void intel_client_wait_sync(struct gl_context *ctx, struct gl_sync_object *s, +static void +intel_gl_client_wait_sync(struct gl_context *ctx, struct gl_sync_object *s, GLbitfield flags, GLuint64 timeout) { - struct intel_sync_object *sync = (struct intel_sync_object *)s; + struct intel_gl_sync_object *sync = (struct intel_sync_object *)s; if (sync->bo && drm_intel_gem_bo_wait(sync->bo, timeout) == 0) { s->StatusFlag = 1; @@ -101,14 +109,16 @@ static void intel_client_wait_sync(struct gl_context *ctx, struct gl_sync_object * any batchbuffers coming after this waitsync will naturally not occur until * the previous one is done. */ -static void intel_server_wait_sync(struct gl_context *ctx, struct gl_sync_object *s, +static void +intel_gl_server_wait_sync(struct gl_context *ctx, struct gl_sync_object *s, GLbitfield flags, GLuint64 timeout) { } -static void intel_check_sync(struct gl_context *ctx, struct gl_sync_object *s) +static void +intel_gl_check_sync(struct gl_context *ctx, struct gl_sync_object *s) { - struct intel_sync_object *sync = (struct intel_sync_object *)s; + struct intel_gl_sync_object *sync = (struct intel_sync_object *)s; if (sync->bo && !drm_intel_bo_busy(sync->bo)) { drm_intel_bo_unreference(sync->bo); @@ -117,12 +127,13 @@ sta
[Mesa-dev] [PATCH 2/3] i915/sync: Implement DRI2_Fence extension
Here is the porting of corresponding patch for i965, i.e. commit c636284 i965/sync: Implement DRI2_Fence extension Here follows part of original commit message by Chad Versace: "This enables EGL_KHR_fence_sync and EGL_KHR_wait_sync." Cc: "12.0" --- src/mesa/drivers/dri/i915/intel_screen.c | 1 + src/mesa/drivers/dri/i915/intel_screen.h | 1 + src/mesa/drivers/dri/i915/intel_syncobj.c | 180 +- 3 files changed, 152 insertions(+), 30 deletions(-) diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c index 77af328..fa96c6d 100644 --- a/src/mesa/drivers/dri/i915/intel_screen.c +++ b/src/mesa/drivers/dri/i915/intel_screen.c @@ -786,6 +786,7 @@ static const __DRI2rendererQueryExtension intelRendererQueryExtension = { static const __DRIextension *intelScreenExtensions[] = { &intelTexBufferExtension.base, +&intelFenceExtension.base, &intelFlushExtension.base, &intelImageExtension.base, &intelRendererQueryExtension.base, diff --git a/src/mesa/drivers/dri/i915/intel_screen.h b/src/mesa/drivers/dri/i915/intel_screen.h index 3518572..891894d 100644 --- a/src/mesa/drivers/dri/i915/intel_screen.h +++ b/src/mesa/drivers/dri/i915/intel_screen.h @@ -162,6 +162,7 @@ extern void intelDestroyContext(__DRIcontext * driContextPriv); extern GLboolean intelUnbindContext(__DRIcontext * driContextPriv); const __DRIextension **__driDriverGetExtensions_i915(void); +extern const __DRI2fenceExtension intelFenceExtension; extern GLboolean intelMakeCurrent(__DRIcontext * driContextPriv, diff --git a/src/mesa/drivers/dri/i915/intel_syncobj.c b/src/mesa/drivers/dri/i915/intel_syncobj.c index 33f2fd4..18d1546 100644 --- a/src/mesa/drivers/dri/i915/intel_syncobj.c +++ b/src/mesa/drivers/dri/i915/intel_syncobj.c @@ -25,11 +25,11 @@ * */ -/** @file intel_syncobj.c +/** + * \file + * \brief Support for GL_ARB_sync and EGL_KHR_fence_sync. * - * Support for ARB_sync - * - * ARB_sync is implemented by flushing the current batchbuffer and keeping a + * GL_ARB_sync is implemented by flushing the current batchbuffer and keeping a * reference on it. We can then check for completion or wait for completion * using the normal buffer object mechanisms. This does mean that if an * application is using many sync objects, it will emit small batchbuffers @@ -45,13 +45,94 @@ #include "intel_batchbuffer.h" #include "intel_reg.h" +struct intel_fence { + /** The fence waits for completion of this batch. */ + drm_intel_bo *batch_bo; + + bool signalled; +}; + struct intel_gl_sync_object { struct gl_sync_object Base; - - /** Batch associated with this sync object */ - drm_intel_bo *bo; + struct intel_fence fence; }; +static void +intel_fence_finish(struct intel_fence *fence) +{ + if (fence->batch_bo) + drm_intel_bo_unreference(fence->batch_bo); +} + +static void +intel_fence_insert(struct intel_context *intel, struct intel_fence *fence) +{ + assert(!fence->batch_bo); + assert(!fence->signalled); + + intel_batchbuffer_emit_mi_flush(intel); + fence->batch_bo = intel->batch.bo; + drm_intel_bo_reference(fence->batch_bo); + intel_batchbuffer_flush(intel); +} + +static bool +intel_fence_has_completed(struct intel_fence *fence) +{ + if (fence->signalled) + return true; + + if (fence->batch_bo && !drm_intel_bo_busy(fence->batch_bo)) { + drm_intel_bo_unreference(fence->batch_bo); + fence->batch_bo = NULL; + fence->signalled = true; + return true; + } + + return false; +} + +/** + * Return true if the function successfully signals or has already signalled. + * (This matches the behavior expected from __DRI2fence::client_wait_sync). + */ +static bool +intel_fence_client_wait(struct intel_context *intel, struct intel_fence *fence, + uint64_t timeout) +{ + if (fence->signalled) + return true; + + assert(fence->batch_bo); + + /* DRM_IOCTL_I915_GEM_WAIT uses a signed 64 bit timeout and returns +* immediately for timeouts <= 0. The best we can do is to clamp the +* timeout to INT64_MAX. This limits the maximum timeout from 584 years to +* 292 years - likely not a big deal. +*/ + if (timeout > INT64_MAX) + timeout = INT64_MAX; + + if (drm_intel_gem_bo_wait(fence->batch_bo, timeout) != 0) + return false; + + fence->signalled = true; + drm_intel_bo_unreference(fence->batch_bo); + fence->batch_bo = NULL; + + return true; +} + +static void +intel_fence_server_wait(struct intel_context *intel, struct intel_fence *fence) +{ + /* We have nothing to do for WaitSync. Our GL command stream is sequential, +* so given that the sync object has already flushed the batchbuffer, any +* batchbuffers coming after this waitsync will naturally not occur until +* the previous one is done. +*/ +} + static struct gl_sync_object * intel_gl_new_sync_object(struct gl_context *ctx, GLuint id) { @@ -69,9 +1
Re: [Mesa-dev] i915: Enable EGL_KHR_{fence,wait}_sync
2016-07-14 5:33 GMT+02:00 Mauro Rossi : > Sending patches to implement DRI2_Fence extension for i915, > to enable EGL_KHR_fence_sync and EGL_KHR_wait_sync. > > It is the step-by-step porting to i915 of i965/sync, > plus patch to support {server,client}_wait_sync without bound context. > > [PATCH 1/3] i915/sync: Replace prefix 'intel_sync' -> 'intel_gl_sync' > [PATCH 2/3] i915/sync: Implement DRI2_Fence extension > [PATCH 3/3] i915: store reference to the context within struct > > Motivation is to support (web)chromium which requires > EGL_KHR_{fence,wait}_sync > Tested with marshmallow-x86 build on Asus Eee PC 1015PEM > > Spotted by Paulo Travaglia > > Cc: "12.0" > Signed-off-by: Chih-Wei Huang ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [Mesa-stable] i915: Enable EGL_KHR_{fence, wait}_sync
2016-07-15 21:18 GMT+02:00 Emil Velikov : > Hi Mauro, > > On 14 July 2016 at 04:33, Mauro Rossi wrote: > > Sending patches to implement DRI2_Fence extension for i915, > > to enable EGL_KHR_fence_sync and EGL_KHR_wait_sync. > > > > It is the step-by-step porting to i915 of i965/sync, > > plus patch to support {server,client}_wait_sync without bound context. > > > > [PATCH 1/3] i915/sync: Replace prefix 'intel_sync' -> 'intel_gl_sync' > > [PATCH 2/3] i915/sync: Implement DRI2_Fence extension > These two are > Acked-by: Emil Velikov > > > [PATCH 3/3] i915: store reference to the context within struct > > > And this one needs a re-spin to include locking, as done my Tomasz. > I'm already doing the re-spin, I will submit v2 by step by step replication of Tomasz patch for i915. > > Motivation is to support (web)chromium which requires > EGL_KHR_{fence,wait}_sync > > Tested with marshmallow-x86 build on Asus Eee PC 1015PEM > > > Did you perform any tests as stated in the i965 "Implement DRI2_Fence > extension" patch ? Afaict the new functionality is nicely separated so > there's little chance for regressions but giving it greater testing > would be appreciated. > Tests were performed by Paulo and they consisted in checking chromium browser that was crashing without those features. I will test on intel G33 in the weekend and perform Android CTS deqp EGL and report back. > > > Spotted by Paulo Travaglia > > > > Cc: "12.0" > I'm not sold that these are stable material - they add feature and > don't fix bug(s). If anything Android could use some updates to honour > the lack of the EGL (EGL_KHR_fence_sync and EGL_KHR_wait_sync) > extensions. > Thanks, I understand your point about additional features for mesa-stable. It depends if we consider that these are step-by-step cloned from i965 ones, with the only difference that 'brw' was renamed as 'intel' as in all other similar functions in i915 Also these capabilities are independent from underlying HW, if I understood correctly > That said if the Intel devs are OK with having these in stable I won't > object too much ;-) > > Thanks > Emil > Merging in mesa-dev will be ok, If patches not accepted for mesa-stable it is not a problem, because they can be used as they are in android-x86 marshmallow-x86 branch. M. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 3/3] i915: store reference to the context within struct intel_fence
Hi, I'm sending the v2 re-spin of patch as per i965, rechecked twice line-by-line with Tomasz's one. Building ok, marshmallow-x86 booting ok and here are the results of Android CTS egl and gles2 x86 target tests Android CTS 6.0_r7 build:2906653 07-16 00:52:42 I/DeviceManager: Detected new device 192.168.1.7: cts-tf > list r Session Pass Fail Not Executed Start time Plan name Device serial(s) 0(EGL) 1410 24 0 2016.07.16_00.21.30 NA unknown 1(GLES2) 13832 82 0 2016.07.16_00.24.23 NA unknown cts-tf > I get the same results as per i965GM Mauro >From d35c093d48facae4ad0d7119a8b6fdc898a6a1e8 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Fri, 15 Jul 2016 21:46:09 +0200 Subject: [PATCH] i915: store reference to the context within struct intel_fence (v2) Porting of the corresponding patch for i965. Here follows the original commit message by Tomasz Figa: "As the spec allows for {server,client}_wait_sync to be called without currently bound context, while our implementation requires context pointer. v2: Add a mutex and acquire it for the duration of brw_fence_client_wait() and brw_fence_is_completed() as suggested by Chad." NOTE: in i915 all references to 'brw' are replaced by 'intel' --- src/mesa/drivers/dri/i915/intel_syncobj.c | 55 --- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/src/mesa/drivers/dri/i915/intel_syncobj.c b/src/mesa/drivers/dri/i915/intel_syncobj.c index 18d1546..5d37204a 100644 --- a/src/mesa/drivers/dri/i915/intel_syncobj.c +++ b/src/mesa/drivers/dri/i915/intel_syncobj.c @@ -46,9 +46,11 @@ #include "intel_reg.h" struct intel_fence { + struct intel_context *intel; /** The fence waits for completion of this batch. */ drm_intel_bo *batch_bo; + mtx_t mutex; bool signalled; }; @@ -77,7 +79,7 @@ intel_fence_insert(struct intel_context *intel, struct intel_fence *fence) } static bool -intel_fence_has_completed(struct intel_fence *fence) +intel_fence_has_completed_locked(struct intel_fence *fence) { if (fence->signalled) return true; @@ -92,13 +94,21 @@ intel_fence_has_completed(struct intel_fence *fence) return false; } -/** - * Return true if the function successfully signals or has already signalled. - * (This matches the behavior expected from __DRI2fence::client_wait_sync). - */ static bool -intel_fence_client_wait(struct intel_context *intel, struct intel_fence *fence, - uint64_t timeout) +intel_fence_has_completed(struct intel_fence *fence) +{ + bool ret; + + mtx_lock(&fence->mutex); + ret = intel_fence_has_completed_locked(fence); + mtx_unlock(&fence->mutex); + + return ret; +} + +static bool +intel_fence_client_wait_locked(struct intel_context *intel, struct intel_fence *fence, + uint64_t timeout) { if (fence->signalled) return true; @@ -123,6 +133,23 @@ intel_fence_client_wait(struct intel_context *intel, struct intel_fence *fence, return true; } +/** + * Return true if the function successfully signals or has already signalled. + * (This matches the behavior expected from __DRI2fence::client_wait_sync). + */ +static bool +intel_fence_client_wait(struct intel_context *intel, struct intel_fence *fence, + uint64_t timeout) +{ + bool ret; + + mtx_lock(&fence->mutex); + ret = intel_fence_client_wait_locked(intel, fence, timeout); + mtx_unlock(&fence->mutex); + + return ret; +} + static void intel_fence_server_wait(struct intel_context *intel, struct intel_fence *fence) { @@ -215,6 +242,8 @@ intel_dri_create_fence(__DRIcontext *ctx) if (!fence) return NULL; + mtx_init(&fence->mutex, mtx_plain); + fence->intel = intel; intel_fence_insert(intel, fence); return fence; @@ -233,19 +262,23 @@ static GLboolean intel_dri_client_wait_sync(__DRIcontext *ctx, void *driver_fence, unsigned flags, uint64_t timeout) { - struct intel_context *intel = ctx->driverPrivate; struct intel_fence *fence = driver_fence; - return intel_fence_client_wait(intel, fence, timeout); + return intel_fence_client_wait(fence->intel, fence, timeout); } static void intel_dri_server_wait_sync(__DRIcontext *ctx, void *driver_fence, unsigned flags) { - struct intel_context *intel = ctx->driverPrivate; struct intel_fence *fence = driver_fence; - intel_fence_server_wait(intel, fence); + /* We might be called here with a NULL fence as a result of WaitSyncKHR +* on a EGL_KHR_reusable_sync fence. Nothing to do here in such case. +*/ + if (!fence) + return; + + intel_fence_server_wait(fence->intel, fence); } const __DRI2fenceExtension intelFenceExtension = { -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/3] i965: fix glsl/float64_glsl.h include
Fixes the following build error: external/mesa/src/mesa/drivers/dri/i965/brw_program.c:45:10: fatal error: 'compiler/glsl/float64_glsl.h' file not found #include "compiler/glsl/float64_glsl.h" ^~ 1 error generated. Include of src/compiler in builddir is added accordingly Signed-off-by: Mauro Rossi Fixes: 7d7b308 ("automake: Fix path to generated source") Fixes: b63a1f8 ("glsl: Create file to contain software fp64 functions") Cc: 19.0 --- src/mesa/drivers/dri/i965/Makefile.am | 1 + src/mesa/drivers/dri/i965/brw_program.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/Makefile.am b/src/mesa/drivers/dri/i965/Makefile.am index b562c6ea21..48d15296d9 100644 --- a/src/mesa/drivers/dri/i965/Makefile.am +++ b/src/mesa/drivers/dri/i965/Makefile.am @@ -34,6 +34,7 @@ AM_CFLAGS = \ -I$(top_builddir)/src/util \ -I$(top_srcdir)/src/mesa/drivers/dri/common \ -I$(top_srcdir)/src/gtest/include \ + -I$(top_builddir)/src/compiler/ \ -I$(top_builddir)/src/compiler/glsl \ -I$(top_builddir)/src/compiler/nir \ -I$(top_srcdir)/src/compiler/nir \ diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index 9ab25cf664..1038d9a47a 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/mesa/drivers/dri/i965/brw_program.c @@ -42,7 +42,7 @@ #include "compiler/glsl/ir.h" #include "compiler/glsl/program.h" #include "compiler/glsl/glsl_to_nir.h" -#include "compiler/glsl/float64_glsl.h" +#include "glsl/float64_glsl.h" #include "brw_program.h" #include "brw_context.h" -- 2.19.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/3] meson: i965: add inc_compiler include
With new glsl/float64_glsl.h include, required in i965 source to correctly build Android and with automake, inc_compiler is added in meson build includes. It may not be necessary for meson, but it is formally correct Signed-off-by: Mauro Rossi Fixes: 7d7b308 ("automake: Fix path to generated source") Fixes: b63a1f8 ("glsl: Create file to contain software fp64 functions") Cc: 19.0 --- src/mesa/drivers/dri/i965/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/meson.build b/src/mesa/drivers/dri/i965/meson.build index cd3683ae7e..4c06dad1b3 100644 --- a/src/mesa/drivers/dri/i965/meson.build +++ b/src/mesa/drivers/dri/i965/meson.build @@ -179,7 +179,7 @@ libi965 = static_library( [files_i965, i965_oa_sources, ir_expression_operation_h, xmlpool_options_h, float64_glsl_h], include_directories : [ -inc_common, inc_intel, inc_dri_common, inc_util, inc_drm_uapi, +inc_common, inc_compiler, inc_intel, inc_dri_common, inc_util, inc_drm_uapi, ], c_args : [c_vis_args, no_override_init_args, c_sse2_args], cpp_args : [cpp_vis_args, c_sse2_args], -- 2.19.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/3] android: glsl: fix fp64 generated source path
Porting of commit 7d7b308 ("automake: Fix path to generated source") to Android build system Fixes the following building error: ninja: error: '.../x86/gen/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/float64_glsl.h', needed by '.../x86/obj/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/float64_glsl.h', missing and no known rule to make it Signed-off-by: Mauro Rossi Fixes: 7d7b308 ("automake: Fix path to generated source") Fixes: b63a1f8 ("glsl: Create file to contain software fp64 functions") Cc: 19.0 --- src/compiler/Android.glsl.gen.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/Android.glsl.gen.mk b/src/compiler/Android.glsl.gen.mk index e31eb6f101..3b94ea7bd2 100644 --- a/src/compiler/Android.glsl.gen.mk +++ b/src/compiler/Android.glsl.gen.mk @@ -104,6 +104,6 @@ $(intermediates)/glsl/ir_expression_operation_strings.h: $(LOCAL_PATH)/glsl/ir_e @mkdir -p $(dir $@) $(hide) $(MESA_PYTHON2) $< strings > $@ -$(intermediates)/compiler/glsl/float64_glsl.h: $(LOCAL_PATH)/glsl/xxd.py +$(intermediates)/glsl/float64_glsl.h: $(LOCAL_PATH)/glsl/xxd.py @mkdir -p $(dir $@) $(hide) $(MESA_PYTHON2) $< $(MESA_TOP)/src/compiler/glsl/float64.glsl $@ -n float64_source > $@ -- 2.19.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/3] android: glsl: fix fp64 generated source path
Hi, sorry I just saw that there is a similar correction is already in both 19.0 and master branches but I missed it because I searched only in mesa-dev ML Please Dylan, just check if the 3rd patch makes sense or not necessary at all. Mauro On Sat, Feb 2, 2019 at 11:30 AM Mauro Rossi wrote: > > Porting of commit 7d7b308 ("automake: Fix path to generated source") > to Android build system > > Fixes the following building error: > ninja: error: > '.../x86/gen/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/float64_glsl.h', > needed by > '.../x86/obj/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/float64_glsl.h', > missing and no known rule to make it > > Signed-off-by: Mauro Rossi > Fixes: 7d7b308 ("automake: Fix path to generated source") > Fixes: b63a1f8 ("glsl: Create file to contain software fp64 functions") > Cc: 19.0 > --- > src/compiler/Android.glsl.gen.mk | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/compiler/Android.glsl.gen.mk > b/src/compiler/Android.glsl.gen.mk > index e31eb6f101..3b94ea7bd2 100644 > --- a/src/compiler/Android.glsl.gen.mk > +++ b/src/compiler/Android.glsl.gen.mk > @@ -104,6 +104,6 @@ $(intermediates)/glsl/ir_expression_operation_strings.h: > $(LOCAL_PATH)/glsl/ir_e > @mkdir -p $(dir $@) > $(hide) $(MESA_PYTHON2) $< strings > $@ > > -$(intermediates)/compiler/glsl/float64_glsl.h: $(LOCAL_PATH)/glsl/xxd.py > +$(intermediates)/glsl/float64_glsl.h: $(LOCAL_PATH)/glsl/xxd.py > @mkdir -p $(dir $@) > $(hide) $(MESA_PYTHON2) $< $(MESA_TOP)/src/compiler/glsl/float64.glsl > $@ -n float64_source > $@ > -- > 2.19.1 > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] android: intel/isl: remove redundant building rules
Fixes the following building error: including ./external/mesa/Android.mk ... build/core/base_rules.mk:183: *** external/mesa/src/intel: MODULE.TARGET.STATIC_LIBRARIES.libmesa_isl_tiled_memcpy already defined by external/mesa/src/intel. make: *** [build/core/ninja.mk:164: out/build-android_x86_64.ninja] Error 1 ISL_TILED_MEMCPY_FILES is isl/isl_tiled_memcpy_normal.c and that source file includes isl_tiled_memcpy.c source Fixes: 96bb328 ("iris: add Android build") Signed-off-by: Mauro Rossi --- src/intel/Android.isl.mk | 13 - 1 file changed, 13 deletions(-) diff --git a/src/intel/Android.isl.mk b/src/intel/Android.isl.mk index 28944875e0..07a64b8ed1 100644 --- a/src/intel/Android.isl.mk +++ b/src/intel/Android.isl.mk @@ -198,19 +198,6 @@ LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml include $(MESA_COMMON_MK) include $(BUILD_STATIC_LIBRARY) - -# --- -# Build libmesa_isl_tiled_memcpy -# --- -include $(CLEAR_VARS) - -LOCAL_MODULE := libmesa_isl_tiled_memcpy - -LOCAL_SRC_FILES := isl/isl_tiled_memcpy.c - -include $(MESA_COMMON_MK) -include $(BUILD_STATIC_LIBRARY) - # --- # Build libmesa_isl_tiled_memcpy # --- -- 2.19.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/2] android: anv: fix generated files depedencies
Fix anv_extrypoints.{c,h} and anv_extensions.{c,h} missing dependencies Rename the variable labels according to targets and python scripts Align the building rules as per Automake for simplification Fixes building errors during rebuils due to missing dependencies Fixes: 9a508b7 ("android: anv/extensions: fix generated sources build") Fixes: dd088d4bec7 ("anv/extensions: Generate a header file with extension tables") Signed-off-by: Mauro Rossi Cc: "19.0" --- src/intel/Android.vulkan.mk | 38 +++-- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk index 04c9d5b3e4..2e99ac6294 100644 --- a/src/intel/Android.vulkan.mk +++ b/src/intel/Android.vulkan.mk @@ -23,9 +23,10 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) include $(LOCAL_PATH)/Makefile.sources -VK_ENTRYPOINTS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/vulkan/anv_entrypoints_gen.py - -VK_EXTENSIONS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/vulkan/anv_extensions_gen.py +ANV_ENTRYPOINTS_GEN_SCRIPT := $(LOCAL_PATH)/vulkan/anv_entrypoints_gen.py +ANV_EXTENSIONS_GEN_SCRIPT := $(LOCAL_PATH)/vulkan/anv_extensions_gen.py +ANV_EXTENSIONS_SCRIPT := $(LOCAL_PATH)/vulkan/anv_extensions.py +VULKAN_API_XML := $(MESA_TOP)/src/vulkan/registry/vk.xml VULKAN_COMMON_INCLUDES := \ $(MESA_TOP)/include \ @@ -64,10 +65,13 @@ $(intermediates)/vulkan/dummy.c: @echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))" $(hide) touch $@ -$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c - $(VK_ENTRYPOINTS_SCRIPT) \ +$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c \ + $(ANV_ENTRYPOINTS_GEN_SCRIPT) \ + $(ANV_EXTENSIONS_SCRIPT) \ + $(VULKAN_API_XML) + $(MESA_PYTHON2) $(ANV_ENTRYPOINTS_GEN_SCRIPT) \ --outdir $(dir $@) \ - --xml $(MESA_TOP)/src/vulkan/registry/vk.xml + --xml $(VULKAN_API_XML) LOCAL_EXPORT_C_INCLUDE_DIRS := \ $(intermediates) @@ -241,22 +245,28 @@ LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_entrypoints.c LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_extensions.c LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_extensions.h -$(intermediates)/vulkan/anv_entrypoints.c: +$(intermediates)/vulkan/anv_entrypoints.c: $(ANV_ENTRYPOINTS_GEN_SCRIPT) \ + $(ANV_EXTENSIONS_SCRIPT) \ + $(VULKAN_API_XML) @mkdir -p $(dir $@) - $(VK_ENTRYPOINTS_SCRIPT) \ + $(MESA_PYTHON2) $(ANV_ENTRYPOINTS_GEN_SCRIPT) \ --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \ --outdir $(dir $@) -$(intermediates)/vulkan/anv_extensions.c: +$(intermediates)/vulkan/anv_extensions.c: $(ANV_EXTENSIONS_GEN_SCRIPT) \ + $(ANV_EXTENSIONS_SCRIPT) \ + $(VULKAN_API_XML) @mkdir -p $(dir $@) - $(VK_EXTENSIONS_SCRIPT) \ - --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \ + $(MESA_PYTHON2) $(ANV_EXTENSIONS_GEN_SCRIPT) \ + --xml $(VULKAN_API_XML) \ --out-c $@ -$(intermediates)/vulkan/anv_extensions.h: +$(intermediates)/vulkan/anv_extensions.h: $(ANV_EXTENSIONS_GEN_SCRIPT) \ + $(ANV_EXTENSIONS_SCRIPT) \ + $(VULKAN_API_XML) @mkdir -p $(dir $@) - $(VK_EXTENSIONS_SCRIPT) \ - --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \ + $(MESA_PYTHON2) $(ANV_EXTENSIONS_GEN_SCRIPT) \ + --xml $(VULKAN_API_XML) \ --out-h $@ LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) -- 2.19.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/2] android: anv: fix libexpat shared dependency
Fixes undefined reference building errors for XML_* functions Signed-off-by: Mauro Rossi Cc: "19.0" --- src/intel/Android.vulkan.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk index 2e99ac6294..c9bce50c78 100644 --- a/src/intel/Android.vulkan.mk +++ b/src/intel/Android.vulkan.mk @@ -318,7 +318,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \ libmesa_intel_compiler \ libmesa_anv_entrypoints -LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) libz libsync liblog +LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) libexpat libz libsync liblog include $(MESA_COMMON_MK) include $(BUILD_SHARED_LIBRARY) -- 2.19.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] android, autotools: st/mesa: fix location of float64_glsl.h
Necessary to avoid building error in Android, due to 'compiler/glsl/float64_glsl.h' file not found Fixes: cb4e3e3 ("st/mesa: add support for lowering fp64/int64 for nir drivers") Signed-off-by: Mauro Rossi --- src/mesa/Android.libmesa_st_mesa.mk | 1 + src/mesa/Makefile.sources | 1 + src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/Android.libmesa_st_mesa.mk b/src/mesa/Android.libmesa_st_mesa.mk index ddfd03059c..c5b16cad34 100644 --- a/src/mesa/Android.libmesa_st_mesa.mk +++ b/src/mesa/Android.libmesa_st_mesa.mk @@ -58,6 +58,7 @@ endif LOCAL_C_INCLUDES := \ $(MESA_TOP)/src/mapi \ $(MESA_TOP)/src/mesa/main \ + $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_glsl,,) \ $(MESA_TOP)/src/compiler/nir \ $(MESA_TOP)/src/gallium/auxiliary \ $(MESA_TOP)/src/gallium/include diff --git a/src/mesa/Makefile.sources b/src/mesa/Makefile.sources index 1e25f47e50..69f32c6adf 100644 --- a/src/mesa/Makefile.sources +++ b/src/mesa/Makefile.sources @@ -689,6 +689,7 @@ INCLUDE_DIRS = \ -I$(top_srcdir)/include \ -I$(top_builddir)/src \ -I$(top_srcdir)/src \ + -I$(top_builddir)/src/compiler \ -I$(top_builddir)/src/compiler/glsl \ -I$(top_builddir)/src/compiler/nir \ -I$(top_builddir)/src/mesa \ diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index a1e3b6233c..ad77b746ab 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -48,7 +48,7 @@ #include "compiler/glsl/ir.h" #include "compiler/glsl/ir_optimization.h" #include "compiler/glsl/string_to_uint_map.h" -#include "compiler/glsl/float64_glsl.h" +#include "glsl/float64_glsl.h" static int type_size(const struct glsl_type *type) -- 2.19.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] android, autotools: st/mesa: fix location of float64_glsl.h
Hi Tapani, On Mon, Mar 4, 2019 at 6:51 AM Tapani Pälli wrote: > > Hi; > > On 3/3/19 10:10 PM, Mauro Rossi wrote: > > Necessary to avoid building error in Android, > > due to 'compiler/glsl/float64_glsl.h' file not found > > > > Fixes: cb4e3e3 ("st/mesa: add support for lowering fp64/int64 for nir > > drivers") > > Signed-off-by: Mauro Rossi > > --- > > src/mesa/Android.libmesa_st_mesa.mk | 1 + > > src/mesa/Makefile.sources | 1 + > > src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 +- > > 3 files changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/src/mesa/Android.libmesa_st_mesa.mk > > b/src/mesa/Android.libmesa_st_mesa.mk > > index ddfd03059c..c5b16cad34 100644 > > --- a/src/mesa/Android.libmesa_st_mesa.mk > > +++ b/src/mesa/Android.libmesa_st_mesa.mk > > @@ -58,6 +58,7 @@ endif > > LOCAL_C_INCLUDES := \ > > $(MESA_TOP)/src/mapi \ > > $(MESA_TOP)/src/mesa/main \ > > + $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_glsl,,) \ > > $(MESA_TOP)/src/compiler/nir \ > > $(MESA_TOP)/src/gallium/auxiliary \ > > $(MESA_TOP)/src/gallium/include > > diff --git a/src/mesa/Makefile.sources b/src/mesa/Makefile.sources > > index 1e25f47e50..69f32c6adf 100644 > > --- a/src/mesa/Makefile.sources > > +++ b/src/mesa/Makefile.sources > > @@ -689,6 +689,7 @@ INCLUDE_DIRS = \ > > -I$(top_srcdir)/include \ > > -I$(top_builddir)/src \ > > -I$(top_srcdir)/src \ > > + -I$(top_builddir)/src/compiler \ > > -I$(top_builddir)/src/compiler/glsl \ > > -I$(top_builddir)/src/compiler/nir \ > > -I$(top_builddir)/src/mesa \ > > diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp > > b/src/mesa/state_tracker/st_glsl_to_nir.cpp > > index a1e3b6233c..ad77b746ab 100644 > > --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp > > +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp > > @@ -48,7 +48,7 @@ > > #include "compiler/glsl/ir.h" > > #include "compiler/glsl/ir_optimization.h" > > #include "compiler/glsl/string_to_uint_map.h" > > -#include "compiler/glsl/float64_glsl.h" > > +#include "glsl/float64_glsl.h" > > Looks familiar :) > > https://github.com/tpalli/external-mesa/commit/ebd8581ad133206ec2b1b818e98dc4f8401af8de > > Before going further though, I'd like to understand why do we have both > 'compiler/glsl/' and 'glsl/' going on. Should we rather put the > 'compiler' back in the header generation? I can't remember the full > story behind commit c812c740e60 but that one changed this .. perhaps we > should pull it back and have the 'compiler/', any objections to that? > I agree that simply continue to have include "compiler/glsl/float64_glsl.h" in all sources places would be simpler and should not break neither autotools nor meson, which may continue to have glsl/float64_glsl.h in their generators Mauro > Thanks; > > // Tapani ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] android: anv: fix generated files depedencies (v2)
Fix anv_extrypoints.{c,h} and anv_extensions.{c,h} missing dependencies Rename the variable labels according to targets and python scripts Align the building rules as per Automake for simplification Fixes building errors during rebuils due to missing dependencies (v2) Fixed a missing $(VULKAN_API_XML) reference Fixes: 9a508b7 ("android: anv/extensions: fix generated sources build") Fixes: dd088d4bec7 ("anv/extensions: Generate a header file with extension tables") Signed-off-by: Mauro Rossi Cc: "19.0" --- src/intel/Android.vulkan.mk | 40 +++-- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk index 04c9d5b3e4..9fdb8debf2 100644 --- a/src/intel/Android.vulkan.mk +++ b/src/intel/Android.vulkan.mk @@ -23,9 +23,10 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) include $(LOCAL_PATH)/Makefile.sources -VK_ENTRYPOINTS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/vulkan/anv_entrypoints_gen.py - -VK_EXTENSIONS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/vulkan/anv_extensions_gen.py +ANV_ENTRYPOINTS_GEN_SCRIPT := $(LOCAL_PATH)/vulkan/anv_entrypoints_gen.py +ANV_EXTENSIONS_GEN_SCRIPT := $(LOCAL_PATH)/vulkan/anv_extensions_gen.py +ANV_EXTENSIONS_SCRIPT := $(LOCAL_PATH)/vulkan/anv_extensions.py +VULKAN_API_XML := $(MESA_TOP)/src/vulkan/registry/vk.xml VULKAN_COMMON_INCLUDES := \ $(MESA_TOP)/include \ @@ -64,10 +65,13 @@ $(intermediates)/vulkan/dummy.c: @echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))" $(hide) touch $@ -$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c - $(VK_ENTRYPOINTS_SCRIPT) \ +$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c \ + $(ANV_ENTRYPOINTS_GEN_SCRIPT) \ + $(ANV_EXTENSIONS_SCRIPT) \ + $(VULKAN_API_XML) + $(MESA_PYTHON2) $(ANV_ENTRYPOINTS_GEN_SCRIPT) \ --outdir $(dir $@) \ - --xml $(MESA_TOP)/src/vulkan/registry/vk.xml + --xml $(VULKAN_API_XML) LOCAL_EXPORT_C_INCLUDE_DIRS := \ $(intermediates) @@ -241,22 +245,28 @@ LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_entrypoints.c LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_extensions.c LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_extensions.h -$(intermediates)/vulkan/anv_entrypoints.c: +$(intermediates)/vulkan/anv_entrypoints.c: $(ANV_ENTRYPOINTS_GEN_SCRIPT) \ + $(ANV_EXTENSIONS_SCRIPT) \ + $(VULKAN_API_XML) @mkdir -p $(dir $@) - $(VK_ENTRYPOINTS_SCRIPT) \ - --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \ + $(MESA_PYTHON2) $(ANV_ENTRYPOINTS_GEN_SCRIPT) \ + --xml $(VULKAN_API_XML) \ --outdir $(dir $@) -$(intermediates)/vulkan/anv_extensions.c: +$(intermediates)/vulkan/anv_extensions.c: $(ANV_EXTENSIONS_GEN_SCRIPT) \ + $(ANV_EXTENSIONS_SCRIPT) \ + $(VULKAN_API_XML) @mkdir -p $(dir $@) - $(VK_EXTENSIONS_SCRIPT) \ - --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \ + $(MESA_PYTHON2) $(ANV_EXTENSIONS_GEN_SCRIPT) \ + --xml $(VULKAN_API_XML) \ --out-c $@ -$(intermediates)/vulkan/anv_extensions.h: +$(intermediates)/vulkan/anv_extensions.h: $(ANV_EXTENSIONS_GEN_SCRIPT) \ + $(ANV_EXTENSIONS_SCRIPT) \ + $(VULKAN_API_XML) @mkdir -p $(dir $@) - $(VK_EXTENSIONS_SCRIPT) \ - --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \ + $(MESA_PYTHON2) $(ANV_EXTENSIONS_GEN_SCRIPT) \ + --xml $(VULKAN_API_XML) \ --out-h $@ LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) -- 2.19.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] android, autotools: st/mesa: fix location of float64_glsl.h
Hi, Sounds good to me. The way it could have been prevented was to avoid having fp64 generated file as the only one with with different path in sources. Could you just confirm that inc_compiler is not needed in src/mesa/meson.build, and provide R-b so that I will proceed with push? I've tried to build with meson and it's ok Il lun 4 mar 2019, 18:59 Dylan Baker ha scritto: > Quoting Mauro Rossi (2019-03-04 01:21:05) > > Hi Tapani, > > On Mon, Mar 4, 2019 at 6:51 AM Tapani Pälli > wrote: > > > > > > Hi; > > > > > > On 3/3/19 10:10 PM, Mauro Rossi wrote: > > > > Necessary to avoid building error in Android, > > > > due to 'compiler/glsl/float64_glsl.h' file not found > > > > > > > > Fixes: cb4e3e3 ("st/mesa: add support for lowering fp64/int64 for > nir drivers") > > > > Signed-off-by: Mauro Rossi > > > > --- > > > > src/mesa/Android.libmesa_st_mesa.mk | 1 + > > > > src/mesa/Makefile.sources | 1 + > > > > src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 +- > > > > 3 files changed, 3 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/src/mesa/Android.libmesa_st_mesa.mk b/src/mesa/ > Android.libmesa_st_mesa.mk > > > > index ddfd03059c..c5b16cad34 100644 > > > > --- a/src/mesa/Android.libmesa_st_mesa.mk > > > > +++ b/src/mesa/Android.libmesa_st_mesa.mk > > > > @@ -58,6 +58,7 @@ endif > > > > LOCAL_C_INCLUDES := \ > > > > $(MESA_TOP)/src/mapi \ > > > > $(MESA_TOP)/src/mesa/main \ > > > > + $(call > generated-sources-dir-for,STATIC_LIBRARIES,libmesa_glsl,,) \ > > > > $(MESA_TOP)/src/compiler/nir \ > > > > $(MESA_TOP)/src/gallium/auxiliary \ > > > > $(MESA_TOP)/src/gallium/include > > > > diff --git a/src/mesa/Makefile.sources b/src/mesa/Makefile.sources > > > > index 1e25f47e50..69f32c6adf 100644 > > > > --- a/src/mesa/Makefile.sources > > > > +++ b/src/mesa/Makefile.sources > > > > @@ -689,6 +689,7 @@ INCLUDE_DIRS = \ > > > > -I$(top_srcdir)/include \ > > > > -I$(top_builddir)/src \ > > > > -I$(top_srcdir)/src \ > > > > + -I$(top_builddir)/src/compiler \ > > > > -I$(top_builddir)/src/compiler/glsl \ > > > > -I$(top_builddir)/src/compiler/nir \ > > > > -I$(top_builddir)/src/mesa \ > > > > diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp > b/src/mesa/state_tracker/st_glsl_to_nir.cpp > > > > index a1e3b6233c..ad77b746ab 100644 > > > > --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp > > > > +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp > > > > @@ -48,7 +48,7 @@ > > > > #include "compiler/glsl/ir.h" > > > > #include "compiler/glsl/ir_optimization.h" > > > > #include "compiler/glsl/string_to_uint_map.h" > > > > -#include "compiler/glsl/float64_glsl.h" > > > > +#include "glsl/float64_glsl.h" > > > > > > Looks familiar :) > > > > > > > https://github.com/tpalli/external-mesa/commit/ebd8581ad133206ec2b1b818e98dc4f8401af8de > > > > > > Before going further though, I'd like to understand why do we have both > > > 'compiler/glsl/' and 'glsl/' going on. Should we rather put the > > > 'compiler' back in the header generation? I can't remember the full > > > story behind commit c812c740e60 but that one changed this .. perhaps we > > > should pull it back and have the 'compiler/', any objections to that? > > > > > > > I agree that simply continue to have include > "compiler/glsl/float64_glsl.h" > > in all sources places would be simpler > > and should not break neither autotools nor meson, > > which may continue to have glsl/float64_glsl.h in their generators > > > > Mauro > > I wrote c812, and I'd be very happy to revert it. The problem that I ran > into > was putting it in a place that android, meson, and the autotools dist > tarball > were happy with. I'm hoping that we can remove autotools in the very near > future > and just revert c812 at that time. Does that seem like a reasonable > solution? > > Dylan > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] android, autotools: st/mesa: fix location of float64_glsl.h
Hi, On Mon, Mar 4, 2019 at 7:50 PM Mauro Rossi wrote: > > Hi, > Sounds good to me. > > The way it could have been prevented was to avoid having fp64 generated file > as the only one with with different path in sources. > > Could you just confirm that inc_compiler is not needed in > src/mesa/meson.build, and provide R-b so that I will proceed with push? > > I've tried to build with meson and it's ok > > Il lun 4 mar 2019, 18:59 Dylan Baker ha scritto: >> >> Quoting Mauro Rossi (2019-03-04 01:21:05) >> > Hi Tapani, >> > On Mon, Mar 4, 2019 at 6:51 AM Tapani Pälli wrote: >> > > >> > > Hi; >> > > >> > > On 3/3/19 10:10 PM, Mauro Rossi wrote: >> > > > Necessary to avoid building error in Android, >> > > > due to 'compiler/glsl/float64_glsl.h' file not found >> > > > >> > > > Fixes: cb4e3e3 ("st/mesa: add support for lowering fp64/int64 for nir >> > > > drivers") >> > > > Signed-off-by: Mauro Rossi >> > > > --- >> > > > src/mesa/Android.libmesa_st_mesa.mk | 1 + >> > > > src/mesa/Makefile.sources | 1 + >> > > > src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 +- >> > > > 3 files changed, 3 insertions(+), 1 deletion(-) >> > > > >> > > > diff --git a/src/mesa/Android.libmesa_st_mesa.mk >> > > > b/src/mesa/Android.libmesa_st_mesa.mk >> > > > index ddfd03059c..c5b16cad34 100644 >> > > > --- a/src/mesa/Android.libmesa_st_mesa.mk >> > > > +++ b/src/mesa/Android.libmesa_st_mesa.mk >> > > > @@ -58,6 +58,7 @@ endif >> > > > LOCAL_C_INCLUDES := \ >> > > > $(MESA_TOP)/src/mapi \ >> > > > $(MESA_TOP)/src/mesa/main \ >> > > > + $(call >> > > > generated-sources-dir-for,STATIC_LIBRARIES,libmesa_glsl,,) \ >> > > > $(MESA_TOP)/src/compiler/nir \ >> > > > $(MESA_TOP)/src/gallium/auxiliary \ >> > > > $(MESA_TOP)/src/gallium/include >> > > > diff --git a/src/mesa/Makefile.sources b/src/mesa/Makefile.sources >> > > > index 1e25f47e50..69f32c6adf 100644 >> > > > --- a/src/mesa/Makefile.sources >> > > > +++ b/src/mesa/Makefile.sources >> > > > @@ -689,6 +689,7 @@ INCLUDE_DIRS = \ >> > > > -I$(top_srcdir)/include \ >> > > > -I$(top_builddir)/src \ >> > > > -I$(top_srcdir)/src \ >> > > > + -I$(top_builddir)/src/compiler \ >> > > > -I$(top_builddir)/src/compiler/glsl \ >> > > > -I$(top_builddir)/src/compiler/nir \ >> > > > -I$(top_builddir)/src/mesa \ >> > > > diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp >> > > > b/src/mesa/state_tracker/st_glsl_to_nir.cpp >> > > > index a1e3b6233c..ad77b746ab 100644 >> > > > --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp >> > > > +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp >> > > > @@ -48,7 +48,7 @@ >> > > > #include "compiler/glsl/ir.h" >> > > > #include "compiler/glsl/ir_optimization.h" >> > > > #include "compiler/glsl/string_to_uint_map.h" >> > > > -#include "compiler/glsl/float64_glsl.h" >> > > > +#include "glsl/float64_glsl.h" >> > > >> > > Looks familiar :) >> > > >> > > https://github.com/tpalli/external-mesa/commit/ebd8581ad133206ec2b1b818e98dc4f8401af8de >> > > >> > > Before going further though, I'd like to understand why do we have both >> > > 'compiler/glsl/' and 'glsl/' going on. Should we rather put the >> > > 'compiler' back in the header generation? I can't remember the full >> > > story behind commit c812c740e60 but that one changed this .. perhaps we >> > > should pull it back and have the 'compiler/', any objections to that? >> > > >> > >> > I agree that simply continue to have include "compiler/glsl/float64_glsl.h" >> > in all sources places would be simpler >> > and should not break neither autotools nor meson, >> > which may continue to have glsl/float64_glsl.h in their generators >> > >> > Mauro >> >> I wrote c812, and I'd be very happy to revert it. The problem that I ran into >> was putting it in a place that android, meson, and the autotools dist tarball >> were happy with. I'm hoping that we can remove autotools in the very near >> future >> and just revert c812 at that time. Does that seem like a reasonable solution? >> >> Dylan Hi Dylan, I have checked on Android.mk and reverting you commit c812c740e6 would be very complex. The best way is to proceed now is with my patch to un-break the Android build Then as a reference, the future solution may require chages to sources: #include "compiler/glsl/{header}.h" to become #include "glsl/{header}.h" in order to reach the Android generated files with $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_glsl,,) as equivalent of -I$(top_builddir)/src/compiler Mauro ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] android, autotools: st/mesa: fix location of float64_glsl.h
Hi Jordan, On Wed, Mar 6, 2019 at 10:01 PM Jordan Justen wrote: > > On 2019-03-04 16:11:33, Jordan Justen wrote: > > On 2019-03-04 15:21:26, Mauro Rossi wrote: > > > Hi, > > > On Mon, Mar 4, 2019 at 7:50 PM Mauro Rossi wrote: > > > > > > > > Il lun 4 mar 2019, 18:59 Dylan Baker ha scritto: > > > >> > > > >> I wrote c812, and I'd be very happy to revert it. The problem that I > > > >> ran into > > > >> was putting it in a place that android, meson, and the autotools dist > > > >> tarball > > > >> were happy with. I'm hoping that we can remove autotools in the very > > > >> near future > > > >> and just revert c812 at that time. Does that seem like a reasonable > > > >> solution? > > > >> > > > >> Dylan > > > > > > Hi Dylan, > > > I have checked on Android.mk and reverting you commit c812c740e6 > > > would be very complex. > > > > > > The best way is to proceed now is with my patch to un-break the Android > > > build > > > > > > Then as a reference, the future solution may require chages to sources: > > > > > > #include "compiler/glsl/{header}.h" > > > to become > > > #include "glsl/{header}.h" > > > > > > in order to reach the Android generated files with > > > $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_glsl,,) > > > as equivalent of -I$(top_builddir)/src/compiler > > > > Just wanted to point out that Jason is moving this under glsl in: > > > > https://gitlab.freedesktop.org/mesa/mesa/merge_requests/371 > > Mauro, > > Jason pushed MR 371 in 9ab1b1d0227499b7ff6a61fdebe75693212a67f5. > > > So, either that will fix this, or else cause it to break in a new, > > different way. :) > > Which was it? :) > > -Jordan The android build is ok for me, without need for android, autotools patch I tested also build of iris Mauro ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] Building error in android-x86 due to recent mesa commit
Hi Marek, I'm getting the following building error after commit [1] but I don't understand why. Mauro external/mesa/src/gallium/drivers/radeonsi/si_compute.c:807:8: error: initializing 'uint *' (aka 'unsigned int *') with an expression of type 'uint const[3]' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] uint *last_block = info->last_block; ^ 1 error generated. [1] https://cgit.freedesktop.org/mesa/mesa/commit/?id=b9e02fe138ef181f02fd739129517fbe70604af6 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] Building error in android-x86 due to recent mesa commit
Hi Bas, many thanks Mauro On Sat, Mar 16, 2019 at 11:02 PM Bas Nieuwenhuizen wrote: > > Should be fixed when > > https://gitlab.freedesktop.org/mesa/mesa/merge_requests/456 > > is merged. > > On Sat, Mar 16, 2019 at 10:16 PM Mauro Rossi wrote: > > > > Hi Marek, > > > > I'm getting the following building error after commit [1] > > but I don't understand why. > > > > Mauro > > > > external/mesa/src/gallium/drivers/radeonsi/si_compute.c:807:8: error: > > initializing 'uint *' (aka 'unsigned int *') with an expression of > > type 'uint const[3]' discards qualifiers > > [-Werror,-Wincompatible-pointer-types-discards-qualifiers] > > uint *last_block = info->last_block; > > ^ > > 1 error generated. > > > > > > [1] > > https://cgit.freedesktop.org/mesa/mesa/commit/?id=b9e02fe138ef181f02fd739129517fbe70604af6 > > ___ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] android: nouveau: add support for nir
Add the necessary build rules for android, to avoid building errors. Fixes: f014ae3 ("nouveau: add support for nir") Signed-off-by: Mauro Rossi --- src/gallium/drivers/nouveau/Android.mk | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/Android.mk b/src/gallium/drivers/nouveau/Android.mk index cd2dd0938f..49a341c831 100644 --- a/src/gallium/drivers/nouveau/Android.mk +++ b/src/gallium/drivers/nouveau/Android.mk @@ -37,8 +37,13 @@ LOCAL_SRC_FILES := \ $(NVC0_C_SOURCES) LOCAL_C_INCLUDES := \ - $(MESA_TOP)/include + $(MESA_TOP)/include \ + $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir \ + $(MESA_TOP)/src/compiler/nir \ + $(MESA_TOP)/src/mapi \ + $(MESA_TOP)/src/mesa +LOCAL_STATIC_LIBRARIES := libmesa_nir LOCAL_SHARED_LIBRARIES := libdrm_nouveau LOCAL_MODULE := libmesa_pipe_nouveau -- 2.19.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] android: nouveau: add support for nir
Hi Karol, On Sun, Mar 17, 2019 at 11:25 PM Karol Herbst wrote: > > On Sun, Mar 17, 2019 at 10:52 PM Mauro Rossi wrote: > > > > Add the necessary build rules for android, to avoid building errors. > > > > Fixes: f014ae3 ("nouveau: add support for nir") > > Signed-off-by: Mauro Rossi > > --- > > src/gallium/drivers/nouveau/Android.mk | 7 ++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/src/gallium/drivers/nouveau/Android.mk > > b/src/gallium/drivers/nouveau/Android.mk > > index cd2dd0938f..49a341c831 100644 > > --- a/src/gallium/drivers/nouveau/Android.mk > > +++ b/src/gallium/drivers/nouveau/Android.mk > > @@ -37,8 +37,13 @@ LOCAL_SRC_FILES := \ > > $(NVC0_C_SOURCES) > > > > LOCAL_C_INCLUDES := \ > > - $(MESA_TOP)/include > > + $(MESA_TOP)/include \ > > + $(call > > generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir \ > > + $(MESA_TOP)/src/compiler/nir \ > > + $(MESA_TOP)/src/mapi \ > > + $(MESA_TOP)/src/mesa > > do we really have to add all those includes? freedreno doesn't seem to > add those either and just has the libmesa_nir dependency Hi Karol, the first build error "main/config.h" not found was caused by $(MESA_TOP)/src/mesa missing, then I did not chased the others, I replicated with fidelity your Autotools build rules as I've always been instructed this way by Emil Velikov The patch is working and Android booting on GTX950 with the patch KR Mauro > > > > > +LOCAL_STATIC_LIBRARIES := libmesa_nir > > LOCAL_SHARED_LIBRARIES := libdrm_nouveau > > LOCAL_MODULE := libmesa_pipe_nouveau > > > > -- > > 2.19.1 > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] android: add support for sid_tables.h generated sources
This patch is necessary to avoid building error on android, due to missing sid_tables.h generated sources --- src/gallium/drivers/radeonsi/Android.mk | 13 - src/gallium/drivers/radeonsi/Makefile.sources | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/Android.mk b/src/gallium/drivers/radeonsi/Android.mk index 57f3bef..7e5e54b 100644 --- a/src/gallium/drivers/radeonsi/Android.mk +++ b/src/gallium/drivers/radeonsi/Android.mk @@ -23,7 +23,7 @@ LOCAL_PATH := $(call my-dir) -# get C_SOURCES +# get C_SOURCES and GENERATED_SOURCES include $(LOCAL_PATH)/Makefile.sources include $(CLEAR_VARS) @@ -33,5 +33,16 @@ LOCAL_SRC_FILES := $(C_SOURCES) LOCAL_SHARED_LIBRARIES := libdrm libdrm_radeon LOCAL_MODULE := libmesa_pipe_radeonsi +# generate sources +LOCAL_MODULE_CLASS := STATIC_LIBRARIES +intermediates := $(call local-generated-sources-dir) +LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, $(GENERATED_SOURCES)) + +$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2) +$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ > $@ + +$(intermediates)/sid_tables.h: $(intermediates)/%.h: $(LOCAL_PATH)/%.py $(LOCAL_PATH)/sid.h + $(transform-generated-source) + include $(GALLIUM_COMMON_MK) include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/drivers/radeonsi/Makefile.sources b/src/gallium/drivers/radeonsi/Makefile.sources index 5f5eac1..20a9eef 100644 --- a/src/gallium/drivers/radeonsi/Makefile.sources +++ b/src/gallium/drivers/radeonsi/Makefile.sources @@ -21,3 +21,6 @@ C_SOURCES := \ si_state_shaders.c \ si_state.h \ si_uvd.c + +GENERATED_SOURCES := \ + sid_tables.h -- 2.1.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] android: radeonsi: fix sid_tables.h missing LOCAL_MODULE_CLASS
--- src/gallium/drivers/radeonsi/Android.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/radeonsi/Android.mk b/src/gallium/drivers/radeonsi/Android.mk index b469aca..7e5e54b 100644 --- a/src/gallium/drivers/radeonsi/Android.mk +++ b/src/gallium/drivers/radeonsi/Android.mk @@ -34,6 +34,7 @@ LOCAL_SHARED_LIBRARIES := libdrm libdrm_radeon LOCAL_MODULE := libmesa_pipe_radeonsi # generate sources +LOCAL_MODULE_CLASS := STATIC_LIBRARIES intermediates := $(call local-generated-sources-dir) LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, $(GENERATED_SOURCES)) -- 2.1.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] android: fix shader_enums.c building error
Android.mk in src/mesa/program folder needs an adjustement, because shader_enums.c can only be found in the relative path ../../glsl/shader_enums.c --- src/mesa/program/Android.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/program/Android.mk b/src/mesa/program/Android.mk index ccb0fa5..bcb0ed1 100644 --- a/src/mesa/program/Android.mk +++ b/src/mesa/program/Android.mk @@ -56,7 +56,7 @@ generated_sources_basenames := \ program_parse.tab.h LOCAL_SRC_FILES := \ - $(filter-out $(generated_sources_basenames),$(subst program/,,$(PROGRAM_FILES))) \ + $(filter-out $(generated_sources_basenames),$(subst ../glsl/,../../glsl/,$(subst program/,,$(PROGRAM_FILES \ $(subst program/,,$(PROGRAM_NIR_FILES)) LOCAL_GENERATED_SOURCES := \ -- 2.1.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] Pending issues of lollipop-x86
Hi, Marek's patches solved Camera and Youtube crashes on nouveau and radeonsi. I'm available to test on i965, if needed I think at this point the remaining major problem for lollipop-x86 is the font artifacts/invisible chars on i965GM (X3100) still present in mesa 11.0.0, I need to check with 11.0.1 Mauro 2015-09-25 23:03 GMT+02:00 Marek Olšák : > Guys, can you please try these patches? They should fix it for gallium > drivers (not i965). > > Marek > > On Fri, Sep 25, 2015 at 10:35 PM, Marek Olšák wrote: > > On Fri, Sep 25, 2015 at 5:43 PM, Chih-Wei Huang > wrote: > >> CC to mesa-dev for help. > >> > >> 2015-09-25 22:12 GMT+08:00 Chih-Wei Huang : > >>> 2015-09-25 16:21 GMT+08:00 Chih-Wei Huang : > Actually I'm testing your mesa 11.0 branch > to see if it is acceptable. > The major issue I found is the > Camera and Youtube crashing in mesa. > >>> > >>> OK, I can almost confirm this is a known issue > >>> I reported to mesa devs before. > >>> It is caused by this commit: > >>> > >>> commit c636284ee8ee95bb3f3ad31aaf26a9512ec5006c > >>> Author: Chad Versace > >>> Date: Tue May 5 19:05:32 2015 -0700 > >>> > >>> i965/sync: Implement DRI2_Fence extension > >>> > >>> By reverting it the crashing is gone. > >>> > >>> However, I still hope we can find > >>> a correct fix. > >> > >> After some debugging, it crashed in > >> dri2_client_wait_sync() of > >> ...src/egl/drivers/dri2/egl_dri2.c > >> The ctx returned by _eglGetCurrentContext() > >> is NULL. > >> > >> static EGLint > >> dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, > >> EGLint flags, EGLTime timeout) > >> { > >>_EGLContext *ctx = _eglGetCurrentContext(); > >> > >> ==> ctx is NULL > >> > >>if (dri2_dpy->fence->client_wait_sync(dri2_ctx->dri_context, <== > OOPS! > >> dri2_sync->fence, wait_flags, > >> timeout)) > >> > >> > >> Why does _eglGetCurrentContext() return NULL? > > > > Yes, we should fix this. A context isn't required here. > > > > Marek > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] Announcement: 5 patches to fix building errors with android-x86
Hi all, I'm about to submit the following patches to mesa-dev ML for review: [PATCH 1/5] android: libmesa_st_mesa: use SSE4.1 optimizations [PATCH 2/5] android: radeonsi: fix building error in si_shader.c [PATCH 3/5] android: nouveau_vp3_video_bsp: wrap assertion within #ifndef NDEBUG [PATCH 4/5] android: fix building with new glsl, nir, compiler libraries [PATCH 5/5] android: add support for virgl vtest Each patch addresses a building problem with android-x86 The only dependency between the patches is that [4/5] needs to be applied on top of [1/5] If, for any reason, you need some changes, please just let me know. Kind regards Mauro Rossi ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 4/5] android: fix building with new glsl, nir, compiler libraries
This android specific patch solves several building errors introduced by commit that moved glsl to src/compiler/ folder and fixes also the building errors due to nir and compiler carve out from old libmesa_glsl. Here follows the changelog: the now non-existent src/glsl subfolder was removed from ./Android.mk compiler/Android.mk was updated to invoke compiler/glsl/Android.mk proper includes were set to account for new compiler/glsl folder per each target that depended on the old libmesa_glsl static, dependencies were checked and updated according to the new libmesa_glsl, libmesa_nir and libmesa_compiler static libraries --- Android.mk | 1 - src/compiler/Android.mk | 6 ++ src/compiler/glsl/Android.gen.mk | 2 +- src/compiler/glsl/Android.mk | 5 ++--- src/gallium/auxiliary/Android.mk | 4 ++-- src/gallium/drivers/freedreno/Android.mk | 2 +- src/gallium/drivers/r300/Android.mk | 2 +- src/gallium/drivers/vc4/Android.mk | 4 ++-- src/gallium/targets/dri/Android.mk | 2 ++ src/mesa/Android.libmesa_glsl_utils.mk | 4 ++-- src/mesa/Android.libmesa_st_mesa.mk | 2 +- src/mesa/Android.mesa_gen_matypes.mk | 2 +- src/mesa/drivers/dri/Android.mk | 2 ++ src/mesa/program/Android.mk | 4 ++-- 14 files changed, 25 insertions(+), 17 deletions(-) diff --git a/Android.mk b/Android.mk index 908078a..3573bdf 100644 --- a/Android.mk +++ b/Android.mk @@ -87,7 +87,6 @@ SUBDIRS := \ src/loader \ src/mapi \ src/compiler \ - src/glsl \ src/mesa \ src/util \ src/egl \ diff --git a/src/compiler/Android.mk b/src/compiler/Android.mk index 888780b..935dbc8 100644 --- a/src/compiler/Android.mk +++ b/src/compiler/Android.mk @@ -65,3 +65,9 @@ LOCAL_MODULE := libmesa_nir include $(LOCAL_PATH)/Android.gen.mk include $(MESA_COMMON_MK) include $(BUILD_STATIC_LIBRARY) + +# --- +# Build libmesa_glsl and glsl_compiler +# --- + +include $(LOCAL_PATH)/glsl/Android.mk diff --git a/src/compiler/glsl/Android.gen.mk b/src/compiler/glsl/Android.gen.mk index c5741b4..b57b55e 100644 --- a/src/compiler/glsl/Android.gen.mk +++ b/src/compiler/glsl/Android.gen.mk @@ -33,7 +33,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) LOCAL_C_INCLUDES += \ $(intermediates)/glcpp \ - $(MESA_TOP)/src/glsl/glcpp \ + $(MESA_TOP)/src/compiler/glsl/glcpp \ LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \ $(LIBGLCPP_GENERATED_FILES) \ diff --git a/src/compiler/glsl/Android.mk b/src/compiler/glsl/Android.mk index 9cbb9a3..e5f2f22 100644 --- a/src/compiler/glsl/Android.mk +++ b/src/compiler/glsl/Android.mk @@ -35,8 +35,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := \ $(LIBGLCPP_FILES) \ - $(LIBGLSL_FILES) \ - $(NIR_FILES) + $(LIBGLSL_FILES) LOCAL_C_INCLUDES := \ $(MESA_TOP)/src/mapi \ @@ -67,7 +66,7 @@ LOCAL_C_INCLUDES := \ $(MESA_TOP)/src/gallium/include \ $(MESA_TOP)/src/gallium/auxiliary -LOCAL_STATIC_LIBRARIES := libmesa_glsl libmesa_glsl_utils libmesa_util +LOCAL_STATIC_LIBRARIES := libmesa_glsl libmesa_compiler libmesa_glsl_utils libmesa_util LOCAL_MODULE_TAGS := eng LOCAL_MODULE := glsl_compiler diff --git a/src/gallium/auxiliary/Android.mk b/src/gallium/auxiliary/Android.mk index 86430eb..9255a7e 100644 --- a/src/gallium/auxiliary/Android.mk +++ b/src/gallium/auxiliary/Android.mk @@ -44,9 +44,9 @@ LOCAL_SRC_FILES += \ LOCAL_CPPFLAGS := -std=c++11 endif -# We need libmesa_glsl to get NIR's generated include directories. +# We need libmesa_nir to get NIR's generated include directories. LOCAL_MODULE := libmesa_gallium -LOCAL_STATIC_LIBRARIES += libmesa_glsl +LOCAL_STATIC_LIBRARIES += libmesa_nir # generate sources LOCAL_MODULE_CLASS := STATIC_LIBRARIES diff --git a/src/gallium/drivers/freedreno/Android.mk b/src/gallium/drivers/freedreno/Android.mk index ed51835..3eb412f 100644 --- a/src/gallium/drivers/freedreno/Android.mk +++ b/src/gallium/drivers/freedreno/Android.mk @@ -39,7 +39,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/ir3 LOCAL_SHARED_LIBRARIES := libdrm libdrm_freedreno -LOCAL_STATIC_LIBRARIES := libmesa_glsl +LOCAL_STATIC_LIBRARIES := libmesa_glsl libmesa_nir LOCAL_MODULE := libmesa_pipe_freedreno include $(GALLIUM_COMMON_MK) diff --git a/src/gallium/drivers/r300/Android.mk b/src/gallium/drivers/r300/Android.mk index 7ff4f86..06c7714 100644 --- a/src/gallium/drivers/r300/Android.mk +++ b/src/gallium/drivers/r300/Android.mk @@ -32,7 +32,7 @@ LOCAL_SRC_FILES := $(C_SOURCES) LOCAL_C_INCLUDES := \ $(MESA_TOP)/src/mapi \ - $(MESA_TOP)/src/glsl \ + $(MESA_TOP)/src/compiler/glsl \ $(MESA_TOP)/src/mesa diff --git a/src/gallium/drivers/vc4/Android.mk b/src/gallium/drivers/vc4/Android.mk index f42a152..1f4d49a 100644 --- a/src/gallium/drivers/vc4/Androi
[Mesa-dev] [PATCH 1/5] android: libmesa_st_mesa: use SSE4.1 optimizations
The new building rules for x86_64 target in marshallow have by default ARCH_X86_HAVE_SSE4_1 := true This triggered a linking issue when building gallium_dri, because libmesa_st_mesa is used as static library, but the SSE4.1 optimizations are only built with libmesa_dricore. This solution allows to avoid the linking issue and to optimize libmesa_st_mesa with SSE4.1 functions, when applicable for x86_86 target of marshmallow. --- src/mesa/Android.libmesa_st_mesa.mk | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/Android.libmesa_st_mesa.mk b/src/mesa/Android.libmesa_st_mesa.mk index ee8887b..49e81a5 100644 --- a/src/mesa/Android.libmesa_st_mesa.mk +++ b/src/mesa/Android.libmesa_st_mesa.mk @@ -47,7 +47,11 @@ endif # x86 endif # MESA_ENABLE_ASM ifeq ($(ARCH_X86_HAVE_SSE4_1),true) +LOCAL_SRC_FILES += \ + main/streaming-load-memcpy.c \ + main/sse_minmax.c LOCAL_CFLAGS := \ + -msse4.1 \ -DUSE_SSE41 endif -- 2.5.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 5/5] android: add support for virgl vtest
These changes are needed to avoid the following building error: external/mesa/src/gallium/auxiliary/target-helpers/sw_helper.h:41: error: undefined reference to 'virgl_vtest_winsys_wrap' collect2: error: ld returned 1 exit status build/core/shared_library_internal.mk:80: recipe for target 'out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so' failed make: *** [out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so] Error 1 make: *** Waiting for unfinished jobs --- src/gallium/Android.mk| 2 +- src/gallium/targets/dri/Android.mk| 2 +- src/gallium/winsys/virgl/vtest/Android.mk | 33 +++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 src/gallium/winsys/virgl/vtest/Android.mk diff --git a/src/gallium/Android.mk b/src/gallium/Android.mk index 749be7d..2b469b6 100644 --- a/src/gallium/Android.mk +++ b/src/gallium/Android.mk @@ -85,7 +85,7 @@ endif # virgl ifneq ($(filter virgl, $(MESA_GPU_DRIVERS)),) -SUBDIRS += winsys/virgl/drm drivers/virgl +SUBDIRS += winsys/virgl/drm winsys/virgl/vtest drivers/virgl endif # vmwgfx diff --git a/src/gallium/targets/dri/Android.mk b/src/gallium/targets/dri/Android.mk index 0c59704..7761011 100644 --- a/src/gallium/targets/dri/Android.mk +++ b/src/gallium/targets/dri/Android.mk @@ -94,7 +94,7 @@ gallium_DRIVERS += libmesa_winsys_vc4 libmesa_pipe_vc4 endif ifneq ($(filter virgl,$(MESA_GPU_DRIVERS)),) LOCAL_CFLAGS += -DGALLIUM_VIRGL -gallium_DRIVERS += libmesa_winsys_virgl libmesa_pipe_virgl +gallium_DRIVERS += libmesa_winsys_virgl libmesa_virgl_vtest libmesa_pipe_virgl endif ifneq ($(filter vmwgfx,$(MESA_GPU_DRIVERS)),) gallium_DRIVERS += libmesa_winsys_svga libmesa_pipe_svga diff --git a/src/gallium/winsys/virgl/vtest/Android.mk b/src/gallium/winsys/virgl/vtest/Android.mk new file mode 100644 index 000..26c1c26 --- /dev/null +++ b/src/gallium/winsys/virgl/vtest/Android.mk @@ -0,0 +1,33 @@ +# 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_MODULE := libmesa_virgl_vtest + +include $(GALLIUM_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) -- 2.5.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/5] android: nouveau_vp3_video_bsp: wrap assertion within #ifndef NDEBUG
The change is necessary to avoid the following building error in android: external/mesa/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c: In function 'nouveau_vp3_bsp_next': external/mesa/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c:269:14: error: 'bsp_bo' undeclared (first use in this function) assert(bsp_bo->size >= str_bsp->w0[0] + num_bytes[i]); ^ build/core/binary.mk:801: recipe for target 'out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_nouveau_intermediates/nouveau_vp3_video_bsp.o' failed make: *** [out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_nouveau_intermediates/nouveau_vp3_video_bsp.o] Error 1 make: *** Waiting for unfinished jobs --- src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c b/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c index a3d07de..c6c287b 100644 --- a/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c +++ b/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c @@ -266,7 +266,9 @@ nouveau_vp3_bsp_next(struct nouveau_vp3_decoder *dec, unsigned num_buffers, int i; for (i = 0; i < num_buffers; ++i) { +#ifndef NDEBUG assert(bsp_bo->size >= str_bsp->w0[0] + num_bytes[i]); +#endif memcpy(dec->bsp_ptr, data[i], num_bytes[i]); dec->bsp_ptr += num_bytes[i]; str_bsp->w0[0] += num_bytes[i]; -- 2.5.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/5] android: radeonsi: fix building error in si_shader.c
Bionic does not support strchrnul() function, causing the following building error: external/mesa/src/gallium/drivers/radeonsi/si_shader.c:3863: error: undefined reference to 'strchrnul' collect2: error: ld returned 1 exit status This patch embeds the code of strchrnul() in si_shader.c, in the same way described here: http://lists.freedesktop.org/archives/piglit/2013-February/004798.html --- src/gallium/drivers/radeonsi/si_shader.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 2192b21..3717cfa 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -49,6 +49,24 @@ #include +#if defined(__ANDROID__) +/* + * Android Bionic has no strchrnul, which is used in si_shader_dump_disassembly(), + * so we must fill in an implementation. + */ +char * +strchrnul(const char *s, int c) +{ + char * result = strchr(s, c); + + if (result == NULL) { + result = s + strlen(s); + } + + return result; +} +#endif /* __ANDROID__ */ + static const char *scratch_rsrc_dword0_symbol = "SCRATCH_RSRC_DWORD0"; -- 2.5.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [android-x86-devel] Announcement: 5 patches to fix building errors with android-x86
> I've submitted similar set to mesa list on Friday. 1, 2, 4, and 5 > appear to be similar. > > Rob Thanks Rob, I need to watch more carefully the mesa-dev archives next time M. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [android-x86-devel] [PATCH 4/5] android: fix building with new glsl, nir, compiler libraries
Hi, > per each target that depended on the old libmesa_glsl static, > > dependencies were checked and updated according to the new > > libmesa_glsl, libmesa_nir and libmesa_compiler static libraries > > Looks pretty similar to my changes except for a few things. > ... > > src/gallium/drivers/vc4/Android.mk | 4 ++-- > I missed building this one. I went through all android building errors occurences, with the following list of drivers BoardConfig.mk: freedreeno i915 i965 *nouveau* r300g r600g *radeonsi* swrast virgl *vc4* Compared to you list of changes, only *vc4* had glsl related building error. I also tried to build vmwgfx drivers, which have dependencies on libLLVM shared library, but when building vmwgfx linking fails, there are a lot of building errors all of them are undefined reference to LLVM functions. With kitkat-x86, vmwgfx of mesa 11.2.0devel is built without a glitch. Do you have any clue or advice on how to build vmwgfx on lollipop/marshmallow? Thanks in advance > -# We need libmesa_glsl to get NIR's generated include directories. > > +# We need libmesa_nir to get NIR's generated include directories. > > LOCAL_MODULE := libmesa_gallium > > -LOCAL_STATIC_LIBRARIES += libmesa_glsl > > +LOCAL_STATIC_LIBRARIES += libmesa_nir > > I just added libmesa_nir, but this is probably the correct fix. I saw no no building error when removing libmesa_glsl > > LOCAL_C_INCLUDES := \ > > $(MESA_TOP)/src/mapi \ > > - $(MESA_TOP)/src/glsl \ > > + $(MESA_TOP)/src/compiler/glsl \ > > Are you sure this path is needed? I didn't seem to need it. I performed the changes based on the assumption that $(MESA_TOP)/src/glsl is now a non existent path, but marshamallow is built even without $(MESA_TOP)/src/glsl or $(MESA_TOP)/src/compiler/glsl IIRC that line in the includes path was needed in the past to avoid building errors, it may be related to kikat-x86 build system, but I need to check next weekend, when I'll move to where I have the build machine for kitkat-x86. For the moment, I would recommed to keep it with the new corrected path in any place it appears. Thanks a lot Mauro ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/5] android: radeonsi: fix building error in si_shader.c
Hi Michel, Patch was updated according to the instructions and log/commit messages changed. Thanks for the advice Mauro >From 7a9090bffa434b78d8654c4c6d4c8dc0ec00c524 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Wed, 3 Feb 2016 03:54:08 +0100 Subject: [PATCH] android: radeonsi: add strchrnul() to fix building error Android Bionic has no strchrnul, which is used in si_shader_dump_disassembly(), so we need an implementation. A new android compatibility header was added to support the definition of the needed function. --- include/android_compat.h | 45 src/gallium/drivers/radeonsi/si_shader.c | 4 +++ 2 files changed, 49 insertions(+) create mode 100644 include/android_compat.h diff --git a/include/android_compat.h b/include/android_compat.h new file mode 100644 index 000..224521d --- /dev/null +++ b/include/android_compat.h @@ -0,0 +1,45 @@ +/** + * + * 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. + * + **/ + +#ifndef _ANDROID_COMPAT_H_ +#define _ANDROID_COMPAT_H_ + +/* + * Android Bionic has no strchrnul, which is used in si_shader_dump_disassembly(), + * so we must fill in an implementation. + */ + +char * +strchrnul(const char *s, int c) +{ + char * result = strchr(s, c); + + if (result == NULL) { + result = s + strlen(s); + } + + return result; +} + +#endif /* _ANDROID_COMPAT_H_ */ diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 2192b21..86a00fb 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -49,6 +49,10 @@ #include +#if defined(__ANDROID__) +#include "android_compat.h" +#endif /* __ANDROID__ */ + static const char *scratch_rsrc_dword0_symbol = "SCRATCH_RSRC_DWORD0"; -- 2.5.0 From 7a9090bffa434b78d8654c4c6d4c8dc0ec00c524 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Wed, 3 Feb 2016 03:54:08 +0100 Subject: [PATCH] android: radeonsi: add strchrnul() to fix building error Android Bionic has no strchrnul, which is used in si_shader_dump_disassembly(), so we need an implementation. A new android compatibility header was added to support the definition of the needed function. --- include/android_compat.h | 45 src/gallium/drivers/radeonsi/si_shader.c | 4 +++ 2 files changed, 49 insertions(+) create mode 100644 include/android_compat.h diff --git a/include/android_compat.h b/include/android_compat.h new file mode 100644 index 000..224521d --- /dev/null +++ b/include/android_compat.h @@ -0,0 +1,45 @@ +/** + * + * 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
Re: [Mesa-dev] [PATCH 2/5] android: radeonsi: fix building error in si_shader.c
>From 8030a6cd9d7bb3320fca94038f1969db56223598 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 6 Feb 2016 23:52:36 +0100 Subject: [PATCH 1/2] android: add support for strchrnul Android Bionic has no strchrnul in string functions, radeonsi uses strchrnul, so we need an implementation. strchrnul.h is added in top mesa include path. --- include/strchrnul.h | 40 1 file changed, 40 insertions(+) create mode 100644 include/strchrnul.h diff --git a/include/strchrnul.h b/include/strchrnul.h new file mode 100644 index 000..83477e2 --- /dev/null +++ b/include/strchrnul.h @@ -0,0 +1,40 @@ +/** + * + * 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. + * + **/ + +#ifndef _STRCHRNUL_H_ +#define _STRCHRNUL_H_ + +char * +strchrnul(const char *s, int c) +{ +char * result = strchr(s, c); + +if (result == NULL) { +result = s + strlen(s); +} + +return result; +} + +#endif /* _STRCHRNUL_H_ */ -- 2.5.0 From 8030a6cd9d7bb3320fca94038f1969db56223598 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 6 Feb 2016 23:52:36 +0100 Subject: [PATCH 1/2] android: add support for strchrnul Android Bionic has no strchrnul in string functions, radeonsi uses strchrnul, so we need an implementation. strchrnul.h is added in top mesa include path. --- include/strchrnul.h | 40 1 file changed, 40 insertions(+) create mode 100644 include/strchrnul.h diff --git a/include/strchrnul.h b/include/strchrnul.h new file mode 100644 index 000..83477e2 --- /dev/null +++ b/include/strchrnul.h @@ -0,0 +1,40 @@ +/** + * + * 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. + * + **/ + +#ifndef _STRCHRNUL_H_ +#define _STRCHRNUL_H_ + +char * +strchrnul(const char *s, int c) +{ + char * result = strchr(s, c); + + if (result == NULL) { + result = s + strlen(s); + } + + return result; +} + +#endif /* _STRCHRNUL_H_ */ -- 2.5.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/5] android: radeonsi: fix building error in si_shader.c
>From e33d112be85e86c2537c26622969dea7dfd16186 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 6 Feb 2016 23:54:24 +0100 Subject: [PATCH 2/2] android: radeonsi: fix building error in si_shader.c Android Bionic does not support strchrnul() function, causing the following building error: external/mesa/src/gallium/drivers/radeonsi/si_shader.c:3863: error: undefined reference to 'strchrnul' collect2: error: ld returned 1 exit status --- src/gallium/drivers/radeonsi/si_shader.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index d9ed6b2..1b5e984 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -49,6 +49,10 @@ #include +#if defined(__ANDROID__) +#include "strchrnul.h" +#endif /* __ANDROID__ */ + static const char *scratch_rsrc_dword0_symbol = "SCRATCH_RSRC_DWORD0"; -- 2.5.0 From e33d112be85e86c2537c26622969dea7dfd16186 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 6 Feb 2016 23:54:24 +0100 Subject: [PATCH 2/2] android: radeonsi: fix building error in si_shader.c Android Bionic does not support strchrnul() function, causing the following building error: external/mesa/src/gallium/drivers/radeonsi/si_shader.c:3863: error: undefined reference to 'strchrnul' collect2: error: ld returned 1 exit status --- src/gallium/drivers/radeonsi/si_shader.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index d9ed6b2..1b5e984 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -49,6 +49,10 @@ #include +#if defined(__ANDROID__) +#include "strchrnul.h" +#endif /* __ANDROID__ */ + static const char *scratch_rsrc_dword0_symbol = "SCRATCH_RSRC_DWORD0"; -- 2.5.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [android-x86-devel] [PATCH 4/5] android: fix building with new glsl, nir, compiler libraries
Hi, Just to close this thread, I've checked on both marshamallow-x86 and kitkat-x86 builds and the line $(MESA_TOP)/src/glsl which is now a non-existent path, is not needed anymore and can be removed in LOCAL_C_INCLUDES for all the following android makefiles: ./src/mesa/Android.libmesa_glsl_utils.mk ./src/mesa/Android.libmesa_st_mesa.mk ./src/mesa/program/Android.mk ./src/mesa/Android.mesa_gen_matypes.mk ./src/gallium/drivers/r300/Android.mk My doubt was that the new correct path $(MESA_TOP)/src/compiler/glsl had to be included, but I've checked and, without new glsl path, it builds just fine with both marshmallow-x86 and with kitkat-x86. My doubt was related to the different treatment wrt automatic header picking, that has different behavior in L/M compared to kitkat. I just wanted to be sure Mauro PS: There is a different building error appeared this week, but I'll submit a separate patch, if needed, in the next days $(MESA_TOP)/src/mesa/main path is needed in LOCAL_C_INCLUDES of ./src/mesa/program/Android.mk to avoid the following building error: external/mesa/src/mesa/program/prog_statevars.c:43:25: fatal error: framebuffer.h: No such file or directory compilation terminated. build/core/binary.mk:512: recipe for target 'out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_program_intermediates/prog_statevars.o' failed make: *** [out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_program_intermediates/prog_statevars.o] Error 1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] android: fix glcpp building error
LOCAL_C_INCLUDES needs an additional path to fix the following build error: external/mesa/src/compiler/glsl/glcpp/glcpp-lex.l:30:25: fatal error: glcpp-parse.h: No such file or directory #include "glcpp-parse.h" ^ compilation terminated. build/core/binary.mk:821: recipe for target 'out/target/product/x86_64/obj/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/glcpp/glcpp-lex.o' failed make: *** [out/target/product/x86_64/obj/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/glcpp/glcpp-lex.o] Error 1 make: *** Waiting for unfinished jobs --- src/compiler/Android.glsl.gen.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/Android.glsl.gen.mk b/src/compiler/Android.glsl.gen.mk index b0df8a1..b2ea12c 100644 --- a/src/compiler/Android.glsl.gen.mk +++ b/src/compiler/Android.glsl.gen.mk @@ -33,6 +33,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) LOCAL_C_INCLUDES += \ $(intermediates)/glsl \ + $(intermediates)/glsl/glcpp \ $(LOCAL_PATH)/glsl \ $(LOCAL_PATH)/glsl/glcpp \ -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/5] android: radeonsi: fix building error in si_shader.c
Hi, thanks, now they should be ok The macro name was changed to __STRCHRNUL_H Tested by building marshmallow-x86 M. >From c1fd979ee7b3e74c4d097b7b1941ebbe65f8d003 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sun, 14 Feb 2016 15:34:16 +0100 Subject: [PATCH 1/2] android: add support for strchrnul Android Bionic has no strchrnul in string functions, radeonsi uses strchrnul, so we need an implementation. strchrnul.h is added in top mesa include path. --- include/strchrnul.h | 46 ++ 1 file changed, 46 insertions(+) create mode 100644 include/strchrnul.h diff --git a/include/strchrnul.h b/include/strchrnul.h new file mode 100644 index 000..b22028d --- /dev/null +++ b/include/strchrnul.h @@ -0,0 +1,46 @@ +/** + * + * 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. + * + **/ + +#ifndef __STRCHRNUL_H +#define __STRCHRNUL_H + +#include + +#if defined(__ANDROID__) + +char * +strchrnul(const char *s, int c) +{ +char * result = strchr(s, c); + +if (result == NULL) { +result = s + strlen(s); +} + +return result; +} + +#endif /* __ANDROID__ */ + +#endif /* __STRCHRNUL_H */ -- 2.5.0 >From e6252743efcd487a7b0d9f37712d4d41149ef0dd Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sun, 14 Feb 2016 15:10:16 +0100 Subject: [PATCH 2/2] android: radeonsi: fix building error in si_shader.c Android Bionic does not support strchrnul() function, causing the following building error: external/mesa/src/gallium/drivers/radeonsi/si_shader.c:3863: error: undefined reference to 'strchrnul' collect2: error: ld returned 1 exit status --- src/gallium/drivers/radeonsi/si_shader.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 19c427a..ec26d71 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -48,6 +48,7 @@ #include "sid.h" #include +#include static const char *scratch_rsrc_dword0_symbol = "SCRATCH_RSRC_DWORD0"; -- 2.5.0 From c1fd979ee7b3e74c4d097b7b1941ebbe65f8d003 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sun, 14 Feb 2016 15:34:16 +0100 Subject: [PATCH 1/2] android: add support for strchrnul Android Bionic has no strchrnul in string functions, radeonsi uses strchrnul, so we need an implementation. strchrnul.h is added in top mesa include path. --- include/strchrnul.h | 46 ++ 1 file changed, 46 insertions(+) create mode 100644 include/strchrnul.h diff --git a/include/strchrnul.h b/include/strchrnul.h new file mode 100644 index 000..b22028d --- /dev/null +++ b/include/strchrnul.h @@ -0,0 +1,46 @@ +/** + * + * 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
Re: [Mesa-dev] [PATCH 2/5] android: radeonsi: fix building error in si_shader.c
Hi Micheal, no problem, I'm learning so much and you and Emil have both shown amounts of patience with me. I've tested the following patch and it works Mauro >From a00b1182fd74ec6af37e09e53dd3febec36af27d Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sun, 21 Feb 2016 20:31:21 +0100 Subject: [PATCH] radeonsi: use util_strchrnul() to fix android building error Android Bionic does not support strchrnul() string function, gallium auxiliary util/u_string.h provides util_strchrnul() This change avoids the following building error: external/mesa/src/gallium/drivers/radeonsi/si_shader.c:3863: error: undefined reference to 'strchrnul' collect2: error: ld returned 1 exit status --- src/gallium/drivers/radeonsi/si_shader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index d1482de..192a736 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -39,6 +39,7 @@ #include "radeon/radeon_llvm_emit.h" #include "util/u_memory.h" #include "util/u_pstipple.h" +#include "util/u_string.h" #include "tgsi/tgsi_parse.h" #include "tgsi/tgsi_util.h" #include "tgsi/tgsi_dump.h" @@ -4019,7 +4020,7 @@ static void si_shader_dump_disassembly(const struct radeon_shader_binary *binary line = binary->disasm_string; while (*line) { -p = strchrnul(line, '\n'); +p = util_strchrnul(line, '\n'); count = p - line; if (count) { -- 2.5.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/3] android: define MESA_EGL_NO_X11_HEADERS
In order to avoid building errors due to missing X11 headers Cc: --- Android.common.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/Android.common.mk b/Android.common.mk index cdba85f..5df9b7e 100644 --- a/Android.common.mk +++ b/Android.common.mk @@ -56,6 +56,7 @@ LOCAL_CFLAGS += \ -DHAVE___BUILTIN_UNREACHABLE \ -DHAVE_PTHREAD=1 \ -DHAVE_DLOPEN \ + -DMESA_EGL_NO_X11_HEADERS \ -DTEXTURE_FLOAT_ENABLED \ -fvisibility=hidden \ -Wno-sign-compare -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/3] android: libmesa_glsl: add a dependency on libmesa_nir static
Fixes the following building error: target C++: libmesa_glsl <= external/mesa/src/compiler/glsl/glsl_to_nir.cpp In file included from external/mesa/src/compiler/glsl/glsl_to_nir.h:28:0, from external/mesa/src/compiler/glsl/glsl_to_nir.cpp:28: external/mesa/src/compiler/nir/nir.h:42:25: fatal error: nir_opcodes.h: No such file or directory compilation terminated. build/core/binary.mk:432: recipe for target 'out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/glsl_to_nir.o' failed make: *** [out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/glsl_to_nir.o] Error 1 make: *** Waiting for unfinished jobs Cc: --- src/compiler/Android.glsl.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/Android.glsl.mk b/src/compiler/Android.glsl.mk index 5d2bc18..21c1065 100644 --- a/src/compiler/Android.glsl.mk +++ b/src/compiler/Android.glsl.mk @@ -38,13 +38,14 @@ LOCAL_SRC_FILES := \ $(LIBGLSL_FILES) \ LOCAL_C_INCLUDES := \ - $(MESA_TOP)/src/compiler/nir \ $(MESA_TOP)/src/mapi \ $(MESA_TOP)/src/mesa \ $(MESA_TOP)/src/gallium/include \ $(MESA_TOP)/src/gallium/auxiliary -LOCAL_STATIC_LIBRARIES := libmesa_compiler +LOCAL_STATIC_LIBRARIES := \ + libmesa_compiler \ + libmesa_nir LOCAL_MODULE := libmesa_glsl -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/3] isl: add support for Android libmesa_isl static library
isl library is needed to build i965, libmesa_isl static library is added to fix related Android building errors. Any attempt to build libmesa_genxml as phony package module failed to deliver gen{7,75,8,9}_pack.h autogenerated headers, needed to build libmesa_isl_gen{7,75,8,9} Due to constraints in the Android Build System, libmesa_genxml is built as static library and at least one source file needs to be compiled, so dummy.c is autogenerated for this scope. libmesa_isl_gen{7,75,8,9} dependencies on libmesa_genxml are declared using LOCAL_WHOLE_STATIC_LIBRARIES, in order to avoid building errors due to missing genxml/gen{7,75,8,9}_pack.h headers Cc: --- Android.mk | 3 + src/intel/genxml/Android.mk | 82 ++ src/intel/isl/Android.mk | 157 +++ src/mesa/drivers/dri/i965/Android.mk | 3 +- 4 files changed, 244 insertions(+), 1 deletion(-) create mode 100644 src/intel/genxml/Android.mk create mode 100644 src/intel/isl/Android.mk diff --git a/Android.mk b/Android.mk index 6a5596b..8ab80f3 100644 --- a/Android.mk +++ b/Android.mk @@ -48,6 +48,7 @@ MESA_DRI_MODULE_UNSTRIPPED_PATH := $(TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED)/$(M MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk MESA_PYTHON2 := python +MESA_PYTHON3 := python3 classic_drivers := i915 i965 gallium_drivers := swrast freedreno i915g ilo nouveau r300g r600g radeonsi vmwgfx vc4 virgl @@ -95,6 +96,8 @@ SUBDIRS := \ src/mesa \ src/util \ src/egl \ + src/intel/genxml \ + src/intel/isl \ src/mesa/drivers/dri INC_DIRS := $(call all-named-subdir-makefiles,$(SUBDIRS)) diff --git a/src/intel/genxml/Android.mk b/src/intel/genxml/Android.mk new file mode 100644 index 000..e0137d5 --- /dev/null +++ b/src/intel/genxml/Android.mk @@ -0,0 +1,82 @@ +# Copyright © 2016 Intel Corporation +# Copyright © 2016 Mauro Rossi +# +# 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) + +# Import variable GENERATED_FILES. +include $(LOCAL_PATH)/Makefile.sources + +include $(CLEAR_VARS) + +LOCAL_MODULE := libmesa_genxml + +LOCAL_MODULE_CLASS := STATIC_LIBRARIES + +intermediates := $(call local-generated-sources-dir) + +# dummy.c source file is generated to meet the build system's rules. +LOCAL_GENERATED_SOURCES += $(intermediates)/dummy.c + +$(intermediates)/dummy.c: + @mkdir -p $(dir $@) + @echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))" + $(hide) touch $@ + +# This is the list of auto-generated files headers +LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/genxml/, $(GENXML_GENERATED_FILES)) + +define header-gen + @mkdir -p $(dir $@) + @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))" + $(hide) $(PRIVATE_SCRIPT) $(PRIVATE_XML) > $@ +endef + +$(intermediates)/genxml/gen6_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON3) $(LOCAL_PATH)/gen_pack_header.py +$(intermediates)/genxml/gen6_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen6.xml +$(intermediates)/genxml/gen6_pack.h: $(LOCAL_PATH)/gen6.xml $(LOCAL_PATH)/gen_pack_header.py + $(call header-gen) + +$(intermediates)/genxml/gen7_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON3) $(LOCAL_PATH)/gen_pack_header.py +$(intermediates)/genxml/gen7_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen7.xml +$(intermediates)/genxml/gen7_pack.h: $(LOCAL_PATH)/gen7.xml $(LOCAL_PATH)/gen_pack_header.py + $(call header-gen) + +$(intermediates)/genxml/gen75_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON3) $(LOCAL_PATH)/gen_pack_header.py +$(intermediates)/genxml/gen75_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen75.xml +$(intermediates)/genxml/gen75_pack.h: $(LOCAL_PATH)/gen75.xml $(LOCAL_PATH)/gen_pack_header.py + $(call header-gen) + +$(intermediates)/genxml/gen8_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON3) $(LOCAL_PATH)/gen_pack_header.py +$(intermediates)
[Mesa-dev] [PATCH 1/2] android: fix building error in st_glsl_to_tgsi
Fixes the following building error: bionic/libc/include/string.h:105:33: error: call to '__memcpy_dest_size_error' declared with attribute error: memcpy called with size bigger than destination Cc: --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index aa443a5..46079d2 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -3455,7 +3455,7 @@ glsl_to_tgsi_visitor::visit_image_intrinsic(ir_call *ir) if (reladdr.file != PROGRAM_UNDEFINED) { emit_arl(ir, sampler_reladdr, reladdr); image.reladdr = ralloc(mem_ctx, st_src_reg); - memcpy(image.reladdr, &sampler_reladdr, sizeof(reladdr)); + memcpy(image.reladdr, &sampler_reladdr, sizeof(sampler_reladdr)); } st_dst_reg dst = undef_dst; -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] Set of 2 patches to fix building errors with kitkat-x86
Hello there, the following two patches are proposed to avoid building errors on kitkat-x86 in order to enhance compatibility. Please consider that these patches are applicable to both mesa-dev and mesa-stable, please pardon me if I may have just caused double posting on mesa-stable. [PATCH 1/2] android: fix building error in st_glsl_to_tgsi [PATCH 2/2] egl: use CLOCK_MONOTONIC only when available ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/2] egl: use CLOCK_MONOTONIC only when available
Fixes the following building error: external/mesa/src/egl/drivers/dri2/egl_dri2.c:2476: error: undefined reference to 'pthread_condattr_setclock' collect2: error: ld returned 1 exit status Cc: --- src/egl/drivers/dri2/egl_dri2.c | 16 1 file changed, 16 insertions(+) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index f954cd5..9201f5b 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -2421,7 +2421,9 @@ dri2_create_sync(_EGLDriver *drv, _EGLDisplay *dpy, struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx); struct dri2_egl_sync *dri2_sync; EGLint ret; +#if defined(HAVE_PTHREAD_CONDATTR_SETCLOCK) && defined(HAVE_CLOCK_MONOTONIC) pthread_condattr_t attr; +#endif dri2_sync = calloc(1, sizeof(struct dri2_egl_sync)); if (!dri2_sync) { @@ -2466,6 +2468,7 @@ dri2_create_sync(_EGLDriver *drv, _EGLDisplay *dpy, break; case EGL_SYNC_REUSABLE_KHR: +#if defined(HAVE_PTHREAD_CONDATTR_SETCLOCK) && defined(HAVE_CLOCK_MONOTONIC) /* intialize attr */ ret = pthread_condattr_init(&attr); @@ -2491,6 +2494,15 @@ dri2_create_sync(_EGLDriver *drv, _EGLDisplay *dpy, free(dri2_sync); return NULL; } +#else + ret = pthread_cond_init(&dri2_sync->cond, NULL); + + if (ret) { + _eglError(EGL_BAD_ACCESS, "eglCreateSyncKHR"); + free(dri2_sync); + return NULL; + } +#endif /* initial status of reusable sync must be "unsignaled" */ dri2_sync->base.SyncStatus = EGL_UNSIGNALED_KHR; @@ -2594,7 +2606,11 @@ dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, } else { /* if reusable sync has not been yet signaled */ if (dri2_sync->base.SyncStatus != EGL_SIGNALED_KHR) { +#if defined(HAVE_PTHREAD_CONDATTR_SETCLOCK) && defined(HAVE_CLOCK_MONOTONIC) clock_gettime(CLOCK_MONOTONIC, ¤t); +#else +clock_gettime(CLOCK_REALTIME, ¤t); +#endif /* calculating when to expire */ expire.nsec = timeout % 10L; -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [android-x86-devel] [PATCH 1/2] android: fix building error in st_glsl_to_tgsi
2016-05-31 16:47 GMT+02:00 Rob Herring : > On Mon, May 30, 2016 at 7:00 PM, Mauro Rossi > wrote: > > Fixes the following building error: > > > > bionic/libc/include/string.h:105:33: error: call to > '__memcpy_dest_size_error' > > declared with attribute error: memcpy called with size bigger than > destination > > What platform hits this? I'm not seeing it in my CI job[1]. It could > be exiting out before with the isl.h errors. > > Rob Hi, the building error happens only when building kitkat-x86 (Android 4.4) Mauro ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [android-x86-devel] [PATCH 3/3] isl: add support for Android libmesa_isl static library
2016-05-31 16:33 GMT+02:00 Emil Velikov : > Hi Mauro, > > A couple of questions, nothing serious imho. > > On 30 May 2016 at 23:20, Mauro Rossi wrote: > > isl library is needed to build i965, libmesa_isl static library is added > > to fix related Android building errors. > > > > Any attempt to build libmesa_genxml as phony package module failed to > deliver > > gen{7,75,8,9}_pack.h autogenerated headers, needed to build > libmesa_isl_gen{7,75,8,9} > > > > Due to constraints in the Android Build System, libmesa_genxml is built > as static library > > and at least one source file needs to be compiled, so dummy.c is > autogenerated for this scope. > > > > libmesa_isl_gen{7,75,8,9} dependencies on libmesa_genxml are declared > using LOCAL_WHOLE_STATIC_LIBRARIES, > > in order to avoid building errors due to missing > genxml/gen{7,75,8,9}_pack.h headers > > > > Cc: > > --- > > Android.mk | 3 + > > src/intel/genxml/Android.mk | 82 ++ > > src/intel/isl/Android.mk | 157 > +++ > > src/mesa/drivers/dri/i965/Android.mk | 3 +- > > 4 files changed, 244 insertions(+), 1 deletion(-) > > create mode 100644 src/intel/genxml/Android.mk > > create mode 100644 src/intel/isl/Android.mk > > > > diff --git a/Android.mk b/Android.mk > > index 6a5596b..8ab80f3 100644 > > --- a/Android.mk > > +++ b/Android.mk > > @@ -48,6 +48,7 @@ MESA_DRI_MODULE_UNSTRIPPED_PATH := > $(TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED)/$(M > > > > MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk > > MESA_PYTHON2 := python > > +MESA_PYTHON3 := python3 > I've just seen that while a few days ago python3 was necessary to build gen%_pack.h headers, now the .py scripts just require python2, so this MESA_PYTHON3 definition is not needed anymore. > > new file mode 100644 > > index 000..e0137d5 > > --- /dev/null > > +++ b/src/intel/genxml/Android.mk > > @@ -0,0 +1,82 @@ > > +# Copyright © 2016 Intel Corporation > > +# Copyright © 2016 Mauro Rossi > > +# > > +# 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) > > + > > +# Import variable GENERATED_FILES. > > +include $(LOCAL_PATH)/Makefile.sources > > + > > +include $(CLEAR_VARS) > > + > > +LOCAL_MODULE := libmesa_genxml > > + > > +LOCAL_MODULE_CLASS := STATIC_LIBRARIES > > + > > +intermediates := $(call local-generated-sources-dir) > > + > > +# dummy.c source file is generated to meet the build system's rules. > > +LOCAL_GENERATED_SOURCES += $(intermediates)/dummy.c > > + > > +$(intermediates)/dummy.c: > > + @mkdir -p $(dir $@) > > + @echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))" > > + $(hide) touch $@ > > + > > +# This is the list of auto-generated files headers > > +LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/genxml/, > $(GENXML_GENERATED_FILES)) > > + > > +define header-gen > > + @mkdir -p $(dir $@) > > + @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))" > > + $(hide) $(PRIVATE_SCRIPT) $(PRIVATE_XML) > $@ > > +endef > > + > > +$(intermediates)/genxml/gen6_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON3) > $(LOCAL_PATH)/gen_pack_header.py > > +$(intermediat
Re: [Mesa-dev] [android-x86-devel] [PATCH 3/3] isl: add support for Android libmesa_isl static library
2016-06-01 2:22 GMT+02:00 Mauro Rossi : > > > 2016-05-31 16:33 GMT+02:00 Emil Velikov : > >> Hi Mauro, >> >> A couple of questions, nothing serious imho. >> >> On 30 May 2016 at 23:20, Mauro Rossi wrote: >> > isl library is needed to build i965, libmesa_isl static library is added >> > to fix related Android building errors. >> > >> > Any attempt to build libmesa_genxml as phony package module failed to >> deliver >> > gen{7,75,8,9}_pack.h autogenerated headers, needed to build >> libmesa_isl_gen{7,75,8,9} >> > >> > Due to constraints in the Android Build System, libmesa_genxml is built >> as static library >> > and at least one source file needs to be compiled, so dummy.c is >> autogenerated for this scope. >> > >> > libmesa_isl_gen{7,75,8,9} dependencies on libmesa_genxml are declared >> using LOCAL_WHOLE_STATIC_LIBRARIES, >> > in order to avoid building errors due to missing >> genxml/gen{7,75,8,9}_pack.h headers >> > >> > Cc: >> > --- >> > Android.mk | 3 + >> > src/intel/genxml/Android.mk | 82 ++ >> > src/intel/isl/Android.mk | 157 >> +++ >> > src/mesa/drivers/dri/i965/Android.mk | 3 +- >> > 4 files changed, 244 insertions(+), 1 deletion(-) >> > create mode 100644 src/intel/genxml/Android.mk >> > create mode 100644 src/intel/isl/Android.mk >> > >> > diff --git a/Android.mk b/Android.mk >> > index 6a5596b..8ab80f3 100644 >> > --- a/Android.mk >> > +++ b/Android.mk >> > @@ -48,6 +48,7 @@ MESA_DRI_MODULE_UNSTRIPPED_PATH := >> $(TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED)/$(M >> > >> > MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk >> > MESA_PYTHON2 := python >> > +MESA_PYTHON3 := python3 >> > > I've just seen that while a few days ago python3 was necessary to build > gen%_pack.h headers, > now the .py scripts just require python2, so this MESA_PYTHON3 definition > is not needed anymore. > > >> > new file mode 100644 >> > index 000..e0137d5 >> > --- /dev/null >> > +++ b/src/intel/genxml/Android.mk >> > @@ -0,0 +1,82 @@ >> > +# Copyright © 2016 Intel Corporation >> > +# Copyright © 2016 Mauro Rossi >> > +# >> > +# 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) >> > + >> > +# Import variable GENERATED_FILES. >> > +include $(LOCAL_PATH)/Makefile.sources >> > + >> > +include $(CLEAR_VARS) >> > + >> > +LOCAL_MODULE := libmesa_genxml >> > + >> > +LOCAL_MODULE_CLASS := STATIC_LIBRARIES >> > + >> > +intermediates := $(call local-generated-sources-dir) >> > + >> > +# dummy.c source file is generated to meet the build system's rules. >> > +LOCAL_GENERATED_SOURCES += $(intermediates)/dummy.c >> > + >> > +$(intermediates)/dummy.c: >> > + @mkdir -p $(dir $@) >> > + @echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))" >> > + $(hide) touch $@ >> > + >> > +# This is the list of auto-generated files headers >> > +LO
Re: [Mesa-dev] [android-x86-devel] [PATCH 3/3] isl: add support for Android libmesa_isl static library
> >>> > MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk > >>> > MESA_PYTHON2 := python > >>> > +MESA_PYTHON3 := python3 > >> > >> I've just seen that while a few days ago python3 was necessary to build > >> gen%_pack.h headers, > >> now the .py scripts just require python2, so this MESA_PYTHON3 > definition > >> is not needed anymore. > >> > >>> > >>> > new file mode 100644 > >>> > index 000..e0137d5 > >>> > --- /dev/null > >>> > +++ b/src/intel/genxml/Android.mk > >>> > @@ -0,0 +1,82 @@ > >>> > +# Copyright © 2016 Intel Corporation > >>> > +# Copyright © 2016 Mauro Rossi > >>> > +# > >>> > +# 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) > >>> > + > >>> > +# Import variable GENERATED_FILES. > >>> > +include $(LOCAL_PATH)/Makefile.sources > >>> > + > >>> > +include $(CLEAR_VARS) > >>> > + > >>> > +LOCAL_MODULE := libmesa_genxml > >>> > + > >>> > +LOCAL_MODULE_CLASS := STATIC_LIBRARIES > >>> > + > >>> > +intermediates := $(call local-generated-sources-dir) > >>> > + > >>> > +# dummy.c source file is generated to meet the build system's rules. > >>> > +LOCAL_GENERATED_SOURCES += $(intermediates)/dummy.c > >>> > + > >>> > +$(intermediates)/dummy.c: > >>> > + @mkdir -p $(dir $@) > >>> > + @echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))" > >>> > + $(hide) touch $@ > >>> > + > >>> > +# This is the list of auto-generated files headers > >>> > +LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/genxml/, > >>> > $(GENXML_GENERATED_FILES)) > >>> > + > >>> > +define header-gen > >>> > + @mkdir -p $(dir $@) > >>> > + @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))" > >>> > + $(hide) $(PRIVATE_SCRIPT) $(PRIVATE_XML) > $@ > >>> > +endef > >>> > + > >>> > +$(intermediates)/genxml/gen6_pack.h: PRIVATE_SCRIPT := > $(MESA_PYTHON3) > >>> > $(LOCAL_PATH)/gen_pack_header.py > >>> > +$(intermediates)/genxml/gen6_pack.h: PRIVATE_XML := > >>> > $(LOCAL_PATH)/gen6.xml > >>> > +$(intermediates)/genxml/gen6_pack.h: $(LOCAL_PATH)/gen6.xml > >>> > $(LOCAL_PATH)/gen_pack_header.py > >>> > + $(call header-gen) > >>> > + > >>> > +$(intermediates)/genxml/gen7_pack.h: PRIVATE_SCRIPT := > $(MESA_PYTHON3) > >>> > $(LOCAL_PATH)/gen_pack_header.py > >>> > +$(intermediates)/genxml/gen7_pack.h: PRIVATE_XML := > >>> > $(LOCAL_PATH)/gen7.xml > &
[Mesa-dev] isl support for Android (final version)
As agreed with Emil, I'm sending a respin of isl for Android, without python3 macro definition in main Android.mk, since not needed anymore, and with a few optimizations in makefiles. In order to backport to mesa-stable the patches, which is recommended, the patches that remove python3 features from isl are a pre-requisite. Cc: ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/2] isl: remove unneeded isl_format_layout.c in Makefile.sources
Source files should be defined only once in Makefile.source As a side note isl_surface.c is not an unneeded duplicate and must stay defined in ISL_GEN{7,75,8,9}_FILES --- src/intel/isl/Makefile.sources | 1 - 1 file changed, 1 deletion(-) diff --git a/src/intel/isl/Makefile.sources b/src/intel/isl/Makefile.sources index fe6a00f..89b1418 100644 --- a/src/intel/isl/Makefile.sources +++ b/src/intel/isl/Makefile.sources @@ -2,7 +2,6 @@ ISL_FILES = \ isl.c \ isl.h \ isl_format.c \ - isl_format_layout.c \ isl_gen4.c \ isl_gen4.h \ isl_gen6.c \ -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/2] isl: add support for Android libmesa_isl static library
isl library is needed to build i965, libmesa_isl static library is added to fix related Android building errors. Any attempt to build libmesa_genxml as phony package module failed to deliver gen{7,75,8,9}_pack.h generated headers, needed for libmesa_isl_gen{7,75,8,9} Due to constraints in Android Build System, libmesa_genxml is built as static, at least one source is needed, so dummy.c is autogenerated for this scope, libmesa_genxml dependency is declared using LOCAL_WHOLE_STATIC_LIBRARIES, to avoid building errors due to missing genxml/gen{7,75,8,9}_pack.h headers. --- Android.mk | 2 + src/intel/genxml/Android.mk | 82 ++ src/intel/isl/Android.mk | 155 +++ src/mesa/drivers/dri/i965/Android.mk | 3 +- 4 files changed, 241 insertions(+), 1 deletion(-) create mode 100644 src/intel/genxml/Android.mk create mode 100644 src/intel/isl/Android.mk diff --git a/Android.mk b/Android.mk index 6a5596b..a83cb33 100644 --- a/Android.mk +++ b/Android.mk @@ -95,6 +95,8 @@ SUBDIRS := \ src/mesa \ src/util \ src/egl \ + src/intel/genxml \ + src/intel/isl \ src/mesa/drivers/dri INC_DIRS := $(call all-named-subdir-makefiles,$(SUBDIRS)) diff --git a/src/intel/genxml/Android.mk b/src/intel/genxml/Android.mk new file mode 100644 index 000..e5b7597 --- /dev/null +++ b/src/intel/genxml/Android.mk @@ -0,0 +1,82 @@ +# Copyright © 2016 Intel Corporation +# Copyright © 2016 Mauro Rossi +# +# 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) + +# Import variable GENERATED_FILES. +include $(LOCAL_PATH)/Makefile.sources + +include $(CLEAR_VARS) + +LOCAL_MODULE := libmesa_genxml + +LOCAL_MODULE_CLASS := STATIC_LIBRARIES + +intermediates := $(call local-generated-sources-dir) + +# dummy.c source file is generated to meet the build system's rules. +LOCAL_GENERATED_SOURCES += $(intermediates)/dummy.c + +$(intermediates)/dummy.c: + @mkdir -p $(dir $@) + @echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))" + $(hide) touch $@ + +# This is the list of auto-generated files headers +LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/genxml/, $(GENXML_GENERATED_FILES)) + +define header-gen + @mkdir -p $(dir $@) + @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))" + $(hide) $(PRIVATE_SCRIPT) $(PRIVATE_XML) > $@ +endef + +$(intermediates)/genxml/gen6_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py +$(intermediates)/genxml/gen6_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen6.xml +$(intermediates)/genxml/gen6_pack.h: $(LOCAL_PATH)/gen6.xml $(LOCAL_PATH)/gen_pack_header.py + $(call header-gen) + +$(intermediates)/genxml/gen7_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py +$(intermediates)/genxml/gen7_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen7.xml +$(intermediates)/genxml/gen7_pack.h: $(LOCAL_PATH)/gen7.xml $(LOCAL_PATH)/gen_pack_header.py + $(call header-gen) + +$(intermediates)/genxml/gen75_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py +$(intermediates)/genxml/gen75_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen75.xml +$(intermediates)/genxml/gen75_pack.h: $(LOCAL_PATH)/gen75.xml $(LOCAL_PATH)/gen_pack_header.py + $(call header-gen) + +$(intermediates)/genxml/gen8_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py +$(intermediates)/genxml/gen8_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen8.xml +$(intermediates)/genxml/gen8_pack.h: $(LOCAL_PATH)/gen8.xml $(LOCAL_PATH)/gen_pack_header.py + $(call header-gen) + +$(intermediates)/genxml/gen9_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py +$(intermediates)/genxml/gen9_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen9.xml +$(intermediates)/genxml/gen9_pack.h: $(LOCAL_PATH)/gen
Re: [Mesa-dev] [PATCH] fixup! genxml: Add enough XML for gens 4, 4.5, and 5 to get SURFACE_STATE
Hi Jason, Emil, Jason patch equires additional changes to correctly complete the builld as the new generated headers gen{4,45,5}_pack.h need also to be added to src/intel/Makefile.sources in GENXML_GENERATED_FILES variable I've not been able to explore the reuse if autoconf rules, because it is a task too complex for me, but I've found a way to reduce the complexity in genxml Android.mk by using wildcards and $(call transform-generated-source) macro like in src/mesa/util Android.mk makefile. Emil, when you talk about reusing autoconf rules, do you mean to use androgenizer (from collabora?) as a mean to generate the Android.mk (on the fly)? In the meantime this is what I can provide now. Emil fixup! can be skipped and, as a proposal, can be replaced by the following two addendum patches to Jason's The first was tested and build was completed correctly, for the second it should be ok, but please review them. KR Mauro From 92d78d17e3b99cf7a94e3942788be347bd7dffe6 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Mon, 13 Jun 2016 23:50:05 +0200 Subject: [PATCH 1/2] android: genxml: optimize autogenerated headers rules Simplifications in the rules that generate gen{*}_pack.h headers in Android builds. --- src/intel/genxml/Android.mk | 34 -- 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/src/intel/genxml/Android.mk b/src/intel/genxml/Android.mk index e5b7597..b99a495 100644 --- a/src/intel/genxml/Android.mk +++ b/src/intel/genxml/Android.mk @@ -43,36 +43,10 @@ $(intermediates)/dummy.c: # This is the list of auto-generated files headers LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/genxml/, $(GENXML_GENERATED_FILES)) -define header-gen - @mkdir -p $(dir $@) - @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))" - $(hide) $(PRIVATE_SCRIPT) $(PRIVATE_XML) > $@ -endef - -$(intermediates)/genxml/gen6_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py -$(intermediates)/genxml/gen6_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen6.xml -$(intermediates)/genxml/gen6_pack.h: $(LOCAL_PATH)/gen6.xml $(LOCAL_PATH)/gen_pack_header.py - $(call header-gen) - -$(intermediates)/genxml/gen7_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py -$(intermediates)/genxml/gen7_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen7.xml -$(intermediates)/genxml/gen7_pack.h: $(LOCAL_PATH)/gen7.xml $(LOCAL_PATH)/gen_pack_header.py - $(call header-gen) - -$(intermediates)/genxml/gen75_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py -$(intermediates)/genxml/gen75_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen75.xml -$(intermediates)/genxml/gen75_pack.h: $(LOCAL_PATH)/gen75.xml $(LOCAL_PATH)/gen_pack_header.py - $(call header-gen) - -$(intermediates)/genxml/gen8_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py -$(intermediates)/genxml/gen8_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen8.xml -$(intermediates)/genxml/gen8_pack.h: $(LOCAL_PATH)/gen8.xml $(LOCAL_PATH)/gen_pack_header.py - $(call header-gen) - -$(intermediates)/genxml/gen9_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py -$(intermediates)/genxml/gen9_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen9.xml -$(intermediates)/genxml/gen9_pack.h: $(LOCAL_PATH)/gen9.xml $(LOCAL_PATH)/gen_pack_header.py - $(call header-gen) +$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2) +$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ > $@ +$(LOCAL_GENERATED_SOURCES): $(intermediates)/genxml/%_pack.h: $(LOCAL_PATH)/gen_pack_header.py $(LOCAL_PATH)/%.xml + $(transform-generated-source) LOCAL_EXPORT_C_INCLUDE_DIRS := \ $(MESA_TOP)/src/intel \ -- 2.7.4 From d30d1fc43081caf06c6e7d380b54da4c175ba99c Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Tue, 14 Jun 2016 00:05:23 +0200 Subject: [PATCH 2/2] android: genxml: update Makefile.sources with gen{4,45,5}_pack.h Makefile.sources need to be updated to correctly build Android. --- src/intel/genxml/Makefile.sources | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/intel/genxml/Makefile.sources b/src/intel/genxml/Makefile.sources index 9298b4a..86c0bbe 100644 --- a/src/intel/genxml/Makefile.sources +++ b/src/intel/genxml/Makefile.sources @@ -1,4 +1,7 @@ GENXML_GENERATED_FILES = \ + gen4_pack.h \ + gen45_pack.h \ + gen5_pack.h \ gen6_pack.h \ gen7_pack.h \ gen75_pack.h \ -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] fixup! genxml: Add enough XML for gens 4, 4.5, and 5 to get SURFACE_STATE
> Jason, feel free to pick whichever patch you like - the annoyingly > verbose from me or the shorter (en route to victory) from Mauro. > > -Emil Hi, just one final warning my condensed PATCH 1/2 works, but I just noticed now that it produces the following Warnings including ./external/mesa/Android.mk ... external/mesa/src/intel/genxml/Android.mk:48: target 'out/target/product/x86/gen/STATIC_LIBRARIES/libmesa_genxml_intermediates/dummy.c' doesn't match the target pattern external/mesa/src/intel/genxml/Android.mk:49: warning: overriding recipe for target 'out/target/product/x86/gen/STATIC_LIBRARIES/libmesa_genxml_intermediates/dummy.c' external/mesa/src/intel/genxml/Android.mk:39: warning: ignoring old recipe for target 'out/target/product/x86/gen/STATIC_LIBRARIES/libmesa_genxml_intermediates/dummy.c' The thing is that I don't know how to remove those warnings, because if I remove the rules for dummy.c generation I just get the building errors of missing gen*pack.h headers. This Android build system is really a beast with headers only projects like genxml If you know how to avoid those warnings do as you may, if not It is better to stick to Emil fixup! patch that was already resolving and without warnings. Mauro ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev