[Mesa-dev] [PATCH] android: i965: generate code for OA counter queries

Tapani Pälli tapani.palli at intel.com
Mon Mar 13 11:46:57 UTC 2017


Reviewed-by: Tapani Pälli <tapani.palli at intel.com>

On 03/13/2017 01:01 AM, Mauro Rossi wrote:
> Automake generation rules are replicated for android.
> $* macro was expected to return "hsw" but instead gives "hsw.{h,c}"
> so $(basename $*) is used as a workaround
> to set the correct --chipset option for brw_oa.py script.
>
> Build tested with nougat-x86
>
> Fixes: e565505 "i965: Add script to gen code for OA counter queries"
> ---
>  src/mesa/drivers/dri/i965/Android.mk | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk
> index 7dea3c2..6668930 100644
> --- a/src/mesa/drivers/dri/i965/Android.mk
> +++ b/src/mesa/drivers/dri/i965/Android.mk
> @@ -221,5 +221,22 @@ LOCAL_GENERATED_SOURCES := \
>  	$(MESA_DRI_OPTIONS_H) \
>  	$(MESA_GEN_NIR_H)
>
> +LOCAL_MODULE_CLASS := SHARED_LIBRARIES
> +
> +intermediates := $(call local-generated-sources-dir)
> +
> +LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \
> +	$(i965_oa_GENERATED_FILES))
> +
> +$(intermediates)/brw_oa_%.h: $(LOCAL_PATH)/brw_oa_%.xml $(LOCAL_PATH)/brw_oa.py
> +	@echo "target Generated: $(PRIVATE_MODULE) <= $(notdir $(@))"
> +	@mkdir -p $(dir $@)
> +	$(hide) $(MESA_PYTHON2) $(word 2, $^) --header=$@ --chipset=$(basename $*) $<
> +
> +$(intermediates)/brw_oa_%.c: $(LOCAL_PATH)/brw_oa_%.xml $(LOCAL_PATH)/brw_oa.py
> +	@echo "target Generated: $(PRIVATE_MODULE) <= $(notdir $(@))"
> +	@mkdir -p $(dir $@)
> +	$(hide) $(MESA_PYTHON2) $(word 2, $^) --code=$@ --chipset=$(basename $*) $<
> +
>  include $(MESA_COMMON_MK)
>  include $(BUILD_SHARED_LIBRARY)
>


More information about the mesa-dev mailing list