Compare commits
414 Commits
18.3-branc
...
10.2
Author | SHA1 | Date | |
---|---|---|---|
|
52bd154980 | ||
|
9f1149876f | ||
|
b797208e6c | ||
|
8200c621a7 | ||
|
44dd7cbd52 | ||
|
bda7518e7c | ||
|
7d3f6f7995 | ||
|
907da04eb6 | ||
|
18336b99b2 | ||
|
38c5650656 | ||
|
b4584d9eed | ||
|
08923a1029 | ||
|
fc8fc3bfc8 | ||
|
f95fcb1716 | ||
|
1e2b4120f7 | ||
|
d2fba17b3d | ||
|
c68183afef | ||
|
ff935f267e | ||
|
be5e98ac2b | ||
|
804e3fc92c | ||
|
6eaa23d1ff | ||
|
e221e797b5 | ||
|
e1c04225c1 | ||
|
768fac116d | ||
|
4027062a3c | ||
|
d3c45235b6 | ||
|
e475222167 | ||
|
af2a612912 | ||
|
b8971318e7 | ||
|
5750eb3342 | ||
|
274c5424d0 | ||
|
f10161e477 | ||
|
3f570286fc | ||
|
9242770724 | ||
|
8e0f72995f | ||
|
ac75d9b6b6 | ||
|
b14b3e678f | ||
|
64d51e2507 | ||
|
25f5457e84 | ||
|
7ffc8556ca | ||
|
65324b89b8 | ||
|
0c739aa1d2 | ||
|
55d28925e6 | ||
|
ec7d081e13 | ||
|
c4fa2bc796 | ||
|
0dad6d0ab0 | ||
|
00ef4b0ab1 | ||
|
eb7c7032c3 | ||
|
a708926792 | ||
|
2a967f7128 | ||
|
eb38556137 | ||
|
836b0ae8b6 | ||
|
3fe59905fc | ||
|
8fe85c7742 | ||
|
c89719e955 | ||
|
6e46a1c0b3 | ||
|
86b7073739 | ||
|
36b8a16236 | ||
|
fefeba913b | ||
|
ac37c3c66e | ||
|
438346b6c5 | ||
|
8d9a4112f2 | ||
|
f293bb9664 | ||
|
0931f475fa | ||
|
6f8d2db2ef | ||
|
0374fdd5b6 | ||
|
fa03aa9a8a | ||
|
301a23c624 | ||
|
12e4e88c95 | ||
|
0ecb1cfad3 | ||
|
42bd348d21 | ||
|
e8d7e3bc57 | ||
|
869e6e3955 | ||
|
a92c1b1904 | ||
|
c5885eca15 | ||
|
f1ff7753f1 | ||
|
7b78cf4ae2 | ||
|
395d4e11cf | ||
|
cab73f6eba | ||
|
0e52107ff8 | ||
|
aba5b15068 | ||
|
477babf6f4 | ||
|
1cab5b5144 | ||
|
6761e28a46 | ||
|
0cdebea90c | ||
|
6601260464 | ||
|
a3eb6989ad | ||
|
eda6510425 | ||
|
8cb517e43a | ||
|
cdfc7c6c74 | ||
|
62f60edd77 | ||
|
66f88a4640 | ||
|
d82ca4e2b2 | ||
|
8b056fc486 | ||
|
346dda24bf | ||
|
efc7aa3187 | ||
|
5532cf9d7e | ||
|
bca8865aec | ||
|
629df2fbdd | ||
|
22ec7df0d7 | ||
|
1e0820032d | ||
|
485fd2a4eb | ||
|
56a455f5ba | ||
|
3e541f0ab8 | ||
|
82d46ebc07 | ||
|
29e2f11f5d | ||
|
8dc1caa1ad | ||
|
eef8b88e63 | ||
|
326648add1 | ||
|
ad0d1a1ab3 | ||
|
712933f1d6 | ||
|
8829b3c37a | ||
|
4c02b3d90e | ||
|
b6fe3e7ac2 | ||
|
323f0246ef | ||
|
686247ff62 | ||
|
d21e0d34fc | ||
|
8bb6628cb9 | ||
|
69d6ceda43 | ||
|
1abd1d0430 | ||
|
3baf37f076 | ||
|
12d68e9aaf | ||
|
a53047f6d1 | ||
|
b83b9b677b | ||
|
853cd6a4f7 | ||
|
c66da3d457 | ||
|
f75dfcee10 | ||
|
490d8ddf87 | ||
|
b9c5a8f869 | ||
|
c84b367b18 | ||
|
71102219ea | ||
|
d26ac40bad | ||
|
50dcc2eb26 | ||
|
0dfcf50639 | ||
|
6ff3da2509 | ||
|
378def4cab | ||
|
fcb6c0d2b8 | ||
|
d59406cdb7 | ||
|
f2023b8dc8 | ||
|
37114cc2eb | ||
|
f876eae80b | ||
|
8e91b094c8 | ||
|
6893c25c7b | ||
|
62ebb85cd4 | ||
|
8c8dc8c9e9 | ||
|
775895110c | ||
|
386648c555 | ||
|
0e6d8ca573 | ||
|
1233cdd98d | ||
|
7a856002d3 | ||
|
d8074a6a1c | ||
|
816d37e5c5 | ||
|
efe8cb1e53 | ||
|
54733e5cb8 | ||
|
6388ad51ff | ||
|
ab0ad8f7e9 | ||
|
1c386d5c35 | ||
|
e3c0c23873 | ||
|
2a90fbfce4 | ||
|
d374cfe0bc | ||
|
b56908d7db | ||
|
c6a6acb6b4 | ||
|
64ff84abae | ||
|
8f4e03c397 | ||
|
258f35441a | ||
|
cb04294b42 | ||
|
d389a863f2 | ||
|
7fcfdfb17b | ||
|
8612a12a62 | ||
|
8f787d3ca2 | ||
|
b323fa8957 | ||
|
d5d94598cb | ||
|
2efd0a3479 | ||
|
1a832e5846 | ||
|
d55a897929 | ||
|
276c6bb369 | ||
|
0273f22a10 | ||
|
e731031372 | ||
|
906727dccb | ||
|
d69c9114df | ||
|
9b062d2020 | ||
|
37005cafa4 | ||
|
abe859d56e | ||
|
1e6620997f | ||
|
9fd133747b | ||
|
5e1bfed1ca | ||
|
0618881c82 | ||
|
d00d73d1e1 | ||
|
33cb9f9503 | ||
|
0186858227 | ||
|
b20c82f74c | ||
|
8f77fbb6af | ||
|
afcb63802f | ||
|
8b2d1068b5 | ||
|
f96e3e5351 | ||
|
55b6821a9f | ||
|
a1b7c7d88e | ||
|
ff9cea8776 | ||
|
95ff8c6f18 | ||
|
e11b3f8fbc | ||
|
da80e6a1c4 | ||
|
5ba1cf1893 | ||
|
ff02e7995c | ||
|
ee4274c393 | ||
|
7b21ee08db | ||
|
f9718e4b93 | ||
|
3ca2119593 | ||
|
ad79d7e987 | ||
|
9bd6dc9371 | ||
|
89e3b89796 | ||
|
bcff69f18f | ||
|
6ae4aff303 | ||
|
500849f9cf | ||
|
05add05438 | ||
|
623e68fb1b | ||
|
a9750ff7b5 | ||
|
274be620a8 | ||
|
5751b661ad | ||
|
282ca8ba98 | ||
|
c50fa76c7e | ||
|
ad9264366a | ||
|
855adad132 | ||
|
3568cf8128 | ||
|
aca2d98c35 | ||
|
08317fa9c4 | ||
|
4d0c445af6 | ||
|
9ad103d664 | ||
|
12fcbcde47 | ||
|
d8e3158a43 | ||
|
ef5f998b76 | ||
|
31dd2a6f18 | ||
|
c07485eab1 | ||
|
3b941857ee | ||
|
6b753df1f4 | ||
|
01a79ac679 | ||
|
83be6a5517 | ||
|
348125e7f7 | ||
|
126600c918 | ||
|
ee2035a95f | ||
|
07a6f8bcab | ||
|
1d46c58b83 | ||
|
f7fd6e52ec | ||
|
a46fa0f9de | ||
|
f4a19c1e2c | ||
|
bed18b082a | ||
|
43752c3c37 | ||
|
aa03f78fc8 | ||
|
6194593661 | ||
|
7654120e86 | ||
|
d6d80b44c4 | ||
|
a5d00e243c | ||
|
bfff355cef | ||
|
1e1bdee5ec | ||
|
9e50fc3812 | ||
|
8c319b3f98 | ||
|
70ce1031e7 | ||
|
8c4845d29b | ||
|
1b69ea1c6d | ||
|
c2fc9fb907 | ||
|
28d41e409d | ||
|
f836ef63fd | ||
|
99b9a0973a | ||
|
d36d53b564 | ||
|
283cd12933 | ||
|
aa8ea648f4 | ||
|
e901f40764 | ||
|
d5e47ee66b | ||
|
932a5dadda | ||
|
203bc289a0 | ||
|
11b3011805 | ||
|
c62bc58cce | ||
|
304e80e356 | ||
|
f4aca6868a | ||
|
5ab9a9c0cc | ||
|
ae16f443c2 | ||
|
b8241bb3f2 | ||
|
224c193237 | ||
|
494f916125 | ||
|
767bc05309 | ||
|
3aaae6056e | ||
|
8b71741222 | ||
|
15ec4ef0da | ||
|
9fde5670e2 | ||
|
76e112380a | ||
|
8ac81e5b66 | ||
|
6d23a0b2a6 | ||
|
8f984928cc | ||
|
7ab2363c11 | ||
|
55b9effa4a | ||
|
5347fc5295 | ||
|
e8e48889e6 | ||
|
af3d4eddc1 | ||
|
75ae4fff35 | ||
|
c984e5bd2e | ||
|
ca6b38b80a | ||
|
b814afeb6c | ||
|
17c7ead727 | ||
|
2a29dbdc6e | ||
|
03e93f6079 | ||
|
bc4b9467af | ||
|
7efdc55f5f | ||
|
9ea859931e | ||
|
4e5296208d | ||
|
1ced952686 | ||
|
afe723ce5f | ||
|
8b74c2bdbd | ||
|
4afbd9b0e2 | ||
|
697316fe06 | ||
|
bfaee5277a | ||
|
9a8f12ae03 | ||
|
a31062fcb3 | ||
|
a1fff38c96 | ||
|
1db3ebd8a5 | ||
|
7cf3a674ea | ||
|
d2521a44af | ||
|
00f2dcb791 | ||
|
ed1ffa0197 | ||
|
5d056f51ab | ||
|
6be7789e11 | ||
|
d6a4c3c29c | ||
|
9028b94670 | ||
|
085d6bd5e7 | ||
|
fd0ea5be9d | ||
|
27d4836f35 | ||
|
e306ba9a9b | ||
|
81fb9ef112 | ||
|
32549f3f17 | ||
|
9576e17804 | ||
|
cc65bc4d15 | ||
|
25e641213f | ||
|
e084f71548 | ||
|
cdd328639f | ||
|
6440561737 | ||
|
fb4461b7dc | ||
|
fec2b45d02 | ||
|
d0c813c40a | ||
|
a05c073d79 | ||
|
031ee21961 | ||
|
b7604eff4c | ||
|
80da86c650 | ||
|
3c0ca023dd | ||
|
516db26e1e | ||
|
d5d9984c2b | ||
|
6db6f05fae | ||
|
c338759051 | ||
|
47a6830e22 | ||
|
3ffc507c94 | ||
|
c94e339adc | ||
|
a5951d09a5 | ||
|
3475ca1f00 | ||
|
3733cc3e8f | ||
|
ac49f97f12 | ||
|
d0aa394741 | ||
|
4baf6f12a5 | ||
|
21792665c7 | ||
|
872ea423ac | ||
|
ad8ad99eff | ||
|
62f1509070 | ||
|
eb2ef1641c | ||
|
947b60d19e | ||
|
cb37016f89 | ||
|
43ea5f9347 | ||
|
b5e717a618 | ||
|
f5848ec2e4 | ||
|
79a34441d5 | ||
|
1041fb86c0 | ||
|
b1aa25907a | ||
|
5d6e822d03 | ||
|
26d5b22039 | ||
|
3171da3402 | ||
|
875fd92d16 | ||
|
fb5c68d312 | ||
|
0e7b0f2a0a | ||
|
5f495b85a0 | ||
|
253834cbf6 | ||
|
f5c083dbc3 | ||
|
2b4a871e05 | ||
|
27da0bbeb4 | ||
|
91e2808c41 | ||
|
6cad93daab | ||
|
71f78bb87e | ||
|
ab43a98fcf | ||
|
af228e999c | ||
|
725a27e04d | ||
|
b0609b715b | ||
|
ca549a0f19 | ||
|
407bff9db0 | ||
|
0e14b19492 | ||
|
a233f4c303 | ||
|
7a81788c67 | ||
|
13bb2bc84b | ||
|
98b66e8d96 | ||
|
0b3126bddd | ||
|
f2682b3b9f | ||
|
d259928a56 | ||
|
ec6bd21162 | ||
|
53a0f9d0ba | ||
|
0f0f1106b6 | ||
|
2b34277bbd | ||
|
e29daf82cc | ||
|
03673bcf6c | ||
|
af47859aed | ||
|
e120f1a958 | ||
|
cc92276cb8 | ||
|
fac042fa05 | ||
|
d26b59ec27 | ||
|
c2c15a9a37 | ||
|
e6c98309c6 | ||
|
ffc0cc027a | ||
|
658d0410d0 | ||
|
a1dd1e62fa | ||
|
c7a3c2d29d | ||
|
0a5034517a | ||
|
e8f6150320 |
@@ -24,7 +24,7 @@
|
|||||||
# BOARD_GPU_DRIVERS should be defined. The valid values are
|
# BOARD_GPU_DRIVERS should be defined. The valid values are
|
||||||
#
|
#
|
||||||
# classic drivers: i915 i965
|
# classic drivers: i915 i965
|
||||||
# gallium drivers: swrast i915g ilo nouveau r300g r600g radeonsi vmwgfx
|
# gallium drivers: swrast freedreno i915g ilo nouveau r300g r600g radeonsi vmwgfx
|
||||||
#
|
#
|
||||||
# The main target is libGLES_mesa. For each classic driver enabled, a DRI
|
# The main target is libGLES_mesa. For each classic driver enabled, a DRI
|
||||||
# module will also be built. DRI modules will be loaded by libGLES_mesa.
|
# module will also be built. DRI modules will be loaded by libGLES_mesa.
|
||||||
@@ -42,7 +42,7 @@ DRM_TOP := external/drm
|
|||||||
DRM_GRALLOC_TOP := hardware/drm_gralloc
|
DRM_GRALLOC_TOP := hardware/drm_gralloc
|
||||||
|
|
||||||
classic_drivers := i915 i965
|
classic_drivers := i915 i965
|
||||||
gallium_drivers := swrast i915g ilo nouveau r300g r600g radeonsi vmwgfx
|
gallium_drivers := swrast freedreno i915g ilo nouveau r300g r600g radeonsi vmwgfx
|
||||||
|
|
||||||
MESA_GPU_DRIVERS := $(strip $(BOARD_GPU_DRIVERS))
|
MESA_GPU_DRIVERS := $(strip $(BOARD_GPU_DRIVERS))
|
||||||
|
|
||||||
|
11
Makefile.am
11
Makefile.am
@@ -64,14 +64,13 @@ IGNORE_FILES = \
|
|||||||
|
|
||||||
parsers: configure
|
parsers: configure
|
||||||
$(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp glcpp/glcpp-lex.c glcpp/glcpp-parse.c glcpp/glcpp-parse.h
|
$(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp glcpp/glcpp-lex.c glcpp/glcpp-parse.c glcpp/glcpp-parse.h
|
||||||
$(MAKE) -C src/mesa program/lex.yy.c program/program_parse.tab.c program/program_parse.tab.h
|
|
||||||
|
|
||||||
# Everything for new a Mesa release:
|
# Everything for new a Mesa release:
|
||||||
ARCHIVES = $(PACKAGE_NAME).tar.gz \
|
ARCHIVES = $(PACKAGE_NAME).tar.gz \
|
||||||
$(PACKAGE_NAME).tar.bz2 \
|
$(PACKAGE_NAME).tar.bz2 \
|
||||||
$(PACKAGE_NAME).zip
|
$(PACKAGE_NAME).zip
|
||||||
|
|
||||||
tarballs: md5
|
tarballs: checksums
|
||||||
rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar
|
rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar
|
||||||
|
|
||||||
manifest.txt: .git
|
manifest.txt: .git
|
||||||
@@ -98,9 +97,9 @@ $(PACKAGE_NAME).zip: parsers ../$(PACKAGE_DIR) manifest.txt
|
|||||||
zip -q -@ $(PACKAGE_NAME).zip < $(PACKAGE_DIR)/manifest.txt ; \
|
zip -q -@ $(PACKAGE_NAME).zip < $(PACKAGE_DIR)/manifest.txt ; \
|
||||||
mv $(PACKAGE_NAME).zip $(PACKAGE_DIR)
|
mv $(PACKAGE_NAME).zip $(PACKAGE_DIR)
|
||||||
|
|
||||||
md5: $(ARCHIVES)
|
checksums: $(ARCHIVES)
|
||||||
@-md5sum $(PACKAGE_NAME).tar.gz
|
@-sha256sum $(PACKAGE_NAME).tar.gz
|
||||||
@-md5sum $(PACKAGE_NAME).tar.bz2
|
@-sha256sum $(PACKAGE_NAME).tar.bz2
|
||||||
@-md5sum $(PACKAGE_NAME).zip
|
@-sha256sum $(PACKAGE_NAME).zip
|
||||||
|
|
||||||
.PHONY: tarballs md5
|
.PHONY: tarballs md5
|
||||||
|
30
bin/.cherry-ignore
Normal file
30
bin/.cherry-ignore
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# The first is the change, and the second is the revert of that change.
|
||||||
|
e6967270c75a5b669152127bb7a746d55f4407a6 i965: Fix depth (array slices) computation for 1D_ARRAY render targets.
|
||||||
|
155f98d49fdc2f46c760f8214327b3804ee60079 Revert "i965: Fix depth (array slices) computation for 1D_ARRAY render targets."
|
||||||
|
|
||||||
|
# This patch didn't have enough in the commit message to convince me it
|
||||||
|
# is a bug fix, (email sent to author asking for more information).
|
||||||
|
41d759d076737f94976f5294b734dbc437a12bae
|
||||||
|
|
||||||
|
# These patch were already cherry-picked before the 10.2.4 release.
|
||||||
|
#
|
||||||
|
# But get-pick-list.sh doesn't realize that because the commit messages for
|
||||||
|
# these on the stable branch reference commit IDs that don't actually appear
|
||||||
|
# on master. I'm not sure what happened, (perhaps master was force-pushed at
|
||||||
|
# some point?).
|
||||||
|
2eaf3f670fea4ce4466340141244e41a45542c13
|
||||||
|
e5adc560cc8544200faa3e04504202839626ab37
|
||||||
|
cf1b5eee7f36af29d1d5caba3538ad4985e51f81
|
||||||
|
|
||||||
|
# The patch depends on earlier ones that are not part of 10.2.
|
||||||
|
b3121bfd413973f460e2cc9a9f852bdfa1265fcf mesa: guard better when building with sse4.1 optimisations
|
||||||
|
|
||||||
|
# The PIPE_CAP is not in mesa 10.2 - breaks the build.
|
||||||
|
72969e0efb7a5a011629c1001e81aa2329ede6b1 radeon/compute: Report a value for PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE
|
||||||
|
|
||||||
|
# No whitespace fixes for the stable branches.
|
||||||
|
38fccc37c1fa57c1fd373e8d71621bb4aed31083 radeonsi/compute: Whitespace fixes
|
||||||
|
|
||||||
|
# The commit relies of patches restructuring r600_resource, which never made
|
||||||
|
# it in the 10.2 branch.
|
||||||
|
a15088338ebe544efd90bfa7934cb99521488141 radeonsi/compute: Stop leaking the input buffer
|
@@ -14,7 +14,7 @@ git log --reverse --grep="cherry picked from commit" origin/master..HEAD |\
|
|||||||
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
|
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.
|
# 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='^\([[:space:]]*NOTE: .*[Cc]andidate\|CC:.*10\.2.*mesa-stable\)' HEAD..origin/master |\
|
||||||
while read sha
|
while read sha
|
||||||
do
|
do
|
||||||
# Check to see whether the patch is on the ignore list.
|
# Check to see whether the patch is on the ignore list.
|
||||||
|
49
configure.ac
49
configure.ac
@@ -331,6 +331,19 @@ LDFLAGS=$save_LDFLAGS
|
|||||||
|
|
||||||
AC_SUBST([GC_SECTIONS])
|
AC_SUBST([GC_SECTIONS])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl OpenBSD does not have DT_NEEDED entries for libc by design
|
||||||
|
dnl so when these flags are passed to ld via libtool the checks will fail
|
||||||
|
dnl
|
||||||
|
case "$host_os" in
|
||||||
|
openbsd*)
|
||||||
|
LD_NO_UNDEFINED="" ;;
|
||||||
|
*)
|
||||||
|
LD_NO_UNDEFINED="-Wl,--no-undefined" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AC_SUBST([LD_NO_UNDEFINED])
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl compatibility symlinks
|
dnl compatibility symlinks
|
||||||
dnl
|
dnl
|
||||||
@@ -481,10 +494,10 @@ AC_CHECK_FUNC([dlopen], [DEFINES="$DEFINES -DHAVE_DLOPEN"],
|
|||||||
AC_SUBST([DLOPEN_LIBS])
|
AC_SUBST([DLOPEN_LIBS])
|
||||||
|
|
||||||
dnl Check if that library also has dladdr
|
dnl Check if that library also has dladdr
|
||||||
save_LDFLAGS="$LDFLAGS"
|
save_LIBS="$LIBS"
|
||||||
LDFLAGS="$LDFLAGS $DLOPEN_LIBS"
|
LIBS="$LIBS $DLOPEN_LIBS"
|
||||||
AC_CHECK_FUNCS([dladdr])
|
AC_CHECK_FUNCS([dladdr])
|
||||||
LDFLAGS="$save_LDFLAGS"
|
LIBS="$save_LIBS"
|
||||||
|
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
darwin*|mingw*)
|
darwin*|mingw*)
|
||||||
@@ -1179,6 +1192,13 @@ if test "x$enable_gbm" = xyes; then
|
|||||||
if test "x$enable_shared_glapi" = xno; then
|
if test "x$enable_shared_glapi" = xno; then
|
||||||
AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi])
|
AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi])
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
# Strictly speaking libgbm does not require --enable-dri, although
|
||||||
|
# both of its backends do. Thus one can build libgbm without any
|
||||||
|
# backends if --disable-dri is set.
|
||||||
|
# To avoid unnecessary complexity of checking if at least one backend
|
||||||
|
# is available when building, just mandate --enable-dri.
|
||||||
|
AC_MSG_ERROR([gbm requires --enable-dri])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)
|
AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)
|
||||||
@@ -1253,6 +1273,10 @@ if test "x$enable_gallium_gbm" = xyes; then
|
|||||||
AC_MSG_ERROR([gbm_gallium requires --enable-dri to build])
|
AC_MSG_ERROR([gbm_gallium requires --enable-dri to build])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "x$enable_gallium_egl" != xyes; then
|
||||||
|
AC_MSG_ERROR([gbm_gallium is only used by egl_gallium])
|
||||||
|
fi
|
||||||
|
|
||||||
GALLIUM_STATE_TRACKERS_DIRS="gbm $GALLIUM_STATE_TRACKERS_DIRS"
|
GALLIUM_STATE_TRACKERS_DIRS="gbm $GALLIUM_STATE_TRACKERS_DIRS"
|
||||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS gbm"
|
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS gbm"
|
||||||
enable_gallium_loader=yes
|
enable_gallium_loader=yes
|
||||||
@@ -1273,6 +1297,7 @@ if test "x$enable_xa" = xyes; then
|
|||||||
fi
|
fi
|
||||||
GALLIUM_STATE_TRACKERS_DIRS="xa $GALLIUM_STATE_TRACKERS_DIRS"
|
GALLIUM_STATE_TRACKERS_DIRS="xa $GALLIUM_STATE_TRACKERS_DIRS"
|
||||||
enable_gallium_loader=yes
|
enable_gallium_loader=yes
|
||||||
|
enable_gallium_drm_loader=yes
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(HAVE_ST_XA, test "x$enable_xa" = xyes)
|
AM_CONDITIONAL(HAVE_ST_XA, test "x$enable_xa" = xyes)
|
||||||
|
|
||||||
@@ -1303,7 +1328,7 @@ AM_CONDITIONAL(HAVE_OPENVG, test "x$enable_openvg" = xyes)
|
|||||||
dnl
|
dnl
|
||||||
dnl Gallium G3DVL configuration
|
dnl Gallium G3DVL configuration
|
||||||
dnl
|
dnl
|
||||||
if test -n "$with_gallium_drivers" && ! echo "$with_gallium_drivers" | grep -q 'swrast'; then
|
if test -n "$with_gallium_drivers" -a "x$with_gallium_drivers" != xswrast; then
|
||||||
if test "x$enable_xvmc" = xauto; then
|
if test "x$enable_xvmc" = xauto; then
|
||||||
PKG_CHECK_EXISTS([xvmc], [enable_xvmc=yes], [enable_xvmc=no])
|
PKG_CHECK_EXISTS([xvmc], [enable_xvmc=yes], [enable_xvmc=no])
|
||||||
fi
|
fi
|
||||||
@@ -1558,6 +1583,7 @@ strip_unwanted_llvm_flags() {
|
|||||||
# Use \> (marks the end of the word)
|
# Use \> (marks the end of the word)
|
||||||
echo `$1` | sed \
|
echo `$1` | sed \
|
||||||
-e 's/-DNDEBUG\>//g' \
|
-e 's/-DNDEBUG\>//g' \
|
||||||
|
-e 's/-D_GNU_SOURCE\>//g' \
|
||||||
-e 's/-pedantic\>//g' \
|
-e 's/-pedantic\>//g' \
|
||||||
-e 's/-Wcovered-switch-default\>//g' \
|
-e 's/-Wcovered-switch-default\>//g' \
|
||||||
-e 's/-O.\>//g' \
|
-e 's/-O.\>//g' \
|
||||||
@@ -1605,6 +1631,11 @@ if test "x$enable_gallium_llvm" = xyes; then
|
|||||||
AC_COMPUTE_INT([LLVM_VERSION_MINOR], [LLVM_VERSION_MINOR],
|
AC_COMPUTE_INT([LLVM_VERSION_MINOR], [LLVM_VERSION_MINOR],
|
||||||
[#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
|
[#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
|
||||||
|
|
||||||
|
LLVM_VERSION_PATCH=`echo $LLVM_VERSION | cut -d. -f3 | egrep -o '^[[0-9]]+'`
|
||||||
|
if test -z "$LLVM_VERSION_PATCH"; then
|
||||||
|
LLVM_VERSION_PATCH=0
|
||||||
|
fi
|
||||||
|
|
||||||
if test -n "${LLVM_VERSION_MAJOR}"; then
|
if test -n "${LLVM_VERSION_MAJOR}"; then
|
||||||
LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
|
LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
|
||||||
else
|
else
|
||||||
@@ -1627,7 +1658,7 @@ if test "x$enable_gallium_llvm" = xyes; then
|
|||||||
LLVM_COMPONENTS="${LLVM_COMPONENTS} option"
|
LLVM_COMPONENTS="${LLVM_COMPONENTS} option"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT"
|
DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DLLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
|
||||||
MESA_LLVM=1
|
MESA_LLVM=1
|
||||||
|
|
||||||
dnl Check for Clang internal headers
|
dnl Check for Clang internal headers
|
||||||
@@ -1646,6 +1677,10 @@ if test "x$enable_gallium_llvm" = xyes; then
|
|||||||
else
|
else
|
||||||
MESA_LLVM=0
|
MESA_LLVM=0
|
||||||
LLVM_VERSION_INT=0
|
LLVM_VERSION_INT=0
|
||||||
|
|
||||||
|
if test "x$enable_opencl" = xyes; then
|
||||||
|
AC_MSG_ERROR([cannot enable OpenCL without LLVM])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Directory for XVMC libs
|
dnl Directory for XVMC libs
|
||||||
@@ -1726,6 +1761,7 @@ gallium_check_st() {
|
|||||||
|
|
||||||
gallium_require_llvm() {
|
gallium_require_llvm() {
|
||||||
if test "x$MESA_LLVM" = x0; then
|
if test "x$MESA_LLVM" = x0; then
|
||||||
|
case "$host" in *gnux32) return;; esac
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
i*86|x86_64|amd64) AC_MSG_ERROR([LLVM is required to build $1 on x86 and x86_64]);;
|
i*86|x86_64|amd64) AC_MSG_ERROR([LLVM is required to build $1 on x86 and x86_64]);;
|
||||||
esac
|
esac
|
||||||
@@ -1778,6 +1814,9 @@ if test -n "$with_gallium_drivers"; then
|
|||||||
case "x$driver" in
|
case "x$driver" in
|
||||||
xsvga)
|
xsvga)
|
||||||
HAVE_GALLIUM_SVGA=yes
|
HAVE_GALLIUM_SVGA=yes
|
||||||
|
if test "x$have_libdrm" != xyes; then
|
||||||
|
AC_MSG_ERROR([Building svga requires libdrm >= $LIBDRM_REQUIRED])
|
||||||
|
fi
|
||||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga softpipe"
|
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga softpipe"
|
||||||
gallium_require_drm_loader
|
gallium_require_drm_loader
|
||||||
gallium_check_st "svga/drm" "dri-vmwgfx" ""
|
gallium_check_st "svga/drm" "dri-vmwgfx" ""
|
||||||
|
@@ -16,6 +16,20 @@
|
|||||||
|
|
||||||
<h1>News</h1>
|
<h1>News</h1>
|
||||||
|
|
||||||
|
<h2>June 6, 2014</h2>
|
||||||
|
<p>
|
||||||
|
<a href="relnotes/10.2.1.html">Mesa 10.2.1</a> is released. This release
|
||||||
|
only fixes a build error in the radeonsi driver that was introduced between
|
||||||
|
10.2-rc5 and the 10.2 final release.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>June 6, 2014</h2>
|
||||||
|
<p>
|
||||||
|
<a href="relnotes/10.2.html">Mesa 10.2</a> is released. This is a new
|
||||||
|
development release. See the release notes for more information about
|
||||||
|
the release.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h2>April 18, 2014</h2>
|
<h2>April 18, 2014</h2>
|
||||||
<p>
|
<p>
|
||||||
<a href="relnotes/10.1.1.html">Mesa 10.1.1</a> is released.
|
<a href="relnotes/10.1.1.html">Mesa 10.1.1</a> is released.
|
||||||
|
@@ -21,6 +21,8 @@ The release notes summarize what's new or changed in each Mesa release.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li><a href="relnotes/10.2.1.html">10.2.1 release notes</a>
|
||||||
|
<li><a href="relnotes/10.2.html">10.2 release notes</a>
|
||||||
<li><a href="relnotes/10.1.1.html">10.1.1 release notes</a>
|
<li><a href="relnotes/10.1.1.html">10.1.1 release notes</a>
|
||||||
<li><a href="relnotes/10.1.html">10.1 release notes</a>
|
<li><a href="relnotes/10.1.html">10.1 release notes</a>
|
||||||
<li><a href="relnotes/10.0.5.html">10.0.5 release notes</a>
|
<li><a href="relnotes/10.0.5.html">10.0.5 release notes</a>
|
||||||
|
61
docs/relnotes/10.2.1.html
Normal file
61
docs/relnotes/10.2.1.html
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
<!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 10.2.1 Release Notes / June 6, 2014</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.1 is a bug fix release which fixes bugs found since the 10.1 release.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.1 implements the OpenGL 3.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 3.3. OpenGL
|
||||||
|
3.3 is <strong>only</strong> available if requested at context creation
|
||||||
|
because compatibility contexts are not supported.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>MD5 checksums</h2>
|
||||||
|
<pre>
|
||||||
|
96f892dae2d0bb14ac9c2113f586c909 MesaLib-10.2.1.tar.gz
|
||||||
|
093f9b5d077e5f6061dcd7b01b7aa51a MesaLib-10.2.1.tar.bz2
|
||||||
|
6ab76c1608e5deed1eb8b54c62d7a48a MesaLib-10.2.1.zip
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>New features</h2>
|
||||||
|
<p>None</p>
|
||||||
|
|
||||||
|
<h2>Bug fixes</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mesa 10.2 had a build problem in the radeonsi driver due to an error resolving
|
||||||
|
conflicts in a patch cherry-pick from master. The build error is fixed.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Changes</h2>
|
||||||
|
|
||||||
|
<p>Ian Romanick (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>docs: Add MD5 checksum, etc. for 10.1 release</li>
|
||||||
|
<li>radeonsi: Fix build error introduced in 5ab9a9c</li>
|
||||||
|
<li>Bump version to 10.2.1</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
181
docs/relnotes/10.2.2.html
Normal file
181
docs/relnotes/10.2.2.html
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
<!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 10.2.2 Release Notes / June 24, 2014</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.2 is a bug fix release which fixes bugs found since the 10.2.1 release.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.2 implements the OpenGL 3.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 3.3. OpenGL
|
||||||
|
3.3 is <strong>only</strong> available if requested at context creation
|
||||||
|
because compatibility contexts are not supported.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>SHA256 checksums</h2>
|
||||||
|
<pre>
|
||||||
|
38c4a40364000f89cddaa1694f6f3cfb444981d1110238ce603093585477399c MesaLib-10.2.2.tar.bz2
|
||||||
|
2af2ec8b4db624c352e961eefbcce6c8d1f86d44c5542f6f378c50e1b958d453 MesaLib-10.2.2.tar.gz
|
||||||
|
d4c0372da59367a344d62ebcdf5cf61039c9cae6925f40f2dab8f8d95cf22da9 MesaLib-10.2.2.zip
|
||||||
|
</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=54372">Bug 54372</a> - GLX_INTEL_swap_event crashes driver when swapping window buffers</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66452">Bug 66452</a> - JUNIPER UVD accelerated playback of WMV3 streams does not work</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74005">Bug 74005</a> - [i965 Bisected]Piglit/glx_glx-make-glxdrawable-current fails</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77865">Bug 77865</a> - [BDW] Many Ogles3conform framebuffer_blit cases fail</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=78581">Bug 78581</a> - OpenCL: clBuildProgram prints error messages directly rather than storing them</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79029">Bug 79029</a> - INTEL_DEBUG=shader_time is full of lies</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79729">Bug 79729</a> - [i965] glClear on a multisample texture doesn't work</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79907">Bug 79907</a> - Mesa 10.2.1 --enable-vdpau default=auto broken</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80115">Bug 80115</a> - MESA_META_DRAW_BUFFERS induced GL_INVALID_VALUE errors</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Changes</h2>
|
||||||
|
|
||||||
|
<p>Adrian Negreanu (8):</p>
|
||||||
|
<ul>
|
||||||
|
<li>add megadriver_stub_FILES</li>
|
||||||
|
<li>android: adapt to the megadriver mechanism</li>
|
||||||
|
<li>android: add libloader to libGLES_mesa and libmesa_egl_dri2</li>
|
||||||
|
<li>android: add src/gallium/auxiliary as include path for libmesa_dricore</li>
|
||||||
|
<li>android, egl: add correct drm include for libmesa_egl_dri2</li>
|
||||||
|
<li>android, egl: typo dri2_fallback_pixmap_surface -> dri2_fallback_create_pixmap_surface</li>
|
||||||
|
<li>android, mesa_gen_matypes: pull in timespec POSIX definition</li>
|
||||||
|
<li>android, dricore: undefined reference to _mesa_streaming_load_memcpy</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Carl Worth (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>Update VERSION to 10.2.2</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Daniel Manjarres (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>glx: Don't crash on swap event for a Window (non-GLXWindow)</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Emil Velikov (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>targets/xa: limit the amount of exported symbols</li>
|
||||||
|
<li>configure: error out when building opencl without LLVM</li>
|
||||||
|
<li>configure: correctly autodetect xvmc/vdpau/omx</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Grigori Goronzy (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>radeon/uvd: disable VC-1 simple/main on UVD 2.x</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Iago Toral Quiroga (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: Copy Geom.UsesEndPrimitive when cloning a geometry program.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ian Romanick (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>docs: Add initial 10.2.1 release notes</li>
|
||||||
|
<li>docs: Add MD5 checksum, etc. for 10.2.1 release</li>
|
||||||
|
<li>meta: Respect the driver's maximum number of draw buffers</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ilia Mirkin (7):</p>
|
||||||
|
<ul>
|
||||||
|
<li>gk110/ir: emit saturate flag on fadd when needed</li>
|
||||||
|
<li>gk110/ir: fix emitting constbuf file index</li>
|
||||||
|
<li>gk110/ir: fix bfind emission</li>
|
||||||
|
<li>nv50: make sure to mark first scissor dirty after blit</li>
|
||||||
|
<li>nv30: plug some memory leaks on screen destroy and shader compile</li>
|
||||||
|
<li>nv30: avoid dangling references to deleted contexts</li>
|
||||||
|
<li>nv30: hack to avoid errors on unexpected color/zeta combinations</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Jason Ekstrand (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>meta_blit: properly compute texture width for the CopyTexSubImage fallback</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>José Fonseca (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa/main: Prevent sefgault on glGetIntegerv(GL_ATOMIC_COUNTER_BUFFER_BINDING).</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Kenneth Graunke (9):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: Don't use the head sentinel as an fs_inst in Gen4 workaround code.</li>
|
||||||
|
<li>i965: Invalidate live intervals when inserting Gen4 SEND workarounds.</li>
|
||||||
|
<li>i965/vec4: Fix dead code elimination for VGRFs of size > 1.</li>
|
||||||
|
<li>i965: Add missing MOCS setup for 3DSTATE_INDEX_BUFFER on Broadwell.</li>
|
||||||
|
<li>i965: Drop Broadwell perf_debugs about missing MOCS that aren't missing.</li>
|
||||||
|
<li>i965: Add missing newlines to a few perf_debug messages.</li>
|
||||||
|
<li>i965/vec4: Use the sampler for pull constant loads on Broadwell.</li>
|
||||||
|
<li>i965: Use 8x4 aligned rectangles for HiZ operations on Broadwell.</li>
|
||||||
|
<li>i965: Save meta stencil blit programs in the context.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Kristian Høgsberg (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: Remove glClear optimization based on drawable size</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Michel Dänzer (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>configure: Only check for OpenCL without LLVM when the latter is certain</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Neil Roberts (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: Set the fast clear color value for texture surfaces</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Tom Stellard (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>clover: Prevent Clang from printing number of errors and warnings to stderr.</li>
|
||||||
|
<li>clover: Don't use llvm's global context</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ville Syrjälä (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i915: Fix gen2 texblend setup</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
130
docs/relnotes/10.2.3.html
Normal file
130
docs/relnotes/10.2.3.html
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
<!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 10.2.3 Release Notes / July 7, 2014</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.3 is a bug fix release which fixes bugs found since the 10.2.2 release.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.3 implements the OpenGL 3.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 3.3. OpenGL
|
||||||
|
3.3 is <strong>only</strong> available if requested at context creation
|
||||||
|
because compatibility contexts are not supported.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>SHA256 checksums</h2>
|
||||||
|
<pre>
|
||||||
|
e482a96170c98b17d6aba0d6e4dda4b9a2e61c39587bb64ac38cadfa4aba4aeb MesaLib-10.2.3.tar.bz2
|
||||||
|
96cffacaa1c52ae659b3b0f91be2eebf5528b748934256751261fb79ea3d6636 MesaLib-10.2.3.tar.gz
|
||||||
|
82cab6ff14c8038ee39842dbdea0d447a78d119efd8d702d1497bc7c246434e9 MesaLib-10.2.3.zip
|
||||||
|
</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=76223">Bug 76223</a> - </li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79823">Bug 79823</a> - </li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80015">Bug 80015</a> - </li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Changes</h2>
|
||||||
|
|
||||||
|
<p>Aaron Watry (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>radeon/llvm: Allocate space for kernel metadata operands</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Carl Worth (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>docs: Add sha256 sums for the 10.2.2 release</li>
|
||||||
|
<li>cherry-ignore: Add a patch that's been rejected</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ilia Mirkin (4):</p>
|
||||||
|
<ul>
|
||||||
|
<li>nouveau: dup fd before passing it to device</li>
|
||||||
|
<li>nv50: disable dedicated ubo upload method</li>
|
||||||
|
<li>nv50: do an explicit flush on draw when there are persistent buffers</li>
|
||||||
|
<li>nvc0: add a memory barrier when there are persistent UBOs</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Jasper St. Pierre (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>glxext: Send the Drawable's ID in the GLX_BufferSwapComplete event</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Kenneth Graunke (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: Don't emit SURFACE_STATEs for gather workarounds on Broadwell.</li>
|
||||||
|
<li>i965: Include marketing names for Broadwell GPUs.</li>
|
||||||
|
<li>i965/disasm: Fix INTEL_DEBUG=fs on Broadwell for ARB_fp applications.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Michel Dänzer (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>radeon/llvm: Use the llvm.rsq.clamped intrinsic for RSQ</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Rob Clark (9):</p>
|
||||||
|
<ul>
|
||||||
|
<li>xa: fix segfault</li>
|
||||||
|
<li>freedreno: use OUT_RELOCW when buffer is written</li>
|
||||||
|
<li>freedreno/a3xx: fix depth/stencil GMEM positioning</li>
|
||||||
|
<li>freedreno/a3xx: fix depth/stencil gmem restore</li>
|
||||||
|
<li>freedreno/a3xx: fix blend opcode</li>
|
||||||
|
<li>freedreno: few caps fixes</li>
|
||||||
|
<li>freedreno/a3xx: texture fixes</li>
|
||||||
|
<li>freedreno: fix for null textures</li>
|
||||||
|
<li>freedreno/a3xx: vtx formats</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Roland Scheidegger (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>draw: (trivial) fix clamping of viewport index</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Takashi Iwai (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>llvmpipe: Fix zero-division in llvmpipe_texture_layout()</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Thomas Hellstrom (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>st/xa: Don't close the drm fd on failure v2</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Tobias Klausmann (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>nv50/ir: allow gl_ViewportIndex to work on non-provoking vertices</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
127
docs/relnotes/10.2.4.html
Normal file
127
docs/relnotes/10.2.4.html
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
<!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 10.2.4 Release Notes / July 18, 2014</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.4 is a bug fix release which fixes bugs found since the 10.2.3 release.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.4 implements the OpenGL 3.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 3.3. OpenGL
|
||||||
|
3.3 is <strong>only</strong> available if requested at context creation
|
||||||
|
because compatibility contexts are not supported.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>SHA256 checksums</h2>
|
||||||
|
<pre>
|
||||||
|
06a2341244eb85c283f59f70161e06ded106f835ed9b6be1ef0243bd9344811a MesaLib-10.2.4.tar.bz2
|
||||||
|
33e3c8b4343503e7d7d17416c670438860a2fd99ec93ea3327f73c3abe33b5e4 MesaLib-10.2.4.tar.gz
|
||||||
|
e26791a4a62a61b82e506e6ba031812d09697d1a831e8239af67e5722a8ee538 MesaLib-10.2.4.zip
|
||||||
|
</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=81157">Bug 81157</a> - [BDW]Piglit some spec_glsl-1.50_execution_built-in-functions* cases fail</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Changes</h2>
|
||||||
|
|
||||||
|
<p>Abdiel Janulgue (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965/fs: Refactor check for potential copy propagated instructions.</li>
|
||||||
|
<li>i965/fs: skip copy-propate for logical instructions with negated src entries</li>
|
||||||
|
<li>i965/vec4: skip copy-propate for logical instructions with negated src entries</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Brian Paul (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: fix geometry shader memory leaks</li>
|
||||||
|
<li>st/mesa: fix geometry shader memory leak</li>
|
||||||
|
<li>gallium/u_blitter: fix some shader memory leaks</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Carl Worth (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>docs: Add sha256 checksums for the 10.2.3 release</li>
|
||||||
|
<li>Update VERSION to 10.2.4</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Eric Anholt (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: Generalize the pixel_x/y workaround for all UW types.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ilia Mirkin (4):</p>
|
||||||
|
<ul>
|
||||||
|
<li>nv50/ir: retrieve shadow compare from first arg</li>
|
||||||
|
<li>nv50/ir: ignore bias for samplerCubeShadow on nv50</li>
|
||||||
|
<li>nvc0/ir: do quadops on the right texture coordinates for TXD</li>
|
||||||
|
<li>nvc0/ir: use manual TXD when offsets are involved</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Jordan Justen (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: Add auxiliary surface field #defines for Broadwell.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Kenneth Graunke (9):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: Don't copy propagate abs into Broadwell logic instructions.</li>
|
||||||
|
<li>i965: Set execution size to 8 for instructions with force_sechalf set.</li>
|
||||||
|
<li>i965/fs: Set force_uncompressed and force_sechalf on samplepos setup.</li>
|
||||||
|
<li>i965/fs: Use WE_all for gl_SampleID header register munging.</li>
|
||||||
|
<li>i965: Add plumbing for Broadwell's auxiliary surface support.</li>
|
||||||
|
<li>i965: Drop SINT workaround for CMS layout on Broadwell.</li>
|
||||||
|
<li>i965: Hook up the MCS buffers in SURFACE_STATE on Broadwell.</li>
|
||||||
|
<li>i965: Add 2x MSAA support to the MCS allocation function.</li>
|
||||||
|
<li>i965: Enable compressed multisample support (CMS) on Broadwell.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Marek Olšák (4):</p>
|
||||||
|
<ul>
|
||||||
|
<li>gallium: fix u_default_transfer_inline_write for textures</li>
|
||||||
|
<li>st/mesa: fix samplerCubeShadow with bias</li>
|
||||||
|
<li>radeonsi: fix samplerCubeShadow with bias</li>
|
||||||
|
<li>radeonsi: add support for TXB2</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Matt Turner (8):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965/vec4: Don't return void from a void function.</li>
|
||||||
|
<li>i965/vec4: Don't fix_math_operand() on Gen >= 8.</li>
|
||||||
|
<li>i965/fs: Don't fix_math_operand() on Gen >= 8.</li>
|
||||||
|
<li>i965/fs: Make try_constant_propagate() static.</li>
|
||||||
|
<li>i965/fs: Constant propagate into 2-src math instructions on Gen8.</li>
|
||||||
|
<li>i965/vec4: Constant propagate into 2-src math instructions on Gen8.</li>
|
||||||
|
<li>i965/fs: Don't use brw_imm_* unnecessarily.</li>
|
||||||
|
<li>i965/fs: Set correct number of regs_written for MCS fetches.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
188
docs/relnotes/10.2.5.html
Normal file
188
docs/relnotes/10.2.5.html
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
<!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 10.2.5 Release Notes / August 2, 2014</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.5 is a bug fix release which fixes bugs found since the 10.2.4 release.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.5 implements the OpenGL 3.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 3.3. OpenGL
|
||||||
|
3.3 is <strong>only</strong> available if requested at context creation
|
||||||
|
because compatibility contexts are not supported.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>SHA256 checksums</h2>
|
||||||
|
<pre>
|
||||||
|
b4459f0bf7f4a3c8fb78ece3c9d2eac3d0e5bf38cb470f2a72705e744bd0310d MesaLib-10.2.5.tar.bz2
|
||||||
|
7b4dd0cb683f8c7dc48a3e7a315742bed58ddcd7b756c462aca4177bd1acdc79 MesaLib-10.2.5.tar.gz
|
||||||
|
6180565914fb238dd77ccdaff96b6155d9a6e1b3e981ebbf6a6851301b384fed MesaLib-10.2.5.zip
|
||||||
|
</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=80991">Bug 80991</a> - [BDW]Piglit spec_ARB_sample_shading_builtin-gl-sample-mask_2 fails</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Changes</h2>
|
||||||
|
|
||||||
|
<p>Abdiel Janulgue (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965/fs: Refactor check for potential copy propagated instructions.</li>
|
||||||
|
<li>i965/fs: skip copy-propate for logical instructions with negated src entries</li>
|
||||||
|
<li>i965/vec4: skip copy-propate for logical instructions with negated src entries</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Adel Gadllah (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i915: Fix up intelInitScreen2 for DRI3</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Anuj Phogat (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: Fix z_offset computation in intel_miptree_unmap_depthstencil()</li>
|
||||||
|
<li>mesa: Don't use memcpy() in _mesa_texstore() for float depth texture data</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Brian Paul (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: fix geometry shader memory leaks</li>
|
||||||
|
<li>st/mesa: fix geometry shader memory leak</li>
|
||||||
|
<li>gallium/u_blitter: fix some shader memory leaks</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Carl Worth (6):</p>
|
||||||
|
<ul>
|
||||||
|
<li>docs: Add sha256 checksums for the 10.2.3 release</li>
|
||||||
|
<li>Update VERSION to 10.2.4</li>
|
||||||
|
<li>Add release notes for 10.2.4</li>
|
||||||
|
<li>docs: Add SHA256 checksums for the 10.2.4 release</li>
|
||||||
|
<li>cherry-ignore: Ignore a few patches picked in the previous stable release</li>
|
||||||
|
<li>Update version to 10.2.5</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Christian König (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>radeonsi: fix order of r600_need_dma_space and r600_context_bo_reloc</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Eric Anholt (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: Generalize the pixel_x/y workaround for all UW types.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ian Romanick (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: Don't allow GL_TEXTURE_BORDER queries outside compat profile</li>
|
||||||
|
<li>mesa: Don't allow GL_TEXTURE_{LUMINANCE,INTENSITY}_* queries outside compat profile</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ilia Mirkin (5):</p>
|
||||||
|
<ul>
|
||||||
|
<li>nv50/ir: retrieve shadow compare from first arg</li>
|
||||||
|
<li>nv50/ir: ignore bias for samplerCubeShadow on nv50</li>
|
||||||
|
<li>nvc0/ir: do quadops on the right texture coordinates for TXD</li>
|
||||||
|
<li>nvc0/ir: use manual TXD when offsets are involved</li>
|
||||||
|
<li>nvc0: make sure that the local memory allocation is aligned to 0x10</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Jason Ekstrand (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>main/format_pack: Fix a wrong datatype in pack_ubyte_R8G8_UNORM</li>
|
||||||
|
<li>main/get_hash_params: Add GL_SAMPLE_SHADING_ARB</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Jordan Justen (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: Add auxiliary surface field #defines for Broadwell.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>José Fonseca (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>st/wgl: Clamp wglChoosePixelFormatARB's output nNumFormats to nMaxFormats.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Kenneth Graunke (13):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: Don't copy propagate abs into Broadwell logic instructions.</li>
|
||||||
|
<li>i965: Set execution size to 8 for instructions with force_sechalf set.</li>
|
||||||
|
<li>i965/fs: Set force_uncompressed and force_sechalf on samplepos setup.</li>
|
||||||
|
<li>i965/fs: Use WE_all for gl_SampleID header register munging.</li>
|
||||||
|
<li>i965: Add plumbing for Broadwell's auxiliary surface support.</li>
|
||||||
|
<li>i965: Drop SINT workaround for CMS layout on Broadwell.</li>
|
||||||
|
<li>i965: Hook up the MCS buffers in SURFACE_STATE on Broadwell.</li>
|
||||||
|
<li>i965: Add 2x MSAA support to the MCS allocation function.</li>
|
||||||
|
<li>i965: Enable compressed multisample support (CMS) on Broadwell.</li>
|
||||||
|
<li>i965: Add missing persample_shading field to brw_wm_debug_recompile.</li>
|
||||||
|
<li>i965/fs: Fix gl_SampleID for 2x MSAA and SIMD16 mode.</li>
|
||||||
|
<li>i965/fs: Fix gl_SampleMask handling for SIMD16 on Gen8+.</li>
|
||||||
|
<li>i965/fs: Set LastRT on the final FB write on Broadwell.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Marek Olšák (14):</p>
|
||||||
|
<ul>
|
||||||
|
<li>gallium: fix u_default_transfer_inline_write for textures</li>
|
||||||
|
<li>st/mesa: fix samplerCubeShadow with bias</li>
|
||||||
|
<li>radeonsi: fix samplerCubeShadow with bias</li>
|
||||||
|
<li>radeonsi: add support for TXB2</li>
|
||||||
|
<li>r600g: switch SNORM conversion to DX and GLES behavior</li>
|
||||||
|
<li>radeonsi: fix CMASK and HTILE calculations for Hawaii</li>
|
||||||
|
<li>gallium/util: add a helper for calculating primitive count from vertex count</li>
|
||||||
|
<li>radeonsi: fix a hang with instancing on Hawaii</li>
|
||||||
|
<li>radeonsi: fix a hang with streamout on Hawaii</li>
|
||||||
|
<li>winsys/radeon: fix vram_size overflow with Hawaii</li>
|
||||||
|
<li>radeonsi: fix occlusion queries on Hawaii</li>
|
||||||
|
<li>r600g,radeonsi: switch all occurences of array_size to util_max_layer</li>
|
||||||
|
<li>radeonsi: fix build because of lack of draw_indirect infrastructure in 10.2</li>
|
||||||
|
<li>radeonsi: use DRAW_PREAMBLE on CIK</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Matt Turner (8):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965/vec4: Don't return void from a void function.</li>
|
||||||
|
<li>i965/vec4: Don't fix_math_operand() on Gen >= 8.</li>
|
||||||
|
<li>i965/fs: Don't fix_math_operand() on Gen >= 8.</li>
|
||||||
|
<li>i965/fs: Make try_constant_propagate() static.</li>
|
||||||
|
<li>i965/fs: Constant propagate into 2-src math instructions on Gen8.</li>
|
||||||
|
<li>i965/vec4: Constant propagate into 2-src math instructions on Gen8.</li>
|
||||||
|
<li>i965/fs: Don't use brw_imm_* unnecessarily.</li>
|
||||||
|
<li>i965/fs: Set correct number of regs_written for MCS fetches.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Thorsten Glaser (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>nv50: fix build failure on m68k due to invalid struct alignment assumptions</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Tom Stellard (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>clover: Call end_query before getting timestamp result v2</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
118
docs/relnotes/10.2.6.html
Normal file
118
docs/relnotes/10.2.6.html
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
<!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 10.2.6 Release Notes / August 19, 2014</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.6 is a bug fix release which fixes bugs found since the 10.2.5 release.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.6 implements the OpenGL 3.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 3.3. OpenGL
|
||||||
|
3.3 is <strong>only</strong> available if requested at context creation
|
||||||
|
because compatibility contexts are not supported.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>SHA256 checksums</h2>
|
||||||
|
<pre>
|
||||||
|
193314d2adba98e43697d726739ac46b4299aae324fa1821aa226890c28ac806 MesaLib-10.2.6.tar.bz2
|
||||||
|
f7a45a5977b485eb95ac024205c584a0c112fe3951c2313c797579bb16a7a448 MesaLib-10.2.6.tar.gz
|
||||||
|
6d086d6fcda8f317adfaaae40011decf2f2e2dc80819c4a7a77c76f73512e8d8 MesaLib-10.2.6.zip
|
||||||
|
</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=81450">Bug 81450</a> - [BDW]Piglit spec_glsl-1.30_execution_tex-miplevel-selection_textureGrad_1DArray cases intel_do_flush_locked failed</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Changes</h2>
|
||||||
|
|
||||||
|
<p>Anuj Phogat (15):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: Fix error condition for valid texture targets in glTexStorage* functions</li>
|
||||||
|
<li>mesa: Turn target_can_be_compressed() in to a utility function</li>
|
||||||
|
<li>mesa: Add error condition for using compressed internalformat in glTexStorage3D()</li>
|
||||||
|
<li>mesa: Fix condition for using compressed internalformat in glCompressedTexImage3D()</li>
|
||||||
|
<li>mesa: Add utility function _mesa_is_enum_format_snorm()</li>
|
||||||
|
<li>mesa: Don't allow snorm internal formats in glCopyTexImage*() in GLES3</li>
|
||||||
|
<li>mesa: Add a helper function _mesa_is_enum_format_unsized()</li>
|
||||||
|
<li>mesa: Add a gles3 error condition for sized internalformat in glCopyTexImage*()</li>
|
||||||
|
<li>mesa: Add gles3 error condition for GL_RGBA10_A2 buffer format in glCopyTexImage*()</li>
|
||||||
|
<li>mesa: Add utility function _mesa_is_enum_format_unorm()</li>
|
||||||
|
<li>mesa: Add gles3 condition for normalized internal formats in glCopyTexImage*()</li>
|
||||||
|
<li>mesa: Allow GL_TEXTURE_CUBE_MAP target with compressed internal formats</li>
|
||||||
|
<li>meta: Use _mesa_get_format_bits() to get the GL_RED_BITS</li>
|
||||||
|
<li>egl: Fix OpenGL ES version checks in _eglParseContextAttribList()</li>
|
||||||
|
<li>meta: Fix datatype computation in get_temp_image_type()</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Brian Paul (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: fix assertion in _mesa_drawbuffers()</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Carl Worth (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>docs: Add sha256 sums to the 10.2.5 release notes</li>
|
||||||
|
<li>Update VERSION to 10.2.6</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ilia Mirkin (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa/st: only convert AND(a, NOT(b)) into MAD when not using native integers</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Jordan Justen (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965/miptree: Layout 1D Array as 2D Array with height of 1</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Maarten Lankhorst (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>configure.ac: Do not require llvm on x32</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Marek Olšák (4):</p>
|
||||||
|
<ul>
|
||||||
|
<li>st/mesa: fix blit-based partial TexSubImage for 1D arrays</li>
|
||||||
|
<li>radeon,r200: fix buffer validation after CS flush</li>
|
||||||
|
<li>radeonsi: fix a hang with instancing in Unigine Heaven/Valley on Hawaii</li>
|
||||||
|
<li>radeonsi: fix CMASK and HTILE allocation on Tahiti</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Pali Rohár (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>configure: check for dladdr via AC_CHECK_FUNC/AC_CHECK_LIB</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Roland Scheidegger (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>gallivm: fix up out-of-bounds level when using conformant out-of-bound behavior</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
211
docs/relnotes/10.2.7.html
Normal file
211
docs/relnotes/10.2.7.html
Normal file
@@ -0,0 +1,211 @@
|
|||||||
|
<!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 10.2.7 Release Notes / September 06, 2014</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.7 is a bug fix release which fixes bugs found since the 10.2.6 release.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.7 implements the OpenGL 3.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 3.3. OpenGL
|
||||||
|
3.3 is <strong>only</strong> available if requested at context creation
|
||||||
|
because compatibility contexts are not supported.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>SHA256 checksums</h2>
|
||||||
|
<pre>
|
||||||
|
cb67dfaabf88acba29aa2cf0dd58ee17b21ebf9594f8d1226c41794da8de3e9d MesaLib-10.2.7.tar.gz
|
||||||
|
27b958063a4c002071f14ed45c7d2a1ee52cd85e4ac8876e8a1c273495a7d43f MesaLib-10.2.7.tar.bz2
|
||||||
|
a2796a2d5bbbc2edd22857ecc267cba68dfe5d0296f5d84ba7510877b216cc40 MesaLib-10.2.7.zip
|
||||||
|
</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=36193">Bug 36193</a> - [i965] brw_eu_emit.c:182: validate_reg: Assertion `execsize >= width' failed.</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66184">Bug 66184</a> - src/mesa/state_tracker/st_glsl_to_tgsi.cpp:3216:simplify_cmp: Assertion `inst->dst.index < 4096' failed.</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70441">Bug 70441</a> - [Gen4-5 clip] Piglit spec_OpenGL_1.1_polygon-offset hits (execsize >= width) assertion</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76188">Bug 76188</a> - EGL_EXT_image_dma_buf_import fd ownership is incorrect</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76789">Bug 76789</a> - [radeonsi] si_descriptors.c requires -std=gnu99 or -fms-extensions</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82139">Bug 82139</a> - [r600g, bisected] multiple ubo piglit regressions</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82255">Bug 82255</a> - [VP2] Chroma planes are vertically stretched during VDPAU playback</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82671">Bug 82671</a> - [r600g-evergreen][compute]Empty kernel execution causes crash</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82709">Bug 82709</a> - OpenCL not working on radeon hainan</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82814">Bug 82814</a> - glDrawBuffers(0, NULL) segfaults in _mesa_drawbuffers</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83079">Bug 83079</a> - [NVC0] Dota 2 (Linux native and Wine) crash with Nouveau Drivers</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83355">Bug 83355</a> - FTBFS: src/mesa/program/program_lexer.l:122:64: error: unknown type name 'YYSTYPE'</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Changes</h2>
|
||||||
|
|
||||||
|
<p>Adam Jackson (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>radeonsi: Don't use anonymous struct trick in atom tracking</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Alex Deucher (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>radeonsi: add new CIK pci ids</li>
|
||||||
|
<li>radeonsi: add new SI pci ids</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Andreas Boll (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>winsys/radeon: fix nop packet padding for hawaii</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Anuj Phogat (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: Bail on vec4 copy propagation for scratch writes with source modifiers</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Brian Paul (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: fix NULL pointer deref bug in _mesa_drawbuffers()</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Carl Worth (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>docs: Add sha256 sums for the 10.2.6 release</li>
|
||||||
|
<li>Makefile: Switch from md5sums to sha256sums</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Dave Airlie (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: add missing parens in vec4 visitor</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Emil Velikov (17):</p>
|
||||||
|
<ul>
|
||||||
|
<li>configure.ac: bail out if building gallium_gbm without gallium_egl</li>
|
||||||
|
<li>android: gallium/nouveau: fix include folders, link against libstlport</li>
|
||||||
|
<li>android: egl/main: fixup the nouveau build</li>
|
||||||
|
<li>automake: gallium/freedreno: drop spurious include dirs</li>
|
||||||
|
<li>android: gallium/freedreno: add preliminary build</li>
|
||||||
|
<li>android: egl/main: add/enable freedreno</li>
|
||||||
|
<li>android: gallium/auxiliary: drop log2/log2f redefitions</li>
|
||||||
|
<li>android: drop HAL_PIXEL_FORMAT_RGBA_{5551,4444}</li>
|
||||||
|
<li>android: glsl: the stlport over the limited Android STL</li>
|
||||||
|
<li>android: dri/i915: do not build an 'empty' driver</li>
|
||||||
|
<li>cherry-ignore: remove patch that lacking previous dependencies</li>
|
||||||
|
<li>cherry-ignore: PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE is not it 10.2</li>
|
||||||
|
<li>cherry-ignore: drop whitespace fix</li>
|
||||||
|
<li>cherry-ignore: reject a15088338eb</li>
|
||||||
|
<li>get-pick-list.sh: Require explicit "10.2" for nominating stable patches</li>
|
||||||
|
<li>mesa: fix make tarballs</li>
|
||||||
|
<li>Update VERSION to 10.2.7</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ian Romanick (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: Handle uninitialized textures like other textures in get_tex_level_parameter_image</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ilia Mirkin (9):</p>
|
||||||
|
<ul>
|
||||||
|
<li>nouveau: make sure to invalidate any vbo state as well</li>
|
||||||
|
<li>nouveau: don't keep stale pointer to free'd data</li>
|
||||||
|
<li>nvc0/ir: avoid infinite recursion when finding first uses of tex</li>
|
||||||
|
<li>nv50: zero out unbound samplers</li>
|
||||||
|
<li>nvc0: don't make 1d staging textures linear</li>
|
||||||
|
<li>nv50/ir: avoid creating instructions that can't be emitted</li>
|
||||||
|
<li>nv50: set the miptree address when clearing bo's in vp2 init</li>
|
||||||
|
<li>nv50: mt address may not be the underlying bo's start address</li>
|
||||||
|
<li>nv50: attach the buffer bo to the miptree structures</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Jan Vesely (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>gallivm: Fix build with latest LLVM</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>José Fonseca (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: Move declaration to top of block.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Kenneth Graunke (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965/vec4: Set NoMask for GS_OPCODE_SET_VERTEX_COUNT on Gen8+.</li>
|
||||||
|
<li>i965/vec4: Respect ir->force_writemask_all in Gen8 code generation.</li>
|
||||||
|
<li>i965/clip: Fix brw_clip_unfilled.c/compute_offset's assembly.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Marek Olšák (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>r600g: fix constant buffer fetches</li>
|
||||||
|
<li>radeonsi: save scissor state and sample mask for u_blitter</li>
|
||||||
|
<li>glsl_to_tgsi: allocate and enlarge arrays for temporaries on demand</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Paulo Sergio Travaglia (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>android: gallium/radeon: attempt to fix the android build</li>
|
||||||
|
<li>android: egl/main: resolve radeon linking issues</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Pekka Paalanen (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>egl_dri2: fix EXT_image_dma_buf_import fds</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Robert Bragg (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>meta: save and restore swizzle for _GenerateMipmap</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Tom Stellard (7):</p>
|
||||||
|
<ul>
|
||||||
|
<li>radeon/compute: Fix reported values for MAX_GLOBAL_SIZE and MAX_MEM_ALLOC_SIZE</li>
|
||||||
|
<li>radeonsi/compute: Update reference counts for buffers in si_set_global_binding()</li>
|
||||||
|
<li>radeonsi/compute: Call si_pm4_free_state() after emitting compute state</li>
|
||||||
|
<li>clover: Flush the command queue in clReleaseCommandQueue()</li>
|
||||||
|
<li>radeon: Add work-around for missing Hainan support in clang < 3.6 v2</li>
|
||||||
|
<li>pipe-loader: Fix memory leak v2</li>
|
||||||
|
<li>r600g/compute: Don't initialize vertex_buffer_state masks to 0x2</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Vinson Lee (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>gallivm: Fix build with LLVM >= 3.6 r215967.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
130
docs/relnotes/10.2.8.html
Normal file
130
docs/relnotes/10.2.8.html
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
<!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 10.2.8 Release Notes / September 19, 2014</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.8 is a bug fix release which fixes bugs found since the 10.2.7 release.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.8 implements the OpenGL 3.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 3.3. OpenGL
|
||||||
|
3.3 is <strong>only</strong> available if requested at context creation
|
||||||
|
because compatibility contexts are not supported.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>SHA256 checksums</h2>
|
||||||
|
<pre>
|
||||||
|
4c5a25ccaf1a9734bbd10d62a1420cc8fd35a1060ce679f2fc846769a25fbeec MesaLib-10.2.8.tar.gz
|
||||||
|
1ef9ad3f241788d454f2ff8c9d65b6849dfc31c8fe91f70fd2930b81c8af1398 MesaLib-10.2.8.tar.bz2
|
||||||
|
d26218da3b44734b1d555267b4c63c48803c4c8b14d2bc53071be57014da37fa MesaLib-10.2.8.zip
|
||||||
|
</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=77493">Bug 77493</a> - lp_test_arit fails with llvm >= llvm-3.5svn r206094</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82539">Bug 82539</a> - vmw_screen_dri.lo In file included from vmw_screen_dri.c:41: vmwgfx_drm.h:32:17: error: drm.h: No such file or directory</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82882">Bug 82882</a> - [swrast] piglit glsl-fs-uniform-bool-1 regression</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83432">Bug 83432</a> - r600_query.c:269:r600_emit_query_end: Assertion `ctx->num_pipelinestat_queries > 0' failed [Gallium HUD]</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83567">Bug 83567</a> - Mesa 10.2.6 does not compile with llvm 3.5</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83735">Bug 83735</a> - [mesa-10.2.x] broken with llvm-3.5 and old CPUs</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Changes</h2>
|
||||||
|
<p>Aaron Watry (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>gallivm: Fix build after LLVM commit 211259</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Christoph Bumiller (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>nv50/ir/util: fix BitSet issues</li>
|
||||||
|
<li>nvc0/ir: clarify recursion fix to finding first tex uses</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Emil Velikov (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>docs: Add sha256 sums for the 10.2.7 release</li>
|
||||||
|
<li>configure: bail out if building svga without libdrm</li>
|
||||||
|
<li>Update VERSION to 10.2.8</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ilia Mirkin (4):</p>
|
||||||
|
<ul>
|
||||||
|
<li>nv50/ir: avoid array overrun when checking for supported mods</li>
|
||||||
|
<li>nouveau: only enable the depth test if there actually is a depth buffer</li>
|
||||||
|
<li>nouveau: only enable stencil func if the visual has stencil bits</li>
|
||||||
|
<li>nouveau: change internal variables to avoid conflicts with macro args</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Jonathan Gray (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>configure.ac: strip _GNU_SOURCE from llvm-config output</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>José Fonseca (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>gallivm: Disable workaround for PR12833 on LLVM 3.2+.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Maarten Lankhorst (4):</p>
|
||||||
|
<ul>
|
||||||
|
<li>nouveau: re-allocate bo's on overflow</li>
|
||||||
|
<li>nouveau: fix MPEG4 hw decoding</li>
|
||||||
|
<li>nouveau: rework reference frame handling</li>
|
||||||
|
<li>nouveau: remove unneeded assert</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Marek Olšák (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>r600g,radeonsi: make sure there's enough CS space before resuming queries</li>
|
||||||
|
<li>mesa: set UniformBooleanTrue = 1.0f by default</li>
|
||||||
|
<li>st/mesa: use 1.0f as boolean true on drivers without integer support</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Richard Sandiford (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>gallivm: Fix uses of 2^24</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Roland Scheidegger (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>gallivm: set mcpu when initializing llvm execution engine</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Thomas Hellstrom (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>winsys/svga: Fix incorrect type usage in IOCTL v2</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
101
docs/relnotes/10.2.9.html
Normal file
101
docs/relnotes/10.2.9.html
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
<!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 10.2.9 Release Notes / October 12, 2014</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.9 is a bug fix release which fixes bugs found since the 10.2.8 release.
|
||||||
|
This is the final planned release for the 10.2 branch.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Mesa 10.2.9 implements the OpenGL 3.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 3.3. OpenGL
|
||||||
|
3.3 is <strong>only</strong> available if requested at context creation
|
||||||
|
because compatibility contexts are not supported.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>SHA256 checksums</h2>
|
||||||
|
<pre>
|
||||||
|
f8d62857eed8f604a57710c58a8ffcfb8dab2dc4977ec27c956c7c4fd14032f6 MesaLib-10.2.9.tar.gz
|
||||||
|
f6031f8b7113a92325b60635c504c510490eebb2e707119bbff7bd86aa34657d MesaLib-10.2.9.tar.bz2
|
||||||
|
11c0ef4f3308fc29d9f15a77fd8f4842a946fce9e830250a1c95b171a446171a MesaLib-10.2.9.zip
|
||||||
|
</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=79462">Bug 79462</a> - [NVC0/Codegen] Shader compilation falis in spill logic</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83570">Bug 83570</a> - Glyphy demo throws unhandled Integer division by zero exception</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Changes</h2>
|
||||||
|
<p>Andreas Pokorny (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>egl/drm: expose KHR_image_pixmap extension</li>
|
||||||
|
<li>i915: Fix black buffers when importing prime fds</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Emil Velikov (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>docs: Add sha256 sums for the 10.2.8 release</li>
|
||||||
|
<li>Update VERSION to 10.2.9</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ilia Mirkin (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>nv50/ir: avoid deleting pseudo instructions too early</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Marek Olšák (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>radeonsi: release GS rings at context destruction</li>
|
||||||
|
<li>radeonsi: properly destroy the GS copy shader and scratch_bo for compute</li>
|
||||||
|
<li>st/dri: remove GALLIUM_MSAA and __GL_FSAA_MODE environment variables</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Roland Scheidegger (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>gallivm: fix idiv</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Thomas Hellstrom (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>st/xa: Fix regression in xa_yuv_planar_blit()</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Tom Stellard (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>configure.ac: Compute LLVM_VERSION_PATCH using llvm-config</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>rconde (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>gallivm,tgsi: fix idiv by zero crash</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -14,7 +14,7 @@
|
|||||||
<iframe src="../contents.html"></iframe>
|
<iframe src="../contents.html"></iframe>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
<h1>Mesa 10.2 Release Notes / TBD</h1>
|
<h1>Mesa 10.2 Release Notes / June 6, 2014</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Mesa 10.2 is a new development release.
|
Mesa 10.2 is a new development release.
|
||||||
@@ -33,7 +33,9 @@ because compatibility contexts are not supported.
|
|||||||
|
|
||||||
<h2>MD5 checksums</h2>
|
<h2>MD5 checksums</h2>
|
||||||
<pre>
|
<pre>
|
||||||
TBD.
|
c87bfb6dd5cbcf1fdef42e5ccd972581 MesaLib-10.2.0.tar.gz
|
||||||
|
7aaba90bd7169a94ae2fe83febdec963 MesaLib-10.2.0.tar.bz2
|
||||||
|
58b203aca15dadc25ab4d1126db1052b MesaLib-10.2.0.zip
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
@@ -67,6 +69,25 @@ TBD.
|
|||||||
<h2>Changes</h2>
|
<h2>Changes</h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>Renamed <i>--with-llvm-shared-libs</i> to <i>--enable-llvm-shared-libs</i></li>
|
||||||
|
<p>
|
||||||
|
The option is used to control how mesa is linked against LLVM, and now
|
||||||
|
defaults to enabled (shared linking).
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<li>Split <i>libxatracker.so</i> into a standalone library which can be used
|
||||||
|
with any gallium driver.</li>
|
||||||
|
<p>
|
||||||
|
Previously the library was linked statically against vmware's virtual gpu
|
||||||
|
driver(svga), whereas now it loads a shared pipe_*.so driver. Provide the
|
||||||
|
following options during configure, if you would like support for svga driver
|
||||||
|
<i>--enable-xa --with-gallium-drivers=svga</i>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Note: The files are installed in $(libdir)/gallium-pipe/ and the interface
|
||||||
|
between them and libxatracker.so is <strong>not</strong> stable.
|
||||||
|
</p>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@@ -518,7 +518,7 @@ typedef struct {
|
|||||||
unsigned long serial; /* # of last request processed by server */
|
unsigned long serial; /* # of last request processed by server */
|
||||||
Bool send_event; /* true if this came from a SendEvent request */
|
Bool send_event; /* true if this came from a SendEvent request */
|
||||||
Display *display; /* Display the event was read from */
|
Display *display; /* Display the event was read from */
|
||||||
GLXDrawable drawable; /* drawable on which event was requested in event mask */
|
Drawable drawable; /* drawable on which event was requested in event mask */
|
||||||
int event_type;
|
int event_type;
|
||||||
int64_t ust;
|
int64_t ust;
|
||||||
int64_t msc;
|
int64_t msc;
|
||||||
|
@@ -91,24 +91,24 @@ CHIPSET(0x0F32, byt, "Intel(R) Bay Trail")
|
|||||||
CHIPSET(0x0F33, byt, "Intel(R) Bay Trail")
|
CHIPSET(0x0F33, byt, "Intel(R) Bay Trail")
|
||||||
CHIPSET(0x0157, byt, "Intel(R) Bay Trail")
|
CHIPSET(0x0157, byt, "Intel(R) Bay Trail")
|
||||||
CHIPSET(0x0155, byt, "Intel(R) Bay Trail")
|
CHIPSET(0x0155, byt, "Intel(R) Bay Trail")
|
||||||
CHIPSET(0x1602, bdw_gt1, "Intel(R) Broadwell")
|
CHIPSET(0x1602, bdw_gt1, "Intel(R) Broadwell GT1")
|
||||||
CHIPSET(0x1606, bdw_gt1, "Intel(R) Broadwell")
|
CHIPSET(0x1606, bdw_gt1, "Intel(R) Broadwell GT1")
|
||||||
CHIPSET(0x160A, bdw_gt1, "Intel(R) Broadwell")
|
CHIPSET(0x160A, bdw_gt1, "Intel(R) Broadwell GT1")
|
||||||
CHIPSET(0x160B, bdw_gt1, "Intel(R) Broadwell")
|
CHIPSET(0x160B, bdw_gt1, "Intel(R) Broadwell GT1")
|
||||||
CHIPSET(0x160D, bdw_gt1, "Intel(R) Broadwell")
|
CHIPSET(0x160D, bdw_gt1, "Intel(R) Broadwell GT1")
|
||||||
CHIPSET(0x160E, bdw_gt1, "Intel(R) Broadwell")
|
CHIPSET(0x160E, bdw_gt1, "Intel(R) Broadwell GT1")
|
||||||
CHIPSET(0x1612, bdw_gt2, "Intel(R) Broadwell")
|
CHIPSET(0x1612, bdw_gt2, "Intel(R) HD Graphics 5600 (Broadwell GT2)")
|
||||||
CHIPSET(0x1616, bdw_gt2, "Intel(R) Broadwell")
|
CHIPSET(0x1616, bdw_gt2, "Intel(R) HD Graphics 5500 (Broadwell GT2)")
|
||||||
CHIPSET(0x161A, bdw_gt2, "Intel(R) Broadwell")
|
CHIPSET(0x161A, bdw_gt2, "Intel(R) Broadwell GT2")
|
||||||
CHIPSET(0x161B, bdw_gt2, "Intel(R) Broadwell")
|
CHIPSET(0x161B, bdw_gt2, "Intel(R) Broadwell GT2")
|
||||||
CHIPSET(0x161D, bdw_gt2, "Intel(R) Broadwell")
|
CHIPSET(0x161D, bdw_gt2, "Intel(R) Broadwell GT2")
|
||||||
CHIPSET(0x161E, bdw_gt2, "Intel(R) Broadwell")
|
CHIPSET(0x161E, bdw_gt2, "Intel(R) HD Graphics 5300 (Broadwell GT2)")
|
||||||
CHIPSET(0x1622, bdw_gt3, "Intel(R) Broadwell")
|
CHIPSET(0x1622, bdw_gt3, "Intel(R) Iris Pro 6200 (Broadwell GT3e)")
|
||||||
CHIPSET(0x1626, bdw_gt3, "Intel(R) Broadwell")
|
CHIPSET(0x1626, bdw_gt3, "Intel(R) HD Graphics 6000 (Broadwell GT3)")
|
||||||
CHIPSET(0x162A, bdw_gt3, "Intel(R) Broadwell")
|
CHIPSET(0x162A, bdw_gt3, "Intel(R) Iris Pro P6300 (Broadwell GT3e)")
|
||||||
CHIPSET(0x162B, bdw_gt3, "Intel(R) Broadwell")
|
CHIPSET(0x162B, bdw_gt3, "Intel(R) Iris 6100 (Broadwell GT3)")
|
||||||
CHIPSET(0x162D, bdw_gt3, "Intel(R) Broadwell")
|
CHIPSET(0x162D, bdw_gt3, "Intel(R) Broadwell GT3")
|
||||||
CHIPSET(0x162E, bdw_gt3, "Intel(R) Broadwell")
|
CHIPSET(0x162E, bdw_gt3, "Intel(R) Broadwell GT3")
|
||||||
CHIPSET(0x22B0, chv, "Intel(R) Cherryview")
|
CHIPSET(0x22B0, chv, "Intel(R) Cherryview")
|
||||||
CHIPSET(0x22B1, chv, "Intel(R) Cherryview")
|
CHIPSET(0x22B1, chv, "Intel(R) Cherryview")
|
||||||
CHIPSET(0x22B2, chv, "Intel(R) Cherryview")
|
CHIPSET(0x22B2, chv, "Intel(R) Cherryview")
|
||||||
|
@@ -38,6 +38,7 @@ CHIPSET(0x6828, VERDE_6828, VERDE)
|
|||||||
CHIPSET(0x6829, VERDE_6829, VERDE)
|
CHIPSET(0x6829, VERDE_6829, VERDE)
|
||||||
CHIPSET(0x682A, VERDE_682A, VERDE)
|
CHIPSET(0x682A, VERDE_682A, VERDE)
|
||||||
CHIPSET(0x682B, VERDE_682B, VERDE)
|
CHIPSET(0x682B, VERDE_682B, VERDE)
|
||||||
|
CHIPSET(0x682C, VERDE_682C, VERDE)
|
||||||
CHIPSET(0x682D, VERDE_682D, VERDE)
|
CHIPSET(0x682D, VERDE_682D, VERDE)
|
||||||
CHIPSET(0x682F, VERDE_682F, VERDE)
|
CHIPSET(0x682F, VERDE_682F, VERDE)
|
||||||
CHIPSET(0x6830, VERDE_6830, VERDE)
|
CHIPSET(0x6830, VERDE_6830, VERDE)
|
||||||
@@ -54,8 +55,11 @@ CHIPSET(0x6600, OLAND_6600, OLAND)
|
|||||||
CHIPSET(0x6601, OLAND_6601, OLAND)
|
CHIPSET(0x6601, OLAND_6601, OLAND)
|
||||||
CHIPSET(0x6602, OLAND_6602, OLAND)
|
CHIPSET(0x6602, OLAND_6602, OLAND)
|
||||||
CHIPSET(0x6603, OLAND_6603, OLAND)
|
CHIPSET(0x6603, OLAND_6603, OLAND)
|
||||||
|
CHIPSET(0x6604, OLAND_6604, OLAND)
|
||||||
|
CHIPSET(0x6605, OLAND_6605, OLAND)
|
||||||
CHIPSET(0x6606, OLAND_6606, OLAND)
|
CHIPSET(0x6606, OLAND_6606, OLAND)
|
||||||
CHIPSET(0x6607, OLAND_6607, OLAND)
|
CHIPSET(0x6607, OLAND_6607, OLAND)
|
||||||
|
CHIPSET(0x6608, OLAND_6608, OLAND)
|
||||||
CHIPSET(0x6610, OLAND_6610, OLAND)
|
CHIPSET(0x6610, OLAND_6610, OLAND)
|
||||||
CHIPSET(0x6611, OLAND_6611, OLAND)
|
CHIPSET(0x6611, OLAND_6611, OLAND)
|
||||||
CHIPSET(0x6613, OLAND_6613, OLAND)
|
CHIPSET(0x6613, OLAND_6613, OLAND)
|
||||||
@@ -73,6 +77,8 @@ CHIPSET(0x666F, HAINAN_666F, HAINAN)
|
|||||||
|
|
||||||
CHIPSET(0x6640, BONAIRE_6640, BONAIRE)
|
CHIPSET(0x6640, BONAIRE_6640, BONAIRE)
|
||||||
CHIPSET(0x6641, BONAIRE_6641, BONAIRE)
|
CHIPSET(0x6641, BONAIRE_6641, BONAIRE)
|
||||||
|
CHIPSET(0x6646, BONAIRE_6646, BONAIRE)
|
||||||
|
CHIPSET(0x6647, BONAIRE_6647, BONAIRE)
|
||||||
CHIPSET(0x6649, BONAIRE_6649, BONAIRE)
|
CHIPSET(0x6649, BONAIRE_6649, BONAIRE)
|
||||||
CHIPSET(0x6650, BONAIRE_6650, BONAIRE)
|
CHIPSET(0x6650, BONAIRE_6650, BONAIRE)
|
||||||
CHIPSET(0x6651, BONAIRE_6651, BONAIRE)
|
CHIPSET(0x6651, BONAIRE_6651, BONAIRE)
|
||||||
@@ -132,6 +138,7 @@ CHIPSET(0x1313, KAVERI_1313, KAVERI)
|
|||||||
CHIPSET(0x1315, KAVERI_1315, KAVERI)
|
CHIPSET(0x1315, KAVERI_1315, KAVERI)
|
||||||
CHIPSET(0x1316, KAVERI_1316, KAVERI)
|
CHIPSET(0x1316, KAVERI_1316, KAVERI)
|
||||||
CHIPSET(0x1317, KAVERI_1317, KAVERI)
|
CHIPSET(0x1317, KAVERI_1317, KAVERI)
|
||||||
|
CHIPSET(0x1318, KAVERI_1318, KAVERI)
|
||||||
CHIPSET(0x131B, KAVERI_131B, KAVERI)
|
CHIPSET(0x131B, KAVERI_131B, KAVERI)
|
||||||
CHIPSET(0x131C, KAVERI_131C, KAVERI)
|
CHIPSET(0x131C, KAVERI_131C, KAVERI)
|
||||||
CHIPSET(0x131D, KAVERI_131D, KAVERI)
|
CHIPSET(0x131D, KAVERI_131D, KAVERI)
|
||||||
|
@@ -40,8 +40,12 @@ LOCAL_C_INCLUDES := \
|
|||||||
$(MESA_TOP)/src/mapi \
|
$(MESA_TOP)/src/mapi \
|
||||||
$(MESA_TOP)/src/egl/main \
|
$(MESA_TOP)/src/egl/main \
|
||||||
$(MESA_TOP)/src/loader \
|
$(MESA_TOP)/src/loader \
|
||||||
|
$(DRM_TOP)/include/drm \
|
||||||
$(DRM_GRALLOC_TOP)
|
$(DRM_GRALLOC_TOP)
|
||||||
|
|
||||||
|
LOCAL_STATIC_LIBRARIES := \
|
||||||
|
libloader
|
||||||
|
|
||||||
LOCAL_MODULE := libmesa_egl_dri2
|
LOCAL_MODULE := libmesa_egl_dri2
|
||||||
|
|
||||||
include $(MESA_COMMON_MK)
|
include $(MESA_COMMON_MK)
|
||||||
|
@@ -1663,36 +1663,13 @@ dri2_check_dma_buf_format(const _EGLImageAttribs *attrs)
|
|||||||
/**
|
/**
|
||||||
* The spec says:
|
* The spec says:
|
||||||
*
|
*
|
||||||
* "If eglCreateImageKHR is successful for a EGL_LINUX_DMA_BUF_EXT target,
|
* "If eglCreateImageKHR is successful for a EGL_LINUX_DMA_BUF_EXT target, the
|
||||||
* the EGL takes ownership of the file descriptor and is responsible for
|
* EGL will take a reference to the dma_buf(s) which it will release at any
|
||||||
* closing it, which it may do at any time while the EGLDisplay is
|
* time while the EGLDisplay is initialized. It is the responsibility of the
|
||||||
* initialized."
|
* application to close the dma_buf file descriptors."
|
||||||
|
*
|
||||||
|
* Therefore we must never close or otherwise modify the file descriptors.
|
||||||
*/
|
*/
|
||||||
static void
|
|
||||||
dri2_take_dma_buf_ownership(const int *fds, unsigned num_fds)
|
|
||||||
{
|
|
||||||
int already_closed[num_fds];
|
|
||||||
unsigned num_closed = 0;
|
|
||||||
unsigned i, j;
|
|
||||||
|
|
||||||
for (i = 0; i < num_fds; ++i) {
|
|
||||||
/**
|
|
||||||
* The same file descriptor can be referenced multiple times in case more
|
|
||||||
* than one plane is found in the same buffer, just with a different
|
|
||||||
* offset.
|
|
||||||
*/
|
|
||||||
for (j = 0; j < num_closed; ++j) {
|
|
||||||
if (already_closed[j] == fds[i])
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (j == num_closed) {
|
|
||||||
close(fds[i]);
|
|
||||||
already_closed[num_closed++] = fds[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static _EGLImage *
|
static _EGLImage *
|
||||||
dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
|
dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
|
||||||
EGLClientBuffer buffer, const EGLint *attr_list)
|
EGLClientBuffer buffer, const EGLint *attr_list)
|
||||||
@@ -1755,8 +1732,6 @@ dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
|
|||||||
return EGL_NO_IMAGE_KHR;
|
return EGL_NO_IMAGE_KHR;
|
||||||
|
|
||||||
res = dri2_create_image_from_dri(disp, dri_image);
|
res = dri2_create_image_from_dri(disp, dri_image);
|
||||||
if (res)
|
|
||||||
dri2_take_dma_buf_ownership(fds, num_fds);
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@@ -54,8 +54,6 @@ get_format_bpp(int native)
|
|||||||
bpp = 3;
|
bpp = 3;
|
||||||
break;
|
break;
|
||||||
case HAL_PIXEL_FORMAT_RGB_565:
|
case HAL_PIXEL_FORMAT_RGB_565:
|
||||||
case HAL_PIXEL_FORMAT_RGBA_5551:
|
|
||||||
case HAL_PIXEL_FORMAT_RGBA_4444:
|
|
||||||
bpp = 2;
|
bpp = 2;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -371,8 +369,6 @@ dri2_create_image_android_native_buffer(_EGLDisplay *disp, _EGLContext *ctx,
|
|||||||
format = __DRI_IMAGE_FORMAT_XBGR8888;
|
format = __DRI_IMAGE_FORMAT_XBGR8888;
|
||||||
break;
|
break;
|
||||||
case HAL_PIXEL_FORMAT_RGB_888:
|
case HAL_PIXEL_FORMAT_RGB_888:
|
||||||
case HAL_PIXEL_FORMAT_RGBA_5551:
|
|
||||||
case HAL_PIXEL_FORMAT_RGBA_4444:
|
|
||||||
/* unsupported */
|
/* unsupported */
|
||||||
default:
|
default:
|
||||||
_eglLog(_EGL_WARNING, "unsupported native buffer format 0x%x", buf->format);
|
_eglLog(_EGL_WARNING, "unsupported native buffer format 0x%x", buf->format);
|
||||||
@@ -638,7 +634,7 @@ droid_log(EGLint level, const char *msg)
|
|||||||
static struct dri2_egl_display_vtbl droid_display_vtbl = {
|
static struct dri2_egl_display_vtbl droid_display_vtbl = {
|
||||||
.authenticate = NULL,
|
.authenticate = NULL,
|
||||||
.create_window_surface = droid_create_window_surface,
|
.create_window_surface = droid_create_window_surface,
|
||||||
.create_pixmap_surface = dri2_fallback_pixmap_surface,
|
.create_pixmap_surface = dri2_fallback_create_pixmap_surface,
|
||||||
.create_pbuffer_surface = droid_create_pbuffer_surface,
|
.create_pbuffer_surface = droid_create_pbuffer_surface,
|
||||||
.destroy_surface = droid_destroy_surface,
|
.destroy_surface = droid_destroy_surface,
|
||||||
.create_image = droid_create_image_khr,
|
.create_image = droid_create_image_khr,
|
||||||
|
@@ -572,6 +572,7 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
disp->Extensions.EXT_buffer_age = EGL_TRUE;
|
disp->Extensions.EXT_buffer_age = EGL_TRUE;
|
||||||
|
disp->Extensions.KHR_image_pixmap = EGL_TRUE;
|
||||||
|
|
||||||
#ifdef HAVE_WAYLAND_PLATFORM
|
#ifdef HAVE_WAYLAND_PLATFORM
|
||||||
disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
|
disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
|
||||||
|
@@ -95,6 +95,12 @@ gallium_DRIVERS :=
|
|||||||
# swrast
|
# swrast
|
||||||
gallium_DRIVERS += libmesa_pipe_softpipe libmesa_winsys_sw_android
|
gallium_DRIVERS += libmesa_pipe_softpipe libmesa_winsys_sw_android
|
||||||
|
|
||||||
|
# freedreno
|
||||||
|
ifneq ($(filter freedreno, $(MESA_GPU_DRIVERS)),)
|
||||||
|
gallium_DRIVERS += libmesa_winsys_freedreno libmesa_pipe_freedreno
|
||||||
|
LOCAL_SHARED_LIBRARIES += libdrm_freedreno
|
||||||
|
endif
|
||||||
|
|
||||||
# i915g
|
# i915g
|
||||||
ifneq ($(filter i915g, $(MESA_GPU_DRIVERS)),)
|
ifneq ($(filter i915g, $(MESA_GPU_DRIVERS)),)
|
||||||
gallium_DRIVERS += libmesa_winsys_i915 libmesa_pipe_i915
|
gallium_DRIVERS += libmesa_winsys_i915 libmesa_pipe_i915
|
||||||
@@ -109,28 +115,29 @@ endif
|
|||||||
|
|
||||||
# nouveau
|
# nouveau
|
||||||
ifneq ($(filter nouveau, $(MESA_GPU_DRIVERS)),)
|
ifneq ($(filter nouveau, $(MESA_GPU_DRIVERS)),)
|
||||||
gallium_DRIVERS += \
|
gallium_DRIVERS += libmesa_winsys_nouveau libmesa_pipe_nouveau
|
||||||
libmesa_winsys_nouveau \
|
|
||||||
libmesa_pipe_nvfx \
|
|
||||||
libmesa_pipe_nv50 \
|
|
||||||
libmesa_pipe_nvc0 \
|
|
||||||
libmesa_pipe_nouveau
|
|
||||||
LOCAL_SHARED_LIBRARIES += libdrm_nouveau
|
LOCAL_SHARED_LIBRARIES += libdrm_nouveau
|
||||||
|
LOCAL_SHARED_LIBRARIES += libstlport
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# r300g/r600g/radeonsi
|
# r300g/r600g/radeonsi
|
||||||
ifneq ($(filter r300g r600g radeonsi, $(MESA_GPU_DRIVERS)),)
|
ifneq ($(filter r300g r600g radeonsi, $(MESA_GPU_DRIVERS)),)
|
||||||
gallium_DRIVERS += libmesa_winsys_radeon
|
gallium_DRIVERS += libmesa_winsys_radeon
|
||||||
|
LOCAL_SHARED_LIBRARIES += libdrm_radeon
|
||||||
ifneq ($(filter r300g, $(MESA_GPU_DRIVERS)),)
|
ifneq ($(filter r300g, $(MESA_GPU_DRIVERS)),)
|
||||||
gallium_DRIVERS += libmesa_pipe_r300
|
gallium_DRIVERS += libmesa_pipe_r300
|
||||||
endif
|
endif # r300g
|
||||||
|
ifneq ($(filter r600g radeonsi, $(MESA_GPU_DRIVERS)),)
|
||||||
ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
|
ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
|
||||||
gallium_DRIVERS += libmesa_pipe_r600
|
gallium_DRIVERS += libmesa_pipe_r600
|
||||||
endif
|
LOCAL_SHARED_LIBRARIES += libstlport
|
||||||
|
endif # r600g
|
||||||
ifneq ($(filter radeonsi, $(MESA_GPU_DRIVERS)),)
|
ifneq ($(filter radeonsi, $(MESA_GPU_DRIVERS)),)
|
||||||
gallium_DRIVERS += libmesa_pipe_radeonsi
|
gallium_DRIVERS += libmesa_pipe_radeonsi
|
||||||
endif
|
endif # radeonsi
|
||||||
endif
|
gallium_DRIVERS += libmesa_pipe_radeon
|
||||||
|
endif # r600g || radeonsi
|
||||||
|
endif # r300g || r600g || radeonsi
|
||||||
|
|
||||||
# vmwgfx
|
# vmwgfx
|
||||||
ifneq ($(filter vmwgfx, $(MESA_GPU_DRIVERS)),)
|
ifneq ($(filter vmwgfx, $(MESA_GPU_DRIVERS)),)
|
||||||
@@ -154,11 +161,14 @@ LOCAL_STATIC_LIBRARIES := \
|
|||||||
libmesa_glsl \
|
libmesa_glsl \
|
||||||
libmesa_glsl_utils \
|
libmesa_glsl_utils \
|
||||||
libmesa_gallium \
|
libmesa_gallium \
|
||||||
libloader \
|
|
||||||
$(LOCAL_STATIC_LIBRARIES)
|
$(LOCAL_STATIC_LIBRARIES)
|
||||||
|
|
||||||
endif # MESA_BUILD_GALLIUM
|
endif # MESA_BUILD_GALLIUM
|
||||||
|
|
||||||
|
LOCAL_STATIC_LIBRARIES := \
|
||||||
|
$(LOCAL_STATIC_LIBRARIES) \
|
||||||
|
libloader
|
||||||
|
|
||||||
LOCAL_MODULE := libGLES_mesa
|
LOCAL_MODULE := libGLES_mesa
|
||||||
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
|
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
|
||||||
|
|
||||||
|
@@ -524,8 +524,12 @@ eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read,
|
|||||||
if (!context && ctx != EGL_NO_CONTEXT)
|
if (!context && ctx != EGL_NO_CONTEXT)
|
||||||
RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_FALSE);
|
RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_FALSE);
|
||||||
if (!draw_surf || !read_surf) {
|
if (!draw_surf || !read_surf) {
|
||||||
/* surfaces may be NULL if surfaceless */
|
/* From the EGL 1.4 (20130211) spec:
|
||||||
if (!disp->Extensions.KHR_surfaceless_context)
|
*
|
||||||
|
* To release the current context without assigning a new one, set ctx
|
||||||
|
* to EGL_NO_CONTEXT and set draw and read to EGL_NO_SURFACE.
|
||||||
|
*/
|
||||||
|
if (!disp->Extensions.KHR_surfaceless_context && ctx != EGL_NO_CONTEXT)
|
||||||
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
|
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
|
||||||
|
|
||||||
if ((!draw_surf && draw != EGL_NO_SURFACE) ||
|
if ((!draw_surf && draw != EGL_NO_SURFACE) ||
|
||||||
@@ -567,6 +571,10 @@ _eglCreateWindowSurfaceCommon(_EGLDisplay *disp, EGLConfig config,
|
|||||||
EGLSurface ret;
|
EGLSurface ret;
|
||||||
|
|
||||||
_EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
|
_EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
|
||||||
|
|
||||||
|
if (native_window == NULL)
|
||||||
|
RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
|
||||||
|
|
||||||
surf = drv->API.CreateWindowSurface(drv, disp, conf, native_window,
|
surf = drv->API.CreateWindowSurface(drv, disp, conf, native_window,
|
||||||
attrib_list);
|
attrib_list);
|
||||||
ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;
|
ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;
|
||||||
|
@@ -322,11 +322,14 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
default:
|
|
||||||
/* Don't put additional version checks here. We don't know that
|
/* Don't put additional version checks here. We don't know that
|
||||||
* there won't be versions > 3.0.
|
* there won't be versions > 3.0.
|
||||||
*/
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
err = EGL_BAD_MATCH;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -135,22 +135,6 @@
|
|||||||
<arg name="stride2" type="int"/>
|
<arg name="stride2" type="int"/>
|
||||||
</request>
|
</request>
|
||||||
|
|
||||||
<!-- Create a wayland buffer for the prime fd. Use for regular and planar
|
|
||||||
buffers. Pass 0 for offset and stride for unused planes. -->
|
|
||||||
<request name="create_prime_buffer" since="2">
|
|
||||||
<arg name="id" type="new_id" interface="wl_buffer"/>
|
|
||||||
<arg name="name" type="fd"/>
|
|
||||||
<arg name="width" type="int"/>
|
|
||||||
<arg name="height" type="int"/>
|
|
||||||
<arg name="format" type="uint"/>
|
|
||||||
<arg name="offset0" type="int"/>
|
|
||||||
<arg name="stride0" type="int"/>
|
|
||||||
<arg name="offset1" type="int"/>
|
|
||||||
<arg name="stride1" type="int"/>
|
|
||||||
<arg name="offset2" type="int"/>
|
|
||||||
<arg name="stride2" type="int"/>
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<!-- Notification of the path of the drm device which is used by
|
<!-- Notification of the path of the drm device which is used by
|
||||||
the server. The client should use this device for creating
|
the server. The client should use this device for creating
|
||||||
local buffers. Only buffers created from this device should
|
local buffers. Only buffers created from this device should
|
||||||
@@ -177,6 +161,25 @@
|
|||||||
<event name="capabilities">
|
<event name="capabilities">
|
||||||
<arg name="value" type="uint"/>
|
<arg name="value" type="uint"/>
|
||||||
</event>
|
</event>
|
||||||
|
|
||||||
|
<!-- Version 2 additions -->
|
||||||
|
|
||||||
|
<!-- Create a wayland buffer for the prime fd. Use for regular and planar
|
||||||
|
buffers. Pass 0 for offset and stride for unused planes. -->
|
||||||
|
<request name="create_prime_buffer" since="2">
|
||||||
|
<arg name="id" type="new_id" interface="wl_buffer"/>
|
||||||
|
<arg name="name" type="fd"/>
|
||||||
|
<arg name="width" type="int"/>
|
||||||
|
<arg name="height" type="int"/>
|
||||||
|
<arg name="format" type="uint"/>
|
||||||
|
<arg name="offset0" type="int"/>
|
||||||
|
<arg name="stride0" type="int"/>
|
||||||
|
<arg name="offset1" type="int"/>
|
||||||
|
<arg name="stride1" type="int"/>
|
||||||
|
<arg name="offset2" type="int"/>
|
||||||
|
<arg name="stride2" type="int"/>
|
||||||
|
</request>
|
||||||
|
|
||||||
</interface>
|
</interface>
|
||||||
|
|
||||||
</protocol>
|
</protocol>
|
||||||
|
@@ -34,6 +34,11 @@ SUBDIRS := \
|
|||||||
# swrast
|
# swrast
|
||||||
SUBDIRS += winsys/sw/android drivers/softpipe
|
SUBDIRS += winsys/sw/android drivers/softpipe
|
||||||
|
|
||||||
|
# freedreno
|
||||||
|
ifneq ($(filter freedreno, $(MESA_GPU_DRIVERS)),)
|
||||||
|
SUBDIRS += winsys/freedreno/drm drivers/freedreno
|
||||||
|
endif
|
||||||
|
|
||||||
# i915g
|
# i915g
|
||||||
ifneq ($(filter i915g, $(MESA_GPU_DRIVERS)),)
|
ifneq ($(filter i915g, $(MESA_GPU_DRIVERS)),)
|
||||||
SUBDIRS += winsys/i915/drm drivers/i915
|
SUBDIRS += winsys/i915/drm drivers/i915
|
||||||
@@ -57,6 +62,8 @@ SUBDIRS += winsys/radeon/drm
|
|||||||
ifneq ($(filter r300g, $(MESA_GPU_DRIVERS)),)
|
ifneq ($(filter r300g, $(MESA_GPU_DRIVERS)),)
|
||||||
SUBDIRS += drivers/r300
|
SUBDIRS += drivers/r300
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(filter r600g radeonsi, $(MESA_GPU_DRIVERS)),)
|
||||||
|
SUBDIRS += drivers/radeon
|
||||||
ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
|
ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
|
||||||
SUBDIRS += drivers/r600
|
SUBDIRS += drivers/r600
|
||||||
endif
|
endif
|
||||||
@@ -64,6 +71,7 @@ ifneq ($(filter radeonsi, $(MESA_GPU_DRIVERS)),)
|
|||||||
SUBDIRS += drivers/radeonsi
|
SUBDIRS += drivers/radeonsi
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# vmwgfx
|
# vmwgfx
|
||||||
ifneq ($(filter vmwgfx, $(MESA_GPU_DRIVERS)),)
|
ifneq ($(filter vmwgfx, $(MESA_GPU_DRIVERS)),)
|
||||||
|
@@ -1000,6 +1000,8 @@ draw_get_shader_param_no_llvm(unsigned shader, enum pipe_shader_cap param)
|
|||||||
/**
|
/**
|
||||||
* XXX: Results for PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS because there are two
|
* XXX: Results for PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS because there are two
|
||||||
* different ways of setting textures, and drivers typically only support one.
|
* different ways of setting textures, and drivers typically only support one.
|
||||||
|
* Drivers requesting a draw context explicitly without llvm must call
|
||||||
|
* draw_get_shader_param_no_llvm instead.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
draw_get_shader_param(unsigned shader, enum pipe_shader_cap param)
|
draw_get_shader_param(unsigned shader, enum pipe_shader_cap param)
|
||||||
|
@@ -597,7 +597,7 @@ int draw_geometry_shader_run(struct draw_geometry_shader *shader,
|
|||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_LLVM
|
#ifdef HAVE_LLVM
|
||||||
if (draw_get_option_use_llvm()) {
|
if (shader->draw->llvm) {
|
||||||
shader->gs_output = output_verts->verts;
|
shader->gs_output = output_verts->verts;
|
||||||
if (max_out_prims > shader->max_out_prims) {
|
if (max_out_prims > shader->max_out_prims) {
|
||||||
unsigned i;
|
unsigned i;
|
||||||
@@ -674,7 +674,7 @@ int draw_geometry_shader_run(struct draw_geometry_shader *shader,
|
|||||||
void draw_geometry_shader_prepare(struct draw_geometry_shader *shader,
|
void draw_geometry_shader_prepare(struct draw_geometry_shader *shader,
|
||||||
struct draw_context *draw)
|
struct draw_context *draw)
|
||||||
{
|
{
|
||||||
boolean use_llvm = draw_get_option_use_llvm();
|
boolean use_llvm = draw->llvm != NULL;
|
||||||
if (!use_llvm && shader && shader->machine->Tokens != shader->state.tokens) {
|
if (!use_llvm && shader && shader->machine->Tokens != shader->state.tokens) {
|
||||||
tgsi_exec_machine_bind_shader(shader->machine,
|
tgsi_exec_machine_bind_shader(shader->machine,
|
||||||
shader->state.tokens,
|
shader->state.tokens,
|
||||||
@@ -686,7 +686,7 @@ void draw_geometry_shader_prepare(struct draw_geometry_shader *shader,
|
|||||||
boolean
|
boolean
|
||||||
draw_gs_init( struct draw_context *draw )
|
draw_gs_init( struct draw_context *draw )
|
||||||
{
|
{
|
||||||
if (!draw_get_option_use_llvm()) {
|
if (!draw->llvm) {
|
||||||
draw->gs.tgsi.machine = tgsi_exec_machine_create();
|
draw->gs.tgsi.machine = tgsi_exec_machine_create();
|
||||||
if (!draw->gs.tgsi.machine)
|
if (!draw->gs.tgsi.machine)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -715,7 +715,7 @@ draw_create_geometry_shader(struct draw_context *draw,
|
|||||||
const struct pipe_shader_state *state)
|
const struct pipe_shader_state *state)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LLVM
|
#ifdef HAVE_LLVM
|
||||||
boolean use_llvm = draw_get_option_use_llvm();
|
boolean use_llvm = draw->llvm != NULL;
|
||||||
struct llvm_geometry_shader *llvm_gs;
|
struct llvm_geometry_shader *llvm_gs;
|
||||||
#endif
|
#endif
|
||||||
struct draw_geometry_shader *gs;
|
struct draw_geometry_shader *gs;
|
||||||
@@ -870,7 +870,7 @@ void draw_delete_geometry_shader(struct draw_context *draw,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_LLVM
|
#ifdef HAVE_LLVM
|
||||||
if (draw_get_option_use_llvm()) {
|
if (draw->llvm) {
|
||||||
struct llvm_geometry_shader *shader = llvm_geometry_shader(dgs);
|
struct llvm_geometry_shader *shader = llvm_geometry_shader(dgs);
|
||||||
struct draw_gs_llvm_variant_list_item *li;
|
struct draw_gs_llvm_variant_list_item *li;
|
||||||
|
|
||||||
|
@@ -47,7 +47,6 @@
|
|||||||
#include "tgsi/tgsi_scan.h"
|
#include "tgsi/tgsi_scan.h"
|
||||||
|
|
||||||
#ifdef HAVE_LLVM
|
#ifdef HAVE_LLVM
|
||||||
struct draw_llvm;
|
|
||||||
struct gallivm_state;
|
struct gallivm_state;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -69,6 +68,7 @@ struct tgsi_exec_machine;
|
|||||||
struct tgsi_sampler;
|
struct tgsi_sampler;
|
||||||
struct draw_pt_front_end;
|
struct draw_pt_front_end;
|
||||||
struct draw_assembler;
|
struct draw_assembler;
|
||||||
|
struct draw_llvm;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -318,9 +318,7 @@ struct draw_context
|
|||||||
unsigned start_instance;
|
unsigned start_instance;
|
||||||
unsigned start_index;
|
unsigned start_index;
|
||||||
|
|
||||||
#ifdef HAVE_LLVM
|
|
||||||
struct draw_llvm *llvm;
|
struct draw_llvm *llvm;
|
||||||
#endif
|
|
||||||
|
|
||||||
/** Texture sampler and sampler view state.
|
/** Texture sampler and sampler view state.
|
||||||
* Note that we have arrays indexed by shader type. At this time
|
* Note that we have arrays indexed by shader type. At this time
|
||||||
@@ -495,7 +493,7 @@ draw_stats_clipper_primitives(struct draw_context *draw,
|
|||||||
static INLINE unsigned
|
static INLINE unsigned
|
||||||
draw_clamp_viewport_idx(int idx)
|
draw_clamp_viewport_idx(int idx)
|
||||||
{
|
{
|
||||||
return ((PIPE_MAX_VIEWPORTS > idx || idx < 0) ? idx : 0);
|
return ((PIPE_MAX_VIEWPORTS > idx && idx >= 0) ? idx : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -149,7 +149,7 @@ draw_vs_init( struct draw_context *draw )
|
|||||||
{
|
{
|
||||||
draw->dump_vs = debug_get_option_gallium_dump_vs();
|
draw->dump_vs = debug_get_option_gallium_dump_vs();
|
||||||
|
|
||||||
if (!draw_get_option_use_llvm()) {
|
if (!draw->llvm) {
|
||||||
draw->vs.tgsi.machine = tgsi_exec_machine_create();
|
draw->vs.tgsi.machine = tgsi_exec_machine_create();
|
||||||
if (!draw->vs.tgsi.machine)
|
if (!draw->vs.tgsi.machine)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -175,7 +175,7 @@ draw_vs_destroy( struct draw_context *draw )
|
|||||||
if (draw->vs.emit_cache)
|
if (draw->vs.emit_cache)
|
||||||
translate_cache_destroy(draw->vs.emit_cache);
|
translate_cache_destroy(draw->vs.emit_cache);
|
||||||
|
|
||||||
if (!draw_get_option_use_llvm())
|
if (!draw->llvm)
|
||||||
tgsi_exec_machine_destroy(draw->vs.tgsi.machine);
|
tgsi_exec_machine_destroy(draw->vs.tgsi.machine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -63,7 +63,7 @@ vs_exec_prepare( struct draw_vertex_shader *shader,
|
|||||||
{
|
{
|
||||||
struct exec_vertex_shader *evs = exec_vertex_shader(shader);
|
struct exec_vertex_shader *evs = exec_vertex_shader(shader);
|
||||||
|
|
||||||
debug_assert(!draw_get_option_use_llvm());
|
debug_assert(!draw->llvm);
|
||||||
/* Specify the vertex program to interpret/execute.
|
/* Specify the vertex program to interpret/execute.
|
||||||
* Avoid rebinding when possible.
|
* Avoid rebinding when possible.
|
||||||
*/
|
*/
|
||||||
@@ -97,7 +97,7 @@ vs_exec_run_linear( struct draw_vertex_shader *shader,
|
|||||||
unsigned slot;
|
unsigned slot;
|
||||||
boolean clamp_vertex_color = shader->draw->rasterizer->clamp_vertex_color;
|
boolean clamp_vertex_color = shader->draw->rasterizer->clamp_vertex_color;
|
||||||
|
|
||||||
debug_assert(!draw_get_option_use_llvm());
|
debug_assert(!shader->draw->llvm);
|
||||||
tgsi_exec_set_constant_buffers(machine, PIPE_MAX_CONSTANT_BUFFERS,
|
tgsi_exec_set_constant_buffers(machine, PIPE_MAX_CONSTANT_BUFFERS,
|
||||||
constants, const_size);
|
constants, const_size);
|
||||||
|
|
||||||
|
@@ -1852,7 +1852,7 @@ lp_build_trunc(struct lp_build_context *bld,
|
|||||||
const struct lp_type type = bld->type;
|
const struct lp_type type = bld->type;
|
||||||
struct lp_type inttype;
|
struct lp_type inttype;
|
||||||
struct lp_build_context intbld;
|
struct lp_build_context intbld;
|
||||||
LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24);
|
LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 1<<24);
|
||||||
LLVMValueRef trunc, res, anosign, mask;
|
LLVMValueRef trunc, res, anosign, mask;
|
||||||
LLVMTypeRef int_vec_type = bld->int_vec_type;
|
LLVMTypeRef int_vec_type = bld->int_vec_type;
|
||||||
LLVMTypeRef vec_type = bld->vec_type;
|
LLVMTypeRef vec_type = bld->vec_type;
|
||||||
@@ -1907,7 +1907,7 @@ lp_build_round(struct lp_build_context *bld,
|
|||||||
const struct lp_type type = bld->type;
|
const struct lp_type type = bld->type;
|
||||||
struct lp_type inttype;
|
struct lp_type inttype;
|
||||||
struct lp_build_context intbld;
|
struct lp_build_context intbld;
|
||||||
LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24);
|
LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 1<<24);
|
||||||
LLVMValueRef res, anosign, mask;
|
LLVMValueRef res, anosign, mask;
|
||||||
LLVMTypeRef int_vec_type = bld->int_vec_type;
|
LLVMTypeRef int_vec_type = bld->int_vec_type;
|
||||||
LLVMTypeRef vec_type = bld->vec_type;
|
LLVMTypeRef vec_type = bld->vec_type;
|
||||||
@@ -1960,7 +1960,7 @@ lp_build_floor(struct lp_build_context *bld,
|
|||||||
const struct lp_type type = bld->type;
|
const struct lp_type type = bld->type;
|
||||||
struct lp_type inttype;
|
struct lp_type inttype;
|
||||||
struct lp_build_context intbld;
|
struct lp_build_context intbld;
|
||||||
LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24);
|
LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 1<<24);
|
||||||
LLVMValueRef trunc, res, anosign, mask;
|
LLVMValueRef trunc, res, anosign, mask;
|
||||||
LLVMTypeRef int_vec_type = bld->int_vec_type;
|
LLVMTypeRef int_vec_type = bld->int_vec_type;
|
||||||
LLVMTypeRef vec_type = bld->vec_type;
|
LLVMTypeRef vec_type = bld->vec_type;
|
||||||
@@ -2029,7 +2029,7 @@ lp_build_ceil(struct lp_build_context *bld,
|
|||||||
const struct lp_type type = bld->type;
|
const struct lp_type type = bld->type;
|
||||||
struct lp_type inttype;
|
struct lp_type inttype;
|
||||||
struct lp_build_context intbld;
|
struct lp_build_context intbld;
|
||||||
LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24);
|
LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 1<<24);
|
||||||
LLVMValueRef trunc, res, anosign, mask, tmp;
|
LLVMValueRef trunc, res, anosign, mask, tmp;
|
||||||
LLVMTypeRef int_vec_type = bld->int_vec_type;
|
LLVMTypeRef int_vec_type = bld->int_vec_type;
|
||||||
LLVMTypeRef vec_type = bld->vec_type;
|
LLVMTypeRef vec_type = bld->vec_type;
|
||||||
|
@@ -34,6 +34,10 @@
|
|||||||
#include <llvm/Support/Format.h>
|
#include <llvm/Support/Format.h>
|
||||||
#include <llvm/Support/MemoryObject.h>
|
#include <llvm/Support/MemoryObject.h>
|
||||||
|
|
||||||
|
#if HAVE_LLVM >= 0x0306
|
||||||
|
#include <llvm/Target/TargetSubtargetInfo.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAVE_LLVM >= 0x0300
|
#if HAVE_LLVM >= 0x0300
|
||||||
#include <llvm/Support/TargetRegistry.h>
|
#include <llvm/Support/TargetRegistry.h>
|
||||||
#include <llvm/MC/MCSubtargetInfo.h>
|
#include <llvm/MC/MCSubtargetInfo.h>
|
||||||
@@ -57,7 +61,9 @@
|
|||||||
#include <llvm/MC/MCRegisterInfo.h>
|
#include <llvm/MC/MCRegisterInfo.h>
|
||||||
#endif /* HAVE_LLVM >= 0x0301 */
|
#endif /* HAVE_LLVM >= 0x0301 */
|
||||||
|
|
||||||
#if HAVE_LLVM >= 0x0303
|
#if HAVE_LLVM >= 0x0305
|
||||||
|
#define OwningPtr std::unique_ptr
|
||||||
|
#elif HAVE_LLVM >= 0x0303
|
||||||
#include <llvm/ADT/OwningPtr.h>
|
#include <llvm/ADT/OwningPtr.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -302,7 +308,11 @@ disassemble(const void* func, llvm::raw_ostream & Out)
|
|||||||
OwningPtr<TargetMachine> TM(T->createTargetMachine(Triple, ""));
|
OwningPtr<TargetMachine> TM(T->createTargetMachine(Triple, ""));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_LLVM >= 0x0306
|
||||||
|
const TargetInstrInfo *TII = TM->getSubtargetImpl()->getInstrInfo();
|
||||||
|
#else
|
||||||
const TargetInstrInfo *TII = TM->getInstrInfo();
|
const TargetInstrInfo *TII = TM->getInstrInfo();
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wrap the data in a MemoryObject
|
* Wrap the data in a MemoryObject
|
||||||
|
@@ -73,6 +73,10 @@
|
|||||||
#include <llvm/Support/CBindingWrapping.h>
|
#include <llvm/Support/CBindingWrapping.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_LLVM >= 0x0305
|
||||||
|
#include <llvm/Support/Host.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "pipe/p_config.h"
|
#include "pipe/p_config.h"
|
||||||
#include "util/u_debug.h"
|
#include "util/u_debug.h"
|
||||||
#include "util/u_cpu_detect.h"
|
#include "util/u_cpu_detect.h"
|
||||||
@@ -266,7 +270,11 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
|||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
std::string Error;
|
std::string Error;
|
||||||
|
#if HAVE_LLVM >= 0x0306
|
||||||
|
EngineBuilder builder(std::unique_ptr<Module>(unwrap(M)));
|
||||||
|
#else
|
||||||
EngineBuilder builder(unwrap(M));
|
EngineBuilder builder(unwrap(M));
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LLVM 3.1+ haven't more "extern unsigned llvm::StackAlignmentOverride" and
|
* LLVM 3.1+ haven't more "extern unsigned llvm::StackAlignmentOverride" and
|
||||||
@@ -305,8 +313,8 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
|||||||
/*
|
/*
|
||||||
* AVX feature is not automatically detected from CPUID by the X86 target
|
* AVX feature is not automatically detected from CPUID by the X86 target
|
||||||
* yet, because the old (yet default) JIT engine is not capable of
|
* yet, because the old (yet default) JIT engine is not capable of
|
||||||
* emitting the opcodes. But as we're using MCJIT here, it is safe to
|
* emitting the opcodes. On newer llvm versions it is and at least some
|
||||||
* add set this attribute.
|
* versions (tested with 3.3) will emit avx opcodes without this anyway.
|
||||||
*/
|
*/
|
||||||
MAttrs.push_back("+avx");
|
MAttrs.push_back("+avx");
|
||||||
if (util_cpu_caps.has_f16c) {
|
if (util_cpu_caps.has_f16c) {
|
||||||
@@ -316,12 +324,30 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
|||||||
}
|
}
|
||||||
builder.setJITMemoryManager(JITMemoryManager::CreateDefaultMemManager());
|
builder.setJITMemoryManager(JITMemoryManager::CreateDefaultMemManager());
|
||||||
|
|
||||||
|
#if HAVE_LLVM >= 0x0305
|
||||||
|
StringRef MCPU = llvm::sys::getHostCPUName();
|
||||||
|
/*
|
||||||
|
* The cpu bits are no longer set automatically, so need to set mcpu manually.
|
||||||
|
* Note that the MAttrs set above will be sort of ignored (since we should
|
||||||
|
* not set any which would not be set by specifying the cpu anyway).
|
||||||
|
* It ought to be safe though since getHostCPUName() should include bits
|
||||||
|
* not only from the cpu but environment as well (for instance if it's safe
|
||||||
|
* to use avx instructions which need OS support). According to
|
||||||
|
* http://llvm.org/bugs/show_bug.cgi?id=19429 however if I understand this
|
||||||
|
* right it may be necessary to specify older cpu (or disable mattrs) though
|
||||||
|
* when not using MCJIT so no instructions are generated which the old JIT
|
||||||
|
* can't handle. Not entirely sure if we really need to do anything yet.
|
||||||
|
*/
|
||||||
|
builder.setMCPU(MCPU);
|
||||||
|
#endif
|
||||||
|
|
||||||
ExecutionEngine *JIT;
|
ExecutionEngine *JIT;
|
||||||
#if 0
|
|
||||||
|
#if HAVE_LLVM >= 0x0302
|
||||||
JIT = builder.create();
|
JIT = builder.create();
|
||||||
#else
|
#else
|
||||||
/*
|
/*
|
||||||
* Workaround http://llvm.org/bugs/show_bug.cgi?id=12833
|
* Workaround http://llvm.org/PR12833
|
||||||
*/
|
*/
|
||||||
StringRef MArch = "";
|
StringRef MArch = "";
|
||||||
StringRef MCPU = "";
|
StringRef MCPU = "";
|
||||||
|
@@ -927,6 +927,7 @@ lp_build_nearest_mip_level(struct lp_build_sample_context *bld,
|
|||||||
bld->int_coord_bld.type,
|
bld->int_coord_bld.type,
|
||||||
out);
|
out);
|
||||||
}
|
}
|
||||||
|
level = lp_build_andnot(&bld->int_coord_bld, level, *out_of_bounds);
|
||||||
*level_out = level;
|
*level_out = level;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@@ -1248,8 +1248,24 @@ idiv_emit_cpu(
|
|||||||
struct lp_build_tgsi_context * bld_base,
|
struct lp_build_tgsi_context * bld_base,
|
||||||
struct lp_build_emit_data * emit_data)
|
struct lp_build_emit_data * emit_data)
|
||||||
{
|
{
|
||||||
emit_data->output[emit_data->chan] = lp_build_div(&bld_base->int_bld,
|
LLVMBuilderRef builder = bld_base->base.gallivm->builder;
|
||||||
emit_data->args[0], emit_data->args[1]);
|
LLVMValueRef div_mask = lp_build_cmp(&bld_base->uint_bld,
|
||||||
|
PIPE_FUNC_EQUAL, emit_data->args[1],
|
||||||
|
bld_base->uint_bld.zero);
|
||||||
|
/* We want to make sure that we never divide/mod by zero to not
|
||||||
|
* generate sigfpe. We don't want to crash just because the
|
||||||
|
* shader is doing something weird. */
|
||||||
|
LLVMValueRef divisor = LLVMBuildOr(builder,
|
||||||
|
div_mask,
|
||||||
|
emit_data->args[1], "");
|
||||||
|
LLVMValueRef result = lp_build_div(&bld_base->int_bld,
|
||||||
|
emit_data->args[0], divisor);
|
||||||
|
LLVMValueRef not_div_mask = LLVMBuildNot(builder,
|
||||||
|
div_mask,"");
|
||||||
|
/* idiv by zero doesn't have a guaranteed return value chose 0 for now. */
|
||||||
|
emit_data->output[emit_data->chan] = LLVMBuildAnd(builder,
|
||||||
|
not_div_mask,
|
||||||
|
result, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TGSI_OPCODE_INEG (CPU Only) */
|
/* TGSI_OPCODE_INEG (CPU Only) */
|
||||||
@@ -1675,15 +1691,15 @@ udiv_emit_cpu(
|
|||||||
LLVMValueRef div_mask = lp_build_cmp(&bld_base->uint_bld,
|
LLVMValueRef div_mask = lp_build_cmp(&bld_base->uint_bld,
|
||||||
PIPE_FUNC_EQUAL, emit_data->args[1],
|
PIPE_FUNC_EQUAL, emit_data->args[1],
|
||||||
bld_base->uint_bld.zero);
|
bld_base->uint_bld.zero);
|
||||||
/* We want to make sure that we never divide/mod by zero to not
|
/* We want to make sure that we never divide/mod by zero to not
|
||||||
* generate sigfpe. We don't want to crash just because the
|
* generate sigfpe. We don't want to crash just because the
|
||||||
* shader is doing something weird. */
|
* shader is doing something weird. */
|
||||||
LLVMValueRef divisor = LLVMBuildOr(builder,
|
LLVMValueRef divisor = LLVMBuildOr(builder,
|
||||||
div_mask,
|
div_mask,
|
||||||
emit_data->args[1], "");
|
emit_data->args[1], "");
|
||||||
LLVMValueRef result = lp_build_div(&bld_base->uint_bld,
|
LLVMValueRef result = lp_build_div(&bld_base->uint_bld,
|
||||||
emit_data->args[0], divisor);
|
emit_data->args[0], divisor);
|
||||||
/* udiv by zero is guaranteed to return 0xffffffff */
|
/* udiv by zero is guaranteed to return 0xffffffff at least with d3d10 */
|
||||||
emit_data->output[emit_data->chan] = LLVMBuildOr(builder,
|
emit_data->output[emit_data->chan] = LLVMBuildOr(builder,
|
||||||
div_mask,
|
div_mask,
|
||||||
result, "");
|
result, "");
|
||||||
|
@@ -66,7 +66,7 @@ struct pipe_loader_device {
|
|||||||
} pci;
|
} pci;
|
||||||
} u; /**< Discriminated by \a type */
|
} u; /**< Discriminated by \a type */
|
||||||
|
|
||||||
const char *driver_name;
|
char *driver_name;
|
||||||
const struct pipe_loader_ops *ops;
|
const struct pipe_loader_ops *ops;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -256,6 +256,7 @@ pipe_loader_drm_release(struct pipe_loader_device **dev)
|
|||||||
util_dl_close(ddev->lib);
|
util_dl_close(ddev->lib);
|
||||||
|
|
||||||
close(ddev->fd);
|
close(ddev->fd);
|
||||||
|
FREE(ddev->base.driver_name);
|
||||||
FREE(ddev);
|
FREE(ddev);
|
||||||
*dev = NULL;
|
*dev = NULL;
|
||||||
}
|
}
|
||||||
|
@@ -145,9 +145,6 @@ pipe_loader_sw_release(struct pipe_loader_device **dev)
|
|||||||
{
|
{
|
||||||
struct pipe_loader_sw_device *sdev = pipe_loader_sw_device(*dev);
|
struct pipe_loader_sw_device *sdev = pipe_loader_sw_device(*dev);
|
||||||
|
|
||||||
if (sdev->ws && sdev->ws->destroy)
|
|
||||||
sdev->ws->destroy(sdev->ws);
|
|
||||||
|
|
||||||
if (sdev->lib)
|
if (sdev->lib)
|
||||||
util_dl_close(sdev->lib);
|
util_dl_close(sdev->lib);
|
||||||
|
|
||||||
|
@@ -3332,10 +3332,10 @@ micro_idiv(union tgsi_exec_channel *dst,
|
|||||||
const union tgsi_exec_channel *src0,
|
const union tgsi_exec_channel *src0,
|
||||||
const union tgsi_exec_channel *src1)
|
const union tgsi_exec_channel *src1)
|
||||||
{
|
{
|
||||||
dst->i[0] = src0->i[0] / src1->i[0];
|
dst->i[0] = src1->i[0] ? src0->i[0] / src1->i[0] : 0;
|
||||||
dst->i[1] = src0->i[1] / src1->i[1];
|
dst->i[1] = src1->i[1] ? src0->i[1] / src1->i[1] : 0;
|
||||||
dst->i[2] = src0->i[2] / src1->i[2];
|
dst->i[2] = src1->i[2] ? src0->i[2] / src1->i[2] : 0;
|
||||||
dst->i[3] = src0->i[3] / src1->i[3];
|
dst->i[3] = src1->i[3] ? src0->i[3] / src1->i[3] : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -120,7 +120,8 @@ const char *tgsi_property_names[TGSI_PROPERTY_COUNT] =
|
|||||||
"FS_COORD_PIXEL_CENTER",
|
"FS_COORD_PIXEL_CENTER",
|
||||||
"FS_COLOR0_WRITES_ALL_CBUFS",
|
"FS_COLOR0_WRITES_ALL_CBUFS",
|
||||||
"FS_DEPTH_LAYOUT",
|
"FS_DEPTH_LAYOUT",
|
||||||
"VS_PROHIBIT_UCPS"
|
"VS_PROHIBIT_UCPS",
|
||||||
|
"GS_INVOCATIONS",
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *tgsi_type_names[5] =
|
const char *tgsi_type_names[5] =
|
||||||
|
@@ -383,6 +383,15 @@ void util_blitter_destroy(struct blitter_context *blitter)
|
|||||||
if (ctx->fs_texfetch_stencil[i])
|
if (ctx->fs_texfetch_stencil[i])
|
||||||
ctx->delete_fs_state(pipe, ctx->fs_texfetch_stencil[i]);
|
ctx->delete_fs_state(pipe, ctx->fs_texfetch_stencil[i]);
|
||||||
|
|
||||||
|
if (ctx->fs_texfetch_col_msaa[i])
|
||||||
|
ctx->delete_fs_state(pipe, ctx->fs_texfetch_col_msaa[i]);
|
||||||
|
if (ctx->fs_texfetch_depth_msaa[i])
|
||||||
|
ctx->delete_fs_state(pipe, ctx->fs_texfetch_depth_msaa[i]);
|
||||||
|
if (ctx->fs_texfetch_depthstencil_msaa[i])
|
||||||
|
ctx->delete_fs_state(pipe, ctx->fs_texfetch_depthstencil_msaa[i]);
|
||||||
|
if (ctx->fs_texfetch_stencil_msaa[i])
|
||||||
|
ctx->delete_fs_state(pipe, ctx->fs_texfetch_stencil_msaa[i]);
|
||||||
|
|
||||||
for (j = 0; j< Elements(ctx->fs_resolve[i]); j++)
|
for (j = 0; j< Elements(ctx->fs_resolve[i]); j++)
|
||||||
for (f = 0; f < 2; f++)
|
for (f = 0; f < 2; f++)
|
||||||
if (ctx->fs_resolve[i][j][f])
|
if (ctx->fs_resolve[i][j][f])
|
||||||
|
@@ -149,28 +149,6 @@ roundf(float x)
|
|||||||
#endif /* _MSC_VER */
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
|
|
||||||
#ifdef PIPE_OS_ANDROID
|
|
||||||
|
|
||||||
static INLINE
|
|
||||||
double log2(double d)
|
|
||||||
{
|
|
||||||
return log(d) * (1.0 / M_LN2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* workaround a conflict with main/imports.h */
|
|
||||||
#ifdef log2f
|
|
||||||
#undef log2f
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static INLINE
|
|
||||||
float log2f(float f)
|
|
||||||
{
|
|
||||||
return logf(f) * (float) (1.0 / M_LN2);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if __STDC_VERSION__ < 199901L && (!defined(__cplusplus) || defined(_MSC_VER))
|
#if __STDC_VERSION__ < 199901L && (!defined(__cplusplus) || defined(_MSC_VER))
|
||||||
static INLINE long int
|
static INLINE long int
|
||||||
lrint(double d)
|
lrint(double d)
|
||||||
|
@@ -136,6 +136,21 @@ u_prim_vertex_count(unsigned prim)
|
|||||||
return (likely(prim < PIPE_PRIM_MAX)) ? &prim_table[prim] : NULL;
|
return (likely(prim < PIPE_PRIM_MAX)) ? &prim_table[prim] : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Given a vertex count, return the number of primitives.
|
||||||
|
* For polygons, return the number of triangles.
|
||||||
|
*/
|
||||||
|
static INLINE unsigned
|
||||||
|
u_prims_for_vertices(unsigned prim, unsigned num)
|
||||||
|
{
|
||||||
|
const struct u_prim_vertex_count *info = u_prim_vertex_count(prim);
|
||||||
|
|
||||||
|
if (num < info->min)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return 1 + ((num - info->min) / info->incr);
|
||||||
|
}
|
||||||
|
|
||||||
static INLINE boolean u_validate_pipe_prim( unsigned pipe_prim, unsigned nr )
|
static INLINE boolean u_validate_pipe_prim( unsigned pipe_prim, unsigned nr )
|
||||||
{
|
{
|
||||||
const struct u_prim_vertex_count *count = u_prim_vertex_count(pipe_prim);
|
const struct u_prim_vertex_count *count = u_prim_vertex_count(pipe_prim);
|
||||||
|
@@ -25,8 +25,8 @@ void u_default_transfer_inline_write( struct pipe_context *pipe,
|
|||||||
usage |= PIPE_TRANSFER_WRITE;
|
usage |= PIPE_TRANSFER_WRITE;
|
||||||
|
|
||||||
/* transfer_inline_write implicitly discards the rewritten buffer range */
|
/* transfer_inline_write implicitly discards the rewritten buffer range */
|
||||||
/* XXX this looks very broken for non-buffer resources having more than one dim. */
|
if (resource->target == PIPE_BUFFER &&
|
||||||
if (box->x == 0 && box->width == resource->width0) {
|
box->x == 0 && box->width == resource->width0) {
|
||||||
usage |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE;
|
usage |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE;
|
||||||
} else {
|
} else {
|
||||||
usage |= PIPE_TRANSFER_DISCARD_RANGE;
|
usage |= PIPE_TRANSFER_DISCARD_RANGE;
|
||||||
|
44
src/gallium/drivers/freedreno/Android.mk
Normal file
44
src/gallium/drivers/freedreno/Android.mk
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# Copyright (C) 2014 Emil Velikov <emil.l.velikov@gmail.com>
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
# copy of this software and associated documentation files (the "Software"),
|
||||||
|
# to deal in the Software without restriction, including without limitation
|
||||||
|
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
# and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
# Software is furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included
|
||||||
|
# in all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
# DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
|
# get C_SOURCES
|
||||||
|
include $(LOCAL_PATH)/Makefile.sources
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES := \
|
||||||
|
$(C_SOURCES) \
|
||||||
|
$(a2xx_SOURCES) \
|
||||||
|
$(a3xx_SOURCES)
|
||||||
|
|
||||||
|
LOCAL_CFLAGS := \
|
||||||
|
-Wno-packed-bitfield-compat
|
||||||
|
|
||||||
|
LOCAL_C_INCLUDES := \
|
||||||
|
$(LOCAL_PATH)/ir3 \
|
||||||
|
$(TARGET_OUT_HEADERS)/libdrm \
|
||||||
|
$(TARGET_OUT_HEADERS)/freedreno
|
||||||
|
|
||||||
|
LOCAL_MODULE := libmesa_pipe_freedreno
|
||||||
|
|
||||||
|
include $(GALLIUM_COMMON_MK)
|
||||||
|
include $(BUILD_STATIC_LIBRARY)
|
@@ -5,8 +5,6 @@ include $(top_srcdir)/src/gallium/Automake.inc
|
|||||||
|
|
||||||
AM_CFLAGS = \
|
AM_CFLAGS = \
|
||||||
-Wno-packed-bitfield-compat \
|
-Wno-packed-bitfield-compat \
|
||||||
-I$(top_srcdir)/src/gallium/drivers/freedreno/a3xx \
|
|
||||||
-I$(top_srcdir)/src/gallium/drivers/freedreno/a2xx \
|
|
||||||
$(GALLIUM_DRIVER_CFLAGS) \
|
$(GALLIUM_DRIVER_CFLAGS) \
|
||||||
$(FREEDRENO_CFLAGS)
|
$(FREEDRENO_CFLAGS)
|
||||||
|
|
||||||
|
@@ -3,6 +3,8 @@ C_SOURCES := \
|
|||||||
freedreno_lowering.c \
|
freedreno_lowering.c \
|
||||||
freedreno_program.c \
|
freedreno_program.c \
|
||||||
freedreno_query.c \
|
freedreno_query.c \
|
||||||
|
freedreno_query_hw.c \
|
||||||
|
freedreno_query_sw.c \
|
||||||
freedreno_fence.c \
|
freedreno_fence.c \
|
||||||
freedreno_resource.c \
|
freedreno_resource.c \
|
||||||
freedreno_surface.c \
|
freedreno_surface.c \
|
||||||
@@ -38,6 +40,7 @@ a3xx_SOURCES := \
|
|||||||
a3xx/fd3_emit.c \
|
a3xx/fd3_emit.c \
|
||||||
a3xx/fd3_gmem.c \
|
a3xx/fd3_gmem.c \
|
||||||
a3xx/fd3_program.c \
|
a3xx/fd3_program.c \
|
||||||
|
a3xx/fd3_query.c \
|
||||||
a3xx/fd3_rasterizer.c \
|
a3xx/fd3_rasterizer.c \
|
||||||
a3xx/fd3_screen.c \
|
a3xx/fd3_screen.c \
|
||||||
a3xx/fd3_texture.c \
|
a3xx/fd3_texture.c \
|
||||||
|
@@ -10,11 +10,11 @@ git clone https://github.com/freedreno/envytools.git
|
|||||||
The rules-ng-ng source files this header was generated from are:
|
The rules-ng-ng source files this header was generated from are:
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2013-11-30 14:47:15)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2013-11-30 14:47:15)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2013-03-31 16:51:27)
|
- /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2013-03-31 16:51:27)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32840 bytes, from 2014-01-05 14:44:21)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-06-02 15:21:30)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9009 bytes, from 2014-01-11 16:56:35)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9859 bytes, from 2014-06-02 15:21:30)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 12362 bytes, from 2014-01-07 14:47:36)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14477 bytes, from 2014-05-16 11:51:57)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 56545 bytes, from 2014-02-26 16:32:11)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 58020 bytes, from 2014-06-13 17:29:47)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 8344 bytes, from 2013-11-30 14:49:47)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26602 bytes, from 2014-06-13 17:28:10)
|
||||||
|
|
||||||
Copyright (C) 2013-2014 by the following authors:
|
Copyright (C) 2013-2014 by the following authors:
|
||||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||||
@@ -203,6 +203,15 @@ enum a2xx_rb_copy_sample_select {
|
|||||||
SAMPLE_0123 = 6,
|
SAMPLE_0123 = 6,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum a2xx_rb_blend_opcode {
|
||||||
|
BLEND_DST_PLUS_SRC = 0,
|
||||||
|
BLEND_SRC_MINUS_DST = 1,
|
||||||
|
BLEND_MIN_DST_SRC = 2,
|
||||||
|
BLEND_MAX_DST_SRC = 3,
|
||||||
|
BLEND_DST_MINUS_SRC = 4,
|
||||||
|
BLEND_DST_PLUS_SRC_BIAS = 5,
|
||||||
|
};
|
||||||
|
|
||||||
enum adreno_mmu_clnt_beh {
|
enum adreno_mmu_clnt_beh {
|
||||||
BEH_NEVR = 0,
|
BEH_NEVR = 0,
|
||||||
BEH_TRAN_RNG = 1,
|
BEH_TRAN_RNG = 1,
|
||||||
@@ -996,7 +1005,7 @@ static inline uint32_t A2XX_RB_BLEND_CONTROL_COLOR_SRCBLEND(enum adreno_rb_blend
|
|||||||
}
|
}
|
||||||
#define A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN__MASK 0x000000e0
|
#define A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN__MASK 0x000000e0
|
||||||
#define A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN__SHIFT 5
|
#define A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN__SHIFT 5
|
||||||
static inline uint32_t A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN(enum adreno_rb_blend_opcode val)
|
static inline uint32_t A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN(enum a2xx_rb_blend_opcode val)
|
||||||
{
|
{
|
||||||
return ((val) << A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN__SHIFT) & A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN__MASK;
|
return ((val) << A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN__SHIFT) & A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN__MASK;
|
||||||
}
|
}
|
||||||
@@ -1014,7 +1023,7 @@ static inline uint32_t A2XX_RB_BLEND_CONTROL_ALPHA_SRCBLEND(enum adreno_rb_blend
|
|||||||
}
|
}
|
||||||
#define A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN__MASK 0x00e00000
|
#define A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN__MASK 0x00e00000
|
||||||
#define A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN__SHIFT 21
|
#define A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN__SHIFT 21
|
||||||
static inline uint32_t A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN(enum adreno_rb_blend_opcode val)
|
static inline uint32_t A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN(enum a2xx_rb_blend_opcode val)
|
||||||
{
|
{
|
||||||
return ((val) << A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN__SHIFT) & A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN__MASK;
|
return ((val) << A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN__SHIFT) & A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN__MASK;
|
||||||
}
|
}
|
||||||
|
@@ -34,6 +34,27 @@
|
|||||||
#include "fd2_context.h"
|
#include "fd2_context.h"
|
||||||
#include "fd2_util.h"
|
#include "fd2_util.h"
|
||||||
|
|
||||||
|
|
||||||
|
static enum a2xx_rb_blend_opcode
|
||||||
|
blend_func(unsigned func)
|
||||||
|
{
|
||||||
|
switch (func) {
|
||||||
|
case PIPE_BLEND_ADD:
|
||||||
|
return BLEND_DST_PLUS_SRC;
|
||||||
|
case PIPE_BLEND_MIN:
|
||||||
|
return BLEND_MIN_DST_SRC;
|
||||||
|
case PIPE_BLEND_MAX:
|
||||||
|
return BLEND_MAX_DST_SRC;
|
||||||
|
case PIPE_BLEND_SUBTRACT:
|
||||||
|
return BLEND_SRC_MINUS_DST;
|
||||||
|
case PIPE_BLEND_REVERSE_SUBTRACT:
|
||||||
|
return BLEND_DST_MINUS_SRC;
|
||||||
|
default:
|
||||||
|
DBG("invalid blend func: %x", func);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
fd2_blend_state_create(struct pipe_context *pctx,
|
fd2_blend_state_create(struct pipe_context *pctx,
|
||||||
const struct pipe_blend_state *cso)
|
const struct pipe_blend_state *cso)
|
||||||
@@ -61,10 +82,10 @@ fd2_blend_state_create(struct pipe_context *pctx,
|
|||||||
|
|
||||||
so->rb_blendcontrol =
|
so->rb_blendcontrol =
|
||||||
A2XX_RB_BLEND_CONTROL_COLOR_SRCBLEND(fd_blend_factor(rt->rgb_src_factor)) |
|
A2XX_RB_BLEND_CONTROL_COLOR_SRCBLEND(fd_blend_factor(rt->rgb_src_factor)) |
|
||||||
A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN(fd_blend_func(rt->rgb_func)) |
|
A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN(blend_func(rt->rgb_func)) |
|
||||||
A2XX_RB_BLEND_CONTROL_COLOR_DESTBLEND(fd_blend_factor(rt->rgb_dst_factor)) |
|
A2XX_RB_BLEND_CONTROL_COLOR_DESTBLEND(fd_blend_factor(rt->rgb_dst_factor)) |
|
||||||
A2XX_RB_BLEND_CONTROL_ALPHA_SRCBLEND(fd_blend_factor(rt->alpha_src_factor)) |
|
A2XX_RB_BLEND_CONTROL_ALPHA_SRCBLEND(fd_blend_factor(rt->alpha_src_factor)) |
|
||||||
A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN(fd_blend_func(rt->alpha_func)) |
|
A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN(blend_func(rt->alpha_func)) |
|
||||||
A2XX_RB_BLEND_CONTROL_ALPHA_DESTBLEND(fd_blend_factor(rt->alpha_dst_factor));
|
A2XX_RB_BLEND_CONTROL_ALPHA_DESTBLEND(fd_blend_factor(rt->alpha_dst_factor));
|
||||||
|
|
||||||
if (rt->colormask & PIPE_MASK_R)
|
if (rt->colormask & PIPE_MASK_R)
|
||||||
|
@@ -125,7 +125,7 @@ emit_texture(struct fd_ringbuffer *ring, struct fd_context *ctx,
|
|||||||
{
|
{
|
||||||
unsigned const_idx = fd2_get_const_idx(ctx, tex, samp_id);
|
unsigned const_idx = fd2_get_const_idx(ctx, tex, samp_id);
|
||||||
static const struct fd2_sampler_stateobj dummy_sampler = {};
|
static const struct fd2_sampler_stateobj dummy_sampler = {};
|
||||||
struct fd2_sampler_stateobj *sampler;
|
const struct fd2_sampler_stateobj *sampler;
|
||||||
struct fd2_pipe_sampler_view *view;
|
struct fd2_pipe_sampler_view *view;
|
||||||
|
|
||||||
if (emitted & (1 << const_idx))
|
if (emitted & (1 << const_idx))
|
||||||
|
@@ -10,11 +10,11 @@ git clone https://github.com/freedreno/envytools.git
|
|||||||
The rules-ng-ng source files this header was generated from are:
|
The rules-ng-ng source files this header was generated from are:
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2013-11-30 14:47:15)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2013-11-30 14:47:15)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2013-03-31 16:51:27)
|
- /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2013-03-31 16:51:27)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32840 bytes, from 2014-01-05 14:44:21)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-06-02 15:21:30)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9009 bytes, from 2014-01-11 16:56:35)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9859 bytes, from 2014-06-02 15:21:30)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 12362 bytes, from 2014-01-07 14:47:36)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14477 bytes, from 2014-05-16 11:51:57)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 56545 bytes, from 2014-02-26 16:32:11)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 58020 bytes, from 2014-06-13 17:29:47)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 8344 bytes, from 2013-11-30 14:49:47)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26602 bytes, from 2014-06-13 17:28:10)
|
||||||
|
|
||||||
Copyright (C) 2013-2014 by the following authors:
|
Copyright (C) 2013-2014 by the following authors:
|
||||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||||
@@ -41,31 +41,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
enum a3xx_render_mode {
|
|
||||||
RB_RENDERING_PASS = 0,
|
|
||||||
RB_TILING_PASS = 1,
|
|
||||||
RB_RESOLVE_PASS = 2,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum a3xx_tile_mode {
|
enum a3xx_tile_mode {
|
||||||
LINEAR = 0,
|
LINEAR = 0,
|
||||||
TILE_32X32 = 2,
|
TILE_32X32 = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum a3xx_threadmode {
|
|
||||||
MULTI = 0,
|
|
||||||
SINGLE = 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum a3xx_instrbuffermode {
|
|
||||||
BUFFER = 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum a3xx_threadsize {
|
|
||||||
TWO_QUADS = 0,
|
|
||||||
FOUR_QUADS = 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum a3xx_state_block_id {
|
enum a3xx_state_block_id {
|
||||||
HLSQ_BLOCK_ID_TP_TEX = 2,
|
HLSQ_BLOCK_ID_TP_TEX = 2,
|
||||||
HLSQ_BLOCK_ID_TP_MIPMAP = 3,
|
HLSQ_BLOCK_ID_TP_MIPMAP = 3,
|
||||||
@@ -180,12 +160,6 @@ enum a3xx_color_swap {
|
|||||||
XYZW = 3,
|
XYZW = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum a3xx_msaa_samples {
|
|
||||||
MSAA_ONE = 0,
|
|
||||||
MSAA_TWO = 1,
|
|
||||||
MSAA_FOUR = 2,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum a3xx_sp_perfcounter_select {
|
enum a3xx_sp_perfcounter_select {
|
||||||
SP_FS_CFLOW_INSTRUCTIONS = 12,
|
SP_FS_CFLOW_INSTRUCTIONS = 12,
|
||||||
SP_FS_FULL_ALU_INSTRUCTIONS = 14,
|
SP_FS_FULL_ALU_INSTRUCTIONS = 14,
|
||||||
@@ -212,21 +186,26 @@ enum a3xx_rop_code {
|
|||||||
ROP_SET = 15,
|
ROP_SET = 15,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum adreno_rb_copy_control_mode {
|
enum a3xx_rb_blend_opcode {
|
||||||
RB_COPY_RESOLVE = 1,
|
BLEND_DST_PLUS_SRC = 0,
|
||||||
RB_COPY_DEPTH_STENCIL = 5,
|
BLEND_SRC_MINUS_DST = 1,
|
||||||
|
BLEND_DST_MINUS_SRC = 2,
|
||||||
|
BLEND_MIN_DST_SRC = 3,
|
||||||
|
BLEND_MAX_DST_SRC = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum a3xx_tex_filter {
|
enum a3xx_tex_filter {
|
||||||
A3XX_TEX_NEAREST = 0,
|
A3XX_TEX_NEAREST = 0,
|
||||||
A3XX_TEX_LINEAR = 1,
|
A3XX_TEX_LINEAR = 1,
|
||||||
|
A3XX_TEX_ANISO = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum a3xx_tex_clamp {
|
enum a3xx_tex_clamp {
|
||||||
A3XX_TEX_REPEAT = 0,
|
A3XX_TEX_REPEAT = 0,
|
||||||
A3XX_TEX_CLAMP_TO_EDGE = 1,
|
A3XX_TEX_CLAMP_TO_EDGE = 1,
|
||||||
A3XX_TEX_MIRROR_REPEAT = 2,
|
A3XX_TEX_MIRROR_REPEAT = 2,
|
||||||
A3XX_TEX_CLAMP_NONE = 3,
|
A3XX_TEX_CLAMP_TO_BORDER = 3,
|
||||||
|
A3XX_TEX_MIRROR_CLAMP = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum a3xx_tex_swiz {
|
enum a3xx_tex_swiz {
|
||||||
@@ -337,6 +316,7 @@ enum a3xx_tex_type {
|
|||||||
#define REG_A3XX_RBBM_INT_0_STATUS 0x00000064
|
#define REG_A3XX_RBBM_INT_0_STATUS 0x00000064
|
||||||
|
|
||||||
#define REG_A3XX_RBBM_PERFCTR_CTL 0x00000080
|
#define REG_A3XX_RBBM_PERFCTR_CTL 0x00000080
|
||||||
|
#define A3XX_RBBM_PERFCTR_CTL_ENABLE 0x00000001
|
||||||
|
|
||||||
#define REG_A3XX_RBBM_PERFCTR_LOAD_CMD0 0x00000081
|
#define REG_A3XX_RBBM_PERFCTR_LOAD_CMD0 0x00000081
|
||||||
|
|
||||||
@@ -570,6 +550,10 @@ static inline uint32_t REG_A3XX_CP_PROTECT_REG(uint32_t i0) { return 0x00000460
|
|||||||
|
|
||||||
#define REG_A3XX_CP_AHB_FAULT 0x0000054d
|
#define REG_A3XX_CP_AHB_FAULT 0x0000054d
|
||||||
|
|
||||||
|
#define REG_A3XX_SP_GLOBAL_MEM_SIZE 0x00000e22
|
||||||
|
|
||||||
|
#define REG_A3XX_SP_GLOBAL_MEM_ADDR 0x00000e23
|
||||||
|
|
||||||
#define REG_A3XX_GRAS_CL_CLIP_CNTL 0x00002040
|
#define REG_A3XX_GRAS_CL_CLIP_CNTL 0x00002040
|
||||||
#define A3XX_GRAS_CL_CLIP_CNTL_IJ_PERSP_CENTER 0x00001000
|
#define A3XX_GRAS_CL_CLIP_CNTL_IJ_PERSP_CENTER 0x00001000
|
||||||
#define A3XX_GRAS_CL_CLIP_CNTL_CLIP_DISABLE 0x00010000
|
#define A3XX_GRAS_CL_CLIP_CNTL_CLIP_DISABLE 0x00010000
|
||||||
@@ -644,8 +628,26 @@ static inline uint32_t A3XX_GRAS_CL_VPORT_ZSCALE(float val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define REG_A3XX_GRAS_SU_POINT_MINMAX 0x00002068
|
#define REG_A3XX_GRAS_SU_POINT_MINMAX 0x00002068
|
||||||
|
#define A3XX_GRAS_SU_POINT_MINMAX_MIN__MASK 0x0000ffff
|
||||||
|
#define A3XX_GRAS_SU_POINT_MINMAX_MIN__SHIFT 0
|
||||||
|
static inline uint32_t A3XX_GRAS_SU_POINT_MINMAX_MIN(float val)
|
||||||
|
{
|
||||||
|
return ((((uint32_t)(val * 8.0))) << A3XX_GRAS_SU_POINT_MINMAX_MIN__SHIFT) & A3XX_GRAS_SU_POINT_MINMAX_MIN__MASK;
|
||||||
|
}
|
||||||
|
#define A3XX_GRAS_SU_POINT_MINMAX_MAX__MASK 0xffff0000
|
||||||
|
#define A3XX_GRAS_SU_POINT_MINMAX_MAX__SHIFT 16
|
||||||
|
static inline uint32_t A3XX_GRAS_SU_POINT_MINMAX_MAX(float val)
|
||||||
|
{
|
||||||
|
return ((((uint32_t)(val * 8.0))) << A3XX_GRAS_SU_POINT_MINMAX_MAX__SHIFT) & A3XX_GRAS_SU_POINT_MINMAX_MAX__MASK;
|
||||||
|
}
|
||||||
|
|
||||||
#define REG_A3XX_GRAS_SU_POINT_SIZE 0x00002069
|
#define REG_A3XX_GRAS_SU_POINT_SIZE 0x00002069
|
||||||
|
#define A3XX_GRAS_SU_POINT_SIZE__MASK 0xffffffff
|
||||||
|
#define A3XX_GRAS_SU_POINT_SIZE__SHIFT 0
|
||||||
|
static inline uint32_t A3XX_GRAS_SU_POINT_SIZE(float val)
|
||||||
|
{
|
||||||
|
return ((((uint32_t)(val * 8.0))) << A3XX_GRAS_SU_POINT_SIZE__SHIFT) & A3XX_GRAS_SU_POINT_SIZE__MASK;
|
||||||
|
}
|
||||||
|
|
||||||
#define REG_A3XX_GRAS_SU_POLY_OFFSET_SCALE 0x0000206c
|
#define REG_A3XX_GRAS_SU_POLY_OFFSET_SCALE 0x0000206c
|
||||||
#define A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL__MASK 0x00ffffff
|
#define A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL__MASK 0x00ffffff
|
||||||
@@ -885,7 +887,7 @@ static inline uint32_t A3XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR(enum adreno_rb_b
|
|||||||
}
|
}
|
||||||
#define A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__MASK 0x000000e0
|
#define A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__MASK 0x000000e0
|
||||||
#define A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__SHIFT 5
|
#define A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__SHIFT 5
|
||||||
static inline uint32_t A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE(enum adreno_rb_blend_opcode val)
|
static inline uint32_t A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE(enum a3xx_rb_blend_opcode val)
|
||||||
{
|
{
|
||||||
return ((val) << A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__SHIFT) & A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__MASK;
|
return ((val) << A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__SHIFT) & A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__MASK;
|
||||||
}
|
}
|
||||||
@@ -903,7 +905,7 @@ static inline uint32_t A3XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR(enum adreno_rb
|
|||||||
}
|
}
|
||||||
#define A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__MASK 0x00e00000
|
#define A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__MASK 0x00e00000
|
||||||
#define A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__SHIFT 21
|
#define A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__SHIFT 21
|
||||||
static inline uint32_t A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE(enum adreno_rb_blend_opcode val)
|
static inline uint32_t A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE(enum a3xx_rb_blend_opcode val)
|
||||||
{
|
{
|
||||||
return ((val) << A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__SHIFT) & A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__MASK;
|
return ((val) << A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__SHIFT) & A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__MASK;
|
||||||
}
|
}
|
||||||
@@ -986,12 +988,19 @@ static inline uint32_t A3XX_RB_COPY_CONTROL_MSAA_RESOLVE(enum a3xx_msaa_samples
|
|||||||
{
|
{
|
||||||
return ((val) << A3XX_RB_COPY_CONTROL_MSAA_RESOLVE__SHIFT) & A3XX_RB_COPY_CONTROL_MSAA_RESOLVE__MASK;
|
return ((val) << A3XX_RB_COPY_CONTROL_MSAA_RESOLVE__SHIFT) & A3XX_RB_COPY_CONTROL_MSAA_RESOLVE__MASK;
|
||||||
}
|
}
|
||||||
|
#define A3XX_RB_COPY_CONTROL_DEPTHCLEAR 0x00000008
|
||||||
#define A3XX_RB_COPY_CONTROL_MODE__MASK 0x00000070
|
#define A3XX_RB_COPY_CONTROL_MODE__MASK 0x00000070
|
||||||
#define A3XX_RB_COPY_CONTROL_MODE__SHIFT 4
|
#define A3XX_RB_COPY_CONTROL_MODE__SHIFT 4
|
||||||
static inline uint32_t A3XX_RB_COPY_CONTROL_MODE(enum adreno_rb_copy_control_mode val)
|
static inline uint32_t A3XX_RB_COPY_CONTROL_MODE(enum adreno_rb_copy_control_mode val)
|
||||||
{
|
{
|
||||||
return ((val) << A3XX_RB_COPY_CONTROL_MODE__SHIFT) & A3XX_RB_COPY_CONTROL_MODE__MASK;
|
return ((val) << A3XX_RB_COPY_CONTROL_MODE__SHIFT) & A3XX_RB_COPY_CONTROL_MODE__MASK;
|
||||||
}
|
}
|
||||||
|
#define A3XX_RB_COPY_CONTROL_FASTCLEAR__MASK 0x00000f00
|
||||||
|
#define A3XX_RB_COPY_CONTROL_FASTCLEAR__SHIFT 8
|
||||||
|
static inline uint32_t A3XX_RB_COPY_CONTROL_FASTCLEAR(uint32_t val)
|
||||||
|
{
|
||||||
|
return ((val) << A3XX_RB_COPY_CONTROL_FASTCLEAR__SHIFT) & A3XX_RB_COPY_CONTROL_FASTCLEAR__MASK;
|
||||||
|
}
|
||||||
#define A3XX_RB_COPY_CONTROL_GMEM_BASE__MASK 0xffffc000
|
#define A3XX_RB_COPY_CONTROL_GMEM_BASE__MASK 0xffffc000
|
||||||
#define A3XX_RB_COPY_CONTROL_GMEM_BASE__SHIFT 14
|
#define A3XX_RB_COPY_CONTROL_GMEM_BASE__SHIFT 14
|
||||||
static inline uint32_t A3XX_RB_COPY_CONTROL_GMEM_BASE(uint32_t val)
|
static inline uint32_t A3XX_RB_COPY_CONTROL_GMEM_BASE(uint32_t val)
|
||||||
@@ -1034,6 +1043,12 @@ static inline uint32_t A3XX_RB_COPY_DEST_INFO_SWAP(enum a3xx_color_swap val)
|
|||||||
{
|
{
|
||||||
return ((val) << A3XX_RB_COPY_DEST_INFO_SWAP__SHIFT) & A3XX_RB_COPY_DEST_INFO_SWAP__MASK;
|
return ((val) << A3XX_RB_COPY_DEST_INFO_SWAP__SHIFT) & A3XX_RB_COPY_DEST_INFO_SWAP__MASK;
|
||||||
}
|
}
|
||||||
|
#define A3XX_RB_COPY_DEST_INFO_DITHER_MODE__MASK 0x00000c00
|
||||||
|
#define A3XX_RB_COPY_DEST_INFO_DITHER_MODE__SHIFT 10
|
||||||
|
static inline uint32_t A3XX_RB_COPY_DEST_INFO_DITHER_MODE(enum adreno_rb_dither_mode val)
|
||||||
|
{
|
||||||
|
return ((val) << A3XX_RB_COPY_DEST_INFO_DITHER_MODE__SHIFT) & A3XX_RB_COPY_DEST_INFO_DITHER_MODE__MASK;
|
||||||
|
}
|
||||||
#define A3XX_RB_COPY_DEST_INFO_COMPONENT_ENABLE__MASK 0x0003c000
|
#define A3XX_RB_COPY_DEST_INFO_COMPONENT_ENABLE__MASK 0x0003c000
|
||||||
#define A3XX_RB_COPY_DEST_INFO_COMPONENT_ENABLE__SHIFT 14
|
#define A3XX_RB_COPY_DEST_INFO_COMPONENT_ENABLE__SHIFT 14
|
||||||
static inline uint32_t A3XX_RB_COPY_DEST_INFO_COMPONENT_ENABLE(uint32_t val)
|
static inline uint32_t A3XX_RB_COPY_DEST_INFO_COMPONENT_ENABLE(uint32_t val)
|
||||||
@@ -1074,7 +1089,7 @@ static inline uint32_t A3XX_RB_DEPTH_INFO_DEPTH_FORMAT(enum adreno_rb_depth_form
|
|||||||
#define A3XX_RB_DEPTH_INFO_DEPTH_BASE__SHIFT 11
|
#define A3XX_RB_DEPTH_INFO_DEPTH_BASE__SHIFT 11
|
||||||
static inline uint32_t A3XX_RB_DEPTH_INFO_DEPTH_BASE(uint32_t val)
|
static inline uint32_t A3XX_RB_DEPTH_INFO_DEPTH_BASE(uint32_t val)
|
||||||
{
|
{
|
||||||
return ((val >> 10) << A3XX_RB_DEPTH_INFO_DEPTH_BASE__SHIFT) & A3XX_RB_DEPTH_INFO_DEPTH_BASE__MASK;
|
return ((val >> 12) << A3XX_RB_DEPTH_INFO_DEPTH_BASE__SHIFT) & A3XX_RB_DEPTH_INFO_DEPTH_BASE__MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define REG_A3XX_RB_DEPTH_PITCH 0x00002103
|
#define REG_A3XX_RB_DEPTH_PITCH 0x00002103
|
||||||
@@ -1202,6 +1217,8 @@ static inline uint32_t A3XX_RB_WINDOW_OFFSET_Y(uint32_t val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define REG_A3XX_RB_SAMPLE_COUNT_CONTROL 0x00002110
|
#define REG_A3XX_RB_SAMPLE_COUNT_CONTROL 0x00002110
|
||||||
|
#define A3XX_RB_SAMPLE_COUNT_CONTROL_RESET 0x00000001
|
||||||
|
#define A3XX_RB_SAMPLE_COUNT_CONTROL_COPY 0x00000002
|
||||||
|
|
||||||
#define REG_A3XX_RB_SAMPLE_COUNT_ADDR 0x00002111
|
#define REG_A3XX_RB_SAMPLE_COUNT_ADDR 0x00002111
|
||||||
|
|
||||||
@@ -1366,10 +1383,36 @@ static inline uint32_t A3XX_HLSQ_CONST_FSPRESV_RANGE_REG_ENDENTRY(uint32_t val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define REG_A3XX_HLSQ_CL_NDRANGE_0_REG 0x0000220a
|
#define REG_A3XX_HLSQ_CL_NDRANGE_0_REG 0x0000220a
|
||||||
|
#define A3XX_HLSQ_CL_NDRANGE_0_REG_WORKDIM__MASK 0x00000003
|
||||||
|
#define A3XX_HLSQ_CL_NDRANGE_0_REG_WORKDIM__SHIFT 0
|
||||||
|
static inline uint32_t A3XX_HLSQ_CL_NDRANGE_0_REG_WORKDIM(uint32_t val)
|
||||||
|
{
|
||||||
|
return ((val) << A3XX_HLSQ_CL_NDRANGE_0_REG_WORKDIM__SHIFT) & A3XX_HLSQ_CL_NDRANGE_0_REG_WORKDIM__MASK;
|
||||||
|
}
|
||||||
|
#define A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE0__MASK 0x00000ffc
|
||||||
|
#define A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE0__SHIFT 2
|
||||||
|
static inline uint32_t A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE0(uint32_t val)
|
||||||
|
{
|
||||||
|
return ((val) << A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE0__SHIFT) & A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE0__MASK;
|
||||||
|
}
|
||||||
|
#define A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE1__MASK 0x003ff000
|
||||||
|
#define A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE1__SHIFT 12
|
||||||
|
static inline uint32_t A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE1(uint32_t val)
|
||||||
|
{
|
||||||
|
return ((val) << A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE1__SHIFT) & A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE1__MASK;
|
||||||
|
}
|
||||||
|
#define A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE2__MASK 0xffc00000
|
||||||
|
#define A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE2__SHIFT 22
|
||||||
|
static inline uint32_t A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE2(uint32_t val)
|
||||||
|
{
|
||||||
|
return ((val) << A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE2__SHIFT) & A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE2__MASK;
|
||||||
|
}
|
||||||
|
|
||||||
#define REG_A3XX_HLSQ_CL_NDRANGE_1_REG 0x0000220b
|
static inline uint32_t REG_A3XX_HLSQ_CL_GLOBAL_WORK(uint32_t i0) { return 0x0000220b + 0x2*i0; }
|
||||||
|
|
||||||
#define REG_A3XX_HLSQ_CL_NDRANGE_2_REG 0x0000220c
|
static inline uint32_t REG_A3XX_HLSQ_CL_GLOBAL_WORK_SIZE(uint32_t i0) { return 0x0000220b + 0x2*i0; }
|
||||||
|
|
||||||
|
static inline uint32_t REG_A3XX_HLSQ_CL_GLOBAL_WORK_OFFSET(uint32_t i0) { return 0x0000220c + 0x2*i0; }
|
||||||
|
|
||||||
#define REG_A3XX_HLSQ_CL_CONTROL_0_REG 0x00002211
|
#define REG_A3XX_HLSQ_CL_CONTROL_0_REG 0x00002211
|
||||||
|
|
||||||
@@ -1377,7 +1420,9 @@ static inline uint32_t A3XX_HLSQ_CONST_FSPRESV_RANGE_REG_ENDENTRY(uint32_t val)
|
|||||||
|
|
||||||
#define REG_A3XX_HLSQ_CL_KERNEL_CONST_REG 0x00002214
|
#define REG_A3XX_HLSQ_CL_KERNEL_CONST_REG 0x00002214
|
||||||
|
|
||||||
#define REG_A3XX_HLSQ_CL_KERNEL_GROUP_X_REG 0x00002215
|
static inline uint32_t REG_A3XX_HLSQ_CL_KERNEL_GROUP(uint32_t i0) { return 0x00002215 + 0x1*i0; }
|
||||||
|
|
||||||
|
static inline uint32_t REG_A3XX_HLSQ_CL_KERNEL_GROUP_RATIO(uint32_t i0) { return 0x00002215 + 0x1*i0; }
|
||||||
|
|
||||||
#define REG_A3XX_HLSQ_CL_KERNEL_GROUP_Y_REG 0x00002216
|
#define REG_A3XX_HLSQ_CL_KERNEL_GROUP_Y_REG 0x00002216
|
||||||
|
|
||||||
@@ -1492,6 +1537,12 @@ static inline uint32_t A3XX_VFD_DECODE_INSTR_REGID(uint32_t val)
|
|||||||
{
|
{
|
||||||
return ((val) << A3XX_VFD_DECODE_INSTR_REGID__SHIFT) & A3XX_VFD_DECODE_INSTR_REGID__MASK;
|
return ((val) << A3XX_VFD_DECODE_INSTR_REGID__SHIFT) & A3XX_VFD_DECODE_INSTR_REGID__MASK;
|
||||||
}
|
}
|
||||||
|
#define A3XX_VFD_DECODE_INSTR_SWAP__MASK 0x00c00000
|
||||||
|
#define A3XX_VFD_DECODE_INSTR_SWAP__SHIFT 22
|
||||||
|
static inline uint32_t A3XX_VFD_DECODE_INSTR_SWAP(enum a3xx_color_swap val)
|
||||||
|
{
|
||||||
|
return ((val) << A3XX_VFD_DECODE_INSTR_SWAP__SHIFT) & A3XX_VFD_DECODE_INSTR_SWAP__MASK;
|
||||||
|
}
|
||||||
#define A3XX_VFD_DECODE_INSTR_SHIFTCNT__MASK 0x1f000000
|
#define A3XX_VFD_DECODE_INSTR_SHIFTCNT__MASK 0x1f000000
|
||||||
#define A3XX_VFD_DECODE_INSTR_SHIFTCNT__SHIFT 24
|
#define A3XX_VFD_DECODE_INSTR_SHIFTCNT__SHIFT 24
|
||||||
static inline uint32_t A3XX_VFD_DECODE_INSTR_SHIFTCNT(uint32_t val)
|
static inline uint32_t A3XX_VFD_DECODE_INSTR_SHIFTCNT(uint32_t val)
|
||||||
@@ -1624,6 +1675,7 @@ static inline uint32_t A3XX_SP_VS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
|
|||||||
}
|
}
|
||||||
#define A3XX_SP_VS_CTRL_REG0_SUPERTHREADMODE 0x00200000
|
#define A3XX_SP_VS_CTRL_REG0_SUPERTHREADMODE 0x00200000
|
||||||
#define A3XX_SP_VS_CTRL_REG0_PIXLODENABLE 0x00400000
|
#define A3XX_SP_VS_CTRL_REG0_PIXLODENABLE 0x00400000
|
||||||
|
#define A3XX_SP_VS_CTRL_REG0_COMPUTEMODE 0x00800000
|
||||||
#define A3XX_SP_VS_CTRL_REG0_LENGTH__MASK 0xff000000
|
#define A3XX_SP_VS_CTRL_REG0_LENGTH__MASK 0xff000000
|
||||||
#define A3XX_SP_VS_CTRL_REG0_LENGTH__SHIFT 24
|
#define A3XX_SP_VS_CTRL_REG0_LENGTH__SHIFT 24
|
||||||
static inline uint32_t A3XX_SP_VS_CTRL_REG0_LENGTH(uint32_t val)
|
static inline uint32_t A3XX_SP_VS_CTRL_REG0_LENGTH(uint32_t val)
|
||||||
@@ -1797,6 +1849,7 @@ static inline uint32_t A3XX_SP_FS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
|
|||||||
}
|
}
|
||||||
#define A3XX_SP_FS_CTRL_REG0_SUPERTHREADMODE 0x00200000
|
#define A3XX_SP_FS_CTRL_REG0_SUPERTHREADMODE 0x00200000
|
||||||
#define A3XX_SP_FS_CTRL_REG0_PIXLODENABLE 0x00400000
|
#define A3XX_SP_FS_CTRL_REG0_PIXLODENABLE 0x00400000
|
||||||
|
#define A3XX_SP_FS_CTRL_REG0_COMPUTEMODE 0x00800000
|
||||||
#define A3XX_SP_FS_CTRL_REG0_LENGTH__MASK 0xff000000
|
#define A3XX_SP_FS_CTRL_REG0_LENGTH__MASK 0xff000000
|
||||||
#define A3XX_SP_FS_CTRL_REG0_LENGTH__SHIFT 24
|
#define A3XX_SP_FS_CTRL_REG0_LENGTH__SHIFT 24
|
||||||
static inline uint32_t A3XX_SP_FS_CTRL_REG0_LENGTH(uint32_t val)
|
static inline uint32_t A3XX_SP_FS_CTRL_REG0_LENGTH(uint32_t val)
|
||||||
@@ -1976,6 +2029,42 @@ static inline uint32_t A3XX_TPL1_TP_FS_TEX_OFFSET_BASETABLEPTR(uint32_t val)
|
|||||||
|
|
||||||
#define REG_A3XX_VBIF_OUT_AXI_AOOO 0x0000305f
|
#define REG_A3XX_VBIF_OUT_AXI_AOOO 0x0000305f
|
||||||
|
|
||||||
|
#define REG_A3XX_VBIF_PERF_CNT_EN 0x00003070
|
||||||
|
#define A3XX_VBIF_PERF_CNT_EN_CNT0 0x00000001
|
||||||
|
#define A3XX_VBIF_PERF_CNT_EN_CNT1 0x00000002
|
||||||
|
#define A3XX_VBIF_PERF_CNT_EN_PWRCNT0 0x00000004
|
||||||
|
#define A3XX_VBIF_PERF_CNT_EN_PWRCNT1 0x00000008
|
||||||
|
#define A3XX_VBIF_PERF_CNT_EN_PWRCNT2 0x00000010
|
||||||
|
|
||||||
|
#define REG_A3XX_VBIF_PERF_CNT_CLR 0x00003071
|
||||||
|
#define A3XX_VBIF_PERF_CNT_CLR_CNT0 0x00000001
|
||||||
|
#define A3XX_VBIF_PERF_CNT_CLR_CNT1 0x00000002
|
||||||
|
#define A3XX_VBIF_PERF_CNT_CLR_PWRCNT0 0x00000004
|
||||||
|
#define A3XX_VBIF_PERF_CNT_CLR_PWRCNT1 0x00000008
|
||||||
|
#define A3XX_VBIF_PERF_CNT_CLR_PWRCNT2 0x00000010
|
||||||
|
|
||||||
|
#define REG_A3XX_VBIF_PERF_CNT_SEL 0x00003072
|
||||||
|
|
||||||
|
#define REG_A3XX_VBIF_PERF_CNT0_LO 0x00003073
|
||||||
|
|
||||||
|
#define REG_A3XX_VBIF_PERF_CNT0_HI 0x00003074
|
||||||
|
|
||||||
|
#define REG_A3XX_VBIF_PERF_CNT1_LO 0x00003075
|
||||||
|
|
||||||
|
#define REG_A3XX_VBIF_PERF_CNT1_HI 0x00003076
|
||||||
|
|
||||||
|
#define REG_A3XX_VBIF_PERF_PWR_CNT0_LO 0x00003077
|
||||||
|
|
||||||
|
#define REG_A3XX_VBIF_PERF_PWR_CNT0_HI 0x00003078
|
||||||
|
|
||||||
|
#define REG_A3XX_VBIF_PERF_PWR_CNT1_LO 0x00003079
|
||||||
|
|
||||||
|
#define REG_A3XX_VBIF_PERF_PWR_CNT1_HI 0x0000307a
|
||||||
|
|
||||||
|
#define REG_A3XX_VBIF_PERF_PWR_CNT2_LO 0x0000307b
|
||||||
|
|
||||||
|
#define REG_A3XX_VBIF_PERF_PWR_CNT2_HI 0x0000307c
|
||||||
|
|
||||||
#define REG_A3XX_VSC_BIN_SIZE 0x00000c01
|
#define REG_A3XX_VSC_BIN_SIZE 0x00000c01
|
||||||
#define A3XX_VSC_BIN_SIZE_WIDTH__MASK 0x0000001f
|
#define A3XX_VSC_BIN_SIZE_WIDTH__MASK 0x0000001f
|
||||||
#define A3XX_VSC_BIN_SIZE_WIDTH__SHIFT 0
|
#define A3XX_VSC_BIN_SIZE_WIDTH__SHIFT 0
|
||||||
@@ -2249,6 +2338,12 @@ static inline uint32_t A3XX_TEX_SAMP_0_WRAP_R(enum a3xx_tex_clamp val)
|
|||||||
{
|
{
|
||||||
return ((val) << A3XX_TEX_SAMP_0_WRAP_R__SHIFT) & A3XX_TEX_SAMP_0_WRAP_R__MASK;
|
return ((val) << A3XX_TEX_SAMP_0_WRAP_R__SHIFT) & A3XX_TEX_SAMP_0_WRAP_R__MASK;
|
||||||
}
|
}
|
||||||
|
#define A3XX_TEX_SAMP_0_COMPARE_FUNC__MASK 0x00700000
|
||||||
|
#define A3XX_TEX_SAMP_0_COMPARE_FUNC__SHIFT 20
|
||||||
|
static inline uint32_t A3XX_TEX_SAMP_0_COMPARE_FUNC(enum adreno_compare_func val)
|
||||||
|
{
|
||||||
|
return ((val) << A3XX_TEX_SAMP_0_COMPARE_FUNC__SHIFT) & A3XX_TEX_SAMP_0_COMPARE_FUNC__MASK;
|
||||||
|
}
|
||||||
#define A3XX_TEX_SAMP_0_UNNORM_COORDS 0x80000000
|
#define A3XX_TEX_SAMP_0_UNNORM_COORDS 0x80000000
|
||||||
|
|
||||||
#define REG_A3XX_TEX_SAMP_1 0x00000001
|
#define REG_A3XX_TEX_SAMP_1 0x00000001
|
||||||
@@ -2267,6 +2362,7 @@ static inline uint32_t A3XX_TEX_SAMP_1_MIN_LOD(float val)
|
|||||||
|
|
||||||
#define REG_A3XX_TEX_CONST_0 0x00000000
|
#define REG_A3XX_TEX_CONST_0 0x00000000
|
||||||
#define A3XX_TEX_CONST_0_TILED 0x00000001
|
#define A3XX_TEX_CONST_0_TILED 0x00000001
|
||||||
|
#define A3XX_TEX_CONST_0_SRGB 0x00000004
|
||||||
#define A3XX_TEX_CONST_0_SWIZ_X__MASK 0x00000070
|
#define A3XX_TEX_CONST_0_SWIZ_X__MASK 0x00000070
|
||||||
#define A3XX_TEX_CONST_0_SWIZ_X__SHIFT 4
|
#define A3XX_TEX_CONST_0_SWIZ_X__SHIFT 4
|
||||||
static inline uint32_t A3XX_TEX_CONST_0_SWIZ_X(enum a3xx_tex_swiz val)
|
static inline uint32_t A3XX_TEX_CONST_0_SWIZ_X(enum a3xx_tex_swiz val)
|
||||||
@@ -2303,6 +2399,7 @@ static inline uint32_t A3XX_TEX_CONST_0_FMT(enum a3xx_tex_fmt val)
|
|||||||
{
|
{
|
||||||
return ((val) << A3XX_TEX_CONST_0_FMT__SHIFT) & A3XX_TEX_CONST_0_FMT__MASK;
|
return ((val) << A3XX_TEX_CONST_0_FMT__SHIFT) & A3XX_TEX_CONST_0_FMT__MASK;
|
||||||
}
|
}
|
||||||
|
#define A3XX_TEX_CONST_0_NOCONVERT 0x20000000
|
||||||
#define A3XX_TEX_CONST_0_TYPE__MASK 0xc0000000
|
#define A3XX_TEX_CONST_0_TYPE__MASK 0xc0000000
|
||||||
#define A3XX_TEX_CONST_0_TYPE__SHIFT 30
|
#define A3XX_TEX_CONST_0_TYPE__SHIFT 30
|
||||||
static inline uint32_t A3XX_TEX_CONST_0_TYPE(enum a3xx_tex_type val)
|
static inline uint32_t A3XX_TEX_CONST_0_TYPE(enum a3xx_tex_type val)
|
||||||
|
@@ -34,6 +34,27 @@
|
|||||||
#include "fd3_context.h"
|
#include "fd3_context.h"
|
||||||
#include "fd3_util.h"
|
#include "fd3_util.h"
|
||||||
|
|
||||||
|
|
||||||
|
static enum a3xx_rb_blend_opcode
|
||||||
|
blend_func(unsigned func)
|
||||||
|
{
|
||||||
|
switch (func) {
|
||||||
|
case PIPE_BLEND_ADD:
|
||||||
|
return BLEND_DST_PLUS_SRC;
|
||||||
|
case PIPE_BLEND_MIN:
|
||||||
|
return BLEND_MIN_DST_SRC;
|
||||||
|
case PIPE_BLEND_MAX:
|
||||||
|
return BLEND_MAX_DST_SRC;
|
||||||
|
case PIPE_BLEND_SUBTRACT:
|
||||||
|
return BLEND_SRC_MINUS_DST;
|
||||||
|
case PIPE_BLEND_REVERSE_SUBTRACT:
|
||||||
|
return BLEND_DST_MINUS_SRC;
|
||||||
|
default:
|
||||||
|
DBG("invalid blend func: %x", func);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
fd3_blend_state_create(struct pipe_context *pctx,
|
fd3_blend_state_create(struct pipe_context *pctx,
|
||||||
const struct pipe_blend_state *cso)
|
const struct pipe_blend_state *cso)
|
||||||
@@ -80,10 +101,10 @@ fd3_blend_state_create(struct pipe_context *pctx,
|
|||||||
|
|
||||||
so->rb_mrt[i].blend_control =
|
so->rb_mrt[i].blend_control =
|
||||||
A3XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR(fd_blend_factor(rt->rgb_src_factor)) |
|
A3XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR(fd_blend_factor(rt->rgb_src_factor)) |
|
||||||
A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE(fd_blend_func(rt->rgb_func)) |
|
A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE(blend_func(rt->rgb_func)) |
|
||||||
A3XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR(fd_blend_factor(rt->rgb_dst_factor)) |
|
A3XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR(fd_blend_factor(rt->rgb_dst_factor)) |
|
||||||
A3XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR(fd_blend_factor(rt->alpha_src_factor)) |
|
A3XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR(fd_blend_factor(rt->alpha_src_factor)) |
|
||||||
A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE(fd_blend_func(rt->alpha_func)) |
|
A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE(blend_func(rt->alpha_func)) |
|
||||||
A3XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR(fd_blend_factor(rt->alpha_dst_factor)) |
|
A3XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR(fd_blend_factor(rt->alpha_dst_factor)) |
|
||||||
A3XX_RB_MRT_BLEND_CONTROL_CLAMP_ENABLE;
|
A3XX_RB_MRT_BLEND_CONTROL_CLAMP_ENABLE;
|
||||||
|
|
||||||
|
@@ -1074,77 +1074,154 @@ trans_arl(const struct instr_translater *t,
|
|||||||
add_src_reg(ctx, instr, tmp_src, chan)->flags |= IR3_REG_HALF;
|
add_src_reg(ctx, instr, tmp_src, chan)->flags |= IR3_REG_HALF;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* texture fetch/sample instructions: */
|
/*
|
||||||
static void
|
* texture fetch/sample instructions:
|
||||||
trans_samp(const struct instr_translater *t,
|
*/
|
||||||
struct fd3_compile_context *ctx,
|
|
||||||
|
struct tex_info {
|
||||||
|
int8_t order[4];
|
||||||
|
unsigned src_wrmask, flags;
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct tex_info *
|
||||||
|
get_tex_info(struct fd3_compile_context *ctx,
|
||||||
struct tgsi_full_instruction *inst)
|
struct tgsi_full_instruction *inst)
|
||||||
{
|
{
|
||||||
struct ir3_instruction *instr;
|
static const struct tex_info tex1d = {
|
||||||
struct tgsi_src_register *coord = &inst->Src[0].Register;
|
.order = { 0, -1, -1, -1 }, /* coord.x */
|
||||||
struct tgsi_src_register *samp = &inst->Src[1].Register;
|
.src_wrmask = TGSI_WRITEMASK_XY,
|
||||||
unsigned tex = inst->Texture.Texture;
|
.flags = 0,
|
||||||
int8_t *order;
|
};
|
||||||
unsigned i, flags = 0, src_wrmask;
|
static const struct tex_info tex1ds = {
|
||||||
bool needs_mov = false;
|
.order = { 0, -1, 2, -1 }, /* coord.xz */
|
||||||
|
.src_wrmask = TGSI_WRITEMASK_XYZ,
|
||||||
|
.flags = IR3_INSTR_S,
|
||||||
|
};
|
||||||
|
static const struct tex_info tex2d = {
|
||||||
|
.order = { 0, 1, -1, -1 }, /* coord.xy */
|
||||||
|
.src_wrmask = TGSI_WRITEMASK_XY,
|
||||||
|
.flags = 0,
|
||||||
|
};
|
||||||
|
static const struct tex_info tex2ds = {
|
||||||
|
.order = { 0, 1, 2, -1 }, /* coord.xyz */
|
||||||
|
.src_wrmask = TGSI_WRITEMASK_XYZ,
|
||||||
|
.flags = IR3_INSTR_S,
|
||||||
|
};
|
||||||
|
static const struct tex_info tex3d = {
|
||||||
|
.order = { 0, 1, 2, -1 }, /* coord.xyz */
|
||||||
|
.src_wrmask = TGSI_WRITEMASK_XYZ,
|
||||||
|
.flags = IR3_INSTR_3D,
|
||||||
|
};
|
||||||
|
static const struct tex_info tex3ds = {
|
||||||
|
.order = { 0, 1, 2, 3 }, /* coord.xyzw */
|
||||||
|
.src_wrmask = TGSI_WRITEMASK_XYZW,
|
||||||
|
.flags = IR3_INSTR_S | IR3_INSTR_3D,
|
||||||
|
};
|
||||||
|
static const struct tex_info txp1d = {
|
||||||
|
.order = { 0, -1, 3, -1 }, /* coord.xw */
|
||||||
|
.src_wrmask = TGSI_WRITEMASK_XYZ,
|
||||||
|
.flags = IR3_INSTR_P,
|
||||||
|
};
|
||||||
|
static const struct tex_info txp1ds = {
|
||||||
|
.order = { 0, -1, 2, 3 }, /* coord.xzw */
|
||||||
|
.src_wrmask = TGSI_WRITEMASK_XYZW,
|
||||||
|
.flags = IR3_INSTR_P | IR3_INSTR_S,
|
||||||
|
};
|
||||||
|
static const struct tex_info txp2d = {
|
||||||
|
.order = { 0, 1, 3, -1 }, /* coord.xyw */
|
||||||
|
.src_wrmask = TGSI_WRITEMASK_XYZ,
|
||||||
|
.flags = IR3_INSTR_P,
|
||||||
|
};
|
||||||
|
static const struct tex_info txp2ds = {
|
||||||
|
.order = { 0, 1, 2, 3 }, /* coord.xyzw */
|
||||||
|
.src_wrmask = TGSI_WRITEMASK_XYZW,
|
||||||
|
.flags = IR3_INSTR_P | IR3_INSTR_S,
|
||||||
|
};
|
||||||
|
static const struct tex_info txp3d = {
|
||||||
|
.order = { 0, 1, 2, 3 }, /* coord.xyzw */
|
||||||
|
.src_wrmask = TGSI_WRITEMASK_XYZW,
|
||||||
|
.flags = IR3_INSTR_P | IR3_INSTR_3D,
|
||||||
|
};
|
||||||
|
|
||||||
switch (t->arg) {
|
unsigned tex = inst->Texture.Texture;
|
||||||
|
|
||||||
|
switch (inst->Instruction.Opcode) {
|
||||||
case TGSI_OPCODE_TEX:
|
case TGSI_OPCODE_TEX:
|
||||||
switch (tex) {
|
switch (tex) {
|
||||||
|
case TGSI_TEXTURE_1D:
|
||||||
|
return &tex1d;
|
||||||
|
case TGSI_TEXTURE_SHADOW1D:
|
||||||
|
return &tex1ds;
|
||||||
case TGSI_TEXTURE_2D:
|
case TGSI_TEXTURE_2D:
|
||||||
case TGSI_TEXTURE_RECT:
|
case TGSI_TEXTURE_RECT:
|
||||||
order = (int8_t[4]){ 0, 1, -1, -1 };
|
return &tex2d;
|
||||||
src_wrmask = TGSI_WRITEMASK_XY;
|
case TGSI_TEXTURE_SHADOW2D:
|
||||||
break;
|
case TGSI_TEXTURE_SHADOWRECT:
|
||||||
|
return &tex2ds;
|
||||||
case TGSI_TEXTURE_3D:
|
case TGSI_TEXTURE_3D:
|
||||||
case TGSI_TEXTURE_CUBE:
|
case TGSI_TEXTURE_CUBE:
|
||||||
order = (int8_t[4]){ 0, 1, 2, -1 };
|
return &tex3d;
|
||||||
src_wrmask = TGSI_WRITEMASK_XYZ;
|
case TGSI_TEXTURE_SHADOWCUBE:
|
||||||
flags |= IR3_INSTR_3D;
|
return &tex3ds;
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
compile_error(ctx, "unknown texture type: %s\n",
|
compile_error(ctx, "unknown texture type: %s\n",
|
||||||
tgsi_texture_names[tex]);
|
tgsi_texture_names[tex]);
|
||||||
break;
|
return NULL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TGSI_OPCODE_TXP:
|
case TGSI_OPCODE_TXP:
|
||||||
switch (tex) {
|
switch (tex) {
|
||||||
|
case TGSI_TEXTURE_1D:
|
||||||
|
return &txp1d;
|
||||||
|
case TGSI_TEXTURE_SHADOW1D:
|
||||||
|
return &txp1ds;
|
||||||
case TGSI_TEXTURE_2D:
|
case TGSI_TEXTURE_2D:
|
||||||
case TGSI_TEXTURE_RECT:
|
case TGSI_TEXTURE_RECT:
|
||||||
order = (int8_t[4]){ 0, 1, 3, -1 };
|
return &txp2d;
|
||||||
src_wrmask = TGSI_WRITEMASK_XYZ;
|
case TGSI_TEXTURE_SHADOW2D:
|
||||||
break;
|
case TGSI_TEXTURE_SHADOWRECT:
|
||||||
|
return &txp2ds;
|
||||||
case TGSI_TEXTURE_3D:
|
case TGSI_TEXTURE_3D:
|
||||||
case TGSI_TEXTURE_CUBE:
|
case TGSI_TEXTURE_CUBE:
|
||||||
order = (int8_t[4]){ 0, 1, 2, 3 };
|
return &txp3d;
|
||||||
src_wrmask = TGSI_WRITEMASK_XYZW;
|
|
||||||
flags |= IR3_INSTR_3D;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
compile_error(ctx, "unknown texture type: %s\n",
|
compile_error(ctx, "unknown texture type: %s\n",
|
||||||
tgsi_texture_names[tex]);
|
tgsi_texture_names[tex]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
flags |= IR3_INSTR_P;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
compile_assert(ctx, 0);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
compile_assert(ctx, 0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct tgsi_src_register *
|
||||||
|
get_tex_coord(struct fd3_compile_context *ctx,
|
||||||
|
struct tgsi_full_instruction *inst,
|
||||||
|
const struct tex_info *tinf)
|
||||||
|
{
|
||||||
|
struct tgsi_src_register *coord = &inst->Src[0].Register;
|
||||||
|
struct ir3_instruction *instr;
|
||||||
|
unsigned tex = inst->Texture.Texture;
|
||||||
|
bool needs_mov = false;
|
||||||
|
unsigned i;
|
||||||
|
|
||||||
/* cat5 instruction cannot seem to handle const or relative: */
|
/* cat5 instruction cannot seem to handle const or relative: */
|
||||||
if (is_rel_or_const(coord))
|
if (is_rel_or_const(coord))
|
||||||
needs_mov = true;
|
needs_mov = true;
|
||||||
|
|
||||||
|
/* 1D textures we fix up w/ 0.0 as 2nd coord: */
|
||||||
|
if ((tex == TGSI_TEXTURE_1D) || (tex == TGSI_TEXTURE_SHADOW1D))
|
||||||
|
needs_mov = true;
|
||||||
|
|
||||||
/* The texture sample instructions need to coord in successive
|
/* The texture sample instructions need to coord in successive
|
||||||
* registers/components (ie. src.xy but not src.yx). And TXP
|
* registers/components (ie. src.xy but not src.yx). And TXP
|
||||||
* needs the .w component in .z for 2D.. so in some cases we
|
* needs the .w component in .z for 2D.. so in some cases we
|
||||||
* might need to emit some mov instructions to shuffle things
|
* might need to emit some mov instructions to shuffle things
|
||||||
* around:
|
* around:
|
||||||
*/
|
*/
|
||||||
for (i = 1; (i < 4) && (order[i] >= 0) && !needs_mov; i++)
|
for (i = 1; (i < 4) && (tinf->order[i] >= 0) && !needs_mov; i++)
|
||||||
if (src_swiz(coord, i) != (src_swiz(coord, 0) + order[i]))
|
if (src_swiz(coord, i) != (src_swiz(coord, 0) + tinf->order[i]))
|
||||||
needs_mov = true;
|
needs_mov = true;
|
||||||
|
|
||||||
if (needs_mov) {
|
if (needs_mov) {
|
||||||
@@ -1157,28 +1234,55 @@ trans_samp(const struct instr_translater *t,
|
|||||||
/* need to move things around: */
|
/* need to move things around: */
|
||||||
tmp_src = get_internal_temp(ctx, &tmp_dst);
|
tmp_src = get_internal_temp(ctx, &tmp_dst);
|
||||||
|
|
||||||
for (j = 0; (j < 4) && (order[j] >= 0); j++) {
|
for (j = 0; j < 4; j++) {
|
||||||
instr = instr_create(ctx, 1, 0);
|
if (tinf->order[j] < 0)
|
||||||
|
continue;
|
||||||
|
instr = instr_create(ctx, 1, 0); /* mov */
|
||||||
instr->cat1.src_type = type_mov;
|
instr->cat1.src_type = type_mov;
|
||||||
instr->cat1.dst_type = type_mov;
|
instr->cat1.dst_type = type_mov;
|
||||||
add_dst_reg(ctx, instr, &tmp_dst, j);
|
add_dst_reg(ctx, instr, &tmp_dst, j);
|
||||||
add_src_reg(ctx, instr, coord,
|
add_src_reg(ctx, instr, coord,
|
||||||
src_swiz(coord, order[j]));
|
src_swiz(coord, tinf->order[j]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* fix up .y coord: */
|
||||||
|
if ((tex == TGSI_TEXTURE_1D) ||
|
||||||
|
(tex == TGSI_TEXTURE_SHADOW1D)) {
|
||||||
|
instr = instr_create(ctx, 1, 0); /* mov */
|
||||||
|
instr->cat1.src_type = type_mov;
|
||||||
|
instr->cat1.dst_type = type_mov;
|
||||||
|
add_dst_reg(ctx, instr, &tmp_dst, 1); /* .y */
|
||||||
|
ir3_reg_create(instr, 0, IR3_REG_IMMED)->fim_val = 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
coord = tmp_src;
|
coord = tmp_src;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return coord;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
trans_samp(const struct instr_translater *t,
|
||||||
|
struct fd3_compile_context *ctx,
|
||||||
|
struct tgsi_full_instruction *inst)
|
||||||
|
{
|
||||||
|
struct ir3_instruction *instr;
|
||||||
|
struct tgsi_dst_register *dst = &inst->Dst[0].Register;
|
||||||
|
struct tgsi_src_register *coord;
|
||||||
|
struct tgsi_src_register *samp = &inst->Src[1].Register;
|
||||||
|
const struct tex_info *tinf;
|
||||||
|
|
||||||
|
tinf = get_tex_info(ctx, inst);
|
||||||
|
coord = get_tex_coord(ctx, inst, tinf);
|
||||||
|
|
||||||
instr = instr_create(ctx, 5, t->opc);
|
instr = instr_create(ctx, 5, t->opc);
|
||||||
instr->cat5.type = get_ftype(ctx);
|
instr->cat5.type = get_ftype(ctx);
|
||||||
instr->cat5.samp = samp->Index;
|
instr->cat5.samp = samp->Index;
|
||||||
instr->cat5.tex = samp->Index;
|
instr->cat5.tex = samp->Index;
|
||||||
instr->flags |= flags;
|
instr->flags |= tinf->flags;
|
||||||
|
|
||||||
add_dst_reg_wrmask(ctx, instr, &inst->Dst[0].Register, 0,
|
add_dst_reg_wrmask(ctx, instr, dst, 0, dst->WriteMask);
|
||||||
inst->Dst[0].Register.WriteMask);
|
add_src_reg_wrmask(ctx, instr, coord, coord->SwizzleX, tinf->src_wrmask);
|
||||||
|
|
||||||
add_src_reg_wrmask(ctx, instr, coord, coord->SwizzleX, src_wrmask);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1231,15 +1335,19 @@ trans_cmp(const struct instr_translater *t,
|
|||||||
|
|
||||||
switch (t->tgsi_opc) {
|
switch (t->tgsi_opc) {
|
||||||
case TGSI_OPCODE_SEQ:
|
case TGSI_OPCODE_SEQ:
|
||||||
|
case TGSI_OPCODE_FSEQ:
|
||||||
condition = IR3_COND_EQ;
|
condition = IR3_COND_EQ;
|
||||||
break;
|
break;
|
||||||
case TGSI_OPCODE_SNE:
|
case TGSI_OPCODE_SNE:
|
||||||
|
case TGSI_OPCODE_FSNE:
|
||||||
condition = IR3_COND_NE;
|
condition = IR3_COND_NE;
|
||||||
break;
|
break;
|
||||||
case TGSI_OPCODE_SGE:
|
case TGSI_OPCODE_SGE:
|
||||||
|
case TGSI_OPCODE_FSGE:
|
||||||
condition = IR3_COND_GE;
|
condition = IR3_COND_GE;
|
||||||
break;
|
break;
|
||||||
case TGSI_OPCODE_SLT:
|
case TGSI_OPCODE_SLT:
|
||||||
|
case TGSI_OPCODE_FSLT:
|
||||||
condition = IR3_COND_LT;
|
condition = IR3_COND_LT;
|
||||||
break;
|
break;
|
||||||
case TGSI_OPCODE_SLE:
|
case TGSI_OPCODE_SLE:
|
||||||
@@ -1269,11 +1377,15 @@ trans_cmp(const struct instr_translater *t,
|
|||||||
|
|
||||||
switch (t->tgsi_opc) {
|
switch (t->tgsi_opc) {
|
||||||
case TGSI_OPCODE_SEQ:
|
case TGSI_OPCODE_SEQ:
|
||||||
|
case TGSI_OPCODE_FSEQ:
|
||||||
case TGSI_OPCODE_SGE:
|
case TGSI_OPCODE_SGE:
|
||||||
|
case TGSI_OPCODE_FSGE:
|
||||||
case TGSI_OPCODE_SLE:
|
case TGSI_OPCODE_SLE:
|
||||||
case TGSI_OPCODE_SNE:
|
case TGSI_OPCODE_SNE:
|
||||||
|
case TGSI_OPCODE_FSNE:
|
||||||
case TGSI_OPCODE_SGT:
|
case TGSI_OPCODE_SGT:
|
||||||
case TGSI_OPCODE_SLT:
|
case TGSI_OPCODE_SLT:
|
||||||
|
case TGSI_OPCODE_FSLT:
|
||||||
/* cov.u16f16 dst, tmp0 */
|
/* cov.u16f16 dst, tmp0 */
|
||||||
instr = instr_create(ctx, 1, 0);
|
instr = instr_create(ctx, 1, 0);
|
||||||
instr->cat1.src_type = get_utype(ctx);
|
instr->cat1.src_type = get_utype(ctx);
|
||||||
@@ -1293,6 +1405,96 @@ trans_cmp(const struct instr_translater *t,
|
|||||||
put_dst(ctx, inst, dst);
|
put_dst(ctx, inst, dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* USNE(a,b) = (a != b) ? 1 : 0
|
||||||
|
* cmps.u32.ne dst, a, b
|
||||||
|
*
|
||||||
|
* USEQ(a,b) = (a == b) ? 1 : 0
|
||||||
|
* cmps.u32.eq dst, a, b
|
||||||
|
*
|
||||||
|
* ISGE(a,b) = (a > b) ? 1 : 0
|
||||||
|
* cmps.s32.ge dst, a, b
|
||||||
|
*
|
||||||
|
* USGE(a,b) = (a > b) ? 1 : 0
|
||||||
|
* cmps.u32.ge dst, a, b
|
||||||
|
*
|
||||||
|
* ISLT(a,b) = (a < b) ? 1 : 0
|
||||||
|
* cmps.s32.lt dst, a, b
|
||||||
|
*
|
||||||
|
* USLT(a,b) = (a < b) ? 1 : 0
|
||||||
|
* cmps.u32.lt dst, a, b
|
||||||
|
*
|
||||||
|
* UCMP(a,b,c) = (a < 0) ? b : c
|
||||||
|
* cmps.u32.lt tmp0, a, {0}
|
||||||
|
* sel.b16 dst, b, tmp0, c
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
trans_icmp(const struct instr_translater *t,
|
||||||
|
struct fd3_compile_context *ctx,
|
||||||
|
struct tgsi_full_instruction *inst)
|
||||||
|
{
|
||||||
|
struct ir3_instruction *instr;
|
||||||
|
struct tgsi_dst_register *dst = get_dst(ctx, inst);
|
||||||
|
struct tgsi_src_register constval0;
|
||||||
|
struct tgsi_src_register *a0, *a1, *a2;
|
||||||
|
unsigned condition;
|
||||||
|
|
||||||
|
a0 = &inst->Src[0].Register; /* a */
|
||||||
|
a1 = &inst->Src[1].Register; /* b */
|
||||||
|
|
||||||
|
switch (t->tgsi_opc) {
|
||||||
|
case TGSI_OPCODE_USNE:
|
||||||
|
condition = IR3_COND_NE;
|
||||||
|
break;
|
||||||
|
case TGSI_OPCODE_USEQ:
|
||||||
|
condition = IR3_COND_EQ;
|
||||||
|
break;
|
||||||
|
case TGSI_OPCODE_ISGE:
|
||||||
|
case TGSI_OPCODE_USGE:
|
||||||
|
condition = IR3_COND_GE;
|
||||||
|
break;
|
||||||
|
case TGSI_OPCODE_ISLT:
|
||||||
|
case TGSI_OPCODE_USLT:
|
||||||
|
condition = IR3_COND_LT;
|
||||||
|
break;
|
||||||
|
case TGSI_OPCODE_UCMP:
|
||||||
|
get_immediate(ctx, &constval0, 0);
|
||||||
|
a0 = &inst->Src[0].Register; /* a */
|
||||||
|
a1 = &constval0; /* {0} */
|
||||||
|
condition = IR3_COND_LT;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
compile_assert(ctx, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_const(a0) && is_const(a1))
|
||||||
|
a0 = get_unconst(ctx, a0);
|
||||||
|
|
||||||
|
if (t->tgsi_opc == TGSI_OPCODE_UCMP) {
|
||||||
|
struct tgsi_dst_register tmp_dst;
|
||||||
|
struct tgsi_src_register *tmp_src;
|
||||||
|
tmp_src = get_internal_temp(ctx, &tmp_dst);
|
||||||
|
/* cmps.u32.lt tmp, a0, a1 */
|
||||||
|
instr = instr_create(ctx, 2, t->opc);
|
||||||
|
instr->cat2.condition = condition;
|
||||||
|
vectorize(ctx, instr, &tmp_dst, 2, a0, 0, a1, 0);
|
||||||
|
|
||||||
|
a1 = &inst->Src[1].Register;
|
||||||
|
a2 = &inst->Src[2].Register;
|
||||||
|
/* sel.{b32,b16} dst, src2, tmp, src1 */
|
||||||
|
instr = instr_create(ctx, 3, OPC_SEL_B32);
|
||||||
|
vectorize(ctx, instr, dst, 3, a1, 0, tmp_src, 0, a2, 0);
|
||||||
|
} else {
|
||||||
|
/* cmps.{u32,s32}.<cond> dst, a0, a1 */
|
||||||
|
instr = instr_create(ctx, 2, t->opc);
|
||||||
|
instr->cat2.condition = condition;
|
||||||
|
vectorize(ctx, instr, dst, 2, a0, 0, a1, 0);
|
||||||
|
}
|
||||||
|
put_dst(ctx, inst, dst);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Conditional / Flow control
|
* Conditional / Flow control
|
||||||
*/
|
*/
|
||||||
@@ -1533,7 +1735,7 @@ trans_endif(const struct instr_translater *t,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Kill / Kill-if
|
* Kill
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -1579,6 +1781,76 @@ trans_kill(const struct instr_translater *t,
|
|||||||
ctx->kill[ctx->kill_count++] = instr;
|
ctx->kill[ctx->kill_count++] = instr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Kill-If
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void
|
||||||
|
trans_killif(const struct instr_translater *t,
|
||||||
|
struct fd3_compile_context *ctx,
|
||||||
|
struct tgsi_full_instruction *inst)
|
||||||
|
{
|
||||||
|
struct tgsi_src_register *src = &inst->Src[0].Register;
|
||||||
|
struct ir3_instruction *instr, *immed, *cond = NULL;
|
||||||
|
bool inv = false;
|
||||||
|
|
||||||
|
immed = create_immed(ctx, 0.0);
|
||||||
|
|
||||||
|
/* cmps.f.ne p0.x, cond, {0.0} */
|
||||||
|
instr = instr_create(ctx, 2, OPC_CMPS_F);
|
||||||
|
instr->cat2.condition = IR3_COND_NE;
|
||||||
|
ir3_reg_create(instr, regid(REG_P0, 0), 0);
|
||||||
|
ir3_reg_create(instr, 0, IR3_REG_SSA)->instr = immed;
|
||||||
|
add_src_reg(ctx, instr, src, src->SwizzleX);
|
||||||
|
|
||||||
|
cond = instr;
|
||||||
|
|
||||||
|
/* kill p0.x */
|
||||||
|
instr = instr_create(ctx, 0, OPC_KILL);
|
||||||
|
instr->cat0.inv = inv;
|
||||||
|
ir3_reg_create(instr, 0, 0); /* dummy dst */
|
||||||
|
ir3_reg_create(instr, 0, IR3_REG_SSA)->instr = cond;
|
||||||
|
|
||||||
|
ctx->kill[ctx->kill_count++] = instr;
|
||||||
|
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* I2F / U2F / F2I / F2U
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void
|
||||||
|
trans_cov(const struct instr_translater *t,
|
||||||
|
struct fd3_compile_context *ctx,
|
||||||
|
struct tgsi_full_instruction *inst)
|
||||||
|
{
|
||||||
|
struct ir3_instruction *instr;
|
||||||
|
struct tgsi_dst_register *dst = get_dst(ctx, inst);
|
||||||
|
struct tgsi_src_register *src = &inst->Src[0].Register;
|
||||||
|
|
||||||
|
// cov.f32s32 dst, tmp0 /
|
||||||
|
instr = instr_create(ctx, 1, 0);
|
||||||
|
switch (t->tgsi_opc) {
|
||||||
|
case TGSI_OPCODE_U2F:
|
||||||
|
instr->cat1.src_type = TYPE_U32;
|
||||||
|
instr->cat1.dst_type = TYPE_F32;
|
||||||
|
break;
|
||||||
|
case TGSI_OPCODE_I2F:
|
||||||
|
instr->cat1.src_type = TYPE_S32;
|
||||||
|
instr->cat1.dst_type = TYPE_F32;
|
||||||
|
break;
|
||||||
|
case TGSI_OPCODE_F2U:
|
||||||
|
instr->cat1.src_type = TYPE_F32;
|
||||||
|
instr->cat1.dst_type = TYPE_U32;
|
||||||
|
break;
|
||||||
|
case TGSI_OPCODE_F2I:
|
||||||
|
instr->cat1.src_type = TYPE_F32;
|
||||||
|
instr->cat1.dst_type = TYPE_S32;
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
vectorize(ctx, instr, dst, 1, src, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Handlers for TGSI instructions which do have 1:1 mapping to native
|
* Handlers for TGSI instructions which do have 1:1 mapping to native
|
||||||
* instructions:
|
* instructions:
|
||||||
@@ -1616,9 +1888,11 @@ instr_cat2(const struct instr_translater *t,
|
|||||||
|
|
||||||
switch (t->tgsi_opc) {
|
switch (t->tgsi_opc) {
|
||||||
case TGSI_OPCODE_ABS:
|
case TGSI_OPCODE_ABS:
|
||||||
|
case TGSI_OPCODE_IABS:
|
||||||
src0_flags = IR3_REG_ABS;
|
src0_flags = IR3_REG_ABS;
|
||||||
break;
|
break;
|
||||||
case TGSI_OPCODE_SUB:
|
case TGSI_OPCODE_SUB:
|
||||||
|
case TGSI_OPCODE_INEG:
|
||||||
src1_flags = IR3_REG_NEGATE;
|
src1_flags = IR3_REG_NEGATE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1724,6 +1998,22 @@ static const struct instr_translater translaters[TGSI_OPCODE_LAST] = {
|
|||||||
INSTR(SUB, instr_cat2, .opc = OPC_ADD_F),
|
INSTR(SUB, instr_cat2, .opc = OPC_ADD_F),
|
||||||
INSTR(MIN, instr_cat2, .opc = OPC_MIN_F),
|
INSTR(MIN, instr_cat2, .opc = OPC_MIN_F),
|
||||||
INSTR(MAX, instr_cat2, .opc = OPC_MAX_F),
|
INSTR(MAX, instr_cat2, .opc = OPC_MAX_F),
|
||||||
|
INSTR(UADD, instr_cat2, .opc = OPC_ADD_U),
|
||||||
|
INSTR(IMIN, instr_cat2, .opc = OPC_MIN_S),
|
||||||
|
INSTR(UMIN, instr_cat2, .opc = OPC_MIN_U),
|
||||||
|
INSTR(IMAX, instr_cat2, .opc = OPC_MAX_S),
|
||||||
|
INSTR(UMAX, instr_cat2, .opc = OPC_MAX_U),
|
||||||
|
INSTR(AND, instr_cat2, .opc = OPC_AND_B),
|
||||||
|
INSTR(OR, instr_cat2, .opc = OPC_OR_B),
|
||||||
|
INSTR(NOT, instr_cat2, .opc = OPC_NOT_B),
|
||||||
|
INSTR(XOR, instr_cat2, .opc = OPC_XOR_B),
|
||||||
|
INSTR(UMUL, instr_cat2, .opc = OPC_MUL_U),
|
||||||
|
INSTR(SHL, instr_cat2, .opc = OPC_SHL_B),
|
||||||
|
INSTR(USHR, instr_cat2, .opc = OPC_SHR_B),
|
||||||
|
INSTR(ISHR, instr_cat2, .opc = OPC_ASHR_B),
|
||||||
|
INSTR(IABS, instr_cat2, .opc = OPC_ABSNEG_S),
|
||||||
|
INSTR(INEG, instr_cat2, .opc = OPC_ABSNEG_S),
|
||||||
|
INSTR(AND, instr_cat2, .opc = OPC_AND_B),
|
||||||
INSTR(MAD, instr_cat3, .opc = OPC_MAD_F32, .hopc = OPC_MAD_F16),
|
INSTR(MAD, instr_cat3, .opc = OPC_MAD_F32, .hopc = OPC_MAD_F16),
|
||||||
INSTR(TRUNC, instr_cat2, .opc = OPC_TRUNC_F),
|
INSTR(TRUNC, instr_cat2, .opc = OPC_TRUNC_F),
|
||||||
INSTR(CLAMP, trans_clamp),
|
INSTR(CLAMP, trans_clamp),
|
||||||
@@ -1741,16 +2031,33 @@ static const struct instr_translater translaters[TGSI_OPCODE_LAST] = {
|
|||||||
INSTR(TXP, trans_samp, .opc = OPC_SAM, .arg = TGSI_OPCODE_TXP),
|
INSTR(TXP, trans_samp, .opc = OPC_SAM, .arg = TGSI_OPCODE_TXP),
|
||||||
INSTR(SGT, trans_cmp),
|
INSTR(SGT, trans_cmp),
|
||||||
INSTR(SLT, trans_cmp),
|
INSTR(SLT, trans_cmp),
|
||||||
|
INSTR(FSLT, trans_cmp),
|
||||||
INSTR(SGE, trans_cmp),
|
INSTR(SGE, trans_cmp),
|
||||||
|
INSTR(FSGE, trans_cmp),
|
||||||
INSTR(SLE, trans_cmp),
|
INSTR(SLE, trans_cmp),
|
||||||
INSTR(SNE, trans_cmp),
|
INSTR(SNE, trans_cmp),
|
||||||
|
INSTR(FSNE, trans_cmp),
|
||||||
INSTR(SEQ, trans_cmp),
|
INSTR(SEQ, trans_cmp),
|
||||||
|
INSTR(FSEQ, trans_cmp),
|
||||||
INSTR(CMP, trans_cmp),
|
INSTR(CMP, trans_cmp),
|
||||||
|
INSTR(USNE, trans_icmp, .opc = OPC_CMPS_U),
|
||||||
|
INSTR(USEQ, trans_icmp, .opc = OPC_CMPS_U),
|
||||||
|
INSTR(ISGE, trans_icmp, .opc = OPC_CMPS_S),
|
||||||
|
INSTR(USGE, trans_icmp, .opc = OPC_CMPS_U),
|
||||||
|
INSTR(ISLT, trans_icmp, .opc = OPC_CMPS_S),
|
||||||
|
INSTR(USLT, trans_icmp, .opc = OPC_CMPS_U),
|
||||||
|
INSTR(UCMP, trans_icmp, .opc = OPC_CMPS_U),
|
||||||
INSTR(IF, trans_if),
|
INSTR(IF, trans_if),
|
||||||
|
INSTR(UIF, trans_if),
|
||||||
INSTR(ELSE, trans_else),
|
INSTR(ELSE, trans_else),
|
||||||
INSTR(ENDIF, trans_endif),
|
INSTR(ENDIF, trans_endif),
|
||||||
INSTR(END, instr_cat0, .opc = OPC_END),
|
INSTR(END, instr_cat0, .opc = OPC_END),
|
||||||
INSTR(KILL, trans_kill, .opc = OPC_KILL),
|
INSTR(KILL, trans_kill, .opc = OPC_KILL),
|
||||||
|
INSTR(KILL_IF, trans_killif, .opc = OPC_KILL),
|
||||||
|
INSTR(I2F, trans_cov),
|
||||||
|
INSTR(U2F, trans_cov),
|
||||||
|
INSTR(F2I, trans_cov),
|
||||||
|
INSTR(F2U, trans_cov),
|
||||||
};
|
};
|
||||||
|
|
||||||
static fd3_semantic
|
static fd3_semantic
|
||||||
@@ -1935,6 +2242,8 @@ decl_in(struct fd3_compile_context *ctx, struct tgsi_full_declaration *decl)
|
|||||||
|
|
||||||
DBG("decl in -> r%d", i);
|
DBG("decl in -> r%d", i);
|
||||||
|
|
||||||
|
compile_assert(ctx, n < ARRAY_SIZE(so->inputs));
|
||||||
|
|
||||||
so->inputs[n].semantic = decl_semantic(&decl->Semantic);
|
so->inputs[n].semantic = decl_semantic(&decl->Semantic);
|
||||||
so->inputs[n].compmask = (1 << ncomp) - 1;
|
so->inputs[n].compmask = (1 << ncomp) - 1;
|
||||||
so->inputs[n].regid = r;
|
so->inputs[n].regid = r;
|
||||||
@@ -2024,6 +2333,8 @@ decl_out(struct fd3_compile_context *ctx, struct tgsi_full_declaration *decl)
|
|||||||
|
|
||||||
ncomp = 4;
|
ncomp = 4;
|
||||||
|
|
||||||
|
compile_assert(ctx, n < ARRAY_SIZE(so->outputs));
|
||||||
|
|
||||||
so->outputs[n].semantic = decl_semantic(&decl->Semantic);
|
so->outputs[n].semantic = decl_semantic(&decl->Semantic);
|
||||||
so->outputs[n].regid = regid(i, comp);
|
so->outputs[n].regid = regid(i, comp);
|
||||||
|
|
||||||
@@ -2147,6 +2458,7 @@ compile_instructions(struct fd3_compile_context *ctx)
|
|||||||
struct tgsi_full_immediate *imm =
|
struct tgsi_full_immediate *imm =
|
||||||
&ctx->parser.FullToken.FullImmediate;
|
&ctx->parser.FullToken.FullImmediate;
|
||||||
unsigned n = ctx->so->immediates_count++;
|
unsigned n = ctx->so->immediates_count++;
|
||||||
|
compile_assert(ctx, n < ARRAY_SIZE(ctx->so->immediates));
|
||||||
memcpy(ctx->so->immediates[n].val, imm->u, 16);
|
memcpy(ctx->so->immediates[n].val, imm->u, 16);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -1324,6 +1324,8 @@ decl_in(struct fd3_compile_context *ctx, struct tgsi_full_declaration *decl)
|
|||||||
|
|
||||||
DBG("decl in -> r%d", i + base); // XXX
|
DBG("decl in -> r%d", i + base); // XXX
|
||||||
|
|
||||||
|
compile_assert(ctx, n < ARRAY_SIZE(so->inputs));
|
||||||
|
|
||||||
so->inputs[n].semantic = decl_semantic(&decl->Semantic);
|
so->inputs[n].semantic = decl_semantic(&decl->Semantic);
|
||||||
so->inputs[n].compmask = (1 << ncomp) - 1;
|
so->inputs[n].compmask = (1 << ncomp) - 1;
|
||||||
so->inputs[n].ncomp = ncomp;
|
so->inputs[n].ncomp = ncomp;
|
||||||
@@ -1410,6 +1412,7 @@ decl_out(struct fd3_compile_context *ctx, struct tgsi_full_declaration *decl)
|
|||||||
|
|
||||||
for (i = decl->Range.First; i <= decl->Range.Last; i++) {
|
for (i = decl->Range.First; i <= decl->Range.Last; i++) {
|
||||||
unsigned n = so->outputs_count++;
|
unsigned n = so->outputs_count++;
|
||||||
|
compile_assert(ctx, n < ARRAY_SIZE(so->outputs));
|
||||||
so->outputs[n].semantic = decl_semantic(&decl->Semantic);
|
so->outputs[n].semantic = decl_semantic(&decl->Semantic);
|
||||||
so->outputs[n].regid = regid(i + base, comp);
|
so->outputs[n].regid = regid(i + base, comp);
|
||||||
}
|
}
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#include "fd3_emit.h"
|
#include "fd3_emit.h"
|
||||||
#include "fd3_gmem.h"
|
#include "fd3_gmem.h"
|
||||||
#include "fd3_program.h"
|
#include "fd3_program.h"
|
||||||
|
#include "fd3_query.h"
|
||||||
#include "fd3_rasterizer.h"
|
#include "fd3_rasterizer.h"
|
||||||
#include "fd3_texture.h"
|
#include "fd3_texture.h"
|
||||||
#include "fd3_zsa.h"
|
#include "fd3_zsa.h"
|
||||||
@@ -134,5 +135,7 @@ fd3_context_create(struct pipe_screen *pscreen, void *priv)
|
|||||||
fd3_ctx->solid_vbuf = create_solid_vertexbuf(pctx);
|
fd3_ctx->solid_vbuf = create_solid_vertexbuf(pctx);
|
||||||
fd3_ctx->blit_texcoord_vbuf = create_blit_texcoord_vertexbuf(pctx);
|
fd3_ctx->blit_texcoord_vbuf = create_blit_texcoord_vertexbuf(pctx);
|
||||||
|
|
||||||
|
fd3_query_context_init(pctx);
|
||||||
|
|
||||||
return pctx;
|
return pctx;
|
||||||
}
|
}
|
||||||
|
@@ -195,8 +195,10 @@ emit_textures(struct fd_ringbuffer *ring,
|
|||||||
OUT_RING(ring, CP_LOAD_STATE_1_STATE_TYPE(ST_CONSTANTS) |
|
OUT_RING(ring, CP_LOAD_STATE_1_STATE_TYPE(ST_CONSTANTS) |
|
||||||
CP_LOAD_STATE_1_EXT_SRC_ADDR(0));
|
CP_LOAD_STATE_1_EXT_SRC_ADDR(0));
|
||||||
for (i = 0; i < tex->num_textures; i++) {
|
for (i = 0; i < tex->num_textures; i++) {
|
||||||
struct fd3_pipe_sampler_view *view =
|
static const struct fd3_pipe_sampler_view dummy_view = {};
|
||||||
fd3_pipe_sampler_view(tex->textures[i]);
|
const struct fd3_pipe_sampler_view *view = tex->textures[i] ?
|
||||||
|
fd3_pipe_sampler_view(tex->textures[i]) :
|
||||||
|
&dummy_view;
|
||||||
OUT_RING(ring, view->texconst0);
|
OUT_RING(ring, view->texconst0);
|
||||||
OUT_RING(ring, view->texconst1);
|
OUT_RING(ring, view->texconst1);
|
||||||
OUT_RING(ring, view->texconst2 |
|
OUT_RING(ring, view->texconst2 |
|
||||||
@@ -213,8 +215,10 @@ emit_textures(struct fd_ringbuffer *ring,
|
|||||||
OUT_RING(ring, CP_LOAD_STATE_1_STATE_TYPE(ST_CONSTANTS) |
|
OUT_RING(ring, CP_LOAD_STATE_1_STATE_TYPE(ST_CONSTANTS) |
|
||||||
CP_LOAD_STATE_1_EXT_SRC_ADDR(0));
|
CP_LOAD_STATE_1_EXT_SRC_ADDR(0));
|
||||||
for (i = 0; i < tex->num_textures; i++) {
|
for (i = 0; i < tex->num_textures; i++) {
|
||||||
struct fd3_pipe_sampler_view *view =
|
static const struct fd3_pipe_sampler_view dummy_view = {};
|
||||||
fd3_pipe_sampler_view(tex->textures[i]);
|
const struct fd3_pipe_sampler_view *view = tex->textures[i] ?
|
||||||
|
fd3_pipe_sampler_view(tex->textures[i]) :
|
||||||
|
&dummy_view;
|
||||||
struct fd_resource *rsc = view->tex_resource;
|
struct fd_resource *rsc = view->tex_resource;
|
||||||
|
|
||||||
for (j = 0; j < view->mipaddrs; j++) {
|
for (j = 0; j < view->mipaddrs; j++) {
|
||||||
@@ -323,9 +327,12 @@ fd3_emit_vertex_bufs(struct fd_ringbuffer *ring,
|
|||||||
if (vp->inputs[i].compmask) {
|
if (vp->inputs[i].compmask) {
|
||||||
struct pipe_resource *prsc = vbufs[i].prsc;
|
struct pipe_resource *prsc = vbufs[i].prsc;
|
||||||
struct fd_resource *rsc = fd_resource(prsc);
|
struct fd_resource *rsc = fd_resource(prsc);
|
||||||
enum a3xx_vtx_fmt fmt = fd3_pipe2vtx(vbufs[i].format);
|
enum pipe_format pfmt = vbufs[i].format;
|
||||||
|
enum a3xx_vtx_fmt fmt = fd3_pipe2vtx(pfmt);
|
||||||
bool switchnext = (i != last);
|
bool switchnext = (i != last);
|
||||||
uint32_t fs = util_format_get_blocksize(vbufs[i].format);
|
uint32_t fs = util_format_get_blocksize(pfmt);
|
||||||
|
|
||||||
|
debug_assert(fmt != ~0);
|
||||||
|
|
||||||
OUT_PKT0(ring, REG_A3XX_VFD_FETCH(j), 2);
|
OUT_PKT0(ring, REG_A3XX_VFD_FETCH(j), 2);
|
||||||
OUT_RING(ring, A3XX_VFD_FETCH_INSTR_0_FETCHSIZE(fs - 1) |
|
OUT_RING(ring, A3XX_VFD_FETCH_INSTR_0_FETCHSIZE(fs - 1) |
|
||||||
@@ -339,6 +346,7 @@ fd3_emit_vertex_bufs(struct fd_ringbuffer *ring,
|
|||||||
OUT_RING(ring, A3XX_VFD_DECODE_INSTR_CONSTFILL |
|
OUT_RING(ring, A3XX_VFD_DECODE_INSTR_CONSTFILL |
|
||||||
A3XX_VFD_DECODE_INSTR_WRITEMASK(vp->inputs[i].compmask) |
|
A3XX_VFD_DECODE_INSTR_WRITEMASK(vp->inputs[i].compmask) |
|
||||||
A3XX_VFD_DECODE_INSTR_FORMAT(fmt) |
|
A3XX_VFD_DECODE_INSTR_FORMAT(fmt) |
|
||||||
|
A3XX_VFD_DECODE_INSTR_SWAP(fd3_pipe2swap(pfmt)) |
|
||||||
A3XX_VFD_DECODE_INSTR_REGID(vp->inputs[i].regid) |
|
A3XX_VFD_DECODE_INSTR_REGID(vp->inputs[i].regid) |
|
||||||
A3XX_VFD_DECODE_INSTR_SHIFTCNT(fs) |
|
A3XX_VFD_DECODE_INSTR_SHIFTCNT(fs) |
|
||||||
A3XX_VFD_DECODE_INSTR_LASTCOMPVALID |
|
A3XX_VFD_DECODE_INSTR_LASTCOMPVALID |
|
||||||
|
@@ -82,7 +82,7 @@ emit_mrt(struct fd_ringbuffer *ring, unsigned nr_bufs,
|
|||||||
stride = bin_w * rsc->cpp;
|
stride = bin_w * rsc->cpp;
|
||||||
|
|
||||||
if (bases) {
|
if (bases) {
|
||||||
base = bases[i] * rsc->cpp;
|
base = bases[i];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
stride = slice->pitch * rsc->cpp;
|
stride = slice->pitch * rsc->cpp;
|
||||||
@@ -106,9 +106,17 @@ emit_mrt(struct fd_ringbuffer *ring, unsigned nr_bufs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t
|
static uint32_t
|
||||||
depth_base(struct fd_gmem_stateobj *gmem)
|
depth_base(struct fd_context *ctx)
|
||||||
{
|
{
|
||||||
return align(gmem->bin_w * gmem->bin_h, 0x4000);
|
struct fd_gmem_stateobj *gmem = &ctx->gmem;
|
||||||
|
struct pipe_framebuffer_state *pfb = &ctx->framebuffer;
|
||||||
|
uint32_t cpp = 4;
|
||||||
|
if (pfb->cbufs[0]) {
|
||||||
|
struct fd_resource *rsc =
|
||||||
|
fd_resource(pfb->cbufs[0]->texture);
|
||||||
|
cpp = rsc->cpp;
|
||||||
|
}
|
||||||
|
return align(gmem->bin_w * gmem->bin_h * cpp, 0x4000);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
@@ -156,7 +164,7 @@ emit_binning_workaround(struct fd_context *ctx)
|
|||||||
OUT_RING(ring, A3XX_RB_COPY_CONTROL_MSAA_RESOLVE(MSAA_ONE) |
|
OUT_RING(ring, A3XX_RB_COPY_CONTROL_MSAA_RESOLVE(MSAA_ONE) |
|
||||||
A3XX_RB_COPY_CONTROL_MODE(0) |
|
A3XX_RB_COPY_CONTROL_MODE(0) |
|
||||||
A3XX_RB_COPY_CONTROL_GMEM_BASE(0));
|
A3XX_RB_COPY_CONTROL_GMEM_BASE(0));
|
||||||
OUT_RELOC(ring, fd_resource(fd3_ctx->solid_vbuf)->bo, 0x20, 0, -1); /* RB_COPY_DEST_BASE */
|
OUT_RELOCW(ring, fd_resource(fd3_ctx->solid_vbuf)->bo, 0x20, 0, -1); /* RB_COPY_DEST_BASE */
|
||||||
OUT_RING(ring, A3XX_RB_COPY_DEST_PITCH_PITCH(128));
|
OUT_RING(ring, A3XX_RB_COPY_DEST_PITCH_PITCH(128));
|
||||||
OUT_RING(ring, A3XX_RB_COPY_DEST_INFO_TILE(LINEAR) |
|
OUT_RING(ring, A3XX_RB_COPY_DEST_INFO_TILE(LINEAR) |
|
||||||
A3XX_RB_COPY_DEST_INFO_FORMAT(RB_R8G8B8A8_UNORM) |
|
A3XX_RB_COPY_DEST_INFO_FORMAT(RB_R8G8B8A8_UNORM) |
|
||||||
@@ -399,12 +407,7 @@ fd3_emit_tile_gmem2mem(struct fd_context *ctx, struct fd_tile *tile)
|
|||||||
}}, 1);
|
}}, 1);
|
||||||
|
|
||||||
if (ctx->resolve & (FD_BUFFER_DEPTH | FD_BUFFER_STENCIL)) {
|
if (ctx->resolve & (FD_BUFFER_DEPTH | FD_BUFFER_STENCIL)) {
|
||||||
uint32_t base = 0;
|
uint32_t base = depth_base(ctx);
|
||||||
if (pfb->cbufs[0]) {
|
|
||||||
struct fd_resource *rsc =
|
|
||||||
fd_resource(pfb->cbufs[0]->texture);
|
|
||||||
base = depth_base(&ctx->gmem) * rsc->cpp;
|
|
||||||
}
|
|
||||||
emit_gmem2mem_surf(ctx, RB_COPY_DEPTH_STENCIL, base, pfb->zsbuf);
|
emit_gmem2mem_surf(ctx, RB_COPY_DEPTH_STENCIL, base, pfb->zsbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -458,7 +461,7 @@ fd3_emit_tile_mem2gmem(struct fd_context *ctx, struct fd_tile *tile)
|
|||||||
y1 = ((float)tile->yoff + bin_h) / ((float)pfb->height);
|
y1 = ((float)tile->yoff + bin_h) / ((float)pfb->height);
|
||||||
|
|
||||||
OUT_PKT3(ring, CP_MEM_WRITE, 5);
|
OUT_PKT3(ring, CP_MEM_WRITE, 5);
|
||||||
OUT_RELOC(ring, fd_resource(fd3_ctx->blit_texcoord_vbuf)->bo, 0, 0, 0);
|
OUT_RELOCW(ring, fd_resource(fd3_ctx->blit_texcoord_vbuf)->bo, 0, 0, 0);
|
||||||
OUT_RING(ring, fui(x0));
|
OUT_RING(ring, fui(x0));
|
||||||
OUT_RING(ring, fui(y0));
|
OUT_RING(ring, fui(y0));
|
||||||
OUT_RING(ring, fui(x1));
|
OUT_RING(ring, fui(x1));
|
||||||
@@ -558,7 +561,7 @@ fd3_emit_tile_mem2gmem(struct fd_context *ctx, struct fd_tile *tile)
|
|||||||
bin_h = gmem->bin_h;
|
bin_h = gmem->bin_h;
|
||||||
|
|
||||||
if (ctx->restore & (FD_BUFFER_DEPTH | FD_BUFFER_STENCIL))
|
if (ctx->restore & (FD_BUFFER_DEPTH | FD_BUFFER_STENCIL))
|
||||||
emit_mem2gmem_surf(ctx, depth_base(gmem), pfb->zsbuf, bin_w);
|
emit_mem2gmem_surf(ctx, depth_base(ctx), pfb->zsbuf, bin_w);
|
||||||
|
|
||||||
if (ctx->restore & FD_BUFFER_COLOR)
|
if (ctx->restore & FD_BUFFER_COLOR)
|
||||||
emit_mem2gmem_surf(ctx, 0, pfb->cbufs[0], bin_w);
|
emit_mem2gmem_surf(ctx, 0, pfb->cbufs[0], bin_w);
|
||||||
@@ -639,7 +642,7 @@ update_vsc_pipe(struct fd_context *ctx)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
OUT_PKT0(ring, REG_A3XX_VSC_SIZE_ADDRESS, 1);
|
OUT_PKT0(ring, REG_A3XX_VSC_SIZE_ADDRESS, 1);
|
||||||
OUT_RELOC(ring, fd3_ctx->vsc_size_mem, 0, 0, 0); /* VSC_SIZE_ADDRESS */
|
OUT_RELOCW(ring, fd3_ctx->vsc_size_mem, 0, 0, 0); /* VSC_SIZE_ADDRESS */
|
||||||
|
|
||||||
for (i = 0; i < 8; i++) {
|
for (i = 0; i < 8; i++) {
|
||||||
struct fd_vsc_pipe *pipe = &ctx->pipe[i];
|
struct fd_vsc_pipe *pipe = &ctx->pipe[i];
|
||||||
@@ -654,7 +657,7 @@ update_vsc_pipe(struct fd_context *ctx)
|
|||||||
A3XX_VSC_PIPE_CONFIG_Y(pipe->y) |
|
A3XX_VSC_PIPE_CONFIG_Y(pipe->y) |
|
||||||
A3XX_VSC_PIPE_CONFIG_W(pipe->w) |
|
A3XX_VSC_PIPE_CONFIG_W(pipe->w) |
|
||||||
A3XX_VSC_PIPE_CONFIG_H(pipe->h));
|
A3XX_VSC_PIPE_CONFIG_H(pipe->h));
|
||||||
OUT_RELOC(ring, pipe->bo, 0, 0, 0); /* VSC_PIPE[i].DATA_ADDRESS */
|
OUT_RELOCW(ring, pipe->bo, 0, 0, 0); /* VSC_PIPE[i].DATA_ADDRESS */
|
||||||
OUT_RING(ring, fd_bo_size(pipe->bo) - 32); /* VSC_PIPE[i].DATA_LENGTH */
|
OUT_RING(ring, fd_bo_size(pipe->bo) - 32); /* VSC_PIPE[i].DATA_LENGTH */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -789,6 +792,7 @@ fd3_emit_tile_init(struct fd_context *ctx)
|
|||||||
{
|
{
|
||||||
struct fd_ringbuffer *ring = ctx->ring;
|
struct fd_ringbuffer *ring = ctx->ring;
|
||||||
struct fd_gmem_stateobj *gmem = &ctx->gmem;
|
struct fd_gmem_stateobj *gmem = &ctx->gmem;
|
||||||
|
uint32_t rb_render_control;
|
||||||
|
|
||||||
fd3_emit_restore(ctx);
|
fd3_emit_restore(ctx);
|
||||||
|
|
||||||
@@ -813,8 +817,10 @@ fd3_emit_tile_init(struct fd_context *ctx)
|
|||||||
patch_draws(ctx, IGNORE_VISIBILITY);
|
patch_draws(ctx, IGNORE_VISIBILITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
patch_rbrc(ctx, A3XX_RB_RENDER_CONTROL_ENABLE_GMEM |
|
rb_render_control = A3XX_RB_RENDER_CONTROL_ENABLE_GMEM |
|
||||||
A3XX_RB_RENDER_CONTROL_BIN_WIDTH(gmem->bin_w));
|
A3XX_RB_RENDER_CONTROL_BIN_WIDTH(gmem->bin_w);
|
||||||
|
|
||||||
|
patch_rbrc(ctx, rb_render_control);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* before mem2gmem */
|
/* before mem2gmem */
|
||||||
@@ -827,7 +833,7 @@ fd3_emit_tile_prep(struct fd_context *ctx, struct fd_tile *tile)
|
|||||||
uint32_t reg;
|
uint32_t reg;
|
||||||
|
|
||||||
OUT_PKT0(ring, REG_A3XX_RB_DEPTH_INFO, 2);
|
OUT_PKT0(ring, REG_A3XX_RB_DEPTH_INFO, 2);
|
||||||
reg = A3XX_RB_DEPTH_INFO_DEPTH_BASE(depth_base(gmem));
|
reg = A3XX_RB_DEPTH_INFO_DEPTH_BASE(depth_base(ctx));
|
||||||
if (pfb->zsbuf) {
|
if (pfb->zsbuf) {
|
||||||
reg |= A3XX_RB_DEPTH_INFO_DEPTH_FORMAT(fd_pipe2depth(pfb->zsbuf->format));
|
reg |= A3XX_RB_DEPTH_INFO_DEPTH_FORMAT(fd_pipe2depth(pfb->zsbuf->format));
|
||||||
}
|
}
|
||||||
|
@@ -406,7 +406,7 @@ fd3_program_emit(struct fd_ringbuffer *ring,
|
|||||||
A3XX_SP_VS_PARAM_REG_PSIZEREGID(psize_regid) |
|
A3XX_SP_VS_PARAM_REG_PSIZEREGID(psize_regid) |
|
||||||
A3XX_SP_VS_PARAM_REG_TOTALVSOUTVAR(align(fp->total_in, 4) / 4));
|
A3XX_SP_VS_PARAM_REG_TOTALVSOUTVAR(align(fp->total_in, 4) / 4));
|
||||||
|
|
||||||
for (i = 0, j = -1; j < (int)fp->inputs_count; i++) {
|
for (i = 0, j = -1; (i < 8) && (j < (int)fp->inputs_count); i++) {
|
||||||
uint32_t reg = 0;
|
uint32_t reg = 0;
|
||||||
|
|
||||||
OUT_PKT0(ring, REG_A3XX_SP_VS_OUT_REG(i), 1);
|
OUT_PKT0(ring, REG_A3XX_SP_VS_OUT_REG(i), 1);
|
||||||
@@ -428,7 +428,7 @@ fd3_program_emit(struct fd_ringbuffer *ring,
|
|||||||
OUT_RING(ring, reg);
|
OUT_RING(ring, reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0, j = -1; j < (int)fp->inputs_count; i++) {
|
for (i = 0, j = -1; (i < 4) && (j < (int)fp->inputs_count); i++) {
|
||||||
uint32_t reg = 0;
|
uint32_t reg = 0;
|
||||||
|
|
||||||
OUT_PKT0(ring, REG_A3XX_SP_VS_VPC_DST_REG(i), 1);
|
OUT_PKT0(ring, REG_A3XX_SP_VS_VPC_DST_REG(i), 1);
|
||||||
|
@@ -91,7 +91,7 @@ struct fd3_shader_variant {
|
|||||||
struct {
|
struct {
|
||||||
fd3_semantic semantic;
|
fd3_semantic semantic;
|
||||||
uint8_t regid;
|
uint8_t regid;
|
||||||
} outputs[16];
|
} outputs[16 + 2]; /* +POSITION +PSIZE */
|
||||||
bool writes_pos, writes_psize;
|
bool writes_pos, writes_psize;
|
||||||
|
|
||||||
/* vertices/inputs: */
|
/* vertices/inputs: */
|
||||||
@@ -104,7 +104,7 @@ struct fd3_shader_variant {
|
|||||||
/* in theory inloc of fs should match outloc of vs: */
|
/* in theory inloc of fs should match outloc of vs: */
|
||||||
uint8_t inloc;
|
uint8_t inloc;
|
||||||
uint8_t bary;
|
uint8_t bary;
|
||||||
} inputs[16];
|
} inputs[16 + 2]; /* +POSITION +FACE */
|
||||||
|
|
||||||
unsigned total_in; /* sum of inputs (scalar) */
|
unsigned total_in; /* sum of inputs (scalar) */
|
||||||
|
|
||||||
|
139
src/gallium/drivers/freedreno/a3xx/fd3_query.c
Normal file
139
src/gallium/drivers/freedreno/a3xx/fd3_query.c
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
/* -*- mode: C; c-file-style: "k&r"; tab-width 4; indent-tabs-mode: t; -*- */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2014 Rob Clark <robclark@freedesktop.org>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* Authors:
|
||||||
|
* Rob Clark <robclark@freedesktop.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "freedreno_query_hw.h"
|
||||||
|
#include "freedreno_context.h"
|
||||||
|
#include "freedreno_util.h"
|
||||||
|
|
||||||
|
#include "fd3_query.h"
|
||||||
|
#include "fd3_util.h"
|
||||||
|
|
||||||
|
|
||||||
|
struct fd_rb_samp_ctrs {
|
||||||
|
uint64_t ctr[16];
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Occlusion Query:
|
||||||
|
*
|
||||||
|
* OCCLUSION_COUNTER and OCCLUSION_PREDICATE differ only in how they
|
||||||
|
* interpret results
|
||||||
|
*/
|
||||||
|
|
||||||
|
static struct fd_hw_sample *
|
||||||
|
occlusion_get_sample(struct fd_context *ctx, struct fd_ringbuffer *ring)
|
||||||
|
{
|
||||||
|
struct fd_hw_sample *samp =
|
||||||
|
fd_hw_sample_init(ctx, sizeof(struct fd_rb_samp_ctrs));
|
||||||
|
|
||||||
|
/* Set RB_SAMPLE_COUNT_ADDR to samp->offset plus value of
|
||||||
|
* HW_QUERY_BASE_REG register:
|
||||||
|
*/
|
||||||
|
OUT_PKT3(ring, CP_SET_CONSTANT, 3);
|
||||||
|
OUT_RING(ring, CP_REG(REG_A3XX_RB_SAMPLE_COUNT_ADDR) | 0x80000000);
|
||||||
|
OUT_RING(ring, HW_QUERY_BASE_REG);
|
||||||
|
OUT_RING(ring, samp->offset);
|
||||||
|
|
||||||
|
OUT_PKT0(ring, REG_A3XX_RB_SAMPLE_COUNT_CONTROL, 1);
|
||||||
|
OUT_RING(ring, A3XX_RB_SAMPLE_COUNT_CONTROL_COPY);
|
||||||
|
|
||||||
|
OUT_PKT3(ring, CP_DRAW_INDX, 3);
|
||||||
|
OUT_RING(ring, 0x00000000);
|
||||||
|
OUT_RING(ring, DRAW(DI_PT_POINTLIST_A2XX, DI_SRC_SEL_AUTO_INDEX,
|
||||||
|
INDEX_SIZE_IGN, USE_VISIBILITY));
|
||||||
|
OUT_RING(ring, 0); /* NumIndices */
|
||||||
|
|
||||||
|
OUT_PKT3(ring, CP_EVENT_WRITE, 1);
|
||||||
|
OUT_RING(ring, ZPASS_DONE);
|
||||||
|
|
||||||
|
OUT_PKT0(ring, REG_A3XX_RBBM_PERFCTR_CTL, 1);
|
||||||
|
OUT_RING(ring, A3XX_RBBM_PERFCTR_CTL_ENABLE);
|
||||||
|
|
||||||
|
OUT_PKT0(ring, REG_A3XX_VBIF_PERF_CNT_EN, 1);
|
||||||
|
OUT_RING(ring, A3XX_VBIF_PERF_CNT_EN_CNT0 |
|
||||||
|
A3XX_VBIF_PERF_CNT_EN_CNT1 |
|
||||||
|
A3XX_VBIF_PERF_CNT_EN_PWRCNT0 |
|
||||||
|
A3XX_VBIF_PERF_CNT_EN_PWRCNT1 |
|
||||||
|
A3XX_VBIF_PERF_CNT_EN_PWRCNT2);
|
||||||
|
|
||||||
|
return samp;
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint64_t
|
||||||
|
count_samples(const struct fd_rb_samp_ctrs *start,
|
||||||
|
const struct fd_rb_samp_ctrs *end)
|
||||||
|
{
|
||||||
|
uint64_t n = 0;
|
||||||
|
unsigned i;
|
||||||
|
|
||||||
|
/* not quite sure what all of these are, possibly different
|
||||||
|
* counters for each MRT render target:
|
||||||
|
*/
|
||||||
|
for (i = 0; i < 16; i += 4)
|
||||||
|
n += end->ctr[i] - start->ctr[i];
|
||||||
|
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
occlusion_counter_accumulate_result(struct fd_context *ctx,
|
||||||
|
const void *start, const void *end,
|
||||||
|
union pipe_query_result *result)
|
||||||
|
{
|
||||||
|
uint64_t n = count_samples(start, end);
|
||||||
|
result->u64 += n;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
occlusion_predicate_accumulate_result(struct fd_context *ctx,
|
||||||
|
const void *start, const void *end,
|
||||||
|
union pipe_query_result *result)
|
||||||
|
{
|
||||||
|
uint64_t n = count_samples(start, end);
|
||||||
|
result->b |= (n > 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct fd_hw_sample_provider occlusion_counter = {
|
||||||
|
.query_type = PIPE_QUERY_OCCLUSION_COUNTER,
|
||||||
|
.active = FD_STAGE_DRAW, /* | FD_STAGE_CLEAR ??? */
|
||||||
|
.get_sample = occlusion_get_sample,
|
||||||
|
.accumulate_result = occlusion_counter_accumulate_result,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct fd_hw_sample_provider occlusion_predicate = {
|
||||||
|
.query_type = PIPE_QUERY_OCCLUSION_PREDICATE,
|
||||||
|
.active = FD_STAGE_DRAW, /* | FD_STAGE_CLEAR ??? */
|
||||||
|
.get_sample = occlusion_get_sample,
|
||||||
|
.accumulate_result = occlusion_predicate_accumulate_result,
|
||||||
|
};
|
||||||
|
|
||||||
|
void fd3_query_context_init(struct pipe_context *pctx)
|
||||||
|
{
|
||||||
|
fd_hw_query_register_provider(pctx, &occlusion_counter);
|
||||||
|
fd_hw_query_register_provider(pctx, &occlusion_predicate);
|
||||||
|
}
|
36
src/gallium/drivers/freedreno/a3xx/fd3_query.h
Normal file
36
src/gallium/drivers/freedreno/a3xx/fd3_query.h
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/* -*- mode: C; c-file-style: "k&r"; tab-width 4; indent-tabs-mode: t; -*- */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2014 Rob Clark <robclark@freedesktop.org>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* Authors:
|
||||||
|
* Rob Clark <robclark@freedesktop.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FD3_QUERY_H_
|
||||||
|
#define FD3_QUERY_H_
|
||||||
|
|
||||||
|
#include "pipe/p_context.h"
|
||||||
|
|
||||||
|
void fd3_query_context_init(struct pipe_context *pctx);
|
||||||
|
|
||||||
|
#endif /* FD3_QUERY_H_ */
|
@@ -40,6 +40,7 @@ fd3_rasterizer_state_create(struct pipe_context *pctx,
|
|||||||
const struct pipe_rasterizer_state *cso)
|
const struct pipe_rasterizer_state *cso)
|
||||||
{
|
{
|
||||||
struct fd3_rasterizer_stateobj *so;
|
struct fd3_rasterizer_stateobj *so;
|
||||||
|
float psize_min, psize_max;
|
||||||
|
|
||||||
so = CALLOC_STRUCT(fd3_rasterizer_stateobj);
|
so = CALLOC_STRUCT(fd3_rasterizer_stateobj);
|
||||||
if (!so)
|
if (!so)
|
||||||
@@ -47,19 +48,28 @@ fd3_rasterizer_state_create(struct pipe_context *pctx,
|
|||||||
|
|
||||||
so->base = *cso;
|
so->base = *cso;
|
||||||
|
|
||||||
|
if (cso->point_size_per_vertex) {
|
||||||
|
psize_min = util_get_min_point_size(cso);
|
||||||
|
psize_max = 8192;
|
||||||
|
} else {
|
||||||
|
/* Force the point size to be as if the vertex output was disabled. */
|
||||||
|
psize_min = cso->point_size;
|
||||||
|
psize_max = cso->point_size;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (cso->line_stipple_enable) {
|
if (cso->line_stipple_enable) {
|
||||||
??? TODO line stipple
|
??? TODO line stipple
|
||||||
}
|
}
|
||||||
TODO cso->half_pixel_center
|
TODO cso->half_pixel_center
|
||||||
TODO cso->point_size
|
|
||||||
TODO psize_min/psize_max
|
|
||||||
if (cso->multisample)
|
if (cso->multisample)
|
||||||
TODO
|
TODO
|
||||||
*/
|
*/
|
||||||
so->gras_cl_clip_cntl = A3XX_GRAS_CL_CLIP_CNTL_IJ_PERSP_CENTER; /* ??? */
|
so->gras_cl_clip_cntl = A3XX_GRAS_CL_CLIP_CNTL_IJ_PERSP_CENTER; /* ??? */
|
||||||
so->gras_su_point_minmax = 0xffc00010; /* ??? */
|
so->gras_su_point_minmax =
|
||||||
so->gras_su_point_size = 0x00000008; /* ??? */
|
A3XX_GRAS_SU_POINT_MINMAX_MIN(psize_min/2) |
|
||||||
|
A3XX_GRAS_SU_POINT_MINMAX_MAX(psize_max/2);
|
||||||
|
so->gras_su_point_size = A3XX_GRAS_SU_POINT_SIZE(cso->point_size/2);
|
||||||
so->gras_su_poly_offset_scale =
|
so->gras_su_poly_offset_scale =
|
||||||
A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL(cso->offset_scale);
|
A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL(cso->offset_scale);
|
||||||
so->gras_su_poly_offset_offset =
|
so->gras_su_poly_offset_offset =
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
#include "util/u_string.h"
|
#include "util/u_string.h"
|
||||||
#include "util/u_memory.h"
|
#include "util/u_memory.h"
|
||||||
#include "util/u_inlines.h"
|
#include "util/u_inlines.h"
|
||||||
|
#include "util/u_format.h"
|
||||||
|
|
||||||
#include "fd3_texture.h"
|
#include "fd3_texture.h"
|
||||||
#include "fd3_util.h"
|
#include "fd3_util.h"
|
||||||
@@ -47,12 +48,14 @@ tex_clamp(unsigned wrap)
|
|||||||
case PIPE_TEX_WRAP_REPEAT:
|
case PIPE_TEX_WRAP_REPEAT:
|
||||||
return A3XX_TEX_REPEAT;
|
return A3XX_TEX_REPEAT;
|
||||||
case PIPE_TEX_WRAP_CLAMP:
|
case PIPE_TEX_WRAP_CLAMP:
|
||||||
case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
|
|
||||||
case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
|
case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
|
||||||
return A3XX_TEX_CLAMP_TO_EDGE;
|
return A3XX_TEX_CLAMP_TO_EDGE;
|
||||||
|
case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
|
||||||
|
return A3XX_TEX_CLAMP_TO_BORDER;
|
||||||
case PIPE_TEX_WRAP_MIRROR_CLAMP:
|
case PIPE_TEX_WRAP_MIRROR_CLAMP:
|
||||||
case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
|
case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
|
||||||
case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
|
case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
|
||||||
|
return A3XX_TEX_MIRROR_CLAMP;
|
||||||
case PIPE_TEX_WRAP_MIRROR_REPEAT:
|
case PIPE_TEX_WRAP_MIRROR_REPEAT:
|
||||||
return A3XX_TEX_MIRROR_REPEAT;
|
return A3XX_TEX_MIRROR_REPEAT;
|
||||||
default:
|
default:
|
||||||
@@ -99,6 +102,9 @@ fd3_sampler_state_create(struct pipe_context *pctx,
|
|||||||
A3XX_TEX_SAMP_0_WRAP_T(tex_clamp(cso->wrap_t)) |
|
A3XX_TEX_SAMP_0_WRAP_T(tex_clamp(cso->wrap_t)) |
|
||||||
A3XX_TEX_SAMP_0_WRAP_R(tex_clamp(cso->wrap_r));
|
A3XX_TEX_SAMP_0_WRAP_R(tex_clamp(cso->wrap_r));
|
||||||
|
|
||||||
|
if (cso->compare_mode)
|
||||||
|
so->texsamp0 |= A3XX_TEX_SAMP_0_COMPARE_FUNC(cso->compare_func); /* maps 1:1 */
|
||||||
|
|
||||||
if (cso->min_mip_filter != PIPE_TEX_MIPFILTER_NONE) {
|
if (cso->min_mip_filter != PIPE_TEX_MIPFILTER_NONE) {
|
||||||
so->texsamp1 =
|
so->texsamp1 =
|
||||||
A3XX_TEX_SAMP_1_MIN_LOD(cso->min_lod) |
|
A3XX_TEX_SAMP_1_MIN_LOD(cso->min_lod) |
|
||||||
@@ -158,6 +164,10 @@ fd3_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc,
|
|||||||
A3XX_TEX_CONST_0_MIPLVLS(miplevels) |
|
A3XX_TEX_CONST_0_MIPLVLS(miplevels) |
|
||||||
fd3_tex_swiz(cso->format, cso->swizzle_r, cso->swizzle_g,
|
fd3_tex_swiz(cso->format, cso->swizzle_r, cso->swizzle_g,
|
||||||
cso->swizzle_b, cso->swizzle_a);
|
cso->swizzle_b, cso->swizzle_a);
|
||||||
|
|
||||||
|
if (util_format_is_srgb(cso->format))
|
||||||
|
so->texconst0 |= A3XX_TEX_CONST_0_SRGB;
|
||||||
|
|
||||||
so->texconst1 =
|
so->texconst1 =
|
||||||
A3XX_TEX_CONST_1_FETCHSIZE(fd3_pipe2fetchsize(cso->format)) |
|
A3XX_TEX_CONST_1_FETCHSIZE(fd3_pipe2fetchsize(cso->format)) |
|
||||||
A3XX_TEX_CONST_1_WIDTH(prsc->width0) |
|
A3XX_TEX_CONST_1_WIDTH(prsc->width0) |
|
||||||
|
@@ -37,70 +37,44 @@ fd3_pipe2vtx(enum pipe_format format)
|
|||||||
{
|
{
|
||||||
switch (format) {
|
switch (format) {
|
||||||
/* 8-bit buffers. */
|
/* 8-bit buffers. */
|
||||||
case PIPE_FORMAT_A8_UNORM:
|
|
||||||
case PIPE_FORMAT_I8_UNORM:
|
|
||||||
case PIPE_FORMAT_L8_UNORM:
|
|
||||||
case PIPE_FORMAT_R8_UNORM:
|
case PIPE_FORMAT_R8_UNORM:
|
||||||
case PIPE_FORMAT_L8_SRGB:
|
|
||||||
return VFMT_NORM_UBYTE_8;
|
return VFMT_NORM_UBYTE_8;
|
||||||
|
|
||||||
case PIPE_FORMAT_A8_SNORM:
|
|
||||||
case PIPE_FORMAT_I8_SNORM:
|
|
||||||
case PIPE_FORMAT_L8_SNORM:
|
|
||||||
case PIPE_FORMAT_R8_SNORM:
|
case PIPE_FORMAT_R8_SNORM:
|
||||||
return VFMT_NORM_BYTE_8;
|
return VFMT_NORM_BYTE_8;
|
||||||
|
|
||||||
case PIPE_FORMAT_A8_UINT:
|
|
||||||
case PIPE_FORMAT_I8_UINT:
|
|
||||||
case PIPE_FORMAT_L8_UINT:
|
|
||||||
case PIPE_FORMAT_R8_UINT:
|
case PIPE_FORMAT_R8_UINT:
|
||||||
return VFMT_UBYTE_8;
|
return VFMT_UBYTE_8;
|
||||||
|
|
||||||
case PIPE_FORMAT_A8_SINT:
|
|
||||||
case PIPE_FORMAT_I8_SINT:
|
|
||||||
case PIPE_FORMAT_L8_SINT:
|
|
||||||
case PIPE_FORMAT_R8_SINT:
|
case PIPE_FORMAT_R8_SINT:
|
||||||
return VFMT_BYTE_8;
|
return VFMT_BYTE_8;
|
||||||
|
|
||||||
/* 16-bit buffers. */
|
/* 16-bit buffers. */
|
||||||
case PIPE_FORMAT_R16_UNORM:
|
case PIPE_FORMAT_R16_UNORM:
|
||||||
case PIPE_FORMAT_A16_UNORM:
|
|
||||||
case PIPE_FORMAT_L16_UNORM:
|
|
||||||
case PIPE_FORMAT_I16_UNORM:
|
|
||||||
case PIPE_FORMAT_Z16_UNORM:
|
case PIPE_FORMAT_Z16_UNORM:
|
||||||
return VFMT_NORM_USHORT_16;
|
return VFMT_NORM_USHORT_16;
|
||||||
|
|
||||||
case PIPE_FORMAT_R16_SNORM:
|
case PIPE_FORMAT_R16_SNORM:
|
||||||
case PIPE_FORMAT_A16_SNORM:
|
|
||||||
case PIPE_FORMAT_L16_SNORM:
|
|
||||||
case PIPE_FORMAT_I16_SNORM:
|
|
||||||
return VFMT_NORM_SHORT_16;
|
return VFMT_NORM_SHORT_16;
|
||||||
|
|
||||||
case PIPE_FORMAT_R16_UINT:
|
case PIPE_FORMAT_R16_UINT:
|
||||||
case PIPE_FORMAT_A16_UINT:
|
|
||||||
case PIPE_FORMAT_L16_UINT:
|
|
||||||
case PIPE_FORMAT_I16_UINT:
|
|
||||||
return VFMT_USHORT_16;
|
return VFMT_USHORT_16;
|
||||||
|
|
||||||
case PIPE_FORMAT_R16_SINT:
|
case PIPE_FORMAT_R16_SINT:
|
||||||
case PIPE_FORMAT_A16_SINT:
|
|
||||||
case PIPE_FORMAT_L16_SINT:
|
|
||||||
case PIPE_FORMAT_I16_SINT:
|
|
||||||
return VFMT_SHORT_16;
|
return VFMT_SHORT_16;
|
||||||
|
|
||||||
case PIPE_FORMAT_L8A8_UNORM:
|
case PIPE_FORMAT_R16_FLOAT:
|
||||||
|
return VFMT_FLOAT_16;
|
||||||
|
|
||||||
case PIPE_FORMAT_R8G8_UNORM:
|
case PIPE_FORMAT_R8G8_UNORM:
|
||||||
return VFMT_NORM_UBYTE_8_8;
|
return VFMT_NORM_UBYTE_8_8;
|
||||||
|
|
||||||
case PIPE_FORMAT_L8A8_SNORM:
|
|
||||||
case PIPE_FORMAT_R8G8_SNORM:
|
case PIPE_FORMAT_R8G8_SNORM:
|
||||||
return VFMT_NORM_BYTE_8_8;
|
return VFMT_NORM_BYTE_8_8;
|
||||||
|
|
||||||
case PIPE_FORMAT_L8A8_UINT:
|
|
||||||
case PIPE_FORMAT_R8G8_UINT:
|
case PIPE_FORMAT_R8G8_UINT:
|
||||||
return VFMT_UBYTE_8_8;
|
return VFMT_UBYTE_8_8;
|
||||||
|
|
||||||
case PIPE_FORMAT_L8A8_SINT:
|
|
||||||
case PIPE_FORMAT_R8G8_SINT:
|
case PIPE_FORMAT_R8G8_SINT:
|
||||||
return VFMT_BYTE_8_8;
|
return VFMT_BYTE_8_8;
|
||||||
|
|
||||||
@@ -121,42 +95,62 @@ fd3_pipe2vtx(enum pipe_format format)
|
|||||||
case PIPE_FORMAT_A8B8G8R8_UNORM:
|
case PIPE_FORMAT_A8B8G8R8_UNORM:
|
||||||
case PIPE_FORMAT_A8R8G8B8_UNORM:
|
case PIPE_FORMAT_A8R8G8B8_UNORM:
|
||||||
case PIPE_FORMAT_B8G8R8A8_UNORM:
|
case PIPE_FORMAT_B8G8R8A8_UNORM:
|
||||||
case PIPE_FORMAT_B8G8R8X8_UNORM:
|
|
||||||
case PIPE_FORMAT_R8G8B8A8_UNORM:
|
case PIPE_FORMAT_R8G8B8A8_UNORM:
|
||||||
case PIPE_FORMAT_R8G8B8X8_UNORM:
|
|
||||||
case PIPE_FORMAT_X8B8G8R8_UNORM:
|
|
||||||
case PIPE_FORMAT_X8R8G8B8_UNORM:
|
|
||||||
case PIPE_FORMAT_A8B8G8R8_SRGB:
|
|
||||||
case PIPE_FORMAT_B8G8R8A8_SRGB:
|
|
||||||
return VFMT_NORM_UBYTE_8_8_8_8;
|
return VFMT_NORM_UBYTE_8_8_8_8;
|
||||||
|
|
||||||
case PIPE_FORMAT_R8G8B8A8_SNORM:
|
case PIPE_FORMAT_R8G8B8A8_SNORM:
|
||||||
case PIPE_FORMAT_R8G8B8X8_SNORM:
|
|
||||||
return VFMT_NORM_BYTE_8_8_8_8;
|
return VFMT_NORM_BYTE_8_8_8_8;
|
||||||
|
|
||||||
case PIPE_FORMAT_R8G8B8A8_UINT:
|
case PIPE_FORMAT_R8G8B8A8_UINT:
|
||||||
case PIPE_FORMAT_R8G8B8X8_UINT:
|
|
||||||
return VFMT_UBYTE_8_8_8_8;
|
return VFMT_UBYTE_8_8_8_8;
|
||||||
|
|
||||||
case PIPE_FORMAT_R8G8B8A8_SINT:
|
case PIPE_FORMAT_R8G8B8A8_SINT:
|
||||||
case PIPE_FORMAT_R8G8B8X8_SINT:
|
|
||||||
return VFMT_BYTE_8_8_8_8;
|
return VFMT_BYTE_8_8_8_8;
|
||||||
|
|
||||||
/* TODO probably need gles3 blob drivers to find the 32bit int formats:
|
case PIPE_FORMAT_R16G16_SSCALED:
|
||||||
case PIPE_FORMAT_R32_UINT:
|
return VFMT_SHORT_16_16;
|
||||||
case PIPE_FORMAT_R32_SINT:
|
|
||||||
case PIPE_FORMAT_A32_UINT:
|
case PIPE_FORMAT_R16G16_FLOAT:
|
||||||
case PIPE_FORMAT_A32_SINT:
|
return VFMT_FLOAT_16_16;
|
||||||
case PIPE_FORMAT_L32_UINT:
|
|
||||||
case PIPE_FORMAT_L32_SINT:
|
case PIPE_FORMAT_R16G16_UINT:
|
||||||
case PIPE_FORMAT_I32_UINT:
|
return VFMT_USHORT_16_16;
|
||||||
case PIPE_FORMAT_I32_SINT:
|
|
||||||
*/
|
case PIPE_FORMAT_R16G16_UNORM:
|
||||||
|
return VFMT_NORM_USHORT_16_16;
|
||||||
|
|
||||||
|
case PIPE_FORMAT_R16G16_SNORM:
|
||||||
|
return VFMT_NORM_SHORT_16_16;
|
||||||
|
|
||||||
|
case PIPE_FORMAT_R10G10B10A2_UNORM:
|
||||||
|
return VFMT_NORM_UINT_10_10_10_2;
|
||||||
|
|
||||||
|
case PIPE_FORMAT_R10G10B10A2_SNORM:
|
||||||
|
return VFMT_NORM_INT_10_10_10_2;
|
||||||
|
|
||||||
|
case PIPE_FORMAT_R10G10B10A2_USCALED:
|
||||||
|
return VFMT_UINT_10_10_10_2;
|
||||||
|
|
||||||
|
case PIPE_FORMAT_R10G10B10A2_SSCALED:
|
||||||
|
return VFMT_INT_10_10_10_2;
|
||||||
|
|
||||||
|
/* 48-bit buffers. */
|
||||||
|
case PIPE_FORMAT_R16G16B16_FLOAT:
|
||||||
|
return VFMT_FLOAT_16_16_16;
|
||||||
|
|
||||||
|
case PIPE_FORMAT_R16G16B16_SSCALED:
|
||||||
|
return VFMT_SHORT_16_16_16;
|
||||||
|
|
||||||
|
case PIPE_FORMAT_R16G16B16_UINT:
|
||||||
|
return VFMT_USHORT_16_16_16;
|
||||||
|
|
||||||
|
case PIPE_FORMAT_R16G16B16_SNORM:
|
||||||
|
return VFMT_NORM_SHORT_16_16_16;
|
||||||
|
|
||||||
|
case PIPE_FORMAT_R16G16B16_UNORM:
|
||||||
|
return VFMT_NORM_USHORT_16_16_16;
|
||||||
|
|
||||||
case PIPE_FORMAT_R32_FLOAT:
|
case PIPE_FORMAT_R32_FLOAT:
|
||||||
case PIPE_FORMAT_A32_FLOAT:
|
|
||||||
case PIPE_FORMAT_L32_FLOAT:
|
|
||||||
case PIPE_FORMAT_I32_FLOAT:
|
|
||||||
case PIPE_FORMAT_Z32_FLOAT:
|
case PIPE_FORMAT_Z32_FLOAT:
|
||||||
return VFMT_FLOAT_32;
|
return VFMT_FLOAT_32;
|
||||||
|
|
||||||
@@ -177,23 +171,14 @@ fd3_pipe2vtx(enum pipe_format format)
|
|||||||
return VFMT_SHORT_16_16_16_16;
|
return VFMT_SHORT_16_16_16_16;
|
||||||
|
|
||||||
case PIPE_FORMAT_R32G32_FLOAT:
|
case PIPE_FORMAT_R32G32_FLOAT:
|
||||||
case PIPE_FORMAT_L32A32_FLOAT:
|
|
||||||
return VFMT_FLOAT_32_32;
|
return VFMT_FLOAT_32_32;
|
||||||
|
|
||||||
case PIPE_FORMAT_R32G32_FIXED:
|
case PIPE_FORMAT_R32G32_FIXED:
|
||||||
return VFMT_FIXED_32_32;
|
return VFMT_FIXED_32_32;
|
||||||
|
|
||||||
case PIPE_FORMAT_R16G16B16A16_FLOAT:
|
case PIPE_FORMAT_R16G16B16A16_FLOAT:
|
||||||
case PIPE_FORMAT_R16G16B16X16_FLOAT:
|
|
||||||
return VFMT_FLOAT_16_16_16_16;
|
return VFMT_FLOAT_16_16_16_16;
|
||||||
|
|
||||||
/* TODO probably need gles3 blob drivers to find the 32bit int formats:
|
|
||||||
case PIPE_FORMAT_R32G32_SINT:
|
|
||||||
case PIPE_FORMAT_R32G32_UINT:
|
|
||||||
case PIPE_FORMAT_L32A32_UINT:
|
|
||||||
case PIPE_FORMAT_L32A32_SINT:
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* 96-bit buffers. */
|
/* 96-bit buffers. */
|
||||||
case PIPE_FORMAT_R32G32B32_FLOAT:
|
case PIPE_FORMAT_R32G32B32_FLOAT:
|
||||||
return VFMT_FLOAT_32_32_32;
|
return VFMT_FLOAT_32_32_32;
|
||||||
@@ -203,7 +188,6 @@ fd3_pipe2vtx(enum pipe_format format)
|
|||||||
|
|
||||||
/* 128-bit buffers. */
|
/* 128-bit buffers. */
|
||||||
case PIPE_FORMAT_R32G32B32A32_FLOAT:
|
case PIPE_FORMAT_R32G32B32A32_FLOAT:
|
||||||
case PIPE_FORMAT_R32G32B32X32_FLOAT:
|
|
||||||
return VFMT_FLOAT_32_32_32_32;
|
return VFMT_FLOAT_32_32_32_32;
|
||||||
|
|
||||||
case PIPE_FORMAT_R32G32B32A32_FIXED:
|
case PIPE_FORMAT_R32G32B32A32_FIXED:
|
||||||
@@ -214,6 +198,20 @@ fd3_pipe2vtx(enum pipe_format format)
|
|||||||
case PIPE_FORMAT_R32G32B32A32_UNORM:
|
case PIPE_FORMAT_R32G32B32A32_UNORM:
|
||||||
case PIPE_FORMAT_R32G32B32A32_SINT:
|
case PIPE_FORMAT_R32G32B32A32_SINT:
|
||||||
case PIPE_FORMAT_R32G32B32A32_UINT:
|
case PIPE_FORMAT_R32G32B32A32_UINT:
|
||||||
|
|
||||||
|
case PIPE_FORMAT_R32_UINT:
|
||||||
|
case PIPE_FORMAT_R32_SINT:
|
||||||
|
case PIPE_FORMAT_A32_UINT:
|
||||||
|
case PIPE_FORMAT_A32_SINT:
|
||||||
|
case PIPE_FORMAT_L32_UINT:
|
||||||
|
case PIPE_FORMAT_L32_SINT:
|
||||||
|
case PIPE_FORMAT_I32_UINT:
|
||||||
|
case PIPE_FORMAT_I32_SINT:
|
||||||
|
|
||||||
|
case PIPE_FORMAT_R32G32_SINT:
|
||||||
|
case PIPE_FORMAT_R32G32_UINT:
|
||||||
|
case PIPE_FORMAT_L32A32_UINT:
|
||||||
|
case PIPE_FORMAT_L32A32_SINT:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -235,6 +233,10 @@ fd3_pipe2tex(enum pipe_format format)
|
|||||||
case PIPE_FORMAT_B8G8R8X8_UNORM:
|
case PIPE_FORMAT_B8G8R8X8_UNORM:
|
||||||
case PIPE_FORMAT_R8G8B8A8_UNORM:
|
case PIPE_FORMAT_R8G8B8A8_UNORM:
|
||||||
case PIPE_FORMAT_R8G8B8X8_UNORM:
|
case PIPE_FORMAT_R8G8B8X8_UNORM:
|
||||||
|
case PIPE_FORMAT_B8G8R8A8_SRGB:
|
||||||
|
case PIPE_FORMAT_B8G8R8X8_SRGB:
|
||||||
|
case PIPE_FORMAT_R8G8B8A8_SRGB:
|
||||||
|
case PIPE_FORMAT_R8G8B8X8_SRGB:
|
||||||
return TFMT_NORM_UINT_8_8_8_8;
|
return TFMT_NORM_UINT_8_8_8_8;
|
||||||
|
|
||||||
case PIPE_FORMAT_Z24X8_UNORM:
|
case PIPE_FORMAT_Z24X8_UNORM:
|
||||||
@@ -275,6 +277,12 @@ fd3_pipe2fetchsize(enum pipe_format format)
|
|||||||
|
|
||||||
case PIPE_FORMAT_B8G8R8A8_UNORM:
|
case PIPE_FORMAT_B8G8R8A8_UNORM:
|
||||||
case PIPE_FORMAT_B8G8R8X8_UNORM:
|
case PIPE_FORMAT_B8G8R8X8_UNORM:
|
||||||
|
case PIPE_FORMAT_R8G8B8A8_UNORM:
|
||||||
|
case PIPE_FORMAT_R8G8B8X8_UNORM:
|
||||||
|
case PIPE_FORMAT_B8G8R8A8_SRGB:
|
||||||
|
case PIPE_FORMAT_B8G8R8X8_SRGB:
|
||||||
|
case PIPE_FORMAT_R8G8B8A8_SRGB:
|
||||||
|
case PIPE_FORMAT_R8G8B8X8_SRGB:
|
||||||
case PIPE_FORMAT_Z24X8_UNORM:
|
case PIPE_FORMAT_Z24X8_UNORM:
|
||||||
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
|
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
|
||||||
return TFETCH_4_BYTE;
|
return TFETCH_4_BYTE;
|
||||||
@@ -348,8 +356,22 @@ fd3_pipe2swap(enum pipe_format format)
|
|||||||
switch (format) {
|
switch (format) {
|
||||||
case PIPE_FORMAT_B8G8R8A8_UNORM:
|
case PIPE_FORMAT_B8G8R8A8_UNORM:
|
||||||
case PIPE_FORMAT_B8G8R8X8_UNORM:
|
case PIPE_FORMAT_B8G8R8X8_UNORM:
|
||||||
|
case PIPE_FORMAT_B8G8R8A8_SRGB:
|
||||||
|
case PIPE_FORMAT_B8G8R8X8_SRGB:
|
||||||
return WXYZ;
|
return WXYZ;
|
||||||
|
|
||||||
|
case PIPE_FORMAT_A8R8G8B8_UNORM:
|
||||||
|
case PIPE_FORMAT_X8R8G8B8_UNORM:
|
||||||
|
case PIPE_FORMAT_A8R8G8B8_SRGB:
|
||||||
|
case PIPE_FORMAT_X8R8G8B8_SRGB:
|
||||||
|
return ZYXW;
|
||||||
|
|
||||||
|
case PIPE_FORMAT_A8B8G8R8_UNORM:
|
||||||
|
case PIPE_FORMAT_X8B8G8R8_UNORM:
|
||||||
|
case PIPE_FORMAT_A8B8G8R8_SRGB:
|
||||||
|
case PIPE_FORMAT_X8B8G8R8_SRGB:
|
||||||
|
return XYZW;
|
||||||
|
|
||||||
case PIPE_FORMAT_R8G8B8A8_UNORM:
|
case PIPE_FORMAT_R8G8B8A8_UNORM:
|
||||||
case PIPE_FORMAT_R8G8B8X8_UNORM:
|
case PIPE_FORMAT_R8G8B8X8_UNORM:
|
||||||
case PIPE_FORMAT_Z24X8_UNORM:
|
case PIPE_FORMAT_Z24X8_UNORM:
|
||||||
@@ -379,14 +401,14 @@ fd3_tex_swiz(enum pipe_format format, unsigned swizzle_r, unsigned swizzle_g,
|
|||||||
{
|
{
|
||||||
const struct util_format_description *desc =
|
const struct util_format_description *desc =
|
||||||
util_format_description(format);
|
util_format_description(format);
|
||||||
uint8_t swiz[] = {
|
unsigned char swiz[4] = {
|
||||||
swizzle_r, swizzle_g, swizzle_b, swizzle_a,
|
swizzle_r, swizzle_g, swizzle_b, swizzle_a,
|
||||||
PIPE_SWIZZLE_ZERO, PIPE_SWIZZLE_ONE,
|
}, rswiz[4];
|
||||||
PIPE_SWIZZLE_ONE, PIPE_SWIZZLE_ONE,
|
|
||||||
};
|
|
||||||
|
|
||||||
return A3XX_TEX_CONST_0_SWIZ_X(tex_swiz(swiz[desc->swizzle[0]])) |
|
util_format_compose_swizzles(desc->swizzle, swiz, rswiz);
|
||||||
A3XX_TEX_CONST_0_SWIZ_Y(tex_swiz(swiz[desc->swizzle[1]])) |
|
|
||||||
A3XX_TEX_CONST_0_SWIZ_Z(tex_swiz(swiz[desc->swizzle[2]])) |
|
return A3XX_TEX_CONST_0_SWIZ_X(tex_swiz(rswiz[0])) |
|
||||||
A3XX_TEX_CONST_0_SWIZ_W(tex_swiz(swiz[desc->swizzle[3]]));
|
A3XX_TEX_CONST_0_SWIZ_Y(tex_swiz(rswiz[1])) |
|
||||||
|
A3XX_TEX_CONST_0_SWIZ_Z(tex_swiz(rswiz[2])) |
|
||||||
|
A3XX_TEX_CONST_0_SWIZ_W(tex_swiz(rswiz[3]));
|
||||||
}
|
}
|
||||||
|
@@ -10,11 +10,11 @@ git clone https://github.com/freedreno/envytools.git
|
|||||||
The rules-ng-ng source files this header was generated from are:
|
The rules-ng-ng source files this header was generated from are:
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2013-11-30 14:47:15)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2013-11-30 14:47:15)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2013-03-31 16:51:27)
|
- /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2013-03-31 16:51:27)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32840 bytes, from 2014-01-05 14:44:21)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-06-02 15:21:30)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9009 bytes, from 2014-01-11 16:56:35)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9859 bytes, from 2014-06-02 15:21:30)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 12362 bytes, from 2014-01-07 14:47:36)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14477 bytes, from 2014-05-16 11:51:57)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 56545 bytes, from 2014-02-26 16:32:11)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 58020 bytes, from 2014-06-13 17:29:47)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 8344 bytes, from 2013-11-30 14:49:47)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26602 bytes, from 2014-06-13 17:28:10)
|
||||||
|
|
||||||
Copyright (C) 2013-2014 by the following authors:
|
Copyright (C) 2013-2014 by the following authors:
|
||||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||||
@@ -87,15 +87,6 @@ enum adreno_rb_blend_factor {
|
|||||||
FACTOR_SRC_ALPHA_SATURATE = 16,
|
FACTOR_SRC_ALPHA_SATURATE = 16,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum adreno_rb_blend_opcode {
|
|
||||||
BLEND_DST_PLUS_SRC = 0,
|
|
||||||
BLEND_SRC_MINUS_DST = 1,
|
|
||||||
BLEND_MIN_DST_SRC = 2,
|
|
||||||
BLEND_MAX_DST_SRC = 3,
|
|
||||||
BLEND_DST_MINUS_SRC = 4,
|
|
||||||
BLEND_DST_PLUS_SRC_BIAS = 5,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum adreno_rb_surface_endian {
|
enum adreno_rb_surface_endian {
|
||||||
ENDIAN_NONE = 0,
|
ENDIAN_NONE = 0,
|
||||||
ENDIAN_8IN16 = 1,
|
ENDIAN_8IN16 = 1,
|
||||||
@@ -116,6 +107,39 @@ enum adreno_rb_depth_format {
|
|||||||
DEPTHX_24_8 = 1,
|
DEPTHX_24_8 = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum adreno_rb_copy_control_mode {
|
||||||
|
RB_COPY_RESOLVE = 1,
|
||||||
|
RB_COPY_CLEAR = 2,
|
||||||
|
RB_COPY_DEPTH_STENCIL = 5,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum a3xx_render_mode {
|
||||||
|
RB_RENDERING_PASS = 0,
|
||||||
|
RB_TILING_PASS = 1,
|
||||||
|
RB_RESOLVE_PASS = 2,
|
||||||
|
RB_COMPUTE_PASS = 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum a3xx_msaa_samples {
|
||||||
|
MSAA_ONE = 0,
|
||||||
|
MSAA_TWO = 1,
|
||||||
|
MSAA_FOUR = 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum a3xx_threadmode {
|
||||||
|
MULTI = 0,
|
||||||
|
SINGLE = 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum a3xx_instrbuffermode {
|
||||||
|
BUFFER = 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum a3xx_threadsize {
|
||||||
|
TWO_QUADS = 0,
|
||||||
|
FOUR_QUADS = 1,
|
||||||
|
};
|
||||||
|
|
||||||
#define REG_AXXX_CP_RB_BASE 0x000001c0
|
#define REG_AXXX_CP_RB_BASE 0x000001c0
|
||||||
|
|
||||||
#define REG_AXXX_CP_RB_CNTL 0x000001c1
|
#define REG_AXXX_CP_RB_CNTL 0x000001c1
|
||||||
|
@@ -10,11 +10,11 @@ git clone https://github.com/freedreno/envytools.git
|
|||||||
The rules-ng-ng source files this header was generated from are:
|
The rules-ng-ng source files this header was generated from are:
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2013-11-30 14:47:15)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2013-11-30 14:47:15)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2013-03-31 16:51:27)
|
- /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2013-03-31 16:51:27)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32840 bytes, from 2014-01-05 14:44:21)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-06-02 15:21:30)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9009 bytes, from 2014-01-11 16:56:35)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9859 bytes, from 2014-06-02 15:21:30)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 12362 bytes, from 2014-01-07 14:47:36)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14477 bytes, from 2014-05-16 11:51:57)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 56545 bytes, from 2014-02-26 16:32:11)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 58020 bytes, from 2014-06-13 17:29:47)
|
||||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 8344 bytes, from 2013-11-30 14:49:47)
|
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26602 bytes, from 2014-06-13 17:28:10)
|
||||||
|
|
||||||
Copyright (C) 2013-2014 by the following authors:
|
Copyright (C) 2013-2014 by the following authors:
|
||||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||||
@@ -164,6 +164,11 @@ enum adreno_pm4_type3_packets {
|
|||||||
CP_SET_BIN = 76,
|
CP_SET_BIN = 76,
|
||||||
CP_TEST_TWO_MEMS = 113,
|
CP_TEST_TWO_MEMS = 113,
|
||||||
CP_WAIT_FOR_ME = 19,
|
CP_WAIT_FOR_ME = 19,
|
||||||
|
CP_SET_DRAW_STATE = 67,
|
||||||
|
CP_DRAW_INDX_OFFSET = 56,
|
||||||
|
CP_DRAW_INDIRECT = 40,
|
||||||
|
CP_DRAW_INDX_INDIRECT = 41,
|
||||||
|
CP_DRAW_AUTO = 36,
|
||||||
IN_IB_PREFETCH_END = 23,
|
IN_IB_PREFETCH_END = 23,
|
||||||
IN_SUBBLK_PREFETCH = 31,
|
IN_SUBBLK_PREFETCH = 31,
|
||||||
IN_INSTR_PREFETCH = 32,
|
IN_INSTR_PREFETCH = 32,
|
||||||
@@ -351,6 +356,93 @@ static inline uint32_t CP_DRAW_INDX_2_2_NUM_INDICES(uint32_t val)
|
|||||||
return ((val) << CP_DRAW_INDX_2_2_NUM_INDICES__SHIFT) & CP_DRAW_INDX_2_2_NUM_INDICES__MASK;
|
return ((val) << CP_DRAW_INDX_2_2_NUM_INDICES__SHIFT) & CP_DRAW_INDX_2_2_NUM_INDICES__MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define REG_CP_DRAW_INDX_OFFSET_0 0x00000000
|
||||||
|
#define CP_DRAW_INDX_OFFSET_0_PRIM_TYPE__MASK 0x0000003f
|
||||||
|
#define CP_DRAW_INDX_OFFSET_0_PRIM_TYPE__SHIFT 0
|
||||||
|
static inline uint32_t CP_DRAW_INDX_OFFSET_0_PRIM_TYPE(enum pc_di_primtype val)
|
||||||
|
{
|
||||||
|
return ((val) << CP_DRAW_INDX_OFFSET_0_PRIM_TYPE__SHIFT) & CP_DRAW_INDX_OFFSET_0_PRIM_TYPE__MASK;
|
||||||
|
}
|
||||||
|
#define CP_DRAW_INDX_OFFSET_0_SOURCE_SELECT__MASK 0x000000c0
|
||||||
|
#define CP_DRAW_INDX_OFFSET_0_SOURCE_SELECT__SHIFT 6
|
||||||
|
static inline uint32_t CP_DRAW_INDX_OFFSET_0_SOURCE_SELECT(enum pc_di_src_sel val)
|
||||||
|
{
|
||||||
|
return ((val) << CP_DRAW_INDX_OFFSET_0_SOURCE_SELECT__SHIFT) & CP_DRAW_INDX_OFFSET_0_SOURCE_SELECT__MASK;
|
||||||
|
}
|
||||||
|
#define CP_DRAW_INDX_OFFSET_0_VIS_CULL__MASK 0x00000700
|
||||||
|
#define CP_DRAW_INDX_OFFSET_0_VIS_CULL__SHIFT 8
|
||||||
|
static inline uint32_t CP_DRAW_INDX_OFFSET_0_VIS_CULL(enum pc_di_vis_cull_mode val)
|
||||||
|
{
|
||||||
|
return ((val) << CP_DRAW_INDX_OFFSET_0_VIS_CULL__SHIFT) & CP_DRAW_INDX_OFFSET_0_VIS_CULL__MASK;
|
||||||
|
}
|
||||||
|
#define CP_DRAW_INDX_OFFSET_0_INDEX_SIZE__MASK 0x00000800
|
||||||
|
#define CP_DRAW_INDX_OFFSET_0_INDEX_SIZE__SHIFT 11
|
||||||
|
static inline uint32_t CP_DRAW_INDX_OFFSET_0_INDEX_SIZE(enum pc_di_index_size val)
|
||||||
|
{
|
||||||
|
return ((val) << CP_DRAW_INDX_OFFSET_0_INDEX_SIZE__SHIFT) & CP_DRAW_INDX_OFFSET_0_INDEX_SIZE__MASK;
|
||||||
|
}
|
||||||
|
#define CP_DRAW_INDX_OFFSET_0_NOT_EOP 0x00001000
|
||||||
|
#define CP_DRAW_INDX_OFFSET_0_SMALL_INDEX 0x00002000
|
||||||
|
#define CP_DRAW_INDX_OFFSET_0_PRE_DRAW_INITIATOR_ENABLE 0x00004000
|
||||||
|
#define CP_DRAW_INDX_OFFSET_0_NUM_INDICES__MASK 0xffff0000
|
||||||
|
#define CP_DRAW_INDX_OFFSET_0_NUM_INDICES__SHIFT 16
|
||||||
|
static inline uint32_t CP_DRAW_INDX_OFFSET_0_NUM_INDICES(uint32_t val)
|
||||||
|
{
|
||||||
|
return ((val) << CP_DRAW_INDX_OFFSET_0_NUM_INDICES__SHIFT) & CP_DRAW_INDX_OFFSET_0_NUM_INDICES__MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define REG_CP_DRAW_INDX_OFFSET_1 0x00000001
|
||||||
|
|
||||||
|
#define REG_CP_DRAW_INDX_OFFSET_2 0x00000002
|
||||||
|
#define CP_DRAW_INDX_OFFSET_2_NUM_INDICES__MASK 0xffffffff
|
||||||
|
#define CP_DRAW_INDX_OFFSET_2_NUM_INDICES__SHIFT 0
|
||||||
|
static inline uint32_t CP_DRAW_INDX_OFFSET_2_NUM_INDICES(uint32_t val)
|
||||||
|
{
|
||||||
|
return ((val) << CP_DRAW_INDX_OFFSET_2_NUM_INDICES__SHIFT) & CP_DRAW_INDX_OFFSET_2_NUM_INDICES__MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define REG_CP_DRAW_INDX_OFFSET_2 0x00000002
|
||||||
|
#define CP_DRAW_INDX_OFFSET_2_INDX_BASE__MASK 0xffffffff
|
||||||
|
#define CP_DRAW_INDX_OFFSET_2_INDX_BASE__SHIFT 0
|
||||||
|
static inline uint32_t CP_DRAW_INDX_OFFSET_2_INDX_BASE(uint32_t val)
|
||||||
|
{
|
||||||
|
return ((val) << CP_DRAW_INDX_OFFSET_2_INDX_BASE__SHIFT) & CP_DRAW_INDX_OFFSET_2_INDX_BASE__MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define REG_CP_DRAW_INDX_OFFSET_2 0x00000002
|
||||||
|
#define CP_DRAW_INDX_OFFSET_2_INDX_SIZE__MASK 0xffffffff
|
||||||
|
#define CP_DRAW_INDX_OFFSET_2_INDX_SIZE__SHIFT 0
|
||||||
|
static inline uint32_t CP_DRAW_INDX_OFFSET_2_INDX_SIZE(uint32_t val)
|
||||||
|
{
|
||||||
|
return ((val) << CP_DRAW_INDX_OFFSET_2_INDX_SIZE__SHIFT) & CP_DRAW_INDX_OFFSET_2_INDX_SIZE__MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define REG_CP_SET_DRAW_STATE_0 0x00000000
|
||||||
|
#define CP_SET_DRAW_STATE_0_COUNT__MASK 0x0000ffff
|
||||||
|
#define CP_SET_DRAW_STATE_0_COUNT__SHIFT 0
|
||||||
|
static inline uint32_t CP_SET_DRAW_STATE_0_COUNT(uint32_t val)
|
||||||
|
{
|
||||||
|
return ((val) << CP_SET_DRAW_STATE_0_COUNT__SHIFT) & CP_SET_DRAW_STATE_0_COUNT__MASK;
|
||||||
|
}
|
||||||
|
#define CP_SET_DRAW_STATE_0_DIRTY 0x00010000
|
||||||
|
#define CP_SET_DRAW_STATE_0_DISABLE 0x00020000
|
||||||
|
#define CP_SET_DRAW_STATE_0_DISABLE_ALL_GROUPS 0x00040000
|
||||||
|
#define CP_SET_DRAW_STATE_0_LOAD_IMMED 0x00080000
|
||||||
|
#define CP_SET_DRAW_STATE_0_GROUP_ID__MASK 0x1f000000
|
||||||
|
#define CP_SET_DRAW_STATE_0_GROUP_ID__SHIFT 24
|
||||||
|
static inline uint32_t CP_SET_DRAW_STATE_0_GROUP_ID(uint32_t val)
|
||||||
|
{
|
||||||
|
return ((val) << CP_SET_DRAW_STATE_0_GROUP_ID__SHIFT) & CP_SET_DRAW_STATE_0_GROUP_ID__MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define REG_CP_SET_DRAW_STATE_1 0x00000001
|
||||||
|
#define CP_SET_DRAW_STATE_1_ADDR__MASK 0xffffffff
|
||||||
|
#define CP_SET_DRAW_STATE_1_ADDR__SHIFT 0
|
||||||
|
static inline uint32_t CP_SET_DRAW_STATE_1_ADDR(uint32_t val)
|
||||||
|
{
|
||||||
|
return ((val) << CP_SET_DRAW_STATE_1_ADDR__SHIFT) & CP_SET_DRAW_STATE_1_ADDR__MASK;
|
||||||
|
}
|
||||||
|
|
||||||
#define REG_CP_SET_BIN_0 0x00000000
|
#define REG_CP_SET_BIN_0 0x00000000
|
||||||
|
|
||||||
#define REG_CP_SET_BIN_1 0x00000001
|
#define REG_CP_SET_BIN_1 0x00000001
|
||||||
|
@@ -34,6 +34,7 @@
|
|||||||
#include "freedreno_state.h"
|
#include "freedreno_state.h"
|
||||||
#include "freedreno_gmem.h"
|
#include "freedreno_gmem.h"
|
||||||
#include "freedreno_query.h"
|
#include "freedreno_query.h"
|
||||||
|
#include "freedreno_query_hw.h"
|
||||||
#include "freedreno_util.h"
|
#include "freedreno_util.h"
|
||||||
|
|
||||||
static struct fd_ringbuffer *next_rb(struct fd_context *ctx)
|
static struct fd_ringbuffer *next_rb(struct fd_context *ctx)
|
||||||
@@ -145,6 +146,7 @@ fd_context_destroy(struct pipe_context *pctx)
|
|||||||
DBG("");
|
DBG("");
|
||||||
|
|
||||||
fd_prog_fini(pctx);
|
fd_prog_fini(pctx);
|
||||||
|
fd_hw_query_fini(pctx);
|
||||||
|
|
||||||
util_slab_destroy(&ctx->transfer_pool);
|
util_slab_destroy(&ctx->transfer_pool);
|
||||||
|
|
||||||
@@ -221,6 +223,7 @@ fd_context_init(struct fd_context *ctx, struct pipe_screen *pscreen,
|
|||||||
fd_query_context_init(pctx);
|
fd_query_context_init(pctx);
|
||||||
fd_texture_init(pctx);
|
fd_texture_init(pctx);
|
||||||
fd_state_init(pctx);
|
fd_state_init(pctx);
|
||||||
|
fd_hw_query_init(pctx);
|
||||||
|
|
||||||
ctx->blitter = util_blitter_create(pctx);
|
ctx->blitter = util_blitter_create(pctx);
|
||||||
if (!ctx->blitter)
|
if (!ctx->blitter)
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#include "pipe/p_context.h"
|
#include "pipe/p_context.h"
|
||||||
#include "indices/u_primconvert.h"
|
#include "indices/u_primconvert.h"
|
||||||
#include "util/u_blitter.h"
|
#include "util/u_blitter.h"
|
||||||
|
#include "util/u_double_list.h"
|
||||||
#include "util/u_slab.h"
|
#include "util/u_slab.h"
|
||||||
#include "util/u_string.h"
|
#include "util/u_string.h"
|
||||||
|
|
||||||
@@ -82,16 +83,80 @@ struct fd_vertex_stateobj {
|
|||||||
unsigned num_elements;
|
unsigned num_elements;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Bitmask of stages in rendering that a particular query query is
|
||||||
|
* active. Queries will be automatically started/stopped (generating
|
||||||
|
* additional fd_hw_sample_period's) on entrance/exit from stages that
|
||||||
|
* are applicable to the query.
|
||||||
|
*
|
||||||
|
* NOTE: set the stage to NULL at end of IB to ensure no query is still
|
||||||
|
* active. Things aren't going to work out the way you want if a query
|
||||||
|
* is active across IB's (or between tile IB and draw IB)
|
||||||
|
*/
|
||||||
|
enum fd_render_stage {
|
||||||
|
FD_STAGE_NULL = 0x00,
|
||||||
|
FD_STAGE_DRAW = 0x01,
|
||||||
|
FD_STAGE_CLEAR = 0x02,
|
||||||
|
/* TODO before queries which include MEM2GMEM or GMEM2MEM will
|
||||||
|
* work we will need to call fd_hw_query_prepare() from somewhere
|
||||||
|
* appropriate so that queries in the tiling IB get backed with
|
||||||
|
* memory to write results to.
|
||||||
|
*/
|
||||||
|
FD_STAGE_MEM2GMEM = 0x04,
|
||||||
|
FD_STAGE_GMEM2MEM = 0x08,
|
||||||
|
/* used for driver internal draws (ie. util_blitter_blit()): */
|
||||||
|
FD_STAGE_BLIT = 0x10,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define MAX_HW_SAMPLE_PROVIDERS 4
|
||||||
|
struct fd_hw_sample_provider;
|
||||||
|
struct fd_hw_sample;
|
||||||
|
|
||||||
struct fd_context {
|
struct fd_context {
|
||||||
struct pipe_context base;
|
struct pipe_context base;
|
||||||
|
|
||||||
struct fd_device *dev;
|
struct fd_device *dev;
|
||||||
struct fd_screen *screen;
|
struct fd_screen *screen;
|
||||||
|
|
||||||
struct blitter_context *blitter;
|
struct blitter_context *blitter;
|
||||||
struct primconvert_context *primconvert;
|
struct primconvert_context *primconvert;
|
||||||
|
|
||||||
|
/* slab for pipe_transfer allocations: */
|
||||||
struct util_slab_mempool transfer_pool;
|
struct util_slab_mempool transfer_pool;
|
||||||
|
|
||||||
|
/* slabs for fd_hw_sample and fd_hw_sample_period allocations: */
|
||||||
|
struct util_slab_mempool sample_pool;
|
||||||
|
struct util_slab_mempool sample_period_pool;
|
||||||
|
|
||||||
|
/* next sample offset.. incremented for each sample in the batch/
|
||||||
|
* submit, reset to zero on next submit.
|
||||||
|
*/
|
||||||
|
uint32_t next_sample_offset;
|
||||||
|
|
||||||
|
/* sample-providers for hw queries: */
|
||||||
|
const struct fd_hw_sample_provider *sample_providers[MAX_HW_SAMPLE_PROVIDERS];
|
||||||
|
|
||||||
|
/* cached samples (in case multiple queries need to reference
|
||||||
|
* the same sample snapshot)
|
||||||
|
*/
|
||||||
|
struct fd_hw_sample *sample_cache[MAX_HW_SAMPLE_PROVIDERS];
|
||||||
|
|
||||||
|
/* tracking for current stage, to know when to start/stop
|
||||||
|
* any active queries:
|
||||||
|
*/
|
||||||
|
enum fd_render_stage stage;
|
||||||
|
|
||||||
|
/* list of active queries: */
|
||||||
|
struct list_head active_queries;
|
||||||
|
|
||||||
|
/* list of queries that are not active, but were active in the
|
||||||
|
* current submit:
|
||||||
|
*/
|
||||||
|
struct list_head current_queries;
|
||||||
|
|
||||||
|
/* current query result bo and tile stride: */
|
||||||
|
struct fd_bo *query_bo;
|
||||||
|
uint32_t query_tile_stride;
|
||||||
|
|
||||||
/* table with PIPE_PRIM_MAX entries mapping PIPE_PRIM_x to
|
/* table with PIPE_PRIM_MAX entries mapping PIPE_PRIM_x to
|
||||||
* DI_PT_x value to use for draw initiator. There are some
|
* DI_PT_x value to use for draw initiator. There are some
|
||||||
* slight differences between generation:
|
* slight differences between generation:
|
||||||
|
@@ -36,6 +36,7 @@
|
|||||||
#include "freedreno_context.h"
|
#include "freedreno_context.h"
|
||||||
#include "freedreno_state.h"
|
#include "freedreno_state.h"
|
||||||
#include "freedreno_resource.h"
|
#include "freedreno_resource.h"
|
||||||
|
#include "freedreno_query_hw.h"
|
||||||
#include "freedreno_util.h"
|
#include "freedreno_util.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -70,7 +71,7 @@ fd_draw_emit(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
|||||||
idx_bo = fd_resource(idx->buffer)->bo;
|
idx_bo = fd_resource(idx->buffer)->bo;
|
||||||
idx_type = size2indextype(idx->index_size);
|
idx_type = size2indextype(idx->index_size);
|
||||||
idx_size = idx->index_size * info->count;
|
idx_size = idx->index_size * info->count;
|
||||||
idx_offset = idx->offset;
|
idx_offset = idx->offset + (info->start * idx->index_size);
|
||||||
src_sel = DI_SRC_SEL_DMA;
|
src_sel = DI_SRC_SEL_DMA;
|
||||||
} else {
|
} else {
|
||||||
idx_bo = NULL;
|
idx_bo = NULL;
|
||||||
@@ -156,6 +157,7 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
|
|||||||
/* and any buffers used, need to be resolved: */
|
/* and any buffers used, need to be resolved: */
|
||||||
ctx->resolve |= buffers;
|
ctx->resolve |= buffers;
|
||||||
|
|
||||||
|
fd_hw_query_set_stage(ctx, ctx->ring, FD_STAGE_DRAW);
|
||||||
ctx->draw(ctx, info);
|
ctx->draw(ctx, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,6 +190,8 @@ fd_clear(struct pipe_context *pctx, unsigned buffers,
|
|||||||
util_format_short_name(pipe_surface_format(pfb->cbufs[0])),
|
util_format_short_name(pipe_surface_format(pfb->cbufs[0])),
|
||||||
util_format_short_name(pipe_surface_format(pfb->zsbuf)));
|
util_format_short_name(pipe_surface_format(pfb->zsbuf)));
|
||||||
|
|
||||||
|
fd_hw_query_set_stage(ctx, ctx->ring, FD_STAGE_CLEAR);
|
||||||
|
|
||||||
ctx->clear(ctx, buffers, color, depth, stencil);
|
ctx->clear(ctx, buffers, color, depth, stencil);
|
||||||
|
|
||||||
ctx->dirty |= FD_DIRTY_ZSA |
|
ctx->dirty |= FD_DIRTY_ZSA |
|
||||||
|
@@ -35,6 +35,7 @@
|
|||||||
#include "freedreno_gmem.h"
|
#include "freedreno_gmem.h"
|
||||||
#include "freedreno_context.h"
|
#include "freedreno_context.h"
|
||||||
#include "freedreno_resource.h"
|
#include "freedreno_resource.h"
|
||||||
|
#include "freedreno_query_hw.h"
|
||||||
#include "freedreno_util.h"
|
#include "freedreno_util.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -273,17 +274,24 @@ render_tiles(struct fd_context *ctx)
|
|||||||
|
|
||||||
ctx->emit_tile_prep(ctx, tile);
|
ctx->emit_tile_prep(ctx, tile);
|
||||||
|
|
||||||
if (ctx->restore)
|
if (ctx->restore) {
|
||||||
|
fd_hw_query_set_stage(ctx, ctx->ring, FD_STAGE_MEM2GMEM);
|
||||||
ctx->emit_tile_mem2gmem(ctx, tile);
|
ctx->emit_tile_mem2gmem(ctx, tile);
|
||||||
|
fd_hw_query_set_stage(ctx, ctx->ring, FD_STAGE_NULL);
|
||||||
|
}
|
||||||
|
|
||||||
ctx->emit_tile_renderprep(ctx, tile);
|
ctx->emit_tile_renderprep(ctx, tile);
|
||||||
|
|
||||||
|
fd_hw_query_prepare_tile(ctx, i, ctx->ring);
|
||||||
|
|
||||||
/* emit IB to drawcmds: */
|
/* emit IB to drawcmds: */
|
||||||
OUT_IB(ctx->ring, ctx->draw_start, ctx->draw_end);
|
OUT_IB(ctx->ring, ctx->draw_start, ctx->draw_end);
|
||||||
fd_reset_wfi(ctx);
|
fd_reset_wfi(ctx);
|
||||||
|
|
||||||
/* emit gmem2mem to transfer tile back to system memory: */
|
/* emit gmem2mem to transfer tile back to system memory: */
|
||||||
|
fd_hw_query_set_stage(ctx, ctx->ring, FD_STAGE_GMEM2MEM);
|
||||||
ctx->emit_tile_gmem2mem(ctx, tile);
|
ctx->emit_tile_gmem2mem(ctx, tile);
|
||||||
|
fd_hw_query_set_stage(ctx, ctx->ring, FD_STAGE_NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,6 +300,8 @@ render_sysmem(struct fd_context *ctx)
|
|||||||
{
|
{
|
||||||
ctx->emit_sysmem_prep(ctx);
|
ctx->emit_sysmem_prep(ctx);
|
||||||
|
|
||||||
|
fd_hw_query_prepare_tile(ctx, 0, ctx->ring);
|
||||||
|
|
||||||
/* emit IB to drawcmds: */
|
/* emit IB to drawcmds: */
|
||||||
OUT_IB(ctx->ring, ctx->draw_start, ctx->draw_end);
|
OUT_IB(ctx->ring, ctx->draw_start, ctx->draw_end);
|
||||||
fd_reset_wfi(ctx);
|
fd_reset_wfi(ctx);
|
||||||
@@ -314,6 +324,11 @@ fd_gmem_render_tiles(struct pipe_context *pctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* close out the draw cmds by making sure any active queries are
|
||||||
|
* paused:
|
||||||
|
*/
|
||||||
|
fd_hw_query_set_stage(ctx, ctx->ring, FD_STAGE_NULL);
|
||||||
|
|
||||||
/* mark the end of the clear/draw cmds before emitting per-tile cmds: */
|
/* mark the end of the clear/draw cmds before emitting per-tile cmds: */
|
||||||
fd_ringmarker_mark(ctx->draw_end);
|
fd_ringmarker_mark(ctx->draw_end);
|
||||||
fd_ringmarker_mark(ctx->binning_end);
|
fd_ringmarker_mark(ctx->binning_end);
|
||||||
@@ -326,6 +341,7 @@ fd_gmem_render_tiles(struct pipe_context *pctx)
|
|||||||
DBG("rendering sysmem (%s/%s)",
|
DBG("rendering sysmem (%s/%s)",
|
||||||
util_format_short_name(pipe_surface_format(pfb->cbufs[0])),
|
util_format_short_name(pipe_surface_format(pfb->cbufs[0])),
|
||||||
util_format_short_name(pipe_surface_format(pfb->zsbuf)));
|
util_format_short_name(pipe_surface_format(pfb->zsbuf)));
|
||||||
|
fd_hw_query_prepare(ctx, 1);
|
||||||
render_sysmem(ctx);
|
render_sysmem(ctx);
|
||||||
ctx->stats.batch_sysmem++;
|
ctx->stats.batch_sysmem++;
|
||||||
} else {
|
} else {
|
||||||
@@ -334,6 +350,7 @@ fd_gmem_render_tiles(struct pipe_context *pctx)
|
|||||||
DBG("rendering %dx%d tiles (%s/%s)", gmem->nbins_x, gmem->nbins_y,
|
DBG("rendering %dx%d tiles (%s/%s)", gmem->nbins_x, gmem->nbins_y,
|
||||||
util_format_short_name(pipe_surface_format(pfb->cbufs[0])),
|
util_format_short_name(pipe_surface_format(pfb->cbufs[0])),
|
||||||
util_format_short_name(pipe_surface_format(pfb->zsbuf)));
|
util_format_short_name(pipe_surface_format(pfb->zsbuf)));
|
||||||
|
fd_hw_query_prepare(ctx, gmem->nbins_x * gmem->nbins_y);
|
||||||
render_tiles(ctx);
|
render_tiles(ctx);
|
||||||
ctx->stats.batch_gmem++;
|
ctx->stats.batch_gmem++;
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/* -*- mode: C; c-file-style: "k&r"; ttxab-width 4; indent-tabs-mode: t; -*- */
|
/* -*- mode: C; c-file-style: "k&r"; ttxab-width 4; indent-tabs-mode: t; -*- */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2012 Rob Clark <robclark@freedesktop.org>
|
* Copyright (C) 2013 Rob Clark <robclark@freedesktop.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -27,63 +27,27 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pipe/p_state.h"
|
#include "pipe/p_state.h"
|
||||||
#include "util/u_string.h"
|
|
||||||
#include "util/u_memory.h"
|
#include "util/u_memory.h"
|
||||||
#include "util/u_inlines.h"
|
|
||||||
#include "os/os_time.h"
|
|
||||||
|
|
||||||
#include "freedreno_query.h"
|
#include "freedreno_query.h"
|
||||||
|
#include "freedreno_query_sw.h"
|
||||||
|
#include "freedreno_query_hw.h"
|
||||||
#include "freedreno_context.h"
|
#include "freedreno_context.h"
|
||||||
#include "freedreno_util.h"
|
#include "freedreno_util.h"
|
||||||
|
|
||||||
#define FD_QUERY_DRAW_CALLS (PIPE_QUERY_DRIVER_SPECIFIC + 0)
|
/*
|
||||||
#define FD_QUERY_BATCH_TOTAL (PIPE_QUERY_DRIVER_SPECIFIC + 1) /* total # of batches (submits) */
|
* Pipe Query interface:
|
||||||
#define FD_QUERY_BATCH_SYSMEM (PIPE_QUERY_DRIVER_SPECIFIC + 2) /* batches using system memory (GMEM bypass) */
|
|
||||||
#define FD_QUERY_BATCH_GMEM (PIPE_QUERY_DRIVER_SPECIFIC + 3) /* batches using GMEM */
|
|
||||||
#define FD_QUERY_BATCH_RESTORE (PIPE_QUERY_DRIVER_SPECIFIC + 4) /* batches requiring GMEM restore */
|
|
||||||
|
|
||||||
/* Currently just simple cpu query's supported.. probably need
|
|
||||||
* to refactor this a bit when I'm eventually ready to add gpu
|
|
||||||
* queries:
|
|
||||||
*/
|
*/
|
||||||
struct fd_query {
|
|
||||||
int type;
|
|
||||||
/* storage for the collected data */
|
|
||||||
union pipe_query_result data;
|
|
||||||
bool active;
|
|
||||||
uint64_t begin_value, end_value;
|
|
||||||
uint64_t begin_time, end_time;
|
|
||||||
};
|
|
||||||
|
|
||||||
static inline struct fd_query *
|
|
||||||
fd_query(struct pipe_query *pq)
|
|
||||||
{
|
|
||||||
return (struct fd_query *)pq;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct pipe_query *
|
static struct pipe_query *
|
||||||
fd_create_query(struct pipe_context *pctx, unsigned query_type)
|
fd_create_query(struct pipe_context *pctx, unsigned query_type)
|
||||||
{
|
{
|
||||||
|
struct fd_context *ctx = fd_context(pctx);
|
||||||
struct fd_query *q;
|
struct fd_query *q;
|
||||||
|
|
||||||
switch (query_type) {
|
q = fd_sw_create_query(ctx, query_type);
|
||||||
case PIPE_QUERY_PRIMITIVES_GENERATED:
|
|
||||||
case PIPE_QUERY_PRIMITIVES_EMITTED:
|
|
||||||
case FD_QUERY_DRAW_CALLS:
|
|
||||||
case FD_QUERY_BATCH_TOTAL:
|
|
||||||
case FD_QUERY_BATCH_SYSMEM:
|
|
||||||
case FD_QUERY_BATCH_GMEM:
|
|
||||||
case FD_QUERY_BATCH_RESTORE:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
q = CALLOC_STRUCT(fd_query);
|
|
||||||
if (!q)
|
if (!q)
|
||||||
return NULL;
|
q = fd_hw_create_query(ctx, query_type);
|
||||||
|
|
||||||
q->type = query_type;
|
|
||||||
|
|
||||||
return (struct pipe_query *) q;
|
return (struct pipe_query *) q;
|
||||||
}
|
}
|
||||||
@@ -92,64 +56,21 @@ static void
|
|||||||
fd_destroy_query(struct pipe_context *pctx, struct pipe_query *pq)
|
fd_destroy_query(struct pipe_context *pctx, struct pipe_query *pq)
|
||||||
{
|
{
|
||||||
struct fd_query *q = fd_query(pq);
|
struct fd_query *q = fd_query(pq);
|
||||||
free(q);
|
q->funcs->destroy_query(fd_context(pctx), q);
|
||||||
}
|
|
||||||
|
|
||||||
static uint64_t
|
|
||||||
read_counter(struct pipe_context *pctx, int type)
|
|
||||||
{
|
|
||||||
struct fd_context *ctx = fd_context(pctx);
|
|
||||||
switch (type) {
|
|
||||||
case PIPE_QUERY_PRIMITIVES_GENERATED:
|
|
||||||
/* for now same thing as _PRIMITIVES_EMITTED */
|
|
||||||
case PIPE_QUERY_PRIMITIVES_EMITTED:
|
|
||||||
return ctx->stats.prims_emitted;
|
|
||||||
case FD_QUERY_DRAW_CALLS:
|
|
||||||
return ctx->stats.draw_calls;
|
|
||||||
case FD_QUERY_BATCH_TOTAL:
|
|
||||||
return ctx->stats.batch_total;
|
|
||||||
case FD_QUERY_BATCH_SYSMEM:
|
|
||||||
return ctx->stats.batch_sysmem;
|
|
||||||
case FD_QUERY_BATCH_GMEM:
|
|
||||||
return ctx->stats.batch_gmem;
|
|
||||||
case FD_QUERY_BATCH_RESTORE:
|
|
||||||
return ctx->stats.batch_restore;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool
|
|
||||||
is_rate_query(struct fd_query *q)
|
|
||||||
{
|
|
||||||
switch (q->type) {
|
|
||||||
case FD_QUERY_BATCH_TOTAL:
|
|
||||||
case FD_QUERY_BATCH_SYSMEM:
|
|
||||||
case FD_QUERY_BATCH_GMEM:
|
|
||||||
case FD_QUERY_BATCH_RESTORE:
|
|
||||||
return true;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fd_begin_query(struct pipe_context *pctx, struct pipe_query *pq)
|
fd_begin_query(struct pipe_context *pctx, struct pipe_query *pq)
|
||||||
{
|
{
|
||||||
struct fd_query *q = fd_query(pq);
|
struct fd_query *q = fd_query(pq);
|
||||||
q->active = true;
|
q->funcs->begin_query(fd_context(pctx), q);
|
||||||
q->begin_value = read_counter(pctx, q->type);
|
|
||||||
if (is_rate_query(q))
|
|
||||||
q->begin_time = os_time_get();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fd_end_query(struct pipe_context *pctx, struct pipe_query *pq)
|
fd_end_query(struct pipe_context *pctx, struct pipe_query *pq)
|
||||||
{
|
{
|
||||||
struct fd_query *q = fd_query(pq);
|
struct fd_query *q = fd_query(pq);
|
||||||
q->active = false;
|
q->funcs->end_query(fd_context(pctx), q);
|
||||||
q->end_value = read_counter(pctx, q->type);
|
|
||||||
if (is_rate_query(q))
|
|
||||||
q->end_time = os_time_get();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static boolean
|
||||||
@@ -157,21 +78,7 @@ fd_get_query_result(struct pipe_context *pctx, struct pipe_query *pq,
|
|||||||
boolean wait, union pipe_query_result *result)
|
boolean wait, union pipe_query_result *result)
|
||||||
{
|
{
|
||||||
struct fd_query *q = fd_query(pq);
|
struct fd_query *q = fd_query(pq);
|
||||||
|
return q->funcs->get_query_result(fd_context(pctx), q, wait, result);
|
||||||
if (q->active)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
util_query_clear_result(result, q->type);
|
|
||||||
|
|
||||||
result->u64 = q->end_value - q->begin_value;
|
|
||||||
|
|
||||||
if (is_rate_query(q)) {
|
|
||||||
double fps = (result->u64 * 1000000) /
|
|
||||||
(double)(q->end_time - q->begin_time);
|
|
||||||
result->u64 = (uint64_t)fps;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/* -*- mode: C; c-file-style: "k&r"; tab-width 4; indent-tabs-mode: t; -*- */
|
/* -*- mode: C; c-file-style: "k&r"; tab-width 4; indent-tabs-mode: t; -*- */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2012 Rob Clark <robclark@freedesktop.org>
|
* Copyright (C) 2013 Rob Clark <robclark@freedesktop.org>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -31,6 +31,37 @@
|
|||||||
|
|
||||||
#include "pipe/p_context.h"
|
#include "pipe/p_context.h"
|
||||||
|
|
||||||
|
struct fd_context;
|
||||||
|
struct fd_query;
|
||||||
|
|
||||||
|
struct fd_query_funcs {
|
||||||
|
void (*destroy_query)(struct fd_context *ctx,
|
||||||
|
struct fd_query *q);
|
||||||
|
void (*begin_query)(struct fd_context *ctx, struct fd_query *q);
|
||||||
|
void (*end_query)(struct fd_context *ctx, struct fd_query *q);
|
||||||
|
boolean (*get_query_result)(struct fd_context *ctx,
|
||||||
|
struct fd_query *q, boolean wait,
|
||||||
|
union pipe_query_result *result);
|
||||||
|
};
|
||||||
|
|
||||||
|
struct fd_query {
|
||||||
|
const struct fd_query_funcs *funcs;
|
||||||
|
bool active;
|
||||||
|
int type;
|
||||||
|
};
|
||||||
|
|
||||||
|
static inline struct fd_query *
|
||||||
|
fd_query(struct pipe_query *pq)
|
||||||
|
{
|
||||||
|
return (struct fd_query *)pq;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define FD_QUERY_DRAW_CALLS (PIPE_QUERY_DRIVER_SPECIFIC + 0)
|
||||||
|
#define FD_QUERY_BATCH_TOTAL (PIPE_QUERY_DRIVER_SPECIFIC + 1) /* total # of batches (submits) */
|
||||||
|
#define FD_QUERY_BATCH_SYSMEM (PIPE_QUERY_DRIVER_SPECIFIC + 2) /* batches using system memory (GMEM bypass) */
|
||||||
|
#define FD_QUERY_BATCH_GMEM (PIPE_QUERY_DRIVER_SPECIFIC + 3) /* batches using GMEM */
|
||||||
|
#define FD_QUERY_BATCH_RESTORE (PIPE_QUERY_DRIVER_SPECIFIC + 4) /* batches requiring GMEM restore */
|
||||||
|
|
||||||
void fd_query_screen_init(struct pipe_screen *pscreen);
|
void fd_query_screen_init(struct pipe_screen *pscreen);
|
||||||
void fd_query_context_init(struct pipe_context *pctx);
|
void fd_query_context_init(struct pipe_context *pctx);
|
||||||
|
|
||||||
|
465
src/gallium/drivers/freedreno/freedreno_query_hw.c
Normal file
465
src/gallium/drivers/freedreno/freedreno_query_hw.c
Normal file
@@ -0,0 +1,465 @@
|
|||||||
|
/* -*- mode: C; c-file-style: "k&r"; tab-width 4; indent-tabs-mode: t; -*- */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2014 Rob Clark <robclark@freedesktop.org>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* Authors:
|
||||||
|
* Rob Clark <robclark@freedesktop.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "pipe/p_state.h"
|
||||||
|
#include "util/u_memory.h"
|
||||||
|
#include "util/u_inlines.h"
|
||||||
|
|
||||||
|
#include "freedreno_query_hw.h"
|
||||||
|
#include "freedreno_context.h"
|
||||||
|
#include "freedreno_util.h"
|
||||||
|
|
||||||
|
struct fd_hw_sample_period {
|
||||||
|
struct fd_hw_sample *start, *end;
|
||||||
|
struct list_head list;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* maps query_type to sample provider idx: */
|
||||||
|
static int pidx(unsigned query_type)
|
||||||
|
{
|
||||||
|
switch (query_type) {
|
||||||
|
case PIPE_QUERY_OCCLUSION_COUNTER:
|
||||||
|
return 0;
|
||||||
|
case PIPE_QUERY_OCCLUSION_PREDICATE:
|
||||||
|
return 1;
|
||||||
|
default:
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct fd_hw_sample *
|
||||||
|
get_sample(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||||
|
unsigned query_type)
|
||||||
|
{
|
||||||
|
struct fd_hw_sample *samp = NULL;
|
||||||
|
int idx = pidx(query_type);
|
||||||
|
|
||||||
|
if (!ctx->sample_cache[idx]) {
|
||||||
|
ctx->sample_cache[idx] =
|
||||||
|
ctx->sample_providers[idx]->get_sample(ctx, ring);
|
||||||
|
}
|
||||||
|
|
||||||
|
fd_hw_sample_reference(ctx, &samp, ctx->sample_cache[idx]);
|
||||||
|
|
||||||
|
return samp;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
clear_sample_cache(struct fd_context *ctx)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(ctx->sample_cache); i++)
|
||||||
|
fd_hw_sample_reference(ctx, &ctx->sample_cache[i], NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool
|
||||||
|
is_active(struct fd_hw_query *hq, enum fd_render_stage stage)
|
||||||
|
{
|
||||||
|
return !!(hq->provider->active & stage);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
resume_query(struct fd_context *ctx, struct fd_hw_query *hq,
|
||||||
|
struct fd_ringbuffer *ring)
|
||||||
|
{
|
||||||
|
assert(!hq->period);
|
||||||
|
hq->period = util_slab_alloc(&ctx->sample_period_pool);
|
||||||
|
list_inithead(&hq->period->list);
|
||||||
|
hq->period->start = get_sample(ctx, ring, hq->base.type);
|
||||||
|
/* NOTE: util_slab_alloc() does not zero out the buffer: */
|
||||||
|
hq->period->end = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
pause_query(struct fd_context *ctx, struct fd_hw_query *hq,
|
||||||
|
struct fd_ringbuffer *ring)
|
||||||
|
{
|
||||||
|
assert(hq->period && !hq->period->end);
|
||||||
|
hq->period->end = get_sample(ctx, ring, hq->base.type);
|
||||||
|
list_addtail(&hq->period->list, &hq->current_periods);
|
||||||
|
hq->period = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
destroy_periods(struct fd_context *ctx, struct list_head *list)
|
||||||
|
{
|
||||||
|
struct fd_hw_sample_period *period, *s;
|
||||||
|
LIST_FOR_EACH_ENTRY_SAFE(period, s, list, list) {
|
||||||
|
fd_hw_sample_reference(ctx, &period->start, NULL);
|
||||||
|
fd_hw_sample_reference(ctx, &period->end, NULL);
|
||||||
|
list_del(&period->list);
|
||||||
|
util_slab_free(&ctx->sample_period_pool, period);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
fd_hw_destroy_query(struct fd_context *ctx, struct fd_query *q)
|
||||||
|
{
|
||||||
|
struct fd_hw_query *hq = fd_hw_query(q);
|
||||||
|
|
||||||
|
destroy_periods(ctx, &hq->periods);
|
||||||
|
destroy_periods(ctx, &hq->current_periods);
|
||||||
|
list_del(&hq->list);
|
||||||
|
|
||||||
|
free(hq);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
fd_hw_begin_query(struct fd_context *ctx, struct fd_query *q)
|
||||||
|
{
|
||||||
|
struct fd_hw_query *hq = fd_hw_query(q);
|
||||||
|
if (q->active)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* begin_query() should clear previous results: */
|
||||||
|
destroy_periods(ctx, &hq->periods);
|
||||||
|
|
||||||
|
if (is_active(hq, ctx->stage))
|
||||||
|
resume_query(ctx, hq, ctx->ring);
|
||||||
|
|
||||||
|
q->active = true;
|
||||||
|
|
||||||
|
/* add to active list: */
|
||||||
|
list_del(&hq->list);
|
||||||
|
list_addtail(&hq->list, &ctx->active_queries);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
fd_hw_end_query(struct fd_context *ctx, struct fd_query *q)
|
||||||
|
{
|
||||||
|
struct fd_hw_query *hq = fd_hw_query(q);
|
||||||
|
if (!q->active)
|
||||||
|
return;
|
||||||
|
if (is_active(hq, ctx->stage))
|
||||||
|
pause_query(ctx, hq, ctx->ring);
|
||||||
|
q->active = false;
|
||||||
|
/* move to current list: */
|
||||||
|
list_del(&hq->list);
|
||||||
|
list_addtail(&hq->list, &ctx->current_queries);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* helper to get ptr to specified sample: */
|
||||||
|
static void * sampptr(struct fd_hw_sample *samp, uint32_t n, void *ptr)
|
||||||
|
{
|
||||||
|
return ((char *)ptr) + (samp->tile_stride * n) + samp->offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
static boolean
|
||||||
|
fd_hw_get_query_result(struct fd_context *ctx, struct fd_query *q,
|
||||||
|
boolean wait, union pipe_query_result *result)
|
||||||
|
{
|
||||||
|
struct fd_hw_query *hq = fd_hw_query(q);
|
||||||
|
const struct fd_hw_sample_provider *p = hq->provider;
|
||||||
|
struct fd_hw_sample_period *period;
|
||||||
|
|
||||||
|
if (q->active)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/* if the app tries to read back the query result before the
|
||||||
|
* back is submitted, that forces us to flush so that there
|
||||||
|
* are actually results to wait for:
|
||||||
|
*/
|
||||||
|
if (!LIST_IS_EMPTY(&hq->list)) {
|
||||||
|
DBG("reading query result forces flush!");
|
||||||
|
ctx->needs_flush = true;
|
||||||
|
fd_context_render(&ctx->base);
|
||||||
|
}
|
||||||
|
|
||||||
|
util_query_clear_result(result, q->type);
|
||||||
|
|
||||||
|
if (LIST_IS_EMPTY(&hq->periods))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
assert(LIST_IS_EMPTY(&hq->list));
|
||||||
|
assert(LIST_IS_EMPTY(&hq->current_periods));
|
||||||
|
assert(!hq->period);
|
||||||
|
|
||||||
|
if (LIST_IS_EMPTY(&hq->periods))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
/* if !wait, then check the last sample (the one most likely to
|
||||||
|
* not be ready yet) and bail if it is not ready:
|
||||||
|
*/
|
||||||
|
if (!wait) {
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
period = LIST_ENTRY(struct fd_hw_sample_period,
|
||||||
|
hq->periods.prev, list);
|
||||||
|
|
||||||
|
ret = fd_bo_cpu_prep(period->end->bo, ctx->screen->pipe,
|
||||||
|
DRM_FREEDRENO_PREP_READ | DRM_FREEDRENO_PREP_NOSYNC);
|
||||||
|
if (ret)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
fd_bo_cpu_fini(period->end->bo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* sum the result across all sample periods: */
|
||||||
|
LIST_FOR_EACH_ENTRY(period, &hq->periods, list) {
|
||||||
|
struct fd_hw_sample *start = period->start;
|
||||||
|
struct fd_hw_sample *end = period->end;
|
||||||
|
unsigned i;
|
||||||
|
|
||||||
|
/* start and end samples should be from same batch: */
|
||||||
|
assert(start->bo == end->bo);
|
||||||
|
assert(start->num_tiles == end->num_tiles);
|
||||||
|
|
||||||
|
for (i = 0; i < start->num_tiles; i++) {
|
||||||
|
void *ptr;
|
||||||
|
|
||||||
|
fd_bo_cpu_prep(start->bo, ctx->screen->pipe,
|
||||||
|
DRM_FREEDRENO_PREP_READ);
|
||||||
|
|
||||||
|
ptr = fd_bo_map(start->bo);
|
||||||
|
|
||||||
|
p->accumulate_result(ctx, sampptr(period->start, i, ptr),
|
||||||
|
sampptr(period->end, i, ptr), result);
|
||||||
|
|
||||||
|
fd_bo_cpu_fini(start->bo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct fd_query_funcs hw_query_funcs = {
|
||||||
|
.destroy_query = fd_hw_destroy_query,
|
||||||
|
.begin_query = fd_hw_begin_query,
|
||||||
|
.end_query = fd_hw_end_query,
|
||||||
|
.get_query_result = fd_hw_get_query_result,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct fd_query *
|
||||||
|
fd_hw_create_query(struct fd_context *ctx, unsigned query_type)
|
||||||
|
{
|
||||||
|
struct fd_hw_query *hq;
|
||||||
|
struct fd_query *q;
|
||||||
|
int idx = pidx(query_type);
|
||||||
|
|
||||||
|
if ((idx < 0) || !ctx->sample_providers[idx])
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
hq = CALLOC_STRUCT(fd_hw_query);
|
||||||
|
if (!hq)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
hq->provider = ctx->sample_providers[idx];
|
||||||
|
|
||||||
|
list_inithead(&hq->periods);
|
||||||
|
list_inithead(&hq->current_periods);
|
||||||
|
list_inithead(&hq->list);
|
||||||
|
|
||||||
|
q = &hq->base;
|
||||||
|
q->funcs = &hw_query_funcs;
|
||||||
|
q->type = query_type;
|
||||||
|
|
||||||
|
return q;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct fd_hw_sample *
|
||||||
|
fd_hw_sample_init(struct fd_context *ctx, uint32_t size)
|
||||||
|
{
|
||||||
|
struct fd_hw_sample *samp = util_slab_alloc(&ctx->sample_pool);
|
||||||
|
pipe_reference_init(&samp->reference, 1);
|
||||||
|
samp->size = size;
|
||||||
|
samp->offset = ctx->next_sample_offset;
|
||||||
|
/* NOTE: util_slab_alloc() does not zero out the buffer: */
|
||||||
|
samp->bo = NULL;
|
||||||
|
samp->num_tiles = 0;
|
||||||
|
samp->tile_stride = 0;
|
||||||
|
ctx->next_sample_offset += size;
|
||||||
|
return samp;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
__fd_hw_sample_destroy(struct fd_context *ctx, struct fd_hw_sample *samp)
|
||||||
|
{
|
||||||
|
if (samp->bo)
|
||||||
|
fd_bo_del(samp->bo);
|
||||||
|
util_slab_free(&ctx->sample_pool, samp);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
prepare_sample(struct fd_hw_sample *samp, struct fd_bo *bo,
|
||||||
|
uint32_t num_tiles, uint32_t tile_stride)
|
||||||
|
{
|
||||||
|
if (samp->bo) {
|
||||||
|
assert(samp->bo == bo);
|
||||||
|
assert(samp->num_tiles == num_tiles);
|
||||||
|
assert(samp->tile_stride == tile_stride);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
samp->bo = bo;
|
||||||
|
samp->num_tiles = num_tiles;
|
||||||
|
samp->tile_stride = tile_stride;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
prepare_query(struct fd_hw_query *hq, struct fd_bo *bo,
|
||||||
|
uint32_t num_tiles, uint32_t tile_stride)
|
||||||
|
{
|
||||||
|
struct fd_hw_sample_period *period, *s;
|
||||||
|
|
||||||
|
/* prepare all the samples in the query: */
|
||||||
|
LIST_FOR_EACH_ENTRY_SAFE(period, s, &hq->current_periods, list) {
|
||||||
|
prepare_sample(period->start, bo, num_tiles, tile_stride);
|
||||||
|
prepare_sample(period->end, bo, num_tiles, tile_stride);
|
||||||
|
|
||||||
|
/* move from current_periods list to periods list: */
|
||||||
|
list_del(&period->list);
|
||||||
|
list_addtail(&period->list, &hq->periods);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
prepare_queries(struct fd_context *ctx, struct fd_bo *bo,
|
||||||
|
uint32_t num_tiles, uint32_t tile_stride,
|
||||||
|
struct list_head *list, bool remove)
|
||||||
|
{
|
||||||
|
struct fd_hw_query *hq, *s;
|
||||||
|
LIST_FOR_EACH_ENTRY_SAFE(hq, s, list, list) {
|
||||||
|
prepare_query(hq, bo, num_tiles, tile_stride);
|
||||||
|
if (remove)
|
||||||
|
list_delinit(&hq->list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* called from gmem code once total storage requirements are known (ie.
|
||||||
|
* number of samples times number of tiles)
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
fd_hw_query_prepare(struct fd_context *ctx, uint32_t num_tiles)
|
||||||
|
{
|
||||||
|
uint32_t tile_stride = ctx->next_sample_offset;
|
||||||
|
struct fd_bo *bo;
|
||||||
|
|
||||||
|
if (ctx->query_bo)
|
||||||
|
fd_bo_del(ctx->query_bo);
|
||||||
|
|
||||||
|
if (tile_stride > 0) {
|
||||||
|
bo = fd_bo_new(ctx->dev, tile_stride * num_tiles,
|
||||||
|
DRM_FREEDRENO_GEM_CACHE_WCOMBINE |
|
||||||
|
DRM_FREEDRENO_GEM_TYPE_KMEM);
|
||||||
|
} else {
|
||||||
|
bo = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx->query_bo = bo;
|
||||||
|
ctx->query_tile_stride = tile_stride;
|
||||||
|
|
||||||
|
prepare_queries(ctx, bo, num_tiles, tile_stride,
|
||||||
|
&ctx->active_queries, false);
|
||||||
|
prepare_queries(ctx, bo, num_tiles, tile_stride,
|
||||||
|
&ctx->current_queries, true);
|
||||||
|
|
||||||
|
/* reset things for next batch: */
|
||||||
|
ctx->next_sample_offset = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
fd_hw_query_prepare_tile(struct fd_context *ctx, uint32_t n,
|
||||||
|
struct fd_ringbuffer *ring)
|
||||||
|
{
|
||||||
|
uint32_t tile_stride = ctx->query_tile_stride;
|
||||||
|
uint32_t offset = tile_stride * n;
|
||||||
|
|
||||||
|
/* bail if no queries: */
|
||||||
|
if (tile_stride == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
fd_wfi(ctx, ring);
|
||||||
|
OUT_PKT0 (ring, HW_QUERY_BASE_REG, 1);
|
||||||
|
OUT_RELOCW(ring, ctx->query_bo, offset, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
fd_hw_query_set_stage(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||||
|
enum fd_render_stage stage)
|
||||||
|
{
|
||||||
|
/* special case: internal blits (like mipmap level generation)
|
||||||
|
* go through normal draw path (via util_blitter_blit()).. but
|
||||||
|
* we need to ignore the FD_STAGE_DRAW which will be set, so we
|
||||||
|
* don't enable queries which should be paused during internal
|
||||||
|
* blits:
|
||||||
|
*/
|
||||||
|
if ((ctx->stage == FD_STAGE_BLIT) &&
|
||||||
|
(stage != FD_STAGE_NULL))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (stage != ctx->stage) {
|
||||||
|
struct fd_hw_query *hq;
|
||||||
|
LIST_FOR_EACH_ENTRY(hq, &ctx->active_queries, list) {
|
||||||
|
bool was_active = is_active(hq, ctx->stage);
|
||||||
|
bool now_active = is_active(hq, stage);
|
||||||
|
|
||||||
|
if (now_active && !was_active)
|
||||||
|
resume_query(ctx, hq, ring);
|
||||||
|
else if (was_active && !now_active)
|
||||||
|
pause_query(ctx, hq, ring);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
clear_sample_cache(ctx);
|
||||||
|
ctx->stage = stage;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
fd_hw_query_register_provider(struct pipe_context *pctx,
|
||||||
|
const struct fd_hw_sample_provider *provider)
|
||||||
|
{
|
||||||
|
struct fd_context *ctx = fd_context(pctx);
|
||||||
|
int idx = pidx(provider->query_type);
|
||||||
|
|
||||||
|
assert((0 <= idx) && (idx < MAX_HW_SAMPLE_PROVIDERS));
|
||||||
|
assert(!ctx->sample_providers[idx]);
|
||||||
|
|
||||||
|
ctx->sample_providers[idx] = provider;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
fd_hw_query_init(struct pipe_context *pctx)
|
||||||
|
{
|
||||||
|
struct fd_context *ctx = fd_context(pctx);
|
||||||
|
|
||||||
|
util_slab_create(&ctx->sample_pool, sizeof(struct fd_hw_sample),
|
||||||
|
16, UTIL_SLAB_SINGLETHREADED);
|
||||||
|
util_slab_create(&ctx->sample_period_pool, sizeof(struct fd_hw_sample_period),
|
||||||
|
16, UTIL_SLAB_SINGLETHREADED);
|
||||||
|
list_inithead(&ctx->active_queries);
|
||||||
|
list_inithead(&ctx->current_queries);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
fd_hw_query_fini(struct pipe_context *pctx)
|
||||||
|
{
|
||||||
|
struct fd_context *ctx = fd_context(pctx);
|
||||||
|
|
||||||
|
util_slab_destroy(&ctx->sample_pool);
|
||||||
|
util_slab_destroy(&ctx->sample_period_pool);
|
||||||
|
}
|
164
src/gallium/drivers/freedreno/freedreno_query_hw.h
Normal file
164
src/gallium/drivers/freedreno/freedreno_query_hw.h
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
/* -*- mode: C; c-file-style: "k&r"; tab-width 4; indent-tabs-mode: t; -*- */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2014 Rob Clark <robclark@freedesktop.org>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* Authors:
|
||||||
|
* Rob Clark <robclark@freedesktop.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FREEDRENO_QUERY_HW_H_
|
||||||
|
#define FREEDRENO_QUERY_HW_H_
|
||||||
|
|
||||||
|
#include "util/u_double_list.h"
|
||||||
|
|
||||||
|
#include "freedreno_query.h"
|
||||||
|
#include "freedreno_context.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HW Queries:
|
||||||
|
*
|
||||||
|
* See: https://github.com/freedreno/freedreno/wiki/Queries#hardware-queries
|
||||||
|
*
|
||||||
|
* Hardware queries will be specific to gpu generation, but they need
|
||||||
|
* some common infrastructure for triggering start/stop samples at
|
||||||
|
* various points (for example, to exclude mem2gmem/gmem2mem or clear)
|
||||||
|
* as well as per tile tracking.
|
||||||
|
*
|
||||||
|
* NOTE: in at least some cases hw writes sample values to memory addr
|
||||||
|
* specified in some register. So we don't really have the option to
|
||||||
|
* just sample the same counter multiple times for multiple different
|
||||||
|
* queries with the same query_type. So we cache per sample provider
|
||||||
|
* the most recent sample since the last draw. This way multiple
|
||||||
|
* sample periods for multiple queries can reference the same sample.
|
||||||
|
*
|
||||||
|
* fd_hw_sample_provider:
|
||||||
|
* - one per query type, registered/implemented by gpu generation
|
||||||
|
* specific code
|
||||||
|
* - can construct fd_hw_samples on demand
|
||||||
|
* - most recent sample (since last draw) cached so multiple
|
||||||
|
* different queries can ref the same sample
|
||||||
|
*
|
||||||
|
* fd_hw_sample:
|
||||||
|
* - abstracts one snapshot of counter value(s) across N tiles
|
||||||
|
* - backing object not allocated until submit time when number
|
||||||
|
* of samples and number of tiles is known
|
||||||
|
*
|
||||||
|
* fd_hw_sample_period:
|
||||||
|
* - consists of start and stop sample
|
||||||
|
* - a query accumulates a list of sample periods
|
||||||
|
* - the query result is the sum of the sample periods
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct fd_hw_sample_provider {
|
||||||
|
unsigned query_type;
|
||||||
|
|
||||||
|
/* stages applicable to the query type: */
|
||||||
|
enum fd_render_stage active;
|
||||||
|
|
||||||
|
/* when a new sample is required, emit appropriate cmdstream
|
||||||
|
* and return a sample object:
|
||||||
|
*/
|
||||||
|
struct fd_hw_sample *(*get_sample)(struct fd_context *ctx,
|
||||||
|
struct fd_ringbuffer *ring);
|
||||||
|
|
||||||
|
/* accumulate the results from specified sample period: */
|
||||||
|
void (*accumulate_result)(struct fd_context *ctx,
|
||||||
|
const void *start, const void *end,
|
||||||
|
union pipe_query_result *result);
|
||||||
|
};
|
||||||
|
|
||||||
|
struct fd_hw_sample {
|
||||||
|
struct pipe_reference reference; /* keep this first */
|
||||||
|
|
||||||
|
/* offset and size of the sample are know at the time the
|
||||||
|
* sample is constructed.
|
||||||
|
*/
|
||||||
|
uint32_t size;
|
||||||
|
uint32_t offset;
|
||||||
|
|
||||||
|
/* backing object, offset/stride/etc are determined not when
|
||||||
|
* the sample is constructed, but when the batch is submitted.
|
||||||
|
* This way we can defer allocation until total # of requested
|
||||||
|
* samples, and total # of tiles, is known.
|
||||||
|
*/
|
||||||
|
struct fd_bo *bo;
|
||||||
|
uint32_t num_tiles;
|
||||||
|
uint32_t tile_stride;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct fd_hw_sample_period;
|
||||||
|
|
||||||
|
struct fd_hw_query {
|
||||||
|
struct fd_query base;
|
||||||
|
|
||||||
|
const struct fd_hw_sample_provider *provider;
|
||||||
|
|
||||||
|
/* list of fd_hw_sample_period in previous submits: */
|
||||||
|
struct list_head periods;
|
||||||
|
|
||||||
|
/* list of fd_hw_sample_period's in current submit: */
|
||||||
|
struct list_head current_periods;
|
||||||
|
|
||||||
|
/* if active and not paused, the current sample period (not
|
||||||
|
* yet added to current_periods):
|
||||||
|
*/
|
||||||
|
struct fd_hw_sample_period *period;
|
||||||
|
|
||||||
|
struct list_head list; /* list-node in ctx->active_queries */
|
||||||
|
};
|
||||||
|
|
||||||
|
static inline struct fd_hw_query *
|
||||||
|
fd_hw_query(struct fd_query *q)
|
||||||
|
{
|
||||||
|
return (struct fd_hw_query *)q;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct fd_query * fd_hw_create_query(struct fd_context *ctx, unsigned query_type);
|
||||||
|
/* helper for sample providers: */
|
||||||
|
struct fd_hw_sample * fd_hw_sample_init(struct fd_context *ctx, uint32_t size);
|
||||||
|
/* don't call directly, use fd_hw_sample_reference() */
|
||||||
|
void __fd_hw_sample_destroy(struct fd_context *ctx, struct fd_hw_sample *samp);
|
||||||
|
void fd_hw_query_prepare(struct fd_context *ctx, uint32_t num_tiles);
|
||||||
|
void fd_hw_query_prepare_tile(struct fd_context *ctx, uint32_t n,
|
||||||
|
struct fd_ringbuffer *ring);
|
||||||
|
void fd_hw_query_set_stage(struct fd_context *ctx,
|
||||||
|
struct fd_ringbuffer *ring, enum fd_render_stage stage);
|
||||||
|
void fd_hw_query_register_provider(struct pipe_context *pctx,
|
||||||
|
const struct fd_hw_sample_provider *provider);
|
||||||
|
void fd_hw_query_init(struct pipe_context *pctx);
|
||||||
|
void fd_hw_query_fini(struct pipe_context *pctx);
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
fd_hw_sample_reference(struct fd_context *ctx,
|
||||||
|
struct fd_hw_sample **ptr, struct fd_hw_sample *samp)
|
||||||
|
{
|
||||||
|
struct fd_hw_sample *old_samp = *ptr;
|
||||||
|
|
||||||
|
if (pipe_reference(&(*ptr)->reference, &samp->reference))
|
||||||
|
__fd_hw_sample_destroy(ctx, old_samp);
|
||||||
|
if (ptr)
|
||||||
|
*ptr = samp;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* FREEDRENO_QUERY_HW_H_ */
|
165
src/gallium/drivers/freedreno/freedreno_query_sw.c
Normal file
165
src/gallium/drivers/freedreno/freedreno_query_sw.c
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
/* -*- mode: C; c-file-style: "k&r"; tab-width 4; indent-tabs-mode: t; -*- */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2014 Rob Clark <robclark@freedesktop.org>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* Authors:
|
||||||
|
* Rob Clark <robclark@freedesktop.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "pipe/p_state.h"
|
||||||
|
#include "util/u_string.h"
|
||||||
|
#include "util/u_memory.h"
|
||||||
|
#include "util/u_inlines.h"
|
||||||
|
#include "os/os_time.h"
|
||||||
|
|
||||||
|
#include "freedreno_query_sw.h"
|
||||||
|
#include "freedreno_context.h"
|
||||||
|
#include "freedreno_util.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SW Queries:
|
||||||
|
*
|
||||||
|
* In the core, we have some support for basic sw counters
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void
|
||||||
|
fd_sw_destroy_query(struct fd_context *ctx, struct fd_query *q)
|
||||||
|
{
|
||||||
|
struct fd_sw_query *sq = fd_sw_query(q);
|
||||||
|
free(sq);
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint64_t
|
||||||
|
read_counter(struct fd_context *ctx, int type)
|
||||||
|
{
|
||||||
|
switch (type) {
|
||||||
|
case PIPE_QUERY_PRIMITIVES_GENERATED:
|
||||||
|
/* for now same thing as _PRIMITIVES_EMITTED */
|
||||||
|
case PIPE_QUERY_PRIMITIVES_EMITTED:
|
||||||
|
return ctx->stats.prims_emitted;
|
||||||
|
case FD_QUERY_DRAW_CALLS:
|
||||||
|
return ctx->stats.draw_calls;
|
||||||
|
case FD_QUERY_BATCH_TOTAL:
|
||||||
|
return ctx->stats.batch_total;
|
||||||
|
case FD_QUERY_BATCH_SYSMEM:
|
||||||
|
return ctx->stats.batch_sysmem;
|
||||||
|
case FD_QUERY_BATCH_GMEM:
|
||||||
|
return ctx->stats.batch_gmem;
|
||||||
|
case FD_QUERY_BATCH_RESTORE:
|
||||||
|
return ctx->stats.batch_restore;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool
|
||||||
|
is_rate_query(struct fd_query *q)
|
||||||
|
{
|
||||||
|
switch (q->type) {
|
||||||
|
case FD_QUERY_BATCH_TOTAL:
|
||||||
|
case FD_QUERY_BATCH_SYSMEM:
|
||||||
|
case FD_QUERY_BATCH_GMEM:
|
||||||
|
case FD_QUERY_BATCH_RESTORE:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
fd_sw_begin_query(struct fd_context *ctx, struct fd_query *q)
|
||||||
|
{
|
||||||
|
struct fd_sw_query *sq = fd_sw_query(q);
|
||||||
|
q->active = true;
|
||||||
|
sq->begin_value = read_counter(ctx, q->type);
|
||||||
|
if (is_rate_query(q))
|
||||||
|
sq->begin_time = os_time_get();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
fd_sw_end_query(struct fd_context *ctx, struct fd_query *q)
|
||||||
|
{
|
||||||
|
struct fd_sw_query *sq = fd_sw_query(q);
|
||||||
|
q->active = false;
|
||||||
|
sq->end_value = read_counter(ctx, q->type);
|
||||||
|
if (is_rate_query(q))
|
||||||
|
sq->end_time = os_time_get();
|
||||||
|
}
|
||||||
|
|
||||||
|
static boolean
|
||||||
|
fd_sw_get_query_result(struct fd_context *ctx, struct fd_query *q,
|
||||||
|
boolean wait, union pipe_query_result *result)
|
||||||
|
{
|
||||||
|
struct fd_sw_query *sq = fd_sw_query(q);
|
||||||
|
|
||||||
|
if (q->active)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
util_query_clear_result(result, q->type);
|
||||||
|
|
||||||
|
result->u64 = sq->end_value - sq->begin_value;
|
||||||
|
|
||||||
|
if (is_rate_query(q)) {
|
||||||
|
double fps = (result->u64 * 1000000) /
|
||||||
|
(double)(sq->end_time - sq->begin_time);
|
||||||
|
result->u64 = (uint64_t)fps;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct fd_query_funcs sw_query_funcs = {
|
||||||
|
.destroy_query = fd_sw_destroy_query,
|
||||||
|
.begin_query = fd_sw_begin_query,
|
||||||
|
.end_query = fd_sw_end_query,
|
||||||
|
.get_query_result = fd_sw_get_query_result,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct fd_query *
|
||||||
|
fd_sw_create_query(struct fd_context *ctx, unsigned query_type)
|
||||||
|
{
|
||||||
|
struct fd_sw_query *sq;
|
||||||
|
struct fd_query *q;
|
||||||
|
|
||||||
|
switch (query_type) {
|
||||||
|
case PIPE_QUERY_PRIMITIVES_GENERATED:
|
||||||
|
case PIPE_QUERY_PRIMITIVES_EMITTED:
|
||||||
|
case FD_QUERY_DRAW_CALLS:
|
||||||
|
case FD_QUERY_BATCH_TOTAL:
|
||||||
|
case FD_QUERY_BATCH_SYSMEM:
|
||||||
|
case FD_QUERY_BATCH_GMEM:
|
||||||
|
case FD_QUERY_BATCH_RESTORE:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
sq = CALLOC_STRUCT(fd_sw_query);
|
||||||
|
if (!sq)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
q = &sq->base;
|
||||||
|
q->funcs = &sw_query_funcs;
|
||||||
|
q->type = query_type;
|
||||||
|
|
||||||
|
return q;
|
||||||
|
}
|
55
src/gallium/drivers/freedreno/freedreno_query_sw.h
Normal file
55
src/gallium/drivers/freedreno/freedreno_query_sw.h
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
/* -*- mode: C; c-file-style: "k&r"; tab-width 4; indent-tabs-mode: t; -*- */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2014 Rob Clark <robclark@freedesktop.org>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* Authors:
|
||||||
|
* Rob Clark <robclark@freedesktop.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FREEDRENO_QUERY_SW_H_
|
||||||
|
#define FREEDRENO_QUERY_SW_H_
|
||||||
|
|
||||||
|
#include "freedreno_query.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SW Queries:
|
||||||
|
*
|
||||||
|
* In the core, we have some support for basic sw counters
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct fd_sw_query {
|
||||||
|
struct fd_query base;
|
||||||
|
uint64_t begin_value, end_value;
|
||||||
|
uint64_t begin_time, end_time;
|
||||||
|
};
|
||||||
|
|
||||||
|
static inline struct fd_sw_query *
|
||||||
|
fd_sw_query(struct fd_query *q)
|
||||||
|
{
|
||||||
|
return (struct fd_sw_query *)q;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct fd_query * fd_sw_create_query(struct fd_context *ctx,
|
||||||
|
unsigned query_type);
|
||||||
|
|
||||||
|
#endif /* FREEDRENO_QUERY_SW_H_ */
|
@@ -36,6 +36,7 @@
|
|||||||
#include "freedreno_screen.h"
|
#include "freedreno_screen.h"
|
||||||
#include "freedreno_surface.h"
|
#include "freedreno_surface.h"
|
||||||
#include "freedreno_context.h"
|
#include "freedreno_context.h"
|
||||||
|
#include "freedreno_query_hw.h"
|
||||||
#include "freedreno_util.h"
|
#include "freedreno_util.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@@ -47,6 +48,10 @@ realloc_bo(struct fd_resource *rsc, uint32_t size)
|
|||||||
uint32_t flags = DRM_FREEDRENO_GEM_CACHE_WCOMBINE |
|
uint32_t flags = DRM_FREEDRENO_GEM_CACHE_WCOMBINE |
|
||||||
DRM_FREEDRENO_GEM_TYPE_KMEM; /* TODO */
|
DRM_FREEDRENO_GEM_TYPE_KMEM; /* TODO */
|
||||||
|
|
||||||
|
/* if we start using things other than write-combine,
|
||||||
|
* be sure to check for PIPE_RESOURCE_FLAG_MAP_COHERENT
|
||||||
|
*/
|
||||||
|
|
||||||
if (rsc->bo)
|
if (rsc->bo)
|
||||||
fd_bo_del(rsc->bo);
|
fd_bo_del(rsc->bo);
|
||||||
|
|
||||||
@@ -401,7 +406,9 @@ render_blit(struct pipe_context *pctx, struct pipe_blit_info *info)
|
|||||||
util_blitter_save_fragment_sampler_views(ctx->blitter,
|
util_blitter_save_fragment_sampler_views(ctx->blitter,
|
||||||
ctx->fragtex.num_textures, ctx->fragtex.textures);
|
ctx->fragtex.num_textures, ctx->fragtex.textures);
|
||||||
|
|
||||||
|
fd_hw_query_set_stage(ctx, ctx->ring, FD_STAGE_BLIT);
|
||||||
util_blitter_blit(ctx->blitter, info);
|
util_blitter_blit(ctx->blitter, info);
|
||||||
|
fd_hw_query_set_stage(ctx, ctx->ring, FD_STAGE_NULL);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -50,8 +50,8 @@
|
|||||||
#include "freedreno_query.h"
|
#include "freedreno_query.h"
|
||||||
#include "freedreno_util.h"
|
#include "freedreno_util.h"
|
||||||
|
|
||||||
#include "fd2_screen.h"
|
#include "a2xx/fd2_screen.h"
|
||||||
#include "fd3_screen.h"
|
#include "a3xx/fd3_screen.h"
|
||||||
|
|
||||||
/* XXX this should go away */
|
/* XXX this should go away */
|
||||||
#include "state_tracker/drm_driver.h"
|
#include "state_tracker/drm_driver.h"
|
||||||
@@ -143,6 +143,8 @@ tables for things that differ if the delta is not too much..
|
|||||||
static int
|
static int
|
||||||
fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
||||||
{
|
{
|
||||||
|
struct fd_screen *screen = fd_screen(pscreen);
|
||||||
|
|
||||||
/* this is probably not totally correct.. but it's a start: */
|
/* this is probably not totally correct.. but it's a start: */
|
||||||
switch (param) {
|
switch (param) {
|
||||||
/* Supported features (boolean caps). */
|
/* Supported features (boolean caps). */
|
||||||
@@ -159,11 +161,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
|
case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
|
||||||
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
|
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
|
||||||
case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
|
case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
|
||||||
case PIPE_CAP_SM3:
|
|
||||||
case PIPE_CAP_SEAMLESS_CUBE_MAP:
|
case PIPE_CAP_SEAMLESS_CUBE_MAP:
|
||||||
case PIPE_CAP_PRIMITIVE_RESTART:
|
|
||||||
case PIPE_CAP_CONDITIONAL_RENDER:
|
|
||||||
case PIPE_CAP_TEXTURE_BARRIER:
|
|
||||||
case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
|
case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
|
||||||
case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
|
case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
|
||||||
case PIPE_CAP_TGSI_INSTANCEID:
|
case PIPE_CAP_TGSI_INSTANCEID:
|
||||||
@@ -173,13 +171,18 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_COMPUTE:
|
case PIPE_CAP_COMPUTE:
|
||||||
case PIPE_CAP_START_INSTANCE:
|
case PIPE_CAP_START_INSTANCE:
|
||||||
case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
|
case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
|
||||||
case PIPE_CAP_TEXTURE_MULTISAMPLE:
|
|
||||||
case PIPE_CAP_USER_CONSTANT_BUFFERS:
|
case PIPE_CAP_USER_CONSTANT_BUFFERS:
|
||||||
|
case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case PIPE_CAP_SHADER_STENCIL_EXPORT:
|
case PIPE_CAP_SHADER_STENCIL_EXPORT:
|
||||||
case PIPE_CAP_TGSI_TEXCOORD:
|
case PIPE_CAP_TGSI_TEXCOORD:
|
||||||
case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
|
case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
|
||||||
|
case PIPE_CAP_CONDITIONAL_RENDER:
|
||||||
|
case PIPE_CAP_PRIMITIVE_RESTART:
|
||||||
|
case PIPE_CAP_TEXTURE_MULTISAMPLE:
|
||||||
|
case PIPE_CAP_TEXTURE_BARRIER:
|
||||||
|
case PIPE_CAP_SM3:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
|
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
|
||||||
@@ -205,7 +208,6 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_TGSI_VS_LAYER:
|
case PIPE_CAP_TGSI_VS_LAYER:
|
||||||
case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS:
|
case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS:
|
||||||
case PIPE_CAP_TEXTURE_GATHER_SM5:
|
case PIPE_CAP_TEXTURE_GATHER_SM5:
|
||||||
case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
|
|
||||||
case PIPE_CAP_FAKE_SW_MSAA:
|
case PIPE_CAP_FAKE_SW_MSAA:
|
||||||
case PIPE_CAP_TEXTURE_QUERY_LOD:
|
case PIPE_CAP_TEXTURE_QUERY_LOD:
|
||||||
case PIPE_CAP_SAMPLE_SHADING:
|
case PIPE_CAP_SAMPLE_SHADING:
|
||||||
@@ -229,17 +231,18 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
|
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
|
||||||
return MAX_MIP_LEVELS;
|
return MAX_MIP_LEVELS;
|
||||||
case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:
|
case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:
|
||||||
return 9192;
|
return 0; /* TODO: a3xx+ should support (required in gles3) */
|
||||||
|
|
||||||
/* Render targets. */
|
/* Render targets. */
|
||||||
case PIPE_CAP_MAX_RENDER_TARGETS:
|
case PIPE_CAP_MAX_RENDER_TARGETS:
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* Timer queries. */
|
/* Queries. */
|
||||||
case PIPE_CAP_QUERY_TIME_ELAPSED:
|
case PIPE_CAP_QUERY_TIME_ELAPSED:
|
||||||
case PIPE_CAP_OCCLUSION_QUERY:
|
|
||||||
case PIPE_CAP_QUERY_TIMESTAMP:
|
case PIPE_CAP_QUERY_TIMESTAMP:
|
||||||
return 0;
|
return 0;
|
||||||
|
case PIPE_CAP_OCCLUSION_QUERY:
|
||||||
|
return (screen->gpu_id >= 300) ? 1: 0;
|
||||||
|
|
||||||
case PIPE_CAP_MIN_TEXTURE_GATHER_OFFSET:
|
case PIPE_CAP_MIN_TEXTURE_GATHER_OFFSET:
|
||||||
case PIPE_CAP_MIN_TEXEL_OFFSET:
|
case PIPE_CAP_MIN_TEXEL_OFFSET:
|
||||||
@@ -252,7 +255,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_ENDIANNESS:
|
case PIPE_CAP_ENDIANNESS:
|
||||||
return PIPE_ENDIAN_LITTLE;
|
return PIPE_ENDIAN_LITTLE;
|
||||||
|
|
||||||
case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
|
case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
|
||||||
return 64;
|
return 64;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -315,7 +318,7 @@ fd_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
|
|||||||
case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH:
|
case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH:
|
||||||
return 8; /* XXX */
|
return 8; /* XXX */
|
||||||
case PIPE_SHADER_CAP_MAX_INPUTS:
|
case PIPE_SHADER_CAP_MAX_INPUTS:
|
||||||
return 32;
|
return 16;
|
||||||
case PIPE_SHADER_CAP_MAX_TEMPS:
|
case PIPE_SHADER_CAP_MAX_TEMPS:
|
||||||
return 64; /* Max native temporaries. */
|
return 64; /* Max native temporaries. */
|
||||||
case PIPE_SHADER_CAP_MAX_ADDRS:
|
case PIPE_SHADER_CAP_MAX_ADDRS:
|
||||||
|
@@ -57,7 +57,7 @@ static void bind_sampler_states(struct fd_texture_stateobj *prog,
|
|||||||
|
|
||||||
for (i = 0; i < nr; i++) {
|
for (i = 0; i < nr; i++) {
|
||||||
if (hwcso[i])
|
if (hwcso[i])
|
||||||
new_nr++;
|
new_nr = i + 1;
|
||||||
prog->samplers[i] = hwcso[i];
|
prog->samplers[i] = hwcso[i];
|
||||||
prog->dirty_samplers |= (1 << i);
|
prog->dirty_samplers |= (1 << i);
|
||||||
}
|
}
|
||||||
@@ -78,7 +78,7 @@ static void set_sampler_views(struct fd_texture_stateobj *prog,
|
|||||||
|
|
||||||
for (i = 0; i < nr; i++) {
|
for (i = 0; i < nr; i++) {
|
||||||
if (views[i])
|
if (views[i])
|
||||||
new_nr++;
|
new_nr = i + 1;
|
||||||
pipe_sampler_view_reference(&prog->textures[i], views[i]);
|
pipe_sampler_view_reference(&prog->textures[i], views[i]);
|
||||||
prog->dirty_samplers |= (1 << i);
|
prog->dirty_samplers |= (1 << i);
|
||||||
}
|
}
|
||||||
|
@@ -111,26 +111,6 @@ fd_blend_factor(unsigned factor)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum adreno_rb_blend_opcode
|
|
||||||
fd_blend_func(unsigned func)
|
|
||||||
{
|
|
||||||
switch (func) {
|
|
||||||
case PIPE_BLEND_ADD:
|
|
||||||
return BLEND_DST_PLUS_SRC;
|
|
||||||
case PIPE_BLEND_MIN:
|
|
||||||
return BLEND_MIN_DST_SRC;
|
|
||||||
case PIPE_BLEND_MAX:
|
|
||||||
return BLEND_MAX_DST_SRC;
|
|
||||||
case PIPE_BLEND_SUBTRACT:
|
|
||||||
return BLEND_SRC_MINUS_DST;
|
|
||||||
case PIPE_BLEND_REVERSE_SUBTRACT:
|
|
||||||
return BLEND_DST_MINUS_SRC;
|
|
||||||
default:
|
|
||||||
DBG("invalid blend func: %x", func);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
enum adreno_pa_su_sc_draw
|
enum adreno_pa_su_sc_draw
|
||||||
fd_polygon_mode(unsigned mode)
|
fd_polygon_mode(unsigned mode)
|
||||||
{
|
{
|
||||||
|
@@ -45,7 +45,6 @@
|
|||||||
enum adreno_rb_depth_format fd_pipe2depth(enum pipe_format format);
|
enum adreno_rb_depth_format fd_pipe2depth(enum pipe_format format);
|
||||||
enum pc_di_index_size fd_pipe2index(enum pipe_format format);
|
enum pc_di_index_size fd_pipe2index(enum pipe_format format);
|
||||||
enum adreno_rb_blend_factor fd_blend_factor(unsigned factor);
|
enum adreno_rb_blend_factor fd_blend_factor(unsigned factor);
|
||||||
enum adreno_rb_blend_opcode fd_blend_func(unsigned func);
|
|
||||||
enum adreno_pa_su_sc_draw fd_polygon_mode(unsigned mode);
|
enum adreno_pa_su_sc_draw fd_polygon_mode(unsigned mode);
|
||||||
enum adreno_stencil_op fd_stencil_op(unsigned op);
|
enum adreno_stencil_op fd_stencil_op(unsigned op);
|
||||||
|
|
||||||
@@ -223,11 +222,18 @@ OUT_IB(struct fd_ringbuffer *ring, struct fd_ringmarker *start,
|
|||||||
emit_marker(ring, 6);
|
emit_marker(ring, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* CP_SCRATCH_REG4 is used to hold base address for query results: */
|
||||||
|
#define HW_QUERY_BASE_REG REG_AXXX_CP_SCRATCH_REG4
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
emit_marker(struct fd_ringbuffer *ring, int scratch_idx)
|
emit_marker(struct fd_ringbuffer *ring, int scratch_idx)
|
||||||
{
|
{
|
||||||
extern unsigned marker_cnt;
|
extern unsigned marker_cnt;
|
||||||
OUT_PKT0(ring, REG_AXXX_CP_SCRATCH_REG0 + scratch_idx, 1);
|
unsigned reg = REG_AXXX_CP_SCRATCH_REG0 + scratch_idx;
|
||||||
|
assert(reg != HW_QUERY_BASE_REG);
|
||||||
|
if (reg == HW_QUERY_BASE_REG)
|
||||||
|
return;
|
||||||
|
OUT_PKT0(ring, reg, 1);
|
||||||
OUT_RING(ring, ++marker_cnt);
|
OUT_RING(ring, ++marker_cnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -312,9 +312,15 @@ lp_rast_shade_tile(struct lp_rasterizer_task *task,
|
|||||||
|
|
||||||
/* color buffer */
|
/* color buffer */
|
||||||
for (i = 0; i < scene->fb.nr_cbufs; i++){
|
for (i = 0; i < scene->fb.nr_cbufs; i++){
|
||||||
stride[i] = scene->cbufs[i].stride;
|
if (scene->fb.cbufs[i]) {
|
||||||
color[i] = lp_rast_get_unswizzled_color_block_pointer(task, i, tile_x + x,
|
stride[i] = scene->cbufs[i].stride;
|
||||||
tile_y + y, inputs->layer);
|
color[i] = lp_rast_get_unswizzled_color_block_pointer(task, i, tile_x + x,
|
||||||
|
tile_y + y, inputs->layer);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
stride[i] = 0;
|
||||||
|
color[i] = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* depth buffer */
|
/* depth buffer */
|
||||||
|
@@ -115,7 +115,7 @@ llvmpipe_texture_layout(struct llvmpipe_screen *screen,
|
|||||||
lpr->row_stride[level] = align(nblocksx * block_size, util_cpu_caps.cacheline);
|
lpr->row_stride[level] = align(nblocksx * block_size, util_cpu_caps.cacheline);
|
||||||
|
|
||||||
/* if row_stride * height > LP_MAX_TEXTURE_SIZE */
|
/* if row_stride * height > LP_MAX_TEXTURE_SIZE */
|
||||||
if (lpr->row_stride[level] > LP_MAX_TEXTURE_SIZE / nblocksy) {
|
if ((uint64_t)lpr->row_stride[level] * nblocksy > LP_MAX_TEXTURE_SIZE) {
|
||||||
/* image too large */
|
/* image too large */
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
@@ -28,18 +28,19 @@ include $(LOCAL_PATH)/Makefile.sources
|
|||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
LOCAL_SRC_FILES := $(C_SOURCES) \
|
LOCAL_SRC_FILES := \
|
||||||
|
$(C_SOURCES) \
|
||||||
$(NV30_C_SOURCES) \
|
$(NV30_C_SOURCES) \
|
||||||
$(NV50_CODEGEN_SOURCES) \
|
$(NV50_CODEGEN_SOURCES) \
|
||||||
$(NV50_C_SOURES) \
|
$(NV50_C_SOURES) \
|
||||||
$(NVC0_CODEGEN_SOURCES) \
|
$(NVC0_CODEGEN_SOURCES) \
|
||||||
$(NVC0_C_SOURCES)
|
$(NVC0_C_SOURCES)
|
||||||
|
|
||||||
LOCAL_C_INCLUDES := $(DRM_TOP) \
|
LOCAL_C_INCLUDES := \
|
||||||
$(DRM_TOP)/include/drm \
|
$(TARGET_OUT_HEADERS)/libdrm
|
||||||
$(DRM_TOP)/nouveau
|
|
||||||
|
|
||||||
LOCAL_MODULE := libmesa_pipe_nouveau
|
LOCAL_MODULE := libmesa_pipe_nouveau
|
||||||
|
|
||||||
|
include external/stlport/libstlport.mk
|
||||||
include $(GALLIUM_COMMON_MK)
|
include $(GALLIUM_COMMON_MK)
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
|
@@ -177,6 +177,7 @@ struct nv50_ir_prog_info
|
|||||||
uint8_t vertexId; /* system value index of VertexID */
|
uint8_t vertexId; /* system value index of VertexID */
|
||||||
uint8_t edgeFlagIn;
|
uint8_t edgeFlagIn;
|
||||||
uint8_t edgeFlagOut;
|
uint8_t edgeFlagOut;
|
||||||
|
int8_t viewportId; /* output index of ViewportIndex */
|
||||||
uint8_t fragDepth; /* output index of FragDepth */
|
uint8_t fragDepth; /* output index of FragDepth */
|
||||||
uint8_t sampleMask; /* output index of SampleMask */
|
uint8_t sampleMask; /* output index of SampleMask */
|
||||||
boolean sampleInterp; /* perform sample interp on all fp inputs */
|
boolean sampleInterp; /* perform sample interp on all fp inputs */
|
||||||
|
@@ -287,10 +287,12 @@ CodeEmitterGK110::emitPredicate(const Instruction *i)
|
|||||||
void
|
void
|
||||||
CodeEmitterGK110::setCAddress14(const ValueRef& src)
|
CodeEmitterGK110::setCAddress14(const ValueRef& src)
|
||||||
{
|
{
|
||||||
const int32_t addr = src.get()->asSym()->reg.data.offset / 4;
|
const Storage& res = src.get()->asSym()->reg;
|
||||||
|
const int32_t addr = res.data.offset / 4;
|
||||||
|
|
||||||
code[0] |= (addr & 0x01ff) << 23;
|
code[0] |= (addr & 0x01ff) << 23;
|
||||||
code[1] |= (addr & 0x3e00) >> 9;
|
code[1] |= (addr & 0x3e00) >> 9;
|
||||||
|
code[1] |= res.fileIndex << 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -413,7 +415,6 @@ CodeEmitterGK110::emitForm_21(const Instruction *i, uint32_t opc2,
|
|||||||
case FILE_MEMORY_CONST:
|
case FILE_MEMORY_CONST:
|
||||||
code[1] &= (s == 2) ? ~(0x4 << 28) : ~(0x8 << 28);
|
code[1] &= (s == 2) ? ~(0x4 << 28) : ~(0x8 << 28);
|
||||||
setCAddress14(i->src(s));
|
setCAddress14(i->src(s));
|
||||||
code[1] |= i->getSrc(s)->reg.fileIndex << 5;
|
|
||||||
break;
|
break;
|
||||||
case FILE_IMMEDIATE:
|
case FILE_IMMEDIATE:
|
||||||
setShortImmediate(i, s);
|
setShortImmediate(i, s);
|
||||||
@@ -555,6 +556,7 @@ CodeEmitterGK110::emitFADD(const Instruction *i)
|
|||||||
RND_(2a, F);
|
RND_(2a, F);
|
||||||
ABS_(31, 0);
|
ABS_(31, 0);
|
||||||
NEG_(33, 0);
|
NEG_(33, 0);
|
||||||
|
SAT_(35);
|
||||||
|
|
||||||
if (code[0] & 0x1) {
|
if (code[0] & 0x1) {
|
||||||
modNegAbsF32_3b(i, 1);
|
modNegAbsF32_3b(i, 1);
|
||||||
@@ -633,7 +635,7 @@ CodeEmitterGK110::emitISAD(const Instruction *i)
|
|||||||
{
|
{
|
||||||
assert(i->dType == TYPE_S32 || i->dType == TYPE_U32);
|
assert(i->dType == TYPE_S32 || i->dType == TYPE_U32);
|
||||||
|
|
||||||
emitForm_21(i, 0x1fc, 0xb74);
|
emitForm_21(i, 0x1f4, 0xb74);
|
||||||
|
|
||||||
if (i->dType == TYPE_S32)
|
if (i->dType == TYPE_S32)
|
||||||
code[1] |= 1 << 19;
|
code[1] |= 1 << 19;
|
||||||
@@ -711,7 +713,7 @@ CodeEmitterGK110::emitEXTBF(const Instruction *i)
|
|||||||
void
|
void
|
||||||
CodeEmitterGK110::emitBFIND(const Instruction *i)
|
CodeEmitterGK110::emitBFIND(const Instruction *i)
|
||||||
{
|
{
|
||||||
emitForm_21(i, 0x618, 0xc18);
|
emitForm_C(i, 0x218, 0x2);
|
||||||
|
|
||||||
if (i->dType == TYPE_S32)
|
if (i->dType == TYPE_S32)
|
||||||
code[1] |= 0x80000;
|
code[1] |= 0x80000;
|
||||||
@@ -915,6 +917,9 @@ CodeEmitterGK110::emitSET(const CmpInstruction *i)
|
|||||||
modNegAbsF32_3b(i, 1);
|
modNegAbsF32_3b(i, 1);
|
||||||
}
|
}
|
||||||
FTZ_(3a);
|
FTZ_(3a);
|
||||||
|
|
||||||
|
if (i->dType == TYPE_F32)
|
||||||
|
code[1] |= 1 << 23;
|
||||||
}
|
}
|
||||||
if (i->sType == TYPE_S32)
|
if (i->sType == TYPE_S32)
|
||||||
code[1] |= 1 << 19;
|
code[1] |= 1 << 19;
|
||||||
@@ -949,7 +954,7 @@ CodeEmitterGK110::emitSLCT(const CmpInstruction *i)
|
|||||||
FTZ_(32);
|
FTZ_(32);
|
||||||
emitCondCode(cc, 0x33, 0xf);
|
emitCondCode(cc, 0x33, 0xf);
|
||||||
} else {
|
} else {
|
||||||
emitForm_21(i, 0x1a4, 0xb20);
|
emitForm_21(i, 0x1a0, 0xb20);
|
||||||
emitCondCode(cc, 0x34, 0x7);
|
emitCondCode(cc, 0x34, 0x7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -964,7 +969,7 @@ void CodeEmitterGK110::emitSELP(const Instruction *i)
|
|||||||
|
|
||||||
void CodeEmitterGK110::emitTEXBAR(const Instruction *i)
|
void CodeEmitterGK110::emitTEXBAR(const Instruction *i)
|
||||||
{
|
{
|
||||||
code[0] = 0x00000002 | (i->subOp << 23);
|
code[0] = 0x0000003e | (i->subOp << 23);
|
||||||
code[1] = 0x77000000;
|
code[1] = 0x77000000;
|
||||||
|
|
||||||
emitPredicate(i);
|
emitPredicate(i);
|
||||||
@@ -1201,7 +1206,7 @@ CodeEmitterGK110::emitFlow(const Instruction *i)
|
|||||||
case OP_PRECONT: code[1] = 0x15800000; mask = 2; break;
|
case OP_PRECONT: code[1] = 0x15800000; mask = 2; break;
|
||||||
case OP_PRERET: code[1] = 0x13800000; mask = 2; break;
|
case OP_PRERET: code[1] = 0x13800000; mask = 2; break;
|
||||||
|
|
||||||
case OP_QUADON: code[1] = 0x1b000000; mask = 0; break;
|
case OP_QUADON: code[1] = 0x1b800000; mask = 0; break;
|
||||||
case OP_QUADPOP: code[1] = 0x1c000000; mask = 0; break;
|
case OP_QUADPOP: code[1] = 0x1c000000; mask = 0; break;
|
||||||
case OP_BRKPT: code[1] = 0x00000000; mask = 0; break;
|
case OP_BRKPT: code[1] = 0x00000000; mask = 0; break;
|
||||||
default:
|
default:
|
||||||
@@ -1323,7 +1328,8 @@ CodeEmitterGK110::emitOUT(const Instruction *i)
|
|||||||
void
|
void
|
||||||
CodeEmitterGK110::emitInterpMode(const Instruction *i)
|
CodeEmitterGK110::emitInterpMode(const Instruction *i)
|
||||||
{
|
{
|
||||||
code[1] |= i->ipa << 21; // TODO: INTERP_SAMPLEID
|
code[1] |= (i->ipa & 0x3) << 21; // TODO: INTERP_SAMPLEID
|
||||||
|
code[1] |= (i->ipa & 0xc) << (19 - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -790,6 +790,8 @@ bool Source::scanSource()
|
|||||||
info->prop.gp.instanceCount = 1; // default value
|
info->prop.gp.instanceCount = 1; // default value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info->io.viewportId = -1;
|
||||||
|
|
||||||
info->immd.data = (uint32_t *)MALLOC(scan.immediate_count * 16);
|
info->immd.data = (uint32_t *)MALLOC(scan.immediate_count * 16);
|
||||||
info->immd.type = (ubyte *)MALLOC(scan.immediate_count * sizeof(ubyte));
|
info->immd.type = (ubyte *)MALLOC(scan.immediate_count * sizeof(ubyte));
|
||||||
|
|
||||||
@@ -982,6 +984,9 @@ bool Source::scanDeclaration(const struct tgsi_full_declaration *decl)
|
|||||||
case TGSI_SEMANTIC_SAMPLEMASK:
|
case TGSI_SEMANTIC_SAMPLEMASK:
|
||||||
info->io.sampleMask = i;
|
info->io.sampleMask = i;
|
||||||
break;
|
break;
|
||||||
|
case TGSI_SEMANTIC_VIEWPORT_INDEX:
|
||||||
|
info->io.viewportId = i;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1258,6 +1263,8 @@ private:
|
|||||||
Stack joinBBs; // fork BB, for inserting join ops on ENDIF
|
Stack joinBBs; // fork BB, for inserting join ops on ENDIF
|
||||||
Stack loopBBs; // loop headers
|
Stack loopBBs; // loop headers
|
||||||
Stack breakBBs; // end of / after loop
|
Stack breakBBs; // end of / after loop
|
||||||
|
|
||||||
|
Value *viewport;
|
||||||
};
|
};
|
||||||
|
|
||||||
Symbol *
|
Symbol *
|
||||||
@@ -1555,8 +1562,16 @@ Converter::storeDst(const tgsi::Instruction::DstRegister dst, int c,
|
|||||||
mkOp2(OP_WRSV, TYPE_U32, NULL, dstToSym(dst, c), val);
|
mkOp2(OP_WRSV, TYPE_U32, NULL, dstToSym(dst, c), val);
|
||||||
} else
|
} else
|
||||||
if (f == TGSI_FILE_OUTPUT && prog->getType() != Program::TYPE_FRAGMENT) {
|
if (f == TGSI_FILE_OUTPUT && prog->getType() != Program::TYPE_FRAGMENT) {
|
||||||
if (ptr || (info->out[idx].mask & (1 << c)))
|
|
||||||
mkStore(OP_EXPORT, TYPE_U32, dstToSym(dst, c), ptr, val);
|
if (ptr || (info->out[idx].mask & (1 << c))) {
|
||||||
|
/* Save the viewport index into a scratch register so that it can be
|
||||||
|
exported at EMIT time */
|
||||||
|
if (info->out[idx].sn == TGSI_SEMANTIC_VIEWPORT_INDEX &&
|
||||||
|
viewport != NULL)
|
||||||
|
mkOp1(OP_MOV, TYPE_U32, viewport, val);
|
||||||
|
else
|
||||||
|
mkStore(OP_EXPORT, TYPE_U32, dstToSym(dst, c), ptr, val);
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
if (f == TGSI_FILE_TEMPORARY ||
|
if (f == TGSI_FILE_TEMPORARY ||
|
||||||
f == TGSI_FILE_PREDICATE ||
|
f == TGSI_FILE_PREDICATE ||
|
||||||
@@ -2199,7 +2214,6 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
|
|||||||
case TGSI_OPCODE_IMUL_HI:
|
case TGSI_OPCODE_IMUL_HI:
|
||||||
case TGSI_OPCODE_UMUL_HI:
|
case TGSI_OPCODE_UMUL_HI:
|
||||||
case TGSI_OPCODE_OR:
|
case TGSI_OPCODE_OR:
|
||||||
case TGSI_OPCODE_POW:
|
|
||||||
case TGSI_OPCODE_SHL:
|
case TGSI_OPCODE_SHL:
|
||||||
case TGSI_OPCODE_ISHR:
|
case TGSI_OPCODE_ISHR:
|
||||||
case TGSI_OPCODE_USHR:
|
case TGSI_OPCODE_USHR:
|
||||||
@@ -2254,6 +2268,11 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
|
|||||||
FOR_EACH_DST_ENABLED_CHANNEL(0, c, tgsi)
|
FOR_EACH_DST_ENABLED_CHANNEL(0, c, tgsi)
|
||||||
mkOp1(OP_MOV, TYPE_U32, dst0[c], fetchSrc(0, c));
|
mkOp1(OP_MOV, TYPE_U32, dst0[c], fetchSrc(0, c));
|
||||||
break;
|
break;
|
||||||
|
case TGSI_OPCODE_POW:
|
||||||
|
val0 = mkOp2v(op, TYPE_F32, getScratch(), fetchSrc(0, 0), fetchSrc(1, 0));
|
||||||
|
FOR_EACH_DST_ENABLED_CHANNEL(0, c, tgsi)
|
||||||
|
mkOp1(OP_MOV, TYPE_F32, dst0[c], val0);
|
||||||
|
break;
|
||||||
case TGSI_OPCODE_EX2:
|
case TGSI_OPCODE_EX2:
|
||||||
case TGSI_OPCODE_LG2:
|
case TGSI_OPCODE_LG2:
|
||||||
val0 = mkOp1(op, TYPE_F32, getScratch(), fetchSrc(0, 0))->getDef(0);
|
val0 = mkOp1(op, TYPE_F32, getScratch(), fetchSrc(0, 0))->getDef(0);
|
||||||
@@ -2453,7 +2472,12 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
|
|||||||
break;
|
break;
|
||||||
case TGSI_OPCODE_KILL_IF:
|
case TGSI_OPCODE_KILL_IF:
|
||||||
val0 = new_LValue(func, FILE_PREDICATE);
|
val0 = new_LValue(func, FILE_PREDICATE);
|
||||||
|
mask = 0;
|
||||||
for (c = 0; c < 4; ++c) {
|
for (c = 0; c < 4; ++c) {
|
||||||
|
const int s = tgsi.getSrc(0).getSwizzle(c);
|
||||||
|
if (mask & (1 << s))
|
||||||
|
continue;
|
||||||
|
mask |= 1 << s;
|
||||||
mkCmp(OP_SET, CC_LT, TYPE_F32, val0, TYPE_F32, fetchSrc(0, c), zero);
|
mkCmp(OP_SET, CC_LT, TYPE_F32, val0, TYPE_F32, fetchSrc(0, c), zero);
|
||||||
mkOp(OP_DISCARD, TYPE_NONE, NULL)->setPredicate(CC_P, val0);
|
mkOp(OP_DISCARD, TYPE_NONE, NULL)->setPredicate(CC_P, val0);
|
||||||
}
|
}
|
||||||
@@ -2480,7 +2504,7 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
|
|||||||
break;
|
break;
|
||||||
case TGSI_OPCODE_TXB2:
|
case TGSI_OPCODE_TXB2:
|
||||||
case TGSI_OPCODE_TXL2:
|
case TGSI_OPCODE_TXL2:
|
||||||
handleTEX(dst0, 2, 2, 0x10, 0x11, 0x00, 0x00);
|
handleTEX(dst0, 2, 2, 0x10, 0x0f, 0x00, 0x00);
|
||||||
break;
|
break;
|
||||||
case TGSI_OPCODE_SAMPLE:
|
case TGSI_OPCODE_SAMPLE:
|
||||||
case TGSI_OPCODE_SAMPLE_B:
|
case TGSI_OPCODE_SAMPLE_B:
|
||||||
@@ -2514,6 +2538,13 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
|
|||||||
mkCvt(OP_CVT, dstTy, dst0[c], srcTy, fetchSrc(0, c));
|
mkCvt(OP_CVT, dstTy, dst0[c], srcTy, fetchSrc(0, c));
|
||||||
break;
|
break;
|
||||||
case TGSI_OPCODE_EMIT:
|
case TGSI_OPCODE_EMIT:
|
||||||
|
/* export the saved viewport index */
|
||||||
|
if (viewport != NULL) {
|
||||||
|
Symbol *vpSym = mkSymbol(FILE_SHADER_OUTPUT, 0, TYPE_U32,
|
||||||
|
info->out[info->io.viewportId].slot[0] * 4);
|
||||||
|
mkStore(OP_EXPORT, TYPE_U32, vpSym, NULL, viewport);
|
||||||
|
}
|
||||||
|
/* fallthrough */
|
||||||
case TGSI_OPCODE_ENDPRIM:
|
case TGSI_OPCODE_ENDPRIM:
|
||||||
// get vertex stream if specified (must be immediate)
|
// get vertex stream if specified (must be immediate)
|
||||||
src0 = tgsi.srcCount() ?
|
src0 = tgsi.srcCount() ?
|
||||||
@@ -2943,6 +2974,11 @@ Converter::run()
|
|||||||
mkOp1(OP_RCP, TYPE_F32, fragCoord[3], fragCoord[3]);
|
mkOp1(OP_RCP, TYPE_F32, fragCoord[3], fragCoord[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (info->io.viewportId >= 0)
|
||||||
|
viewport = getScratch();
|
||||||
|
else
|
||||||
|
viewport = NULL;
|
||||||
|
|
||||||
for (ip = 0; ip < code->scan.num_instructions; ++ip) {
|
for (ip = 0; ip < code->scan.num_instructions; ++ip) {
|
||||||
if (!handleInstruction(&code->insns[ip]))
|
if (!handleInstruction(&code->insns[ip]))
|
||||||
return false;
|
return false;
|
||||||
|
@@ -37,18 +37,25 @@ namespace nv50_ir {
|
|||||||
// ah*bl 00
|
// ah*bl 00
|
||||||
//
|
//
|
||||||
// fffe0001 + fffe0001
|
// fffe0001 + fffe0001
|
||||||
|
//
|
||||||
|
// Note that this sort of splitting doesn't work for signed values, so we
|
||||||
|
// compute the sign on those manually and then perform an unsigned multiply.
|
||||||
static bool
|
static bool
|
||||||
expandIntegerMUL(BuildUtil *bld, Instruction *mul)
|
expandIntegerMUL(BuildUtil *bld, Instruction *mul)
|
||||||
{
|
{
|
||||||
const bool highResult = mul->subOp == NV50_IR_SUBOP_MUL_HIGH;
|
const bool highResult = mul->subOp == NV50_IR_SUBOP_MUL_HIGH;
|
||||||
|
|
||||||
DataType fTy = mul->sType; // full type
|
DataType fTy; // full type
|
||||||
DataType hTy;
|
switch (mul->sType) {
|
||||||
|
case TYPE_S32: fTy = TYPE_U32; break;
|
||||||
|
case TYPE_S64: fTy = TYPE_U64; break;
|
||||||
|
default: fTy = mul->sType; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
DataType hTy; // half type
|
||||||
switch (fTy) {
|
switch (fTy) {
|
||||||
case TYPE_S32: hTy = TYPE_S16; break;
|
|
||||||
case TYPE_U32: hTy = TYPE_U16; break;
|
case TYPE_U32: hTy = TYPE_U16; break;
|
||||||
case TYPE_U64: hTy = TYPE_U32; break;
|
case TYPE_U64: hTy = TYPE_U32; break;
|
||||||
case TYPE_S64: hTy = TYPE_S32; break;
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -59,15 +66,25 @@ expandIntegerMUL(BuildUtil *bld, Instruction *mul)
|
|||||||
|
|
||||||
bld->setPosition(mul, true);
|
bld->setPosition(mul, true);
|
||||||
|
|
||||||
|
Value *s[2];
|
||||||
Value *a[2], *b[2];
|
Value *a[2], *b[2];
|
||||||
Value *c[2];
|
|
||||||
Value *t[4];
|
Value *t[4];
|
||||||
for (int j = 0; j < 4; ++j)
|
for (int j = 0; j < 4; ++j)
|
||||||
t[j] = bld->getSSA(fullSize);
|
t[j] = bld->getSSA(fullSize);
|
||||||
|
|
||||||
|
s[0] = mul->getSrc(0);
|
||||||
|
s[1] = mul->getSrc(1);
|
||||||
|
|
||||||
|
if (isSignedType(mul->sType)) {
|
||||||
|
s[0] = bld->getSSA(fullSize);
|
||||||
|
s[1] = bld->getSSA(fullSize);
|
||||||
|
bld->mkOp1(OP_ABS, mul->sType, s[0], mul->getSrc(0));
|
||||||
|
bld->mkOp1(OP_ABS, mul->sType, s[1], mul->getSrc(1));
|
||||||
|
}
|
||||||
|
|
||||||
// split sources into halves
|
// split sources into halves
|
||||||
i[0] = bld->mkSplit(a, halfSize, mul->getSrc(0));
|
i[0] = bld->mkSplit(a, halfSize, s[0]);
|
||||||
i[1] = bld->mkSplit(b, halfSize, mul->getSrc(1));
|
i[1] = bld->mkSplit(b, halfSize, s[1]);
|
||||||
|
|
||||||
i[2] = bld->mkOp2(OP_MUL, fTy, t[0], a[0], b[1]);
|
i[2] = bld->mkOp2(OP_MUL, fTy, t[0], a[0], b[1]);
|
||||||
i[3] = bld->mkOp3(OP_MAD, fTy, t[1], a[1], b[0], t[0]);
|
i[3] = bld->mkOp3(OP_MAD, fTy, t[1], a[1], b[0], t[0]);
|
||||||
@@ -75,23 +92,76 @@ expandIntegerMUL(BuildUtil *bld, Instruction *mul)
|
|||||||
i[4] = bld->mkOp3(OP_MAD, fTy, t[3], a[0], b[0], t[2]);
|
i[4] = bld->mkOp3(OP_MAD, fTy, t[3], a[0], b[0], t[2]);
|
||||||
|
|
||||||
if (highResult) {
|
if (highResult) {
|
||||||
Value *r[3];
|
Value *c[2];
|
||||||
|
Value *r[5];
|
||||||
Value *imm = bld->loadImm(NULL, 1 << (halfSize * 8));
|
Value *imm = bld->loadImm(NULL, 1 << (halfSize * 8));
|
||||||
c[0] = bld->getSSA(1, FILE_FLAGS);
|
c[0] = bld->getSSA(1, FILE_FLAGS);
|
||||||
c[1] = bld->getSSA(1, FILE_FLAGS);
|
c[1] = bld->getSSA(1, FILE_FLAGS);
|
||||||
for (int j = 0; j < 3; ++j)
|
for (int j = 0; j < 5; ++j)
|
||||||
r[j] = bld->getSSA(fullSize);
|
r[j] = bld->getSSA(fullSize);
|
||||||
|
|
||||||
i[8] = bld->mkOp2(OP_SHR, fTy, r[0], t[1], bld->mkImm(halfSize * 8));
|
i[8] = bld->mkOp2(OP_SHR, fTy, r[0], t[1], bld->mkImm(halfSize * 8));
|
||||||
i[6] = bld->mkOp2(OP_ADD, fTy, r[1], r[0], imm);
|
i[6] = bld->mkOp2(OP_ADD, fTy, r[1], r[0], imm);
|
||||||
bld->mkOp2(OP_UNION, TYPE_U32, r[2], r[1], r[0]);
|
bld->mkMov(r[3], r[0])->setPredicate(CC_NC, c[0]);
|
||||||
i[5] = bld->mkOp3(OP_MAD, fTy, mul->getDef(0), a[1], b[1], r[2]);
|
bld->mkOp2(OP_UNION, TYPE_U32, r[2], r[1], r[3]);
|
||||||
|
i[5] = bld->mkOp3(OP_MAD, fTy, r[4], a[1], b[1], r[2]);
|
||||||
|
|
||||||
// set carry defs / sources
|
// set carry defs / sources
|
||||||
i[3]->setFlagsDef(1, c[0]);
|
i[3]->setFlagsDef(1, c[0]);
|
||||||
i[4]->setFlagsDef(0, c[1]); // actual result not required, just the carry
|
// actual result required in negative case, but ignored for
|
||||||
|
// unsigned. for some reason the compiler ends up dropping the whole
|
||||||
|
// instruction if the destination is unused but the flags are.
|
||||||
|
if (isSignedType(mul->sType))
|
||||||
|
i[4]->setFlagsDef(1, c[1]);
|
||||||
|
else
|
||||||
|
i[4]->setFlagsDef(0, c[1]);
|
||||||
i[6]->setPredicate(CC_C, c[0]);
|
i[6]->setPredicate(CC_C, c[0]);
|
||||||
i[5]->setFlagsSrc(3, c[1]);
|
i[5]->setFlagsSrc(3, c[1]);
|
||||||
|
|
||||||
|
if (isSignedType(mul->sType)) {
|
||||||
|
Value *cc[2];
|
||||||
|
Value *rr[7];
|
||||||
|
Value *one = bld->getSSA(fullSize);
|
||||||
|
bld->loadImm(one, 1);
|
||||||
|
for (int j = 0; j < 7; j++)
|
||||||
|
rr[j] = bld->getSSA(fullSize);
|
||||||
|
|
||||||
|
// NOTE: this logic uses predicates because splitting basic blocks is
|
||||||
|
// ~impossible during the SSA phase. The RA relies on a correlation
|
||||||
|
// between edge order and phi node sources.
|
||||||
|
|
||||||
|
// Set the sign of the result based on the inputs
|
||||||
|
bld->mkOp2(OP_XOR, fTy, NULL, mul->getSrc(0), mul->getSrc(1))
|
||||||
|
->setFlagsDef(0, (cc[0] = bld->getSSA(1, FILE_FLAGS)));
|
||||||
|
|
||||||
|
// 1s complement of 64-bit value
|
||||||
|
bld->mkOp1(OP_NOT, fTy, rr[0], r[4])
|
||||||
|
->setPredicate(CC_S, cc[0]);
|
||||||
|
bld->mkOp1(OP_NOT, fTy, rr[1], t[3])
|
||||||
|
->setPredicate(CC_S, cc[0]);
|
||||||
|
|
||||||
|
// add to low 32-bits, keep track of the carry
|
||||||
|
Instruction *n = bld->mkOp2(OP_ADD, fTy, NULL, rr[1], one);
|
||||||
|
n->setPredicate(CC_S, cc[0]);
|
||||||
|
n->setFlagsDef(0, (cc[1] = bld->getSSA(1, FILE_FLAGS)));
|
||||||
|
|
||||||
|
// If there was a carry, add 1 to the upper 32 bits
|
||||||
|
// XXX: These get executed even if they shouldn't be
|
||||||
|
bld->mkOp2(OP_ADD, fTy, rr[2], rr[0], one)
|
||||||
|
->setPredicate(CC_C, cc[1]);
|
||||||
|
bld->mkMov(rr[3], rr[0])
|
||||||
|
->setPredicate(CC_NC, cc[1]);
|
||||||
|
bld->mkOp2(OP_UNION, fTy, rr[4], rr[2], rr[3]);
|
||||||
|
|
||||||
|
// Merge the results from the negative and non-negative paths
|
||||||
|
bld->mkMov(rr[5], rr[4])
|
||||||
|
->setPredicate(CC_S, cc[0]);
|
||||||
|
bld->mkMov(rr[6], r[4])
|
||||||
|
->setPredicate(CC_NS, cc[0]);
|
||||||
|
bld->mkOp2(OP_UNION, mul->sType, mul->getDef(0), rr[5], rr[6]);
|
||||||
|
} else {
|
||||||
|
bld->mkMov(mul->getDef(0), r[4]);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
bld->mkMov(mul->getDef(0), t[3]);
|
bld->mkMov(mul->getDef(0), t[3]);
|
||||||
}
|
}
|
||||||
@@ -591,6 +661,10 @@ void NV50LoweringPreSSA::loadTexMsInfo(uint32_t off, Value **ms,
|
|||||||
Value *tmp = new_LValue(func, FILE_GPR);
|
Value *tmp = new_LValue(func, FILE_GPR);
|
||||||
uint8_t b = prog->driver->io.resInfoCBSlot;
|
uint8_t b = prog->driver->io.resInfoCBSlot;
|
||||||
off += prog->driver->io.suInfoBase;
|
off += prog->driver->io.suInfoBase;
|
||||||
|
if (prog->getType() > Program::TYPE_VERTEX)
|
||||||
|
off += 16 * 2 * 4;
|
||||||
|
if (prog->getType() > Program::TYPE_GEOMETRY)
|
||||||
|
off += 16 * 2 * 4;
|
||||||
*ms_x = bld.mkLoadv(TYPE_U32, bld.mkSymbol(
|
*ms_x = bld.mkLoadv(TYPE_U32, bld.mkSymbol(
|
||||||
FILE_MEMORY_CONST, b, TYPE_U32, off + 0), NULL);
|
FILE_MEMORY_CONST, b, TYPE_U32, off + 0), NULL);
|
||||||
*ms_y = bld.mkLoadv(TYPE_U32, bld.mkSymbol(
|
*ms_y = bld.mkLoadv(TYPE_U32, bld.mkSymbol(
|
||||||
@@ -723,6 +797,16 @@ NV50LoweringPreSSA::handleTXB(TexInstruction *i)
|
|||||||
const CondCode cc[4] = { CC_EQU, CC_S, CC_C, CC_O };
|
const CondCode cc[4] = { CC_EQU, CC_S, CC_C, CC_O };
|
||||||
int l, d;
|
int l, d;
|
||||||
|
|
||||||
|
// We can't actually apply bias *and* do a compare for a cube
|
||||||
|
// texture. Since the compare has to be done before the filtering, just
|
||||||
|
// drop the bias on the floor.
|
||||||
|
if (i->tex.target == TEX_TARGET_CUBE_SHADOW) {
|
||||||
|
i->op = OP_TEX;
|
||||||
|
i->setSrc(3, i->getSrc(4));
|
||||||
|
i->setSrc(4, NULL);
|
||||||
|
return handleTEX(i);
|
||||||
|
}
|
||||||
|
|
||||||
handleTEX(i);
|
handleTEX(i);
|
||||||
Value *bias = i->getSrc(i->tex.target.getArgCount());
|
Value *bias = i->getSrc(i->tex.target.getArgCount());
|
||||||
if (bias->isUniform())
|
if (bias->isUniform())
|
||||||
@@ -1205,8 +1289,11 @@ NV50LoweringPreSSA::checkPredicate(Instruction *insn)
|
|||||||
Value *pred = insn->getPredicate();
|
Value *pred = insn->getPredicate();
|
||||||
Value *cdst;
|
Value *cdst;
|
||||||
|
|
||||||
if (!pred || pred->reg.file == FILE_FLAGS)
|
// FILE_PREDICATE will simply be changed to FLAGS on conversion to SSA
|
||||||
|
if (!pred ||
|
||||||
|
pred->reg.file == FILE_FLAGS || pred->reg.file == FILE_PREDICATE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cdst = bld.getSSA(1, FILE_FLAGS);
|
cdst = bld.getSSA(1, FILE_FLAGS);
|
||||||
|
|
||||||
bld.mkCmp(OP_SET, CC_NEU, insn->dType, cdst, insn->dType, bld.loadImm(NULL, 0), pred);
|
bld.mkCmp(OP_SET, CC_NEU, insn->dType, cdst, insn->dType, bld.loadImm(NULL, 0), pred);
|
||||||
|
@@ -26,6 +26,7 @@
|
|||||||
#include "codegen/nv50_ir_target_nvc0.h"
|
#include "codegen/nv50_ir_target_nvc0.h"
|
||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
#include <tr1/unordered_set>
|
||||||
|
|
||||||
namespace nv50_ir {
|
namespace nv50_ir {
|
||||||
|
|
||||||
@@ -148,7 +149,8 @@ private:
|
|||||||
bool insertTextureBarriers(Function *);
|
bool insertTextureBarriers(Function *);
|
||||||
inline bool insnDominatedBy(const Instruction *, const Instruction *) const;
|
inline bool insnDominatedBy(const Instruction *, const Instruction *) const;
|
||||||
void findFirstUses(const Instruction *tex, const Instruction *def,
|
void findFirstUses(const Instruction *tex, const Instruction *def,
|
||||||
std::list<TexUse>&);
|
std::list<TexUse>&,
|
||||||
|
std::tr1::unordered_set<const Instruction *>&);
|
||||||
void findOverwritingDefs(const Instruction *tex, Instruction *insn,
|
void findOverwritingDefs(const Instruction *tex, Instruction *insn,
|
||||||
const BasicBlock *term,
|
const BasicBlock *term,
|
||||||
std::list<TexUse>&);
|
std::list<TexUse>&);
|
||||||
@@ -230,15 +232,29 @@ NVC0LegalizePostRA::findOverwritingDefs(const Instruction *texi,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
NVC0LegalizePostRA::findFirstUses(const Instruction *texi,
|
NVC0LegalizePostRA::findFirstUses(
|
||||||
const Instruction *insn,
|
const Instruction *texi,
|
||||||
std::list<TexUse> &uses)
|
const Instruction *insn,
|
||||||
|
std::list<TexUse> &uses,
|
||||||
|
std::tr1::unordered_set<const Instruction *>& visited)
|
||||||
{
|
{
|
||||||
for (int d = 0; insn->defExists(d); ++d) {
|
for (int d = 0; insn->defExists(d); ++d) {
|
||||||
Value *v = insn->getDef(d);
|
Value *v = insn->getDef(d);
|
||||||
for (Value::UseIterator u = v->uses.begin(); u != v->uses.end(); ++u) {
|
for (Value::UseIterator u = v->uses.begin(); u != v->uses.end(); ++u) {
|
||||||
Instruction *usei = (*u)->getInsn();
|
Instruction *usei = (*u)->getInsn();
|
||||||
|
|
||||||
|
// NOTE: In case of a loop that overwrites a value but never uses
|
||||||
|
// it, it can happen that we have a cycle of uses that consists only
|
||||||
|
// of phis and no-op moves and will thus cause an infinite loop here
|
||||||
|
// since these are not considered actual uses.
|
||||||
|
// The most obvious (and perhaps the only) way to prevent this is to
|
||||||
|
// remember which instructions we've already visited.
|
||||||
|
|
||||||
|
if (visited.find(usei) != visited.end())
|
||||||
|
continue;
|
||||||
|
|
||||||
|
visited.insert(usei);
|
||||||
|
|
||||||
if (usei->op == OP_PHI || usei->op == OP_UNION) {
|
if (usei->op == OP_PHI || usei->op == OP_UNION) {
|
||||||
// need a barrier before WAW cases
|
// need a barrier before WAW cases
|
||||||
for (int s = 0; usei->srcExists(s); ++s) {
|
for (int s = 0; usei->srcExists(s); ++s) {
|
||||||
@@ -253,11 +269,11 @@ NVC0LegalizePostRA::findFirstUses(const Instruction *texi,
|
|||||||
usei->op == OP_PHI ||
|
usei->op == OP_PHI ||
|
||||||
usei->op == OP_UNION) {
|
usei->op == OP_UNION) {
|
||||||
// these uses don't manifest in the machine code
|
// these uses don't manifest in the machine code
|
||||||
findFirstUses(texi, usei, uses);
|
findFirstUses(texi, usei, uses, visited);
|
||||||
} else
|
} else
|
||||||
if (usei->op == OP_MOV && usei->getDef(0)->equals(usei->getSrc(0)) &&
|
if (usei->op == OP_MOV && usei->getDef(0)->equals(usei->getSrc(0)) &&
|
||||||
usei->subOp != NV50_IR_SUBOP_MOV_FINAL) {
|
usei->subOp != NV50_IR_SUBOP_MOV_FINAL) {
|
||||||
findFirstUses(texi, usei, uses);
|
findFirstUses(texi, usei, uses, visited);
|
||||||
} else {
|
} else {
|
||||||
addTexUse(uses, usei, insn);
|
addTexUse(uses, usei, insn);
|
||||||
}
|
}
|
||||||
@@ -313,8 +329,10 @@ NVC0LegalizePostRA::insertTextureBarriers(Function *fn)
|
|||||||
uses = new std::list<TexUse>[texes.size()];
|
uses = new std::list<TexUse>[texes.size()];
|
||||||
if (!uses)
|
if (!uses)
|
||||||
return false;
|
return false;
|
||||||
for (size_t i = 0; i < texes.size(); ++i)
|
for (size_t i = 0; i < texes.size(); ++i) {
|
||||||
findFirstUses(texes[i], texes[i], uses[i]);
|
std::tr1::unordered_set<const Instruction *> visited;
|
||||||
|
findFirstUses(texes[i], texes[i], uses[i], visited);
|
||||||
|
}
|
||||||
|
|
||||||
// determine the barrier level at each use
|
// determine the barrier level at each use
|
||||||
for (size_t i = 0; i < texes.size(); ++i) {
|
for (size_t i = 0; i < texes.size(); ++i) {
|
||||||
@@ -814,6 +832,7 @@ NVC0LoweringPass::handleManualTXD(TexInstruction *i)
|
|||||||
Value *zero = bld.loadImm(bld.getSSA(), 0);
|
Value *zero = bld.loadImm(bld.getSSA(), 0);
|
||||||
int l, c;
|
int l, c;
|
||||||
const int dim = i->tex.target.getDim();
|
const int dim = i->tex.target.getDim();
|
||||||
|
const int array = i->tex.target.isArray();
|
||||||
|
|
||||||
i->op = OP_TEX; // no need to clone dPdx/dPdy later
|
i->op = OP_TEX; // no need to clone dPdx/dPdy later
|
||||||
|
|
||||||
@@ -824,7 +843,7 @@ NVC0LoweringPass::handleManualTXD(TexInstruction *i)
|
|||||||
for (l = 0; l < 4; ++l) {
|
for (l = 0; l < 4; ++l) {
|
||||||
// mov coordinates from lane l to all lanes
|
// mov coordinates from lane l to all lanes
|
||||||
for (c = 0; c < dim; ++c)
|
for (c = 0; c < dim; ++c)
|
||||||
bld.mkQuadop(0x00, crd[c], l, i->getSrc(c), zero);
|
bld.mkQuadop(0x00, crd[c], l, i->getSrc(c + array), zero);
|
||||||
// add dPdx from lane l to lanes dx
|
// add dPdx from lane l to lanes dx
|
||||||
for (c = 0; c < dim; ++c)
|
for (c = 0; c < dim; ++c)
|
||||||
bld.mkQuadop(qOps[l][0], crd[c], l, i->dPdx[c].get(), crd[c]);
|
bld.mkQuadop(qOps[l][0], crd[c], l, i->dPdx[c].get(), crd[c]);
|
||||||
@@ -834,7 +853,7 @@ NVC0LoweringPass::handleManualTXD(TexInstruction *i)
|
|||||||
// texture
|
// texture
|
||||||
bld.insert(tex = cloneForward(func, i));
|
bld.insert(tex = cloneForward(func, i));
|
||||||
for (c = 0; c < dim; ++c)
|
for (c = 0; c < dim; ++c)
|
||||||
tex->setSrc(c, crd[c]);
|
tex->setSrc(c + array, crd[c]);
|
||||||
// save results
|
// save results
|
||||||
for (c = 0; i->defExists(c); ++c) {
|
for (c = 0; i->defExists(c); ++c) {
|
||||||
Instruction *mov;
|
Instruction *mov;
|
||||||
@@ -870,7 +889,8 @@ NVC0LoweringPass::handleTXD(TexInstruction *txd)
|
|||||||
if (dim > 2 ||
|
if (dim > 2 ||
|
||||||
txd->tex.target.isCube() ||
|
txd->tex.target.isCube() ||
|
||||||
arg > 4 ||
|
arg > 4 ||
|
||||||
txd->tex.target.isShadow())
|
txd->tex.target.isShadow() ||
|
||||||
|
txd->tex.useOffsets)
|
||||||
return handleManualTXD(txd);
|
return handleManualTXD(txd);
|
||||||
|
|
||||||
for (int c = 0; c < dim; ++c) {
|
for (int c = 0; c < dim; ++c) {
|
||||||
|
@@ -187,7 +187,8 @@ LoadPropagation::checkSwapSrc01(Instruction *insn)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (insn->op == OP_SET)
|
if (insn->op == OP_SET || insn->op == OP_SET_AND ||
|
||||||
|
insn->op == OP_SET_OR || insn->op == OP_SET_XOR)
|
||||||
insn->asCmp()->setCond = reverseCondCode(insn->asCmp()->setCond);
|
insn->asCmp()->setCond = reverseCondCode(insn->asCmp()->setCond);
|
||||||
else
|
else
|
||||||
if (insn->op == OP_SLCT)
|
if (insn->op == OP_SLCT)
|
||||||
@@ -424,7 +425,17 @@ ConstantFolding::expr(Instruction *i,
|
|||||||
case TYPE_F32: res.data.f32 = a->data.f32 * b->data.f32; break;
|
case TYPE_F32: res.data.f32 = a->data.f32 * b->data.f32; break;
|
||||||
case TYPE_F64: res.data.f64 = a->data.f64 * b->data.f64; break;
|
case TYPE_F64: res.data.f64 = a->data.f64 * b->data.f64; break;
|
||||||
case TYPE_S32:
|
case TYPE_S32:
|
||||||
case TYPE_U32: res.data.u32 = a->data.u32 * b->data.u32; break;
|
if (i->subOp == NV50_IR_SUBOP_MUL_HIGH) {
|
||||||
|
res.data.s32 = ((int64_t)a->data.s32 * b->data.s32) >> 32;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* fallthrough */
|
||||||
|
case TYPE_U32:
|
||||||
|
if (i->subOp == NV50_IR_SUBOP_MUL_HIGH) {
|
||||||
|
res.data.u32 = ((uint64_t)a->data.u32 * b->data.u32) >> 32;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
res.data.u32 = a->data.u32 * b->data.u32; break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -549,9 +560,14 @@ ConstantFolding::expr(Instruction *i,
|
|||||||
ImmediateValue src0;
|
ImmediateValue src0;
|
||||||
if (i->src(0).getImmediate(src0))
|
if (i->src(0).getImmediate(src0))
|
||||||
expr(i, src0, *i->getSrc(1)->asImm());
|
expr(i, src0, *i->getSrc(1)->asImm());
|
||||||
|
if (i->saturate && !prog->getTarget()->isSatSupported(i)) {
|
||||||
|
bld.setPosition(i, false);
|
||||||
|
i->setSrc(1, bld.loadImm(NULL, res.data.u32));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
i->op = OP_MOV;
|
i->op = i->saturate ? OP_SAT : OP_MOV; /* SAT handled by unary() */
|
||||||
}
|
}
|
||||||
|
i->subOp = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -601,6 +617,7 @@ ConstantFolding::unary(Instruction *i, const ImmediateValue &imm)
|
|||||||
switch (i->op) {
|
switch (i->op) {
|
||||||
case OP_NEG: res.data.f32 = -imm.reg.data.f32; break;
|
case OP_NEG: res.data.f32 = -imm.reg.data.f32; break;
|
||||||
case OP_ABS: res.data.f32 = fabsf(imm.reg.data.f32); break;
|
case OP_ABS: res.data.f32 = fabsf(imm.reg.data.f32); break;
|
||||||
|
case OP_SAT: res.data.f32 = CLAMP(imm.reg.data.f32, 0.0f, 1.0f); break;
|
||||||
case OP_RCP: res.data.f32 = 1.0f / imm.reg.data.f32; break;
|
case OP_RCP: res.data.f32 = 1.0f / imm.reg.data.f32; break;
|
||||||
case OP_RSQ: res.data.f32 = 1.0f / sqrtf(imm.reg.data.f32); break;
|
case OP_RSQ: res.data.f32 = 1.0f / sqrtf(imm.reg.data.f32); break;
|
||||||
case OP_LG2: res.data.f32 = log2f(imm.reg.data.f32); break;
|
case OP_LG2: res.data.f32 = log2f(imm.reg.data.f32); break;
|
||||||
@@ -690,12 +707,41 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
|
|||||||
{
|
{
|
||||||
const int t = !s;
|
const int t = !s;
|
||||||
const operation op = i->op;
|
const operation op = i->op;
|
||||||
|
Instruction *newi = i;
|
||||||
|
|
||||||
switch (i->op) {
|
switch (i->op) {
|
||||||
case OP_MUL:
|
case OP_MUL:
|
||||||
if (i->dType == TYPE_F32)
|
if (i->dType == TYPE_F32)
|
||||||
tryCollapseChainedMULs(i, s, imm0);
|
tryCollapseChainedMULs(i, s, imm0);
|
||||||
|
|
||||||
|
if (i->subOp == NV50_IR_SUBOP_MUL_HIGH) {
|
||||||
|
assert(!isFloatType(i->sType));
|
||||||
|
if (imm0.isInteger(1) && i->dType == TYPE_S32) {
|
||||||
|
bld.setPosition(i, false);
|
||||||
|
// Need to set to the sign value, which is a compare.
|
||||||
|
newi = bld.mkCmp(OP_SET, CC_LT, TYPE_S32, i->getDef(0),
|
||||||
|
TYPE_S32, i->getSrc(t), bld.mkImm(0));
|
||||||
|
delete_Instruction(prog, i);
|
||||||
|
} else if (imm0.isInteger(0) || imm0.isInteger(1)) {
|
||||||
|
// The high bits can't be set in this case (either mul by 0 or
|
||||||
|
// unsigned by 1)
|
||||||
|
i->op = OP_MOV;
|
||||||
|
i->subOp = 0;
|
||||||
|
i->setSrc(0, new_ImmediateValue(prog, 0u));
|
||||||
|
i->src(0).mod = Modifier(0);
|
||||||
|
i->setSrc(1, NULL);
|
||||||
|
} else if (!imm0.isNegative() && imm0.isPow2()) {
|
||||||
|
// Translate into a shift
|
||||||
|
imm0.applyLog2();
|
||||||
|
i->op = OP_SHR;
|
||||||
|
i->subOp = 0;
|
||||||
|
imm0.reg.data.u32 = 32 - imm0.reg.data.u32;
|
||||||
|
i->setSrc(0, i->getSrc(t));
|
||||||
|
i->src(0).mod = i->src(t).mod;
|
||||||
|
i->setSrc(1, new_ImmediateValue(prog, imm0.reg.data.u32));
|
||||||
|
i->src(1).mod = 0;
|
||||||
|
}
|
||||||
|
} else
|
||||||
if (imm0.isInteger(0)) {
|
if (imm0.isInteger(0)) {
|
||||||
i->op = OP_MOV;
|
i->op = OP_MOV;
|
||||||
i->setSrc(0, new_ImmediateValue(prog, 0u));
|
i->setSrc(0, new_ImmediateValue(prog, 0u));
|
||||||
@@ -786,7 +832,7 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
|
|||||||
else
|
else
|
||||||
tA = tB;
|
tA = tB;
|
||||||
tB = s ? bld.getSSA() : i->getDef(0);
|
tB = s ? bld.getSSA() : i->getDef(0);
|
||||||
bld.mkOp2(OP_ADD, TYPE_U32, tB, mul->getDef(0), tA);
|
newi = bld.mkOp2(OP_ADD, TYPE_U32, tB, mul->getDef(0), tA);
|
||||||
if (s)
|
if (s)
|
||||||
bld.mkOp2(OP_SHR, TYPE_U32, i->getDef(0), tB, bld.mkImm(s));
|
bld.mkOp2(OP_SHR, TYPE_U32, i->getDef(0), tB, bld.mkImm(s));
|
||||||
|
|
||||||
@@ -818,7 +864,7 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
|
|||||||
tA = bld.getSSA();
|
tA = bld.getSSA();
|
||||||
bld.mkCmp(OP_SET, CC_LT, TYPE_S32, tA, TYPE_S32, i->getSrc(0), bld.mkImm(0));
|
bld.mkCmp(OP_SET, CC_LT, TYPE_S32, tA, TYPE_S32, i->getSrc(0), bld.mkImm(0));
|
||||||
tD = (d < 0) ? bld.getSSA() : i->getDef(0)->asLValue();
|
tD = (d < 0) ? bld.getSSA() : i->getDef(0)->asLValue();
|
||||||
bld.mkOp2(OP_SUB, TYPE_U32, tD, tB, tA);
|
newi = bld.mkOp2(OP_SUB, TYPE_U32, tD, tB, tA);
|
||||||
if (d < 0)
|
if (d < 0)
|
||||||
bld.mkOp1(OP_NEG, TYPE_S32, i->getDef(0), tB);
|
bld.mkOp1(OP_NEG, TYPE_S32, i->getDef(0), tB);
|
||||||
|
|
||||||
@@ -882,6 +928,7 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
|
|||||||
|
|
||||||
case OP_ABS:
|
case OP_ABS:
|
||||||
case OP_NEG:
|
case OP_NEG:
|
||||||
|
case OP_SAT:
|
||||||
case OP_LG2:
|
case OP_LG2:
|
||||||
case OP_RCP:
|
case OP_RCP:
|
||||||
case OP_SQRT:
|
case OP_SQRT:
|
||||||
@@ -896,7 +943,7 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
|
|||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (i->op != op)
|
if (newi->op != op)
|
||||||
foldCount++;
|
foldCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#include <stack>
|
#include <stack>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
#include <tr1/unordered_set>
|
||||||
|
|
||||||
namespace nv50_ir {
|
namespace nv50_ir {
|
||||||
|
|
||||||
@@ -998,7 +999,9 @@ GCRA::doCoalesce(ArrayList& insns, unsigned int mask)
|
|||||||
case OP_TXQ:
|
case OP_TXQ:
|
||||||
case OP_TXD:
|
case OP_TXD:
|
||||||
case OP_TXG:
|
case OP_TXG:
|
||||||
|
case OP_TXLQ:
|
||||||
case OP_TEXCSAA:
|
case OP_TEXCSAA:
|
||||||
|
case OP_TEXPREP:
|
||||||
if (!(mask & JOIN_MASK_TEX))
|
if (!(mask & JOIN_MASK_TEX))
|
||||||
break;
|
break;
|
||||||
for (c = 0; insn->srcExists(c) && c != insn->predSrc; ++c)
|
for (c = 0; insn->srcExists(c) && c != insn->predSrc; ++c)
|
||||||
@@ -1542,6 +1545,11 @@ SpillCodeInserter::run(const std::list<ValuePair>& lst)
|
|||||||
LValue *lval = it->first->asLValue();
|
LValue *lval = it->first->asLValue();
|
||||||
Symbol *mem = it->second ? it->second->asSym() : NULL;
|
Symbol *mem = it->second ? it->second->asSym() : NULL;
|
||||||
|
|
||||||
|
// Keep track of which instructions to delete later. Deleting them
|
||||||
|
// inside the loop is unsafe since a single instruction may have
|
||||||
|
// multiple destinations that all need to be spilled (like OP_SPLIT).
|
||||||
|
std::tr1::unordered_set<Instruction *> to_del;
|
||||||
|
|
||||||
for (Value::DefIterator d = lval->defs.begin(); d != lval->defs.end();
|
for (Value::DefIterator d = lval->defs.begin(); d != lval->defs.end();
|
||||||
++d) {
|
++d) {
|
||||||
Value *slot = mem ?
|
Value *slot = mem ?
|
||||||
@@ -1574,7 +1582,7 @@ SpillCodeInserter::run(const std::list<ValuePair>& lst)
|
|||||||
d = lval->defs.erase(d);
|
d = lval->defs.erase(d);
|
||||||
--d;
|
--d;
|
||||||
if (slot->reg.file == FILE_MEMORY_LOCAL)
|
if (slot->reg.file == FILE_MEMORY_LOCAL)
|
||||||
delete_Instruction(func->getProgram(), defi);
|
to_del.insert(defi);
|
||||||
else
|
else
|
||||||
defi->setDef(0, slot);
|
defi->setDef(0, slot);
|
||||||
} else {
|
} else {
|
||||||
@@ -1582,6 +1590,9 @@ SpillCodeInserter::run(const std::list<ValuePair>& lst)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (std::tr1::unordered_set<Instruction *>::const_iterator it = to_del.begin();
|
||||||
|
it != to_del.end(); ++it)
|
||||||
|
delete_Instruction(func->getProgram(), *it);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: We're not trying to reuse old slots in a potential next iteration.
|
// TODO: We're not trying to reuse old slots in a potential next iteration.
|
||||||
@@ -1652,6 +1663,10 @@ RegAlloc::execFunc()
|
|||||||
ret && i <= func->loopNestingBound;
|
ret && i <= func->loopNestingBound;
|
||||||
sequence = func->cfg.nextSequence(), ++i)
|
sequence = func->cfg.nextSequence(), ++i)
|
||||||
ret = buildLiveSets(BasicBlock::get(func->cfg.getRoot()));
|
ret = buildLiveSets(BasicBlock::get(func->cfg.getRoot()));
|
||||||
|
// reset marker
|
||||||
|
for (ArrayList::Iterator bi = func->allBBlocks.iterator();
|
||||||
|
!bi.end(); bi.next())
|
||||||
|
BasicBlock::get(bi)->liveSet.marker = false;
|
||||||
if (!ret)
|
if (!ret)
|
||||||
break;
|
break;
|
||||||
func->orderInstructions(this->insns);
|
func->orderInstructions(this->insns);
|
||||||
|
@@ -331,6 +331,8 @@ TargetNV50::insnCanLoad(const Instruction *i, int s,
|
|||||||
return false;
|
return false;
|
||||||
if (sf == FILE_IMMEDIATE)
|
if (sf == FILE_IMMEDIATE)
|
||||||
return false;
|
return false;
|
||||||
|
if (i->subOp == NV50_IR_SUBOP_MUL_HIGH && sf == FILE_MEMORY_CONST)
|
||||||
|
return false;
|
||||||
ldSize = 2;
|
ldSize = 2;
|
||||||
} else {
|
} else {
|
||||||
ldSize = typeSizeof(ld->dType);
|
ldSize = typeSizeof(ld->dType);
|
||||||
@@ -446,7 +448,7 @@ TargetNV50::isModSupported(const Instruction *insn, int s, Modifier mod) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (s > 3)
|
if (s >= 3)
|
||||||
return false;
|
return false;
|
||||||
return (mod & Modifier(opInfo[insn->op].srcMods[s])) == mod;
|
return (mod & Modifier(opInfo[insn->op].srcMods[s])) == mod;
|
||||||
}
|
}
|
||||||
|
@@ -417,7 +417,7 @@ TargetNVC0::isModSupported(const Instruction *insn, int s, Modifier mod) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (s > 3)
|
if (s >= 3)
|
||||||
return false;
|
return false;
|
||||||
return (mod & Modifier(opInfo[insn->op].srcMods[s])) == mod;
|
return (mod & Modifier(opInfo[insn->op].srcMods[s])) == mod;
|
||||||
}
|
}
|
||||||
|
@@ -254,7 +254,9 @@ bool BitSet::resize(unsigned int nBits)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (n > p)
|
if (n > p)
|
||||||
memset(&data[4 * p + 4], 0, (n - p) * 4);
|
memset(&data[p], 0, (n - p) * 4);
|
||||||
|
if (nBits < size && (nBits % 32))
|
||||||
|
data[(nBits + 31) / 32 - 1] &= (1 << (nBits % 32)) - 1;
|
||||||
|
|
||||||
size = nBits;
|
size = nBits;
|
||||||
return true;
|
return true;
|
||||||
@@ -274,8 +276,8 @@ bool BitSet::allocate(unsigned int nBits, bool zero)
|
|||||||
if (zero)
|
if (zero)
|
||||||
memset(data, 0, (size + 7) / 8);
|
memset(data, 0, (size + 7) / 8);
|
||||||
else
|
else
|
||||||
if (nBits)
|
if (size % 32) // clear unused bits (e.g. for popCount)
|
||||||
data[(size + 31) / 32 - 1] = 0; // clear unused bits (e.g. for popCount)
|
data[(size + 31) / 32 - 1] &= (1 << (size % 32)) - 1;
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
@@ -484,6 +484,7 @@ public:
|
|||||||
FREE(data);
|
FREE(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// allocate will keep old data iff size is unchanged
|
||||||
bool allocate(unsigned int nBits, bool zero);
|
bool allocate(unsigned int nBits, bool zero);
|
||||||
bool resize(unsigned int nBits); // keep old data, zero additional bits
|
bool resize(unsigned int nBits); // keep old data, zero additional bits
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user