File builders/libepoxy-0/contrib/make.gnulinux changed (mode: 100755) (index 2dca1d5..6dca0b6) |
1 |
1 |
#!/bin/sh |
#!/bin/sh |
2 |
|
|
|
3 |
|
# this script is brutal and verbose, has no tricks and is quite linear, then |
|
4 |
|
# quite easy to deal with |
|
5 |
|
|
|
6 |
|
################################################################################ |
|
7 |
|
|
|
8 |
|
# stolen from ffmpeg configure like a pig |
|
9 |
2 |
set -e |
set -e |
10 |
|
|
|
11 |
|
# Prevent locale nonsense from breaking basic text processing. |
|
12 |
|
LC_ALL=C |
|
13 |
|
export LC_ALL |
|
14 |
|
|
|
|
3 |
|
#=============================================================================== |
15 |
4 |
sep_start() |
sep_start() |
16 |
5 |
{ |
{ |
17 |
6 |
printf '###############################################################################\n' |
printf '###############################################################################\n' |
|
... |
... |
sep_end() |
21 |
10 |
{ |
{ |
22 |
11 |
printf '###############################################################################\n\n' |
printf '###############################################################################\n\n' |
23 |
12 |
} |
} |
24 |
|
|
|
25 |
|
is_in() |
|
26 |
|
{ |
|
27 |
|
value=$1 |
|
28 |
|
shift |
|
29 |
|
for var in $*; do |
|
30 |
|
[ $var = $value ] && return 0 |
|
31 |
|
done |
|
32 |
|
return 1 |
|
33 |
|
} |
|
34 |
|
|
|
35 |
|
die_unknown() |
|
36 |
|
{ |
|
37 |
|
echo "Unknown option \"$1\"." |
|
38 |
|
echo "See $0 --help for available options." |
|
39 |
|
exit 1 |
|
40 |
|
} |
|
41 |
|
|
|
42 |
|
set_default() |
|
43 |
|
{ |
|
44 |
|
for opt; do |
|
45 |
|
eval : \${$opt:=\$${opt}_default} |
|
46 |
|
done |
|
47 |
|
} |
|
48 |
|
|
|
49 |
|
spaces_concat() |
|
50 |
|
{ |
|
51 |
|
printf "$1" | tr -s '[:space:]' ' ' |
|
52 |
|
} |
|
53 |
|
|
|
54 |
|
CMDLINE_SET=' |
|
55 |
|
python3 |
|
56 |
|
dslibepoxy_cc |
|
57 |
|
dslibepoxy_ccld |
|
58 |
|
prefix |
|
59 |
|
eprefix |
|
60 |
|
libdir |
|
61 |
|
includedir |
|
62 |
|
version |
|
63 |
|
' |
|
64 |
|
|
|
65 |
|
################################################################################ |
|
66 |
|
|
|
67 |
|
#command line set defaults |
|
68 |
13 |
#=============================================================================== |
#=============================================================================== |
69 |
|
# dynamically linked shared lib with a gcc toolchain |
|
70 |
|
dslibepoxy_cc_default="gcc -Wall -Wextra \ |
|
71 |
|
-fvisibility=hidden \ |
|
72 |
|
-std=c99 -O2 -fPIC -c" |
|
73 |
|
|
|
74 |
|
dslibepoxy_ccld_default="gcc -shared \ |
|
75 |
|
-Wl,-soname,libepoxy.so.0 \ |
|
76 |
|
-Bsymbolic \ |
|
77 |
|
-Wl,--no-undefined" |
|
|
14 |
|
echo '****BUILD START****' |
|
15 |
|
package_version=1.5.5 |
|
16 |
|
dslib_version_major=0 |
|
17 |
|
dslib_version_minor=1 |
|
18 |
|
dslib_version_micro=2 |
78 |
19 |
#=============================================================================== |
#=============================================================================== |
|
20 |
|
# build dir and src dir |
|
21 |
|
build_dir=$(readlink -e .) |
|
22 |
|
echo "build_dir=$build_dir" |
|
23 |
|
# we are in contrib |
|
24 |
|
src_dir=$(readlink -e $(dirname $0)/..) |
|
25 |
|
echo "src_dir=$src_dir" |
|
26 |
|
#=============================================================================== |
|
27 |
|
# the current configur-able variables may be individually overridden with the |
|
28 |
|
# content of the file in $1 or $build_dir/local_conf.sh. Look for "unset" |
|
29 |
|
# in those scripts to find what you can override to tune the build. |
|
30 |
|
if test -f "$1"; then |
|
31 |
|
. "$1" |
|
32 |
|
else |
|
33 |
|
if test -f $build_dir/local_conf.sh; then |
|
34 |
|
. $build_dir/local_conf.sh |
|
35 |
|
fi |
|
36 |
|
fi |
|
37 |
|
#=============================================================================== |
|
38 |
|
if test "${dslibepoxy_cc-unset}" = unset; then |
|
39 |
|
dslibepoxy_cc="gcc -Wall -Wextra \ |
|
40 |
|
-fvisibility=hidden \ |
|
41 |
|
-std=c99 -O2 -fPIC -c" |
|
42 |
|
fi |
79 |
43 |
|
|
80 |
|
python3_default='$(/usr/bin/env python3)' |
|
81 |
|
prefix_default=/usr/local |
|
82 |
|
eprefix_default='$prefix' |
|
83 |
|
libdir_default='$eprefix/lib' |
|
84 |
|
includedir_default='$prefix/include' |
|
85 |
|
version_default=1.5.3 |
|
86 |
|
set_default $CMDLINE_SET |
|
87 |
|
|
|
88 |
|
################################################################################ |
|
89 |
|
|
|
90 |
|
show_help(){ |
|
91 |
|
cat <<EOF |
|
92 |
|
Usage: make.gnulinux [options] |
|
93 |
|
|
|
94 |
|
default is to generate the development files and to build the dynamically linked shared lib |
|
95 |
|
|
|
96 |
|
Options: [defaults in brackets after descriptions] |
|
97 |
|
|
|
98 |
|
Help options: |
|
99 |
|
--help print this message |
|
100 |
|
|
|
101 |
|
Standard options: |
|
102 |
|
--python3=BIN the python3 interpreter to use to generate code [$python3_default] |
|
103 |
|
--prefix=PREFIX architecture independent prefix [$prefix_default] |
|
104 |
|
--eprefix=EPREFIX architecture dependent exec prefix [$eprefix_default] |
|
105 |
|
--libdir=DIR object code libraries [$libdir_default] |
|
106 |
|
--includedir=DIR C header files [$includedir_default] |
|
107 |
|
|
|
108 |
|
--version=VERSION override the version number [$version_default] |
|
109 |
|
|
|
110 |
|
Advanced options: |
|
111 |
|
--dslibepoxy-cc=CC use C compiler command line CC for target libepoxy archive [$(spaces_concat "$dslibepoxy_cc_default")] |
|
112 |
|
--dslibepoxy-ccld=CCLD use linker command line CCLD for target dynamically linked shared libepoxy [$(spaces_concat "$dslibepoxy_ccld_default")] |
|
113 |
|
EOF |
|
114 |
|
exit 0 |
|
115 |
|
} |
|
116 |
|
|
|
117 |
|
################################################################################ |
|
118 |
|
|
|
119 |
|
for opt do |
|
120 |
|
optval="${opt#*=}" |
|
121 |
|
case "$opt" in |
|
122 |
|
--help|-h) show_help |
|
123 |
|
;; |
|
124 |
|
*) |
|
125 |
|
optname=${opt%%=*} |
|
126 |
|
optname=${optname#--} |
|
127 |
|
optname=$(echo "$optname" | sed 's/-/_/g') |
|
128 |
|
if is_in $optname $CMDLINE_SET; then |
|
129 |
|
eval $optname='$optval' |
|
130 |
|
else |
|
131 |
|
die_unknown $opt |
|
132 |
|
fi |
|
133 |
|
;; |
|
134 |
|
esac |
|
135 |
|
done |
|
136 |
|
|
|
137 |
|
################################################################################ |
|
138 |
|
|
|
139 |
|
path_expand() |
|
140 |
|
{ |
|
141 |
|
e_v=$1 |
|
142 |
|
#we set a maximum expansion depth of 3 |
|
143 |
|
for d in 1 2 3 |
|
144 |
|
do |
|
145 |
|
e_v=$(eval echo "$e_v") |
|
146 |
|
done |
|
147 |
|
#get rid of ugly double // in path |
|
148 |
|
echo "$e_v" | sed -e 's%//%/%g' |
|
149 |
|
} |
|
150 |
|
|
|
151 |
|
sep_start;echo 'expanding final paths:' |
|
152 |
|
e_prefix=$(path_expand "$prefix") |
|
153 |
|
e_eprefix=$(path_expand "$eprefix") |
|
154 |
|
e_libdir=$(path_expand "$libdir") |
|
155 |
|
e_includedir=$(path_expand "$includedir") |
|
156 |
|
|
|
157 |
|
echo "prefix=$e_prefix" |
|
158 |
|
echo "eprefix=$e_eprefix" |
|
159 |
|
echo "libdir=$e_libdir" |
|
160 |
|
echo "includedir=$e_includedir" |
|
161 |
|
|
|
162 |
|
printf "\nusing python3:$python3\n" |
|
163 |
|
sep_end |
|
164 |
|
|
|
165 |
|
################################################################################ |
|
|
44 |
|
# template with soname, will be evaluated once |
|
45 |
|
if test "${dslibepoxy_ccld-unset}" = unset; then |
|
46 |
|
dslibepoxy_ccld="gcc -shared \ |
|
47 |
|
-Wl,-soname,libepoxy.so.\$soname \ |
|
48 |
|
-Bsymbolic \ |
|
49 |
|
-Wl,--no-undefined" |
|
50 |
|
fi |
|
51 |
|
#=============================================================================== |
|
52 |
|
if test "${python3-unset}" = unset; then |
|
53 |
|
python3=$(/usr/bin/env python3) |
|
54 |
|
fi |
166 |
55 |
|
|
167 |
|
sep_start;echo 'looking for top source dir and top build dir:' |
|
168 |
|
if test -f ./make.gnulinux; then |
|
169 |
|
# we are in "$top_srcdir/contrib" dir |
|
170 |
|
top_srcdir=.. |
|
171 |
|
else |
|
172 |
|
top_srcdir=$(cd $(dirname "$0")/..; pwd) |
|
|
56 |
|
if test "${prefix-unset}" = unset; then |
|
57 |
|
prefix=/usr/local |
173 |
58 |
fi |
fi |
174 |
|
echo "top source dir is $top_srcdir" |
|
175 |
59 |
|
|
176 |
|
top_builddir=$(readlink -e ./) |
|
177 |
|
echo "top build dir is $top_builddir" |
|
|
60 |
|
if test "${eprefix-unset}" = unset; then |
|
61 |
|
eprefix=$prefix |
|
62 |
|
fi |
178 |
63 |
|
|
179 |
|
rm -Rf $top_builddir/fake_root |
|
180 |
|
rm -Rf $top_builddir/gen_src |
|
181 |
|
sep_end |
|
|
64 |
|
if test "${lib_dir-unset}" = unset; then |
|
65 |
|
lib_dir=$eprefix/lib |
|
66 |
|
fi |
182 |
67 |
|
|
183 |
|
################################################################################ |
|
|
68 |
|
if test "${include_dir-unset}" = unset; then |
|
69 |
|
include_dir=$prefix/include |
|
70 |
|
fi |
|
71 |
|
#=============================================================================== |
|
72 |
|
rm -Rf $build_dir/fake_root |
|
73 |
|
rm -Rf $build_dir/gen_src |
184 |
74 |
|
|
185 |
75 |
sep_start;echo 'dslibepoxy:generating include and source files with the python3 based generator' |
sep_start;echo 'dslibepoxy:generating include and source files with the python3 based generator' |
186 |
|
mkdir -p -- $top_builddir/gen_src |
|
187 |
|
mkdir -p -- $top_builddir/fake_root$e_includedir/epoxy |
|
|
76 |
|
printf "using python3:$python3\n" |
|
77 |
|
mkdir -p -- $build_dir/gen_src |
|
78 |
|
mkdir -p -- $build_dir/fake_root$include_dir/epoxy |
188 |
79 |
|
|
189 |
80 |
for registry in gl.xml glx.xml egl.xml |
for registry in gl.xml glx.xml egl.xml |
190 |
81 |
do |
do |
191 |
82 |
echo "PYTHON3 GEN $registry" |
echo "PYTHON3 GEN $registry" |
192 |
|
$python3 $top_srcdir/src/gen_dispatch.py \ |
|
193 |
|
--srcdir $top_builddir/gen_src \ |
|
194 |
|
--includedir $top_builddir/fake_root$e_includedir/epoxy \ |
|
195 |
|
$top_srcdir/registry/$registry |
|
|
83 |
|
$python3 $src_dir/src/gen_dispatch.py \ |
|
84 |
|
--srcdir $build_dir/gen_src \ |
|
85 |
|
--includedir $build_dir/fake_root$include_dir/epoxy \ |
|
86 |
|
$src_dir/registry/$registry & |
196 |
87 |
done |
done |
197 |
88 |
sep_end |
sep_end |
198 |
|
|
|
199 |
|
################################################################################ |
|
200 |
|
|
|
201 |
|
sep_start;echo "fake installing the header files in fake_root$e_includedir" |
|
202 |
|
cp -f $top_srcdir/include/epoxy/common.h \ |
|
203 |
|
$top_srcdir/include/epoxy/gl.h \ |
|
204 |
|
$top_srcdir/include/epoxy/egl.h \ |
|
205 |
|
$top_srcdir/include/epoxy/glx.h \ |
|
206 |
|
$top_builddir/fake_root$e_includedir/epoxy |
|
|
89 |
|
#=============================================================================== |
|
90 |
|
sep_start;echo "fake installing the header files in fake_root$include_dir" |
|
91 |
|
wait |
|
92 |
|
cp -f $src_dir/include/epoxy/common.h \ |
|
93 |
|
$src_dir/include/epoxy/gl.h \ |
|
94 |
|
$src_dir/include/epoxy/egl.h \ |
|
95 |
|
$src_dir/include/epoxy/glx.h \ |
|
96 |
|
$build_dir/fake_root$include_dir/epoxy |
207 |
97 |
sep_end |
sep_end |
208 |
|
|
|
209 |
|
################################################################################ |
|
210 |
|
|
|
|
98 |
|
#=============================================================================== |
211 |
99 |
sep_start;echo 'dslibepoxy:compile src files' |
sep_start;echo 'dslibepoxy:compile src files' |
212 |
|
|
|
213 |
100 |
#------------------------------------------------------------------------------- |
#------------------------------------------------------------------------------- |
214 |
|
# take one parameter: the top dir where to find the source files |
|
|
101 |
|
# take one parameter: the dir where to find the source files |
215 |
102 |
compile() |
compile() |
216 |
103 |
{ |
{ |
217 |
104 |
for libepoxy_src_file in $libepoxy_src_files |
for libepoxy_src_file in $libepoxy_src_files |
|
... |
... |
do |
220 |
107 |
dslibepoxy_o_file_name=$(basename $libepoxy_src_file .c) |
dslibepoxy_o_file_name=$(basename $libepoxy_src_file .c) |
221 |
108 |
dslibepoxy_o_file=$(dirname $libepoxy_src_file)/ds${dslibepoxy_o_file_name}.o |
dslibepoxy_o_file=$(dirname $libepoxy_src_file)/ds${dslibepoxy_o_file_name}.o |
222 |
109 |
|
|
223 |
|
mkdir -p -- $(dirname $top_builddir/$dslibepoxy_o_file) |
|
|
110 |
|
mkdir -p -- $(dirname $build_dir/$dslibepoxy_o_file) |
224 |
111 |
|
|
225 |
112 |
# we rely on pkg-config to prioritize x11 headers |
# we rely on pkg-config to prioritize x11 headers |
226 |
|
echo "DSLIBEPOXY_CC $1/$libepoxy_src_file--->$top_builddir/$dslibepoxy_o_file" |
|
227 |
|
$dslibepoxy_cc -o $top_builddir/$dslibepoxy_o_file \ |
|
|
113 |
|
echo "DSLIBEPOXY_CC $1/$libepoxy_src_file--->$build_dir/$dslibepoxy_o_file" |
|
114 |
|
$dslibepoxy_cc -o $build_dir/$dslibepoxy_o_file \ |
228 |
115 |
$(pkg-config --cflags x11 egl) \ |
$(pkg-config --cflags x11 egl) \ |
229 |
|
-I$top_builddir/fake_root$e_includedir \ |
|
230 |
|
-I$top_srcdir/contrib \ |
|
231 |
|
-I$top_srcdir/src \ |
|
232 |
|
$1/$libepoxy_src_file |
|
|
116 |
|
-I$build_dir/fake_root$include_dir \ |
|
117 |
|
-I$src_dir/contrib \ |
|
118 |
|
-I$src_dir/src \ |
|
119 |
|
$1/$libepoxy_src_file & |
233 |
120 |
|
|
234 |
|
dslibepoxy_o_files="$top_builddir/$dslibepoxy_o_file $dslibepoxy_o_files" |
|
|
121 |
|
dslibepoxy_o_files="$build_dir/$dslibepoxy_o_file $dslibepoxy_o_files" |
235 |
122 |
done |
done |
236 |
|
|
|
237 |
123 |
} |
} |
238 |
124 |
#------------------------------------------------------------------------------- |
#------------------------------------------------------------------------------- |
239 |
|
|
|
240 |
125 |
libepoxy_src_files=" |
libepoxy_src_files=" |
241 |
126 |
gen_src/egl_generated_dispatch.c |
gen_src/egl_generated_dispatch.c |
242 |
127 |
gen_src/gl_generated_dispatch.c |
gen_src/gl_generated_dispatch.c |
243 |
128 |
gen_src/glx_generated_dispatch.c |
gen_src/glx_generated_dispatch.c |
244 |
129 |
" |
" |
245 |
|
compile $top_builddir |
|
|
130 |
|
compile $build_dir |
246 |
131 |
|
|
247 |
132 |
libepoxy_src_files=" |
libepoxy_src_files=" |
248 |
133 |
src/dispatch_egl.c |
src/dispatch_egl.c |
249 |
134 |
src/dispatch_glx.c |
src/dispatch_glx.c |
250 |
135 |
src/dispatch_common.c |
src/dispatch_common.c |
251 |
136 |
" |
" |
252 |
|
compile $top_srcdir |
|
|
137 |
|
compile $src_dir |
253 |
138 |
|
|
254 |
139 |
sep_end |
sep_end |
255 |
|
|
|
256 |
|
################################################################################ |
|
257 |
|
|
|
|
140 |
|
#=============================================================================== |
258 |
141 |
sep_start;echo 'dslibepoxy:link the object files to produce the dynamically linked shared lib' |
sep_start;echo 'dslibepoxy:link the object files to produce the dynamically linked shared lib' |
259 |
|
echo "DSLIBEPOXY_CCLD libepoxy.so.0.0.0" |
|
|
142 |
|
echo "DSLIBEPOXY_CCLD libepoxy.so.$dslib_version_major.$dslib_version_minor.$dslib_version_micro" |
260 |
143 |
|
|
261 |
|
mkdir -p -- $top_builddir/fake_root$e_libdir |
|
|
144 |
|
mkdir -p -- $build_dir/fake_root$lib_dir |
262 |
145 |
|
|
263 |
|
$dslibepoxy_ccld -o $top_builddir/fake_root$e_libdir/libepoxy.so.0.0.0 \ |
|
264 |
|
$dslibepoxy_o_files \ |
|
265 |
|
-ldl |
|
266 |
|
|
|
267 |
|
ln -sf libepoxy.so.0.0.0 $top_builddir/fake_root$e_libdir/libepoxy.so.0 |
|
268 |
|
ln -sf libepoxy.so.0 $top_builddir/fake_root$e_libdir/libepoxy.so |
|
269 |
|
sep_end |
|
|
146 |
|
# evaluate the ccld template with the soname parameter |
|
147 |
|
soname=libepoxy.so.$dslib_version_major |
|
148 |
|
eval "dslibepoxy_ccld_e=\"$dslibepoxy_ccld\"" |
270 |
149 |
|
|
271 |
|
################################################################################ |
|
|
150 |
|
wait |
|
151 |
|
$dslibepoxy_ccld_e -o $build_dir/fake_root$lib_dir/libepoxy.so.$dslib_version_major.$dslib_version_minor.$dslib_version_micro \ |
|
152 |
|
$dslibepoxy_o_files \ |
|
153 |
|
-ldl & |
272 |
154 |
|
|
|
155 |
|
ln -sf libepoxy.so.$dslib_version_major.$dslib_version_minor.$dslib_version_micro $build_dir/fake_root$lib_dir/libepoxy.so.$dslib_version_major |
|
156 |
|
ln -sf libepoxy.so.$dslib_version_major $build_dir/fake_root$lib_dir/libepoxy.so |
|
157 |
|
sep_end |
|
158 |
|
#=============================================================================== |
273 |
159 |
sep_start;echo 'generating pkg-config file for epoxy' |
sep_start;echo 'generating pkg-config file for epoxy' |
274 |
|
mkdir -p -- $top_builddir/fake_root$e_libdir/pkgconfig |
|
275 |
|
|
|
276 |
|
cp -f $top_srcdir/epoxy.pc.in $top_builddir/fake_root$e_libdir/pkgconfig/epoxy.pc |
|
277 |
|
sed -i "s%@PACKAGE_VERSION@%$version%" $top_builddir/fake_root$e_libdir/pkgconfig/epoxy.pc |
|
278 |
|
sed -i "s%@prefix@%$e_prefix%" $top_builddir/fake_root$e_libdir/pkgconfig/epoxy.pc |
|
279 |
|
sed -i "s%@exec_prefix@%$e_eprefix%" $top_builddir/fake_root$e_libdir/pkgconfig/epoxy.pc |
|
280 |
|
sed -i "s%@libdir@%$e_libdir%" $top_builddir/fake_root$e_libdir/pkgconfig/epoxy.pc |
|
281 |
|
sed -i "s%@includedir@%$e_includedir%" $top_builddir/fake_root$e_libdir/pkgconfig/epoxy.pc |
|
282 |
|
sed -i "s%@DLOPEN_LIBS@%-ldl%" $top_builddir/fake_root$e_libdir/pkgconfig/epoxy.pc |
|
283 |
|
sed -i "s%@epoxy_has_glx@%1%" $top_builddir/fake_root$e_libdir/pkgconfig/epoxy.pc |
|
284 |
|
sed -i "s%@epoxy_has_egl@%1%" $top_builddir/fake_root$e_libdir/pkgconfig/epoxy.pc |
|
285 |
|
sed -i "s%@epoxy_has_wgl@%0%" $top_builddir/fake_root$e_libdir/pkgconfig/epoxy.pc |
|
286 |
|
sed -i "s%@GL_REQS@%gl egl%" $top_builddir/fake_root$e_libdir/pkgconfig/epoxy.pc |
|
|
160 |
|
mkdir -p -- $build_dir/fake_root$lib_dir/pkgconfig |
|
161 |
|
|
|
162 |
|
cp -f $src_dir/contrib/epoxy.pc.in $build_dir/fake_root$lib_dir/pkgconfig/epoxy.pc |
|
163 |
|
sed -i "s%@PACKAGE_VERSION@%$package_version%" $build_dir/fake_root$lib_dir/pkgconfig/epoxy.pc |
|
164 |
|
sed -i "s%@prefix@%$prefix%" $build_dir/fake_root$lib_dir/pkgconfig/epoxy.pc |
|
165 |
|
sed -i "s%@exec_prefix@%$eprefix%" $build_dir/fake_root$lib_dir/pkgconfig/epoxy.pc |
|
166 |
|
sed -i "s%@libdir@%$lib_dir%" $build_dir/fake_root$lib_dir/pkgconfig/epoxy.pc |
|
167 |
|
sed -i "s%@includedir@%$include_dir%" $build_dir/fake_root$lib_dir/pkgconfig/epoxy.pc |
|
168 |
|
sed -i "s%@DLOPEN_LIBS@%-ldl%" $build_dir/fake_root$lib_dir/pkgconfig/epoxy.pc |
|
169 |
|
sed -i "s%@epoxy_has_glx@%1%" $build_dir/fake_root$lib_dir/pkgconfig/epoxy.pc |
|
170 |
|
sed -i "s%@epoxy_has_egl@%1%" $build_dir/fake_root$lib_dir/pkgconfig/epoxy.pc |
|
171 |
|
sed -i "s%@epoxy_has_wgl@%0%" $build_dir/fake_root$lib_dir/pkgconfig/epoxy.pc |
|
172 |
|
sed -i "s%@GL_REQS@%gl egl%" $build_dir/fake_root$lib_dir/pkgconfig/epoxy.pc |
287 |
173 |
sep_end |
sep_end |
|
174 |
|
#=============================================================================== |
|
175 |
|
wait |
|
176 |
|
echo '****BUILD FINISHED****' |
File builders/mesa-vulkan-0/contrib/generators/nir/intrinsics/generic/image.c changed (mode: 100644) (index a91852e..e8c4705) |
21 |
21 |
/* deref version */ |
/* deref version */ |
22 |
22 |
struct nir_intrinsic nir_image_deref_load = { |
struct nir_intrinsic nir_image_deref_load = { |
23 |
23 |
.name = "image_deref_load", |
.name = "image_deref_load", |
24 |
|
.srcs_n = 3, |
|
|
24 |
|
.srcs_n = 4, |
25 |
25 |
.src_components_n = { |
.src_components_n = { |
26 |
|
1,4,1 |
|
|
26 |
|
1,4,1,1 |
27 |
27 |
}, |
}, |
28 |
28 |
.has_dest = true, |
.has_dest = true, |
29 |
29 |
.dest_components_n = 0, |
.dest_components_n = 0, |
|
... |
... |
struct nir_intrinsic nir_image_deref_load = { |
35 |
35 |
}; |
}; |
36 |
36 |
struct nir_intrinsic nir_image_deref_store = { |
struct nir_intrinsic nir_image_deref_store = { |
37 |
37 |
.name = "image_deref_store", |
.name = "image_deref_store", |
38 |
|
.srcs_n = 4, |
|
|
38 |
|
.srcs_n = 5, |
39 |
39 |
.src_components_n = { |
.src_components_n = { |
40 |
|
1,4,1,0 |
|
|
40 |
|
1,4,1,0,1 |
41 |
41 |
}, |
}, |
42 |
42 |
.idxs_n = 1, |
.idxs_n = 1, |
43 |
43 |
.idxs_map = { |
.idxs_map = { |
|
... |
... |
struct nir_intrinsic nir_image_deref_samples = { |
214 |
214 |
}, |
}, |
215 |
215 |
.flags = NIR_INTRINSIC_FLAGS_CAN_ELIMINATE | NIR_INTRINSIC_FLAGS_CAN_REORDER |
.flags = NIR_INTRINSIC_FLAGS_CAN_ELIMINATE | NIR_INTRINSIC_FLAGS_CAN_REORDER |
216 |
216 |
}; |
}; |
217 |
|
struct nir_intrinsic nir_image_deref_load_raw_intel = { |
|
218 |
|
.name = "image_deref_load_raw_intel", |
|
219 |
|
.srcs_n = 2, |
|
220 |
|
.src_components_n = { |
|
221 |
|
1,1 |
|
222 |
|
}, |
|
223 |
|
.has_dest = true, |
|
224 |
|
.idxs_n = 1, |
|
225 |
|
.idxs_map = { |
|
226 |
|
[NIR_INTRINSIC_IDX_ACCESS] = 1 |
|
227 |
|
}, |
|
228 |
|
.flags = NIR_INTRINSIC_FLAGS_CAN_ELIMINATE |
|
229 |
|
}; |
|
230 |
|
struct nir_intrinsic nir_image_deref_store_raw_intel = { |
|
231 |
|
.name = "image_deref_store_raw_intel", |
|
232 |
|
.srcs_n = 3, |
|
233 |
|
.src_components_n = { |
|
234 |
|
1,1,0 |
|
235 |
|
}, |
|
236 |
|
.idxs_n = 1, |
|
237 |
|
.idxs_map = { |
|
238 |
|
[NIR_INTRINSIC_IDX_ACCESS] = 1 |
|
239 |
|
} |
|
240 |
|
}; |
|
241 |
217 |
struct nir_intrinsic nir_image_deref_atomic_inc_wrap = { |
struct nir_intrinsic nir_image_deref_atomic_inc_wrap = { |
242 |
218 |
.name = "image_deref_atomic_inc_wrap", |
.name = "image_deref_atomic_inc_wrap", |
243 |
219 |
.srcs_n = 4, |
.srcs_n = 4, |
|
... |
... |
struct nir_intrinsic nir_image_deref_atomic_dec_wrap = { |
269 |
245 |
/* plain version */ |
/* plain version */ |
270 |
246 |
struct nir_intrinsic nir_image_load = { |
struct nir_intrinsic nir_image_load = { |
271 |
247 |
.name = "image_load", |
.name = "image_load", |
272 |
|
.srcs_n = 3, |
|
|
248 |
|
.srcs_n = 4, |
273 |
249 |
.src_components_n = { |
.src_components_n = { |
274 |
|
1,4,1 |
|
|
250 |
|
1,4,1,1 |
275 |
251 |
}, |
}, |
276 |
252 |
.has_dest = true, |
.has_dest = true, |
277 |
253 |
.idxs_n = 4, |
.idxs_n = 4, |
|
... |
... |
struct nir_intrinsic nir_image_load = { |
285 |
261 |
}; |
}; |
286 |
262 |
struct nir_intrinsic nir_image_store = { |
struct nir_intrinsic nir_image_store = { |
287 |
263 |
.name = "image_store", |
.name = "image_store", |
288 |
|
.srcs_n = 4, |
|
|
264 |
|
.srcs_n = 5, |
289 |
265 |
.src_components_n = { |
.src_components_n = { |
290 |
|
1,4,1,0 |
|
|
266 |
|
1,4,1,0,1 |
291 |
267 |
}, |
}, |
292 |
268 |
.idxs_n = 4, |
.idxs_n = 4, |
293 |
269 |
.idxs_map = { |
.idxs_map = { |
|
... |
... |
struct nir_intrinsic nir_image_samples = { |
506 |
482 |
}, |
}, |
507 |
483 |
.flags = NIR_INTRINSIC_FLAGS_CAN_ELIMINATE | NIR_INTRINSIC_FLAGS_CAN_REORDER |
.flags = NIR_INTRINSIC_FLAGS_CAN_ELIMINATE | NIR_INTRINSIC_FLAGS_CAN_REORDER |
508 |
484 |
}; |
}; |
509 |
|
struct nir_intrinsic nir_image_load_raw_intel = { |
|
510 |
|
.name = "image_load_raw_intel", |
|
511 |
|
.srcs_n = 2, |
|
512 |
|
.src_components_n = { |
|
513 |
|
1,1 |
|
514 |
|
}, |
|
515 |
|
.has_dest = true, |
|
516 |
|
.idxs_n = 4, |
|
517 |
|
.idxs_map = { |
|
518 |
|
[NIR_INTRINSIC_IDX_IMAGE_DIM] = 1, |
|
519 |
|
[NIR_INTRINSIC_IDX_IMAGE_ARRAY] = 2, |
|
520 |
|
[NIR_INTRINSIC_IDX_FORMAT] = 3, |
|
521 |
|
[NIR_INTRINSIC_IDX_ACCESS] = 4 |
|
522 |
|
}, |
|
523 |
|
.flags = NIR_INTRINSIC_FLAGS_CAN_ELIMINATE |
|
524 |
|
}; |
|
525 |
|
struct nir_intrinsic nir_image_store_raw_intel = { |
|
526 |
|
.name = "image_store_raw_intel", |
|
527 |
|
.srcs_n = 3, |
|
528 |
|
.src_components_n = { |
|
529 |
|
1,1,0 |
|
530 |
|
}, |
|
531 |
|
.idxs_n = 4, |
|
532 |
|
.idxs_map = { |
|
533 |
|
[NIR_INTRINSIC_IDX_IMAGE_DIM] = 1, |
|
534 |
|
[NIR_INTRINSIC_IDX_IMAGE_ARRAY] = 2, |
|
535 |
|
[NIR_INTRINSIC_IDX_FORMAT] = 3, |
|
536 |
|
[NIR_INTRINSIC_IDX_ACCESS] = 4 |
|
537 |
|
} |
|
538 |
|
}; |
|
539 |
485 |
struct nir_intrinsic nir_image_atomic_inc_wrap = { |
struct nir_intrinsic nir_image_atomic_inc_wrap = { |
540 |
486 |
.name = "image_atomic_inc_wrap", |
.name = "image_atomic_inc_wrap", |
541 |
487 |
.srcs_n = 4, |
.srcs_n = 4, |
|
... |
... |
struct nir_intrinsic nir_image_atomic_dec_wrap = { |
573 |
519 |
/* bindless version */ |
/* bindless version */ |
574 |
520 |
struct nir_intrinsic nir_bindless_image_load = { |
struct nir_intrinsic nir_bindless_image_load = { |
575 |
521 |
.name = "bindless_image_load", |
.name = "bindless_image_load", |
576 |
|
.srcs_n = 3, |
|
|
522 |
|
.srcs_n = 4, |
577 |
523 |
.src_components_n = { |
.src_components_n = { |
578 |
|
1,4,1 |
|
|
524 |
|
1,4,1,1 |
579 |
525 |
}, |
}, |
580 |
526 |
.has_dest = true, |
.has_dest = true, |
581 |
527 |
.idxs_n = 4, |
.idxs_n = 4, |
|
... |
... |
struct nir_intrinsic nir_bindless_image_load = { |
589 |
535 |
}; |
}; |
590 |
536 |
struct nir_intrinsic nir_bindless_image_store = { |
struct nir_intrinsic nir_bindless_image_store = { |
591 |
537 |
.name = "bindless_image_store", |
.name = "bindless_image_store", |
592 |
|
.srcs_n = 4, |
|
|
538 |
|
.srcs_n = 5, |
593 |
539 |
.src_components_n = { |
.src_components_n = { |
594 |
|
1,4,1,0 |
|
|
540 |
|
1,4,1,0,1 |
595 |
541 |
}, |
}, |
596 |
542 |
.idxs_n = 4, |
.idxs_n = 4, |
597 |
543 |
.idxs_map = { |
.idxs_map = { |
|
... |
... |
struct nir_intrinsic nir_bindless_image_samples = { |
810 |
756 |
}, |
}, |
811 |
757 |
.flags = NIR_INTRINSIC_FLAGS_CAN_ELIMINATE | NIR_INTRINSIC_FLAGS_CAN_REORDER |
.flags = NIR_INTRINSIC_FLAGS_CAN_ELIMINATE | NIR_INTRINSIC_FLAGS_CAN_REORDER |
812 |
758 |
}; |
}; |
813 |
|
struct nir_intrinsic nir_bindless_image_load_raw_intel = { |
|
814 |
|
.name = "bindless_image_load_raw_intel", |
|
815 |
|
.srcs_n = 2, |
|
816 |
|
.src_components_n = { |
|
817 |
|
1,1 |
|
818 |
|
}, |
|
819 |
|
.has_dest = true, |
|
820 |
|
.idxs_n = 4, |
|
821 |
|
.idxs_map = { |
|
822 |
|
[NIR_INTRINSIC_IDX_IMAGE_DIM] = 1, |
|
823 |
|
[NIR_INTRINSIC_IDX_IMAGE_ARRAY] = 2, |
|
824 |
|
[NIR_INTRINSIC_IDX_FORMAT] = 3, |
|
825 |
|
[NIR_INTRINSIC_IDX_ACCESS] = 4 |
|
826 |
|
}, |
|
827 |
|
.flags = NIR_INTRINSIC_FLAGS_CAN_ELIMINATE |
|
828 |
|
}; |
|
829 |
|
struct nir_intrinsic nir_bindless_image_store_raw_intel = { |
|
830 |
|
.name = "bindless_image_store_raw_intel", |
|
831 |
|
.srcs_n = 3, |
|
832 |
|
.src_components_n = { |
|
833 |
|
1,1,0 |
|
834 |
|
}, |
|
835 |
|
.idxs_n = 4, |
|
836 |
|
.idxs_map = { |
|
837 |
|
[NIR_INTRINSIC_IDX_IMAGE_DIM] = 1, |
|
838 |
|
[NIR_INTRINSIC_IDX_IMAGE_ARRAY] = 2, |
|
839 |
|
[NIR_INTRINSIC_IDX_FORMAT] = 3, |
|
840 |
|
[NIR_INTRINSIC_IDX_ACCESS] = 4 |
|
841 |
|
} |
|
842 |
|
}; |
|
843 |
759 |
struct nir_intrinsic nir_bindless_image_atomic_inc_wrap = { |
struct nir_intrinsic nir_bindless_image_atomic_inc_wrap = { |
844 |
760 |
.name = "bindless_image_atomic_inc_wrap", |
.name = "bindless_image_atomic_inc_wrap", |
845 |
761 |
.srcs_n = 4, |
.srcs_n = 4, |
File builders/mesa-vulkan-0/contrib/generators/nir/intrinsics/intel/image.c changed (mode: 100644) (index 47a4232..071fd65) |
... |
... |
struct nir_intrinsic nir_image_deref_load_param_intel = { |
12 |
12 |
}, |
}, |
13 |
13 |
.flags = NIR_INTRINSIC_FLAGS_CAN_ELIMINATE | NIR_INTRINSIC_FLAGS_CAN_REORDER |
.flags = NIR_INTRINSIC_FLAGS_CAN_ELIMINATE | NIR_INTRINSIC_FLAGS_CAN_REORDER |
14 |
14 |
}; |
}; |
|
15 |
|
/*----------------------------------------------------------------------------*/ |
|
16 |
|
/* deref version */ |
|
17 |
|
struct nir_intrinsic nir_image_deref_load_raw_intel = { |
|
18 |
|
.name = "image_deref_load_raw_intel", |
|
19 |
|
.srcs_n = 2, |
|
20 |
|
.src_components_n = { |
|
21 |
|
1,1 |
|
22 |
|
}, |
|
23 |
|
.has_dest = true, |
|
24 |
|
.idxs_n = 1, |
|
25 |
|
.idxs_map = { |
|
26 |
|
[NIR_INTRINSIC_IDX_ACCESS] = 1 |
|
27 |
|
}, |
|
28 |
|
.flags = NIR_INTRINSIC_FLAGS_CAN_ELIMINATE |
|
29 |
|
}; |
|
30 |
|
struct nir_intrinsic nir_image_deref_store_raw_intel = { |
|
31 |
|
.name = "image_deref_store_raw_intel", |
|
32 |
|
.srcs_n = 3, |
|
33 |
|
.src_components_n = { |
|
34 |
|
1,1,0 |
|
35 |
|
}, |
|
36 |
|
.idxs_n = 1, |
|
37 |
|
.idxs_map = { |
|
38 |
|
[NIR_INTRINSIC_IDX_ACCESS] = 1 |
|
39 |
|
} |
|
40 |
|
}; |
|
41 |
|
/* deref version */ |
|
42 |
|
/*----------------------------------------------------------------------------*/ |
|
43 |
|
/* plain version */ |
|
44 |
|
struct nir_intrinsic nir_image_load_raw_intel = { |
|
45 |
|
.name = "image_load_raw_intel", |
|
46 |
|
.srcs_n = 2, |
|
47 |
|
.src_components_n = { |
|
48 |
|
1,1 |
|
49 |
|
}, |
|
50 |
|
.has_dest = true, |
|
51 |
|
.idxs_n = 4, |
|
52 |
|
.idxs_map = { |
|
53 |
|
[NIR_INTRINSIC_IDX_IMAGE_DIM] = 1, |
|
54 |
|
[NIR_INTRINSIC_IDX_IMAGE_ARRAY] = 2, |
|
55 |
|
[NIR_INTRINSIC_IDX_FORMAT] = 3, |
|
56 |
|
[NIR_INTRINSIC_IDX_ACCESS] = 4 |
|
57 |
|
}, |
|
58 |
|
.flags = NIR_INTRINSIC_FLAGS_CAN_ELIMINATE |
|
59 |
|
}; |
|
60 |
|
struct nir_intrinsic nir_image_store_raw_intel = { |
|
61 |
|
.name = "image_store_raw_intel", |
|
62 |
|
.srcs_n = 3, |
|
63 |
|
.src_components_n = { |
|
64 |
|
1,1,0 |
|
65 |
|
}, |
|
66 |
|
.idxs_n = 4, |
|
67 |
|
.idxs_map = { |
|
68 |
|
[NIR_INTRINSIC_IDX_IMAGE_DIM] = 1, |
|
69 |
|
[NIR_INTRINSIC_IDX_IMAGE_ARRAY] = 2, |
|
70 |
|
[NIR_INTRINSIC_IDX_FORMAT] = 3, |
|
71 |
|
[NIR_INTRINSIC_IDX_ACCESS] = 4 |
|
72 |
|
} |
|
73 |
|
}; |
|
74 |
|
/* plain version */ |
|
75 |
|
/*----------------------------------------------------------------------------*/ |
|
76 |
|
/* bindless version */ |
|
77 |
|
struct nir_intrinsic nir_bindless_image_load_raw_intel = { |
|
78 |
|
.name = "bindless_image_load_raw_intel", |
|
79 |
|
.srcs_n = 2, |
|
80 |
|
.src_components_n = { |
|
81 |
|
1,1 |
|
82 |
|
}, |
|
83 |
|
.has_dest = true, |
|
84 |
|
.idxs_n = 4, |
|
85 |
|
.idxs_map = { |
|
86 |
|
[NIR_INTRINSIC_IDX_IMAGE_DIM] = 1, |
|
87 |
|
[NIR_INTRINSIC_IDX_IMAGE_ARRAY] = 2, |
|
88 |
|
[NIR_INTRINSIC_IDX_FORMAT] = 3, |
|
89 |
|
[NIR_INTRINSIC_IDX_ACCESS] = 4 |
|
90 |
|
}, |
|
91 |
|
.flags = NIR_INTRINSIC_FLAGS_CAN_ELIMINATE |
|
92 |
|
}; |
|
93 |
|
struct nir_intrinsic nir_bindless_image_store_raw_intel = { |
|
94 |
|
.name = "bindless_image_store_raw_intel", |
|
95 |
|
.srcs_n = 3, |
|
96 |
|
.src_components_n = { |
|
97 |
|
1,1,0 |
|
98 |
|
}, |
|
99 |
|
.idxs_n = 4, |
|
100 |
|
.idxs_map = { |
|
101 |
|
[NIR_INTRINSIC_IDX_IMAGE_DIM] = 1, |
|
102 |
|
[NIR_INTRINSIC_IDX_IMAGE_ARRAY] = 2, |
|
103 |
|
[NIR_INTRINSIC_IDX_FORMAT] = 3, |
|
104 |
|
[NIR_INTRINSIC_IDX_ACCESS] = 4 |
|
105 |
|
} |
|
106 |
|
}; |
|
107 |
|
/* bindless version */ |
|
108 |
|
/*----------------------------------------------------------------------------*/ |