[Libva] [PATCH 8/9] Use python2 to execute gpp.py
Emil Velikov
emil.l.velikov at gmail.com
Thu Sep 18 09:45:46 PDT 2014
Under Archlinux python points to python3, which results in
assertion while generating the gen5-6 files.
make[5]: Entering directory
'/home/emil/development/intel-driver/src/shaders/post_processing/gen5_6'
GEN nv12_avs_nv12.g5s
Traceback (most recent call last):
File "../../../../src/shaders/gpp.py", line 200, in <module>
writeblocks(outfile, blocks)
File "../../../../src/shaders/gpp.py", line 168, in writeblocks
do_writeblock(block, [])
File "../../../../src/shaders/gpp.py", line 161, in do_writeblock
while check_cond(block.param_op, for_curs[0], block.param_limit):
File "../../../../src/shaders/gpp.py", line 139, in check_cond
assert type(lim) == int
AssertionError
GEN nv12_avs_nv12.g4b.gen5
nv12_avs_nv12.g5s: 1: syntax error at ""
Makefile:617: recipe for target 'nv12_avs_nv12.g4b.gen5' failed
Check at configure time for python2, and fall-back to python.
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
configure.ac | 1 +
src/shaders/h264/mc/Makefile.am | 4 ++--
src/shaders/post_processing/gen5_6/Makefile.am | 4 ++--
src/shaders/post_processing/gen7/Makefile.am | 2 +-
src/shaders/post_processing/gen8/Makefile.am | 2 +-
5 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 65fe0e9..83b6282 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,6 +66,7 @@ AC_HEADER_STDC
AC_SYS_LARGEFILE
AC_CHECK_LIB([m], [sin])
AC_CHECK_FUNCS([log2f])
+AC_CHECK_PROGS([PYTHON2], [python2 python])
LIBVA_PACKAGE_VERSION=libva_package_version
AC_SUBST(LIBVA_PACKAGE_VERSION)
diff --git a/src/shaders/h264/mc/Makefile.am b/src/shaders/h264/mc/Makefile.am
index 13bef17..5170503 100644
--- a/src/shaders/h264/mc/Makefile.am
+++ b/src/shaders/h264/mc/Makefile.am
@@ -186,12 +186,12 @@ if HAVE_GEN4ASM
$(INTEL_MC_GEN5_ASM): $(INTEL_MC_ASM) $(INTEL_MC_INC) $(INTEL_ILDB_ASM)
$(AM_V_GEN)cpp -DDEV_ILK -DBOOTSTRAP -I $(srcdir)/../ildb/ $(srcdir)/AllAVC.asm > _mc0.$@ && \
- $(top_srcdir)/src/shaders/gpp.py _mc0.$@ $@ && \
+ $(PYTHON2) $(top_srcdir)/src/shaders/gpp.py _mc0.$@ $@ && \
$(GEN4ASM) -l $(srcdir)/list -a -e tmp.$(INTEL_MC_EXPORT_GEN5) -g 5 $@ \
-o /dev/null && \
mv tmp.$(INTEL_MC_EXPORT_GEN5) $(INTEL_MC_EXPORT_GEN5) && \
cpp -DDEV_ILK -I $(srcdir)/../ildb/ $(srcdir)/AllAVC.asm > _mc1.$@ && \
- $(top_srcdir)/src/shaders/gpp.py _mc1.$@ $@ && \
+ $(PYTHON2) $(top_srcdir)/src/shaders/gpp.py _mc1.$@ $@ && \
rm _mc0.$@ _mc1.$@
$(INTEL_MC_G4B_GEN5): $(INTEL_MC_GEN5_ASM)
diff --git a/src/shaders/post_processing/gen5_6/Makefile.am b/src/shaders/post_processing/gen5_6/Makefile.am
index af515ae..cb47880 100755
--- a/src/shaders/post_processing/gen5_6/Makefile.am
+++ b/src/shaders/post_processing/gen5_6/Makefile.am
@@ -200,7 +200,7 @@ $(INTEL_G4B): $(INTEL_G4I)
$(INTEL_PP_GEN5_ASM): $(INTEL_PP_ASM)
.asm.g5s:
$(AM_V_GEN)cpp -D DEV_ILK -I $(srcdir)/Common/ -I $(srcdir)/Core_Kernels $< > _pp0.$@; \
- $(top_srcdir)/src/shaders/gpp.py _pp0.$@ $@; \
+ $(PYTHON2) $(top_srcdir)/src/shaders/gpp.py _pp0.$@ $@; \
rm _pp0.$@
.g5s.g4b.gen5:
$(AM_V_GEN)$(GEN4ASM) -a -o $@ -g 5 $<
@@ -208,7 +208,7 @@ $(INTEL_PP_GEN5_ASM): $(INTEL_PP_ASM)
$(INTEL_PP_GEN6_ASM): $(INTEL_PP_ASM)
.asm.g6s:
$(AM_V_GEN)cpp -D GT -I $(srcdir)/Common/ -I $(srcdir)/Core_Kernels $< > _pp0.$@; \
- $(top_srcdir)/src/shaders/gpp.py _pp0.$@ $@; \
+ $(PYTHON2) $(top_srcdir)/src/shaders/gpp.py _pp0.$@ $@; \
rm _pp0.$@
.g6s.g6b:
$(AM_V_GEN)$(GEN4ASM) -a -o $@ -g 6 $<
diff --git a/src/shaders/post_processing/gen7/Makefile.am b/src/shaders/post_processing/gen7/Makefile.am
index d8f20dd..4b27854 100644
--- a/src/shaders/post_processing/gen7/Makefile.am
+++ b/src/shaders/post_processing/gen7/Makefile.am
@@ -85,7 +85,7 @@ SUFFIXES = .g7b .g7s .asm
$(INTEL_PP_GEN7_ASM): $(INTEL_PP_ASM) $(INTEL_PP_G4A)
.asm.g7s:
$(AM_V_GEN)cpp $< > _pp0.$@; \
- $(top_srcdir)/src/shaders/gpp.py _pp0.$@ $@; \
+ $(PYTHON2) $(top_srcdir)/src/shaders/gpp.py _pp0.$@ $@; \
rm _pp0.$@
.g7s.g7b:
$(AM_V_GEN)$(GEN4ASM) -a -o $@ -g 7 $<
diff --git a/src/shaders/post_processing/gen8/Makefile.am b/src/shaders/post_processing/gen8/Makefile.am
index 4ebd77a..f103f64 100644
--- a/src/shaders/post_processing/gen8/Makefile.am
+++ b/src/shaders/post_processing/gen8/Makefile.am
@@ -60,7 +60,7 @@ SUFFIXES = .g8b .g8s .asm
$(INTEL_PP_GEN8_ASM): $(INTEL_PP_ASM) $(INTEL_PP_G8A)
.asm.g8s:
$(AM_V_GEN)cpp $< > _pp0.$@; \
- $(top_srcdir)/src/shaders/gpp.py _pp0.$@ $@; \
+ $(PYTHON2) $(top_srcdir)/src/shaders/gpp.py _pp0.$@ $@; \
rm _pp0.$@
.g8s.g8b:
$(AM_V_GEN)$(GEN4ASM) -a -o $@ -g 8 $<
--
2.1.0
More information about the Libva
mailing list