Compare commits
325 Commits
chadv/cros
...
mesa-17.0.
Author | SHA1 | Date | |
---|---|---|---|
|
367bafc7c1 | ||
|
0feeceb11c | ||
|
0e032a434f | ||
|
b7d3c71d64 | ||
|
a6114f0c4e | ||
|
0f51d37f73 | ||
|
1b2bcb6826 | ||
|
99468c236f | ||
|
c0a73ddda8 | ||
|
f3ae08bd44 | ||
|
c1c39334da | ||
|
a8e217d057 | ||
|
05eb1c7f59 | ||
|
e7f872f7b8 | ||
|
20319f5e88 | ||
|
a0a48b641d | ||
|
b6168c3b83 | ||
|
12d7da7717 | ||
|
4900fa3f82 | ||
|
29a7d73c9c | ||
|
ddd83c5f2a | ||
|
04df217ac0 | ||
|
33a9bedc24 | ||
|
f509c83609 | ||
|
f77cecf08c | ||
|
d20d8fdc1d | ||
|
c0e343f995 | ||
|
79d97bcf66 | ||
|
5094311078 | ||
|
a5afb7e1ee | ||
|
71d2f05a9e | ||
|
7f34ecae7f | ||
|
3a90fc5717 | ||
|
fd3b756abb | ||
|
3a84f6fd43 | ||
|
57904e481f | ||
|
3d59fd83ed | ||
|
9caf60b3a2 | ||
|
1761f9d4b2 | ||
|
9973db02a0 | ||
|
0a9e06e5b9 | ||
|
6cabd40211 | ||
|
4b3fddaa1a | ||
|
2f86b7398a | ||
|
dc01cb9c5f | ||
|
fb00f22b83 | ||
|
45e133ab3b | ||
|
6613fba2a9 | ||
|
613e6e4d5d | ||
|
8c5dfa9169 | ||
|
1fcf8231ea | ||
|
0444ef0832 | ||
|
c57a035850 | ||
|
6741256351 | ||
|
e11bf563dd | ||
|
c375c448bf | ||
|
afb19fd70a | ||
|
27a3fe0008 | ||
|
0ecda185de | ||
|
e504ecb6c6 | ||
|
d80b96f980 | ||
|
348c8c34c3 | ||
|
72483b29aa | ||
|
a991960ca9 | ||
|
cbb773e7e0 | ||
|
9c6fcdfe45 | ||
|
6e2fb0cbcf | ||
|
8a5684d1bd | ||
|
9b66351f5b | ||
|
373d88a711 | ||
|
c60ae7b161 | ||
|
07adc57fe0 | ||
|
13afc45f8f | ||
|
06bdbe9f89 | ||
|
74c39635b8 | ||
|
f85a54a31b | ||
|
804e260859 | ||
|
f5be65efb7 | ||
|
3a4b70b384 | ||
|
3428b4898d | ||
|
ce7f3521de | ||
|
5a11938585 | ||
|
0b679090a2 | ||
|
d74d7cc0ff | ||
|
d1f01d89e1 | ||
|
0d7d4f973d | ||
|
ed5c3fad37 | ||
|
cc917075b5 | ||
|
8a0f62bd65 | ||
|
2349a9e207 | ||
|
7f7b1160d4 | ||
|
b5ed3f8716 | ||
|
823f6d48a1 | ||
|
09646cce2f | ||
|
a342a47a24 | ||
|
f21cc864ba | ||
|
c9928ecaef | ||
|
f428040bbd | ||
|
1200d64fbe | ||
|
fbaf5955ee | ||
|
e13a41d91e | ||
|
cb4798d731 | ||
|
d9254cfa21 | ||
|
e59e2c664f | ||
|
ea7711fc0f | ||
|
e1e27b0917 | ||
|
59e6c0d8ae | ||
|
7d3a10c516 | ||
|
d4caa4249c | ||
|
b6b3e73c47 | ||
|
7b0a594369 | ||
|
55f9cb3985 | ||
|
579586c926 | ||
|
5c9273152c | ||
|
8fee1d348c | ||
|
e895bc6158 | ||
|
cc545ebeab | ||
|
9ab1704f42 | ||
|
cfdda19397 | ||
|
6b8c9e115e | ||
|
21e3f2f24c | ||
|
bc07622467 | ||
|
5aa38832f0 | ||
|
2e46d4121e | ||
|
d735682eb8 | ||
|
95b09980e9 | ||
|
3169c9818b | ||
|
03982603f0 | ||
|
0a8df0685e | ||
|
b75c0bf73a | ||
|
eba32b351f | ||
|
2e6737fa88 | ||
|
ace01b0459 | ||
|
c20881661f | ||
|
6d2c4e940e | ||
|
e7a8f2e908 | ||
|
c23c6db9aa | ||
|
bf8ef879c6 | ||
|
fafffc64a2 | ||
|
0516a99923 | ||
|
87fb61fad7 | ||
|
6e3da9c81c | ||
|
42b7395580 | ||
|
7cb353520d | ||
|
c47f1d6350 | ||
|
c8e345aa9c | ||
|
b8d23715f5 | ||
|
bc8d047068 | ||
|
91b3b54286 | ||
|
9c80a8133f | ||
|
e1ba82d559 | ||
|
b4880ea2eb | ||
|
a594bd19dc | ||
|
63ef132059 | ||
|
13f1fb0d8c | ||
|
61d9475a0c | ||
|
a5f3255d67 | ||
|
227db8dd03 | ||
|
a57d1af090 | ||
|
173a2ab5c7 | ||
|
3c93076e8c | ||
|
3b524138e6 | ||
|
e179a60c77 | ||
|
3b972998bc | ||
|
e42f43b62b | ||
|
2416481a01 | ||
|
bd25bc66bd | ||
|
4d40f721d1 | ||
|
84a2f46cac | ||
|
1db3cebcbd | ||
|
bcd58a918b | ||
|
d5859cbcc0 | ||
|
eb5a044ce7 | ||
|
8d7110e552 | ||
|
138be7ed9f | ||
|
1f76523596 | ||
|
ce0eebc935 | ||
|
548fe31742 | ||
|
80b41d9899 | ||
|
683462e680 | ||
|
8088ffa12a | ||
|
2692663599 | ||
|
e81e284611 | ||
|
edecfda23f | ||
|
d0c7c6a8cc | ||
|
619b102ecb | ||
|
b90405d565 | ||
|
d6e8489069 | ||
|
fbc28af6e5 | ||
|
8ae5b0b567 | ||
|
7265963007 | ||
|
ba43238abf | ||
|
7e6b4a2dd7 | ||
|
72156aa100 | ||
|
32d0dc50a0 | ||
|
8ca2e38abb | ||
|
40281fcaf9 | ||
|
73b1570dc1 | ||
|
06128bdc21 | ||
|
05abd64cae | ||
|
09468226b4 | ||
|
d44a881ba6 | ||
|
726c32790e | ||
|
dc398d94f0 | ||
|
d424194455 | ||
|
27b6f7413c | ||
|
1e868de450 | ||
|
be48168be9 | ||
|
cdc5bb81ff | ||
|
e4bb5be7b2 | ||
|
48d5cf36a1 | ||
|
b3bc9b4b52 | ||
|
241e0b7068 | ||
|
e789af4a9f | ||
|
f02f17f133 | ||
|
d4f1ed6215 | ||
|
d936b576d6 | ||
|
539afe4e33 | ||
|
19f029ce63 | ||
|
ebbca2f7bb | ||
|
40fc6e7c2d | ||
|
07571cd8cc | ||
|
2fc362f147 | ||
|
89b51c7e43 | ||
|
ac2337ee38 | ||
|
77ec080710 | ||
|
eadbc95d64 | ||
|
69ec90ad24 | ||
|
7abecef5c3 | ||
|
5d470a68e6 | ||
|
3df060d953 | ||
|
34cd53ca8c | ||
|
05d1c8aa02 | ||
|
ca222b7c18 | ||
|
6c89a728d9 | ||
|
f3b7a51383 | ||
|
9ecfbafedb | ||
|
eaf311d90d | ||
|
bbb4562def | ||
|
7083ca2625 | ||
|
8917af11f7 | ||
|
b7f7dc7231 | ||
|
301c9b96f2 | ||
|
06b9bc66d5 | ||
|
270597d13f | ||
|
671dfe51a0 | ||
|
d7d772f903 | ||
|
522ee2cd7d | ||
|
929b3bb6fe | ||
|
e6ea92b263 | ||
|
27e7e7e7e3 | ||
|
3919feee55 | ||
|
6ee946862c | ||
|
4e20356a6c | ||
|
5236ab7bac | ||
|
4ea4e19ccb | ||
|
fad44e6aea | ||
|
a817d1e227 | ||
|
44ba34817c | ||
|
586b009cfe | ||
|
89ce0721eb | ||
|
87fc95c94c | ||
|
042b3445b2 | ||
|
0a1ad5c916 | ||
|
fe1b2f7341 | ||
|
c22ee800d2 | ||
|
e79043bbb9 | ||
|
f14926027c | ||
|
23ffeed7e0 | ||
|
1e03b5e566 | ||
|
58952675f6 | ||
|
fe44c532b2 | ||
|
939c0c82e5 | ||
|
7c663b1d5e | ||
|
2554c98d70 | ||
|
31715781c6 | ||
|
ebfe5e17ee | ||
|
dcb3b24b86 | ||
|
5a806f7def | ||
|
c63652b8ac | ||
|
651861d862 | ||
|
d701877fb0 | ||
|
b2bbfca79f | ||
|
140ad270c8 | ||
|
517fc3ef78 | ||
|
450f6aa5b2 | ||
|
d940b91f94 | ||
|
63f169d5d0 | ||
|
d283ec0a7b | ||
|
9577977266 | ||
|
8621961d43 | ||
|
7d5a98f106 | ||
|
4e6445caa9 | ||
|
e405d0d3c6 | ||
|
0c4b8c75e2 | ||
|
e35cfa15cf | ||
|
34f902e17e | ||
|
e4cf4690d1 | ||
|
7f6c6b9101 | ||
|
23ead4c7b2 | ||
|
7856dfdbab | ||
|
41b93b1fe0 | ||
|
8857256214 | ||
|
516b34908d | ||
|
0645c0e0d4 | ||
|
6aade42111 | ||
|
4dc6ed53c1 | ||
|
cfe14ab39c | ||
|
250b1cad3b | ||
|
9318d81574 | ||
|
00cdbfe6ef | ||
|
83deab2f6a | ||
|
de2dfa1dc3 | ||
|
5c2951c7f9 | ||
|
e3bfa959a8 | ||
|
a259b800df | ||
|
45f13c2be0 | ||
|
b72f8de873 | ||
|
1cc5774e5e | ||
|
50a607cf70 | ||
|
613154fc8f | ||
|
ff81869f0d | ||
|
9cb066601c | ||
|
45297f7e4a | ||
|
acc7837799 |
@@ -78,10 +78,22 @@ endif
|
||||
|
||||
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
|
||||
|
||||
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)
|
||||
|
5
bin/.cherry-ignore
Normal file
5
bin/.cherry-ignore
Normal file
@@ -0,0 +1,5 @@
|
||||
# The commit addressed an earlier commit ccdd5b3738e which did not land in branch.
|
||||
d49d275c415d60ae08dc3e52d8db11f19a44010f anv/blorp: Don't sanitize the swizzle for blorp_clear
|
||||
# The commit addressed an earlier commit 0567ab0407e which did not land in branch.
|
||||
# A stable specific backported patch will follow later ...
|
||||
bc5d587a80b64fb3e0a5ea8067e6317fbca2bbc5 radv: Invalidate L2 for TRANSFER_WRITE barriers
|
@@ -10,26 +10,28 @@
|
||||
# $ bin/get-extra-pick-list.sh | tee picklist
|
||||
|
||||
# Use the last branchpoint as our limit for the search
|
||||
# XXX: there should be a better way for this
|
||||
latest_branchpoint=`git branch | grep \* | cut -c 3-`-branchpoint
|
||||
latest_branchpoint=`git merge-base origin/master HEAD`
|
||||
|
||||
# Grep for commits with "cherry picked from commit" in the commit message.
|
||||
git log --reverse --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
|
||||
grep "cherry picked from commit" |\
|
||||
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' |\
|
||||
cut -c -8 |\
|
||||
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
|
||||
|
||||
# For each cherry-picked commit...
|
||||
cat already_picked | cut -c -8 |\
|
||||
while read sha
|
||||
do
|
||||
# Check if the original commit is referenced in master
|
||||
# ... check if it's referenced (fixed by another) patch
|
||||
git log -n1 --pretty=oneline --grep=$sha $latest_branchpoint..origin/master |\
|
||||
cut -c -8 |\
|
||||
while read candidate
|
||||
do
|
||||
# Check if the potential fix, hasn't landed in branch yet.
|
||||
found=`git log -n1 --pretty=oneline --reverse --grep=$candidate $latest_branchpoint..HEAD |wc -l`
|
||||
if test $found = 0
|
||||
then
|
||||
echo Commit $candidate might need to be picked, as it references $sha
|
||||
# And flag up if it hasn't landed in branch yet.
|
||||
if grep -q ^$candidate already_picked ; then
|
||||
continue
|
||||
fi
|
||||
echo Commit $candidate references $sha
|
||||
done
|
||||
done
|
||||
|
||||
rm -f already_picked
|
||||
|
61
bin/get-fixes-pick-list.sh
Executable file
61
bin/get-fixes-pick-list.sh
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Script for generating a list of candidates [referenced by a Fixes tag] for
|
||||
# cherry-picking to a stable branch
|
||||
#
|
||||
# Usage examples:
|
||||
#
|
||||
# $ bin/get-fixes-pick-list.sh
|
||||
# $ bin/get-fixes-pick-list.sh > picklist
|
||||
# $ bin/get-fixes-pick-list.sh | tee picklist
|
||||
|
||||
# Use the last branchpoint as our limit for the search
|
||||
latest_branchpoint=`git merge-base origin/master HEAD`
|
||||
|
||||
# List all the commits between day 1 and the branch point...
|
||||
git log --reverse --pretty=%H $latest_branchpoint > already_landed
|
||||
|
||||
# ... and the ones cherry-picked.
|
||||
git log --reverse --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
|
||||
grep "cherry picked from commit" |\
|
||||
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
|
||||
|
||||
# Grep for commits with Fixes tag
|
||||
git log --reverse --pretty=%H -i --grep="fixes:" $latest_branchpoint..origin/master |\
|
||||
while read sha
|
||||
do
|
||||
# For each one try to extract the tag
|
||||
fixes_count=`git show $sha | grep -i "fixes:" | wc -l`
|
||||
if [ "x$fixes_count" != x1 ] ; then
|
||||
echo WARNING: Commit $sha has nore than one Fixes tag
|
||||
fi
|
||||
fixes=`git show $sha | grep -i "fixes:" | head -n 1`
|
||||
# The following sed/cut combination is borrowed from GregKH
|
||||
id=`echo ${fixes} | sed -e 's/^[ \t]*//' | cut -f 2 -d ':' | sed -e 's/^[ \t]*//' | cut -f 1 -d ' '`
|
||||
|
||||
# Bail out if we cannot find suitable id.
|
||||
# Any specific validation the $id is valid and not some junk, is
|
||||
# implied with the follow up code
|
||||
if [ "x$id" = x ] ; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Check if the offending commit is in branch.
|
||||
|
||||
# Be that cherry-picked ...
|
||||
# ... or landed before the branchpoint.
|
||||
if grep -q ^$id already_picked ||
|
||||
grep -q ^$id already_landed ; then
|
||||
|
||||
# Finally nominate the fix if it hasn't landed yet.
|
||||
if grep -q ^$sha already_picked ; then
|
||||
continue
|
||||
fi
|
||||
|
||||
echo Commit $sha fixes $id
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
rm -f already_picked
|
||||
rm -f already_landed
|
@@ -8,13 +8,16 @@
|
||||
# $ bin/get-pick-list.sh > picklist
|
||||
# $ bin/get-pick-list.sh | tee picklist
|
||||
|
||||
# Use the last branchpoint as our limit for the search
|
||||
latest_branchpoint=`git merge-base origin/master HEAD`
|
||||
|
||||
# Grep for commits with "cherry picked from commit" in the commit message.
|
||||
git log --reverse --grep="cherry picked from commit" origin/master..HEAD |\
|
||||
git log --reverse --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
|
||||
grep "cherry picked from commit" |\
|
||||
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
|
||||
|
||||
# Grep for commits that were marked as a candidate for the stable tree.
|
||||
git log --reverse --pretty=%H -i --grep='^\([[:space:]]*NOTE: .*[Cc]andidate\|CC:.*mesa-stable\)' HEAD..origin/master |\
|
||||
git log --reverse --pretty=%H -i --grep='^CC:.*mesa-stable' $latest_branchpoint..origin/master |\
|
||||
while read sha
|
||||
do
|
||||
# Check to see whether the patch is on the ignore list.
|
||||
|
@@ -12,13 +12,16 @@
|
||||
# This script intentionally _never_ checks for specific version tag
|
||||
# Should we consider folding it with the original get-pick-list.sh
|
||||
|
||||
# Use the last branchpoint as our limit for the search
|
||||
latest_branchpoint=`git merge-base origin/master HEAD`
|
||||
|
||||
# Grep for commits with "cherry picked from commit" in the commit message.
|
||||
git log --reverse --grep="cherry picked from commit" origin/master..HEAD |\
|
||||
git log --reverse --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
|
||||
grep "cherry picked from commit" |\
|
||||
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
|
||||
|
||||
# Grep for commits that were marked as a candidate for the stable tree.
|
||||
git log --reverse --pretty=%H -i --grep='^CC:.*mesa-dev' HEAD..origin/master |\
|
||||
git log --reverse --pretty=%H -i --grep='^CC:.*mesa-dev' $latest_branchpoint..origin/master |\
|
||||
while read sha
|
||||
do
|
||||
# Check to see whether the patch is on the ignore list.
|
||||
|
182
configure.ac
182
configure.ac
@@ -943,43 +943,31 @@ llvm_add_target() {
|
||||
# $1 is the llvm-config command with arguments.
|
||||
strip_unwanted_llvm_flags() {
|
||||
# Use \> (marks the end of the word)
|
||||
echo `$1` | sed \
|
||||
-e 's/-march=\S*//g' \
|
||||
-e 's/-mtune=\S*//g' \
|
||||
-e 's/-mcpu=\S*//g' \
|
||||
-e 's/-DNDEBUG\>//g' \
|
||||
-e 's/-D_GNU_SOURCE\>//g' \
|
||||
-e 's/-pedantic\>//g' \
|
||||
-e 's/-Wcovered-switch-default\>//g' \
|
||||
-e 's/-O.\>//g' \
|
||||
-e 's/-g\>//g' \
|
||||
-e 's/-Wall\>//g' \
|
||||
-e 's/-Wcast-qual\>//g' \
|
||||
-e 's/-Woverloaded-virtual\>//g' \
|
||||
-e 's/-fcolor-diagnostics\>//g' \
|
||||
-e 's/-fdata-sections\>//g' \
|
||||
-e 's/-ffunction-sections\>//g' \
|
||||
-e 's/-fno-exceptions\>//g' \
|
||||
-e 's/-fomit-frame-pointer\>//g' \
|
||||
-e 's/-fvisibility-inlines-hidden\>//g' \
|
||||
-e 's/-fPIC\>//g' \
|
||||
-e 's/-fstack-protector-strong\>//g'
|
||||
echo " `$1`" | sed \
|
||||
-e 's/\s\+-m\S*//g' \
|
||||
-e 's/\s\+-DNDEBUG\>//g' \
|
||||
-e 's/\s\+-D_GNU_SOURCE\>//g' \
|
||||
-e 's/\s\+-pedantic\>//g' \
|
||||
-e 's/\s\+-W\S*//g' \
|
||||
-e 's/\s\+-O\S*//g' \
|
||||
-e 's/\s\+-g\S*//g' \
|
||||
-e 's/-fno-rtti\>/-Fno-rtti/g' \
|
||||
-e 's/\s\+-f\S*//g' \
|
||||
-e 's/-Fno-rtti\>/-fno-rtti/g' \
|
||||
-e 's/^ //'
|
||||
}
|
||||
|
||||
llvm_set_environment_variables() {
|
||||
if test "x$LLVM_CONFIG" != xno; then
|
||||
LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[[0-9.]]+'`
|
||||
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
|
||||
LLVM_BINDIR=`$LLVM_CONFIG --bindir`
|
||||
LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
|
||||
LLVM_CFLAGS=$LLVM_CPPFLAGS # CPPFLAGS seem to be sufficient
|
||||
LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
|
||||
LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
|
||||
LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
|
||||
|
||||
# We need to respect LLVM_CFLAGS when compiling LLVM headers.
|
||||
# We need to respect LLVM_CPPFLAGS when compiling LLVM headers.
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $LLVM_CFLAGS"
|
||||
CFLAGS="$CFLAGS $LLVM_CPPFLAGS"
|
||||
|
||||
AC_COMPUTE_INT([LLVM_VERSION_MAJOR], [LLVM_VERSION_MAJOR],
|
||||
[#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
|
||||
@@ -1001,19 +989,21 @@ llvm_set_environment_variables() {
|
||||
LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR}"
|
||||
fi
|
||||
|
||||
DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
|
||||
MESA_LLVM=1
|
||||
FOUND_LLVM=yes
|
||||
else
|
||||
MESA_LLVM=0
|
||||
FOUND_LLVM=no
|
||||
LLVM_VERSION_INT=0
|
||||
fi
|
||||
}
|
||||
|
||||
llvm_check_version_for() {
|
||||
if test "x$MESA_LLVM" = x0; then
|
||||
AC_MSG_ERROR([LLVM $1 or newer is required for $2])
|
||||
return
|
||||
require_llvm() {
|
||||
if test "x$enable_gallium_llvm" != "xyes"; then
|
||||
AC_MSG_ERROR([--enable-gallium-llvm is required when building $1])
|
||||
fi
|
||||
}
|
||||
|
||||
llvm_require_version() {
|
||||
require_llvm $2
|
||||
|
||||
llvm_target_version_major=`echo $1 | cut -d. -f1 | egrep -o '^[[0-9]]+'`
|
||||
llvm_target_version_minor=`echo $1 | cut -d. -f2 | egrep -o '^[[0-9]]+'`
|
||||
@@ -1054,7 +1044,7 @@ radeon_llvm_check() {
|
||||
amdgpu_llvm_target_name='amdgpu'
|
||||
fi
|
||||
|
||||
llvm_check_version_for $*
|
||||
llvm_require_version $*
|
||||
|
||||
llvm_add_target $amdgpu_llvm_target_name $2
|
||||
|
||||
@@ -1731,6 +1721,34 @@ if test -n "$with_dri_drivers"; then
|
||||
fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl Gallium LLVM
|
||||
dnl
|
||||
dnl With follow-up commits we'll rework --enable-gallium-llvm to --enable-llvm
|
||||
dnl Since that is too invasive to stable, do the more conservative thing for now
|
||||
dnl and consider it as a global LLVM toggle.
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-llvm],
|
||||
[AS_HELP_STRING([--enable-gallium-llvm],
|
||||
[build gallium LLVM support @<:@default=enabled on x86/x86_64@:>@])],
|
||||
[enable_gallium_llvm="$enableval"],
|
||||
[enable_gallium_llvm=auto])
|
||||
|
||||
if test "x$enable_gallium_llvm" = xauto; then
|
||||
if test "x$FOUND_LLVM" = xyes; then
|
||||
case "$host_cpu" in
|
||||
i*86|x86_64|amd64) enable_gallium_llvm=yes;;
|
||||
*) enable_gallium_llvm=no;;
|
||||
esac
|
||||
else
|
||||
enable_gallium_llvm=no
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$enable_gallium_llvm" = xyes -a "x$FOUND_LLVM" = xno; then
|
||||
AC_MSG_ERROR([--enable-gallium-llvm selected but llvm-config is not found])
|
||||
fi
|
||||
|
||||
#
|
||||
# Vulkan driver configuration
|
||||
#
|
||||
@@ -1738,7 +1756,7 @@ fi
|
||||
AC_ARG_WITH([vulkan-drivers],
|
||||
[AS_HELP_STRING([--with-vulkan-drivers@<:@=DIRS...@:>@],
|
||||
[comma delimited Vulkan drivers list, e.g.
|
||||
"intel"
|
||||
"intel,radeon"
|
||||
@<:@default=no@:>@])],
|
||||
[with_vulkan_drivers="$withval"],
|
||||
[with_vulkan_drivers="no"])
|
||||
@@ -2012,7 +2030,21 @@ if test "x$enable_opencl" = xyes; then
|
||||
AC_MSG_ERROR([Clover requires libelf])
|
||||
fi
|
||||
|
||||
llvm_check_version_for $LLVM_REQUIRED_OPENCL "opencl"
|
||||
if test "x${ac_cv_cxx_compiler_gnu}" = xyes; then
|
||||
altivec_enabled=no
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
||||
#if !defined(__VEC__) || !defined(__ALTIVEC__)
|
||||
#error "AltiVec not enabled"
|
||||
#endif
|
||||
])], altivec_enabled=yes)
|
||||
|
||||
if test "$altivec_enabled" = yes; then
|
||||
CLOVER_STD_OVERRIDE="-std=gnu++11"
|
||||
fi
|
||||
AC_SUBST([CLOVER_STD_OVERRIDE])
|
||||
fi
|
||||
|
||||
llvm_require_version $LLVM_REQUIRED_OPENCL "opencl"
|
||||
|
||||
llvm_add_default_components "opencl"
|
||||
llvm_add_component "all-targets" "opencl"
|
||||
@@ -2137,24 +2169,6 @@ if ! echo "$egl_platforms" | grep -q 'x11'; then
|
||||
GL_PC_CFLAGS="$GL_PC_CFLAGS -DMESA_EGL_NO_X11_HEADERS"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Gallium LLVM
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-llvm],
|
||||
[AS_HELP_STRING([--enable-gallium-llvm],
|
||||
[build gallium LLVM support @<:@default=enabled on x86/x86_64@:>@])],
|
||||
[enable_gallium_llvm="$enableval"],
|
||||
[enable_gallium_llvm=auto])
|
||||
|
||||
if test -z "$with_gallium_drivers"; then
|
||||
enable_gallium_llvm=no
|
||||
fi
|
||||
if test "x$enable_gallium_llvm" = xauto; then
|
||||
case "$host_cpu" in
|
||||
i*86|x86_64|amd64) enable_gallium_llvm=yes;;
|
||||
esac
|
||||
fi
|
||||
|
||||
dnl Directory for XVMC libs
|
||||
AC_ARG_WITH([xvmc-libdir],
|
||||
[AS_HELP_STRING([--with-xvmc-libdir=DIR],
|
||||
@@ -2202,14 +2216,16 @@ AC_ARG_WITH([d3d-libdir],
|
||||
AC_SUBST([D3D_DRIVER_INSTALL_DIR])
|
||||
|
||||
dnl
|
||||
dnl Gallium helper functions
|
||||
dnl r300 doesn't strictly require LLVM, but for performance reasons we
|
||||
dnl highly recommend LLVM usage. So require it at least on x86 and x86_64
|
||||
dnl architectures.
|
||||
dnl
|
||||
gallium_require_llvm() {
|
||||
if test "x$enable_gallium_llvm" = "xyes"; then
|
||||
llvm_check_version_for $LLVM_REQUIRED_GALLIUM "gallium"
|
||||
else
|
||||
AC_MSG_ERROR([--enable-gallium-llvm is required when building $1])
|
||||
fi
|
||||
r300_require_llvm() {
|
||||
case "$host" in *gnux32) return;; esac
|
||||
case "$host_cpu" in
|
||||
i*86|x86_64|amd64) require_llvm $1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
dnl
|
||||
@@ -2298,7 +2314,7 @@ if test -n "$with_gallium_drivers"; then
|
||||
HAVE_GALLIUM_R300=yes
|
||||
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
|
||||
require_libdrm "r300"
|
||||
gallium_require_llvm "r300"
|
||||
r300_require_llvm "r300"
|
||||
;;
|
||||
xr600)
|
||||
HAVE_GALLIUM_R600=yes
|
||||
@@ -2317,7 +2333,9 @@ if test -n "$with_gallium_drivers"; then
|
||||
PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED])
|
||||
require_libdrm "radeonsi"
|
||||
radeon_gallium_llvm_check $LLVM_REQUIRED_RADEONSI "radeonsi"
|
||||
require_basic_egl "radeonsi"
|
||||
if test "x$enable_egl" = xyes; then
|
||||
require_basic_egl "radeonsi"
|
||||
fi
|
||||
;;
|
||||
xnouveau)
|
||||
HAVE_GALLIUM_NOUVEAU=yes
|
||||
@@ -2339,13 +2357,12 @@ if test -n "$with_gallium_drivers"; then
|
||||
;;
|
||||
xswrast)
|
||||
HAVE_GALLIUM_SOFTPIPE=yes
|
||||
if test "x$MESA_LLVM" = x1 && test "x$enable_gallium_llvm" == "xyes"; then
|
||||
if test "x$enable_gallium_llvm" = xyes; then
|
||||
HAVE_GALLIUM_LLVMPIPE=yes
|
||||
fi
|
||||
;;
|
||||
xswr)
|
||||
llvm_check_version_for $LLVM_REQUIRED_SWR "swr"
|
||||
gallium_require_llvm "swr"
|
||||
llvm_require_version $LLVM_REQUIRED_SWR "swr"
|
||||
|
||||
swr_require_cxx_feature_flags "C++11" "__cplusplus >= 201103L" \
|
||||
",-std=c++11" \
|
||||
@@ -2386,8 +2403,8 @@ if test -n "$with_gallium_drivers"; then
|
||||
done
|
||||
fi
|
||||
|
||||
if test "x$enable_gallium_llvm" == "xyes"; then
|
||||
llvm_check_version_for $LLVM_REQUIRED_GALLIUM "gallium"
|
||||
if test "x$enable_gallium_llvm" == "xyes" -a "$with_gallium_drivers"; then
|
||||
llvm_require_version $LLVM_REQUIRED_GALLIUM "gallium"
|
||||
llvm_add_default_components "gallium"
|
||||
fi
|
||||
|
||||
@@ -2397,14 +2414,22 @@ if test "x$HAVE_GALLIUM_ETNAVIV" != xyes -a "x$HAVE_GALLIUM_IMX" == xyes ; then
|
||||
AC_ERROR([Building with imx requires etnaviv])
|
||||
fi
|
||||
|
||||
dnl Set LLVM_LIBS - This is done after the driver configuration so
|
||||
dnl that drivers can add additional components to LLVM_COMPONENTS.
|
||||
dnl Previously, gallium drivers were updating LLVM_LIBS directly
|
||||
dnl by calling llvm-config --libs ${DRIVER_LLVM_COMPONENTS}, but
|
||||
dnl this was causing the same libraries to be appear multiple times
|
||||
dnl in LLVM_LIBS.
|
||||
dnl
|
||||
dnl Set defines and buildtime variables only when using LLVM.
|
||||
dnl
|
||||
if test "x$enable_gallium_llvm" = xyes; then
|
||||
DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
|
||||
|
||||
if test "x$MESA_LLVM" != x0; then
|
||||
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
|
||||
LLVM_CFLAGS=$LLVM_CPPFLAGS # CPPFLAGS seem to be sufficient
|
||||
LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
|
||||
|
||||
dnl Set LLVM_LIBS - This is done after the driver configuration so
|
||||
dnl that drivers can add additional components to LLVM_COMPONENTS.
|
||||
dnl Previously, gallium drivers were updating LLVM_LIBS directly
|
||||
dnl by calling llvm-config --libs ${DRIVER_LLVM_COMPONENTS}, but
|
||||
dnl this was causing the same libraries to be appear multiple times
|
||||
dnl in LLVM_LIBS.
|
||||
|
||||
if ! $LLVM_CONFIG --libs ${LLVM_COMPONENTS} >/dev/null; then
|
||||
AC_MSG_ERROR([Calling ${LLVM_CONFIG} failed])
|
||||
@@ -2506,8 +2531,7 @@ AM_CONDITIONAL(NEED_RADEON_DRM_WINSYS, test "x$HAVE_GALLIUM_R300" = xyes -o \
|
||||
AM_CONDITIONAL(NEED_WINSYS_XLIB, test "x$enable_glx" = xgallium-xlib)
|
||||
AM_CONDITIONAL(NEED_RADEON_LLVM, test x$NEED_RADEON_LLVM = xyes)
|
||||
AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes)
|
||||
AM_CONDITIONAL(HAVE_GALLIUM_LLVM, test "x$MESA_LLVM" = x1 -a \
|
||||
"x$enable_gallium_llvm" = xyes)
|
||||
AM_CONDITIONAL(HAVE_GALLIUM_LLVM, test "x$enable_gallium_llvm" = xyes)
|
||||
AM_CONDITIONAL(USE_VC4_SIMULATOR, test x$USE_VC4_SIMULATOR = xyes)
|
||||
if test "x$USE_VC4_SIMULATOR" = xyes -a "x$HAVE_GALLIUM_ILO" = xyes; then
|
||||
AC_MSG_ERROR([VC4 simulator on x86 replaces i965 driver build, so ilo must be disabled.])
|
||||
@@ -2792,7 +2816,7 @@ else
|
||||
fi
|
||||
|
||||
echo ""
|
||||
if test "x$MESA_LLVM" = x1; then
|
||||
if test "x$enable_gallium_llvm" = xyes; then
|
||||
echo " llvm: yes"
|
||||
echo " llvm-config: $LLVM_CONFIG"
|
||||
echo " llvm-version: $LLVM_VERSION"
|
||||
@@ -2839,7 +2863,7 @@ echo " CFLAGS: $cflags"
|
||||
echo " CXXFLAGS: $cxxflags"
|
||||
echo " Macros: $defines"
|
||||
echo ""
|
||||
if test "x$MESA_LLVM" = x1; then
|
||||
if test "x$enable_gallium_llvm" = xyes; then
|
||||
echo " LLVM_CFLAGS: $LLVM_CFLAGS"
|
||||
echo " LLVM_CXXFLAGS: $LLVM_CXXFLAGS"
|
||||
echo " LLVM_CPPFLAGS: $LLVM_CPPFLAGS"
|
||||
|
@@ -16,17 +16,6 @@
|
||||
|
||||
<h1>News</h1>
|
||||
|
||||
<h2>January 23, 2017</h2>
|
||||
<p>
|
||||
<a href="relnotes/12.0.6.html">Mesa 12.0.6</a> is released.
|
||||
This is a bug-fix release.
|
||||
<br>
|
||||
NOTE: This is an extra release for the 12.0 stable branch, as per developers'
|
||||
feedback. It is anticipated that 12.0.6 will be the final release in the 12.0
|
||||
series. Users of 12.0 are encouraged to migrate to the 13.0 series in order
|
||||
to obtain future fixes.
|
||||
</p>
|
||||
|
||||
<h2>January 5, 2017</h2>
|
||||
<p>
|
||||
<a href="relnotes/13.0.3.html">Mesa 13.0.3</a> is released.
|
||||
|
@@ -158,9 +158,6 @@ To setup the branchpoint:
|
||||
git checkout master # make sure we're in master first
|
||||
git tag -s X.Y-branchpoint -m "Mesa X.Y branchpoint"
|
||||
git checkout -b X.Y
|
||||
git checkout master
|
||||
$EDITOR VERSION # bump the version number
|
||||
git commit -as
|
||||
git push origin X.Y-branchpoint X.Y
|
||||
</pre>
|
||||
|
||||
@@ -345,7 +342,7 @@ Here is one solution that I've been using.
|
||||
tar -xaf mesa-$__version.tar.xz && cd mesa-$__version && scons && cd ..
|
||||
|
||||
# Test the automake binaries
|
||||
rm -rf mesa-$__version
|
||||
rm -rf cd mesa-$__version
|
||||
tar -xaf mesa-$__version.tar.xz && cd mesa-$__version
|
||||
./configure \
|
||||
--with-dri-drivers=i965,swrast \
|
||||
|
@@ -21,7 +21,6 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="relnotes/12.0.6.html">12.0.6 release notes</a>
|
||||
<li><a href="relnotes/13.0.3.html">13.0.3 release notes</a>
|
||||
<li><a href="relnotes/12.0.5.html">12.0.5 release notes</a>
|
||||
<li><a href="relnotes/13.0.2.html">13.0.2 release notes</a>
|
||||
|
@@ -1,148 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 12.0.6 Release Notes / January 23, 2017</h1>
|
||||
|
||||
<p>
|
||||
Mesa 12.0.6 is a bug fix release which fixes bugs found since the 12.0.5 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 12.0.6 implements the OpenGL 4.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 4.3. OpenGL
|
||||
4.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
65339ba5d76a45225b8b56f9a1da9db15c569e1d163760faa2921da0a8461741 mesa-12.0.6.tar.gz
|
||||
7d6da9744c1022a4c2ab6ad01a206984d00443fb691568011d01b3dd97e36448 mesa-12.0.6.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92234">Bug 92234</a> - [BDW] GPU hang in Shogun2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=95130">Bug 95130</a> - Derivatives of gl_Color wrong when helper pixels used</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98329">Bug 98329</a> - [dEQP, EGL, SKL, BDW, BSW] dEQP-EGL.functional.image.render_multiple_contexts.gles2_renderbuffer_depth16_depth_buffer</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99030">Bug 99030</a> - [HSW, regression] transform feedback fails on Linux 4.8</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99354">Bug 99354</a> - [G71] "Assertion `bkref' failed" reproducible with glmark2</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Chad Versace (3):</p>
|
||||
<ul>
|
||||
<li>i965/mt: Disable aux surfaces after making miptree shareable</li>
|
||||
<li>i965/mt: Disable HiZ when sharing depth buffer externally (v2)</li>
|
||||
<li>anv: Handle vkGetPhysicalDeviceQueueFamilyProperties with count == 0</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (5):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 12.0.5</li>
|
||||
<li>get-typod-pick-list.sh: add new script</li>
|
||||
<li>automake: use shared llvm libs for make distcheck</li>
|
||||
<li>egl/wayland: use the destroy_window_callback for swrast</li>
|
||||
<li>Update version to 12.0.6</li>
|
||||
</ul>
|
||||
|
||||
<p>Fredrik Höglund (1):</p>
|
||||
<ul>
|
||||
<li>dri3: Fix MakeCurrent without a default framebuffer</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (1):</p>
|
||||
<ul>
|
||||
<li>nouveau: take extra push space into account for pushbuf_space calls</li>
|
||||
</ul>
|
||||
|
||||
<p>Jason Ekstrand (19):</p>
|
||||
<ul>
|
||||
<li>spirv/nir: Fix some texture opcode asserts</li>
|
||||
<li>spirv/nir: Add support for shadow samplers that return vec4</li>
|
||||
<li>spirv/nir: Properly handle gather components</li>
|
||||
<li>anv/pipeline: Set binding_table.gather_texture_start</li>
|
||||
<li>nir: Add a helper for determining the type of a texture source</li>
|
||||
<li>nir/lower_tex: Add some helpers for working with tex sources</li>
|
||||
<li>nir/lower_tex: Add support for lowering coordinate offsets</li>
|
||||
<li>i965/nir: Enable NIR lowering of txf and rect offsets</li>
|
||||
<li>i965: Get rid of the do_lower_unnormalized_offsets pass</li>
|
||||
<li>spirv/nir: Don't increment coord_components for array lod queries</li>
|
||||
<li>anv/image: Assert that the image format is actually supported</li>
|
||||
<li>spirv/nir: Move opcode selection higher up in handle_texture</li>
|
||||
<li>spirv/nir: Refactor type handling in handle_texture</li>
|
||||
<li>nir/spirv: Refactor coordinate handling in handle_texture</li>
|
||||
<li>spirv/nir: Handle texture projectors</li>
|
||||
<li>spirv/nir: Add support for ImageQuerySamples</li>
|
||||
<li>anv/device: Return the right error for failed maps</li>
|
||||
<li>anv/device: Implicitly unmap memory objects in FreeMemory</li>
|
||||
<li>anv/descriptor_set: Write the state offset in the surface state free list.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (2):</p>
|
||||
<ul>
|
||||
<li>spirv: Move cursor before calling vtn_ssa_value() in phi 2nd pass.</li>
|
||||
<li>i965: Properly flush in hsw_pause_transform_feedback().</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (6):</p>
|
||||
<ul>
|
||||
<li>cso: don't release sampler states that are bound</li>
|
||||
<li>radeonsi: always restore sampler states when unbinding sampler views</li>
|
||||
<li>radeonsi: fix incorrect FMASK checking in bind_sampler_states</li>
|
||||
<li>radeonsi: disable CE on SI + AMDGPU</li>
|
||||
<li>radeonsi: disable the constant engine (CE) on Carrizo and Stoney</li>
|
||||
<li>gallium/radeon: fix the draw-calls HUD query</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (3):</p>
|
||||
<ul>
|
||||
<li>i965/fs: Rename opt_copy_propagate -> opt_copy_propagation.</li>
|
||||
<li>i965/fs: Add unit tests for copy propagation pass.</li>
|
||||
<li>i965/fs: Reject copy propagation into SEL if not min/max.</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (1):</p>
|
||||
<ul>
|
||||
<li>cso: Don't restore nr_samplers in cso_restore_fragment_samplers</li>
|
||||
</ul>
|
||||
|
||||
<p>Nicolai Hähnle (1):</p>
|
||||
<ul>
|
||||
<li>radeonsi: enable WQM in PS prolog when needed</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -14,7 +14,7 @@
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 17.0.0 Release Notes / TBD</h1>
|
||||
<h1>Mesa 17.0.0 Release Notes / February 13, 2017</h1>
|
||||
|
||||
<p>
|
||||
Mesa 17.0.0 is a new development release.
|
||||
@@ -33,7 +33,8 @@ because compatibility contexts are not supported.
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
TBD.
|
||||
696578f0b83796470511a88a95fff15a2a25fa201a9e487716f2ca20c177c3ab mesa-17.0.0.tar.gz
|
||||
39db3d59700159add7f977307d12a7dfe016363e760ad82280ac4168ea668481 mesa-17.0.0.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
@@ -62,13 +63,222 @@ Note: some of the new features are only available with certain drivers.
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70623">Bug 70623</a> - libglx.so: undefined symbol: _glapi_tls_Context</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72902">Bug 72902</a> - [IVB/HSW/BDW] DOTA2 segfaults unless Mesa is configured with (non-default) --enable-glx-tls</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=73778">Bug 73778</a> - _glapi_tls_Dispatch undefined</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77662">Bug 77662</a> - Fail to render to different faces of depth-stencil cube map</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89043">Bug 89043</a> - undefined symbol: _glapi_tls_Dispatch</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91281">Bug 91281</a> - Tonga VCE 2160p encode fails with BO to small for addr</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92234">Bug 92234</a> - [BDW] GPU hang in Shogun2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92634">Bug 92634</a> - gallium's vl_mpeg12_decoder does not work with st/va</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92760">Bug 92760</a> - Add FP64 support to the i965 shader backends</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92925">Bug 92925</a> - Incorrect GEN for ASTC in Surface Format Table</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93551">Bug 93551</a> - Divinity: Original Sin Enhanced Edition(Native) crash on start</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94512">Bug 94512</a> - X segfaults with glx-tls enabled in a x32 environment</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94900">Bug 94900</a> - HD6950 GPU lockup loop with various steam games (octodad[always], saints row 4[always], dead island[always], grid autosport[sometimes])</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94904">Bug 94904</a> - [vulkan, BSW] dEQP-VK.api.object_management.multithreaded_per_thread_device intermittent crash</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=95460">Bug 95460</a> - Please add more drivers (freedreno, virgl) to features.txt status document</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=96959">Bug 96959</a> - nop.sat generated by pow workaround?</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=97102">Bug 97102</a> - [dri][swr] stack overflow / infinite loop with GALLIUM_DRIVER=swr</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=97232">Bug 97232</a> - Line rendering broken in Dolphin when using gl_ClipDistance</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=97287">Bug 97287</a> - GL45-CTS.vertex_attrib_binding.basic-inputL-case1 fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=97321">Bug 97321</a> - Query INFO_LOG_LENGTH for empty info log should return 0</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=97420">Bug 97420</a> - "#version 0" crashes glsl_compiler</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=97422">Bug 97422</a> - trying to call a number as a function results into a crash</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=97447">Bug 97447</a> - GL 3.0 compatibility context exposes GL_ARB_compute_shader</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=97473">Bug 97473</a> - Memory corruption when uploading DXT5 cubemap faces</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=97715">Bug 97715</a> - [ILK,G45,G965] piglit.spec.arb_separate_shader_objects.misc api error checks</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=97779">Bug 97779</a> - [regression, bisected][BDW, GPU hang] stuck on render ring, always reproducible</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=97804">Bug 97804</a> - Later precision statement isn't overriding earlier one</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=97952">Bug 97952</a> - /usr/include/string.h:518:12: error: exception specification in declaration does not match previous declaration</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=97967">Bug 97967</a> - glsl/tests/cache-test regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98005">Bug 98005</a> - VCE dual instance encoding inconsistent since st/va: enable dual instances encode by sync surface</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98012">Bug 98012</a> - [IVB] Segfault when running Dolphin twice with Vulkan</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98134">Bug 98134</a> - dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.draw_buffers wants a different GL error code</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98172">Bug 98172</a> - Concurrent call to glClientWaitSync results in segfault in one of the waiters.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98238">Bug 98238</a> - witcher 2: objects are black when changing lod</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98243">Bug 98243</a> - dEQP mismatched UBO precision qualifiers</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98245">Bug 98245</a> - GLES3.1 link negative dEQP "expected linking to fail, but passed."</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98250">Bug 98250</a> - dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.texparameterIiv/texparameterIuiv failure</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98263">Bug 98263</a> - [radv] The Talos Principle fails to launch with "Fatal error: Cannot set display mode."</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98297">Bug 98297</a> - Can't configure a desktop with 3x4k monitors in one row</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98299">Bug 98299</a> - Compute shaders generate stupid divides</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98307">Bug 98307</a> - "st/glsl_to_tgsi: explicitly track all input and output declaration" broke flightgear colors on rs780</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98326">Bug 98326</a> - [dEQP, EGL] pbuffer depth/stencil tests fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98327">Bug 98327</a> - [dEQP, EGL] dEQP-EGL.functional.resize not supported</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98328">Bug 98328</a> - [dEQP, EGL] luminance tests fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98329">Bug 98329</a> - [dEQP, EGL, SKL, BDW, BSW] dEQP-EGL.functional.image.render_multiple_contexts.gles2_renderbuffer_depth16_depth_buffer</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98330">Bug 98330</a> - [dEQP, EGL] dEQP-EGL.functional.buffer_age.no_preserve fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98339">Bug 98339</a> - dEQP-EGL: Got EGL_BAD_MATCH: eglCreateSyncKHR()</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98343">Bug 98343</a> - dEQP-EGL: GL_INVALID_ENUM at teglCreateContextExtTests</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98415">Bug 98415</a> - Vulkan Driver JSON file contains incorrect field</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98421">Bug 98421</a> - src/loader/loader.c:111:40: error: unknown type name ‘drmDevicePtr’</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98431">Bug 98431</a> - UnrealEngine v4 demos startup fails to blorp blit assert</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98480">Bug 98480</a> - Support R8 image texture in ES 3.1</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98512">Bug 98512</a> - radeon r600 vdpau: Invalid command stream: texture bo too small</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98518">Bug 98518</a> - [r600g, bisected] regression: NI/Turks MSAA texture corruption with FreeCAD and Wine games</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98526">Bug 98526</a> - glsl/tests/general-ir-test regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98595">Bug 98595</a> - glsl: ralloc assertion "info->canary == CANARY" failed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98599">Bug 98599</a> - xterm menus corrupt since tgsi/scan: handle indirect image indexing correctly</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98632">Bug 98632</a> - Fix build on Hurd without PATH_MAX</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98681">Bug 98681</a> - ir_builder_print_visitor.cpp:401:67: error: expected ')' before 'PRIx64'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98694">Bug 98694</a> - "(5=2)?1:1" as array size decleration crashes glsl_compiler</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98740">Bug 98740</a> - bitcode.cpp:102:8: error: ‘Error’ is not a member of ‘llvm’</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98767">Bug 98767</a> - [swrast] ralloc.c:84: get_header: Assertion `info->canary == CANARY' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98774">Bug 98774</a> - glsl/tests/warnings-test regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98815">Bug 98815</a> - [SKL/BDW GT2] large perf regression in TessMark</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98840">Bug 98840</a> - nir clone test fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98893">Bug 98893</a> - [SKL] piglit.spec.arb_shader_image_load_store.semantics intermittent</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98914">Bug 98914</a> - mesa-vdpau-drivers: breaks vdpau for mpeg2video</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98917">Bug 98917</a> - [BDW SKL BSW KBL] Tessellation CTS tests regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98975">Bug 98975</a> - Wasteland 2 Directors Cut: Hangs. GPU fault</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99010">Bug 99010</a> - --disable-gallium-llvm no longer recognized</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99013">Bug 99013</a> - [regression, bisected] radeonsi: commit 4c8c13b3 "Use amdgcn intrinsics for fs interpolation" makes system unusable</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99030">Bug 99030</a> - [HSW, regression] transform feedback fails on Linux 4.8</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99038">Bug 99038</a> - [dEQP, EGL, SKL, BDW, BSW] dEQP-EGL.functional.negative_api.create_pixmap_surface crashes</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99072">Bug 99072</a> - [byt,ivb,snb] ES3-CTS.gtf.GL3Tests.shadow regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99085">Bug 99085</a> - [EGL] dEQP-EGL.functional.sharing.gles2.multithread intermittent</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99097">Bug 99097</a> - [vulkancts] dEQP-VK.image.store regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99100">Bug 99100</a> - [SKL,BDW,BSW,KBL] dEQP-VK.glsl.return.return_in_dynamic_loop_dynamic_vertex regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99119">Bug 99119</a> - swr_fence_work.cpp(42): error: argument of type "std::nullptr_t" is incompatible with parameter of type "unsigned long"</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99144">Bug 99144</a> - Incorrect rendering using glDrawArraysInstancedBaseInstance and first != 0 on Skylake</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99154">Bug 99154</a> - Link time error when using multiple builtin functions</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99158">Bug 99158</a> - vdpau segfaults and gpu locks with kodi on R9285</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99185">Bug 99185</a> - dEQP-EGL.functional.image.modify.tex_rgb5_a1_tex_subimage_rgba8</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99188">Bug 99188</a> - dEQP-EGL.functional.create_context_ext.robust_gl_30.rgb565_no_depth_no_stencil</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99210">Bug 99210</a> - ES3-CTS.functional.texture.mipmap.cube.generate.rgba5551_*</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99214">Bug 99214</a> - Crash in library libswrAVX.so when assigning vertex buffer object pointers with elements of type GL_DOUBLE</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99219">Bug 99219</a> - The Stanley Parable GPU hang when starting a new game</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99229">Bug 99229</a> - [G33] thousands of tests crash</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99231">Bug 99231</a> - [HSW][i965] Crash in upload_3dstate_streamout()</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99287">Bug 99287</a> - piglit.spec.glsl-1_10.execution.vs-nested-return-sibling-loop regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99303">Bug 99303</a> - [REGRESSION][BISECTED] DMs are crashing on start with "radeon"</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99314">Bug 99314</a> - [g33] glsl regressions</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99339">Bug 99339</a> - Blender line rendering broken after removing XY clipping of lines</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99354">Bug 99354</a> - [G71] "Assertion `bkref' failed" reproducible with glmark2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99389">Bug 99389</a> - Mesa build broken: sid_tables.h</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99391">Bug 99391</a> - [ILK,G45,G965] piglit regressions</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99401">Bug 99401</a> - [g33] regression: piglit.spec.!opengl 1_0.gl-1_0-beginend-coverage</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99419">Bug 99419</a> - Crash(Segmentation fault) si_shader_select in Master Of Orion</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99450">Bug 99450</a> - [amdgpu] Payday 2 visual glitches on some models</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99451">Bug 99451</a> - polygon offset use after free</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99456">Bug 99456</a> - Firefox crashing when opening about:support with WebGL2 enabled</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99631">Bug 99631</a> - segfault with OSVRTrackerView and openscenegraph git master</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99633">Bug 99633</a> - rasterizer/core/clip.h:279:49: error: ‘const struct API_STATE’ has no member named ‘linkageCount’</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99637">Bug 99637</a> - VLC video has corrupted colors when using VDPAU output on Radeon SI</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
TBD.
|
||||
<ul>
|
||||
<li>Building RADV requires --enable-gallium-llvm</li>
|
||||
<li>The vulkan headers vk_platform.h and vulkan.h are no longer installed</li>
|
||||
<li>The configure options --with-sha1 and --disable-shader-cache are
|
||||
removed alongside their respective library requirements</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
221
docs/relnotes/17.0.1.html
Normal file
221
docs/relnotes/17.0.1.html
Normal file
@@ -0,0 +1,221 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 17.0.1 Release Notes / March 4, 2017</h1>
|
||||
|
||||
<p>
|
||||
Mesa 17.0.1 is a bug fix release which fixes bugs found since the 17.0.0 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 17.0.1 implements the OpenGL 4.5 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 4.5. OpenGL
|
||||
4.5 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
e819bd3e515dac26faf9836d8f27a4ddf05323b9b23afb6c06536d4ac82e2743 mesa-17.0.1.tar.gz
|
||||
96fd70ef5f31d276a17e424e7e1bb79447ccbbe822b56844213ef932e7ad1b0c mesa-17.0.1.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98869">Bug 98869</a> - Electronic Super Joy graphic artefacts (regression,bisected)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99532">Bug 99532</a> - Compute shader doesn't give right result under some circumstances</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99677">Bug 99677</a> - heap-use-after-free in glsl</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99692">Bug 99692</a> - [radv] Mostly broken on Hawaii PRO/CIK ASICs</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99850">Bug 99850</a> - Tessellation bug on Carrizo</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Bas Nieuwenhuizen (4):</p>
|
||||
<ul>
|
||||
<li>radv: Never try to create more than max_sets descriptor sets.</li>
|
||||
<li>radv: Reset emitted compute pipeline when calling secondary cmd buffer.</li>
|
||||
<li>radv: Only use PKT3_OCCLUSION_QUERY when it doesn't hang.</li>
|
||||
<li>radv: Use correct size for availability flag.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ben Crocker (3):</p>
|
||||
<ul>
|
||||
<li>gallivm: Reenable PPC VSX (v3)</li>
|
||||
<li>gallivm: Improve debug output (V2)</li>
|
||||
<li>gallivm: Override getHostCPUName() "generic" w/ "pwr8" (v4)</li>
|
||||
</ul>
|
||||
|
||||
<p>Brendan King (1):</p>
|
||||
<ul>
|
||||
<li>egl/dri3: implement query surface hook</li>
|
||||
</ul>
|
||||
|
||||
<p>Christian Gmeiner (2):</p>
|
||||
<ul>
|
||||
<li>etnaviv: move pctx initialisation to avoid a null dereference</li>
|
||||
<li>etnaviv: remove number of pixel pipes validation</li>
|
||||
</ul>
|
||||
|
||||
<p>Connor Abbott (1):</p>
|
||||
<ul>
|
||||
<li>anv: fix Get*MemoryRequirements for !LLC</li>
|
||||
</ul>
|
||||
|
||||
<p>Daniel Stone (1):</p>
|
||||
<ul>
|
||||
<li>egl/wayland: Don't use DRM format codes for SHM</li>
|
||||
</ul>
|
||||
|
||||
<p>Dave Airlie (6):</p>
|
||||
<ul>
|
||||
<li>tgsi: fix memory leak in tgsi sanity check</li>
|
||||
<li>radv: change base aligmment for allocated memory.</li>
|
||||
<li>radv: fix cik macroModeIndex.</li>
|
||||
<li>radv: adopt some init config workarounds from radeonsi.</li>
|
||||
<li>radv: fix depth format in blit2d.</li>
|
||||
<li>radv: fix txs for sampler buffers</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (8):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 17.0.0</li>
|
||||
<li>bin/get-extra-pick-list: use git merge-base to get the branchpoint</li>
|
||||
<li>bin/get-extra-pick-list: rework to use already_picked list</li>
|
||||
<li>bin/get-typod-pick-list.sh: limit `git grep ...' to only as needed</li>
|
||||
<li>bin/get-pick-list.sh: limit `git grep ...' only as needed</li>
|
||||
<li>bin/get-pick-list.sh: remove ancient way of nominating patches</li>
|
||||
<li>bin/get-fixes-pick-list.sh: add new script</li>
|
||||
<li>Update version to 17.0.1</li>
|
||||
</ul>
|
||||
|
||||
<p>Eric Anholt (1):</p>
|
||||
<ul>
|
||||
<li>vc4: Avoid emitting small immediates for UBO indirect load address guards.</li>
|
||||
</ul>
|
||||
|
||||
<p>Grazvydas Ignotas (3):</p>
|
||||
<ul>
|
||||
<li>r300g: only allow byteswapped formats on big endian</li>
|
||||
<li>gallium/u_queue: fix a crash with atexit handlers</li>
|
||||
<li>gallium/u_queue: set num_threads correctly if not all threads start</li>
|
||||
</ul>
|
||||
|
||||
<p>Hans de Goede (1):</p>
|
||||
<ul>
|
||||
<li>glx/glvnd: Fix GLXdispatchIndex sorting</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (4):</p>
|
||||
<ul>
|
||||
<li>gm107/ir: fix address offset bitfield for ATOMS</li>
|
||||
<li>nvc0: set the render condition in the compute object</li>
|
||||
<li>st/mesa: don't pass compare mode for stencil-sampled textures</li>
|
||||
<li>nvc0: disable linked tsc mode in compute launch descriptor</li>
|
||||
</ul>
|
||||
|
||||
<p>Jason Ekstrand (10):</p>
|
||||
<ul>
|
||||
<li>i965/sampler_state: Clamp min/max LOD to 14 on gen7+</li>
|
||||
<li>i965/sampler_state: Pass texObj into update_sampler_state</li>
|
||||
<li>i965/sampler_state: Set the "Base Mip Level" field on Sandy Bridge</li>
|
||||
<li>intel/blorp: Swizzle clear colors on the CPU</li>
|
||||
<li>i965/fs: Fix the inline nir_op_pack_double optimization</li>
|
||||
<li>anv: Add an invalidate_range helper</li>
|
||||
<li>anv/query: clflush the bo map on non-LLC platforms</li>
|
||||
<li>genxml: Make MI_STORE_DATA_IMM more consistent</li>
|
||||
<li>anv/query: Perform CmdResetQueryPool on the GPU</li>
|
||||
<li>intel/blorp: Explicitly flush all allocated state</li>
|
||||
</ul>
|
||||
|
||||
<p>Jose Maria Casanova Crespo (1):</p>
|
||||
<ul>
|
||||
<li>glsl: non-last member unsized array on SSBO must fail compilation on GLSL ES 3.1</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Do (TCS && !TES) draw time validation in ES as well.</li>
|
||||
</ul>
|
||||
|
||||
<p>Leo Liu (1):</p>
|
||||
<ul>
|
||||
<li>configure.ac: check require_basic_egl only if egl enabled</li>
|
||||
</ul>
|
||||
|
||||
<p>Lionel Landwerlin (2):</p>
|
||||
<ul>
|
||||
<li>anv: wsi: report presentation error per image request</li>
|
||||
<li>i965/fs: fix uninitialized memory access</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (6):</p>
|
||||
<ul>
|
||||
<li>radeonsi: fix UNSIGNED_BYTE index buffer fallback with non-zero start (v2)</li>
|
||||
<li>gallium/util: remove unused u_index_modify helpers</li>
|
||||
<li>gallium/u_index_modify: don't add PIPE_TRANSFER_UNSYNCHRONIZED unconditionally</li>
|
||||
<li>gallium/u_queue: fix random crashes when the app calls exit()</li>
|
||||
<li>radeonsi: fix broken tessellation on Carrizo and Stoney</li>
|
||||
<li>amd/common: fix ASICREV_IS_POLARIS11_M for Polaris12</li>
|
||||
</ul>
|
||||
|
||||
<p>Mauro Rossi (2):</p>
|
||||
<ul>
|
||||
<li>android: radeonsi: fix sid_table.h generated header include path</li>
|
||||
<li>android: glsl: build shader cache sources</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (1):</p>
|
||||
<ul>
|
||||
<li>configure.ac: Drop LLVM compiler flags more radically</li>
|
||||
</ul>
|
||||
|
||||
<p>Nicolai Hähnle (3):</p>
|
||||
<ul>
|
||||
<li>winsys/amdgpu: reduce max_alloc_size based on GTT limits</li>
|
||||
<li>radeonsi: handle MultiDrawIndirect in si_get_draw_start_count</li>
|
||||
<li>radeonsi: fix UINT/SINT clamping for 10-bit formats on <= CIK</li>
|
||||
</ul>
|
||||
|
||||
<p>Samuel Iglesias Gonsálvez (1):</p>
|
||||
<ul>
|
||||
<li>glsl: fix heap-use-after-free in ast_declarator_list::hir()</li>
|
||||
</ul>
|
||||
|
||||
<p>Tapani Pälli (1):</p>
|
||||
<ul>
|
||||
<li>android: fix droid_create_image_from_prime_fd_yuv for YV12</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
185
docs/relnotes/17.0.2.html
Normal file
185
docs/relnotes/17.0.2.html
Normal file
@@ -0,0 +1,185 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 17.0.2 Release Notes / March 20, 2017</h1>
|
||||
|
||||
<p>
|
||||
Mesa 17.0.2 is a bug fix release which fixes bugs found since the 17.0.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 17.0.2 implements the OpenGL 4.5 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 4.5. OpenGL
|
||||
4.5 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
2e0f41e7974ba7a36ca32bbeaf8ebcd65c8fd4d2dc9872f04d4becbd5e7a8cb5 mesa-17.0.2.tar.gz
|
||||
f8f191f909e01e65de38d5bdea5fb057f21649a3aed20948be02348e77a689d4 mesa-17.0.2.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68504">Bug 68504</a> - 9.2-rc1 workaround for clover build failure on ppc/altivec: cannot convert 'bool' to '__vector(4) __bool int' in return</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=97988">Bug 97988</a> - [radeonsi] playing back videos with VDPAU exhibits deinterlacing/anti-aliasing issues not visible with VA-API</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99484">Bug 99484</a> - Crusader Kings 2 - Loading bars, siege bars, morale bars, etc. do not render correctly</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99715">Bug 99715</a> - Don't print: "Note: Buggy applications may crash, if they do please report to vendor"</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=100049">Bug 100049</a> - "ralloc: Make sure ralloc() allocations match malloc()'s alignment." causes seg fault in 32bit build</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Alex Smith (3):</p>
|
||||
<ul>
|
||||
<li>radv: Emit pending flushes before executing a secondary command buffer</li>
|
||||
<li>radv: Flush before copying with PKT3_WRITE_DATA in CmdUpdateBuffer</li>
|
||||
<li>radv/ac: Fix shared memory offset calculation</li>
|
||||
</ul>
|
||||
|
||||
<p>Bas Nieuwenhuizen (3):</p>
|
||||
<ul>
|
||||
<li>radv: Disable HTILE for textures with multiple layers/levels.</li>
|
||||
<li>radv: Emit cache flushes before CP DMA.</li>
|
||||
<li>Revert "radv: Emit cache flushes before CP DMA."</li>
|
||||
</ul>
|
||||
|
||||
<p>Dave Airlie (3):</p>
|
||||
<ul>
|
||||
<li>radv: drop Z24 support.</li>
|
||||
<li>radv: disable mip point pre clamping.</li>
|
||||
<li>radv: setup llvm target data layout</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (4):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 17.0.1</li>
|
||||
<li>cherry-ignore: add the swizzle blorp_clear fix</li>
|
||||
<li>i965: move brw_define.h ifndef guard to the top</li>
|
||||
<li>Update version to 17.0.2</li>
|
||||
</ul>
|
||||
|
||||
<p>Fredrik Höglund (2):</p>
|
||||
<ul>
|
||||
<li>radv: fix the dynamic buffer index in vkCmdBindDescriptorSets</li>
|
||||
<li>radv/ac: fix multiple descriptor sets with dynamic buffers</li>
|
||||
</ul>
|
||||
|
||||
<p>Gregory Hainaut (1):</p>
|
||||
<ul>
|
||||
<li>glapi: fix typo in count_scale</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (2):</p>
|
||||
<ul>
|
||||
<li>nvc0: take extra pushbuf space into account for pushbuf_space calls</li>
|
||||
<li>nvc0: increase alignment to 256 for texture buffers on fermi</li>
|
||||
</ul>
|
||||
|
||||
<p>Jacob Lifshay (1):</p>
|
||||
<ul>
|
||||
<li>vulkan/wsi: Improve the DRI3 error message</li>
|
||||
</ul>
|
||||
|
||||
<p>James Legg (1):</p>
|
||||
<ul>
|
||||
<li>radv: Fix using more than 4 bound descriptor sets</li>
|
||||
</ul>
|
||||
|
||||
<p>Jason Ekstrand (7):</p>
|
||||
<ul>
|
||||
<li>anv/blorp/clear_subpass: Only set surface clear color for fast clears</li>
|
||||
<li>anv: Accurately advertise dynamic descriptor limits</li>
|
||||
<li>anv: Stall before fast-clear operations</li>
|
||||
<li>anv: Properly handle destroying NULL devices and instances</li>
|
||||
<li>anv/blorp: Turn off AUX after doing a CCS_D resolve</li>
|
||||
<li>anv/blorp: Only set a clear color for resolves if fast-cleared</li>
|
||||
<li>nir/intrinsics: Make load_barycentric_input take a 2-component coor</li>
|
||||
</ul>
|
||||
|
||||
<p>Jonas Pfeil (1):</p>
|
||||
<ul>
|
||||
<li>ralloc: Make sure ralloc() allocations match malloc()'s alignment.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (1):</p>
|
||||
<ul>
|
||||
<li>egl: Ensure ResetNotificationStrategy matches for shared contexts.</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (3):</p>
|
||||
<ul>
|
||||
<li>st/mesa: reset sample_mask, min_sample, and render_condition for PBO ops</li>
|
||||
<li>st/mesa: set blend state for PBO readbacks</li>
|
||||
<li>radeonsi: mark all bound shader buffer ranges as initialized</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (1):</p>
|
||||
<ul>
|
||||
<li>clover: Work around build failure with AltiVec.</li>
|
||||
</ul>
|
||||
|
||||
<p>Nanley Chery (2):</p>
|
||||
<ul>
|
||||
<li>anv/pass: Avoid accessing attachment array out of bounds</li>
|
||||
<li>anv/image: Remove extra dependency on HiZ-specific variable</li>
|
||||
</ul>
|
||||
|
||||
<p>Nicolai Hähnle (2):</p>
|
||||
<ul>
|
||||
<li>st/glsl_to_tgsi: avoid iterating past the head of the instruction list</li>
|
||||
<li>st/mesa: inform the driver of framebuffer changes before compute dispatches</li>
|
||||
</ul>
|
||||
|
||||
<p>Robert Foss (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Avoid read of uninitialized variable</li>
|
||||
</ul>
|
||||
|
||||
<p>Samuel Iglesias Gonsálvez (5):</p>
|
||||
<ul>
|
||||
<li>i965/fs: mark last DF uniform array element as 64 bit live one</li>
|
||||
<li>i965/fs: detect different bit size accesses to uniforms to push them in proper locations</li>
|
||||
<li>i965/fs: fix indirect load DF uniforms on BSW/BXT</li>
|
||||
<li>i965/fs: fix source type when emitting MOV_INDIRECT to read ICP handles</li>
|
||||
<li>i965/fs: emit MOV_INDIRECT with the source with the right register type</li>
|
||||
</ul>
|
||||
|
||||
<p>Samuel Pitoiset (1):</p>
|
||||
<ul>
|
||||
<li>radeonsi: disable sinking common instructions down to the end block</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
189
docs/relnotes/17.0.3.html
Normal file
189
docs/relnotes/17.0.3.html
Normal file
@@ -0,0 +1,189 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 17.0.3 Release Notes / April 1, 2017</h1>
|
||||
|
||||
<p>
|
||||
Mesa 17.0.3 is a bug fix release which fixes bugs found since the 17.0.2 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 17.0.3 implements the OpenGL 4.5 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 4.5. OpenGL
|
||||
4.5 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
8253edf1bdd7b14ab63d5982349143a5c9ac3767f39a63257cc9d7e7d92f60f1 mesa-17.0.3.tar.gz
|
||||
ca646f5075a002d60ef9123c8a4331cede155c01712ef945a65c59a5e69fe7ed mesa-17.0.3.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=96743">Bug 96743</a> - [BYT, HSW, SKL, BXT, KBL] GPU hangs with GfxBench 4.0 CarChase</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99246">Bug 99246</a> - [d3dadapter+radeonsi & bisect] EVE-Online : hang on wormhole sight</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=100061">Bug 100061</a> - LODQ instruction generated with invalid dst mask</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=100182">Bug 100182</a> - Flickering in The Talos Principle on Sky Lake GT4.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=100201">Bug 100201</a> - Windows scons build with MSVC toolchain and LLVM 4.0 fails</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Alex Deucher (1):</p>
|
||||
<ul>
|
||||
<li>radeonsi: add new polaris12 pci id</li>
|
||||
</ul>
|
||||
|
||||
<p>Andres Gomez (5):</p>
|
||||
<ul>
|
||||
<li>glsl: on UBO/SSBOs link error reset the number of active blocks to 0</li>
|
||||
<li>cherry-ignore: add the Invalidate L2 for TRANSFER_WRITE barriers fix</li>
|
||||
<li>cherry-ignore: add the Flush after unmap in gbm/dri fix</li>
|
||||
<li>cherry-ignore: corrected typo in the Flush after unmap in gbm/dri fix</li>
|
||||
<li>Update version to 17.0.3</li>
|
||||
</ul>
|
||||
|
||||
<p>Axel Davy (2):</p>
|
||||
<ul>
|
||||
<li>st/nine: Resolve deadlock in surface/volume dtors when using csmt</li>
|
||||
<li>st/nine: Use atomics for available_texture_mem</li>
|
||||
</ul>
|
||||
|
||||
<p>Bas Nieuwenhuizen (1):</p>
|
||||
<ul>
|
||||
<li>radv: flush DB cache before and after HTILE decompress.</li>
|
||||
</ul>
|
||||
|
||||
<p>Dave Airlie (1):</p>
|
||||
<ul>
|
||||
<li>radv: fix primitive reset index emission</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (1):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 17.0.2</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (1):</p>
|
||||
<ul>
|
||||
<li>st/mesa: set result writemask based on ir type</li>
|
||||
</ul>
|
||||
|
||||
<p>Jan Vesely (1):</p>
|
||||
<ul>
|
||||
<li>clover: use pipe_resource references</li>
|
||||
</ul>
|
||||
|
||||
<p>Jason Ekstrand (9):</p>
|
||||
<ul>
|
||||
<li>anv/query: Invalidate the correct range</li>
|
||||
<li>anv/GetQueryPoolResults: Actually implement the spec</li>
|
||||
<li>anv/image: Return early when unbinding an image</li>
|
||||
<li>anv/query: Fix the location of timestamp availability</li>
|
||||
<li>anv: Make anv_get_layerCount a macro</li>
|
||||
<li>anv/blorp: Use anv_get_layerCount everywhere</li>
|
||||
<li>anv/cmd_buffer: Apply flush operations prior to executing secondaries</li>
|
||||
<li>anv/cmd_buffer: Fix bad indentation</li>
|
||||
<li>anv: Flush caches prior to PIPELINE_SELECT on all gens</li>
|
||||
</ul>
|
||||
|
||||
<p>José Fonseca (1):</p>
|
||||
<ul>
|
||||
<li>c11/threads: Include thr/xtimec.h for xtime definition when building with MSVC.</li>
|
||||
</ul>
|
||||
|
||||
<p>Juan A. Suarez Romero (1):</p>
|
||||
<ul>
|
||||
<li>tests/cache_test: allow crossing mount points</li>
|
||||
</ul>
|
||||
|
||||
<p>Karol Herbst (1):</p>
|
||||
<ul>
|
||||
<li>nvc0/ir: treat FMA like MAD for operand propagation</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (1):</p>
|
||||
<ul>
|
||||
<li>i965: Fall back to GL 4.2/4.3 on Haswell if the kernel isn't new enough.</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (1):</p>
|
||||
<ul>
|
||||
<li>radeonsi: don't hang on shader compile failure</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (1):</p>
|
||||
<ul>
|
||||
<li>i965/fs: Don't emit SEL instructions for type-converting MOVs.</li>
|
||||
</ul>
|
||||
|
||||
<p>Nanley Chery (1):</p>
|
||||
<ul>
|
||||
<li>intel: Correct the BDW surface state size</li>
|
||||
</ul>
|
||||
|
||||
<p>Nicolai Hähnle (1):</p>
|
||||
<ul>
|
||||
<li>mesa/main: fix MultiDrawElements[BaseVertex] validation of primcount</li>
|
||||
</ul>
|
||||
|
||||
<p>Rob Clark (1):</p>
|
||||
<ul>
|
||||
<li>freedreno: fix memory leak</li>
|
||||
</ul>
|
||||
|
||||
<p>Tim Rowley (1):</p>
|
||||
<ul>
|
||||
<li>swr: [rasterizer jitter] fix llvm >= 5.0 build break</li>
|
||||
</ul>
|
||||
|
||||
<p>Timothy Arceri (2):</p>
|
||||
<ul>
|
||||
<li>glsl: fix lower jumps for returns when loop is inside an if</li>
|
||||
<li>mesa: update lower_jumps tests after bug fix</li>
|
||||
</ul>
|
||||
|
||||
<p>Topi Pohjolainen (1):</p>
|
||||
<ul>
|
||||
<li>i965/gen8+: Do full stall when switching pipeline</li>
|
||||
</ul>
|
||||
|
||||
<p>Xu Randy (2):</p>
|
||||
<ul>
|
||||
<li>anv/blorp: Fix a crash in CmdClearColorImage</li>
|
||||
<li>anv/genX: Solve the vkCreateGraphicsPipelines crash</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
148
docs/relnotes/17.0.4.html
Normal file
148
docs/relnotes/17.0.4.html
Normal file
@@ -0,0 +1,148 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 17.0.4 Release Notes / April 17, 2017</h1>
|
||||
|
||||
<p>
|
||||
Mesa 17.0.4 is a bug fix release which fixes bugs found since the 17.0.3 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 17.0.4 implements the OpenGL 4.5 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 4.5. OpenGL
|
||||
4.5 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
TBD
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99515">Bug 99515</a> - SIGSEGV MAPERR on Android nougat-x86 with mesa 17.0.0rc</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=100391">Bug 100391</a> - SachaWillems deferredmultisampling asserts</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=100452">Bug 100452</a> - push_constants host memory leak when resetting command buffer</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=100582">Bug 100582</a> - [GEN8+] piglit.spec.arb_stencil_texturing.glblitframebuffer corrupts state.gl_texture* assertions</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Alex Deucher (1):</p>
|
||||
<ul>
|
||||
<li>radeonsi: add new polaris10 pci id</li>
|
||||
</ul>
|
||||
|
||||
<p>Alex Smith (1):</p>
|
||||
<ul>
|
||||
<li>radv: Invalidate L2 for TRANSFER_WRITE barriers</li>
|
||||
</ul>
|
||||
|
||||
<p>Andres Gomez (1):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 17.0.3</li>
|
||||
</ul>
|
||||
|
||||
<p>Craig Stout (1):</p>
|
||||
<ul>
|
||||
<li>anv/cmd_buffer: fix host memory leak</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (3):</p>
|
||||
<ul>
|
||||
<li>Revert "cherry-ignore: add the Flush after unmap in gbm/dri fix"</li>
|
||||
<li>Revert "freedreno: fix memory leak"</li>
|
||||
<li>Update version to 17.0.4</li>
|
||||
</ul>
|
||||
|
||||
<p>Fabio Estevam (1):</p>
|
||||
<ul>
|
||||
<li>loader: Move non-error message to debug level</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (4):</p>
|
||||
<ul>
|
||||
<li>nvc0/ir: fix LSB/BFE/BFI implementations</li>
|
||||
<li>nvc0/ir: fix overwriting of offset register with interpolateAtOffset</li>
|
||||
<li>nvc0: increase texture buffer object alignment to 256 for pre-GM107</li>
|
||||
<li>nouveau: when mapping a persistent buffer, synchronize on former xfers</li>
|
||||
</ul>
|
||||
|
||||
<p>Jason Ekstrand (5):</p>
|
||||
<ul>
|
||||
<li>i965/fs: Always provide a default LOD of 0 for TXS and TXL</li>
|
||||
<li>anv/pipeline: Properly handle unset gl_Layer and gl_ViewportIndex</li>
|
||||
<li>anv/blorp: Align vertex buffers to 64B</li>
|
||||
<li>i965/blorp: Align vertex buffers to 64B</li>
|
||||
<li>i965/blorp: Bump the batch space estimate</li>
|
||||
</ul>
|
||||
|
||||
<p>Jerome Duval (2):</p>
|
||||
<ul>
|
||||
<li>haiku: build fixes around debug defines</li>
|
||||
<li>haiku/winsys: fix dt prototype args</li>
|
||||
</ul>
|
||||
|
||||
<p>Julien Isorce (4):</p>
|
||||
<ul>
|
||||
<li>winsys/radeon: check null in radeon_cs_create_fence</li>
|
||||
<li>winsys/radeon: check null return from radeon_cs_create_fence in cs_flush</li>
|
||||
<li>radeon: initialize hole variable before calling container_of</li>
|
||||
<li>radeon_drm_bo: explicitly check return value of drmCommandWriteRead</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (4):</p>
|
||||
<ul>
|
||||
<li>i965: Document the sad story of the kernel command parser.</li>
|
||||
<li>i965: Set screen->cmd_parser_version to 0 if we can't write registers.</li>
|
||||
<li>i965: Skip register write detection when possible.</li>
|
||||
<li>i965: Set kernel features before computing max GL version.</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (1):</p>
|
||||
<ul>
|
||||
<li>targets: export radeon winsys_create functions to silence LLVM warning</li>
|
||||
</ul>
|
||||
|
||||
<p>Michal Srb (1):</p>
|
||||
<ul>
|
||||
<li>st: Add cubeMapFace parameter to st_finalize_texture.</li>
|
||||
</ul>
|
||||
|
||||
<p>Thomas Hellstrom (1):</p>
|
||||
<ul>
|
||||
<li>gbm/dri: Flush after unmap</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1164,8 +1164,6 @@ struct __DRIdri2ExtensionRec {
|
||||
#define __DRI_IMAGE_FORMAT_ARGB2101010 0x100a
|
||||
#define __DRI_IMAGE_FORMAT_SARGB8 0x100b
|
||||
#define __DRI_IMAGE_FORMAT_ARGB1555 0x100c
|
||||
#define __DRI_IMAGE_FORMAT_R16 0x100d
|
||||
#define __DRI_IMAGE_FORMAT_GR1616 0x100e
|
||||
|
||||
#define __DRI_IMAGE_USE_SHARE 0x0001
|
||||
#define __DRI_IMAGE_USE_SCANOUT 0x0002
|
||||
@@ -1194,8 +1192,6 @@ struct __DRIdri2ExtensionRec {
|
||||
#define __DRI_IMAGE_FOURCC_R8 0x20203852
|
||||
#define __DRI_IMAGE_FOURCC_GR88 0x38385247
|
||||
#define __DRI_IMAGE_FOURCC_ARGB1555 0x35315241
|
||||
#define __DRI_IMAGE_FOURCC_R16 0x20363152
|
||||
#define __DRI_IMAGE_FOURCC_GR1616 0x32335247
|
||||
#define __DRI_IMAGE_FOURCC_RGB565 0x36314752
|
||||
#define __DRI_IMAGE_FOURCC_ARGB8888 0x34325241
|
||||
#define __DRI_IMAGE_FOURCC_XRGB8888 0x34325258
|
||||
|
@@ -30,6 +30,9 @@
|
||||
#define EMULATED_THREADS_H_INCLUDED_
|
||||
|
||||
#include <time.h>
|
||||
#ifdef _MSC_VER
|
||||
#include <thr/xtimec.h> // for xtime
|
||||
#endif
|
||||
|
||||
#ifndef TIME_UTC
|
||||
#define TIME_UTC 1
|
||||
@@ -41,11 +44,13 @@
|
||||
typedef void (*tss_dtor_t)(void*);
|
||||
typedef int (*thrd_start_t)(void*);
|
||||
|
||||
#ifndef _MSC_VER
|
||||
struct xtime {
|
||||
time_t sec;
|
||||
long nsec;
|
||||
};
|
||||
typedef struct xtime xtime;
|
||||
#endif
|
||||
|
||||
|
||||
/*-------------------- enumeration constants --------------------*/
|
||||
|
@@ -202,6 +202,7 @@ CHIPSET(0x67C9, POLARIS10_, POLARIS10)
|
||||
CHIPSET(0x67CA, POLARIS10_, POLARIS10)
|
||||
CHIPSET(0x67CC, POLARIS10_, POLARIS10)
|
||||
CHIPSET(0x67CF, POLARIS10_, POLARIS10)
|
||||
CHIPSET(0x67D0, POLARIS10_, POLARIS10)
|
||||
CHIPSET(0x67DF, POLARIS10_, POLARIS10)
|
||||
|
||||
CHIPSET(0x98E4, STONEY_, STONEY)
|
||||
@@ -211,4 +212,5 @@ CHIPSET(0x6981, POLARIS12_, POLARIS12)
|
||||
CHIPSET(0x6985, POLARIS12_, POLARIS12)
|
||||
CHIPSET(0x6986, POLARIS12_, POLARIS12)
|
||||
CHIPSET(0x6987, POLARIS12_, POLARIS12)
|
||||
CHIPSET(0x6995, POLARIS12_, POLARIS12)
|
||||
CHIPSET(0x699F, POLARIS12_, POLARIS12)
|
||||
|
@@ -6,7 +6,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2017 The Khronos Group Inc.
|
||||
** Copyright (c) 2015-2016 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
@@ -43,7 +43,7 @@ extern "C" {
|
||||
#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
|
||||
#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
|
||||
// Version of this file
|
||||
#define VK_HEADER_VERSION 39
|
||||
#define VK_HEADER_VERSION 38
|
||||
|
||||
|
||||
#define VK_NULL_HANDLE 0
|
||||
@@ -145,7 +145,6 @@ typedef enum VkResult {
|
||||
VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001,
|
||||
VK_ERROR_VALIDATION_FAILED_EXT = -1000011001,
|
||||
VK_ERROR_INVALID_SHADER_NV = -1000012000,
|
||||
VK_ERROR_OUT_OF_POOL_MEMORY_KHR = -1000069000,
|
||||
VK_RESULT_BEGIN_RANGE = VK_ERROR_FRAGMENTED_POOL,
|
||||
VK_RESULT_END_RANGE = VK_INCOMPLETE,
|
||||
VK_RESULT_RANGE_SIZE = (VK_INCOMPLETE - VK_ERROR_FRAGMENTED_POOL + 1),
|
||||
@@ -226,28 +225,13 @@ typedef enum VkStructureType {
|
||||
VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000,
|
||||
VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001,
|
||||
VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001,
|
||||
VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002,
|
||||
VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004,
|
||||
VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006,
|
||||
VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008,
|
||||
VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000,
|
||||
VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000,
|
||||
VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000,
|
||||
VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001,
|
||||
VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002,
|
||||
VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005,
|
||||
VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000,
|
||||
VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
|
||||
VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
|
||||
VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
|
||||
VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003,
|
||||
VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO,
|
||||
VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1),
|
||||
@@ -856,8 +840,6 @@ typedef enum VkFormatFeatureFlagBits {
|
||||
VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800,
|
||||
VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
|
||||
VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
|
||||
VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
|
||||
VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
|
||||
VK_FORMAT_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkFormatFeatureFlagBits;
|
||||
typedef VkFlags VkFormatFeatureFlags;
|
||||
@@ -881,7 +863,6 @@ typedef enum VkImageCreateFlagBits {
|
||||
VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
|
||||
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008,
|
||||
VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010,
|
||||
VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
|
||||
VK_IMAGE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkImageCreateFlagBits;
|
||||
typedef VkFlags VkImageCreateFlags;
|
||||
@@ -3225,18 +3206,6 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
|
||||
|
||||
typedef enum VkColorSpaceKHR {
|
||||
VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0,
|
||||
VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = 1000104001,
|
||||
VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104002,
|
||||
VK_COLOR_SPACE_SCRGB_LINEAR_EXT = 1000104003,
|
||||
VK_COLOR_SPACE_SCRGB_NONLINEAR_EXT = 1000104004,
|
||||
VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104005,
|
||||
VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104006,
|
||||
VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104007,
|
||||
VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104008,
|
||||
VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104009,
|
||||
VK_COLOR_SPACE_BT2020_NONLINEAR_EXT = 1000104010,
|
||||
VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
|
||||
VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012,
|
||||
VK_COLOR_SPACE_BEGIN_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
|
||||
VK_COLOR_SPACE_END_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
|
||||
VK_COLOR_SPACE_RANGE_SIZE_KHR = (VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - VK_COLOR_SPACE_SRGB_NONLINEAR_KHR + 1),
|
||||
@@ -3772,136 +3741,6 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
|
||||
#define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME "VK_KHR_sampler_mirror_clamp_to_edge"
|
||||
|
||||
|
||||
#define VK_KHR_get_physical_device_properties2 1
|
||||
#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1
|
||||
#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2"
|
||||
|
||||
typedef struct VkPhysicalDeviceFeatures2KHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkPhysicalDeviceFeatures features;
|
||||
} VkPhysicalDeviceFeatures2KHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceProperties2KHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkPhysicalDeviceProperties properties;
|
||||
} VkPhysicalDeviceProperties2KHR;
|
||||
|
||||
typedef struct VkFormatProperties2KHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkFormatProperties formatProperties;
|
||||
} VkFormatProperties2KHR;
|
||||
|
||||
typedef struct VkImageFormatProperties2KHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkImageFormatProperties imageFormatProperties;
|
||||
} VkImageFormatProperties2KHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceImageFormatInfo2KHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkFormat format;
|
||||
VkImageType type;
|
||||
VkImageTiling tiling;
|
||||
VkImageUsageFlags usage;
|
||||
VkImageCreateFlags flags;
|
||||
} VkPhysicalDeviceImageFormatInfo2KHR;
|
||||
|
||||
typedef struct VkQueueFamilyProperties2KHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkQueueFamilyProperties queueFamilyProperties;
|
||||
} VkQueueFamilyProperties2KHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceMemoryProperties2KHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkPhysicalDeviceMemoryProperties memoryProperties;
|
||||
} VkPhysicalDeviceMemoryProperties2KHR;
|
||||
|
||||
typedef struct VkSparseImageFormatProperties2KHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkSparseImageFormatProperties properties;
|
||||
} VkSparseImageFormatProperties2KHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceSparseImageFormatInfo2KHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkFormat format;
|
||||
VkImageType type;
|
||||
VkSampleCountFlagBits samples;
|
||||
VkImageUsageFlags usage;
|
||||
VkImageTiling tiling;
|
||||
} VkPhysicalDeviceSparseImageFormatInfo2KHR;
|
||||
|
||||
|
||||
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2KHR* pFeatures);
|
||||
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2KHR* pProperties);
|
||||
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties2KHR)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2KHR* pFormatProperties);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, VkImageFormatProperties2KHR* pImageFormatProperties);
|
||||
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2KHR* pQueueFamilyProperties);
|
||||
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties);
|
||||
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2KHR* pProperties);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2KHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
VkPhysicalDeviceFeatures2KHR* pFeatures);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2KHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
VkPhysicalDeviceProperties2KHR* pProperties);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2KHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
VkFormat format,
|
||||
VkFormatProperties2KHR* pFormatProperties);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2KHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo,
|
||||
VkImageFormatProperties2KHR* pImageFormatProperties);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2KHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t* pQueueFamilyPropertyCount,
|
||||
VkQueueFamilyProperties2KHR* pQueueFamilyProperties);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2KHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo,
|
||||
uint32_t* pPropertyCount,
|
||||
VkSparseImageFormatProperties2KHR* pProperties);
|
||||
#endif
|
||||
|
||||
#define VK_KHR_shader_draw_parameters 1
|
||||
#define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1
|
||||
#define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters"
|
||||
|
||||
|
||||
#define VK_KHR_maintenance1 1
|
||||
#define VK_KHR_MAINTENANCE1_SPEC_VERSION 1
|
||||
#define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1"
|
||||
|
||||
typedef VkFlags VkCommandPoolTrimFlagsKHR;
|
||||
|
||||
typedef void (VKAPI_PTR *PFN_vkTrimCommandPoolKHR)(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlagsKHR flags);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR void VKAPI_CALL vkTrimCommandPoolKHR(
|
||||
VkDevice device,
|
||||
VkCommandPool commandPool,
|
||||
VkCommandPoolTrimFlagsKHR flags);
|
||||
#endif
|
||||
|
||||
#define VK_EXT_debug_report 1
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT)
|
||||
|
||||
@@ -4328,42 +4167,6 @@ typedef struct VkValidationFlagsEXT {
|
||||
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_VI_NN
|
||||
#define VK_NN_vi_surface 1
|
||||
#define VK_NN_VI_SURFACE_SPEC_VERSION 1
|
||||
#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
|
||||
|
||||
typedef VkFlags VkViSurfaceCreateFlagsNN;
|
||||
|
||||
typedef struct VkViSurfaceCreateInfoNN {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkViSurfaceCreateFlagsNN flags;
|
||||
void* window;
|
||||
} VkViSurfaceCreateInfoNN;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN(
|
||||
VkInstance instance,
|
||||
const VkViSurfaceCreateInfoNN* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
#endif /* VK_USE_PLATFORM_VI_NN */
|
||||
|
||||
#define VK_EXT_shader_subgroup_ballot 1
|
||||
#define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1
|
||||
#define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot"
|
||||
|
||||
|
||||
#define VK_EXT_shader_subgroup_vote 1
|
||||
#define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1
|
||||
#define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote"
|
||||
|
||||
|
||||
#define VK_NVX_device_generated_commands 1
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkObjectTableNVX)
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNVX)
|
||||
@@ -4519,7 +4322,6 @@ typedef struct VkObjectTableIndexBufferEntryNVX {
|
||||
VkObjectEntryTypeNVX type;
|
||||
VkObjectEntryUsageFlagsNVX flags;
|
||||
VkBuffer buffer;
|
||||
VkIndexType indexType;
|
||||
} VkObjectTableIndexBufferEntryNVX;
|
||||
|
||||
typedef struct VkObjectTablePushConstantEntryNVX {
|
||||
@@ -4591,171 +4393,6 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
|
||||
VkDeviceGeneratedCommandsLimitsNVX* pLimits);
|
||||
#endif
|
||||
|
||||
#define VK_EXT_direct_mode_display 1
|
||||
#define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1
|
||||
#define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display"
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkReleaseDisplayEXT)(VkPhysicalDevice physicalDevice, VkDisplayKHR display);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkReleaseDisplayEXT(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
VkDisplayKHR display);
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
|
||||
#define VK_EXT_acquire_xlib_display 1
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
|
||||
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
|
||||
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
Display* dpy,
|
||||
VkDisplayKHR display);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
Display* dpy,
|
||||
RROutput rrOutput,
|
||||
VkDisplayKHR* pDisplay);
|
||||
#endif
|
||||
#endif /* VK_USE_PLATFORM_XLIB_XRANDR_EXT */
|
||||
|
||||
#define VK_EXT_display_surface_counter 1
|
||||
#define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1
|
||||
#define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter"
|
||||
|
||||
|
||||
typedef enum VkSurfaceCounterFlagBitsEXT {
|
||||
VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001,
|
||||
VK_SURFACE_COUNTER_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkSurfaceCounterFlagBitsEXT;
|
||||
typedef VkFlags VkSurfaceCounterFlagsEXT;
|
||||
|
||||
typedef struct VkSurfaceCapabilities2EXT {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint32_t minImageCount;
|
||||
uint32_t maxImageCount;
|
||||
VkExtent2D currentExtent;
|
||||
VkExtent2D minImageExtent;
|
||||
VkExtent2D maxImageExtent;
|
||||
uint32_t maxImageArrayLayers;
|
||||
VkSurfaceTransformFlagsKHR supportedTransforms;
|
||||
VkSurfaceTransformFlagBitsKHR currentTransform;
|
||||
VkCompositeAlphaFlagsKHR supportedCompositeAlpha;
|
||||
VkImageUsageFlags supportedUsageFlags;
|
||||
VkSurfaceCounterFlagsEXT supportedSurfaceCounters;
|
||||
} VkSurfaceCapabilities2EXT;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2EXT(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
VkSurfaceKHR surface,
|
||||
VkSurfaceCapabilities2EXT* pSurfaceCapabilities);
|
||||
#endif
|
||||
|
||||
#define VK_EXT_display_control 1
|
||||
#define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1
|
||||
#define VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME "VK_EXT_display_control"
|
||||
|
||||
|
||||
typedef enum VkDisplayPowerStateEXT {
|
||||
VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
|
||||
VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
|
||||
VK_DISPLAY_POWER_STATE_ON_EXT = 2,
|
||||
VK_DISPLAY_POWER_STATE_BEGIN_RANGE_EXT = VK_DISPLAY_POWER_STATE_OFF_EXT,
|
||||
VK_DISPLAY_POWER_STATE_END_RANGE_EXT = VK_DISPLAY_POWER_STATE_ON_EXT,
|
||||
VK_DISPLAY_POWER_STATE_RANGE_SIZE_EXT = (VK_DISPLAY_POWER_STATE_ON_EXT - VK_DISPLAY_POWER_STATE_OFF_EXT + 1),
|
||||
VK_DISPLAY_POWER_STATE_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkDisplayPowerStateEXT;
|
||||
|
||||
typedef enum VkDeviceEventTypeEXT {
|
||||
VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
|
||||
VK_DEVICE_EVENT_TYPE_BEGIN_RANGE_EXT = VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT,
|
||||
VK_DEVICE_EVENT_TYPE_END_RANGE_EXT = VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT,
|
||||
VK_DEVICE_EVENT_TYPE_RANGE_SIZE_EXT = (VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT - VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT + 1),
|
||||
VK_DEVICE_EVENT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkDeviceEventTypeEXT;
|
||||
|
||||
typedef enum VkDisplayEventTypeEXT {
|
||||
VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
|
||||
VK_DISPLAY_EVENT_TYPE_BEGIN_RANGE_EXT = VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT,
|
||||
VK_DISPLAY_EVENT_TYPE_END_RANGE_EXT = VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT,
|
||||
VK_DISPLAY_EVENT_TYPE_RANGE_SIZE_EXT = (VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT - VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT + 1),
|
||||
VK_DISPLAY_EVENT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkDisplayEventTypeEXT;
|
||||
|
||||
typedef struct VkDisplayPowerInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDisplayPowerStateEXT powerState;
|
||||
} VkDisplayPowerInfoEXT;
|
||||
|
||||
typedef struct VkDeviceEventInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceEventTypeEXT deviceEvent;
|
||||
} VkDeviceEventInfoEXT;
|
||||
|
||||
typedef struct VkDisplayEventInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDisplayEventTypeEXT displayEvent;
|
||||
} VkDisplayEventInfoEXT;
|
||||
|
||||
typedef struct VkSwapchainCounterCreateInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkSurfaceCounterFlagsEXT surfaceCounters;
|
||||
} VkSwapchainCounterCreateInfoEXT;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkDisplayPowerControlEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkRegisterDeviceEventEXT)(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkRegisterDisplayEventEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainCounterEXT)(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkDisplayPowerControlEXT(
|
||||
VkDevice device,
|
||||
VkDisplayKHR display,
|
||||
const VkDisplayPowerInfoEXT* pDisplayPowerInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkRegisterDeviceEventEXT(
|
||||
VkDevice device,
|
||||
const VkDeviceEventInfoEXT* pDeviceEventInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkFence* pFence);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkRegisterDisplayEventEXT(
|
||||
VkDevice device,
|
||||
VkDisplayKHR display,
|
||||
const VkDisplayEventInfoEXT* pDisplayEventInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkFence* pFence);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainCounterEXT(
|
||||
VkDevice device,
|
||||
VkSwapchainKHR swapchain,
|
||||
VkSurfaceCounterFlagBitsEXT counter,
|
||||
uint64_t* pCounterValue);
|
||||
#endif
|
||||
|
||||
#define VK_EXT_swapchain_colorspace 1
|
||||
#define VK_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 1
|
||||
#define VK_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -264,7 +264,7 @@ static LLVMValueRef get_shared_memory_ptr(struct nir_to_llvm_context *ctx,
|
||||
LLVMValueRef ptr;
|
||||
int addr_space;
|
||||
|
||||
offset = LLVMConstInt(ctx->i32, idx, false);
|
||||
offset = LLVMConstInt(ctx->i32, idx * 16, false);
|
||||
|
||||
ptr = ctx->shared_memory;
|
||||
ptr = LLVMBuildGEP(ctx->builder, ptr, &offset, 1, "");
|
||||
@@ -1267,6 +1267,9 @@ static void visit_alu(struct nir_to_llvm_context *ctx, nir_alu_instr *instr)
|
||||
src[1] = to_float(ctx, src[1]);
|
||||
result = LLVMBuildFRem(ctx->builder, src[0], src[1], "");
|
||||
break;
|
||||
case nir_op_irem:
|
||||
result = LLVMBuildSRem(ctx->builder, src[0], src[1], "");
|
||||
break;
|
||||
case nir_op_idiv:
|
||||
result = LLVMBuildSDiv(ctx->builder, src[0], src[1], "");
|
||||
break;
|
||||
@@ -1718,15 +1721,17 @@ static LLVMValueRef visit_vulkan_resource_index(struct nir_to_llvm_context *ctx,
|
||||
unsigned desc_set = nir_intrinsic_desc_set(instr);
|
||||
unsigned binding = nir_intrinsic_binding(instr);
|
||||
LLVMValueRef desc_ptr = ctx->descriptor_sets[desc_set];
|
||||
struct radv_descriptor_set_layout *layout = ctx->options->layout->set[desc_set].layout;
|
||||
struct radv_pipeline_layout *pipeline_layout = ctx->options->layout;
|
||||
struct radv_descriptor_set_layout *layout = pipeline_layout->set[desc_set].layout;
|
||||
unsigned base_offset = layout->binding[binding].offset;
|
||||
LLVMValueRef offset, stride;
|
||||
|
||||
if (layout->binding[binding].type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC ||
|
||||
layout->binding[binding].type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC) {
|
||||
unsigned idx = pipeline_layout->set[desc_set].dynamic_offset_start +
|
||||
layout->binding[binding].dynamic_offset_offset;
|
||||
desc_ptr = ctx->push_constants;
|
||||
base_offset = ctx->options->layout->push_constant_size;
|
||||
base_offset += 16 * layout->binding[binding].dynamic_offset_offset;
|
||||
base_offset = pipeline_layout->push_constant_size + 16 * idx;
|
||||
stride = LLVMConstInt(ctx->i32, 16, false);
|
||||
} else
|
||||
stride = LLVMConstInt(ctx->i32, layout->binding[binding].size, false);
|
||||
@@ -1745,9 +1750,12 @@ static LLVMValueRef visit_vulkan_resource_index(struct nir_to_llvm_context *ctx,
|
||||
static LLVMValueRef visit_load_push_constant(struct nir_to_llvm_context *ctx,
|
||||
nir_intrinsic_instr *instr)
|
||||
{
|
||||
LLVMValueRef ptr;
|
||||
LLVMValueRef ptr, addr;
|
||||
|
||||
ptr = build_gep0(ctx, ctx->push_constants, get_src(ctx, instr->src[0]));
|
||||
addr = LLVMConstInt(ctx->i32, nir_intrinsic_base(instr), 0);
|
||||
addr = LLVMBuildAdd(ctx->builder, addr, get_src(ctx, instr->src[0]), "");
|
||||
|
||||
ptr = build_gep0(ctx, ctx->push_constants, addr);
|
||||
ptr = cast_ptr(ctx, ptr, get_def_type(ctx, &instr->dest.ssa));
|
||||
|
||||
return LLVMBuildLoad(ctx->builder, ptr, "");
|
||||
@@ -2080,6 +2088,9 @@ static LLVMValueRef visit_load_var(struct nir_to_llvm_context *ctx,
|
||||
LLVMValueRef ptr = get_shared_memory_ptr(ctx, idx, ctx->i32);
|
||||
LLVMValueRef derived_ptr;
|
||||
|
||||
if (indir_index)
|
||||
indir_index = LLVMBuildMul(ctx->builder, indir_index, LLVMConstInt(ctx->i32, 4, false), "");
|
||||
|
||||
for (unsigned chan = 0; chan < ve; chan++) {
|
||||
LLVMValueRef index = LLVMConstInt(ctx->i32, chan, false);
|
||||
if (indir_index)
|
||||
@@ -2184,6 +2195,9 @@ visit_store_var(struct nir_to_llvm_context *ctx,
|
||||
ptr = get_shared_memory_ptr(ctx, idx, ctx->i32);
|
||||
LLVMValueRef derived_ptr;
|
||||
|
||||
if (indir_index)
|
||||
indir_index = LLVMBuildMul(ctx->builder, indir_index, LLVMConstInt(ctx->i32, 4, false), "");
|
||||
|
||||
for (unsigned chan = 0; chan < 4; chan++) {
|
||||
if (!(writemask & (1 << chan)))
|
||||
continue;
|
||||
@@ -2238,7 +2252,7 @@ static int image_type_to_components_count(enum glsl_sampler_dim dim, bool array)
|
||||
}
|
||||
|
||||
static LLVMValueRef get_image_coords(struct nir_to_llvm_context *ctx,
|
||||
nir_intrinsic_instr *instr, bool add_frag_pos)
|
||||
nir_intrinsic_instr *instr)
|
||||
{
|
||||
const struct glsl_type *type = instr->variables[0]->var->type;
|
||||
if(instr->variables[0]->deref.child)
|
||||
@@ -2253,6 +2267,8 @@ static LLVMValueRef get_image_coords(struct nir_to_llvm_context *ctx,
|
||||
LLVMValueRef res;
|
||||
int count;
|
||||
enum glsl_sampler_dim dim = glsl_get_sampler_dim(type);
|
||||
bool add_frag_pos = (dim == GLSL_SAMPLER_DIM_SUBPASS ||
|
||||
dim == GLSL_SAMPLER_DIM_SUBPASS_MS);
|
||||
bool is_ms = (dim == GLSL_SAMPLER_DIM_MS ||
|
||||
dim == GLSL_SAMPLER_DIM_SUBPASS_MS);
|
||||
|
||||
@@ -2378,12 +2394,11 @@ static LLVMValueRef visit_image_load(struct nir_to_llvm_context *ctx,
|
||||
} else {
|
||||
bool is_da = glsl_sampler_type_is_array(type) ||
|
||||
glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_CUBE;
|
||||
bool add_frag_pos = glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_SUBPASS;
|
||||
LLVMValueRef da = is_da ? ctx->i32one : ctx->i32zero;
|
||||
LLVMValueRef glc = LLVMConstInt(ctx->i1, 0, false);
|
||||
LLVMValueRef slc = LLVMConstInt(ctx->i1, 0, false);
|
||||
|
||||
params[0] = get_image_coords(ctx, instr, add_frag_pos);
|
||||
params[0] = get_image_coords(ctx, instr);
|
||||
params[1] = get_sampler_desc(ctx, instr->variables[0], DESC_IMAGE);
|
||||
params[2] = LLVMConstInt(ctx->i32, 15, false); /* dmask */
|
||||
if (HAVE_LLVM <= 0x0309) {
|
||||
@@ -2442,7 +2457,7 @@ static void visit_image_store(struct nir_to_llvm_context *ctx,
|
||||
LLVMValueRef slc = i1false;
|
||||
|
||||
params[0] = to_float(ctx, get_src(ctx, instr->src[2]));
|
||||
params[1] = get_image_coords(ctx, instr, false); /* coords */
|
||||
params[1] = get_image_coords(ctx, instr); /* coords */
|
||||
params[2] = get_sampler_desc(ctx, instr->variables[0], DESC_IMAGE);
|
||||
params[3] = LLVMConstInt(ctx->i32, 15, false); /* dmask */
|
||||
if (HAVE_LLVM <= 0x0309) {
|
||||
@@ -2502,7 +2517,7 @@ static LLVMValueRef visit_image_atomic(struct nir_to_llvm_context *ctx,
|
||||
bool da = glsl_sampler_type_is_array(type) ||
|
||||
glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_CUBE;
|
||||
|
||||
coords = params[param_count++] = get_image_coords(ctx, instr, false);
|
||||
coords = params[param_count++] = get_image_coords(ctx, instr);
|
||||
params[param_count++] = get_sampler_desc(ctx, instr->variables[0], DESC_IMAGE);
|
||||
params[param_count++] = i1false; /* r128 */
|
||||
params[param_count++] = da ? i1true : i1false; /* da */
|
||||
@@ -3154,6 +3169,15 @@ static void tex_fetch_ptrs(struct nir_to_llvm_context *ctx,
|
||||
*fmask_ptr = get_sampler_desc(ctx, instr->texture, DESC_FMASK);
|
||||
}
|
||||
|
||||
static LLVMValueRef apply_round_slice(struct nir_to_llvm_context *ctx,
|
||||
LLVMValueRef coord)
|
||||
{
|
||||
coord = to_float(ctx, coord);
|
||||
coord = ac_emit_llvm_intrinsic(&ctx->ac, "llvm.rint.f32", ctx->f32, &coord, 1, 0);
|
||||
coord = to_integer(ctx, coord);
|
||||
return coord;
|
||||
}
|
||||
|
||||
static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr)
|
||||
{
|
||||
LLVMValueRef result = NULL;
|
||||
@@ -3211,6 +3235,11 @@ static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr)
|
||||
}
|
||||
}
|
||||
|
||||
if (instr->op == nir_texop_txs && instr->sampler_dim == GLSL_SAMPLER_DIM_BUF) {
|
||||
result = get_buffer_size(ctx, res_ptr, true);
|
||||
goto write_result;
|
||||
}
|
||||
|
||||
if (instr->op == nir_texop_texture_samples) {
|
||||
LLVMValueRef res, samples, is_msaa;
|
||||
res = LLVMBuildBitCast(ctx->builder, res_ptr, ctx->v8i32, "");
|
||||
@@ -3310,15 +3339,16 @@ static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr)
|
||||
/* Pack texture coordinates */
|
||||
if (coord) {
|
||||
address[count++] = coords[0];
|
||||
if (instr->coord_components > 1)
|
||||
if (instr->coord_components > 1) {
|
||||
if (instr->sampler_dim == GLSL_SAMPLER_DIM_1D && instr->is_array && instr->op != nir_texop_txf) {
|
||||
coords[1] = apply_round_slice(ctx, coords[1]);
|
||||
}
|
||||
address[count++] = coords[1];
|
||||
}
|
||||
if (instr->coord_components > 2) {
|
||||
/* This seems like a bit of a hack - but it passes Vulkan CTS with it */
|
||||
if (instr->sampler_dim != GLSL_SAMPLER_DIM_3D && instr->op != nir_texop_txf) {
|
||||
coords[2] = to_float(ctx, coords[2]);
|
||||
coords[2] = ac_emit_llvm_intrinsic(&ctx->ac, "llvm.rint.f32", ctx->f32, &coords[2],
|
||||
1, 0);
|
||||
coords[2] = to_integer(ctx, coords[2]);
|
||||
coords[2] = apply_round_slice(ctx, coords[2]);
|
||||
}
|
||||
address[count++] = coords[2];
|
||||
}
|
||||
@@ -3377,7 +3407,8 @@ static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr)
|
||||
* The sample index should be adjusted as follows:
|
||||
* sample_index = (fmask >> (sample_index * 4)) & 0xF;
|
||||
*/
|
||||
if (instr->sampler_dim == GLSL_SAMPLER_DIM_MS) {
|
||||
if (instr->sampler_dim == GLSL_SAMPLER_DIM_MS &&
|
||||
instr->op != nir_texop_txs) {
|
||||
LLVMValueRef txf_address[4];
|
||||
struct ac_tex_info txf_info = { 0 };
|
||||
unsigned txf_count = count;
|
||||
@@ -4430,6 +4461,13 @@ LLVMModuleRef ac_translate_nir_to_llvm(LLVMTargetMachineRef tm,
|
||||
memset(shader_info, 0, sizeof(*shader_info));
|
||||
|
||||
LLVMSetTarget(ctx.module, "amdgcn--");
|
||||
|
||||
LLVMTargetDataRef data_layout = LLVMCreateTargetDataLayout(tm);
|
||||
char *data_layout_str = LLVMCopyStringRepOfTargetData(data_layout);
|
||||
LLVMSetDataLayout(ctx.module, data_layout_str);
|
||||
LLVMDisposeTargetData(data_layout);
|
||||
LLVMDisposeMessage(data_layout_str);
|
||||
|
||||
setup_types(&ctx);
|
||||
|
||||
ctx.builder = LLVMCreateBuilderInContext(ctx.context);
|
||||
@@ -4457,7 +4495,7 @@ LLVMModuleRef ac_translate_nir_to_llvm(LLVMTargetMachineRef tm,
|
||||
idx++;
|
||||
}
|
||||
|
||||
shared_size *= 4;
|
||||
shared_size *= 16;
|
||||
var = LLVMAddGlobalInAddressSpace(ctx.module,
|
||||
LLVMArrayType(ctx.i8, shared_size),
|
||||
"compute_lds",
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include "llvm-c/Core.h"
|
||||
#include "llvm-c/TargetMachine.h"
|
||||
#include "amd_family.h"
|
||||
#include "../vulkan/radv_descriptor_set.h"
|
||||
|
||||
struct ac_shader_binary;
|
||||
struct ac_shader_config;
|
||||
@@ -76,7 +77,8 @@ enum ac_ud_index {
|
||||
AC_UD_MAX_UD = AC_UD_VS_MAX_UD,
|
||||
};
|
||||
|
||||
#define AC_UD_MAX_SETS 4
|
||||
// Match MAX_SETS from radv_descriptor_set.h
|
||||
#define AC_UD_MAX_SETS MAX_SETS
|
||||
|
||||
struct ac_userdata_locations {
|
||||
struct ac_userdata_info descriptor_sets[AC_UD_MAX_SETS];
|
||||
|
@@ -157,7 +157,7 @@ enum {
|
||||
#define ASICREV_IS_POLARIS10_P(eChipRev)\
|
||||
((eChipRev >= VI_POLARIS10_P_A0) && (eChipRev < VI_POLARIS11_M_A0))
|
||||
#define ASICREV_IS_POLARIS11_M(eChipRev) \
|
||||
(eChipRev >= VI_POLARIS11_M_A0)
|
||||
(eChipRev >= VI_POLARIS11_M_A0 && eChipRev < VI_POLARIS12_V_A0)
|
||||
#define ASICREV_IS_POLARIS12_V(eChipRev)\
|
||||
(eChipRev >= VI_POLARIS12_V_A0)
|
||||
|
||||
|
@@ -21,9 +21,7 @@
|
||||
|
||||
include Makefile.sources
|
||||
|
||||
vulkan_includedir = $(includedir)/vulkan
|
||||
|
||||
vulkan_include_HEADERS = \
|
||||
noinst_HEADERS = \
|
||||
$(top_srcdir)/include/vulkan/vk_platform.h \
|
||||
$(top_srcdir)/include/vulkan/vulkan.h
|
||||
|
||||
|
@@ -1552,7 +1552,7 @@ void radv_CmdBindDescriptorSets(
|
||||
radv_bind_descriptor_set(cmd_buffer, set, idx);
|
||||
|
||||
for(unsigned j = 0; j < set->layout->dynamic_offset_count; ++j, ++dyn_idx) {
|
||||
unsigned idx = j + layout->set[i].dynamic_offset_start;
|
||||
unsigned idx = j + layout->set[i + firstSet].dynamic_offset_start;
|
||||
uint32_t *dst = cmd_buffer->dynamic_buffers + idx * 4;
|
||||
assert(dyn_idx < dynamicOffsetCount);
|
||||
|
||||
@@ -1818,6 +1818,9 @@ void radv_CmdExecuteCommands(
|
||||
{
|
||||
RADV_FROM_HANDLE(radv_cmd_buffer, primary, commandBuffer);
|
||||
|
||||
/* Emit pending flushes on primary prior to executing secondary */
|
||||
si_emit_cache_flush(primary);
|
||||
|
||||
for (uint32_t i = 0; i < commandBufferCount; i++) {
|
||||
RADV_FROM_HANDLE(radv_cmd_buffer, secondary, pCmdBuffers[i]);
|
||||
|
||||
@@ -1827,6 +1830,7 @@ void radv_CmdExecuteCommands(
|
||||
/* if we execute secondary we need to re-emit out pipelines */
|
||||
if (commandBufferCount) {
|
||||
primary->state.emitted_pipeline = NULL;
|
||||
primary->state.emitted_compute_pipeline = NULL;
|
||||
primary->state.dirty |= RADV_CMD_DIRTY_PIPELINE;
|
||||
primary->state.dirty |= RADV_CMD_DIRTY_DYNAMIC_ALL;
|
||||
}
|
||||
@@ -1970,7 +1974,7 @@ void radv_CmdDraw(
|
||||
|
||||
static void radv_emit_primitive_reset_index(struct radv_cmd_buffer *cmd_buffer)
|
||||
{
|
||||
uint32_t primitive_reset_index = cmd_buffer->state.last_primitive_reset_index ? 0xffffffffu : 0xffffu;
|
||||
uint32_t primitive_reset_index = cmd_buffer->state.index_type ? 0xffffffffu : 0xffffu;
|
||||
|
||||
if (cmd_buffer->state.pipeline->graphics.prim_restart_enable &&
|
||||
primitive_reset_index != cmd_buffer->state.last_primitive_reset_index) {
|
||||
@@ -2407,7 +2411,13 @@ static void radv_handle_depth_image_transition(struct radv_cmd_buffer *cmd_buffe
|
||||
range.baseMipLevel = 0;
|
||||
range.levelCount = 1;
|
||||
|
||||
cmd_buffer->state.flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_DB |
|
||||
RADV_CMD_FLAG_FLUSH_AND_INV_DB_META;
|
||||
|
||||
radv_decompress_depth_image_inplace(cmd_buffer, image, &range);
|
||||
|
||||
cmd_buffer->state.flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_DB |
|
||||
RADV_CMD_FLAG_FLUSH_AND_INV_DB_META;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2570,7 +2580,8 @@ void radv_CmdPipelineBarrier(
|
||||
flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_DB;
|
||||
break;
|
||||
case VK_ACCESS_TRANSFER_WRITE_BIT:
|
||||
flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_CB;
|
||||
flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_CB |
|
||||
RADV_CMD_FLAG_INV_GLOBAL_L2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -2606,6 +2617,7 @@ void radv_CmdPipelineBarrier(
|
||||
break;
|
||||
case VK_ACCESS_COLOR_ATTACHMENT_READ_BIT:
|
||||
case VK_ACCESS_TRANSFER_READ_BIT:
|
||||
case VK_ACCESS_TRANSFER_WRITE_BIT:
|
||||
case VK_ACCESS_INPUT_ATTACHMENT_READ_BIT:
|
||||
flush_bits |= RADV_CMD_FLUSH_AND_INV_FRAMEBUFFER | RADV_CMD_FLAG_INV_GLOBAL_L2;
|
||||
default:
|
||||
|
@@ -275,12 +275,13 @@ radv_descriptor_set_create(struct radv_device *device,
|
||||
uint32_t layout_size = align_u32(layout->size, 32);
|
||||
set->size = layout->size;
|
||||
if (!cmd_buffer) {
|
||||
if (pool->current_offset + layout_size <= pool->size) {
|
||||
if (pool->current_offset + layout_size <= pool->size &&
|
||||
pool->allocated_sets < pool->max_sets) {
|
||||
set->bo = pool->bo;
|
||||
set->mapped_ptr = (uint32_t*)(pool->mapped_ptr + pool->current_offset);
|
||||
set->va = device->ws->buffer_get_va(set->bo) + pool->current_offset;
|
||||
pool->current_offset += layout_size;
|
||||
|
||||
++pool->allocated_sets;
|
||||
} else {
|
||||
int entry = pool->free_list, prev_entry = -1;
|
||||
uint32_t offset;
|
||||
@@ -417,6 +418,7 @@ VkResult radv_CreateDescriptorPool(
|
||||
pool->full_list = 0;
|
||||
pool->free_nodes[max_sets - 1].next = -1;
|
||||
pool->max_sets = max_sets;
|
||||
pool->allocated_sets = 0;
|
||||
|
||||
for (int i = 0; i + 1 < max_sets; ++i)
|
||||
pool->free_nodes[i].next = i + 1;
|
||||
@@ -494,6 +496,7 @@ VkResult radv_ResetDescriptorPool(
|
||||
radv_descriptor_set_destroy(device, pool, set, false);
|
||||
}
|
||||
|
||||
pool->allocated_sets = 0;
|
||||
pool->current_offset = 0;
|
||||
pool->free_list = -1;
|
||||
pool->full_list = 0;
|
||||
|
@@ -1121,7 +1121,7 @@ VkResult radv_AllocateMemory(
|
||||
if (pAllocateInfo->memoryTypeIndex == RADV_MEM_TYPE_GTT_WRITE_COMBINE)
|
||||
flags |= RADEON_FLAG_GTT_WC;
|
||||
|
||||
mem->bo = device->ws->buffer_create(device->ws, alloc_size, 32768,
|
||||
mem->bo = device->ws->buffer_create(device->ws, alloc_size, 65536,
|
||||
domain, flags);
|
||||
|
||||
if (!mem->bo) {
|
||||
@@ -2024,7 +2024,7 @@ radv_init_sampler(struct radv_device *device,
|
||||
S_008F38_XY_MAG_FILTER(radv_tex_filter(pCreateInfo->magFilter, max_aniso)) |
|
||||
S_008F38_XY_MIN_FILTER(radv_tex_filter(pCreateInfo->minFilter, max_aniso)) |
|
||||
S_008F38_MIP_FILTER(radv_tex_mipfilter(pCreateInfo->mipmapMode)) |
|
||||
S_008F38_MIP_POINT_PRECLAMP(1) |
|
||||
S_008F38_MIP_POINT_PRECLAMP(0) |
|
||||
S_008F38_DISABLE_LSB_CEIL(1) |
|
||||
S_008F38_FILTER_PREC_FIX(1) |
|
||||
S_008F38_ANISO_OVERRIDE(is_vi));
|
||||
|
@@ -730,9 +730,6 @@ uint32_t radv_translate_dbformat(VkFormat format)
|
||||
case VK_FORMAT_D16_UNORM:
|
||||
case VK_FORMAT_D16_UNORM_S8_UINT:
|
||||
return V_028040_Z_16;
|
||||
case VK_FORMAT_X8_D24_UNORM_PACK32:
|
||||
case VK_FORMAT_D24_UNORM_S8_UINT:
|
||||
return V_028040_Z_24; /* deprecated on SI */
|
||||
case VK_FORMAT_D32_SFLOAT:
|
||||
case VK_FORMAT_D32_SFLOAT_S8_UINT:
|
||||
return V_028040_Z_32_FLOAT;
|
||||
|
@@ -510,6 +510,7 @@ radv_image_alloc_fmask(struct radv_device *device,
|
||||
|
||||
image->fmask.offset = align64(image->size, image->fmask.alignment);
|
||||
image->size = image->fmask.offset + image->fmask.size;
|
||||
image->alignment = MAX2(image->alignment, image->fmask.alignment);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -571,6 +572,7 @@ radv_image_alloc_cmask(struct radv_device *device,
|
||||
/* + 8 for storing the clear values */
|
||||
image->clear_value_offset = image->cmask.offset + image->cmask.size;
|
||||
image->size = image->cmask.offset + image->cmask.size + 8;
|
||||
image->alignment = MAX2(image->alignment, image->cmask.alignment);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -581,6 +583,7 @@ radv_image_alloc_dcc(struct radv_device *device,
|
||||
/* + 8 for storing the clear values */
|
||||
image->clear_value_offset = image->dcc_offset + image->surface.dcc_size;
|
||||
image->size = image->dcc_offset + image->surface.dcc_size + 8;
|
||||
image->alignment = MAX2(image->alignment, image->surface.dcc_alignment);
|
||||
}
|
||||
|
||||
static unsigned
|
||||
@@ -652,6 +655,9 @@ radv_image_alloc_htile(struct radv_device *device,
|
||||
if (device->debug_flags & RADV_DEBUG_NO_HIZ)
|
||||
return;
|
||||
|
||||
if (image->array_size > 1 || image->levels > 1)
|
||||
return;
|
||||
|
||||
image->htile.size = radv_image_get_htile_size(device, image);
|
||||
|
||||
if (!image->htile.size)
|
||||
|
@@ -26,6 +26,7 @@
|
||||
|
||||
#include "radv_meta.h"
|
||||
#include "nir/nir_builder.h"
|
||||
#include "vk_format.h"
|
||||
|
||||
enum blit2d_dst_type {
|
||||
/* We can bind this destination as a "normal" render target and render
|
||||
@@ -283,8 +284,10 @@ radv_meta_blit2d_normal_dst(struct radv_cmd_buffer *cmd_buffer,
|
||||
|
||||
for (unsigned r = 0; r < num_rects; ++r) {
|
||||
VkFormat depth_format = 0;
|
||||
if (dst->aspect_mask != VK_IMAGE_ASPECT_COLOR_BIT)
|
||||
depth_format = dst->image->vk_format;
|
||||
if (dst->aspect_mask == VK_IMAGE_ASPECT_STENCIL_BIT)
|
||||
depth_format = vk_format_stencil_only(dst->image->vk_format);
|
||||
else if (dst->aspect_mask == VK_IMAGE_ASPECT_DEPTH_BIT)
|
||||
depth_format = vk_format_depth_only(dst->image->vk_format);
|
||||
struct blit2d_src_temps src_temps;
|
||||
blit2d_bind_src(cmd_buffer, src_img, src_buf, &src_temps, src_type, depth_format);
|
||||
|
||||
|
@@ -524,6 +524,8 @@ void radv_CmdUpdateBuffer(
|
||||
assert(!(va & 3));
|
||||
|
||||
if (dataSize < 4096) {
|
||||
si_emit_cache_flush(cmd_buffer);
|
||||
|
||||
cmd_buffer->device->ws->cs_add_buffer(cmd_buffer->cs, dst_buffer->bo, 8);
|
||||
|
||||
radeon_check_space(cmd_buffer->device->ws, cmd_buffer->cs, words + 4);
|
||||
|
@@ -543,6 +543,7 @@ struct radv_descriptor_pool {
|
||||
int free_list;
|
||||
int full_list;
|
||||
uint32_t max_sets;
|
||||
uint32_t allocated_sets;
|
||||
struct radv_descriptor_pool_free_node free_nodes[];
|
||||
};
|
||||
|
||||
|
@@ -131,6 +131,7 @@ VkResult radv_GetQueryPoolResults(
|
||||
VkDeviceSize stride,
|
||||
VkQueryResultFlags flags)
|
||||
{
|
||||
RADV_FROM_HANDLE(radv_device, device, _device);
|
||||
RADV_FROM_HANDLE(radv_query_pool, pool, queryPool);
|
||||
char *data = pData;
|
||||
VkResult result = VK_SUCCESS;
|
||||
@@ -141,23 +142,20 @@ VkResult radv_GetQueryPoolResults(
|
||||
char *src = pool->ptr + query * pool->stride;
|
||||
uint32_t available;
|
||||
|
||||
if (flags & VK_QUERY_RESULT_WAIT_BIT) {
|
||||
while(!*(volatile uint32_t*)(pool->ptr + pool->availability_offset + 4 * query))
|
||||
;
|
||||
}
|
||||
|
||||
if (!*(uint32_t*)(pool->ptr + pool->availability_offset + 4 * query) &&
|
||||
!(flags & VK_QUERY_RESULT_PARTIAL_BIT)) {
|
||||
if (flags & VK_QUERY_RESULT_WITH_AVAILABILITY_BIT)
|
||||
*(uint32_t*)dest = 0;
|
||||
result = VK_NOT_READY;
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
available = *(uint32_t*)(pool->ptr + pool->availability_offset + 4 * query);
|
||||
switch (pool->type) {
|
||||
case VK_QUERY_TYPE_TIMESTAMP:
|
||||
case VK_QUERY_TYPE_TIMESTAMP: {
|
||||
if (flags & VK_QUERY_RESULT_WAIT_BIT) {
|
||||
while(!*(volatile uint32_t*)(pool->ptr + pool->availability_offset + 4 * query))
|
||||
;
|
||||
}
|
||||
|
||||
available = *(uint32_t*)(pool->ptr + pool->availability_offset + 4 * query);
|
||||
if (!available && !(flags & VK_QUERY_RESULT_PARTIAL_BIT)) {
|
||||
result = VK_NOT_READY;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (flags & VK_QUERY_RESULT_64_BIT) {
|
||||
*(uint64_t*)dest = *(uint64_t*)src;
|
||||
dest += 8;
|
||||
@@ -166,8 +164,32 @@ VkResult radv_GetQueryPoolResults(
|
||||
dest += 4;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VK_QUERY_TYPE_OCCLUSION: {
|
||||
uint64_t result = *(uint64_t*)(src + pool->stride - 16);
|
||||
volatile uint64_t const *src64 = (volatile uint64_t const *)src;
|
||||
uint64_t result = 0;
|
||||
int db_count = get_max_db(device);
|
||||
available = 1;
|
||||
|
||||
for (int i = 0; i < db_count; ++i) {
|
||||
uint64_t start, end;
|
||||
do {
|
||||
start = src64[2 * i];
|
||||
end = src64[2 * i + 1];
|
||||
} while ((!(start & (1ull << 63)) || !(end & (1ull << 63))) && (flags & VK_QUERY_RESULT_WAIT_BIT));
|
||||
|
||||
if (!(start & (1ull << 63)) || !(end & (1ull << 63)))
|
||||
available = 0;
|
||||
else {
|
||||
result += end - start;
|
||||
}
|
||||
}
|
||||
|
||||
if (!available && !(flags & VK_QUERY_RESULT_PARTIAL_BIT)) {
|
||||
result = VK_NOT_READY;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (flags & VK_QUERY_RESULT_64_BIT) {
|
||||
*(uint64_t*)dest = result;
|
||||
@@ -183,8 +205,11 @@ VkResult radv_GetQueryPoolResults(
|
||||
}
|
||||
|
||||
if (flags & VK_QUERY_RESULT_WITH_AVAILABILITY_BIT) {
|
||||
*(uint32_t*)dest = available;
|
||||
dest += 4;
|
||||
if (flags & VK_QUERY_RESULT_64_BIT) {
|
||||
*(uint64_t*)dest = available;
|
||||
} else {
|
||||
*(uint32_t*)dest = available;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,11 +382,14 @@ void radv_CmdEndQuery(
|
||||
radeon_emit(cs, va + 8);
|
||||
radeon_emit(cs, (va + 8) >> 32);
|
||||
|
||||
radeon_emit(cs, PKT3(PKT3_OCCLUSION_QUERY, 3, 0));
|
||||
radeon_emit(cs, va);
|
||||
radeon_emit(cs, va >> 32);
|
||||
radeon_emit(cs, va + pool->stride - 16);
|
||||
radeon_emit(cs, (va + pool->stride - 16) >> 32);
|
||||
/* hangs for VK_COMMAND_BUFFER_LEVEL_SECONDARY. */
|
||||
if (cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY) {
|
||||
radeon_emit(cs, PKT3(PKT3_OCCLUSION_QUERY, 3, 0));
|
||||
radeon_emit(cs, va);
|
||||
radeon_emit(cs, va >> 32);
|
||||
radeon_emit(cs, va + pool->stride - 16);
|
||||
radeon_emit(cs, (va + pool->stride - 16) >> 32);
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
|
@@ -372,6 +372,15 @@ void si_init_config(struct radv_physical_device *physical_device,
|
||||
radeon_set_context_reg(cs, R_028408_VGT_INDX_OFFSET, 0);
|
||||
|
||||
if (physical_device->rad_info.chip_class >= CIK) {
|
||||
/* If this is 0, Bonaire can hang even if GS isn't being used.
|
||||
* Other chips are unaffected. These are suboptimal values,
|
||||
* but we don't use on-chip GS.
|
||||
*/
|
||||
radeon_set_context_reg(cs, R_028A44_VGT_GS_ONCHIP_CNTL,
|
||||
S_028A44_ES_VERTS_PER_SUBGRP(64) |
|
||||
S_028A44_GS_PRIMS_PER_SUBGRP(4));
|
||||
|
||||
radeon_set_sh_reg(cs, R_00B51C_SPI_SHADER_PGM_RSRC3_LS, S_00B51C_CU_EN(0xffff));
|
||||
radeon_set_sh_reg(cs, R_00B41C_SPI_SHADER_PGM_RSRC3_HS, 0);
|
||||
radeon_set_sh_reg(cs, R_00B31C_SPI_SHADER_PGM_RSRC3_ES, S_00B31C_CU_EN(0xffff));
|
||||
radeon_set_sh_reg(cs, R_00B21C_SPI_SHADER_PGM_RSRC3_GS, S_00B21C_CU_EN(0xffff));
|
||||
@@ -384,7 +393,6 @@ void si_init_config(struct radv_physical_device *physical_device,
|
||||
*
|
||||
* LATE_ALLOC_VS = 2 is the highest safe number.
|
||||
*/
|
||||
radeon_set_sh_reg(cs, R_00B51C_SPI_SHADER_PGM_RSRC3_LS, S_00B51C_CU_EN(0xffff));
|
||||
radeon_set_sh_reg(cs, R_00B118_SPI_SHADER_PGM_RSRC3_VS, S_00B118_CU_EN(0xffff));
|
||||
radeon_set_sh_reg(cs, R_00B11C_SPI_SHADER_LATE_ALLOC_VS, S_00B11C_LIMIT(2));
|
||||
} else {
|
||||
@@ -393,7 +401,6 @@ void si_init_config(struct radv_physical_device *physical_device,
|
||||
* - VS can't execute on CU0.
|
||||
* - If HS writes outputs to LDS, LS can't execute on CU0.
|
||||
*/
|
||||
radeon_set_sh_reg(cs, R_00B51C_SPI_SHADER_PGM_RSRC3_LS, S_00B51C_CU_EN(0xfffe));
|
||||
radeon_set_sh_reg(cs, R_00B118_SPI_SHADER_PGM_RSRC3_VS, S_00B118_CU_EN(0xfffe));
|
||||
radeon_set_sh_reg(cs, R_00B11C_SPI_SHADER_LATE_ALLOC_VS, S_00B11C_LIMIT(31));
|
||||
}
|
||||
|
@@ -274,6 +274,19 @@ static void radv_set_micro_tile_mode(struct radeon_surf *surf,
|
||||
surf->micro_tile_mode = G_009910_MICRO_TILE_MODE(tile_mode);
|
||||
}
|
||||
|
||||
static unsigned cik_get_macro_tile_index(struct radeon_surf *surf)
|
||||
{
|
||||
unsigned index, tileb;
|
||||
|
||||
tileb = 8 * 8 * surf->bpe;
|
||||
tileb = MIN2(surf->tile_split, tileb);
|
||||
|
||||
for (index = 0; tileb > 64; index++)
|
||||
tileb >>= 1;
|
||||
|
||||
assert(index < 16);
|
||||
return index;
|
||||
}
|
||||
|
||||
static int radv_amdgpu_winsys_surface_init(struct radeon_winsys *_ws,
|
||||
struct radeon_surf *surf)
|
||||
@@ -435,6 +448,7 @@ static int radv_amdgpu_winsys_surface_init(struct radeon_winsys *_ws,
|
||||
AddrSurfInfoIn.tileIndex = 10; /* 2D displayable */
|
||||
else
|
||||
AddrSurfInfoIn.tileIndex = 14; /* 2D non-displayable */
|
||||
AddrSurfInfoOut.macroModeIndex = cik_get_macro_tile_index(surf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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 \
|
||||
|
@@ -73,7 +73,6 @@ glsl_tests_general_ir_test_SOURCES = \
|
||||
glsl/tests/builtin_variable_test.cpp \
|
||||
glsl/tests/invalidate_locations_test.cpp \
|
||||
glsl/tests/general_ir_test.cpp \
|
||||
glsl/tests/lower_int64_test.cpp \
|
||||
glsl/tests/opt_add_neg_to_sub_test.cpp \
|
||||
glsl/tests/varyings_test.cpp
|
||||
glsl_tests_general_ir_test_CFLAGS = \
|
||||
|
@@ -20,11 +20,8 @@ LIBGLSL_FILES = \
|
||||
glsl/blob.c \
|
||||
glsl/blob.h \
|
||||
glsl/builtin_functions.cpp \
|
||||
glsl/builtin_functions.h \
|
||||
glsl/builtin_int64.h \
|
||||
glsl/builtin_types.cpp \
|
||||
glsl/builtin_variables.cpp \
|
||||
glsl/generate_ir.cpp \
|
||||
glsl/glsl_parser_extras.cpp \
|
||||
glsl/glsl_parser_extras.h \
|
||||
glsl/glsl_symbol_table.cpp \
|
||||
@@ -91,7 +88,6 @@ LIBGLSL_FILES = \
|
||||
glsl/lower_distance.cpp \
|
||||
glsl/lower_if_to_cond_assign.cpp \
|
||||
glsl/lower_instructions.cpp \
|
||||
glsl/lower_int64.cpp \
|
||||
glsl/lower_jumps.cpp \
|
||||
glsl/lower_mat_op_to_vec.cpp \
|
||||
glsl/lower_noise.cpp \
|
||||
|
@@ -78,16 +78,6 @@ DECL_TYPE(dmat3x4, GL_DOUBLE_MAT3x4, GLSL_TYPE_DOUBLE, 4, 3)
|
||||
DECL_TYPE(dmat4x2, GL_DOUBLE_MAT4x2, GLSL_TYPE_DOUBLE, 2, 4)
|
||||
DECL_TYPE(dmat4x3, GL_DOUBLE_MAT4x3, GLSL_TYPE_DOUBLE, 3, 4)
|
||||
|
||||
DECL_TYPE(int64_t, GL_INT64_ARB, GLSL_TYPE_INT64, 1, 1)
|
||||
DECL_TYPE(i64vec2, GL_INT64_VEC2_ARB, GLSL_TYPE_INT64, 2, 1)
|
||||
DECL_TYPE(i64vec3, GL_INT64_VEC3_ARB, GLSL_TYPE_INT64, 3, 1)
|
||||
DECL_TYPE(i64vec4, GL_INT64_VEC4_ARB, GLSL_TYPE_INT64, 4, 1)
|
||||
|
||||
DECL_TYPE(uint64_t, GL_UNSIGNED_INT64_ARB, GLSL_TYPE_UINT64, 1, 1)
|
||||
DECL_TYPE(u64vec2, GL_UNSIGNED_INT64_VEC2_ARB, GLSL_TYPE_UINT64, 2, 1)
|
||||
DECL_TYPE(u64vec3, GL_UNSIGNED_INT64_VEC3_ARB, GLSL_TYPE_UINT64, 3, 1)
|
||||
DECL_TYPE(u64vec4, GL_UNSIGNED_INT64_VEC4_ARB, GLSL_TYPE_UINT64, 4, 1)
|
||||
|
||||
DECL_TYPE(sampler, GL_SAMPLER_1D, GLSL_TYPE_SAMPLER, GLSL_SAMPLER_DIM_1D, 0, 0, GLSL_TYPE_VOID)
|
||||
DECL_TYPE(sampler1D, GL_SAMPLER_1D, GLSL_TYPE_SAMPLER, GLSL_SAMPLER_DIM_1D, 0, 0, GLSL_TYPE_FLOAT)
|
||||
DECL_TYPE(sampler2D, GL_SAMPLER_2D, GLSL_TYPE_SAMPLER, GLSL_SAMPLER_DIM_2D, 0, 0, GLSL_TYPE_FLOAT)
|
||||
|
@@ -195,8 +195,6 @@ enum ast_operators {
|
||||
ast_float_constant,
|
||||
ast_bool_constant,
|
||||
ast_double_constant,
|
||||
ast_int64_constant,
|
||||
ast_uint64_constant,
|
||||
|
||||
ast_sequence,
|
||||
ast_aggregate
|
||||
@@ -257,8 +255,6 @@ public:
|
||||
unsigned uint_constant;
|
||||
int bool_constant;
|
||||
double double_constant;
|
||||
uint64_t uint64_constant;
|
||||
int64_t int64_constant;
|
||||
} primary_expression;
|
||||
|
||||
|
||||
|
@@ -27,7 +27,6 @@
|
||||
#include "ir.h"
|
||||
#include "main/core.h" /* for MIN2 */
|
||||
#include "main/shaderobj.h"
|
||||
#include "builtin_functions.h"
|
||||
|
||||
static ir_rvalue *
|
||||
convert_component(ir_rvalue *src, const glsl_type *desired_type);
|
||||
@@ -761,12 +760,6 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
result = new(ctx) ir_expression(ir_unop_d2u, src);
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
result = new(ctx) ir_expression(ir_unop_u642u, src);
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
result = new(ctx) ir_expression(ir_unop_i642u, src);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GLSL_TYPE_INT:
|
||||
@@ -783,12 +776,6 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
result = new(ctx) ir_expression(ir_unop_d2i, src);
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
result = new(ctx) ir_expression(ir_unop_u642i, src);
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
result = new(ctx) ir_expression(ir_unop_i642i, src);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GLSL_TYPE_FLOAT:
|
||||
@@ -805,12 +792,6 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
result = new(ctx) ir_expression(ir_unop_d2f, desired_type, src, NULL);
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
result = new(ctx) ir_expression(ir_unop_u642f, desired_type, src, NULL);
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
result = new(ctx) ir_expression(ir_unop_i642f, desired_type, src, NULL);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GLSL_TYPE_BOOL:
|
||||
@@ -829,14 +810,6 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
result = new(ctx) ir_expression(ir_unop_d2b, desired_type, src, NULL);
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
result = new(ctx) ir_expression(ir_unop_i642b,
|
||||
new(ctx) ir_expression(ir_unop_u642i64,
|
||||
src));
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
result = new(ctx) ir_expression(ir_unop_i642b, desired_type, src, NULL);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
@@ -855,60 +828,7 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
|
||||
case GLSL_TYPE_FLOAT:
|
||||
result = new(ctx) ir_expression(ir_unop_f2d, desired_type, src, NULL);
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
result = new(ctx) ir_expression(ir_unop_u642d, desired_type, src, NULL);
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
result = new(ctx) ir_expression(ir_unop_i642d, desired_type, src, NULL);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
switch (b) {
|
||||
case GLSL_TYPE_INT:
|
||||
result = new(ctx) ir_expression(ir_unop_i2u64, src);
|
||||
break;
|
||||
case GLSL_TYPE_UINT:
|
||||
result = new(ctx) ir_expression(ir_unop_u2u64, src);
|
||||
break;
|
||||
case GLSL_TYPE_BOOL:
|
||||
result = new(ctx) ir_expression(ir_unop_i642u64,
|
||||
new(ctx) ir_expression(ir_unop_b2i64,
|
||||
src));
|
||||
break;
|
||||
case GLSL_TYPE_FLOAT:
|
||||
result = new(ctx) ir_expression(ir_unop_f2u64, src);
|
||||
break;
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
result = new(ctx) ir_expression(ir_unop_d2u64, src);
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
result = new(ctx) ir_expression(ir_unop_i642u64, src);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
switch (b) {
|
||||
case GLSL_TYPE_INT:
|
||||
result = new(ctx) ir_expression(ir_unop_i2i64, src);
|
||||
break;
|
||||
case GLSL_TYPE_UINT:
|
||||
result = new(ctx) ir_expression(ir_unop_u2i64, src);
|
||||
break;
|
||||
case GLSL_TYPE_BOOL:
|
||||
result = new(ctx) ir_expression(ir_unop_b2i64, src);
|
||||
break;
|
||||
case GLSL_TYPE_FLOAT:
|
||||
result = new(ctx) ir_expression(ir_unop_f2i64, src);
|
||||
break;
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
result = new(ctx) ir_expression(ir_unop_d2i64, src);
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
result = new(ctx) ir_expression(ir_unop_u642i64, src);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
assert(result != NULL);
|
||||
@@ -1340,12 +1260,6 @@ emit_inline_vector_constructor(const glsl_type *type,
|
||||
case GLSL_TYPE_BOOL:
|
||||
data.b[i + base_component] = c->get_bool_component(i);
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
data.u64[i + base_component] = c->get_uint64_component(i);
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
data.i64[i + base_component] = c->get_int64_component(i);
|
||||
break;
|
||||
default:
|
||||
assert(!"Should not get here.");
|
||||
break;
|
||||
@@ -1353,7 +1267,8 @@ emit_inline_vector_constructor(const glsl_type *type,
|
||||
}
|
||||
|
||||
/* Mask of fields to be written in the assignment. */
|
||||
constant_mask |= ((1U << rhs_components) - 1) << base_lhs_component;
|
||||
constant_mask |=
|
||||
((1U << rhs_components) - 1) << base_lhs_component;
|
||||
constant_components += rhs_components;
|
||||
|
||||
base_component += rhs_components;
|
||||
|
@@ -58,7 +58,6 @@
|
||||
#include "main/shaderobj.h"
|
||||
#include "ir.h"
|
||||
#include "ir_builder.h"
|
||||
#include "builtin_functions.h"
|
||||
|
||||
using namespace ir_builder;
|
||||
|
||||
@@ -260,26 +259,6 @@ get_implicit_conversion_operation(const glsl_type *to, const glsl_type *from,
|
||||
case GLSL_TYPE_INT: return ir_unop_i2d;
|
||||
case GLSL_TYPE_UINT: return ir_unop_u2d;
|
||||
case GLSL_TYPE_FLOAT: return ir_unop_f2d;
|
||||
case GLSL_TYPE_INT64: return ir_unop_i642d;
|
||||
case GLSL_TYPE_UINT64: return ir_unop_u642d;
|
||||
default: return (ir_expression_operation)0;
|
||||
}
|
||||
|
||||
case GLSL_TYPE_UINT64:
|
||||
if (!state->has_int64())
|
||||
return (ir_expression_operation)0;
|
||||
switch (from->base_type) {
|
||||
case GLSL_TYPE_INT: return ir_unop_i2u64;
|
||||
case GLSL_TYPE_UINT: return ir_unop_u2u64;
|
||||
case GLSL_TYPE_INT64: return ir_unop_i642u64;
|
||||
default: return (ir_expression_operation)0;
|
||||
}
|
||||
|
||||
case GLSL_TYPE_INT64:
|
||||
if (!state->has_int64())
|
||||
return (ir_expression_operation)0;
|
||||
switch (from->base_type) {
|
||||
case GLSL_TYPE_INT: return ir_unop_i2i64;
|
||||
default: return (ir_expression_operation)0;
|
||||
}
|
||||
|
||||
@@ -534,12 +513,12 @@ bit_logic_result_type(ir_rvalue * &value_a, ir_rvalue * &value_b,
|
||||
* (|). The operands must be of type signed or unsigned integers or
|
||||
* integer vectors."
|
||||
*/
|
||||
if (!type_a->is_integer_32_64()) {
|
||||
if (!type_a->is_integer()) {
|
||||
_mesa_glsl_error(loc, state, "LHS of `%s' must be an integer",
|
||||
ast_expression::operator_string(op));
|
||||
return glsl_type::error_type;
|
||||
}
|
||||
if (!type_b->is_integer_32_64()) {
|
||||
if (!type_b->is_integer()) {
|
||||
_mesa_glsl_error(loc, state, "RHS of `%s' must be an integer",
|
||||
ast_expression::operator_string(op));
|
||||
return glsl_type::error_type;
|
||||
@@ -620,11 +599,11 @@ modulus_result_type(ir_rvalue * &value_a, ir_rvalue * &value_b,
|
||||
* "The operator modulus (%) operates on signed or unsigned integers or
|
||||
* integer vectors."
|
||||
*/
|
||||
if (!type_a->is_integer_32_64()) {
|
||||
if (!type_a->is_integer()) {
|
||||
_mesa_glsl_error(loc, state, "LHS of operator %% must be an integer");
|
||||
return glsl_type::error_type;
|
||||
}
|
||||
if (!type_b->is_integer_32_64()) {
|
||||
if (!type_b->is_integer()) {
|
||||
_mesa_glsl_error(loc, state, "RHS of operator %% must be an integer");
|
||||
return glsl_type::error_type;
|
||||
}
|
||||
@@ -742,7 +721,7 @@ shift_result_type(const struct glsl_type *type_a,
|
||||
* must be signed or unsigned integers or integer vectors. One operand
|
||||
* can be signed while the other is unsigned."
|
||||
*/
|
||||
if (!type_a->is_integer_32_64()) {
|
||||
if (!type_a->is_integer()) {
|
||||
_mesa_glsl_error(loc, state, "LHS of operator %s must be an integer or "
|
||||
"integer vector", ast_expression::operator_string(op));
|
||||
return glsl_type::error_type;
|
||||
@@ -1114,8 +1093,6 @@ do_comparison(void *mem_ctx, int operation, ir_rvalue *op0, ir_rvalue *op1)
|
||||
case GLSL_TYPE_INT:
|
||||
case GLSL_TYPE_BOOL:
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
case GLSL_TYPE_UINT64:
|
||||
case GLSL_TYPE_INT64:
|
||||
return new(mem_ctx) ir_expression(operation, op0, op1);
|
||||
|
||||
case GLSL_TYPE_ARRAY: {
|
||||
@@ -1279,10 +1256,6 @@ constant_one_for_inc_dec(void *ctx, const glsl_type *type)
|
||||
return new(ctx) ir_constant((unsigned) 1);
|
||||
case GLSL_TYPE_INT:
|
||||
return new(ctx) ir_constant(1);
|
||||
case GLSL_TYPE_UINT64:
|
||||
return new(ctx) ir_constant((uint64_t) 1);
|
||||
case GLSL_TYPE_INT64:
|
||||
return new(ctx) ir_constant((int64_t) 1);
|
||||
default:
|
||||
case GLSL_TYPE_FLOAT:
|
||||
return new(ctx) ir_constant(1.0f);
|
||||
@@ -1562,7 +1535,7 @@ ast_expression::do_hir(exec_list *instructions,
|
||||
error_emitted = true;
|
||||
}
|
||||
|
||||
if (!op[0]->type->is_integer_32_64()) {
|
||||
if (!op[0]->type->is_integer()) {
|
||||
_mesa_glsl_error(&loc, state, "operand of `~' must be an integer");
|
||||
error_emitted = true;
|
||||
}
|
||||
@@ -2033,14 +2006,6 @@ ast_expression::do_hir(exec_list *instructions,
|
||||
result = new(ctx) ir_constant(this->primary_expression.double_constant);
|
||||
break;
|
||||
|
||||
case ast_uint64_constant:
|
||||
result = new(ctx) ir_constant(this->primary_expression.uint64_constant);
|
||||
break;
|
||||
|
||||
case ast_int64_constant:
|
||||
result = new(ctx) ir_constant(this->primary_expression.int64_constant);
|
||||
break;
|
||||
|
||||
case ast_sequence: {
|
||||
/* It should not be possible to generate a sequence in the AST without
|
||||
* any expressions in it.
|
||||
@@ -2167,8 +2132,6 @@ ast_expression::has_sequence_subexpression() const
|
||||
case ast_float_constant:
|
||||
case ast_bool_constant:
|
||||
case ast_double_constant:
|
||||
case ast_int64_constant:
|
||||
case ast_uint64_constant:
|
||||
return false;
|
||||
|
||||
case ast_aggregate:
|
||||
@@ -3865,8 +3828,6 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
|
||||
"varying variables may not be of type struct");
|
||||
break;
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
case GLSL_TYPE_UINT64:
|
||||
case GLSL_TYPE_INT64:
|
||||
break;
|
||||
default:
|
||||
_mesa_glsl_error(loc, state, "illegal type for a varying variable");
|
||||
@@ -4925,9 +4886,6 @@ ast_declarator_list::hir(exec_list *instructions,
|
||||
switch (check_type->base_type) {
|
||||
case GLSL_TYPE_FLOAT:
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
case GLSL_TYPE_INT64:
|
||||
break;
|
||||
case GLSL_TYPE_UINT:
|
||||
case GLSL_TYPE_INT:
|
||||
if (state->is_version(120, 300))
|
||||
@@ -5262,11 +5220,13 @@ ast_declarator_list::hir(exec_list *instructions,
|
||||
* sized by an earlier input primitive layout qualifier, when
|
||||
* present, as per the following table."
|
||||
*/
|
||||
const enum ir_variable_mode mode = (const enum ir_variable_mode)
|
||||
(earlier == NULL ? var->data.mode : earlier->data.mode);
|
||||
const bool implicitly_sized =
|
||||
(var->data.mode == ir_var_shader_in &&
|
||||
(mode == ir_var_shader_in &&
|
||||
state->stage >= MESA_SHADER_TESS_CTRL &&
|
||||
state->stage <= MESA_SHADER_GEOMETRY) ||
|
||||
(var->data.mode == ir_var_shader_out &&
|
||||
(mode == ir_var_shader_out &&
|
||||
state->stage == MESA_SHADER_TESS_CTRL);
|
||||
|
||||
if (t->is_unsized_array() && !implicitly_sized)
|
||||
@@ -7903,10 +7863,9 @@ ast_interface_block::hir(exec_list *instructions,
|
||||
}
|
||||
|
||||
if (var->type->is_unsized_array()) {
|
||||
if (var->is_in_shader_storage_block()) {
|
||||
if (is_unsized_array_last_element(var)) {
|
||||
var->data.from_ssbo_unsized_array = true;
|
||||
}
|
||||
if (var->is_in_shader_storage_block() &&
|
||||
is_unsized_array_last_element(var)) {
|
||||
var->data.from_ssbo_unsized_array = true;
|
||||
} else {
|
||||
/* From GLSL ES 3.10 spec, section 4.1.9 "Arrays":
|
||||
*
|
||||
@@ -7914,6 +7873,10 @@ ast_interface_block::hir(exec_list *instructions,
|
||||
* block and the size is not specified at compile-time, it is
|
||||
* sized at run-time. In all other cases, arrays are sized only
|
||||
* at compile-time."
|
||||
*
|
||||
* In desktop GLSL it is allowed to have unsized-arrays that are
|
||||
* not last, as long as we can determine that they are implicitly
|
||||
* sized.
|
||||
*/
|
||||
if (state->es_shader) {
|
||||
_mesa_glsl_error(&loc, state, "unsized array `%s' "
|
||||
|
@@ -61,7 +61,6 @@
|
||||
#include "glsl_parser_extras.h"
|
||||
#include "program/prog_instruction.h"
|
||||
#include <math.h>
|
||||
#include "builtin_functions.h"
|
||||
|
||||
#define M_PIf ((float) M_PI)
|
||||
#define M_PI_2f ((float) M_PI_2)
|
||||
@@ -471,13 +470,6 @@ shader_clock(const _mesa_glsl_parse_state *state)
|
||||
return state->ARB_shader_clock_enable;
|
||||
}
|
||||
|
||||
static bool
|
||||
shader_clock_int64(const _mesa_glsl_parse_state *state)
|
||||
{
|
||||
return state->ARB_shader_clock_enable &&
|
||||
state->ARB_gpu_shader_int64_enable;
|
||||
}
|
||||
|
||||
static bool
|
||||
shader_storage_buffer_object(const _mesa_glsl_parse_state *state)
|
||||
{
|
||||
@@ -539,24 +531,18 @@ fp64(const _mesa_glsl_parse_state *state)
|
||||
return state->has_double();
|
||||
}
|
||||
|
||||
static bool
|
||||
int64(const _mesa_glsl_parse_state *state)
|
||||
{
|
||||
return state->has_int64();
|
||||
}
|
||||
|
||||
static bool
|
||||
int64_fp64(const _mesa_glsl_parse_state *state)
|
||||
{
|
||||
return state->has_int64() && state->has_double();
|
||||
}
|
||||
|
||||
static bool
|
||||
compute_shader(const _mesa_glsl_parse_state *state)
|
||||
{
|
||||
return state->stage == MESA_SHADER_COMPUTE;
|
||||
}
|
||||
|
||||
static bool
|
||||
compute_shader_supported(const _mesa_glsl_parse_state *state)
|
||||
{
|
||||
return state->has_compute_shader();
|
||||
}
|
||||
|
||||
static bool
|
||||
buffer_atomics_supported(const _mesa_glsl_parse_state *state)
|
||||
{
|
||||
@@ -576,11 +562,6 @@ vote(const _mesa_glsl_parse_state *state)
|
||||
return state->ARB_shader_group_vote_enable;
|
||||
}
|
||||
|
||||
static bool
|
||||
integer_functions_supported(const _mesa_glsl_parse_state *state)
|
||||
{
|
||||
return state->extensions->MESA_shader_integer_functions;
|
||||
}
|
||||
/** @} */
|
||||
|
||||
/******************************************************************************/
|
||||
@@ -748,12 +729,6 @@ private:
|
||||
B1(floatBitsToUint)
|
||||
B1(intBitsToFloat)
|
||||
B1(uintBitsToFloat)
|
||||
|
||||
BA1(doubleBitsToInt64)
|
||||
BA1(doubleBitsToUint64)
|
||||
BA1(int64BitsToDouble)
|
||||
BA1(uint64BitsToDouble)
|
||||
|
||||
ir_function_signature *_packUnorm2x16(builtin_available_predicate avail);
|
||||
ir_function_signature *_packSnorm2x16(builtin_available_predicate avail);
|
||||
ir_function_signature *_packUnorm4x8(builtin_available_predicate avail);
|
||||
@@ -766,10 +741,6 @@ private:
|
||||
ir_function_signature *_unpackHalf2x16(builtin_available_predicate avail);
|
||||
ir_function_signature *_packDouble2x32(builtin_available_predicate avail);
|
||||
ir_function_signature *_unpackDouble2x32(builtin_available_predicate avail);
|
||||
ir_function_signature *_packInt2x32(builtin_available_predicate avail);
|
||||
ir_function_signature *_unpackInt2x32(builtin_available_predicate avail);
|
||||
ir_function_signature *_packUint2x32(builtin_available_predicate avail);
|
||||
ir_function_signature *_unpackUint2x32(builtin_available_predicate avail);
|
||||
|
||||
BA1(length)
|
||||
BA1(distance);
|
||||
@@ -1133,15 +1104,15 @@ builtin_builder::create_intrinsics()
|
||||
ir_intrinsic_group_memory_barrier),
|
||||
NULL);
|
||||
add_function("__intrinsic_memory_barrier_atomic_counter",
|
||||
_memory_barrier_intrinsic(compute_shader,
|
||||
_memory_barrier_intrinsic(compute_shader_supported,
|
||||
ir_intrinsic_memory_barrier_atomic_counter),
|
||||
NULL);
|
||||
add_function("__intrinsic_memory_barrier_buffer",
|
||||
_memory_barrier_intrinsic(compute_shader,
|
||||
_memory_barrier_intrinsic(compute_shader_supported,
|
||||
ir_intrinsic_memory_barrier_buffer),
|
||||
NULL);
|
||||
add_function("__intrinsic_memory_barrier_image",
|
||||
_memory_barrier_intrinsic(compute_shader,
|
||||
_memory_barrier_intrinsic(compute_shader_supported,
|
||||
ir_intrinsic_memory_barrier_image),
|
||||
NULL);
|
||||
add_function("__intrinsic_memory_barrier_shared",
|
||||
@@ -1219,7 +1190,7 @@ builtin_builder::create_builtins()
|
||||
_##NAME(glsl_type::ivec4_type), \
|
||||
NULL);
|
||||
|
||||
#define FI64(NAME) \
|
||||
#define FID(NAME) \
|
||||
add_function(#NAME, \
|
||||
_##NAME(always_available, glsl_type::float_type), \
|
||||
_##NAME(always_available, glsl_type::vec2_type), \
|
||||
@@ -1233,10 +1204,6 @@ builtin_builder::create_builtins()
|
||||
_##NAME(fp64, glsl_type::dvec2_type), \
|
||||
_##NAME(fp64, glsl_type::dvec3_type), \
|
||||
_##NAME(fp64, glsl_type::dvec4_type), \
|
||||
_##NAME(int64, glsl_type::int64_t_type), \
|
||||
_##NAME(int64, glsl_type::i64vec2_type), \
|
||||
_##NAME(int64, glsl_type::i64vec3_type), \
|
||||
_##NAME(int64, glsl_type::i64vec4_type), \
|
||||
NULL);
|
||||
|
||||
#define FIUD_VEC(NAME) \
|
||||
@@ -1255,14 +1222,6 @@ builtin_builder::create_builtins()
|
||||
_##NAME(fp64, glsl_type::dvec2_type), \
|
||||
_##NAME(fp64, glsl_type::dvec3_type), \
|
||||
_##NAME(fp64, glsl_type::dvec4_type), \
|
||||
_##NAME(int64, glsl_type::int64_t_type), \
|
||||
_##NAME(int64, glsl_type::i64vec2_type), \
|
||||
_##NAME(int64, glsl_type::i64vec3_type), \
|
||||
_##NAME(int64, glsl_type::i64vec4_type), \
|
||||
_##NAME(int64, glsl_type::uint64_t_type), \
|
||||
_##NAME(int64, glsl_type::u64vec2_type), \
|
||||
_##NAME(int64, glsl_type::u64vec3_type), \
|
||||
_##NAME(int64, glsl_type::u64vec4_type), \
|
||||
NULL);
|
||||
|
||||
#define IU(NAME) \
|
||||
@@ -1299,14 +1258,6 @@ builtin_builder::create_builtins()
|
||||
_##NAME(fp64, glsl_type::dvec2_type), \
|
||||
_##NAME(fp64, glsl_type::dvec3_type), \
|
||||
_##NAME(fp64, glsl_type::dvec4_type), \
|
||||
_##NAME(int64, glsl_type::int64_t_type), \
|
||||
_##NAME(int64, glsl_type::i64vec2_type), \
|
||||
_##NAME(int64, glsl_type::i64vec3_type), \
|
||||
_##NAME(int64, glsl_type::i64vec4_type), \
|
||||
_##NAME(int64, glsl_type::uint64_t_type), \
|
||||
_##NAME(int64, glsl_type::u64vec2_type), \
|
||||
_##NAME(int64, glsl_type::u64vec3_type), \
|
||||
_##NAME(int64, glsl_type::u64vec4_type), \
|
||||
NULL);
|
||||
|
||||
#define FIUD2_MIXED(NAME) \
|
||||
@@ -1345,21 +1296,6 @@ builtin_builder::create_builtins()
|
||||
_##NAME(fp64, glsl_type::dvec2_type, glsl_type::dvec2_type), \
|
||||
_##NAME(fp64, glsl_type::dvec3_type, glsl_type::dvec3_type), \
|
||||
_##NAME(fp64, glsl_type::dvec4_type, glsl_type::dvec4_type), \
|
||||
\
|
||||
_##NAME(int64, glsl_type::int64_t_type, glsl_type::int64_t_type), \
|
||||
_##NAME(int64, glsl_type::i64vec2_type, glsl_type::int64_t_type), \
|
||||
_##NAME(int64, glsl_type::i64vec3_type, glsl_type::int64_t_type), \
|
||||
_##NAME(int64, glsl_type::i64vec4_type, glsl_type::int64_t_type), \
|
||||
_##NAME(int64, glsl_type::i64vec2_type, glsl_type::i64vec2_type), \
|
||||
_##NAME(int64, glsl_type::i64vec3_type, glsl_type::i64vec3_type), \
|
||||
_##NAME(int64, glsl_type::i64vec4_type, glsl_type::i64vec4_type), \
|
||||
_##NAME(int64, glsl_type::uint64_t_type, glsl_type::uint64_t_type), \
|
||||
_##NAME(int64, glsl_type::u64vec2_type, glsl_type::uint64_t_type), \
|
||||
_##NAME(int64, glsl_type::u64vec3_type, glsl_type::uint64_t_type), \
|
||||
_##NAME(int64, glsl_type::u64vec4_type, glsl_type::uint64_t_type), \
|
||||
_##NAME(int64, glsl_type::u64vec2_type, glsl_type::u64vec2_type), \
|
||||
_##NAME(int64, glsl_type::u64vec3_type, glsl_type::u64vec3_type), \
|
||||
_##NAME(int64, glsl_type::u64vec4_type, glsl_type::u64vec4_type), \
|
||||
NULL);
|
||||
|
||||
F(radians)
|
||||
@@ -1394,8 +1330,8 @@ builtin_builder::create_builtins()
|
||||
F(log2)
|
||||
FD(sqrt)
|
||||
FD(inversesqrt)
|
||||
FI64(abs)
|
||||
FI64(sign)
|
||||
FID(abs)
|
||||
FID(sign)
|
||||
FD(floor)
|
||||
FD(trunc)
|
||||
FD(round)
|
||||
@@ -1472,16 +1408,6 @@ builtin_builder::create_builtins()
|
||||
_mix_sel(shader_integer_mix, glsl_type::bvec2_type, glsl_type::bvec2_type),
|
||||
_mix_sel(shader_integer_mix, glsl_type::bvec3_type, glsl_type::bvec3_type),
|
||||
_mix_sel(shader_integer_mix, glsl_type::bvec4_type, glsl_type::bvec4_type),
|
||||
|
||||
_mix_sel(int64, glsl_type::int64_t_type, glsl_type::bool_type),
|
||||
_mix_sel(int64, glsl_type::i64vec2_type, glsl_type::bvec2_type),
|
||||
_mix_sel(int64, glsl_type::i64vec3_type, glsl_type::bvec3_type),
|
||||
_mix_sel(int64, glsl_type::i64vec4_type, glsl_type::bvec4_type),
|
||||
|
||||
_mix_sel(int64, glsl_type::uint64_t_type, glsl_type::bool_type),
|
||||
_mix_sel(int64, glsl_type::u64vec2_type, glsl_type::bvec2_type),
|
||||
_mix_sel(int64, glsl_type::u64vec3_type, glsl_type::bvec3_type),
|
||||
_mix_sel(int64, glsl_type::u64vec4_type, glsl_type::bvec4_type),
|
||||
NULL);
|
||||
|
||||
add_function("step",
|
||||
@@ -1540,34 +1466,6 @@ builtin_builder::create_builtins()
|
||||
_uintBitsToFloat(glsl_type::uvec4_type),
|
||||
NULL);
|
||||
|
||||
add_function("doubleBitsToInt64",
|
||||
_doubleBitsToInt64(int64_fp64, glsl_type::double_type),
|
||||
_doubleBitsToInt64(int64_fp64, glsl_type::dvec2_type),
|
||||
_doubleBitsToInt64(int64_fp64, glsl_type::dvec3_type),
|
||||
_doubleBitsToInt64(int64_fp64, glsl_type::dvec4_type),
|
||||
NULL);
|
||||
|
||||
add_function("doubleBitsToUint64",
|
||||
_doubleBitsToUint64(int64_fp64, glsl_type::double_type),
|
||||
_doubleBitsToUint64(int64_fp64, glsl_type::dvec2_type),
|
||||
_doubleBitsToUint64(int64_fp64, glsl_type::dvec3_type),
|
||||
_doubleBitsToUint64(int64_fp64, glsl_type::dvec4_type),
|
||||
NULL);
|
||||
|
||||
add_function("int64BitsToDouble",
|
||||
_int64BitsToDouble(int64_fp64, glsl_type::int64_t_type),
|
||||
_int64BitsToDouble(int64_fp64, glsl_type::i64vec2_type),
|
||||
_int64BitsToDouble(int64_fp64, glsl_type::i64vec3_type),
|
||||
_int64BitsToDouble(int64_fp64, glsl_type::i64vec4_type),
|
||||
NULL);
|
||||
|
||||
add_function("uint64BitsToDouble",
|
||||
_uint64BitsToDouble(int64_fp64, glsl_type::uint64_t_type),
|
||||
_uint64BitsToDouble(int64_fp64, glsl_type::u64vec2_type),
|
||||
_uint64BitsToDouble(int64_fp64, glsl_type::u64vec3_type),
|
||||
_uint64BitsToDouble(int64_fp64, glsl_type::u64vec4_type),
|
||||
NULL);
|
||||
|
||||
add_function("packUnorm2x16", _packUnorm2x16(shader_packing_or_es3_or_gpu_shader5), NULL);
|
||||
add_function("packSnorm2x16", _packSnorm2x16(shader_packing_or_es3), NULL);
|
||||
add_function("packUnorm4x8", _packUnorm4x8(shader_packing_or_es31_or_gpu_shader5), NULL);
|
||||
@@ -1581,10 +1479,6 @@ builtin_builder::create_builtins()
|
||||
add_function("packDouble2x32", _packDouble2x32(fp64), NULL);
|
||||
add_function("unpackDouble2x32", _unpackDouble2x32(fp64), NULL);
|
||||
|
||||
add_function("packInt2x32", _packInt2x32(int64), NULL);
|
||||
add_function("unpackInt2x32", _unpackInt2x32(int64), NULL);
|
||||
add_function("packUint2x32", _packUint2x32(int64), NULL);
|
||||
add_function("unpackUint2x32", _unpackUint2x32(int64), NULL);
|
||||
|
||||
FD(length)
|
||||
FD(distance)
|
||||
@@ -3070,15 +2964,15 @@ builtin_builder::create_builtins()
|
||||
NULL);
|
||||
add_function("memoryBarrierAtomicCounter",
|
||||
_memory_barrier("__intrinsic_memory_barrier_atomic_counter",
|
||||
compute_shader),
|
||||
compute_shader_supported),
|
||||
NULL);
|
||||
add_function("memoryBarrierBuffer",
|
||||
_memory_barrier("__intrinsic_memory_barrier_buffer",
|
||||
compute_shader),
|
||||
compute_shader_supported),
|
||||
NULL);
|
||||
add_function("memoryBarrierImage",
|
||||
_memory_barrier("__intrinsic_memory_barrier_image",
|
||||
compute_shader),
|
||||
compute_shader_supported),
|
||||
NULL);
|
||||
add_function("memoryBarrierShared",
|
||||
_memory_barrier("__intrinsic_memory_barrier_shared",
|
||||
@@ -3090,39 +2984,10 @@ builtin_builder::create_builtins()
|
||||
glsl_type::uvec2_type),
|
||||
NULL);
|
||||
|
||||
add_function("clockARB",
|
||||
_shader_clock(shader_clock_int64,
|
||||
glsl_type::uint64_t_type),
|
||||
NULL);
|
||||
|
||||
add_function("anyInvocationARB", _vote(ir_unop_vote_any), NULL);
|
||||
add_function("allInvocationsARB", _vote(ir_unop_vote_all), NULL);
|
||||
add_function("allInvocationsEqualARB", _vote(ir_unop_vote_eq), NULL);
|
||||
|
||||
add_function("__builtin_idiv64",
|
||||
generate_ir::idiv64(mem_ctx, integer_functions_supported),
|
||||
NULL);
|
||||
|
||||
add_function("__builtin_imod64",
|
||||
generate_ir::imod64(mem_ctx, integer_functions_supported),
|
||||
NULL);
|
||||
|
||||
add_function("__builtin_sign64",
|
||||
generate_ir::sign64(mem_ctx, integer_functions_supported),
|
||||
NULL);
|
||||
|
||||
add_function("__builtin_udiv64",
|
||||
generate_ir::udiv64(mem_ctx, integer_functions_supported),
|
||||
NULL);
|
||||
|
||||
add_function("__builtin_umod64",
|
||||
generate_ir::umod64(mem_ctx, integer_functions_supported),
|
||||
NULL);
|
||||
|
||||
add_function("__builtin_umul64",
|
||||
generate_ir::umul64(mem_ctx, integer_functions_supported),
|
||||
NULL);
|
||||
|
||||
#undef F
|
||||
#undef FI
|
||||
#undef FIUD_VEC
|
||||
@@ -3993,42 +3858,6 @@ builtin_builder::_uintBitsToFloat(const glsl_type *type)
|
||||
return sig;
|
||||
}
|
||||
|
||||
ir_function_signature *
|
||||
builtin_builder::_doubleBitsToInt64(builtin_available_predicate avail, const glsl_type *type)
|
||||
{
|
||||
ir_variable *x = in_var(type, "x");
|
||||
MAKE_SIG(glsl_type::i64vec(type->vector_elements), avail, 1, x);
|
||||
body.emit(ret(bitcast_d2i64(x)));
|
||||
return sig;
|
||||
}
|
||||
|
||||
ir_function_signature *
|
||||
builtin_builder::_doubleBitsToUint64(builtin_available_predicate avail, const glsl_type *type)
|
||||
{
|
||||
ir_variable *x = in_var(type, "x");
|
||||
MAKE_SIG(glsl_type::u64vec(type->vector_elements), avail, 1, x);
|
||||
body.emit(ret(bitcast_d2u64(x)));
|
||||
return sig;
|
||||
}
|
||||
|
||||
ir_function_signature *
|
||||
builtin_builder::_int64BitsToDouble(builtin_available_predicate avail, const glsl_type *type)
|
||||
{
|
||||
ir_variable *x = in_var(type, "x");
|
||||
MAKE_SIG(glsl_type::dvec(type->vector_elements), avail, 1, x);
|
||||
body.emit(ret(bitcast_i642d(x)));
|
||||
return sig;
|
||||
}
|
||||
|
||||
ir_function_signature *
|
||||
builtin_builder::_uint64BitsToDouble(builtin_available_predicate avail, const glsl_type *type)
|
||||
{
|
||||
ir_variable *x = in_var(type, "x");
|
||||
MAKE_SIG(glsl_type::dvec(type->vector_elements), avail, 1, x);
|
||||
body.emit(ret(bitcast_u642d(x)));
|
||||
return sig;
|
||||
}
|
||||
|
||||
ir_function_signature *
|
||||
builtin_builder::_packUnorm2x16(builtin_available_predicate avail)
|
||||
{
|
||||
@@ -4138,42 +3967,6 @@ builtin_builder::_unpackDouble2x32(builtin_available_predicate avail)
|
||||
return sig;
|
||||
}
|
||||
|
||||
ir_function_signature *
|
||||
builtin_builder::_packInt2x32(builtin_available_predicate avail)
|
||||
{
|
||||
ir_variable *v = in_var(glsl_type::ivec2_type, "v");
|
||||
MAKE_SIG(glsl_type::int64_t_type, avail, 1, v);
|
||||
body.emit(ret(expr(ir_unop_pack_int_2x32, v)));
|
||||
return sig;
|
||||
}
|
||||
|
||||
ir_function_signature *
|
||||
builtin_builder::_unpackInt2x32(builtin_available_predicate avail)
|
||||
{
|
||||
ir_variable *p = in_var(glsl_type::int64_t_type, "p");
|
||||
MAKE_SIG(glsl_type::ivec2_type, avail, 1, p);
|
||||
body.emit(ret(expr(ir_unop_unpack_int_2x32, p)));
|
||||
return sig;
|
||||
}
|
||||
|
||||
ir_function_signature *
|
||||
builtin_builder::_packUint2x32(builtin_available_predicate avail)
|
||||
{
|
||||
ir_variable *v = in_var(glsl_type::uvec2_type, "v");
|
||||
MAKE_SIG(glsl_type::uint64_t_type, avail, 1, v);
|
||||
body.emit(ret(expr(ir_unop_pack_uint_2x32, v)));
|
||||
return sig;
|
||||
}
|
||||
|
||||
ir_function_signature *
|
||||
builtin_builder::_unpackUint2x32(builtin_available_predicate avail)
|
||||
{
|
||||
ir_variable *p = in_var(glsl_type::uint64_t_type, "p");
|
||||
MAKE_SIG(glsl_type::uvec2_type, avail, 1, p);
|
||||
body.emit(ret(expr(ir_unop_unpack_uint_2x32, p)));
|
||||
return sig;
|
||||
}
|
||||
|
||||
ir_function_signature *
|
||||
builtin_builder::_length(builtin_available_predicate avail, const glsl_type *type)
|
||||
{
|
||||
@@ -5900,13 +5693,7 @@ builtin_builder::_shader_clock(builtin_available_predicate avail,
|
||||
|
||||
body.emit(call(shader->symbols->get_function("__intrinsic_shader_clock"),
|
||||
retval, sig->parameters));
|
||||
|
||||
if (type == glsl_type::uint64_t_type) {
|
||||
body.emit(ret(expr(ir_unop_pack_uint_2x32, retval)));
|
||||
} else {
|
||||
body.emit(ret(retval));
|
||||
}
|
||||
|
||||
body.emit(ret(retval));
|
||||
return sig;
|
||||
}
|
||||
|
||||
|
@@ -1,68 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2016 Intel Corporation
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef BULITIN_FUNCTIONS_H
|
||||
#define BULITIN_FUNCTIONS_H
|
||||
|
||||
extern void
|
||||
_mesa_glsl_initialize_builtin_functions();
|
||||
|
||||
extern ir_function_signature *
|
||||
_mesa_glsl_find_builtin_function(_mesa_glsl_parse_state *state,
|
||||
const char *name, exec_list *actual_parameters);
|
||||
|
||||
extern ir_function *
|
||||
_mesa_glsl_find_builtin_function_by_name(const char *name);
|
||||
|
||||
extern gl_shader *
|
||||
_mesa_glsl_get_builtin_function_shader(void);
|
||||
|
||||
extern ir_function_signature *
|
||||
_mesa_get_main_function_signature(glsl_symbol_table *symbols);
|
||||
|
||||
extern void
|
||||
_mesa_glsl_release_builtin_functions(void);
|
||||
|
||||
namespace generate_ir {
|
||||
|
||||
ir_function_signature *
|
||||
udiv64(void *mem_ctx, builtin_available_predicate avail);
|
||||
|
||||
ir_function_signature *
|
||||
idiv64(void *mem_ctx, builtin_available_predicate avail);
|
||||
|
||||
ir_function_signature *
|
||||
umod64(void *mem_ctx, builtin_available_predicate avail);
|
||||
|
||||
ir_function_signature *
|
||||
imod64(void *mem_ctx, builtin_available_predicate avail);
|
||||
|
||||
ir_function_signature *
|
||||
umul64(void *mem_ctx, builtin_available_predicate avail);
|
||||
|
||||
ir_function_signature *
|
||||
sign64(void *mem_ctx, builtin_available_predicate avail);
|
||||
|
||||
}
|
||||
|
||||
#endif /* BULITIN_FUNCTIONS_H */
|
File diff suppressed because it is too large
Load Diff
@@ -409,17 +409,5 @@ _mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state)
|
||||
add_type(symbols, glsl_type::dmat4x2_type);
|
||||
add_type(symbols, glsl_type::dmat4x3_type);
|
||||
}
|
||||
|
||||
if (state->ARB_gpu_shader_int64_enable) {
|
||||
add_type(symbols, glsl_type::int64_t_type);
|
||||
add_type(symbols, glsl_type::i64vec2_type);
|
||||
add_type(symbols, glsl_type::i64vec3_type);
|
||||
add_type(symbols, glsl_type::i64vec4_type);
|
||||
|
||||
add_type(symbols, glsl_type::uint64_t_type);
|
||||
add_type(symbols, glsl_type::u64vec2_type);
|
||||
add_type(symbols, glsl_type::u64vec3_type);
|
||||
add_type(symbols, glsl_type::u64vec4_type);
|
||||
}
|
||||
}
|
||||
/** @} */
|
||||
|
@@ -30,7 +30,6 @@
|
||||
#include "main/uniforms.h"
|
||||
#include "program/prog_statevars.h"
|
||||
#include "program/prog_instruction.h"
|
||||
#include "builtin_functions.h"
|
||||
|
||||
using namespace ir_builder;
|
||||
|
||||
|
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2016 Intel Corporation
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
#include "ir_builder.h"
|
||||
#include "builtin_functions.h"
|
||||
#include "program/prog_instruction.h" /* for SWIZZLE_X, &c. */
|
||||
|
||||
using namespace ir_builder;
|
||||
|
||||
namespace generate_ir {
|
||||
|
||||
#include "builtin_int64.h"
|
||||
|
||||
}
|
@@ -1334,8 +1334,7 @@ add_builtin_define(glcpp_parser_t *parser, const char *name, int value)
|
||||
}
|
||||
|
||||
glcpp_parser_t *
|
||||
glcpp_parser_create(const struct gl_extensions *extension_list,
|
||||
glcpp_extension_iterator extensions, void *state, gl_api api)
|
||||
glcpp_parser_create(glcpp_extension_iterator extensions, void *state, gl_api api)
|
||||
{
|
||||
glcpp_parser_t *parser;
|
||||
|
||||
@@ -1370,7 +1369,6 @@ glcpp_parser_create(const struct gl_extensions *extension_list,
|
||||
parser->error = 0;
|
||||
|
||||
parser->extensions = extensions;
|
||||
parser->extension_list = extension_list;
|
||||
parser->state = state;
|
||||
parser->api = api;
|
||||
parser->version = 0;
|
||||
@@ -2337,21 +2335,6 @@ _glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t versio
|
||||
parser->extensions(parser->state, add_builtin_define, parser,
|
||||
version, parser->is_gles);
|
||||
|
||||
if (parser->extension_list) {
|
||||
/* If MESA_shader_integer_functions is supported, then the building
|
||||
* blocks required for the 64x64 => 64 multiply exist. Add defines for
|
||||
* those functions so that they can be tested.
|
||||
*/
|
||||
if (parser->extension_list->MESA_shader_integer_functions) {
|
||||
add_builtin_define(parser, "__have_builtin_builtin_sign64", 1);
|
||||
add_builtin_define(parser, "__have_builtin_builtin_umul64", 1);
|
||||
add_builtin_define(parser, "__have_builtin_builtin_udiv64", 1);
|
||||
add_builtin_define(parser, "__have_builtin_builtin_umod64", 1);
|
||||
add_builtin_define(parser, "__have_builtin_builtin_idiv64", 1);
|
||||
add_builtin_define(parser, "__have_builtin_builtin_imod64", 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (explicitly_set) {
|
||||
ralloc_asprintf_rewrite_tail(&parser->output, &parser->output_length,
|
||||
"#version %" PRIiMAX "%s%s", version,
|
||||
|
@@ -205,7 +205,6 @@ struct glcpp_parser {
|
||||
size_t info_log_length;
|
||||
int error;
|
||||
glcpp_extension_iterator extensions;
|
||||
const struct gl_extensions *extension_list;
|
||||
void *state;
|
||||
gl_api api;
|
||||
unsigned version;
|
||||
@@ -226,8 +225,7 @@ struct glcpp_parser {
|
||||
};
|
||||
|
||||
glcpp_parser_t *
|
||||
glcpp_parser_create(const struct gl_extensions *extension_list,
|
||||
glcpp_extension_iterator extensions, void *state, gl_api api);
|
||||
glcpp_parser_create (glcpp_extension_iterator extensions, void *state, gl_api api);
|
||||
|
||||
int
|
||||
glcpp_parser_parse (glcpp_parser_t *parser);
|
||||
|
@@ -218,7 +218,7 @@ glcpp_preprocess(void *ralloc_ctx, const char **shader, char **info_log,
|
||||
{
|
||||
int errors;
|
||||
glcpp_parser_t *parser =
|
||||
glcpp_parser_create(&gl_ctx->Extensions, extensions, state, gl_ctx->API);
|
||||
glcpp_parser_create(extensions, state, gl_ctx->API);
|
||||
|
||||
if (! gl_ctx->Const.DisableGLSLLineContinuations)
|
||||
*shader = remove_line_continuations(parser, *shader);
|
||||
|
@@ -107,29 +107,17 @@ literal_integer(char *text, int len, struct _mesa_glsl_parse_state *state,
|
||||
{
|
||||
bool is_uint = (text[len - 1] == 'u' ||
|
||||
text[len - 1] == 'U');
|
||||
bool is_long = (text[len - 1] == 'l' || text[len - 1] == 'L');
|
||||
const char *digits = text;
|
||||
|
||||
if (is_long)
|
||||
is_uint = (text[len - 2] == 'u' && text[len - 1] == 'l') ||
|
||||
(text[len - 2] == 'U' && text[len - 1] == 'L');
|
||||
/* Skip "0x" */
|
||||
if (base == 16)
|
||||
digits += 2;
|
||||
|
||||
unsigned long long value = strtoull(digits, NULL, base);
|
||||
|
||||
if (is_long)
|
||||
lval->n64 = (int64_t)value;
|
||||
else
|
||||
lval->n = (int)value;
|
||||
lval->n = (int)value;
|
||||
|
||||
if (is_long && !is_uint && base == 10 && value > (uint64_t)LLONG_MAX + 1) {
|
||||
/* Tries to catch unintentionally providing a negative value. */
|
||||
_mesa_glsl_warning(lloc, state,
|
||||
"signed literal value `%s' is interpreted as %lld",
|
||||
text, lval->n64);
|
||||
} else if (!is_long && value > UINT_MAX) {
|
||||
if (value > UINT_MAX) {
|
||||
/* Note that signed 0xffffffff is valid, not out of range! */
|
||||
if (state->is_version(130, 300)) {
|
||||
_mesa_glsl_error(lloc, state,
|
||||
@@ -147,10 +135,7 @@ literal_integer(char *text, int len, struct _mesa_glsl_parse_state *state,
|
||||
"signed literal value `%s' is interpreted as %d",
|
||||
text, lval->n);
|
||||
}
|
||||
if (is_long)
|
||||
return is_uint ? UINT64CONSTANT : INT64CONSTANT;
|
||||
else
|
||||
return is_uint ? UINTCONSTANT : INTCONSTANT;
|
||||
return is_uint ? UINTCONSTANT : INTCONSTANT;
|
||||
}
|
||||
|
||||
#define LITERAL_INTEGER(base) \
|
||||
@@ -477,13 +462,13 @@ layout {
|
||||
\|= return OR_ASSIGN;
|
||||
-= return SUB_ASSIGN;
|
||||
|
||||
[1-9][0-9]*([uU]|[lL]|ul|UL)? {
|
||||
[1-9][0-9]*[uU]? {
|
||||
return LITERAL_INTEGER(10);
|
||||
}
|
||||
0[xX][0-9a-fA-F]+([uU]|[lL]|ul|UL)? {
|
||||
0[xX][0-9a-fA-F]+[uU]? {
|
||||
return LITERAL_INTEGER(16);
|
||||
}
|
||||
0[0-7]*([uU]|[lL]|ul|UL)? {
|
||||
0[0-7]*[uU]? {
|
||||
return LITERAL_INTEGER(8);
|
||||
}
|
||||
|
||||
@@ -606,16 +591,6 @@ resource KEYWORD(420, 300, 0, 0, RESOURCE);
|
||||
sample KEYWORD_WITH_ALT(400, 300, 400, 320, yyextra->ARB_gpu_shader5_enable || yyextra->OES_shader_multisample_interpolation_enable, SAMPLE);
|
||||
subroutine KEYWORD_WITH_ALT(400, 300, 400, 0, yyextra->ARB_shader_subroutine_enable, SUBROUTINE);
|
||||
|
||||
/* Additional words for ARB_gpu_shader_int64 */
|
||||
int64_t KEYWORD_WITH_ALT(0, 0, 0, 0, yyextra->ARB_gpu_shader_int64_enable, INT64_TOK);
|
||||
i64vec2 KEYWORD_WITH_ALT(0, 0, 0, 0, yyextra->ARB_gpu_shader_int64_enable, I64VEC2);
|
||||
i64vec3 KEYWORD_WITH_ALT(0, 0, 0, 0, yyextra->ARB_gpu_shader_int64_enable, I64VEC3);
|
||||
i64vec4 KEYWORD_WITH_ALT(0, 0, 0, 0, yyextra->ARB_gpu_shader_int64_enable, I64VEC4);
|
||||
|
||||
uint64_t KEYWORD_WITH_ALT(0, 0, 0, 0, yyextra->ARB_gpu_shader_int64_enable, UINT64_TOK);
|
||||
u64vec2 KEYWORD_WITH_ALT(0, 0, 0, 0, yyextra->ARB_gpu_shader_int64_enable, U64VEC2);
|
||||
u64vec3 KEYWORD_WITH_ALT(0, 0, 0, 0, yyextra->ARB_gpu_shader_int64_enable, U64VEC3);
|
||||
u64vec4 KEYWORD_WITH_ALT(0, 0, 0, 0, yyextra->ARB_gpu_shader_int64_enable, U64VEC4);
|
||||
|
||||
[_a-zA-Z][_a-zA-Z0-9]* {
|
||||
struct _mesa_glsl_parse_state *state = yyextra;
|
||||
|
@@ -97,7 +97,6 @@ static bool match_layout_qualifier(const char *s1, const char *s2,
|
||||
|
||||
%union {
|
||||
int n;
|
||||
int64_t n64;
|
||||
float real;
|
||||
double dreal;
|
||||
const char *identifier;
|
||||
@@ -137,7 +136,6 @@ static bool match_layout_qualifier(const char *s1, const char *s2,
|
||||
%token ATTRIBUTE CONST_TOK BOOL_TOK FLOAT_TOK INT_TOK UINT_TOK DOUBLE_TOK
|
||||
%token BREAK BUFFER CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT
|
||||
%token BVEC2 BVEC3 BVEC4 IVEC2 IVEC3 IVEC4 UVEC2 UVEC3 UVEC4 VEC2 VEC3 VEC4 DVEC2 DVEC3 DVEC4
|
||||
%token INT64_TOK UINT64_TOK I64VEC2 I64VEC3 I64VEC4 U64VEC2 U64VEC3 U64VEC4
|
||||
%token CENTROID IN_TOK OUT_TOK INOUT_TOK UNIFORM VARYING SAMPLE
|
||||
%token NOPERSPECTIVE FLAT SMOOTH
|
||||
%token MAT2X2 MAT2X3 MAT2X4
|
||||
@@ -175,7 +173,6 @@ static bool match_layout_qualifier(const char *s1, const char *s2,
|
||||
%token <real> FLOATCONSTANT
|
||||
%token <dreal> DOUBLECONSTANT
|
||||
%token <n> INTCONSTANT UINTCONSTANT BOOLCONSTANT
|
||||
%token <n64> INT64CONSTANT UINT64CONSTANT
|
||||
%token <identifier> FIELD_SELECTION
|
||||
%token LEFT_OP RIGHT_OP
|
||||
%token INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP
|
||||
@@ -454,20 +451,6 @@ primary_expression:
|
||||
$$->set_location(@1);
|
||||
$$->primary_expression.uint_constant = $1;
|
||||
}
|
||||
| INT64CONSTANT
|
||||
{
|
||||
void *ctx = state->linalloc;
|
||||
$$ = new(ctx) ast_expression(ast_int64_constant, NULL, NULL, NULL);
|
||||
$$->set_location(@1);
|
||||
$$->primary_expression.int64_constant = $1;
|
||||
}
|
||||
| UINT64CONSTANT
|
||||
{
|
||||
void *ctx = state->linalloc;
|
||||
$$ = new(ctx) ast_expression(ast_uint64_constant, NULL, NULL, NULL);
|
||||
$$->set_location(@1);
|
||||
$$->primary_expression.uint64_constant = $1;
|
||||
}
|
||||
| FLOATCONSTANT
|
||||
{
|
||||
void *ctx = state->linalloc;
|
||||
@@ -2321,14 +2304,6 @@ basic_type_specifier_nonarray:
|
||||
| UIMAGE2DMS { $$ = "uimage2DMS"; }
|
||||
| UIMAGE2DMSARRAY { $$ = "uimage2DMSArray"; }
|
||||
| ATOMIC_UINT { $$ = "atomic_uint"; }
|
||||
| INT64_TOK { $$ = "int64_t"; }
|
||||
| I64VEC2 { $$ = "i64vec2"; }
|
||||
| I64VEC3 { $$ = "i64vec3"; }
|
||||
| I64VEC4 { $$ = "i64vec4"; }
|
||||
| UINT64_TOK { $$ = "uint64_t"; }
|
||||
| U64VEC2 { $$ = "u64vec2"; }
|
||||
| U64VEC3 { $$ = "u64vec3"; }
|
||||
| U64VEC4 { $$ = "u64vec4"; }
|
||||
;
|
||||
|
||||
precision_qualifier:
|
||||
|
@@ -20,8 +20,6 @@
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#define __STDC_FORMAT_MACROS 1
|
||||
#include <inttypes.h> /* for PRIx64 macro */
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
@@ -39,7 +37,6 @@
|
||||
#include "glsl_parser.h"
|
||||
#include "ir_optimization.h"
|
||||
#include "loop_analysis.h"
|
||||
#include "builtin_functions.h"
|
||||
|
||||
/**
|
||||
* Format a short human-readable description of the given GLSL version.
|
||||
@@ -611,7 +608,6 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
|
||||
EXT(ARB_fragment_layer_viewport),
|
||||
EXT(ARB_gpu_shader5),
|
||||
EXT(ARB_gpu_shader_fp64),
|
||||
EXT(ARB_gpu_shader_int64),
|
||||
EXT(ARB_post_depth_coverage),
|
||||
EXT(ARB_sample_shading),
|
||||
EXT(ARB_separate_shader_objects),
|
||||
@@ -1251,14 +1247,6 @@ ast_expression::print(void) const
|
||||
printf("%f ", primary_expression.double_constant);
|
||||
break;
|
||||
|
||||
case ast_int64_constant:
|
||||
printf("%" PRId64 " ", primary_expression.int64_constant);
|
||||
break;
|
||||
|
||||
case ast_uint64_constant:
|
||||
printf("%" PRIu64 " ", primary_expression.uint64_constant);
|
||||
break;
|
||||
|
||||
case ast_bool_constant:
|
||||
printf("%s ",
|
||||
primary_expression.bool_constant
|
||||
@@ -1716,7 +1704,7 @@ set_shader_inout_layout(struct gl_shader *shader,
|
||||
if (state->out_qualifier->out_xfb_stride[i]->
|
||||
process_qualifier_constant(state, "xfb_stride", &xfb_stride,
|
||||
true)) {
|
||||
shader->TransformFeedbackBufferStride[i] = xfb_stride;
|
||||
shader->info.TransformFeedback.BufferStride[i] = xfb_stride;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1820,15 +1808,16 @@ set_shader_inout_layout(struct gl_shader *shader,
|
||||
break;
|
||||
|
||||
case MESA_SHADER_FRAGMENT:
|
||||
shader->redeclares_gl_fragcoord = state->fs_redeclares_gl_fragcoord;
|
||||
shader->uses_gl_fragcoord = state->fs_uses_gl_fragcoord;
|
||||
shader->pixel_center_integer = state->fs_pixel_center_integer;
|
||||
shader->origin_upper_left = state->fs_origin_upper_left;
|
||||
shader->ARB_fragment_coord_conventions_enable =
|
||||
shader->info.redeclares_gl_fragcoord =
|
||||
state->fs_redeclares_gl_fragcoord;
|
||||
shader->info.uses_gl_fragcoord = state->fs_uses_gl_fragcoord;
|
||||
shader->info.pixel_center_integer = state->fs_pixel_center_integer;
|
||||
shader->info.origin_upper_left = state->fs_origin_upper_left;
|
||||
shader->info.ARB_fragment_coord_conventions_enable =
|
||||
state->ARB_fragment_coord_conventions_enable;
|
||||
shader->EarlyFragmentTests = state->fs_early_fragment_tests;
|
||||
shader->InnerCoverage = state->fs_inner_coverage;
|
||||
shader->PostDepthCoverage = state->fs_post_depth_coverage;
|
||||
shader->info.EarlyFragmentTests = state->fs_early_fragment_tests;
|
||||
shader->info.InnerCoverage = state->fs_inner_coverage;
|
||||
shader->info.PostDepthCoverage = state->fs_post_depth_coverage;
|
||||
shader->BlendSupport = state->fs_blend_support;
|
||||
break;
|
||||
|
||||
|
@@ -250,11 +250,6 @@ struct _mesa_glsl_parse_state {
|
||||
return ARB_gpu_shader_fp64_enable || is_version(400, 0);
|
||||
}
|
||||
|
||||
bool has_int64() const
|
||||
{
|
||||
return ARB_gpu_shader_int64_enable;
|
||||
}
|
||||
|
||||
bool has_420pack() const
|
||||
{
|
||||
return ARB_shading_language_420pack_enable || is_version(420, 0);
|
||||
@@ -615,8 +610,6 @@ struct _mesa_glsl_parse_state {
|
||||
bool ARB_gpu_shader5_warn;
|
||||
bool ARB_gpu_shader_fp64_enable;
|
||||
bool ARB_gpu_shader_fp64_warn;
|
||||
bool ARB_gpu_shader_int64_enable;
|
||||
bool ARB_gpu_shader_int64_warn;
|
||||
bool ARB_post_depth_coverage_enable;
|
||||
bool ARB_post_depth_coverage_warn;
|
||||
bool ARB_sample_shading_enable;
|
||||
|
@@ -169,6 +169,8 @@ glsl_to_nir(const struct gl_shader_program *shader_prog,
|
||||
shader->info->name = ralloc_asprintf(shader, "GLSL%d", shader_prog->Name);
|
||||
if (shader_prog->Label)
|
||||
shader->info->label = ralloc_strdup(shader, shader_prog->Label);
|
||||
shader->info->clip_distance_array_size = sh->Program->ClipDistanceArraySize;
|
||||
shader->info->cull_distance_array_size = sh->Program->CullDistanceArraySize;
|
||||
shader->info->has_transform_feedback_varyings =
|
||||
shader_prog->TransformFeedback.NumVarying > 0;
|
||||
|
||||
@@ -252,22 +254,6 @@ constant_copy(ir_constant *ir, void *mem_ctx)
|
||||
}
|
||||
break;
|
||||
|
||||
case GLSL_TYPE_UINT64:
|
||||
/* Only float base types can be matrices. */
|
||||
assert(cols == 1);
|
||||
|
||||
for (unsigned r = 0; r < rows; r++)
|
||||
ret->values[0].u64[r] = ir->value.u64[r];
|
||||
break;
|
||||
|
||||
case GLSL_TYPE_INT64:
|
||||
/* Only float base types can be matrices. */
|
||||
assert(cols == 1);
|
||||
|
||||
for (unsigned r = 0; r < rows; r++)
|
||||
ret->values[0].i64[r] = ir->value.i64[r];
|
||||
break;
|
||||
|
||||
case GLSL_TYPE_BOOL:
|
||||
/* Only float base types can be matrices. */
|
||||
assert(cols == 1);
|
||||
@@ -1323,12 +1309,6 @@ type_is_float(glsl_base_type type)
|
||||
return type == GLSL_TYPE_FLOAT || type == GLSL_TYPE_DOUBLE;
|
||||
}
|
||||
|
||||
static bool
|
||||
type_is_signed(glsl_base_type type)
|
||||
{
|
||||
return type == GLSL_TYPE_INT || type == GLSL_TYPE_INT64;
|
||||
}
|
||||
|
||||
void
|
||||
nir_visitor::visit(ir_expression *ir)
|
||||
{
|
||||
@@ -1484,7 +1464,6 @@ nir_visitor::visit(ir_expression *ir)
|
||||
case ir_unop_f2b: result = nir_f2b(&b, srcs[0]); break;
|
||||
case ir_unop_i2b: result = nir_i2b(&b, srcs[0]); break;
|
||||
case ir_unop_b2i: result = nir_b2i(&b, srcs[0]); break;
|
||||
case ir_unop_b2i64:result = nir_b2i64(&b, srcs[0]); break;
|
||||
case ir_unop_d2f: result = nir_d2f(&b, srcs[0]); break;
|
||||
case ir_unop_f2d: result = nir_f2d(&b, srcs[0]); break;
|
||||
case ir_unop_d2i: result = nir_d2i(&b, srcs[0]); break;
|
||||
@@ -1498,40 +1477,12 @@ nir_visitor::visit(ir_expression *ir)
|
||||
assert(supports_ints);
|
||||
result = nir_u2d(&b, srcs[0]);
|
||||
break;
|
||||
case ir_unop_i642i: result = nir_i2i32(&b, srcs[0]); break;
|
||||
case ir_unop_i642u: result = nir_i2u32(&b, srcs[0]); break;
|
||||
case ir_unop_i642f: result = nir_i642f(&b, srcs[0]); break;
|
||||
case ir_unop_i642d: result = nir_i642d(&b, srcs[0]); break;
|
||||
|
||||
case ir_unop_u642i: result = nir_u2i32(&b, srcs[0]); break;
|
||||
case ir_unop_u642u: result = nir_u2u32(&b, srcs[0]); break;
|
||||
case ir_unop_u642f: result = nir_u642f(&b, srcs[0]); break;
|
||||
case ir_unop_u642d: result = nir_u642d(&b, srcs[0]); break;
|
||||
|
||||
case ir_unop_i2i64: result = nir_i2i64(&b, srcs[0]); break;
|
||||
case ir_unop_u2i64: result = nir_u2i64(&b, srcs[0]); break;
|
||||
case ir_unop_f2i64:
|
||||
case ir_unop_d2i64:
|
||||
result = nir_f2i64(&b, srcs[0]);
|
||||
break;
|
||||
case ir_unop_i2u64: result = nir_i2u64(&b, srcs[0]); break;
|
||||
case ir_unop_u2u64: result = nir_u2u64(&b, srcs[0]); break;
|
||||
case ir_unop_f2u64:
|
||||
case ir_unop_d2u64:
|
||||
result = nir_f2u64(&b, srcs[0]);
|
||||
break;
|
||||
case ir_unop_i2u:
|
||||
case ir_unop_u2i:
|
||||
case ir_unop_i642u64:
|
||||
case ir_unop_u642i64:
|
||||
case ir_unop_bitcast_i2f:
|
||||
case ir_unop_bitcast_f2i:
|
||||
case ir_unop_bitcast_u2f:
|
||||
case ir_unop_bitcast_f2u:
|
||||
case ir_unop_bitcast_i642d:
|
||||
case ir_unop_bitcast_d2i64:
|
||||
case ir_unop_bitcast_u642d:
|
||||
case ir_unop_bitcast_d2u64:
|
||||
case ir_unop_subroutine_to_int:
|
||||
/* no-op */
|
||||
result = nir_imov(&b, srcs[0]);
|
||||
@@ -1585,14 +1536,6 @@ nir_visitor::visit(ir_expression *ir)
|
||||
case ir_unop_unpack_double_2x32:
|
||||
result = nir_unpack_double_2x32(&b, srcs[0]);
|
||||
break;
|
||||
case ir_unop_pack_int_2x32:
|
||||
case ir_unop_pack_uint_2x32:
|
||||
result = nir_pack_int_2x32(&b, srcs[0]);
|
||||
break;
|
||||
case ir_unop_unpack_int_2x32:
|
||||
case ir_unop_unpack_uint_2x32:
|
||||
result = nir_unpack_int_2x32(&b, srcs[0]);
|
||||
break;
|
||||
case ir_unop_bitfield_reverse:
|
||||
result = nir_bitfield_reverse(&b, srcs[0]);
|
||||
break;
|
||||
@@ -1683,7 +1626,7 @@ nir_visitor::visit(ir_expression *ir)
|
||||
case ir_binop_div:
|
||||
if (type_is_float(out_type))
|
||||
result = nir_fdiv(&b, srcs[0], srcs[1]);
|
||||
else if (type_is_signed(out_type))
|
||||
else if (out_type == GLSL_TYPE_INT)
|
||||
result = nir_idiv(&b, srcs[0], srcs[1]);
|
||||
else
|
||||
result = nir_udiv(&b, srcs[0], srcs[1]);
|
||||
@@ -1695,7 +1638,7 @@ nir_visitor::visit(ir_expression *ir)
|
||||
case ir_binop_min:
|
||||
if (type_is_float(out_type))
|
||||
result = nir_fmin(&b, srcs[0], srcs[1]);
|
||||
else if (type_is_signed(out_type))
|
||||
else if (out_type == GLSL_TYPE_INT)
|
||||
result = nir_imin(&b, srcs[0], srcs[1]);
|
||||
else
|
||||
result = nir_umin(&b, srcs[0], srcs[1]);
|
||||
@@ -1703,7 +1646,7 @@ nir_visitor::visit(ir_expression *ir)
|
||||
case ir_binop_max:
|
||||
if (type_is_float(out_type))
|
||||
result = nir_fmax(&b, srcs[0], srcs[1]);
|
||||
else if (type_is_signed(out_type))
|
||||
else if (out_type == GLSL_TYPE_INT)
|
||||
result = nir_imax(&b, srcs[0], srcs[1]);
|
||||
else
|
||||
result = nir_umax(&b, srcs[0], srcs[1]);
|
||||
@@ -1726,8 +1669,8 @@ nir_visitor::visit(ir_expression *ir)
|
||||
break;
|
||||
case ir_binop_lshift: result = nir_ishl(&b, srcs[0], srcs[1]); break;
|
||||
case ir_binop_rshift:
|
||||
result = (type_is_signed(out_type)) ? nir_ishr(&b, srcs[0], srcs[1])
|
||||
: nir_ushr(&b, srcs[0], srcs[1]);
|
||||
result = (out_type == GLSL_TYPE_INT) ? nir_ishr(&b, srcs[0], srcs[1])
|
||||
: nir_ushr(&b, srcs[0], srcs[1]);
|
||||
break;
|
||||
case ir_binop_imul_high:
|
||||
result = (out_type == GLSL_TYPE_INT) ? nir_imul_high(&b, srcs[0], srcs[1])
|
||||
@@ -1739,7 +1682,7 @@ nir_visitor::visit(ir_expression *ir)
|
||||
if (supports_ints) {
|
||||
if (type_is_float(types[0]))
|
||||
result = nir_flt(&b, srcs[0], srcs[1]);
|
||||
else if (type_is_signed(types[0]))
|
||||
else if (types[0] == GLSL_TYPE_INT)
|
||||
result = nir_ilt(&b, srcs[0], srcs[1]);
|
||||
else
|
||||
result = nir_ult(&b, srcs[0], srcs[1]);
|
||||
@@ -1751,7 +1694,7 @@ nir_visitor::visit(ir_expression *ir)
|
||||
if (supports_ints) {
|
||||
if (type_is_float(types[0]))
|
||||
result = nir_flt(&b, srcs[1], srcs[0]);
|
||||
else if (type_is_signed(types[0]))
|
||||
else if (types[0] == GLSL_TYPE_INT)
|
||||
result = nir_ilt(&b, srcs[1], srcs[0]);
|
||||
else
|
||||
result = nir_ult(&b, srcs[1], srcs[0]);
|
||||
@@ -1763,7 +1706,7 @@ nir_visitor::visit(ir_expression *ir)
|
||||
if (supports_ints) {
|
||||
if (type_is_float(types[0]))
|
||||
result = nir_fge(&b, srcs[1], srcs[0]);
|
||||
else if (type_is_signed(types[0]))
|
||||
else if (types[0] == GLSL_TYPE_INT)
|
||||
result = nir_ige(&b, srcs[1], srcs[0]);
|
||||
else
|
||||
result = nir_uge(&b, srcs[1], srcs[0]);
|
||||
@@ -1775,7 +1718,7 @@ nir_visitor::visit(ir_expression *ir)
|
||||
if (supports_ints) {
|
||||
if (type_is_float(types[0]))
|
||||
result = nir_fge(&b, srcs[0], srcs[1]);
|
||||
else if (type_is_signed(types[0]))
|
||||
else if (types[0] == GLSL_TYPE_INT)
|
||||
result = nir_ige(&b, srcs[0], srcs[1]);
|
||||
else
|
||||
result = nir_uge(&b, srcs[0], srcs[1]);
|
||||
|
@@ -1,121 +0,0 @@
|
||||
/* Compile with:
|
||||
*
|
||||
* glsl_compiler --version 140 --dump-builder int64.glsl > builtin_int64.h
|
||||
*
|
||||
* Using version 1.40+ prevents built-in variables from being included.
|
||||
*/
|
||||
#version 400
|
||||
#extension GL_ARB_gpu_shader_int64: require
|
||||
#extension GL_ARB_shading_language_420pack: require
|
||||
|
||||
uvec2
|
||||
umul64(uvec2 a, uvec2 b)
|
||||
{
|
||||
uvec2 result;
|
||||
|
||||
umulExtended(a.x, b.x, result.y, result.x);
|
||||
result.y += a.x * b.y + a.y * b.x;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
ivec2
|
||||
sign64(ivec2 a)
|
||||
{
|
||||
ivec2 result;
|
||||
|
||||
result.y = a.y >> 31;
|
||||
result.x = result.y | int((a.x | a.y) != 0);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
uvec4
|
||||
udivmod64(uvec2 n, uvec2 d)
|
||||
{
|
||||
uvec2 quot = uvec2(0U, 0U);
|
||||
int log2_denom = findMSB(d.y) + 32;
|
||||
|
||||
/* If the upper 32 bits of denom are non-zero, it is impossible for shifts
|
||||
* greater than 32 bits to occur. If the upper 32 bits of the numerator
|
||||
* are zero, it is impossible for (denom << [63, 32]) <= numer unless
|
||||
* denom == 0.
|
||||
*/
|
||||
if (d.y == 0 && n.y >= d.x) {
|
||||
log2_denom = findMSB(d.x);
|
||||
|
||||
/* Since the upper 32 bits of denom are zero, log2_denom <= 31 and we
|
||||
* don't have to compare log2_denom inside the loop as is done in the
|
||||
* general case (below).
|
||||
*/
|
||||
for (int i = 31; i >= 1; i--) {
|
||||
if (log2_denom <= 31 - i && (d.x << i) <= n.y) {
|
||||
n.y -= d.x << i;
|
||||
quot.y |= 1U << i;
|
||||
}
|
||||
}
|
||||
|
||||
/* log2_denom is always <= 31, so manually peel the last loop
|
||||
* iteration.
|
||||
*/
|
||||
if (d.x <= n.y) {
|
||||
n.y -= d.x;
|
||||
quot.y |= 1U;
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t d64 = packUint2x32(d);
|
||||
uint64_t n64 = packUint2x32(n);
|
||||
for (int i = 31; i >= 1; i--) {
|
||||
if (log2_denom <= 63 - i && (d64 << i) <= n64) {
|
||||
n64 -= d64 << i;
|
||||
quot.x |= 1U << i;
|
||||
}
|
||||
}
|
||||
|
||||
/* log2_denom is always <= 63, so manually peel the last loop
|
||||
* iteration.
|
||||
*/
|
||||
if (d64 <= n64) {
|
||||
n64 -= d64;
|
||||
quot.x |= 1U;
|
||||
}
|
||||
|
||||
return uvec4(quot, unpackUint2x32(n64));
|
||||
}
|
||||
|
||||
uvec2
|
||||
udiv64(uvec2 n, uvec2 d)
|
||||
{
|
||||
return udivmod64(n, d).xy;
|
||||
}
|
||||
|
||||
ivec2
|
||||
idiv64(ivec2 _n, ivec2 _d)
|
||||
{
|
||||
const bool negate = (_n.y < 0) != (_d.y < 0);
|
||||
uvec2 n = unpackUint2x32(uint64_t(abs(packInt2x32(_n))));
|
||||
uvec2 d = unpackUint2x32(uint64_t(abs(packInt2x32(_d))));
|
||||
|
||||
uvec2 quot = udivmod64(n, d).xy;
|
||||
|
||||
return negate ? unpackInt2x32(-int64_t(packUint2x32(quot))) : ivec2(quot);
|
||||
}
|
||||
|
||||
uvec2
|
||||
umod64(uvec2 n, uvec2 d)
|
||||
{
|
||||
return udivmod64(n, d).zw;
|
||||
}
|
||||
|
||||
ivec2
|
||||
imod64(ivec2 _n, ivec2 _d)
|
||||
{
|
||||
const bool negate = (_n.y < 0) != (_d.y < 0);
|
||||
uvec2 n = unpackUint2x32(uint64_t(abs(packInt2x32(_n))));
|
||||
uvec2 d = unpackUint2x32(uint64_t(abs(packInt2x32(_d))));
|
||||
|
||||
uvec2 rem = udivmod64(n, d).zy;
|
||||
|
||||
return negate ? unpackInt2x32(-int64_t(packUint2x32(rem))) : ivec2(rem);
|
||||
}
|
@@ -261,8 +261,6 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
|
||||
case ir_unop_find_msb:
|
||||
case ir_unop_find_lsb:
|
||||
case ir_unop_subroutine_to_int:
|
||||
case ir_unop_i642i:
|
||||
case ir_unop_u642i:
|
||||
this->type = glsl_type::get_instance(GLSL_TYPE_INT,
|
||||
op0->type->vector_elements, 1);
|
||||
break;
|
||||
@@ -273,8 +271,6 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
|
||||
case ir_unop_d2f:
|
||||
case ir_unop_bitcast_i2f:
|
||||
case ir_unop_bitcast_u2f:
|
||||
case ir_unop_i642f:
|
||||
case ir_unop_u642f:
|
||||
this->type = glsl_type::get_instance(GLSL_TYPE_FLOAT,
|
||||
op0->type->vector_elements, 1);
|
||||
break;
|
||||
@@ -282,7 +278,6 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
|
||||
case ir_unop_f2b:
|
||||
case ir_unop_i2b:
|
||||
case ir_unop_d2b:
|
||||
case ir_unop_i642b:
|
||||
this->type = glsl_type::get_instance(GLSL_TYPE_BOOL,
|
||||
op0->type->vector_elements, 1);
|
||||
break;
|
||||
@@ -290,8 +285,6 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
|
||||
case ir_unop_f2d:
|
||||
case ir_unop_i2d:
|
||||
case ir_unop_u2d:
|
||||
case ir_unop_i642d:
|
||||
case ir_unop_u642d:
|
||||
this->type = glsl_type::get_instance(GLSL_TYPE_DOUBLE,
|
||||
op0->type->vector_elements, 1);
|
||||
break;
|
||||
@@ -300,43 +293,18 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
|
||||
case ir_unop_f2u:
|
||||
case ir_unop_d2u:
|
||||
case ir_unop_bitcast_f2u:
|
||||
case ir_unop_i642u:
|
||||
case ir_unop_u642u:
|
||||
this->type = glsl_type::get_instance(GLSL_TYPE_UINT,
|
||||
op0->type->vector_elements, 1);
|
||||
break;
|
||||
|
||||
case ir_unop_i2i64:
|
||||
case ir_unop_u2i64:
|
||||
case ir_unop_b2i64:
|
||||
case ir_unop_f2i64:
|
||||
case ir_unop_d2i64:
|
||||
case ir_unop_u642i64:
|
||||
this->type = glsl_type::get_instance(GLSL_TYPE_INT64,
|
||||
op0->type->vector_elements, 1);
|
||||
break;
|
||||
|
||||
case ir_unop_i2u64:
|
||||
case ir_unop_u2u64:
|
||||
case ir_unop_f2u64:
|
||||
case ir_unop_d2u64:
|
||||
case ir_unop_i642u64:
|
||||
this->type = glsl_type::get_instance(GLSL_TYPE_UINT64,
|
||||
op0->type->vector_elements, 1);
|
||||
break;
|
||||
case ir_unop_noise:
|
||||
this->type = glsl_type::float_type;
|
||||
break;
|
||||
|
||||
case ir_unop_unpack_double_2x32:
|
||||
case ir_unop_unpack_uint_2x32:
|
||||
this->type = glsl_type::uvec2_type;
|
||||
break;
|
||||
|
||||
case ir_unop_unpack_int_2x32:
|
||||
this->type = glsl_type::ivec2_type;
|
||||
break;
|
||||
|
||||
case ir_unop_pack_snorm_2x16:
|
||||
case ir_unop_pack_snorm_4x8:
|
||||
case ir_unop_pack_unorm_2x16:
|
||||
@@ -349,14 +317,6 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
|
||||
this->type = glsl_type::double_type;
|
||||
break;
|
||||
|
||||
case ir_unop_pack_int_2x32:
|
||||
this->type = glsl_type::int64_t_type;
|
||||
break;
|
||||
|
||||
case ir_unop_pack_uint_2x32:
|
||||
this->type = glsl_type::uint64_t_type;
|
||||
break;
|
||||
|
||||
case ir_unop_unpack_snorm_2x16:
|
||||
case ir_unop_unpack_unorm_2x16:
|
||||
case ir_unop_unpack_half_2x16:
|
||||
@@ -387,21 +347,6 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
|
||||
this->type = glsl_type::bool_type;
|
||||
break;
|
||||
|
||||
case ir_unop_bitcast_i642d:
|
||||
case ir_unop_bitcast_u642d:
|
||||
this->type = glsl_type::get_instance(GLSL_TYPE_DOUBLE,
|
||||
op0->type->vector_elements, 1);
|
||||
break;
|
||||
|
||||
case ir_unop_bitcast_d2i64:
|
||||
this->type = glsl_type::get_instance(GLSL_TYPE_INT64,
|
||||
op0->type->vector_elements, 1);
|
||||
break;
|
||||
case ir_unop_bitcast_d2u64:
|
||||
this->type = glsl_type::get_instance(GLSL_TYPE_UINT64,
|
||||
op0->type->vector_elements, 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
assert(!"not reached: missing automatic type setup for ir_expression");
|
||||
this->type = op0->type;
|
||||
@@ -668,32 +613,6 @@ ir_constant::ir_constant(int integer, unsigned vector_elements)
|
||||
}
|
||||
}
|
||||
|
||||
ir_constant::ir_constant(uint64_t u64, unsigned vector_elements)
|
||||
: ir_rvalue(ir_type_constant)
|
||||
{
|
||||
assert(vector_elements <= 4);
|
||||
this->type = glsl_type::get_instance(GLSL_TYPE_UINT64, vector_elements, 1);
|
||||
for (unsigned i = 0; i < vector_elements; i++) {
|
||||
this->value.u64[i] = u64;
|
||||
}
|
||||
for (unsigned i = vector_elements; i < 16; i++) {
|
||||
this->value.u64[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
ir_constant::ir_constant(int64_t int64, unsigned vector_elements)
|
||||
: ir_rvalue(ir_type_constant)
|
||||
{
|
||||
assert(vector_elements <= 4);
|
||||
this->type = glsl_type::get_instance(GLSL_TYPE_INT64, vector_elements, 1);
|
||||
for (unsigned i = 0; i < vector_elements; i++) {
|
||||
this->value.i64[i] = int64;
|
||||
}
|
||||
for (unsigned i = vector_elements; i < 16; i++) {
|
||||
this->value.i64[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
ir_constant::ir_constant(bool b, unsigned vector_elements)
|
||||
: ir_rvalue(ir_type_constant)
|
||||
{
|
||||
@@ -797,11 +716,6 @@ ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list)
|
||||
for (unsigned i = 0; i < type->components(); i++)
|
||||
this->value.d[i] = value->value.d[0];
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
case GLSL_TYPE_INT64:
|
||||
for (unsigned i = 0; i < type->components(); i++)
|
||||
this->value.u64[i] = value->value.u64[0];
|
||||
break;
|
||||
case GLSL_TYPE_BOOL:
|
||||
for (unsigned i = 0; i < type->components(); i++)
|
||||
this->value.b[i] = value->value.b[0];
|
||||
@@ -864,12 +778,6 @@ ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list)
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
this->value.d[i] = value->get_double_component(j);
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
this->value.u64[i] = value->get_uint64_component(j);
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
this->value.i64[i] = value->get_int64_component(j);
|
||||
break;
|
||||
default:
|
||||
/* FINISHME: What to do? Exceptions are not the answer.
|
||||
*/
|
||||
@@ -923,8 +831,6 @@ ir_constant::get_bool_component(unsigned i) const
|
||||
case GLSL_TYPE_FLOAT: return ((int)this->value.f[i]) != 0;
|
||||
case GLSL_TYPE_BOOL: return this->value.b[i];
|
||||
case GLSL_TYPE_DOUBLE: return this->value.d[i] != 0.0;
|
||||
case GLSL_TYPE_UINT64: return this->value.u64[i] != 0;
|
||||
case GLSL_TYPE_INT64: return this->value.i64[i] != 0;
|
||||
default: assert(!"Should not get here."); break;
|
||||
}
|
||||
|
||||
@@ -943,8 +849,6 @@ ir_constant::get_float_component(unsigned i) const
|
||||
case GLSL_TYPE_FLOAT: return this->value.f[i];
|
||||
case GLSL_TYPE_BOOL: return this->value.b[i] ? 1.0f : 0.0f;
|
||||
case GLSL_TYPE_DOUBLE: return (float) this->value.d[i];
|
||||
case GLSL_TYPE_UINT64: return (float) this->value.u64[i];
|
||||
case GLSL_TYPE_INT64: return (float) this->value.i64[i];
|
||||
default: assert(!"Should not get here."); break;
|
||||
}
|
||||
|
||||
@@ -963,8 +867,6 @@ ir_constant::get_double_component(unsigned i) const
|
||||
case GLSL_TYPE_FLOAT: return (double) this->value.f[i];
|
||||
case GLSL_TYPE_BOOL: return this->value.b[i] ? 1.0 : 0.0;
|
||||
case GLSL_TYPE_DOUBLE: return this->value.d[i];
|
||||
case GLSL_TYPE_UINT64: return (double) this->value.u64[i];
|
||||
case GLSL_TYPE_INT64: return (double) this->value.i64[i];
|
||||
default: assert(!"Should not get here."); break;
|
||||
}
|
||||
|
||||
@@ -983,8 +885,6 @@ ir_constant::get_int_component(unsigned i) const
|
||||
case GLSL_TYPE_FLOAT: return (int) this->value.f[i];
|
||||
case GLSL_TYPE_BOOL: return this->value.b[i] ? 1 : 0;
|
||||
case GLSL_TYPE_DOUBLE: return (int) this->value.d[i];
|
||||
case GLSL_TYPE_UINT64: return (int) this->value.u64[i];
|
||||
case GLSL_TYPE_INT64: return (int) this->value.i64[i];
|
||||
default: assert(!"Should not get here."); break;
|
||||
}
|
||||
|
||||
@@ -1003,48 +903,6 @@ ir_constant::get_uint_component(unsigned i) const
|
||||
case GLSL_TYPE_FLOAT: return (unsigned) this->value.f[i];
|
||||
case GLSL_TYPE_BOOL: return this->value.b[i] ? 1 : 0;
|
||||
case GLSL_TYPE_DOUBLE: return (unsigned) this->value.d[i];
|
||||
case GLSL_TYPE_UINT64: return (unsigned) this->value.u64[i];
|
||||
case GLSL_TYPE_INT64: return (unsigned) this->value.i64[i];
|
||||
default: assert(!"Should not get here."); break;
|
||||
}
|
||||
|
||||
/* Must return something to make the compiler happy. This is clearly an
|
||||
* error case.
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
int64_t
|
||||
ir_constant::get_int64_component(unsigned i) const
|
||||
{
|
||||
switch (this->type->base_type) {
|
||||
case GLSL_TYPE_UINT: return this->value.u[i];
|
||||
case GLSL_TYPE_INT: return this->value.i[i];
|
||||
case GLSL_TYPE_FLOAT: return (int64_t) this->value.f[i];
|
||||
case GLSL_TYPE_BOOL: return this->value.b[i] ? 1 : 0;
|
||||
case GLSL_TYPE_DOUBLE: return (int64_t) this->value.d[i];
|
||||
case GLSL_TYPE_UINT64: return (int64_t) this->value.u64[i];
|
||||
case GLSL_TYPE_INT64: return this->value.i64[i];
|
||||
default: assert(!"Should not get here."); break;
|
||||
}
|
||||
|
||||
/* Must return something to make the compiler happy. This is clearly an
|
||||
* error case.
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64_t
|
||||
ir_constant::get_uint64_component(unsigned i) const
|
||||
{
|
||||
switch (this->type->base_type) {
|
||||
case GLSL_TYPE_UINT: return this->value.u[i];
|
||||
case GLSL_TYPE_INT: return this->value.i[i];
|
||||
case GLSL_TYPE_FLOAT: return (uint64_t) this->value.f[i];
|
||||
case GLSL_TYPE_BOOL: return this->value.b[i] ? 1 : 0;
|
||||
case GLSL_TYPE_DOUBLE: return (uint64_t) this->value.d[i];
|
||||
case GLSL_TYPE_UINT64: return this->value.u64[i];
|
||||
case GLSL_TYPE_INT64: return (uint64_t) this->value.i64[i];
|
||||
default: assert(!"Should not get here."); break;
|
||||
}
|
||||
|
||||
@@ -1110,8 +968,6 @@ ir_constant::copy_offset(ir_constant *src, int offset)
|
||||
case GLSL_TYPE_INT:
|
||||
case GLSL_TYPE_FLOAT:
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
case GLSL_TYPE_UINT64:
|
||||
case GLSL_TYPE_INT64:
|
||||
case GLSL_TYPE_BOOL: {
|
||||
unsigned int size = src->type->components();
|
||||
assert (size <= this->type->components() - offset);
|
||||
@@ -1132,12 +988,6 @@ ir_constant::copy_offset(ir_constant *src, int offset)
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
value.d[i+offset] = src->get_double_component(i);
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
value.u64[i+offset] = src->get_uint64_component(i);
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
value.i64[i+offset] = src->get_int64_component(i);
|
||||
break;
|
||||
default: // Shut up the compiler
|
||||
break;
|
||||
}
|
||||
@@ -1197,12 +1047,6 @@ ir_constant::copy_masked_offset(ir_constant *src, int offset, unsigned int mask)
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
value.d[i+offset] = src->get_double_component(id++);
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
value.u64[i+offset] = src->get_uint64_component(id++);
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
value.i64[i+offset] = src->get_int64_component(id++);
|
||||
break;
|
||||
default:
|
||||
assert(!"Should not get here.");
|
||||
return;
|
||||
@@ -1267,14 +1111,6 @@ ir_constant::has_value(const ir_constant *c) const
|
||||
if (this->value.d[i] != c->value.d[i])
|
||||
return false;
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
if (this->value.u64[i] != c->value.u64[i])
|
||||
return false;
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
if (this->value.i64[i] != c->value.i64[i])
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
assert(!"Should not get here.");
|
||||
return false;
|
||||
@@ -1316,14 +1152,6 @@ ir_constant::is_value(float f, int i) const
|
||||
if (this->value.d[c] != double(f))
|
||||
return false;
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
if (this->value.u64[c] != uint64_t(i))
|
||||
return false;
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
if (this->value.i64[c] != i)
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
/* The only other base types are structures, arrays, and samplers.
|
||||
* Samplers cannot be constants, and the others should have been
|
||||
|
@@ -2093,8 +2093,6 @@ union ir_constant_data {
|
||||
float f[16];
|
||||
bool b[16];
|
||||
double d[16];
|
||||
uint64_t u64[16];
|
||||
int64_t i64[16];
|
||||
};
|
||||
|
||||
|
||||
@@ -2106,8 +2104,6 @@ public:
|
||||
ir_constant(int i, unsigned vector_elements=1);
|
||||
ir_constant(float f, unsigned vector_elements=1);
|
||||
ir_constant(double d, unsigned vector_elements=1);
|
||||
ir_constant(uint64_t u64, unsigned vector_elements=1);
|
||||
ir_constant(int64_t i64, unsigned vector_elements=1);
|
||||
|
||||
/**
|
||||
* Construct an ir_constant from a list of ir_constant values
|
||||
@@ -2158,8 +2154,6 @@ public:
|
||||
double get_double_component(unsigned i) const;
|
||||
int get_int_component(unsigned i) const;
|
||||
unsigned get_uint_component(unsigned i) const;
|
||||
int64_t get_int64_component(unsigned i) const;
|
||||
uint64_t get_uint64_component(unsigned i) const;
|
||||
/*@}*/
|
||||
|
||||
ir_constant *get_array_element(unsigned i) const;
|
||||
@@ -2383,6 +2377,25 @@ extern void
|
||||
_mesa_glsl_initialize_derived_variables(struct gl_context *ctx,
|
||||
gl_shader *shader);
|
||||
|
||||
extern void
|
||||
_mesa_glsl_initialize_builtin_functions();
|
||||
|
||||
extern ir_function_signature *
|
||||
_mesa_glsl_find_builtin_function(_mesa_glsl_parse_state *state,
|
||||
const char *name, exec_list *actual_parameters);
|
||||
|
||||
extern ir_function *
|
||||
_mesa_glsl_find_builtin_function_by_name(const char *name);
|
||||
|
||||
extern gl_shader *
|
||||
_mesa_glsl_get_builtin_function_shader(void);
|
||||
|
||||
extern ir_function_signature *
|
||||
_mesa_get_main_function_signature(glsl_symbol_table *symbols);
|
||||
|
||||
extern void
|
||||
_mesa_glsl_release_builtin_functions(void);
|
||||
|
||||
extern void
|
||||
reparent_ir(exec_list *list, void *mem_ctx);
|
||||
|
||||
|
@@ -518,30 +518,6 @@ b2f(operand a)
|
||||
return expr(ir_unop_b2f, a);
|
||||
}
|
||||
|
||||
ir_expression*
|
||||
bitcast_d2i64(operand a)
|
||||
{
|
||||
return expr(ir_unop_bitcast_d2i64, a);
|
||||
}
|
||||
|
||||
ir_expression*
|
||||
bitcast_d2u64(operand a)
|
||||
{
|
||||
return expr(ir_unop_bitcast_d2u64, a);
|
||||
}
|
||||
|
||||
ir_expression*
|
||||
bitcast_i642d(operand a)
|
||||
{
|
||||
return expr(ir_unop_bitcast_i642d, a);
|
||||
}
|
||||
|
||||
ir_expression*
|
||||
bitcast_u642d(operand a)
|
||||
{
|
||||
return expr(ir_unop_bitcast_u642d, a);
|
||||
}
|
||||
|
||||
ir_expression *
|
||||
interpolate_at_centroid(operand a)
|
||||
{
|
||||
|
@@ -191,12 +191,6 @@ ir_expression *f2d(operand a);
|
||||
ir_expression *i2d(operand a);
|
||||
ir_expression *u2d(operand a);
|
||||
|
||||
ir_expression *bitcast_d2i64(operand a);
|
||||
ir_expression *bitcast_d2u64(operand a);
|
||||
|
||||
ir_expression *bitcast_i642d(operand a);
|
||||
ir_expression *bitcast_u642d(operand a);
|
||||
|
||||
ir_expression *min2(operand a, operand b);
|
||||
ir_expression *max2(operand a, operand b);
|
||||
|
||||
|
@@ -396,24 +396,13 @@ ir_builder_print_visitor::visit(ir_constant *ir)
|
||||
|
||||
memcpy(&v, &ir->value.d[i], sizeof(v));
|
||||
if (v != 0)
|
||||
/* FIXME: This won't actually work until ARB_gpu_shader_int64
|
||||
* support lands.
|
||||
*/
|
||||
print_without_indent("r%04X_data.u64[%u] = 0x%016" PRIx64 "; /* %g */\n",
|
||||
my_index, i, v, ir->value.d[i]);
|
||||
break;
|
||||
}
|
||||
case GLSL_TYPE_UINT64:
|
||||
if (ir->value.u64[i] != 0)
|
||||
print_without_indent("r%04X_data.u64[%u] = %" PRIu64 ";\n",
|
||||
my_index,
|
||||
i,
|
||||
ir->value.u64[i]);
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
if (ir->value.i64[i] != 0)
|
||||
print_without_indent("r%04X_data.i64[%u] = %" PRId64 ";\n",
|
||||
my_index,
|
||||
i,
|
||||
ir->value.i64[i]);
|
||||
break;
|
||||
case GLSL_TYPE_BOOL:
|
||||
if (ir->value.u[i] != 0)
|
||||
print_without_indent("r%04X_data.u[%u] = 1;\n", my_index, i);
|
||||
|
@@ -337,8 +337,6 @@ ir_constant::clone(void *mem_ctx, struct hash_table *ht) const
|
||||
case GLSL_TYPE_FLOAT:
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
case GLSL_TYPE_BOOL:
|
||||
case GLSL_TYPE_UINT64:
|
||||
case GLSL_TYPE_INT64:
|
||||
return new(mem_ctx) ir_constant(this->type, &this->value);
|
||||
|
||||
case GLSL_TYPE_STRUCT: {
|
||||
|
@@ -88,42 +88,6 @@ bitcast_f2u(float f)
|
||||
return u;
|
||||
}
|
||||
|
||||
static double
|
||||
bitcast_u642d(uint64_t u)
|
||||
{
|
||||
assert(sizeof(double) == sizeof(uint64_t));
|
||||
double d;
|
||||
memcpy(&d, &u, sizeof(d));
|
||||
return d;
|
||||
}
|
||||
|
||||
static double
|
||||
bitcast_i642d(int64_t i)
|
||||
{
|
||||
assert(sizeof(double) == sizeof(int64_t));
|
||||
double d;
|
||||
memcpy(&d, &i, sizeof(d));
|
||||
return d;
|
||||
}
|
||||
|
||||
static double
|
||||
bitcast_d2u64(double d)
|
||||
{
|
||||
assert(sizeof(double) == sizeof(uint64_t));
|
||||
uint64_t u;
|
||||
memcpy(&u, &d, sizeof(d));
|
||||
return u;
|
||||
}
|
||||
|
||||
static double
|
||||
bitcast_d2i64(double d)
|
||||
{
|
||||
assert(sizeof(double) == sizeof(int64_t));
|
||||
int64_t i;
|
||||
memcpy(&i, &d, sizeof(d));
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluate one component of a floating-point 4x8 unpacking function.
|
||||
*/
|
||||
|
@@ -80,16 +80,14 @@ class type_signature_iter(object):
|
||||
|
||||
uint_type = type("unsigned", "u", "GLSL_TYPE_UINT")
|
||||
int_type = type("int", "i", "GLSL_TYPE_INT")
|
||||
uint64_type = type("uint64_t", "u64", "GLSL_TYPE_UINT64")
|
||||
int64_type = type("int64_t", "i64", "GLSL_TYPE_INT64")
|
||||
float_type = type("float", "f", "GLSL_TYPE_FLOAT")
|
||||
double_type = type("double", "d", "GLSL_TYPE_DOUBLE")
|
||||
bool_type = type("bool", "b", "GLSL_TYPE_BOOL")
|
||||
|
||||
all_types = (uint_type, int_type, float_type, double_type, uint64_type, int64_type, bool_type)
|
||||
numeric_types = (uint_type, int_type, float_type, double_type, uint64_type, int64_type)
|
||||
signed_numeric_types = (int_type, float_type, double_type, int64_type)
|
||||
integer_types = (uint_type, int_type, uint64_type, int64_type)
|
||||
all_types = (uint_type, int_type, float_type, double_type, bool_type)
|
||||
numeric_types = (uint_type, int_type, float_type, double_type)
|
||||
signed_numeric_types = (int_type, float_type, double_type)
|
||||
integer_types = (uint_type, int_type)
|
||||
real_types = (float_type, double_type)
|
||||
|
||||
# This template is for operations that can have operands of a several
|
||||
@@ -420,8 +418,8 @@ ir_expression_operation = [
|
||||
operation("bit_not", 1, printable_name="~", source_types=integer_types, c_expression="~ {src0}"),
|
||||
operation("logic_not", 1, printable_name="!", source_types=(bool_type,), c_expression="!{src0}"),
|
||||
operation("neg", 1, source_types=numeric_types, c_expression={'u': "-((int) {src0})", 'default': "-{src0}"}),
|
||||
operation("abs", 1, source_types=signed_numeric_types, c_expression={'i': "{src0} < 0 ? -{src0} : {src0}", 'f': "fabsf({src0})", 'd': "fabs({src0})", 'i64': "{src0} < 0 ? -{src0} : {src0}"}),
|
||||
operation("sign", 1, source_types=signed_numeric_types, c_expression={'i': "({src0} > 0) - ({src0} < 0)", 'f': "float(({src0} > 0.0F) - ({src0} < 0.0F))", 'd': "double(({src0} > 0.0) - ({src0} < 0.0))", 'i64': "({src0} > 0) - ({src0} < 0)"}),
|
||||
operation("abs", 1, source_types=signed_numeric_types, c_expression={'i': "{src0} < 0 ? -{src0} : {src0}", 'f': "fabsf({src0})", 'd': "fabs({src0})"}),
|
||||
operation("sign", 1, source_types=signed_numeric_types, c_expression={'i': "({src0} > 0) - ({src0} < 0)", 'f': "float(({src0} > 0.0F) - ({src0} < 0.0F))", 'd': "double(({src0} > 0.0) - ({src0} < 0.0))"}),
|
||||
operation("rcp", 1, source_types=real_types, c_expression={'f': "{src0} != 0.0F ? 1.0F / {src0} : 0.0F", 'd': "{src0} != 0.0 ? 1.0 / {src0} : 0.0"}),
|
||||
operation("rsq", 1, source_types=real_types, c_expression={'f': "1.0F / sqrtf({src0})", 'd': "1.0 / sqrt({src0})"}),
|
||||
operation("sqrt", 1, source_types=real_types, c_expression={'f': "sqrtf({src0})", 'd': "sqrt({src0})"}),
|
||||
@@ -441,7 +439,7 @@ ir_expression_operation = [
|
||||
# Boolean-to-float conversion
|
||||
operation("b2f", 1, source_types=(bool_type,), dest_type=float_type, c_expression="{src0} ? 1.0F : 0.0F"),
|
||||
# int-to-boolean conversion
|
||||
operation("i2b", 1, source_types=(uint_type, int_type), dest_type=bool_type, c_expression="{src0} ? true : false"),
|
||||
operation("i2b", 1, source_types=integer_types, dest_type=bool_type, c_expression="{src0} ? true : false"),
|
||||
# Boolean-to-int conversion
|
||||
operation("b2i", 1, source_types=(bool_type,), dest_type=int_type, c_expression="{src0} ? 1 : 0"),
|
||||
# Unsigned-to-float conversion.
|
||||
@@ -472,37 +470,6 @@ ir_expression_operation = [
|
||||
operation("bitcast_u2f", 1, source_types=(uint_type,), dest_type=float_type, c_expression="bitcast_u2f({src0})"),
|
||||
# 'Bit-identical float-to-uint "conversion"
|
||||
operation("bitcast_f2u", 1, source_types=(float_type,), dest_type=uint_type, c_expression="bitcast_f2u({src0})"),
|
||||
# Bit-identical u64-to-double "conversion"
|
||||
operation("bitcast_u642d", 1, source_types=(uint64_type,), dest_type=double_type, c_expression="bitcast_u642d({src0})"),
|
||||
# Bit-identical i64-to-double "conversion"
|
||||
operation("bitcast_i642d", 1, source_types=(int64_type,), dest_type=double_type, c_expression="bitcast_i642d({src0})"),
|
||||
# Bit-identical double-to_u64 "conversion"
|
||||
operation("bitcast_d2u64", 1, source_types=(double_type,), dest_type=uint64_type, c_expression="bitcast_d2u64({src0})"),
|
||||
# Bit-identical double-to-i64 "conversion"
|
||||
operation("bitcast_d2i64", 1, source_types=(double_type,), dest_type=int64_type, c_expression="bitcast_d2i64({src0})"),
|
||||
# i64-to-i32 conversion
|
||||
operation("i642i", 1, source_types=(int64_type,), dest_type=int_type, c_expression="{src0}"),
|
||||
# ui64-to-i32 conversion
|
||||
operation("u642i", 1, source_types=(uint64_type,), dest_type=int_type, c_expression="{src0}"),
|
||||
operation("i642u", 1, source_types=(int64_type,), dest_type=uint_type, c_expression="{src0}"),
|
||||
operation("u642u", 1, source_types=(uint64_type,), dest_type=uint_type, c_expression="{src0}"),
|
||||
operation("i642b", 1, source_types=(int64_type,), dest_type=bool_type, c_expression="{src0} != 0"),
|
||||
operation("i642f", 1, source_types=(int64_type,), dest_type=float_type, c_expression="{src0}"),
|
||||
operation("u642f", 1, source_types=(uint64_type,), dest_type=float_type, c_expression="{src0}"),
|
||||
operation("i642d", 1, source_types=(int64_type,), dest_type=double_type, c_expression="{src0}"),
|
||||
operation("u642d", 1, source_types=(uint64_type,), dest_type=double_type, c_expression="{src0}"),
|
||||
operation("i2i64", 1, source_types=(int_type,), dest_type=int64_type, c_expression="{src0}"),
|
||||
operation("u2i64", 1, source_types=(uint_type,), dest_type=int64_type, c_expression="{src0}"),
|
||||
operation("b2i64", 1, source_types=(bool_type,), dest_type=int64_type, c_expression="{src0}"),
|
||||
operation("f2i64", 1, source_types=(float_type,), dest_type=int64_type, c_expression="{src0}"),
|
||||
operation("d2i64", 1, source_types=(double_type,), dest_type=int64_type, c_expression="{src0}"),
|
||||
operation("i2u64", 1, source_types=(int_type,), dest_type=uint64_type, c_expression="{src0}"),
|
||||
operation("u2u64", 1, source_types=(uint_type,), dest_type=uint64_type, c_expression="{src0}"),
|
||||
operation("f2u64", 1, source_types=(float_type,), dest_type=uint64_type, c_expression="{src0}"),
|
||||
operation("d2u64", 1, source_types=(double_type,), dest_type=uint64_type, c_expression="{src0}"),
|
||||
operation("u642i64", 1, source_types=(uint64_type,), dest_type=int64_type, c_expression="{src0}"),
|
||||
operation("i642u64", 1, source_types=(int64_type,), dest_type=uint64_type, c_expression="{src0}"),
|
||||
|
||||
|
||||
# Unary floating-point rounding operations.
|
||||
operation("trunc", 1, source_types=real_types, c_expression={'f': "truncf({src0})", 'd': "trunc({src0})"}),
|
||||
@@ -536,10 +503,10 @@ ir_expression_operation = [
|
||||
operation("unpack_half_2x16", 1, printable_name="unpackHalf2x16", source_types=(uint_type,), dest_type=float_type, c_expression="unpack_2x16(unpack_half_1x16, op[0]->value.u[0], &data.f[0], &data.f[1])", flags=frozenset((horizontal_operation, non_assign_operation))),
|
||||
|
||||
# Bit operations, part of ARB_gpu_shader5.
|
||||
operation("bitfield_reverse", 1, source_types=(uint_type, int_type), c_expression="bitfield_reverse({src0})"),
|
||||
operation("bit_count", 1, source_types=(uint_type, int_type), dest_type=int_type, c_expression="_mesa_bitcount({src0})"),
|
||||
operation("find_msb", 1, source_types=(uint_type, int_type), dest_type=int_type, c_expression={'u': "find_msb_uint({src0})", 'i': "find_msb_int({src0})"}),
|
||||
operation("find_lsb", 1, source_types=(uint_type, int_type), dest_type=int_type, c_expression="find_msb_uint({src0} & -{src0})"),
|
||||
operation("bitfield_reverse", 1, source_types=integer_types, c_expression="bitfield_reverse({src0})"),
|
||||
operation("bit_count", 1, source_types=integer_types, dest_type=int_type, c_expression="_mesa_bitcount({src0})"),
|
||||
operation("find_msb", 1, source_types=integer_types, dest_type=int_type, c_expression={'u': "find_msb_uint({src0})", 'i': "find_msb_int({src0})"}),
|
||||
operation("find_lsb", 1, source_types=integer_types, dest_type=int_type, c_expression="find_msb_uint({src0} & -{src0})"),
|
||||
|
||||
operation("saturate", 1, printable_name="sat", source_types=(float_type,), c_expression="CLAMP({src0}, 0.0f, 1.0f)"),
|
||||
|
||||
@@ -576,18 +543,12 @@ ir_expression_operation = [
|
||||
operation("vote_all", 1),
|
||||
operation("vote_eq", 1),
|
||||
|
||||
# 64-bit integer packing ops.
|
||||
operation("pack_int_2x32", 1, printable_name="packInt2x32", source_types=(int_type,), dest_type=int64_type, c_expression="memcpy(&data.i64[0], &op[0]->value.i[0], sizeof(int64_t))", flags=frozenset((horizontal_operation, non_assign_operation))),
|
||||
operation("pack_uint_2x32", 1, printable_name="packUint2x32", source_types=(uint_type,), dest_type=uint64_type, c_expression="memcpy(&data.u64[0], &op[0]->value.u[0], sizeof(uint64_t))", flags=frozenset((horizontal_operation, non_assign_operation))),
|
||||
operation("unpack_int_2x32", 1, printable_name="unpackInt2x32", source_types=(int64_type,), dest_type=int_type, c_expression="memcpy(&data.i[0], &op[0]->value.i64[0], sizeof(int64_t))", flags=frozenset((horizontal_operation, non_assign_operation))),
|
||||
operation("unpack_uint_2x32", 1, printable_name="unpackUint2x32", source_types=(uint64_type,), dest_type=uint_type, c_expression="memcpy(&data.u[0], &op[0]->value.u64[0], sizeof(uint64_t))", flags=frozenset((horizontal_operation, non_assign_operation))),
|
||||
|
||||
operation("add", 2, printable_name="+", source_types=numeric_types, c_expression="{src0} + {src1}", flags=vector_scalar_operation),
|
||||
operation("sub", 2, printable_name="-", source_types=numeric_types, c_expression="{src0} - {src1}", flags=vector_scalar_operation),
|
||||
# "Floating-point or low 32-bit integer multiply."
|
||||
operation("mul", 2, printable_name="*", source_types=numeric_types, c_expression="{src0} * {src1}"),
|
||||
operation("imul_high", 2), # Calculates the high 32-bits of a 64-bit multiply.
|
||||
operation("div", 2, printable_name="/", source_types=numeric_types, c_expression={'u': "{src1} == 0 ? 0 : {src0} / {src1}", 'i': "{src1} == 0 ? 0 : {src0} / {src1}", 'u64': "{src1} == 0 ? 0 : {src0} / {src1}", 'i64': "{src1} == 0 ? 0 : {src0} / {src1}", 'default': "{src0} / {src1}"}, flags=vector_scalar_operation),
|
||||
operation("div", 2, printable_name="/", source_types=numeric_types, c_expression={'u': "{src1} == 0 ? 0 : {src0} / {src1}", 'i': "{src1} == 0 ? 0 : {src0} / {src1}", 'default': "{src0} / {src1}"}, flags=vector_scalar_operation),
|
||||
|
||||
# Returns the carry resulting from the addition of the two arguments.
|
||||
operation("carry", 2),
|
||||
@@ -600,7 +561,7 @@ ir_expression_operation = [
|
||||
#
|
||||
# We don't use fmod because it rounds toward zero; GLSL specifies the use
|
||||
# of floor.
|
||||
operation("mod", 2, printable_name="%", source_types=numeric_types, c_expression={'u': "{src1} == 0 ? 0 : {src0} % {src1}", 'i': "{src1} == 0 ? 0 : {src0} % {src1}", 'f': "{src0} - {src1} * floorf({src0} / {src1})", 'd': "{src0} - {src1} * floor({src0} / {src1})", 'u64': "{src1} == 0 ? 0 : {src0} % {src1}", 'i64': "{src1} == 0 ? 0 : {src0} % {src1}"}, flags=vector_scalar_operation),
|
||||
operation("mod", 2, printable_name="%", source_types=numeric_types, c_expression={'u': "{src1} == 0 ? 0 : {src0} % {src1}", 'i': "{src1} == 0 ? 0 : {src0} % {src1}", 'f': "{src0} - {src1} * floorf({src0} / {src1})", 'd': "{src0} - {src1} * floor({src0} / {src1})"}, flags=vector_scalar_operation),
|
||||
|
||||
# Binary comparison operators which return a boolean vector.
|
||||
# The type of both operands must be equal.
|
||||
|
@@ -52,12 +52,6 @@
|
||||
#define DDIV_TO_MUL_RCP 0x100000
|
||||
#define DIV_TO_MUL_RCP (FDIV_TO_MUL_RCP | DDIV_TO_MUL_RCP)
|
||||
|
||||
/* Opertaions for lower_64bit_integer_instructions() */
|
||||
#define MUL64 (1U << 0)
|
||||
#define SIGN64 (1U << 1)
|
||||
#define DIV64 (1U << 2)
|
||||
#define MOD64 (1U << 3)
|
||||
|
||||
/**
|
||||
* \see class lower_packing_builtins_visitor
|
||||
*/
|
||||
@@ -170,6 +164,3 @@ void propagate_invariance(exec_list *instructions);
|
||||
ir_rvalue *
|
||||
compare_index_block(exec_list *instructions, ir_variable *index,
|
||||
unsigned base, unsigned components, void *mem_ctx);
|
||||
|
||||
bool lower_64bit_integer_instructions(exec_list *instructions,
|
||||
unsigned what_to_lower);
|
||||
|
@@ -21,8 +21,6 @@
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#define __STDC_FORMAT_MACROS 1
|
||||
#include <inttypes.h> /* for PRIx64 macro */
|
||||
#include "ir_print_visitor.h"
|
||||
#include "compiler/glsl_types.h"
|
||||
#include "glsl_parser_extras.h"
|
||||
@@ -478,8 +476,6 @@ void ir_print_visitor::visit(ir_constant *ir)
|
||||
else
|
||||
fprintf(f, "%f", ir->value.f[i]);
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:fprintf(f, "%" PRIu64, ir->value.u64[i]); break;
|
||||
case GLSL_TYPE_INT64: fprintf(f, "%" PRIi64, ir->value.i64[i]); break;
|
||||
case GLSL_TYPE_BOOL: fprintf(f, "%d", ir->value.b[i]); break;
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
if (ir->value.d[i] == 0.0)
|
||||
|
@@ -253,8 +253,7 @@ ir_validate::visit_leave(ir_expression *ir)
|
||||
case ir_unop_sign:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT ||
|
||||
ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT ||
|
||||
ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE ||
|
||||
ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
|
||||
ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
|
||||
assert(ir->type == ir->operands[0]->type);
|
||||
break;
|
||||
|
||||
@@ -332,102 +331,6 @@ ir_validate::visit_leave(ir_expression *ir)
|
||||
assert(ir->type->base_type == GLSL_TYPE_UINT);
|
||||
break;
|
||||
|
||||
case ir_unop_bitcast_u642d:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64);
|
||||
assert(ir->type->base_type == GLSL_TYPE_DOUBLE);
|
||||
break;
|
||||
case ir_unop_bitcast_i642d:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
|
||||
assert(ir->type->base_type == GLSL_TYPE_DOUBLE);
|
||||
break;
|
||||
case ir_unop_bitcast_d2u64:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
|
||||
assert(ir->type->base_type == GLSL_TYPE_UINT64);
|
||||
break;
|
||||
case ir_unop_bitcast_d2i64:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
|
||||
assert(ir->type->base_type == GLSL_TYPE_INT64);
|
||||
break;
|
||||
case ir_unop_i642i:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
|
||||
assert(ir->type->base_type == GLSL_TYPE_INT);
|
||||
break;
|
||||
case ir_unop_u642i:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64);
|
||||
assert(ir->type->base_type == GLSL_TYPE_INT);
|
||||
break;
|
||||
case ir_unop_i642u:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
|
||||
assert(ir->type->base_type == GLSL_TYPE_UINT);
|
||||
break;
|
||||
case ir_unop_u642u:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64);
|
||||
assert(ir->type->base_type == GLSL_TYPE_UINT);
|
||||
break;
|
||||
case ir_unop_i642b:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
|
||||
assert(ir->type->base_type == GLSL_TYPE_BOOL);
|
||||
break;
|
||||
case ir_unop_i642f:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
|
||||
assert(ir->type->base_type == GLSL_TYPE_FLOAT);
|
||||
break;
|
||||
case ir_unop_u642f:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64);
|
||||
assert(ir->type->base_type == GLSL_TYPE_FLOAT);
|
||||
break;
|
||||
case ir_unop_i642d:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
|
||||
assert(ir->type->base_type == GLSL_TYPE_DOUBLE);
|
||||
break;
|
||||
case ir_unop_u642d:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64);
|
||||
assert(ir->type->base_type == GLSL_TYPE_DOUBLE);
|
||||
break;
|
||||
case ir_unop_i2i64:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT);
|
||||
assert(ir->type->base_type == GLSL_TYPE_INT64);
|
||||
break;
|
||||
case ir_unop_u2i64:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT);
|
||||
assert(ir->type->base_type == GLSL_TYPE_INT64);
|
||||
break;
|
||||
case ir_unop_b2i64:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_BOOL);
|
||||
assert(ir->type->base_type == GLSL_TYPE_INT64);
|
||||
break;
|
||||
case ir_unop_f2i64:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
|
||||
assert(ir->type->base_type == GLSL_TYPE_INT64);
|
||||
break;
|
||||
case ir_unop_d2i64:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
|
||||
assert(ir->type->base_type == GLSL_TYPE_INT64);
|
||||
break;
|
||||
case ir_unop_i2u64:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT);
|
||||
assert(ir->type->base_type == GLSL_TYPE_UINT64);
|
||||
break;
|
||||
case ir_unop_u2u64:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT);
|
||||
assert(ir->type->base_type == GLSL_TYPE_UINT64);
|
||||
break;
|
||||
case ir_unop_f2u64:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
|
||||
assert(ir->type->base_type == GLSL_TYPE_UINT64);
|
||||
break;
|
||||
case ir_unop_d2u64:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
|
||||
assert(ir->type->base_type == GLSL_TYPE_UINT64);
|
||||
break;
|
||||
case ir_unop_u642i64:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64);
|
||||
assert(ir->type->base_type == GLSL_TYPE_INT64);
|
||||
break;
|
||||
case ir_unop_i642u64:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
|
||||
assert(ir->type->base_type == GLSL_TYPE_UINT64);
|
||||
break;
|
||||
case ir_unop_trunc:
|
||||
case ir_unop_round_even:
|
||||
case ir_unop_ceil:
|
||||
@@ -467,16 +370,6 @@ ir_validate::visit_leave(ir_expression *ir)
|
||||
assert(ir->operands[0]->type == glsl_type::uvec2_type);
|
||||
break;
|
||||
|
||||
case ir_unop_pack_int_2x32:
|
||||
assert(ir->type == glsl_type::int64_t_type);
|
||||
assert(ir->operands[0]->type == glsl_type::ivec2_type);
|
||||
break;
|
||||
|
||||
case ir_unop_pack_uint_2x32:
|
||||
assert(ir->type == glsl_type::uint64_t_type);
|
||||
assert(ir->operands[0]->type == glsl_type::uvec2_type);
|
||||
break;
|
||||
|
||||
case ir_unop_unpack_snorm_2x16:
|
||||
case ir_unop_unpack_unorm_2x16:
|
||||
case ir_unop_unpack_half_2x16:
|
||||
@@ -495,16 +388,6 @@ ir_validate::visit_leave(ir_expression *ir)
|
||||
assert(ir->operands[0]->type == glsl_type::double_type);
|
||||
break;
|
||||
|
||||
case ir_unop_unpack_int_2x32:
|
||||
assert(ir->type == glsl_type::ivec2_type);
|
||||
assert(ir->operands[0]->type == glsl_type::int64_t_type);
|
||||
break;
|
||||
|
||||
case ir_unop_unpack_uint_2x32:
|
||||
assert(ir->type == glsl_type::uvec2_type);
|
||||
assert(ir->operands[0]->type == glsl_type::uint64_t_type);
|
||||
break;
|
||||
|
||||
case ir_unop_bitfield_reverse:
|
||||
assert(ir->operands[0]->type == ir->type);
|
||||
assert(ir->type->is_integer());
|
||||
@@ -654,7 +537,7 @@ ir_validate::visit_leave(ir_expression *ir)
|
||||
|
||||
case ir_binop_lshift:
|
||||
case ir_binop_rshift:
|
||||
assert(ir->operands[0]->type->is_integer_32_64() &&
|
||||
assert(ir->operands[0]->type->is_integer() &&
|
||||
ir->operands[1]->type->is_integer());
|
||||
if (ir->operands[0]->type->is_scalar()) {
|
||||
assert(ir->operands[1]->type->is_scalar());
|
||||
@@ -672,7 +555,7 @@ ir_validate::visit_leave(ir_expression *ir)
|
||||
case ir_binop_bit_or:
|
||||
assert(ir->operands[0]->type->base_type ==
|
||||
ir->operands[1]->type->base_type);
|
||||
assert(ir->type->is_integer_32_64());
|
||||
assert(ir->type->is_integer());
|
||||
if (ir->operands[0]->type->is_vector() &&
|
||||
ir->operands[1]->type->is_vector()) {
|
||||
assert(ir->operands[0]->type->vector_elements ==
|
||||
|
@@ -64,8 +64,6 @@ copy_constant_to_storage(union gl_constant_value *storage,
|
||||
storage[i].f = val->value.f[i];
|
||||
break;
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
case GLSL_TYPE_UINT64:
|
||||
case GLSL_TYPE_INT64:
|
||||
/* XXX need to check on big-endian */
|
||||
memcpy(&storage[i * 2].u, &val->value.d[i], sizeof(double));
|
||||
break;
|
||||
|
@@ -535,7 +535,7 @@ private:
|
||||
const char *str_end;
|
||||
while((str_start = strchr(name_copy, '[')) &&
|
||||
(str_end = strchr(name_copy, ']'))) {
|
||||
memmove(str_start, str_end + 1, 1 + strlen(str_end));
|
||||
memmove(str_start, str_end + 1, 1 + strlen(str_end + 1));
|
||||
}
|
||||
|
||||
unsigned index = 0;
|
||||
@@ -1042,10 +1042,12 @@ find_empty_block(struct gl_shader_program *prog,
|
||||
|
||||
static void
|
||||
link_setup_uniform_remap_tables(struct gl_context *ctx,
|
||||
struct gl_shader_program *prog)
|
||||
struct gl_shader_program *prog,
|
||||
unsigned num_explicit_uniform_locs)
|
||||
{
|
||||
unsigned total_entries = prog->NumExplicitUniformLocations;
|
||||
unsigned empty_locs = prog->NumUniformRemapTable - total_entries;
|
||||
unsigned total_entries = num_explicit_uniform_locs;
|
||||
unsigned empty_locs =
|
||||
prog->NumUniformRemapTable - num_explicit_uniform_locs;
|
||||
|
||||
/* Reserve all the explicit locations of the active uniforms. */
|
||||
for (unsigned i = 0; i < prog->data->NumUniformStorage; i++) {
|
||||
@@ -1204,7 +1206,8 @@ link_setup_uniform_remap_tables(struct gl_context *ctx,
|
||||
static void
|
||||
link_assign_uniform_storage(struct gl_context *ctx,
|
||||
struct gl_shader_program *prog,
|
||||
const unsigned num_data_slots)
|
||||
const unsigned num_data_slots,
|
||||
unsigned num_explicit_uniform_locs)
|
||||
{
|
||||
/* On the outside chance that there were no uniforms, bail out.
|
||||
*/
|
||||
@@ -1263,14 +1266,15 @@ link_assign_uniform_storage(struct gl_context *ctx,
|
||||
assert(parcel.values == data_end);
|
||||
#endif
|
||||
|
||||
link_setup_uniform_remap_tables(ctx, prog);
|
||||
link_setup_uniform_remap_tables(ctx, prog, num_explicit_uniform_locs);
|
||||
|
||||
link_set_uniform_initializers(prog, boolean_true);
|
||||
}
|
||||
|
||||
void
|
||||
link_assign_uniform_locations(struct gl_shader_program *prog,
|
||||
struct gl_context *ctx)
|
||||
struct gl_context *ctx,
|
||||
unsigned int num_explicit_uniform_locs)
|
||||
{
|
||||
ralloc_free(prog->data->UniformStorage);
|
||||
prog->data->UniformStorage = NULL;
|
||||
@@ -1331,5 +1335,6 @@ link_assign_uniform_locations(struct gl_shader_program *prog,
|
||||
hiddenUniforms->iterate(assign_hidden_uniform_slot_id, &uniform_size);
|
||||
delete hiddenUniforms;
|
||||
|
||||
link_assign_uniform_storage(ctx, prog, uniform_size.num_values);
|
||||
link_assign_uniform_storage(ctx, prog, uniform_size.num_values,
|
||||
num_explicit_uniform_locs);
|
||||
}
|
||||
|
@@ -106,9 +106,8 @@ create_xfb_varying_names(void *mem_ctx, const glsl_type *t, char **name,
|
||||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
bool
|
||||
process_xfb_layout_qualifiers(void *mem_ctx, const gl_linked_shader *sh,
|
||||
struct gl_shader_program *prog,
|
||||
unsigned *num_tfeedback_decls,
|
||||
char ***varying_names)
|
||||
{
|
||||
@@ -119,9 +118,8 @@ process_xfb_layout_qualifiers(void *mem_ctx, const gl_linked_shader *sh,
|
||||
* xfb_stride to interface block members so this will catch that case also.
|
||||
*/
|
||||
for (unsigned j = 0; j < MAX_FEEDBACK_BUFFERS; j++) {
|
||||
if (prog->TransformFeedback.BufferStride[j]) {
|
||||
if (sh->info.TransformFeedback.BufferStride[j]) {
|
||||
has_xfb_qualifiers = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -575,7 +573,7 @@ cross_validate_outputs_to_inputs(struct gl_shader_program *prog,
|
||||
* Demote shader inputs and outputs that are not used in other stages, and
|
||||
* remove them via dead code elimination.
|
||||
*/
|
||||
static void
|
||||
void
|
||||
remove_unused_shader_inputs_and_outputs(bool is_separate_shader_object,
|
||||
gl_linked_shader *sh,
|
||||
enum ir_variable_mode mode)
|
||||
@@ -745,12 +743,10 @@ tfeedback_decl::assign_location(struct gl_context *ctx,
|
||||
unsigned actual_array_size;
|
||||
switch (this->lowered_builtin_array_variable) {
|
||||
case clip_distance:
|
||||
actual_array_size = prog->last_vert_prog ?
|
||||
prog->last_vert_prog->info.clip_distance_array_size : 0;
|
||||
actual_array_size = prog->LastClipDistanceArraySize;
|
||||
break;
|
||||
case cull_distance:
|
||||
actual_array_size = prog->last_vert_prog ?
|
||||
prog->last_vert_prog->info.cull_distance_array_size : 0;
|
||||
actual_array_size = prog->LastCullDistanceArraySize;
|
||||
break;
|
||||
case tess_level_outer:
|
||||
actual_array_size = 4;
|
||||
@@ -1018,7 +1014,7 @@ tfeedback_decl::find_candidate(gl_shader_program *prog,
|
||||
* If an error occurs, the error is reported through linker_error() and false
|
||||
* is returned.
|
||||
*/
|
||||
static bool
|
||||
bool
|
||||
parse_tfeedback_decls(struct gl_context *ctx, struct gl_shader_program *prog,
|
||||
const void *mem_ctx, unsigned num_names,
|
||||
char **varying_names, tfeedback_decl *decls)
|
||||
@@ -1073,14 +1069,11 @@ cmp_xfb_offset(const void * x_generic, const void * y_generic)
|
||||
* If an error occurs, the error is reported through linker_error() and false
|
||||
* is returned.
|
||||
*/
|
||||
static bool
|
||||
bool
|
||||
store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog,
|
||||
unsigned num_tfeedback_decls,
|
||||
tfeedback_decl *tfeedback_decls, bool has_xfb_qualifiers)
|
||||
{
|
||||
if (!prog->last_vert_prog)
|
||||
return true;
|
||||
|
||||
/* Make sure MaxTransformFeedbackBuffers is less than 32 so the bitmask for
|
||||
* tracking the number of buffers doesn't overflow.
|
||||
*/
|
||||
@@ -1089,7 +1082,7 @@ store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog,
|
||||
bool separate_attribs_mode =
|
||||
prog->TransformFeedback.BufferMode == GL_SEPARATE_ATTRIBS;
|
||||
|
||||
struct gl_program *xfb_prog = prog->last_vert_prog;
|
||||
struct gl_program *xfb_prog = prog->xfb_program;
|
||||
xfb_prog->sh.LinkedTransformFeedback =
|
||||
rzalloc(xfb_prog, struct gl_transform_feedback_info);
|
||||
|
||||
@@ -1992,7 +1985,7 @@ canonicalize_shader_io(exec_list *ir, enum ir_variable_mode io_mode)
|
||||
* 64 bit map. Per-vertex and per-patch both have separate location domains
|
||||
* with a max of MAX_VARYING.
|
||||
*/
|
||||
static uint64_t
|
||||
uint64_t
|
||||
reserved_varying_slot(struct gl_linked_shader *stage,
|
||||
ir_variable_mode io_mode)
|
||||
{
|
||||
@@ -2049,7 +2042,7 @@ reserved_varying_slot(struct gl_linked_shader *stage,
|
||||
* be NULL. In this case, varying locations are assigned solely based on the
|
||||
* requirements of transform feedback.
|
||||
*/
|
||||
static bool
|
||||
bool
|
||||
assign_varying_locations(struct gl_context *ctx,
|
||||
void *mem_ctx,
|
||||
struct gl_shader_program *prog,
|
||||
@@ -2380,160 +2373,3 @@ check_against_input_limit(struct gl_context *ctx,
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
link_varyings(struct gl_shader_program *prog, unsigned first, unsigned last,
|
||||
struct gl_context *ctx, void *mem_ctx)
|
||||
{
|
||||
bool has_xfb_qualifiers = false;
|
||||
unsigned num_tfeedback_decls = 0;
|
||||
char **varying_names = NULL;
|
||||
tfeedback_decl *tfeedback_decls = NULL;
|
||||
|
||||
/* From the ARB_enhanced_layouts spec:
|
||||
*
|
||||
* "If the shader used to record output variables for transform feedback
|
||||
* varyings uses the "xfb_buffer", "xfb_offset", or "xfb_stride" layout
|
||||
* qualifiers, the values specified by TransformFeedbackVaryings are
|
||||
* ignored, and the set of variables captured for transform feedback is
|
||||
* instead derived from the specified layout qualifiers."
|
||||
*/
|
||||
for (int i = MESA_SHADER_FRAGMENT - 1; i >= 0; i--) {
|
||||
/* Find last stage before fragment shader */
|
||||
if (prog->_LinkedShaders[i]) {
|
||||
has_xfb_qualifiers =
|
||||
process_xfb_layout_qualifiers(mem_ctx, prog->_LinkedShaders[i],
|
||||
prog, &num_tfeedback_decls,
|
||||
&varying_names);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!has_xfb_qualifiers) {
|
||||
num_tfeedback_decls = prog->TransformFeedback.NumVarying;
|
||||
varying_names = prog->TransformFeedback.VaryingNames;
|
||||
}
|
||||
|
||||
if (num_tfeedback_decls != 0) {
|
||||
/* From GL_EXT_transform_feedback:
|
||||
* A program will fail to link if:
|
||||
*
|
||||
* * the <count> specified by TransformFeedbackVaryingsEXT is
|
||||
* non-zero, but the program object has no vertex or geometry
|
||||
* shader;
|
||||
*/
|
||||
if (first >= MESA_SHADER_FRAGMENT) {
|
||||
linker_error(prog, "Transform feedback varyings specified, but "
|
||||
"no vertex, tessellation, or geometry shader is "
|
||||
"present.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
tfeedback_decls = rzalloc_array(mem_ctx, tfeedback_decl,
|
||||
num_tfeedback_decls);
|
||||
if (!parse_tfeedback_decls(ctx, prog, mem_ctx, num_tfeedback_decls,
|
||||
varying_names, tfeedback_decls))
|
||||
return false;
|
||||
}
|
||||
|
||||
/* If there is no fragment shader we need to set transform feedback.
|
||||
*
|
||||
* For SSO we also need to assign output locations. We assign them here
|
||||
* because we need to do it for both single stage programs and multi stage
|
||||
* programs.
|
||||
*/
|
||||
if (last < MESA_SHADER_FRAGMENT &&
|
||||
(num_tfeedback_decls != 0 || prog->SeparateShader)) {
|
||||
const uint64_t reserved_out_slots =
|
||||
reserved_varying_slot(prog->_LinkedShaders[last], ir_var_shader_out);
|
||||
if (!assign_varying_locations(ctx, mem_ctx, prog,
|
||||
prog->_LinkedShaders[last], NULL,
|
||||
num_tfeedback_decls, tfeedback_decls,
|
||||
reserved_out_slots))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (last <= MESA_SHADER_FRAGMENT) {
|
||||
/* Remove unused varyings from the first/last stage unless SSO */
|
||||
remove_unused_shader_inputs_and_outputs(prog->SeparateShader,
|
||||
prog->_LinkedShaders[first],
|
||||
ir_var_shader_in);
|
||||
remove_unused_shader_inputs_and_outputs(prog->SeparateShader,
|
||||
prog->_LinkedShaders[last],
|
||||
ir_var_shader_out);
|
||||
|
||||
/* If the program is made up of only a single stage */
|
||||
if (first == last) {
|
||||
gl_linked_shader *const sh = prog->_LinkedShaders[last];
|
||||
|
||||
do_dead_builtin_varyings(ctx, NULL, sh, 0, NULL);
|
||||
do_dead_builtin_varyings(ctx, sh, NULL, num_tfeedback_decls,
|
||||
tfeedback_decls);
|
||||
|
||||
if (prog->SeparateShader) {
|
||||
const uint64_t reserved_slots =
|
||||
reserved_varying_slot(sh, ir_var_shader_in);
|
||||
|
||||
/* Assign input locations for SSO, output locations are already
|
||||
* assigned.
|
||||
*/
|
||||
if (!assign_varying_locations(ctx, mem_ctx, prog,
|
||||
NULL /* producer */,
|
||||
sh /* consumer */,
|
||||
0 /* num_tfeedback_decls */,
|
||||
NULL /* tfeedback_decls */,
|
||||
reserved_slots))
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
/* Linking the stages in the opposite order (from fragment to vertex)
|
||||
* ensures that inter-shader outputs written to in an earlier stage
|
||||
* are eliminated if they are (transitively) not used in a later
|
||||
* stage.
|
||||
*/
|
||||
int next = last;
|
||||
for (int i = next - 1; i >= 0; i--) {
|
||||
if (prog->_LinkedShaders[i] == NULL && i != 0)
|
||||
continue;
|
||||
|
||||
gl_linked_shader *const sh_i = prog->_LinkedShaders[i];
|
||||
gl_linked_shader *const sh_next = prog->_LinkedShaders[next];
|
||||
|
||||
const uint64_t reserved_out_slots =
|
||||
reserved_varying_slot(sh_i, ir_var_shader_out);
|
||||
const uint64_t reserved_in_slots =
|
||||
reserved_varying_slot(sh_next, ir_var_shader_in);
|
||||
|
||||
do_dead_builtin_varyings(ctx, sh_i, sh_next,
|
||||
next == MESA_SHADER_FRAGMENT ? num_tfeedback_decls : 0,
|
||||
tfeedback_decls);
|
||||
|
||||
if (!assign_varying_locations(ctx, mem_ctx, prog, sh_i, sh_next,
|
||||
next == MESA_SHADER_FRAGMENT ? num_tfeedback_decls : 0,
|
||||
tfeedback_decls,
|
||||
reserved_out_slots | reserved_in_slots))
|
||||
return false;
|
||||
|
||||
/* This must be done after all dead varyings are eliminated. */
|
||||
if (sh_i != NULL) {
|
||||
unsigned slots_used = _mesa_bitcount_64(reserved_out_slots);
|
||||
if (!check_against_output_limit(ctx, prog, sh_i, slots_used)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned slots_used = _mesa_bitcount_64(reserved_in_slots);
|
||||
if (!check_against_input_limit(ctx, prog, sh_next, slots_used))
|
||||
return false;
|
||||
|
||||
next = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!store_tfeedback_info(ctx, prog, num_tfeedback_decls, tfeedback_decls,
|
||||
has_xfb_qualifiers))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@@ -176,14 +176,6 @@ private:
|
||||
case GL_DOUBLE_MAT4:
|
||||
case GL_DOUBLE_MAT4x2:
|
||||
case GL_DOUBLE_MAT4x3:
|
||||
case GL_INT64_ARB:
|
||||
case GL_INT64_VEC2_ARB:
|
||||
case GL_INT64_VEC3_ARB:
|
||||
case GL_INT64_VEC4_ARB:
|
||||
case GL_UNSIGNED_INT64_ARB:
|
||||
case GL_UNSIGNED_INT64_VEC2_ARB:
|
||||
case GL_UNSIGNED_INT64_VEC3_ARB:
|
||||
case GL_UNSIGNED_INT64_VEC4_ARB:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
@@ -296,13 +288,57 @@ private:
|
||||
unsigned stream_id;
|
||||
};
|
||||
|
||||
bool
|
||||
link_varyings(struct gl_shader_program *prog, unsigned first, unsigned last,
|
||||
struct gl_context *ctx, void *mem_ctx);
|
||||
|
||||
void
|
||||
cross_validate_outputs_to_inputs(struct gl_shader_program *prog,
|
||||
gl_linked_shader *producer,
|
||||
gl_linked_shader *consumer);
|
||||
|
||||
bool
|
||||
parse_tfeedback_decls(struct gl_context *ctx, struct gl_shader_program *prog,
|
||||
const void *mem_ctx, unsigned num_names,
|
||||
char **varying_names, tfeedback_decl *decls);
|
||||
|
||||
bool
|
||||
process_xfb_layout_qualifiers(void *mem_ctx, const gl_linked_shader *sh,
|
||||
unsigned *num_tfeedback_decls,
|
||||
char ***varying_names);
|
||||
|
||||
void
|
||||
remove_unused_shader_inputs_and_outputs(bool is_separate_shader_object,
|
||||
gl_linked_shader *sh,
|
||||
enum ir_variable_mode mode);
|
||||
|
||||
bool
|
||||
store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog,
|
||||
unsigned num_tfeedback_decls,
|
||||
tfeedback_decl *tfeedback_decls,
|
||||
bool has_xfb_qualifiers);
|
||||
|
||||
bool
|
||||
assign_varying_locations(struct gl_context *ctx,
|
||||
void *mem_ctx,
|
||||
struct gl_shader_program *prog,
|
||||
gl_linked_shader *producer,
|
||||
gl_linked_shader *consumer,
|
||||
unsigned num_tfeedback_decls,
|
||||
tfeedback_decl *tfeedback_decls,
|
||||
const uint64_t reserved_slots);
|
||||
|
||||
uint64_t
|
||||
reserved_varying_slot(struct gl_linked_shader *stage,
|
||||
ir_variable_mode io_mode);
|
||||
|
||||
bool
|
||||
check_against_output_limit(struct gl_context *ctx,
|
||||
struct gl_shader_program *prog,
|
||||
gl_linked_shader *producer,
|
||||
unsigned num_explicit_locations);
|
||||
|
||||
bool
|
||||
check_against_input_limit(struct gl_context *ctx,
|
||||
struct gl_shader_program *prog,
|
||||
gl_linked_shader *consumer,
|
||||
unsigned num_explicit_locations);
|
||||
|
||||
#endif /* GLSL_LINK_VARYINGS_H */
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -35,7 +35,8 @@ link_invalidate_variable_locations(exec_list *ir);
|
||||
|
||||
extern void
|
||||
link_assign_uniform_locations(struct gl_shader_program *prog,
|
||||
struct gl_context *ctx);
|
||||
struct gl_context *ctx,
|
||||
unsigned int num_explicit_uniform_locs);
|
||||
|
||||
extern void
|
||||
link_set_uniform_initializers(struct gl_shader_program *prog,
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#include "program/prog_instruction.h"
|
||||
#include "program/prog_statevars.h"
|
||||
#include "util/bitscan.h"
|
||||
#include "builtin_functions.h"
|
||||
|
||||
using namespace ir_builder;
|
||||
|
||||
|
@@ -1,403 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2016 Intel Corporation
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file lower_int64.cpp
|
||||
*
|
||||
* Lower 64-bit operations to 32-bit operations. Each 64-bit value is lowered
|
||||
* to a uvec2. For each operation that can be lowered, there is a function
|
||||
* called __builtin_foo with the same number of parameters that takes uvec2
|
||||
* sources and produces uvec2 results. An operation like
|
||||
*
|
||||
* uint64_t(x) * uint64_t(y)
|
||||
*
|
||||
* becomes
|
||||
*
|
||||
* packUint2x32(__builtin_umul64(unpackUint2x32(x), unpackUint2x32(y)));
|
||||
*/
|
||||
|
||||
#include "main/macros.h"
|
||||
#include "compiler/glsl_types.h"
|
||||
#include "ir.h"
|
||||
#include "ir_rvalue_visitor.h"
|
||||
#include "ir_builder.h"
|
||||
#include "ir_optimization.h"
|
||||
#include "util/hash_table.h"
|
||||
#include "builtin_functions.h"
|
||||
|
||||
typedef ir_function_signature *(*function_generator)(void *mem_ctx,
|
||||
builtin_available_predicate avail);
|
||||
|
||||
using namespace ir_builder;
|
||||
|
||||
namespace lower_64bit {
|
||||
void expand_source(ir_factory &, ir_rvalue *val, ir_variable **expanded_src);
|
||||
|
||||
ir_dereference_variable *compact_destination(ir_factory &,
|
||||
const glsl_type *type,
|
||||
ir_variable *result[4]);
|
||||
|
||||
ir_rvalue *lower_op_to_function_call(ir_instruction *base_ir,
|
||||
ir_expression *ir,
|
||||
ir_function_signature *callee);
|
||||
};
|
||||
|
||||
using namespace lower_64bit;
|
||||
|
||||
namespace {
|
||||
|
||||
class lower_64bit_visitor : public ir_rvalue_visitor {
|
||||
public:
|
||||
lower_64bit_visitor(void *mem_ctx, exec_list *instructions, unsigned lower)
|
||||
: progress(false), lower(lower), instructions(instructions),
|
||||
function_list(), added_functions(&function_list, mem_ctx)
|
||||
{
|
||||
functions = _mesa_hash_table_create(mem_ctx,
|
||||
_mesa_key_hash_string,
|
||||
_mesa_key_string_equal);
|
||||
|
||||
foreach_in_list(ir_instruction, node, instructions) {
|
||||
ir_function *const f = node->as_function();
|
||||
|
||||
if (f == NULL || strncmp(f->name, "__builtin_", 10) != 0)
|
||||
continue;
|
||||
|
||||
add_function(f);
|
||||
}
|
||||
}
|
||||
|
||||
~lower_64bit_visitor()
|
||||
{
|
||||
_mesa_hash_table_destroy(functions, NULL);
|
||||
}
|
||||
|
||||
void handle_rvalue(ir_rvalue **rvalue);
|
||||
|
||||
void add_function(ir_function *f)
|
||||
{
|
||||
_mesa_hash_table_insert(functions, f->name, f);
|
||||
}
|
||||
|
||||
ir_function *find_function(const char *name)
|
||||
{
|
||||
struct hash_entry *const entry =
|
||||
_mesa_hash_table_search(functions, name);
|
||||
|
||||
return entry != NULL ? (ir_function *) entry->data : NULL;
|
||||
}
|
||||
|
||||
bool progress;
|
||||
|
||||
private:
|
||||
unsigned lower; /** Bitfield of which operations to lower */
|
||||
|
||||
exec_list *instructions;
|
||||
|
||||
/** Hashtable containing all of the known functions in the IR */
|
||||
struct hash_table *functions;
|
||||
|
||||
public:
|
||||
exec_list function_list;
|
||||
|
||||
private:
|
||||
ir_factory added_functions;
|
||||
|
||||
ir_rvalue *handle_op(ir_expression *ir, const char *function_name,
|
||||
function_generator generator);
|
||||
};
|
||||
|
||||
} /* anonymous namespace */
|
||||
|
||||
static bool
|
||||
is_integer_64(const glsl_type *t)
|
||||
{
|
||||
return t->base_type == GLSL_TYPE_UINT64 || t->base_type == GLSL_TYPE_INT64;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a particular type of lowering should occur
|
||||
*/
|
||||
#define lowering(x) (this->lower & x)
|
||||
|
||||
bool
|
||||
lower_64bit_integer_instructions(exec_list *instructions,
|
||||
unsigned what_to_lower)
|
||||
{
|
||||
if (instructions->is_empty())
|
||||
return false;
|
||||
|
||||
ir_instruction *first_inst = (ir_instruction *) instructions->get_head_raw();
|
||||
void *const mem_ctx = ralloc_parent(first_inst);
|
||||
lower_64bit_visitor v(mem_ctx, instructions, what_to_lower);
|
||||
|
||||
visit_list_elements(&v, instructions);
|
||||
|
||||
if (v.progress && !v.function_list.is_empty()) {
|
||||
/* Move all of the nodes from function_list to the head if the incoming
|
||||
* instruction list.
|
||||
*/
|
||||
exec_node *const after = &instructions->head_sentinel;
|
||||
exec_node *const before = instructions->head_sentinel.next;
|
||||
exec_node *const head = v.function_list.head_sentinel.next;
|
||||
exec_node *const tail = v.function_list.tail_sentinel.prev;
|
||||
|
||||
before->next = head;
|
||||
head->prev = before;
|
||||
|
||||
after->prev = tail;
|
||||
tail->next = after;
|
||||
}
|
||||
|
||||
return v.progress;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Expand individual 64-bit values to uvec2 values
|
||||
*
|
||||
* Each operation is in one of a few forms.
|
||||
*
|
||||
* vector op vector
|
||||
* vector op scalar
|
||||
* scalar op vector
|
||||
* scalar op scalar
|
||||
*
|
||||
* In the 'vector op vector' case, the two vectors must have the same size.
|
||||
* In a way, the 'scalar op scalar' form is special case of the 'vector op
|
||||
* vector' form.
|
||||
*
|
||||
* This method generates a new set of uvec2 values for each element of a
|
||||
* single operand. If the operand is a scalar, the uvec2 is replicated
|
||||
* multiple times. A value like
|
||||
*
|
||||
* u64vec3(a) + u64vec3(b)
|
||||
*
|
||||
* becomes
|
||||
*
|
||||
* u64vec3 tmp0 = u64vec3(a) + u64vec3(b);
|
||||
* uvec2 tmp1 = unpackUint2x32(tmp0.x);
|
||||
* uvec2 tmp2 = unpackUint2x32(tmp0.y);
|
||||
* uvec2 tmp3 = unpackUint2x32(tmp0.z);
|
||||
*
|
||||
* and the returned operands array contains ir_variable pointers to
|
||||
*
|
||||
* { tmp1, tmp2, tmp3, tmp1 }
|
||||
*/
|
||||
void
|
||||
lower_64bit::expand_source(ir_factory &body,
|
||||
ir_rvalue *val,
|
||||
ir_variable **expanded_src)
|
||||
{
|
||||
assert(val->type->base_type == GLSL_TYPE_UINT64 ||
|
||||
val->type->base_type == GLSL_TYPE_INT64);
|
||||
|
||||
ir_variable *const temp = body.make_temp(val->type, "tmp");
|
||||
|
||||
body.emit(assign(temp, val));
|
||||
|
||||
const ir_expression_operation unpack_opcode =
|
||||
val->type->base_type == GLSL_TYPE_UINT64
|
||||
? ir_unop_unpack_uint_2x32 : ir_unop_unpack_int_2x32;
|
||||
|
||||
const glsl_type *const type =
|
||||
val->type->base_type == GLSL_TYPE_UINT64
|
||||
? glsl_type::uvec2_type : glsl_type::ivec2_type;
|
||||
|
||||
unsigned i;
|
||||
for (i = 0; i < val->type->vector_elements; i++) {
|
||||
expanded_src[i] = body.make_temp(type, "expanded_64bit_source");
|
||||
|
||||
body.emit(assign(expanded_src[i],
|
||||
expr(unpack_opcode, swizzle(temp, i, 1))));
|
||||
}
|
||||
|
||||
for (/* empty */; i < 4; i++)
|
||||
expanded_src[i] = expanded_src[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a series of uvec2 results into a single 64-bit integer vector
|
||||
*/
|
||||
ir_dereference_variable *
|
||||
lower_64bit::compact_destination(ir_factory &body,
|
||||
const glsl_type *type,
|
||||
ir_variable *result[4])
|
||||
{
|
||||
const ir_expression_operation pack_opcode =
|
||||
type->base_type == GLSL_TYPE_UINT64
|
||||
? ir_unop_pack_uint_2x32 : ir_unop_pack_int_2x32;
|
||||
|
||||
ir_variable *const compacted_result =
|
||||
body.make_temp(type, "compacted_64bit_result");
|
||||
|
||||
for (unsigned i = 0; i < type->vector_elements; i++) {
|
||||
body.emit(assign(compacted_result,
|
||||
expr(pack_opcode, result[i]),
|
||||
1U << i));
|
||||
}
|
||||
|
||||
void *const mem_ctx = ralloc_parent(compacted_result);
|
||||
return new(mem_ctx) ir_dereference_variable(compacted_result);
|
||||
}
|
||||
|
||||
ir_rvalue *
|
||||
lower_64bit::lower_op_to_function_call(ir_instruction *base_ir,
|
||||
ir_expression *ir,
|
||||
ir_function_signature *callee)
|
||||
{
|
||||
const unsigned num_operands = ir->get_num_operands();
|
||||
ir_variable *src[4][4];
|
||||
ir_variable *dst[4];
|
||||
void *const mem_ctx = ralloc_parent(ir);
|
||||
exec_list instructions;
|
||||
unsigned source_components = 0;
|
||||
const glsl_type *const result_type =
|
||||
ir->type->base_type == GLSL_TYPE_UINT64
|
||||
? glsl_type::uvec2_type : glsl_type::ivec2_type;
|
||||
|
||||
ir_factory body(&instructions, mem_ctx);
|
||||
|
||||
for (unsigned i = 0; i < num_operands; i++) {
|
||||
expand_source(body, ir->operands[i], src[i]);
|
||||
|
||||
if (ir->operands[i]->type->vector_elements > source_components)
|
||||
source_components = ir->operands[i]->type->vector_elements;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < source_components; i++) {
|
||||
dst[i] = body.make_temp(result_type, "expanded_64bit_result");
|
||||
|
||||
exec_list parameters;
|
||||
|
||||
for (unsigned j = 0; j < num_operands; j++)
|
||||
parameters.push_tail(new(mem_ctx) ir_dereference_variable(src[j][i]));
|
||||
|
||||
ir_dereference_variable *const return_deref =
|
||||
new(mem_ctx) ir_dereference_variable(dst[i]);
|
||||
|
||||
ir_call *const c = new(mem_ctx) ir_call(callee,
|
||||
return_deref,
|
||||
¶meters);
|
||||
|
||||
body.emit(c);
|
||||
}
|
||||
|
||||
ir_rvalue *const rv = compact_destination(body, ir->type, dst);
|
||||
|
||||
/* Move all of the nodes from instructions between base_ir and the
|
||||
* instruction before it.
|
||||
*/
|
||||
exec_node *const after = base_ir;
|
||||
exec_node *const before = after->prev;
|
||||
exec_node *const head = instructions.head_sentinel.next;
|
||||
exec_node *const tail = instructions.tail_sentinel.prev;
|
||||
|
||||
before->next = head;
|
||||
head->prev = before;
|
||||
|
||||
after->prev = tail;
|
||||
tail->next = after;
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
ir_rvalue *
|
||||
lower_64bit_visitor::handle_op(ir_expression *ir,
|
||||
const char *function_name,
|
||||
function_generator generator)
|
||||
{
|
||||
for (unsigned i = 0; i < ir->get_num_operands(); i++)
|
||||
if (!is_integer_64(ir->operands[i]->type))
|
||||
return ir;
|
||||
|
||||
/* Get a handle to the correct ir_function_signature for the core
|
||||
* operation.
|
||||
*/
|
||||
ir_function_signature *callee = NULL;
|
||||
ir_function *f = find_function(function_name);
|
||||
|
||||
if (f != NULL) {
|
||||
callee = (ir_function_signature *) f->signatures.get_head();
|
||||
assert(callee != NULL && callee->ir_type == ir_type_function_signature);
|
||||
} else {
|
||||
f = new(base_ir) ir_function(function_name);
|
||||
callee = generator(base_ir, NULL);
|
||||
|
||||
f->add_signature(callee);
|
||||
|
||||
add_function(f);
|
||||
}
|
||||
|
||||
return lower_op_to_function_call(this->base_ir, ir, callee);
|
||||
}
|
||||
|
||||
void
|
||||
lower_64bit_visitor::handle_rvalue(ir_rvalue **rvalue)
|
||||
{
|
||||
if (*rvalue == NULL || (*rvalue)->ir_type != ir_type_expression)
|
||||
return;
|
||||
|
||||
ir_expression *const ir = (*rvalue)->as_expression();
|
||||
assert(ir != NULL);
|
||||
|
||||
switch (ir->operation) {
|
||||
case ir_unop_sign:
|
||||
if (lowering(SIGN64)) {
|
||||
*rvalue = handle_op(ir, "__builtin_sign64", generate_ir::sign64);
|
||||
this->progress = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case ir_binop_div:
|
||||
if (lowering(DIV64)) {
|
||||
if (ir->type->base_type == GLSL_TYPE_UINT64) {
|
||||
*rvalue = handle_op(ir, "__builtin_udiv64", generate_ir::udiv64);
|
||||
} else {
|
||||
*rvalue = handle_op(ir, "__builtin_idiv64", generate_ir::idiv64);
|
||||
}
|
||||
this->progress = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case ir_binop_mod:
|
||||
if (lowering(MOD64)) {
|
||||
if (ir->type->base_type == GLSL_TYPE_UINT64) {
|
||||
*rvalue = handle_op(ir, "__builtin_umod64", generate_ir::umod64);
|
||||
} else {
|
||||
*rvalue = handle_op(ir, "__builtin_imod64", generate_ir::imod64);
|
||||
}
|
||||
this->progress = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case ir_binop_mul:
|
||||
if (lowering(MUL64)) {
|
||||
*rvalue = handle_op(ir, "__builtin_umul64", generate_ir::umul64);
|
||||
this->progress = true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
@@ -932,14 +932,21 @@ lower_continue:
|
||||
* break statement if necessary.
|
||||
*/
|
||||
return_if->then_instructions.push_tail(new(ir) ir_loop_jump(ir_loop_jump::jump_break));
|
||||
else
|
||||
/* Otherwise, all we need to do is ensure that the
|
||||
* instructions that follow are only executed if the
|
||||
* return flag is clear. We can do that by moving those
|
||||
* instructions into the else clause of the generated if
|
||||
else {
|
||||
/* Otherwise, ensure that the instructions that follow are only
|
||||
* executed if the return flag is clear. We can do that by moving
|
||||
* those instructions into the else clause of the generated if
|
||||
* statement.
|
||||
*/
|
||||
move_outer_block_inside(ir, &return_if->else_instructions);
|
||||
|
||||
/* In case the loop is embeded inside an if add a new return to
|
||||
* the return flag then branch and let a future pass tidy it up.
|
||||
*/
|
||||
if (this->function.signature->return_type->is_void())
|
||||
return_if->then_instructions.push_tail(new(ir) ir_return(NULL));
|
||||
}
|
||||
|
||||
ir->insert_after(return_if);
|
||||
}
|
||||
|
||||
|
@@ -351,38 +351,6 @@ lower_packed_varyings_visitor::bitwise_assign_pack(ir_rvalue *lhs,
|
||||
rhs = u2i(expr(ir_unop_unpack_double_2x32, rhs));
|
||||
}
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
assert(rhs->type->vector_elements <= 2);
|
||||
if (rhs->type->vector_elements == 2) {
|
||||
ir_variable *t = new(mem_ctx) ir_variable(lhs->type, "pack", ir_var_temporary);
|
||||
|
||||
assert(lhs->type->vector_elements == 4);
|
||||
this->out_variables->push_tail(t);
|
||||
this->out_instructions->push_tail(
|
||||
assign(t, expr(ir_unop_unpack_int_2x32, swizzle_x(rhs->clone(mem_ctx, NULL))), 0x3));
|
||||
this->out_instructions->push_tail(
|
||||
assign(t, expr(ir_unop_unpack_int_2x32, swizzle_y(rhs)), 0xc));
|
||||
rhs = deref(t).val;
|
||||
} else {
|
||||
rhs = expr(ir_unop_unpack_int_2x32, rhs);
|
||||
}
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
assert(rhs->type->vector_elements <= 2);
|
||||
if (rhs->type->vector_elements == 2) {
|
||||
ir_variable *t = new(mem_ctx) ir_variable(lhs->type, "pack", ir_var_temporary);
|
||||
|
||||
assert(lhs->type->vector_elements == 4);
|
||||
this->out_variables->push_tail(t);
|
||||
this->out_instructions->push_tail(
|
||||
assign(t, u2i(expr(ir_unop_unpack_uint_2x32, swizzle_x(rhs->clone(mem_ctx, NULL)))), 0x3));
|
||||
this->out_instructions->push_tail(
|
||||
assign(t, u2i(expr(ir_unop_unpack_uint_2x32, swizzle_y(rhs))), 0xc));
|
||||
rhs = deref(t).val;
|
||||
} else {
|
||||
rhs = u2i(expr(ir_unop_unpack_uint_2x32, rhs));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(!"Unexpected type conversion while lowering varyings");
|
||||
break;
|
||||
@@ -432,36 +400,6 @@ lower_packed_varyings_visitor::bitwise_assign_unpack(ir_rvalue *lhs,
|
||||
rhs = expr(ir_unop_pack_double_2x32, i2u(rhs));
|
||||
}
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
assert(lhs->type->vector_elements <= 2);
|
||||
if (lhs->type->vector_elements == 2) {
|
||||
ir_variable *t = new(mem_ctx) ir_variable(lhs->type, "unpack", ir_var_temporary);
|
||||
assert(rhs->type->vector_elements == 4);
|
||||
this->out_variables->push_tail(t);
|
||||
this->out_instructions->push_tail(
|
||||
assign(t, expr(ir_unop_pack_int_2x32, swizzle_xy(rhs->clone(mem_ctx, NULL))), 0x1));
|
||||
this->out_instructions->push_tail(
|
||||
assign(t, expr(ir_unop_pack_int_2x32, swizzle(rhs->clone(mem_ctx, NULL), SWIZZLE_ZWZW, 2)), 0x2));
|
||||
rhs = deref(t).val;
|
||||
} else {
|
||||
rhs = expr(ir_unop_pack_int_2x32, rhs);
|
||||
}
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
assert(lhs->type->vector_elements <= 2);
|
||||
if (lhs->type->vector_elements == 2) {
|
||||
ir_variable *t = new(mem_ctx) ir_variable(lhs->type, "unpack", ir_var_temporary);
|
||||
assert(rhs->type->vector_elements == 4);
|
||||
this->out_variables->push_tail(t);
|
||||
this->out_instructions->push_tail(
|
||||
assign(t, expr(ir_unop_pack_uint_2x32, i2u(swizzle_xy(rhs->clone(mem_ctx, NULL)))), 0x1));
|
||||
this->out_instructions->push_tail(
|
||||
assign(t, expr(ir_unop_pack_uint_2x32, i2u(swizzle(rhs->clone(mem_ctx, NULL), SWIZZLE_ZWZW, 2))), 0x2));
|
||||
rhs = deref(t).val;
|
||||
} else {
|
||||
rhs = expr(ir_unop_pack_uint_2x32, i2u(rhs));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(!"Unexpected type conversion while lowering varyings");
|
||||
break;
|
||||
|
@@ -37,7 +37,6 @@
|
||||
#include "ir_builder.h"
|
||||
#include "linker.h"
|
||||
#include "program/prog_statevars.h"
|
||||
#include "builtin_functions.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -472,34 +472,6 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
|
||||
}
|
||||
break;
|
||||
|
||||
/* This macro CANNOT use the do { } while(true) mechanism because
|
||||
* then the breaks apply to the loop instead of the switch!
|
||||
*/
|
||||
#define HANDLE_PACK_UNPACK_INVERSE(inverse_operation) \
|
||||
{ \
|
||||
ir_expression *const op = ir->operands[0]->as_expression(); \
|
||||
if (op == NULL) \
|
||||
break; \
|
||||
if (op->operation == (inverse_operation)) \
|
||||
return op->operands[0]; \
|
||||
break; \
|
||||
}
|
||||
|
||||
case ir_unop_unpack_uint_2x32:
|
||||
HANDLE_PACK_UNPACK_INVERSE(ir_unop_pack_uint_2x32);
|
||||
case ir_unop_pack_uint_2x32:
|
||||
HANDLE_PACK_UNPACK_INVERSE(ir_unop_unpack_uint_2x32);
|
||||
case ir_unop_unpack_int_2x32:
|
||||
HANDLE_PACK_UNPACK_INVERSE(ir_unop_pack_int_2x32);
|
||||
case ir_unop_pack_int_2x32:
|
||||
HANDLE_PACK_UNPACK_INVERSE(ir_unop_unpack_int_2x32);
|
||||
case ir_unop_unpack_double_2x32:
|
||||
HANDLE_PACK_UNPACK_INVERSE(ir_unop_pack_double_2x32);
|
||||
case ir_unop_pack_double_2x32:
|
||||
HANDLE_PACK_UNPACK_INVERSE(ir_unop_unpack_double_2x32);
|
||||
|
||||
#undef HANDLE_PACK_UNPACK_INVERSE
|
||||
|
||||
case ir_binop_add:
|
||||
if (is_vec_zero(op_const[0]))
|
||||
return ir->operands[1];
|
||||
|
@@ -41,7 +41,6 @@
|
||||
#include "linker.h"
|
||||
#include "glsl_parser_extras.h"
|
||||
#include "ir_builder_print_visitor.h"
|
||||
#include "builtin_functions.h"
|
||||
#include "opt_add_neg_to_sub.h"
|
||||
|
||||
class dead_variable_visitor : public ir_hierarchical_visitor {
|
||||
|
@@ -178,7 +178,6 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
|
||||
ctx->Extensions.ARB_fragment_layer_viewport = true;
|
||||
ctx->Extensions.ARB_gpu_shader5 = true;
|
||||
ctx->Extensions.ARB_gpu_shader_fp64 = true;
|
||||
ctx->Extensions.ARB_gpu_shader_int64 = true;
|
||||
ctx->Extensions.ARB_sample_shading = true;
|
||||
ctx->Extensions.ARB_shader_bit_encoding = true;
|
||||
ctx->Extensions.ARB_shader_draw_parameters = true;
|
||||
|
@@ -111,7 +111,7 @@ rmrf_local(const char *path)
|
||||
if (path == NULL || *path == '\0' || *path != '.')
|
||||
return -1;
|
||||
|
||||
return nftw(path, remove_entry, 64, FTW_DEPTH | FTW_PHYS | FTW_MOUNT);
|
||||
return nftw(path, remove_entry, 64, FTW_DEPTH | FTW_PHYS);
|
||||
}
|
||||
|
||||
#define CACHE_TEST_TMP "./cache-test-tmp"
|
||||
|
@@ -1,440 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2013 Intel Corporation
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
#include <gtest/gtest.h>
|
||||
#include "main/compiler.h"
|
||||
#include "main/mtypes.h"
|
||||
#include "main/macros.h"
|
||||
#include "ir.h"
|
||||
#include "ir_builder.h"
|
||||
|
||||
using namespace ir_builder;
|
||||
|
||||
namespace lower_64bit {
|
||||
void expand_source(ir_factory &body,
|
||||
ir_rvalue *val,
|
||||
ir_variable **expanded_src);
|
||||
|
||||
ir_dereference_variable *compact_destination(ir_factory &body,
|
||||
const glsl_type *type,
|
||||
ir_variable *result[4]);
|
||||
|
||||
ir_rvalue *lower_op_to_function_call(ir_instruction *base_ir,
|
||||
ir_expression *ir,
|
||||
ir_function_signature *callee);
|
||||
};
|
||||
|
||||
class expand_source : public ::testing::Test {
|
||||
public:
|
||||
virtual void SetUp();
|
||||
virtual void TearDown();
|
||||
|
||||
exec_list instructions;
|
||||
ir_factory *body;
|
||||
ir_variable *expanded_src[4];
|
||||
void *mem_ctx;
|
||||
};
|
||||
|
||||
void
|
||||
expand_source::SetUp()
|
||||
{
|
||||
mem_ctx = ralloc_context(NULL);
|
||||
|
||||
memset(expanded_src, 0, sizeof(expanded_src));
|
||||
instructions.make_empty();
|
||||
body = new ir_factory(&instructions, mem_ctx);
|
||||
}
|
||||
|
||||
void
|
||||
expand_source::TearDown()
|
||||
{
|
||||
delete body;
|
||||
body = NULL;
|
||||
|
||||
ralloc_free(mem_ctx);
|
||||
mem_ctx = NULL;
|
||||
}
|
||||
|
||||
static ir_dereference_variable *
|
||||
create_variable(void *mem_ctx, const glsl_type *type)
|
||||
{
|
||||
ir_variable *var = new(mem_ctx) ir_variable(type,
|
||||
"variable",
|
||||
ir_var_temporary);
|
||||
|
||||
return new(mem_ctx) ir_dereference_variable(var);
|
||||
}
|
||||
|
||||
static ir_expression *
|
||||
create_expression(void *mem_ctx, const glsl_type *type)
|
||||
{
|
||||
return new(mem_ctx) ir_expression(ir_unop_neg,
|
||||
create_variable(mem_ctx, type));
|
||||
}
|
||||
|
||||
static void
|
||||
check_expanded_source(const glsl_type *type,
|
||||
ir_variable *expanded_src[4])
|
||||
{
|
||||
const glsl_type *const expanded_type =
|
||||
type->base_type == GLSL_TYPE_UINT64
|
||||
? glsl_type::uvec2_type :glsl_type::ivec2_type;
|
||||
|
||||
for (int i = 0; i < type->vector_elements; i++) {
|
||||
EXPECT_EQ(expanded_type, expanded_src[i]->type);
|
||||
|
||||
/* All elements that are part of the vector must be unique. */
|
||||
for (int j = i - 1; j >= 0; j--) {
|
||||
EXPECT_NE(expanded_src[i], expanded_src[j])
|
||||
<< " Element " << i << " is the same as element " << j;
|
||||
}
|
||||
}
|
||||
|
||||
/* All elements that are not part of the vector must be the same as element
|
||||
* 0. This is primarily for scalars (where every element is the same).
|
||||
*/
|
||||
for (int i = type->vector_elements; i < 4; i++) {
|
||||
EXPECT_EQ(expanded_src[0], expanded_src[i])
|
||||
<< " Element " << i << " should be the same as element 0";
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
check_instructions(exec_list *instructions,
|
||||
const glsl_type *type,
|
||||
const ir_instruction *source)
|
||||
{
|
||||
const glsl_type *const expanded_type =
|
||||
type->base_type == GLSL_TYPE_UINT64
|
||||
? glsl_type::uvec2_type : glsl_type::ivec2_type;
|
||||
|
||||
const ir_expression_operation unpack_opcode =
|
||||
type->base_type == GLSL_TYPE_UINT64
|
||||
? ir_unop_unpack_uint_2x32 : ir_unop_unpack_int_2x32;
|
||||
|
||||
ir_instruction *ir;
|
||||
|
||||
/* The instruction list should contain IR to represent:
|
||||
*
|
||||
* type tmp1;
|
||||
* tmp1 = source;
|
||||
* uvec2 tmp2;
|
||||
* tmp2 = unpackUint2x32(tmp1.x);
|
||||
* uvec2 tmp3;
|
||||
* tmp3 = unpackUint2x32(tmp1.y);
|
||||
* uvec2 tmp4;
|
||||
* tmp4 = unpackUint2x32(tmp1.z);
|
||||
* uvec2 tmp5;
|
||||
* tmp5 = unpackUint2x32(tmp1.w);
|
||||
*/
|
||||
ASSERT_FALSE(instructions->is_empty());
|
||||
ir = (ir_instruction *) instructions->pop_head();
|
||||
ir_variable *const tmp1 = ir->as_variable();
|
||||
EXPECT_EQ(ir_type_variable, ir->ir_type);
|
||||
EXPECT_EQ(type, tmp1->type) <<
|
||||
" Got " <<
|
||||
tmp1->type->name <<
|
||||
", expected " <<
|
||||
type->name;
|
||||
|
||||
ASSERT_FALSE(instructions->is_empty());
|
||||
ir = (ir_instruction *) instructions->pop_head();
|
||||
ir_assignment *const assign1 = ir->as_assignment();
|
||||
EXPECT_EQ(ir_type_assignment, ir->ir_type);
|
||||
ASSERT_NE((void *)0, assign1);
|
||||
EXPECT_EQ(tmp1, assign1->lhs->variable_referenced());
|
||||
EXPECT_EQ(source, assign1->rhs);
|
||||
|
||||
for (unsigned i = 0; i < type->vector_elements; i++) {
|
||||
ASSERT_FALSE(instructions->is_empty());
|
||||
ir = (ir_instruction *) instructions->pop_head();
|
||||
ir_variable *const tmp2 = ir->as_variable();
|
||||
EXPECT_EQ(ir_type_variable, ir->ir_type);
|
||||
EXPECT_EQ(expanded_type, tmp2->type);
|
||||
|
||||
ASSERT_FALSE(instructions->is_empty());
|
||||
ir = (ir_instruction *) instructions->pop_head();
|
||||
ir_assignment *const assign2 = ir->as_assignment();
|
||||
EXPECT_EQ(ir_type_assignment, ir->ir_type);
|
||||
ASSERT_NE((void *)0, assign2);
|
||||
EXPECT_EQ(tmp2, assign2->lhs->variable_referenced());
|
||||
ir_expression *unpack = assign2->rhs->as_expression();
|
||||
ASSERT_NE((void *)0, unpack);
|
||||
EXPECT_EQ(unpack_opcode, unpack->operation);
|
||||
EXPECT_EQ(tmp1, unpack->operands[0]->variable_referenced());
|
||||
}
|
||||
|
||||
EXPECT_TRUE(instructions->is_empty());
|
||||
}
|
||||
|
||||
TEST_F(expand_source, uint64_variable)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::uint64_t_type;
|
||||
ir_dereference_variable *const deref = create_variable(mem_ctx, type);
|
||||
|
||||
lower_64bit::expand_source(*body, deref, expanded_src);
|
||||
|
||||
check_expanded_source(type, expanded_src);
|
||||
check_instructions(&instructions, type, deref);
|
||||
}
|
||||
|
||||
TEST_F(expand_source, u64vec2_variable)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::u64vec2_type;
|
||||
ir_dereference_variable *const deref = create_variable(mem_ctx, type);
|
||||
|
||||
lower_64bit::expand_source(*body, deref, expanded_src);
|
||||
|
||||
check_expanded_source(type, expanded_src);
|
||||
check_instructions(&instructions, type, deref);
|
||||
}
|
||||
|
||||
TEST_F(expand_source, u64vec3_variable)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::u64vec3_type;
|
||||
|
||||
/* Generate an operand that is a scalar variable dereference. */
|
||||
ir_variable *const var = new(mem_ctx) ir_variable(type,
|
||||
"variable",
|
||||
ir_var_temporary);
|
||||
|
||||
ir_dereference_variable *const deref =
|
||||
new(mem_ctx) ir_dereference_variable(var);
|
||||
|
||||
lower_64bit::expand_source(*body, deref, expanded_src);
|
||||
|
||||
check_expanded_source(type, expanded_src);
|
||||
check_instructions(&instructions, type, deref);
|
||||
}
|
||||
|
||||
TEST_F(expand_source, u64vec4_variable)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::u64vec4_type;
|
||||
ir_dereference_variable *const deref = create_variable(mem_ctx, type);
|
||||
|
||||
lower_64bit::expand_source(*body, deref, expanded_src);
|
||||
|
||||
check_expanded_source(type, expanded_src);
|
||||
check_instructions(&instructions, type, deref);
|
||||
}
|
||||
|
||||
TEST_F(expand_source, int64_variable)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::int64_t_type;
|
||||
ir_dereference_variable *const deref = create_variable(mem_ctx, type);
|
||||
|
||||
lower_64bit::expand_source(*body, deref, expanded_src);
|
||||
|
||||
check_expanded_source(type, expanded_src);
|
||||
check_instructions(&instructions, type, deref);
|
||||
}
|
||||
|
||||
TEST_F(expand_source, i64vec2_variable)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::i64vec2_type;
|
||||
ir_dereference_variable *const deref = create_variable(mem_ctx, type);
|
||||
|
||||
lower_64bit::expand_source(*body, deref, expanded_src);
|
||||
|
||||
check_expanded_source(type, expanded_src);
|
||||
check_instructions(&instructions, type, deref);
|
||||
}
|
||||
|
||||
TEST_F(expand_source, i64vec3_variable)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::i64vec3_type;
|
||||
ir_dereference_variable *const deref = create_variable(mem_ctx, type);
|
||||
|
||||
lower_64bit::expand_source(*body, deref, expanded_src);
|
||||
|
||||
check_expanded_source(type, expanded_src);
|
||||
check_instructions(&instructions, type, deref);
|
||||
}
|
||||
|
||||
TEST_F(expand_source, i64vec4_variable)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::i64vec4_type;
|
||||
ir_dereference_variable *const deref = create_variable(mem_ctx, type);
|
||||
|
||||
lower_64bit::expand_source(*body, deref, expanded_src);
|
||||
|
||||
check_expanded_source(type, expanded_src);
|
||||
check_instructions(&instructions, type, deref);
|
||||
}
|
||||
|
||||
TEST_F(expand_source, uint64_expression)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::uint64_t_type;
|
||||
ir_expression *const expr = create_expression(mem_ctx, type);
|
||||
|
||||
lower_64bit::expand_source(*body, expr, expanded_src);
|
||||
|
||||
check_expanded_source(type, expanded_src);
|
||||
check_instructions(&instructions, type, expr);
|
||||
}
|
||||
|
||||
TEST_F(expand_source, u64vec2_expression)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::u64vec2_type;
|
||||
ir_expression *const expr = create_expression(mem_ctx, type);
|
||||
|
||||
lower_64bit::expand_source(*body, expr, expanded_src);
|
||||
|
||||
check_expanded_source(type, expanded_src);
|
||||
check_instructions(&instructions, type, expr);
|
||||
}
|
||||
|
||||
TEST_F(expand_source, u64vec3_expression)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::u64vec3_type;
|
||||
ir_expression *const expr = create_expression(mem_ctx, type);
|
||||
|
||||
lower_64bit::expand_source(*body, expr, expanded_src);
|
||||
|
||||
check_expanded_source(type, expanded_src);
|
||||
check_instructions(&instructions, type, expr);
|
||||
}
|
||||
|
||||
TEST_F(expand_source, u64vec4_expression)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::u64vec4_type;
|
||||
ir_expression *const expr = create_expression(mem_ctx, type);
|
||||
|
||||
lower_64bit::expand_source(*body, expr, expanded_src);
|
||||
|
||||
check_expanded_source(type, expanded_src);
|
||||
check_instructions(&instructions, type, expr);
|
||||
}
|
||||
|
||||
TEST_F(expand_source, int64_expression)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::int64_t_type;
|
||||
ir_expression *const expr = create_expression(mem_ctx, type);
|
||||
|
||||
lower_64bit::expand_source(*body, expr, expanded_src);
|
||||
|
||||
check_expanded_source(type, expanded_src);
|
||||
check_instructions(&instructions, type, expr);
|
||||
}
|
||||
|
||||
TEST_F(expand_source, i64vec2_expression)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::i64vec2_type;
|
||||
ir_expression *const expr = create_expression(mem_ctx, type);
|
||||
|
||||
lower_64bit::expand_source(*body, expr, expanded_src);
|
||||
|
||||
check_expanded_source(type, expanded_src);
|
||||
check_instructions(&instructions, type, expr);
|
||||
}
|
||||
|
||||
TEST_F(expand_source, i64vec3_expression)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::i64vec3_type;
|
||||
ir_expression *const expr = create_expression(mem_ctx, type);
|
||||
|
||||
lower_64bit::expand_source(*body, expr, expanded_src);
|
||||
|
||||
check_expanded_source(type, expanded_src);
|
||||
check_instructions(&instructions, type, expr);
|
||||
}
|
||||
|
||||
TEST_F(expand_source, i64vec4_expression)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::i64vec4_type;
|
||||
ir_expression *const expr = create_expression(mem_ctx, type);
|
||||
|
||||
lower_64bit::expand_source(*body, expr, expanded_src);
|
||||
|
||||
check_expanded_source(type, expanded_src);
|
||||
check_instructions(&instructions, type, expr);
|
||||
}
|
||||
|
||||
class compact_destination : public ::testing::Test {
|
||||
public:
|
||||
virtual void SetUp();
|
||||
virtual void TearDown();
|
||||
|
||||
exec_list instructions;
|
||||
ir_factory *body;
|
||||
ir_variable *expanded_src[4];
|
||||
void *mem_ctx;
|
||||
};
|
||||
|
||||
void
|
||||
compact_destination::SetUp()
|
||||
{
|
||||
mem_ctx = ralloc_context(NULL);
|
||||
|
||||
memset(expanded_src, 0, sizeof(expanded_src));
|
||||
instructions.make_empty();
|
||||
body = new ir_factory(&instructions, mem_ctx);
|
||||
}
|
||||
|
||||
void
|
||||
compact_destination::TearDown()
|
||||
{
|
||||
delete body;
|
||||
body = NULL;
|
||||
|
||||
ralloc_free(mem_ctx);
|
||||
mem_ctx = NULL;
|
||||
}
|
||||
|
||||
TEST_F(compact_destination, uint64)
|
||||
{
|
||||
const glsl_type *const type = glsl_type::uint64_t_type;
|
||||
|
||||
for (unsigned i = 0; i < type->vector_elements; i++) {
|
||||
expanded_src[i] = new(mem_ctx) ir_variable(glsl_type::uvec2_type,
|
||||
"result",
|
||||
ir_var_temporary);
|
||||
}
|
||||
|
||||
ir_dereference_variable *deref =
|
||||
lower_64bit::compact_destination(*body,
|
||||
type,
|
||||
expanded_src);
|
||||
|
||||
ASSERT_EQ(ir_type_dereference_variable, deref->ir_type);
|
||||
EXPECT_EQ(type, deref->var->type) <<
|
||||
" Got " <<
|
||||
deref->var->type->name <<
|
||||
", expected " <<
|
||||
type->name;
|
||||
|
||||
ir_instruction *ir;
|
||||
|
||||
ASSERT_FALSE(instructions.is_empty());
|
||||
ir = (ir_instruction *) instructions.pop_head();
|
||||
ir_variable *const var = ir->as_variable();
|
||||
ASSERT_NE((void *)0, var);
|
||||
EXPECT_EQ(deref->var, var);
|
||||
|
||||
for (unsigned i = 0; i < type->vector_elements; i++) {
|
||||
ASSERT_FALSE(instructions.is_empty());
|
||||
ir = (ir_instruction *) instructions.pop_head();
|
||||
ir_assignment *const assign = ir->as_assignment();
|
||||
ASSERT_NE((void *)0, assign);
|
||||
EXPECT_EQ(deref->var, assign->lhs->variable_referenced());
|
||||
}
|
||||
}
|
@@ -236,6 +236,13 @@ def if_execute_flag(statements):
|
||||
check_sexp(statements)
|
||||
return [['if', ['var_ref', 'execute_flag'], statements, []]]
|
||||
|
||||
def if_return_flag(then_statements, else_statements):
|
||||
"""Wrap statements in an if test with return_flag as the condition.
|
||||
"""
|
||||
check_sexp(then_statements)
|
||||
check_sexp(else_statements)
|
||||
return [['if', ['var_ref', 'return_flag'], then_statements, else_statements]]
|
||||
|
||||
def if_not_return_flag(statements):
|
||||
"""Wrap statements in an if test so that they will only execute if
|
||||
return_flag is False.
|
||||
@@ -452,7 +459,10 @@ def test_lower_pulled_out_jump():
|
||||
loop(simple_if('b', simple_if('c', [], continue_()),
|
||||
lowered_return_simple()) +
|
||||
break_()) +
|
||||
if_not_return_flag(assign_x('d', const_float(1))))
|
||||
|
||||
if_return_flag(assign_x('return_flag', const_bool(1)) +
|
||||
assign_x('execute_flag', const_bool(0)),
|
||||
assign_x('d', const_float(1))))
|
||||
))
|
||||
create_test_case(doc_string, input_sexp, expected_sexp, 'lower_pulled_out_jump',
|
||||
lower_main_return=True, pull_out_jumps=True)
|
||||
@@ -583,11 +593,14 @@ def test_lower_return_void_at_end_of_loop():
|
||||
assign_x('b', const_float(2))
|
||||
))
|
||||
expected_sexp = make_test_case('main', 'void', (
|
||||
declare_execute_flag() +
|
||||
declare_return_flag() +
|
||||
loop(assign_x('a', const_float(1)) +
|
||||
lowered_return_simple() +
|
||||
break_()) +
|
||||
if_not_return_flag(assign_x('b', const_float(2)))
|
||||
if_return_flag(assign_x('return_flag', const_bool(1)) +
|
||||
assign_x('execute_flag', const_bool(0)),
|
||||
assign_x('b', const_float(2)))
|
||||
))
|
||||
create_test_case(doc_string, input_sexp, input_sexp, 'return_void_at_end_of_loop_lower_nothing')
|
||||
create_test_case(doc_string, input_sexp, expected_sexp, 'return_void_at_end_of_loop_lower_return',
|
||||
|
@@ -1,206 +0,0 @@
|
||||
ir_function_signature *
|
||||
udivmod64(void *mem_ctx, ir_factory &body)
|
||||
{
|
||||
ir_function_signature *const sig =
|
||||
new(mem_ctx) ir_function_signature(glsl_type::uvec4_type);
|
||||
exec_list sig_parameters;
|
||||
|
||||
ir_variable *const r0001 = new(mem_ctx) ir_variable(glsl_type::uvec2_type, "numer", ir_var_function_in);
|
||||
sig_parameters.push_tail(r0001);
|
||||
ir_variable *const r0002 = new(mem_ctx) ir_variable(glsl_type::uvec2_type, "denom", ir_var_function_in);
|
||||
sig_parameters.push_tail(r0002);
|
||||
ir_variable *const r0003 = new(mem_ctx) ir_variable(glsl_type::int_type, "i", ir_var_auto);
|
||||
body.emit(r0003);
|
||||
ir_variable *const r0004 = new(mem_ctx) ir_variable(glsl_type::uint64_t_type, "n64", ir_var_auto);
|
||||
body.emit(r0004);
|
||||
ir_variable *const r0005 = new(mem_ctx) ir_variable(glsl_type::int_type, "log2_denom", ir_var_auto);
|
||||
body.emit(r0005);
|
||||
ir_variable *const r0006 = new(mem_ctx) ir_variable(glsl_type::uvec2_type, "quot", ir_var_auto);
|
||||
body.emit(r0006);
|
||||
body.emit(assign(r0006, ir_constant::zero(mem_ctx, glsl_type::uvec2_type), 0x03));
|
||||
|
||||
ir_expression *const r0007 = expr(ir_unop_find_msb, swizzle_y(r0002));
|
||||
body.emit(assign(r0005, add(r0007, body.constant(int(32))), 0x01));
|
||||
|
||||
/* IF CONDITION */
|
||||
ir_expression *const r0009 = equal(swizzle_y(r0002), body.constant(0u));
|
||||
ir_expression *const r000A = nequal(swizzle_y(r0001), body.constant(0u));
|
||||
ir_expression *const r000B = logic_and(r0009, r000A);
|
||||
ir_if *f0008 = new(mem_ctx) ir_if(operand(r000B).val);
|
||||
exec_list *const f0008_parent_instructions = body.instructions;
|
||||
|
||||
/* THEN INSTRUCTIONS */
|
||||
body.instructions = &f0008->then_instructions;
|
||||
|
||||
ir_variable *const r000C = new(mem_ctx) ir_variable(glsl_type::int_type, "i", ir_var_auto);
|
||||
body.emit(r000C);
|
||||
ir_variable *const r000D = body.make_temp(glsl_type::int_type, "findMSB_retval");
|
||||
body.emit(assign(r000D, expr(ir_unop_find_msb, swizzle_x(r0002)), 0x01));
|
||||
|
||||
body.emit(assign(r0005, r000D, 0x01));
|
||||
|
||||
body.emit(assign(r000C, sub(body.constant(int(31)), r000D), 0x01));
|
||||
|
||||
/* LOOP BEGIN */
|
||||
ir_loop *f000E = new(mem_ctx) ir_loop();
|
||||
exec_list *const f000E_parent_instructions = body.instructions;
|
||||
|
||||
body.instructions = &f000E->body_instructions;
|
||||
|
||||
/* IF CONDITION */
|
||||
ir_expression *const r0010 = less(r000C, body.constant(int(1)));
|
||||
ir_if *f000F = new(mem_ctx) ir_if(operand(r0010).val);
|
||||
exec_list *const f000F_parent_instructions = body.instructions;
|
||||
|
||||
/* THEN INSTRUCTIONS */
|
||||
body.instructions = &f000F->then_instructions;
|
||||
|
||||
body.emit(new(mem_ctx) ir_loop_jump(ir_loop_jump::jump_break));
|
||||
|
||||
|
||||
body.instructions = f000F_parent_instructions;
|
||||
body.emit(f000F);
|
||||
|
||||
/* END IF */
|
||||
|
||||
/* IF CONDITION */
|
||||
ir_expression *const r0012 = lshift(swizzle_x(r0002), r000C);
|
||||
ir_expression *const r0013 = lequal(r0012, swizzle_y(r0001));
|
||||
ir_if *f0011 = new(mem_ctx) ir_if(operand(r0013).val);
|
||||
exec_list *const f0011_parent_instructions = body.instructions;
|
||||
|
||||
/* THEN INSTRUCTIONS */
|
||||
body.instructions = &f0011->then_instructions;
|
||||
|
||||
ir_expression *const r0014 = lshift(swizzle_x(r0002), r000C);
|
||||
body.emit(assign(r0001, sub(swizzle_y(r0001), r0014), 0x02));
|
||||
|
||||
ir_expression *const r0015 = lshift(body.constant(1u), r000C);
|
||||
body.emit(assign(r0006, bit_or(swizzle_y(r0006), r0015), 0x02));
|
||||
|
||||
|
||||
body.instructions = f0011_parent_instructions;
|
||||
body.emit(f0011);
|
||||
|
||||
/* END IF */
|
||||
|
||||
body.emit(assign(r000C, add(r000C, body.constant(int(-1))), 0x01));
|
||||
|
||||
/* LOOP END */
|
||||
|
||||
body.instructions = f000E_parent_instructions;
|
||||
body.emit(f000E);
|
||||
|
||||
/* IF CONDITION */
|
||||
ir_expression *const r0017 = lequal(swizzle_x(r0002), swizzle_y(r0001));
|
||||
ir_if *f0016 = new(mem_ctx) ir_if(operand(r0017).val);
|
||||
exec_list *const f0016_parent_instructions = body.instructions;
|
||||
|
||||
/* THEN INSTRUCTIONS */
|
||||
body.instructions = &f0016->then_instructions;
|
||||
|
||||
body.emit(assign(r0001, sub(swizzle_y(r0001), swizzle_x(r0002)), 0x02));
|
||||
|
||||
body.emit(assign(r0006, bit_or(swizzle_y(r0006), body.constant(1u)), 0x02));
|
||||
|
||||
|
||||
body.instructions = f0016_parent_instructions;
|
||||
body.emit(f0016);
|
||||
|
||||
/* END IF */
|
||||
|
||||
|
||||
body.instructions = f0008_parent_instructions;
|
||||
body.emit(f0008);
|
||||
|
||||
/* END IF */
|
||||
|
||||
body.emit(assign(r0004, expr(ir_unop_pack_uint_2x32, r0001), 0x01));
|
||||
|
||||
ir_expression *const r0018 = sub(body.constant(int(63)), r0005);
|
||||
body.emit(assign(r0003, expr(ir_binop_min, body.constant(int(31)), r0018), 0x01));
|
||||
|
||||
/* LOOP BEGIN */
|
||||
ir_loop *f0019 = new(mem_ctx) ir_loop();
|
||||
exec_list *const f0019_parent_instructions = body.instructions;
|
||||
|
||||
body.instructions = &f0019->body_instructions;
|
||||
|
||||
/* IF CONDITION */
|
||||
ir_expression *const r001B = less(r0003, body.constant(int(1)));
|
||||
ir_if *f001A = new(mem_ctx) ir_if(operand(r001B).val);
|
||||
exec_list *const f001A_parent_instructions = body.instructions;
|
||||
|
||||
/* THEN INSTRUCTIONS */
|
||||
body.instructions = &f001A->then_instructions;
|
||||
|
||||
body.emit(new(mem_ctx) ir_loop_jump(ir_loop_jump::jump_break));
|
||||
|
||||
|
||||
body.instructions = f001A_parent_instructions;
|
||||
body.emit(f001A);
|
||||
|
||||
/* END IF */
|
||||
|
||||
ir_variable *const r001C = body.make_temp(glsl_type::uint64_t_type, "assignment_tmp");
|
||||
ir_expression *const r001D = expr(ir_unop_pack_uint_2x32, r0002);
|
||||
body.emit(assign(r001C, lshift(r001D, r0003), 0x01));
|
||||
|
||||
/* IF CONDITION */
|
||||
ir_expression *const r001F = lequal(r001C, r0004);
|
||||
ir_if *f001E = new(mem_ctx) ir_if(operand(r001F).val);
|
||||
exec_list *const f001E_parent_instructions = body.instructions;
|
||||
|
||||
/* THEN INSTRUCTIONS */
|
||||
body.instructions = &f001E->then_instructions;
|
||||
|
||||
body.emit(assign(r0004, sub(r0004, r001C), 0x01));
|
||||
|
||||
ir_expression *const r0020 = lshift(body.constant(1u), r0003);
|
||||
body.emit(assign(r0006, bit_or(swizzle_x(r0006), r0020), 0x01));
|
||||
|
||||
|
||||
body.instructions = f001E_parent_instructions;
|
||||
body.emit(f001E);
|
||||
|
||||
/* END IF */
|
||||
|
||||
body.emit(assign(r0003, add(r0003, body.constant(int(-1))), 0x01));
|
||||
|
||||
/* LOOP END */
|
||||
|
||||
body.instructions = f0019_parent_instructions;
|
||||
body.emit(f0019);
|
||||
|
||||
ir_variable *const r0021 = body.make_temp(glsl_type::uint64_t_type, "packUint2x32_retval");
|
||||
body.emit(assign(r0021, expr(ir_unop_pack_uint_2x32, r0002), 0x01));
|
||||
|
||||
/* IF CONDITION */
|
||||
ir_expression *const r0023 = lequal(r0021, r0004);
|
||||
ir_if *f0022 = new(mem_ctx) ir_if(operand(r0023).val);
|
||||
exec_list *const f0022_parent_instructions = body.instructions;
|
||||
|
||||
/* THEN INSTRUCTIONS */
|
||||
body.instructions = &f0022->then_instructions;
|
||||
|
||||
ir_expression *const r0024 = expr(ir_unop_pack_uint_2x32, r0002);
|
||||
body.emit(assign(r0004, sub(r0004, r0024), 0x01));
|
||||
|
||||
body.emit(assign(r0006, bit_or(swizzle_x(r0006), body.constant(1u)), 0x01));
|
||||
|
||||
|
||||
body.instructions = f0022_parent_instructions;
|
||||
body.emit(f0022);
|
||||
|
||||
/* END IF */
|
||||
|
||||
ir_variable *const r0025 = body.make_temp(glsl_type::uvec4_type, "vec_ctor");
|
||||
body.emit(assign(r0025, r0006, 0x03));
|
||||
|
||||
body.emit(assign(r0025, expr(ir_unop_unpack_uint_2x32, r0004), 0x0c));
|
||||
|
||||
body.emit(ret(r0025));
|
||||
|
||||
sig->replace_parameters(&sig_parameters);
|
||||
return sig;
|
||||
}
|
@@ -354,10 +354,6 @@ const glsl_type *glsl_type::get_base_type() const
|
||||
return double_type;
|
||||
case GLSL_TYPE_BOOL:
|
||||
return bool_type;
|
||||
case GLSL_TYPE_UINT64:
|
||||
return uint64_t_type;
|
||||
case GLSL_TYPE_INT64:
|
||||
return int64_t_type;
|
||||
default:
|
||||
return error_type;
|
||||
}
|
||||
@@ -384,10 +380,6 @@ const glsl_type *glsl_type::get_scalar_type() const
|
||||
return double_type;
|
||||
case GLSL_TYPE_BOOL:
|
||||
return bool_type;
|
||||
case GLSL_TYPE_UINT64:
|
||||
return uint64_t_type;
|
||||
case GLSL_TYPE_INT64:
|
||||
return int64_t_type;
|
||||
default:
|
||||
/* Handle everything else */
|
||||
return type;
|
||||
@@ -527,31 +519,6 @@ glsl_type::bvec(unsigned components)
|
||||
}
|
||||
|
||||
|
||||
const glsl_type *
|
||||
glsl_type::i64vec(unsigned components)
|
||||
{
|
||||
if (components == 0 || components > 4)
|
||||
return error_type;
|
||||
|
||||
static const glsl_type *const ts[] = {
|
||||
int64_t_type, i64vec2_type, i64vec3_type, i64vec4_type
|
||||
};
|
||||
return ts[components - 1];
|
||||
}
|
||||
|
||||
|
||||
const glsl_type *
|
||||
glsl_type::u64vec(unsigned components)
|
||||
{
|
||||
if (components == 0 || components > 4)
|
||||
return error_type;
|
||||
|
||||
static const glsl_type *const ts[] = {
|
||||
uint64_t_type, u64vec2_type, u64vec3_type, u64vec4_type
|
||||
};
|
||||
return ts[components - 1];
|
||||
}
|
||||
|
||||
const glsl_type *
|
||||
glsl_type::get_instance(unsigned base_type, unsigned rows, unsigned columns)
|
||||
{
|
||||
@@ -575,10 +542,6 @@ glsl_type::get_instance(unsigned base_type, unsigned rows, unsigned columns)
|
||||
return dvec(rows);
|
||||
case GLSL_TYPE_BOOL:
|
||||
return bvec(rows);
|
||||
case GLSL_TYPE_UINT64:
|
||||
return u64vec(rows);
|
||||
case GLSL_TYPE_INT64:
|
||||
return i64vec(rows);
|
||||
default:
|
||||
return error_type;
|
||||
}
|
||||
@@ -1276,8 +1239,6 @@ glsl_type::component_slots() const
|
||||
return this->components();
|
||||
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
case GLSL_TYPE_UINT64:
|
||||
case GLSL_TYPE_INT64:
|
||||
return 2 * this->components();
|
||||
|
||||
case GLSL_TYPE_STRUCT:
|
||||
@@ -1360,8 +1321,6 @@ glsl_type::uniform_locations() const
|
||||
case GLSL_TYPE_INT:
|
||||
case GLSL_TYPE_FLOAT:
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
case GLSL_TYPE_UINT64:
|
||||
case GLSL_TYPE_INT64:
|
||||
case GLSL_TYPE_BOOL:
|
||||
case GLSL_TYPE_SAMPLER:
|
||||
case GLSL_TYPE_IMAGE:
|
||||
@@ -1391,8 +1350,6 @@ glsl_type::varying_count() const
|
||||
case GLSL_TYPE_FLOAT:
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
case GLSL_TYPE_BOOL:
|
||||
case GLSL_TYPE_UINT64:
|
||||
case GLSL_TYPE_INT64:
|
||||
return 1;
|
||||
|
||||
case GLSL_TYPE_STRUCT:
|
||||
@@ -1966,8 +1923,6 @@ glsl_type::count_attribute_slots(bool is_vertex_input) const
|
||||
case GLSL_TYPE_BOOL:
|
||||
return this->matrix_columns;
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
case GLSL_TYPE_UINT64:
|
||||
case GLSL_TYPE_INT64:
|
||||
if (this->vector_elements > 2 && !is_vertex_input)
|
||||
return this->matrix_columns * 2;
|
||||
else
|
||||
|
@@ -54,8 +54,6 @@ enum glsl_base_type {
|
||||
GLSL_TYPE_INT,
|
||||
GLSL_TYPE_FLOAT,
|
||||
GLSL_TYPE_DOUBLE,
|
||||
GLSL_TYPE_UINT64,
|
||||
GLSL_TYPE_INT64,
|
||||
GLSL_TYPE_BOOL,
|
||||
GLSL_TYPE_SAMPLER,
|
||||
GLSL_TYPE_IMAGE,
|
||||
@@ -71,9 +69,7 @@ enum glsl_base_type {
|
||||
|
||||
static inline bool glsl_base_type_is_64bit(enum glsl_base_type type)
|
||||
{
|
||||
return type == GLSL_TYPE_DOUBLE ||
|
||||
type == GLSL_TYPE_UINT64 ||
|
||||
type == GLSL_TYPE_INT64;
|
||||
return type == GLSL_TYPE_DOUBLE;
|
||||
}
|
||||
|
||||
enum glsl_sampler_dim {
|
||||
@@ -229,8 +225,6 @@ struct glsl_type {
|
||||
static const glsl_type *ivec(unsigned components);
|
||||
static const glsl_type *uvec(unsigned components);
|
||||
static const glsl_type *bvec(unsigned components);
|
||||
static const glsl_type *i64vec(unsigned components);
|
||||
static const glsl_type *u64vec(unsigned components);
|
||||
/**@}*/
|
||||
|
||||
/**
|
||||
@@ -468,7 +462,7 @@ struct glsl_type {
|
||||
*/
|
||||
bool is_numeric() const
|
||||
{
|
||||
return (base_type >= GLSL_TYPE_UINT) && (base_type <= GLSL_TYPE_INT64);
|
||||
return (base_type >= GLSL_TYPE_UINT) && (base_type <= GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -480,17 +474,8 @@ struct glsl_type {
|
||||
}
|
||||
|
||||
/**
|
||||
* Query whether or not a type is a 32-bit or 64-bit integer
|
||||
*/
|
||||
bool is_integer_32_64() const
|
||||
{
|
||||
return (base_type == GLSL_TYPE_UINT) || (base_type == GLSL_TYPE_INT) ||
|
||||
(base_type == GLSL_TYPE_UINT64) || (base_type == GLSL_TYPE_INT64);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query whether or not type is an integral type, or for struct and array
|
||||
* types, contains an integral type.
|
||||
* Query whether or not type is an integral type, or for struct, interface
|
||||
* and array types, contains an integral type.
|
||||
*/
|
||||
bool contains_integer() const;
|
||||
|
||||
|
@@ -846,8 +846,6 @@ nir_deref_get_const_initializer_load(nir_shader *shader, nir_deref_var *deref)
|
||||
case GLSL_TYPE_INT:
|
||||
case GLSL_TYPE_UINT:
|
||||
case GLSL_TYPE_DOUBLE:
|
||||
case GLSL_TYPE_UINT64:
|
||||
case GLSL_TYPE_INT64:
|
||||
case GLSL_TYPE_BOOL:
|
||||
load->value = constant->values[matrix_col];
|
||||
break;
|
||||
|
@@ -76,6 +76,7 @@ class Value(object):
|
||||
return Constant(val, name_base)
|
||||
|
||||
__template = mako.template.Template("""
|
||||
#include "compiler/nir/nir_search_helpers.h"
|
||||
static const ${val.c_type} ${val.name} = {
|
||||
{ ${val.type_enum}, ${val.bit_size} },
|
||||
% if isinstance(val, Constant):
|
||||
@@ -499,7 +500,6 @@ class SearchAndReplace(object):
|
||||
_algebraic_pass_template = mako.template.Template("""
|
||||
#include "nir.h"
|
||||
#include "nir_search.h"
|
||||
#include "nir_search_helpers.h"
|
||||
|
||||
#ifndef NIR_OPT_ALGEBRAIC_STRUCT_DEFS
|
||||
#define NIR_OPT_ALGEBRAIC_STRUCT_DEFS
|
||||
|
@@ -401,7 +401,9 @@ LOAD(input, 1, 2, BASE, COMPONENT, xx, NIR_INTRINSIC_CAN_ELIMINATE | NIR_INTRINS
|
||||
/* src[] = { vertex, offset }. const_index[] = { base, component } */
|
||||
LOAD(per_vertex_input, 2, 2, BASE, COMPONENT, xx, NIR_INTRINSIC_CAN_ELIMINATE | NIR_INTRINSIC_CAN_REORDER)
|
||||
/* src[] = { barycoord, offset }. const_index[] = { base, component } */
|
||||
LOAD(interpolated_input, 2, 2, BASE, COMPONENT, xx, NIR_INTRINSIC_CAN_ELIMINATE | NIR_INTRINSIC_CAN_REORDER)
|
||||
INTRINSIC(load_interpolated_input, 2, ARR(2, 1), true, 0, 0,
|
||||
2, BASE, COMPONENT, xx,
|
||||
NIR_INTRINSIC_CAN_ELIMINATE | NIR_INTRINSIC_CAN_REORDER)
|
||||
|
||||
/* src[] = { buffer_index, offset }. No const_index */
|
||||
LOAD(ssbo, 2, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE)
|
||||
|
@@ -189,7 +189,6 @@ lower_alu_instr_scalar(nir_alu_instr *instr, nir_builder *b)
|
||||
}
|
||||
|
||||
case nir_op_unpack_double_2x32:
|
||||
case nir_op_unpack_int_2x32:
|
||||
return false;
|
||||
|
||||
LOWER_REDUCTION(nir_op_fdot, nir_op_fmul, nir_op_fadd);
|
||||
|
@@ -30,8 +30,6 @@
|
||||
*
|
||||
* packDouble2x32(foo) -> packDouble2x32Split(foo.x, foo.y)
|
||||
* unpackDouble2x32(foo) -> vec2(unpackDouble2x32_x(foo), unpackDouble2x32_y(foo))
|
||||
* packInt2x32(foo) -> packInt2x32Split(foo.x, foo.y)
|
||||
* unpackInt2x32(foo) -> vec2(unpackInt2x32_x(foo), unpackInt2x32_y(foo))
|
||||
*/
|
||||
|
||||
static nir_ssa_def *
|
||||
@@ -48,20 +46,6 @@ lower_unpack_double(nir_builder *b, nir_ssa_def *src)
|
||||
nir_unpack_double_2x32_split_y(b, src));
|
||||
}
|
||||
|
||||
static nir_ssa_def *
|
||||
lower_pack_int(nir_builder *b, nir_ssa_def *src)
|
||||
{
|
||||
return nir_pack_int_2x32_split(b, nir_channel(b, src, 0),
|
||||
nir_channel(b, src, 1));
|
||||
}
|
||||
|
||||
static nir_ssa_def *
|
||||
lower_unpack_int(nir_builder *b, nir_ssa_def *src)
|
||||
{
|
||||
return nir_vec2(b, nir_unpack_int_2x32_split_x(b, src),
|
||||
nir_unpack_int_2x32_split_y(b, src));
|
||||
}
|
||||
|
||||
static void
|
||||
lower_double_pack_impl(nir_function_impl *impl)
|
||||
{
|
||||
@@ -76,32 +60,16 @@ lower_double_pack_impl(nir_function_impl *impl)
|
||||
nir_alu_instr *alu_instr = (nir_alu_instr *) instr;
|
||||
|
||||
if (alu_instr->op != nir_op_pack_double_2x32 &&
|
||||
alu_instr->op != nir_op_unpack_double_2x32 &&
|
||||
alu_instr->op != nir_op_pack_int_2x32 &&
|
||||
alu_instr->op != nir_op_unpack_int_2x32)
|
||||
alu_instr->op != nir_op_unpack_double_2x32)
|
||||
continue;
|
||||
|
||||
b.cursor = nir_before_instr(&alu_instr->instr);
|
||||
|
||||
nir_ssa_def *src = nir_ssa_for_alu_src(&b, alu_instr, 0);
|
||||
nir_ssa_def *dest;
|
||||
|
||||
switch (alu_instr->op) {
|
||||
case nir_op_pack_double_2x32:
|
||||
dest = lower_pack_double(&b, src);
|
||||
break;
|
||||
case nir_op_unpack_double_2x32:
|
||||
dest = lower_unpack_double(&b, src);
|
||||
break;
|
||||
case nir_op_pack_int_2x32:
|
||||
dest = lower_pack_int(&b, src);
|
||||
break;
|
||||
case nir_op_unpack_int_2x32:
|
||||
dest = lower_unpack_int(&b, src);
|
||||
break;
|
||||
default:
|
||||
unreachable("Impossible opcode");
|
||||
}
|
||||
nir_ssa_def *dest =
|
||||
alu_instr->op == nir_op_pack_double_2x32 ?
|
||||
lower_pack_double(&b, src) :
|
||||
lower_unpack_double(&b, src);
|
||||
|
||||
nir_ssa_def_rewrite_uses(&alu_instr->dest.dest.ssa, nir_src_for_ssa(dest));
|
||||
nir_instr_remove(&alu_instr->instr);
|
||||
|
@@ -95,7 +95,6 @@ tuint = "uint"
|
||||
tfloat32 = "float32"
|
||||
tint32 = "int32"
|
||||
tuint32 = "uint32"
|
||||
tint64 = "int64"
|
||||
tuint64 = "uint64"
|
||||
tfloat64 = "float64"
|
||||
|
||||
@@ -172,30 +171,14 @@ unop_convert("d2i", tint32, tfloat64, "src0") # Double-to-integer conversion.
|
||||
unop_convert("d2u", tuint32, tfloat64, "src0") # Double-to-unsigned conversion.
|
||||
unop_convert("i2f", tfloat32, tint32, "src0") # Integer-to-float conversion.
|
||||
unop_convert("i2d", tfloat64, tint32, "src0") # Integer-to-double conversion.
|
||||
unop_convert("i2i32", tint32, tint, "src0") # General int (int8_t, int64_t, etc.) to int32_t conversion
|
||||
unop_convert("u2i32", tint32, tuint, "src0") # General uint (uint8_t, uint64_t, etc.) to int32_t conversion
|
||||
unop_convert("i2u32", tuint32, tint, "src0") # General int (int8_t, int64_t, etc.) to uint32_t conversion
|
||||
unop_convert("u2u32", tuint32, tuint, "src0") # General uint (uint8_t, uint64_t, etc.) to uint32_t conversion
|
||||
unop_convert("i2i64", tint64, tint, "src0") # General int (int8_t, int32_t, etc.) to int64_t conversion
|
||||
unop_convert("u2i64", tint64, tuint, "src0") # General uint (uint8_t, uint64_t, etc.) to int64_t conversion
|
||||
unop_convert("f2i64", tint64, tfloat, "src0") # General float (float or double) to int64_t conversion
|
||||
unop_convert("i2u64", tuint64, tint, "src0") # General int (int8_t, int64_t, etc.) to uint64_t conversion
|
||||
unop_convert("u2u64", tuint64, tuint, "src0") # General uint (uint8_t, uint32_t, etc.) to uint64_t conversion
|
||||
unop_convert("f2u64", tuint64, tfloat, "src0") # General float (float or double) to uint64_t conversion
|
||||
unop_convert("i642f", tfloat32, tint64, "src0") # int64_t-to-float conversion.
|
||||
unop_convert("i642d", tfloat64, tint64, "src0") # int64_t-to-double conversion.
|
||||
unop_convert("u642f", tfloat32, tuint64, "src0") # uint64_t-to-float conversion.
|
||||
unop_convert("u642d", tfloat64, tuint64, "src0") # uint64_t-to-double conversion.
|
||||
|
||||
# Float-to-boolean conversion
|
||||
unop_convert("f2b", tbool, tfloat32, "src0 != 0.0f")
|
||||
unop_convert("d2b", tbool, tfloat64, "src0 != 0.0")
|
||||
# Boolean-to-float conversion
|
||||
unop_convert("b2f", tfloat32, tbool, "src0 ? 1.0f : 0.0f")
|
||||
# Int-to-boolean conversion
|
||||
unop_convert("i2b", tbool, tint, "src0 != 0")
|
||||
unop_convert("i2b", tbool, tint32, "src0 != 0")
|
||||
unop_convert("b2i", tint32, tbool, "src0 ? 1 : 0") # Boolean-to-int conversion
|
||||
unop_convert("b2i64", tint64, tbool, "src0 ? 1 : 0") # Boolean-to-int64_t conversion.
|
||||
unop_convert("u2f", tfloat32, tuint32, "src0") # Unsigned-to-float conversion.
|
||||
unop_convert("u2d", tfloat64, tuint32, "src0") # Unsigned-to-double conversion.
|
||||
# double-to-float conversion
|
||||
@@ -287,15 +270,9 @@ dst.x = (src0.x << 0) |
|
||||
unop_horiz("pack_double_2x32", 1, tuint64, 2, tuint32,
|
||||
"dst.x = src0.x | ((uint64_t)src0.y << 32);")
|
||||
|
||||
unop_horiz("pack_int_2x32", 1, tint64, 2, tint32,
|
||||
"dst.x = src0.x | ((int64_t)src0.y << 32);")
|
||||
|
||||
unop_horiz("unpack_double_2x32", 2, tuint32, 1, tuint64,
|
||||
"dst.x = src0.x; dst.y = src0.x >> 32;")
|
||||
|
||||
unop_horiz("unpack_int_2x32", 2, tint32, 1, tint64,
|
||||
"dst.x = src0.x; dst.y = src0.x >> 32;")
|
||||
|
||||
# Lowered floating point unpacking operations.
|
||||
|
||||
|
||||
@@ -306,8 +283,6 @@ unop_horiz("unpack_half_2x16_split_y", 1, tfloat32, 1, tuint32,
|
||||
|
||||
unop_convert("unpack_double_2x32_split_x", tuint32, tuint64, "src0")
|
||||
unop_convert("unpack_double_2x32_split_y", tuint32, tuint64, "src0 >> 32")
|
||||
unop_convert("unpack_int_2x32_split_x", tuint32, tuint64, "src0")
|
||||
unop_convert("unpack_int_2x32_split_y", tuint32, tuint64, "src0 >> 32")
|
||||
|
||||
# Bit operations, part of ARB_gpu_shader5.
|
||||
|
||||
@@ -492,9 +467,9 @@ binop("seq", tfloat32, commutative, "(src0 == src1) ? 1.0f : 0.0f") # Set on Equ
|
||||
binop("sne", tfloat32, commutative, "(src0 != src1) ? 1.0f : 0.0f") # Set on Not Equal
|
||||
|
||||
|
||||
opcode("ishl", 0, tint, [0, 0], [tint, tuint32], "", "src0 << src1")
|
||||
opcode("ishr", 0, tint, [0, 0], [tint, tuint32], "", "src0 >> src1")
|
||||
opcode("ushr", 0, tuint, [0, 0], [tuint, tuint32], "", "src0 >> src1")
|
||||
binop("ishl", tint, "", "src0 << src1")
|
||||
binop("ishr", tint, "", "src0 >> src1")
|
||||
binop("ushr", tuint, "", "src0 >> src1")
|
||||
|
||||
# bitwise logic operators
|
||||
#
|
||||
@@ -590,9 +565,6 @@ binop_horiz("pack_half_2x16_split", 1, tuint32, 1, tfloat32, 1, tfloat32,
|
||||
binop_convert("pack_double_2x32_split", tuint64, tuint32, "",
|
||||
"src0 | ((uint64_t)src1 << 32)")
|
||||
|
||||
binop_convert("pack_int_2x32_split", tuint64, tuint32, "",
|
||||
"src0 | ((uint64_t)src1 << 32)")
|
||||
|
||||
# bfm implements the behavior of the first operation of the SM5 "bfi" assembly
|
||||
# and that of the "bfi1" i965 instruction. That is, it has undefined behavior
|
||||
# if either of its arguments are 32.
|
||||
|
@@ -171,18 +171,6 @@ optimizations = [
|
||||
(('imax', a, a), a),
|
||||
(('umin', a, a), a),
|
||||
(('umax', a, a), a),
|
||||
(('fmin', a, ('fneg', a)), ('fneg', ('fabs', a))),
|
||||
(('imin', a, ('ineg', a)), ('ineg', ('iabs', a))),
|
||||
(('fmin', a, ('fneg', ('fabs', a))), ('fneg', ('fabs', a))),
|
||||
(('imin', a, ('ineg', ('iabs', a))), ('ineg', ('iabs', a))),
|
||||
(('fmin', a, ('fabs', a)), a),
|
||||
(('imin', a, ('iabs', a)), a),
|
||||
(('fmax', a, ('fneg', ('fabs', a))), a),
|
||||
(('imax', a, ('ineg', ('iabs', a))), a),
|
||||
(('fmax', a, ('fabs', a)), ('fabs', a)),
|
||||
(('imax', a, ('iabs', a)), ('iabs', a)),
|
||||
(('fmax', a, ('fneg', a)), ('fabs', a)),
|
||||
(('imax', a, ('ineg', a)), ('iabs', a)),
|
||||
(('~fmin', ('fmax', a, 0.0), 1.0), ('fsat', a), '!options->lower_fsat'),
|
||||
(('~fmax', ('fmin', a, 1.0), 0.0), ('fsat', a), '!options->lower_fsat'),
|
||||
(('fsat', a), ('fmin', ('fmax', a, 0.0), 1.0), 'options->lower_fsat'),
|
||||
@@ -364,19 +352,19 @@ optimizations = [
|
||||
('ubfe', 'value', 'offset', 'bits')),
|
||||
'options->lower_bitfield_extract'),
|
||||
|
||||
(('extract_i8', a, 'b@32'),
|
||||
(('extract_i8', a, b),
|
||||
('ishr', ('ishl', a, ('imul', ('isub', 3, b), 8)), 24),
|
||||
'options->lower_extract_byte'),
|
||||
|
||||
(('extract_u8', a, 'b@32'),
|
||||
(('extract_u8', a, b),
|
||||
('iand', ('ushr', a, ('imul', b, 8)), 0xff),
|
||||
'options->lower_extract_byte'),
|
||||
|
||||
(('extract_i16', a, 'b@32'),
|
||||
(('extract_i16', a, b),
|
||||
('ishr', ('ishl', a, ('imul', ('isub', 1, b), 16)), 16),
|
||||
'options->lower_extract_word'),
|
||||
|
||||
(('extract_u16', a, 'b@32'),
|
||||
(('extract_u16', a, b),
|
||||
('iand', ('ushr', a, ('imul', b, 16)), 0xffff),
|
||||
'options->lower_extract_word'),
|
||||
|
||||
|
@@ -460,7 +460,7 @@ is_loop_small_enough_to_unroll(nir_shader *shader, nir_loop_info *li)
|
||||
return true;
|
||||
|
||||
bool loop_not_too_large =
|
||||
li->num_instructions * li->trip_count <= max_iter * 26;
|
||||
li->num_instructions * li->trip_count <= max_iter * 25;
|
||||
|
||||
return loop_not_too_large;
|
||||
}
|
||||
|
@@ -330,17 +330,6 @@ print_constant(nir_constant *c, const struct glsl_type *type, print_state *state
|
||||
}
|
||||
break;
|
||||
|
||||
case GLSL_TYPE_UINT64:
|
||||
case GLSL_TYPE_INT64:
|
||||
/* Only float base types can be matrices. */
|
||||
assert(cols == 1);
|
||||
|
||||
for (i = 0; i < cols; i++) {
|
||||
if (i > 0) fprintf(fp, ", ");
|
||||
fprintf(fp, "0x%08" PRIx64, c->values[0].u64[i]);
|
||||
}
|
||||
break;
|
||||
|
||||
case GLSL_TYPE_STRUCT:
|
||||
for (i = 0; i < c->num_elements; i++) {
|
||||
if (i > 0) fprintf(fp, ", ");
|
||||
|
@@ -237,8 +237,6 @@ split_var_copies_block(nir_block *block, struct split_var_copies_state *state)
|
||||
break;
|
||||
case GLSL_TYPE_INT:
|
||||
case GLSL_TYPE_UINT:
|
||||
case GLSL_TYPE_INT64:
|
||||
case GLSL_TYPE_UINT64:
|
||||
case GLSL_TYPE_BOOL:
|
||||
assert(!glsl_type_is_matrix(src_tail->type));
|
||||
break;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user