Compare commits
317 Commits
mesa-10.4.
...
10.3
Author | SHA1 | Date | |
---|---|---|---|
|
20e0546cc2 | ||
|
6b00e5585a | ||
|
e342f82fff | ||
|
e635510ce3 | ||
|
2c26f5cc96 | ||
|
9bfdf3ae51 | ||
|
9fbacc1945 | ||
|
71cd8f1388 | ||
|
87017f210d | ||
|
8f22574e89 | ||
|
3bcde5a954 | ||
|
6ecffc89fd | ||
|
4b1332dbf8 | ||
|
2e49560a5c | ||
|
d28a758e44 | ||
|
2836d47791 | ||
|
78a134c04e | ||
|
5878e18ac7 | ||
|
f19fc096e6 | ||
|
d81e14d29f | ||
|
43f1ad921a | ||
|
da8cde2f21 | ||
|
d332e5046e | ||
|
0af41beaf7 | ||
|
c085fcd2f2 | ||
|
6915d30307 | ||
|
87eaad80c9 | ||
|
cb40b69053 | ||
|
b7fe1ebaa9 | ||
|
dd5ffb2d31 | ||
|
103fadef9d | ||
|
9014544f72 | ||
|
582c58d033 | ||
|
1ba2029184 | ||
|
c90b0db1ae | ||
|
dcebfa031f | ||
|
b7c2711e40 | ||
|
0810238cf2 | ||
|
d859a98f83 | ||
|
fd1610d542 | ||
|
4739c7766d | ||
|
f097e21228 | ||
|
abccf91e5e | ||
|
4aafdf30ba | ||
|
d9e1ba575d | ||
|
e9518d8f30 | ||
|
2cf9c539c3 | ||
|
72c27d7a3a | ||
|
26c8ecd85d | ||
|
263c87ecdb | ||
|
b43792f679 | ||
|
8b5e53434c | ||
|
0512b9839d | ||
|
96c0d50398 | ||
|
410a6bae6a | ||
|
9bd73a81d9 | ||
|
c44aa54d2c | ||
|
864f604bb1 | ||
|
f02f0559c6 | ||
|
b8da681864 | ||
|
cfa85fe5e5 | ||
|
e607d2df46 | ||
|
f285c7eaaf | ||
|
9cc26056ee | ||
|
1a9cc5f50d | ||
|
3be619f4b4 | ||
|
d5700dc276 | ||
|
d5ada3364f | ||
|
36b7043611 | ||
|
894ac63c34 | ||
|
d26258166c | ||
|
e8c7affa66 | ||
|
62b2c8aca0 | ||
|
e71a41852b | ||
|
136ab97b46 | ||
|
4956788a5f | ||
|
bcf414c1a8 | ||
|
d45d00cf38 | ||
|
4ed4dec642 | ||
|
a3d5e59563 | ||
|
69ac2043cf | ||
|
eaff221c9c | ||
|
a95a93b557 | ||
|
b0d6ba5970 | ||
|
b379e36e64 | ||
|
d6aab6b0c9 | ||
|
5b76a32132 | ||
|
708ee6f188 | ||
|
971ae04fe6 | ||
|
64373f072c | ||
|
9ea0efd1e2 | ||
|
bc96be5662 | ||
|
323380b7ed | ||
|
832cb958ff | ||
|
8a61e39531 | ||
|
4b30efcf99 | ||
|
bce1e7e1c9 | ||
|
bce2d42ddb | ||
|
7e81f4a7e7 | ||
|
63b8a08c45 | ||
|
4a97401abf | ||
|
dd79de214d | ||
|
1acdeab8a4 | ||
|
64e4ac780e | ||
|
5bc1397bda | ||
|
3b1a59259b | ||
|
74a92b1f34 | ||
|
af52b00b19 | ||
|
556d74b810 | ||
|
502c295025 | ||
|
c4f58245d0 | ||
|
eb496ff68d | ||
|
e8820c85b4 | ||
|
da71ef1893 | ||
|
0a003d1dbc | ||
|
3b755280af | ||
|
476c8c5028 | ||
|
6d5a3daca9 | ||
|
4d20bc6e8d | ||
|
f1fd768b98 | ||
|
d37c083778 | ||
|
b46151f2ca | ||
|
419acd3068 | ||
|
64ce1bf8f6 | ||
|
e67e5c6582 | ||
|
d654082d14 | ||
|
1a7fb8f04a | ||
|
fb10a43b84 | ||
|
e1c2a8f2cb | ||
|
0b339336b5 | ||
|
00c3ef169f | ||
|
f61b2185db | ||
|
637ddce9cc | ||
|
737c900506 | ||
|
336b75faca | ||
|
7f6c0f4de4 | ||
|
1a755fcc3a | ||
|
2a90f0fb85 | ||
|
3a64feedb8 | ||
|
544a368626 | ||
|
e10a243abf | ||
|
a3f6e58d6d | ||
|
14f6eb92f8 | ||
|
c3ee102f8e | ||
|
1c160747d0 | ||
|
c912acad17 | ||
|
81bd498908 | ||
|
6244af1343 | ||
|
5af1301751 | ||
|
3f545b96e5 | ||
|
69c1aa728d | ||
|
1d1bc7f7c2 | ||
|
34b62bd12e | ||
|
695a4b2b4e | ||
|
0e9bb8efe4 | ||
|
1a36639b06 | ||
|
06d5717692 | ||
|
852bb5dd62 | ||
|
b2c855b7f9 | ||
|
91f9cbc996 | ||
|
852da37330 | ||
|
ea955ffd4d | ||
|
9995edb700 | ||
|
8dfb9773c4 | ||
|
e90f0daaaa | ||
|
7fded6b548 | ||
|
5e5b48b10e | ||
|
d1794194f6 | ||
|
9599470642 | ||
|
3b6a4758fa | ||
|
e0aaa9591b | ||
|
724f71ef39 | ||
|
6fa07d1d48 | ||
|
8f6f6a28fa | ||
|
10d8287074 | ||
|
c759d1b6bf | ||
|
b37c1d4642 | ||
|
fb20a5aa98 | ||
|
4f33ded115 | ||
|
13a4fd2430 | ||
|
5e6ee119c0 | ||
|
85d7eb730a | ||
|
64c2bdc334 | ||
|
125cd86cd4 | ||
|
e3e68a36db | ||
|
745a0bfd62 | ||
|
ada5fd6e85 | ||
|
ecd2d078ac | ||
|
08f7e3591d | ||
|
fa98c74692 | ||
|
088d350178 | ||
|
85421100fb | ||
|
c90cd077bd | ||
|
dffbee6668 | ||
|
58ba481e8e | ||
|
ccf908e382 | ||
|
ed440234d4 | ||
|
d95520d297 | ||
|
3e980357c5 | ||
|
384816c6db | ||
|
d556ed889d | ||
|
d9444533aa | ||
|
9328440ef7 | ||
|
1ac204121b | ||
|
fef6059a81 | ||
|
34809f8eef | ||
|
9a79018840 | ||
|
5aff846a60 | ||
|
fb4e23626f | ||
|
607d0b9578 | ||
|
4fce87bcee | ||
|
8e2d0f59f7 | ||
|
4748d2f065 | ||
|
f74bca93b4 | ||
|
ceebec140b | ||
|
095a6a0af1 | ||
|
04a9d7d44a | ||
|
d4289fc37b | ||
|
9599cd6a2f | ||
|
27f70a9273 | ||
|
0a6e33ea74 | ||
|
18571edea8 | ||
|
1b12af300d | ||
|
4c4846b588 | ||
|
e471841048 | ||
|
f86efb4285 | ||
|
84a58f462a | ||
|
605734780e | ||
|
efe8fc687d | ||
|
051543962f | ||
|
b92ea2a10d | ||
|
b0131d951b | ||
|
0c1f24b46c | ||
|
a4d4ab929e | ||
|
2b43d48509 | ||
|
62f56a08af | ||
|
a3c52ce0b4 | ||
|
6c562f3d1a | ||
|
6240628e05 | ||
|
0f4dc09807 | ||
|
eeba3c94b1 | ||
|
0eeec2871d | ||
|
8f1ccf3577 | ||
|
8e05b2bfae | ||
|
997f634c33 | ||
|
a58ae20536 | ||
|
80f93d6937 | ||
|
860af662fa | ||
|
10aee701ae | ||
|
afe5db3293 | ||
|
d9df31cc6e | ||
|
f009cb080e | ||
|
09a763bea5 | ||
|
9c5ffa7f7a | ||
|
31414ada14 | ||
|
002c284fb4 | ||
|
73192345c3 | ||
|
6bc4331c8e | ||
|
72d8ebb7fb | ||
|
9f67c26d1b | ||
|
07426ad102 | ||
|
414de21449 | ||
|
31adc40680 | ||
|
a318e2f383 | ||
|
3a49ccc134 | ||
|
b148cd6586 | ||
|
7fb0fed989 | ||
|
8e551f4220 | ||
|
bb06f2cd93 | ||
|
d3745890c6 | ||
|
7a2018b968 | ||
|
4e1ca4a190 | ||
|
06f1f1ea81 | ||
|
e842a02df3 | ||
|
96bca3617c | ||
|
c221e96a13 | ||
|
640ddefd96 | ||
|
7cd0fa023e | ||
|
cd94c64421 | ||
|
e9923b2194 | ||
|
2e56334a2a | ||
|
ead7f72a2c | ||
|
139d176f54 | ||
|
941b2ae35f | ||
|
4b38838ef4 | ||
|
3fdd08c9b4 | ||
|
f8ff31e528 | ||
|
ab53a29892 | ||
|
4073e96a3b | ||
|
4eed41b967 | ||
|
c546523b4d | ||
|
282a3098e6 | ||
|
ec4a333c37 | ||
|
35bb6b058c | ||
|
24e226d0f5 | ||
|
39ad62ce51 | ||
|
f2b2309281 | ||
|
a4b3c4e3ec | ||
|
01dda9d0bd | ||
|
49cd42aab1 | ||
|
eaa9e14ce5 | ||
|
58be4ab741 | ||
|
447785af9d | ||
|
390a9f6cb7 | ||
|
0fbb9a599d | ||
|
2310a4b4cf | ||
|
8ef3d4fe03 | ||
|
0c67167370 | ||
|
60f136eed9 | ||
|
d2fb1da46d | ||
|
627d31dc36 | ||
|
e4f54d8b47 | ||
|
2edc941e75 | ||
|
eb96819386 | ||
|
f2a1b7d508 | ||
|
53728f60aa | ||
|
04c3c03682 |
@@ -102,4 +102,4 @@ checksums: $(ARCHIVES)
|
||||
@-sha256sum $(PACKAGE_NAME).tar.bz2
|
||||
@-sha256sum $(PACKAGE_NAME).zip
|
||||
|
||||
.PHONY: tarballs checksums
|
||||
.PHONY: tarballs md5
|
||||
|
@@ -1,2 +0,0 @@
|
||||
# No whitespace commits in stable.
|
||||
a10bf5c10caf27232d4df8da74d5c35c23eb883d
|
@@ -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
|
||||
|
||||
# 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\.3.*mesa-stable\)' HEAD..origin/master |\
|
||||
while read sha
|
||||
do
|
||||
# Check to see whether the patch is on the ignore list.
|
||||
|
425
configure.ac
425
configure.ac
@@ -41,7 +41,6 @@ GLPROTO_REQUIRED=1.4.14
|
||||
LIBOMXIL_BELLAGIO_REQUIRED=0.0
|
||||
VDPAU_REQUIRED=0.4.1
|
||||
WAYLAND_REQUIRED=1.2.0
|
||||
XCB_REQUIRED=1.9.3
|
||||
XCBDRI2_REQUIRED=1.8
|
||||
XCBGLX_REQUIRED=1.8.1
|
||||
XSHMFENCE_REQUIRED=1.1
|
||||
@@ -53,13 +52,11 @@ AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AM_PROG_CC_C_O
|
||||
AM_PROG_AS
|
||||
AX_CHECK_GNU_MAKE
|
||||
AC_CHECK_PROGS([MAKE], [gmake make])
|
||||
AC_CHECK_PROGS([PYTHON2], [python2 python])
|
||||
AC_PROG_SED
|
||||
AC_PROG_MKDIR_P
|
||||
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
LT_PREREQ([2.2])
|
||||
LT_INIT([disable-static])
|
||||
|
||||
@@ -70,6 +67,8 @@ AX_PROG_FLEX([],
|
||||
AS_IF([test ! -f "$srcdir/src/glsl/glcpp/glcpp-lex.c"],
|
||||
[AC_MSG_ERROR([flex not found - unable to compile glcpp-lex.l])]))
|
||||
|
||||
AC_PATH_PROG([PERL], [perl])
|
||||
|
||||
AC_CHECK_PROG(INDENT, indent, indent, cat)
|
||||
if test "x$INDENT" != "xcat"; then
|
||||
AC_SUBST(INDENT_FLAGS, '-i4 -nut -br -brs -npcs -ce -TGLubyte -TGLbyte -TBool')
|
||||
@@ -130,20 +129,6 @@ fi
|
||||
dnl Check for compiler builtins
|
||||
AX_GCC_BUILTIN([__builtin_bswap32])
|
||||
AX_GCC_BUILTIN([__builtin_bswap64])
|
||||
AX_GCC_BUILTIN([__builtin_clz])
|
||||
AX_GCC_BUILTIN([__builtin_clzll])
|
||||
AX_GCC_BUILTIN([__builtin_ctz])
|
||||
AX_GCC_BUILTIN([__builtin_expect])
|
||||
AX_GCC_BUILTIN([__builtin_ffs])
|
||||
AX_GCC_BUILTIN([__builtin_ffsll])
|
||||
AX_GCC_BUILTIN([__builtin_popcount])
|
||||
AX_GCC_BUILTIN([__builtin_popcountll])
|
||||
AX_GCC_BUILTIN([__builtin_unreachable])
|
||||
|
||||
AX_GCC_FUNC_ATTRIBUTE([flatten])
|
||||
AX_GCC_FUNC_ATTRIBUTE([format])
|
||||
AX_GCC_FUNC_ATTRIBUTE([malloc])
|
||||
AX_GCC_FUNC_ATTRIBUTE([packed])
|
||||
|
||||
AM_CONDITIONAL([GEN_ASM_OFFSETS], test "x$GEN_ASM_OFFSETS" = xyes)
|
||||
|
||||
@@ -168,13 +153,13 @@ DEFINES="-DUSE_EXTERNAL_DXTN_LIB=1"
|
||||
AC_SUBST([DEFINES])
|
||||
case "$host_os" in
|
||||
linux*|*-gnu*|gnu*)
|
||||
DEFINES="$DEFINES -D_GNU_SOURCE"
|
||||
DEFINES="$DEFINES -D_GNU_SOURCE -DHAVE_PTHREAD"
|
||||
;;
|
||||
solaris*)
|
||||
DEFINES="$DEFINES -DSVR4"
|
||||
DEFINES="$DEFINES -DHAVE_PTHREAD -DSVR4"
|
||||
;;
|
||||
cygwin*)
|
||||
DEFINES="$DEFINES -D_XOPEN_SOURCE=700"
|
||||
DEFINES="$DEFINES -D_XOPEN_SOURCE=700 -DHAVE_PTHREAD"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -252,16 +237,8 @@ AC_SUBST([VISIBILITY_CXXFLAGS])
|
||||
dnl
|
||||
dnl Optional flags, check for compiler support
|
||||
dnl
|
||||
SSE41_CFLAGS="-msse4.1"
|
||||
dnl Code compiled by GCC with -msse* assumes a 16 byte aligned
|
||||
dnl stack, but on x86-32 such alignment is not guaranteed.
|
||||
case "$target_cpu" in
|
||||
i?86)
|
||||
SSE41_CFLAGS="$SSE41_CFLAGS -mstackrealign"
|
||||
;;
|
||||
esac
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$SSE41_CFLAGS $CFLAGS"
|
||||
CFLAGS="-msse4.1 $CFLAGS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <smmintrin.h>
|
||||
int main () {
|
||||
@@ -274,7 +251,6 @@ if test "x$SSE41_SUPPORTED" = x1; then
|
||||
DEFINES="$DEFINES -DUSE_SSE41"
|
||||
fi
|
||||
AM_CONDITIONAL([SSE41_SUPPORTED], [test x$SSE41_SUPPORTED = x1])
|
||||
AC_SUBST([SSE41_CFLAGS], $SSE41_CFLAGS)
|
||||
|
||||
dnl Can't have static and shared libraries, default to static if user
|
||||
dnl explicitly requested. If both disabled, set to static since shared
|
||||
@@ -492,7 +468,7 @@ asm_arch=""
|
||||
AC_MSG_CHECKING([whether to enable assembly])
|
||||
test "x$enable_asm" = xno && AC_MSG_RESULT([no])
|
||||
# disable if cross compiling on x86/x86_64 since we must run gen_matypes
|
||||
if test "x$enable_asm" = xyes -a "x$cross_compiling" = xyes; then
|
||||
if test "x$enable_asm" = xyes && test "x$cross_compiling" = xyes; then
|
||||
case "$host_cpu" in
|
||||
i?86 | x86_64 | amd64)
|
||||
enable_asm=no
|
||||
@@ -545,9 +521,6 @@ if test "x$enable_asm" = xyes; then
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER([xlocale.h], [DEFINES="$DEFINES -DHAVE_XLOCALE_H"])
|
||||
AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
|
||||
|
||||
dnl Check to see if dlopen is in default libraries (like Solaris, which
|
||||
dnl has it in libc), or if libdl is needed to get it.
|
||||
AC_CHECK_FUNC([dlopen], [DEFINES="$DEFINES -DHAVE_DLOPEN"],
|
||||
@@ -609,22 +582,22 @@ AC_SUBST([SELINUX_LIBS])
|
||||
dnl Options for APIs
|
||||
AC_ARG_ENABLE([opengl],
|
||||
[AS_HELP_STRING([--disable-opengl],
|
||||
[disable support for standard OpenGL API @<:@default=enabled@:>@])],
|
||||
[disable support for standard OpenGL API @<:@default=no@:>@])],
|
||||
[enable_opengl="$enableval"],
|
||||
[enable_opengl=yes])
|
||||
AC_ARG_ENABLE([gles1],
|
||||
[AS_HELP_STRING([--enable-gles1],
|
||||
[enable support for OpenGL ES 1.x API @<:@default=disabled@:>@])],
|
||||
[enable support for OpenGL ES 1.x API @<:@default=no@:>@])],
|
||||
[enable_gles1="$enableval"],
|
||||
[enable_gles1=no])
|
||||
AC_ARG_ENABLE([gles2],
|
||||
[AS_HELP_STRING([--enable-gles2],
|
||||
[enable support for OpenGL ES 2.x API @<:@default=disabled@:>@])],
|
||||
[enable support for OpenGL ES 2.x API @<:@default=no@:>@])],
|
||||
[enable_gles2="$enableval"],
|
||||
[enable_gles2=no])
|
||||
AC_ARG_ENABLE([openvg],
|
||||
[AS_HELP_STRING([--enable-openvg],
|
||||
[enable support for OpenVG API @<:@default=disabled@:>@])],
|
||||
[enable support for OpenVG API @<:@default=no@:>@])],
|
||||
[enable_openvg="$enableval"],
|
||||
[enable_openvg=no])
|
||||
|
||||
@@ -670,7 +643,7 @@ AC_ARG_ENABLE([egl],
|
||||
|
||||
AC_ARG_ENABLE([xa],
|
||||
[AS_HELP_STRING([--enable-xa],
|
||||
[enable build of the XA X Acceleration API @<:@default=disabled@:>@])],
|
||||
[enable build of the XA X Acceleration API @<:@default=no@:>@])],
|
||||
[enable_xa="$enableval"],
|
||||
[enable_xa=no])
|
||||
AC_ARG_ENABLE([gbm],
|
||||
@@ -678,17 +651,12 @@ AC_ARG_ENABLE([gbm],
|
||||
[enable gbm library @<:@default=auto@:>@])],
|
||||
[enable_gbm="$enableval"],
|
||||
[enable_gbm=auto])
|
||||
AC_ARG_ENABLE([nine],
|
||||
[AS_HELP_STRING([--enable-nine],
|
||||
[enable build of the nine Direct3D9 API @<:@default=no@:>@])],
|
||||
[enable_nine="$enableval"],
|
||||
[enable_nine=no])
|
||||
|
||||
AC_ARG_ENABLE([xvmc],
|
||||
[AS_HELP_STRING([--enable-xvmc],
|
||||
[enable xvmc library @<:@default=auto@:>@])],
|
||||
[enable_xvmc="$enableval"],
|
||||
[enable_xvmc=auto])
|
||||
[enable_xvmc=no])
|
||||
AC_ARG_ENABLE([vdpau],
|
||||
[AS_HELP_STRING([--enable-vdpau],
|
||||
[enable vdpau library @<:@default=auto@:>@])],
|
||||
@@ -696,23 +664,18 @@ AC_ARG_ENABLE([vdpau],
|
||||
[enable_vdpau=auto])
|
||||
AC_ARG_ENABLE([omx],
|
||||
[AS_HELP_STRING([--enable-omx],
|
||||
[enable OpenMAX library @<:@default=disabled@:>@])],
|
||||
[enable OpenMAX library @<:@default=no@:>@])],
|
||||
[enable_omx="$enableval"],
|
||||
[enable_omx=no])
|
||||
AC_ARG_ENABLE([va],
|
||||
[AS_HELP_STRING([--enable-va],
|
||||
[enable va library @<:@default=auto@:>@])],
|
||||
[enable_va="$enableval"],
|
||||
[enable_va=auto])
|
||||
AC_ARG_ENABLE([opencl],
|
||||
[AS_HELP_STRING([--enable-opencl],
|
||||
[enable OpenCL library @<:@default=disabled@:>@])],
|
||||
[enable OpenCL library @<:@default=no@:>@])],
|
||||
[enable_opencl="$enableval"],
|
||||
[enable_opencl=no])
|
||||
AC_ARG_ENABLE([opencl_icd],
|
||||
[AS_HELP_STRING([--enable-opencl-icd],
|
||||
[Build an OpenCL ICD library to be loaded by an ICD implementation
|
||||
@<:@default=disabled@:>@])],
|
||||
@<:@default=no@:>@])],
|
||||
[enable_opencl_icd="$enableval"],
|
||||
[enable_opencl_icd=no])
|
||||
AC_ARG_ENABLE([xlib-glx],
|
||||
@@ -720,16 +683,30 @@ AC_ARG_ENABLE([xlib-glx],
|
||||
[make GLX library Xlib-based instead of DRI-based @<:@default=disabled@:>@])],
|
||||
[enable_xlib_glx="$enableval"],
|
||||
[enable_xlib_glx=no])
|
||||
AC_ARG_ENABLE([gallium-egl],
|
||||
[AS_HELP_STRING([--enable-gallium-egl],
|
||||
[enable optional EGL state tracker (not required
|
||||
for EGL support in Gallium with OpenGL and OpenGL ES)
|
||||
@<:@default=disable@:>@])],
|
||||
[enable_gallium_egl="$enableval"],
|
||||
[enable_gallium_egl=no])
|
||||
AC_ARG_ENABLE([gallium-gbm],
|
||||
[AS_HELP_STRING([--enable-gallium-gbm],
|
||||
[enable optional gbm state tracker (not required for
|
||||
gbm support in Gallium)
|
||||
@<:@default=auto@:>@])],
|
||||
[enable_gallium_gbm="$enableval"],
|
||||
[enable_gallium_gbm=auto])
|
||||
|
||||
AC_ARG_ENABLE([r600-llvm-compiler],
|
||||
[AS_HELP_STRING([--enable-r600-llvm-compiler],
|
||||
[Enable experimental LLVM backend for graphics shaders @<:@default=disabled@:>@])],
|
||||
[Enable experimental LLVM backend for graphics shaders @<:@default=disable@:>@])],
|
||||
[enable_r600_llvm="$enableval"],
|
||||
[enable_r600_llvm=no])
|
||||
|
||||
AC_ARG_ENABLE([gallium-tests],
|
||||
[AS_HELP_STRING([--enable-gallium-tests],
|
||||
[Enable optional Gallium tests) @<:@default=disabled@:>@])],
|
||||
[Enable optional Gallium tests) @<:@default=disable@:>@])],
|
||||
[enable_gallium_tests="$enableval"],
|
||||
[enable_gallium_tests=no])
|
||||
|
||||
@@ -756,13 +733,11 @@ esac
|
||||
if test "x$enable_opengl" = xno -a \
|
||||
"x$enable_gles1" = xno -a \
|
||||
"x$enable_gles2" = xno -a \
|
||||
"x$enable_nine" = xno -a \
|
||||
"x$enable_openvg" = xno -a \
|
||||
"x$enable_xa" = xno -a \
|
||||
"x$enable_xvmc" = xno -a \
|
||||
"x$enable_vdpau" = xno -a \
|
||||
"x$enable_omx" = xno -a \
|
||||
"x$enable_va" = xno -a \
|
||||
"x$enable_opencl" = xno; then
|
||||
AC_MSG_ERROR([at least one API should be enabled])
|
||||
fi
|
||||
@@ -827,13 +802,13 @@ esac
|
||||
|
||||
AM_CONDITIONAL(HAVE_DRICOMMON, test "x$enable_dri" = xyes )
|
||||
AM_CONDITIONAL(HAVE_DRISW, test "x$enable_dri" = xyes )
|
||||
AM_CONDITIONAL(HAVE_DRI2, test "x$enable_dri" = xyes -a "x$dri_platform" = xdrm )
|
||||
AM_CONDITIONAL(HAVE_DRI3, test "x$enable_dri3" = xyes -a "x$dri_platform" = xdrm )
|
||||
AM_CONDITIONAL(HAVE_APPLEDRI, test "x$enable_dri" = xyes -a "x$dri_platform" = xapple )
|
||||
AM_CONDITIONAL(HAVE_DRI2, test "x$enable_dri" = xyes && test "x$dri_platform" = xdrm )
|
||||
AM_CONDITIONAL(HAVE_DRI3, test "x$enable_dri3" = xyes && test "x$dri_platform" = xdrm )
|
||||
AM_CONDITIONAL(HAVE_APPLEDRI, test "x$enable_dri" = xyes && test "x$dri_platform" = xapple )
|
||||
|
||||
AC_ARG_ENABLE([shared-glapi],
|
||||
[AS_HELP_STRING([--enable-shared-glapi],
|
||||
[Enable shared glapi for OpenGL @<:@default=enabled@:>@])],
|
||||
[Enable shared glapi for OpenGL @<:@default=yes@:>@])],
|
||||
[enable_shared_glapi="$enableval"],
|
||||
[enable_shared_glapi=yes])
|
||||
|
||||
@@ -862,14 +837,23 @@ enable_shared_pipe_drivers=no
|
||||
dnl
|
||||
dnl Driver specific build directories
|
||||
dnl
|
||||
GALLIUM_TARGET_DIRS=""
|
||||
GALLIUM_WINSYS_DIRS="sw"
|
||||
GALLIUM_DRIVERS_DIRS="galahad trace rbug noop identity"
|
||||
GALLIUM_STATE_TRACKERS_DIRS=""
|
||||
|
||||
case "x$enable_glx$enable_xlib_glx" in
|
||||
xyesyes)
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib"
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS libgl-xlib"
|
||||
GALLIUM_STATE_TRACKERS_DIRS="glx $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
NEED_WINSYS_XLIB="yes"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "x$enable_dri" = xyes; then
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/dri"
|
||||
GALLIUM_STATE_TRACKERS_DIRS="dri $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
enable_gallium_loader="$enable_shared_pipe_drivers"
|
||||
fi
|
||||
|
||||
@@ -880,6 +864,8 @@ if test "x$enable_gallium_osmesa" = xyes; then
|
||||
if test "x$enable_osmesa" = xyes; then
|
||||
AC_MSG_ERROR([Cannot enable both classic and Gallium OSMesa implementations])
|
||||
fi
|
||||
GALLIUM_STATE_TRACKERS_DIRS="osmesa $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS osmesa"
|
||||
fi
|
||||
|
||||
AC_SUBST([MESA_LLVM])
|
||||
@@ -932,9 +918,8 @@ dnl
|
||||
case "x$enable_glx$enable_xlib_glx" in
|
||||
xyesyes)
|
||||
# Xlib-based GLX
|
||||
dri_modules="x11 xext xcb"
|
||||
PKG_CHECK_MODULES([XLIBGL], [$dri_modules])
|
||||
GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV $dri_modules"
|
||||
PKG_CHECK_MODULES([XLIBGL], [x11 xext])
|
||||
GL_PC_REQ_PRIV="x11 xext"
|
||||
X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS"
|
||||
GL_LIB_DEPS="$XLIBGL_LIBS"
|
||||
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
|
||||
@@ -945,7 +930,7 @@ xyesno)
|
||||
PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED])
|
||||
|
||||
# find the DRI deps for libGL
|
||||
dri_modules="x11 xext xdamage xfixes x11-xcb xcb xcb-glx >= $XCBGLX_REQUIRED"
|
||||
dri_modules="x11 xext xdamage xfixes x11-xcb xcb-glx >= $XCBGLX_REQUIRED"
|
||||
|
||||
if test x"$driglx_direct" = xyes; then
|
||||
if test x"$dri_platform" = xdrm ; then
|
||||
@@ -966,7 +951,6 @@ xyesno)
|
||||
fi
|
||||
|
||||
if test x"$enable_dri3" = xyes; then
|
||||
PKG_CHECK_EXISTS([xcb >= $XCB_REQUIRED], [], AC_MSG_ERROR([DRI3 requires xcb >= $XCB_REQUIRED]))
|
||||
dri_modules="$dri_modules xcb-dri3 xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED"
|
||||
fi
|
||||
fi
|
||||
@@ -1052,7 +1036,7 @@ AC_ARG_ENABLE([glx-tls],
|
||||
AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
|
||||
|
||||
AS_IF([test "x$GLX_USE_TLS" = xyes -a "x$ax_pthread_ok" = xyes],
|
||||
[DEFINES="${DEFINES} -DGLX_USE_TLS"])
|
||||
[DEFINES="${DEFINES} -DGLX_USE_TLS -DHAVE_PTHREAD"])
|
||||
|
||||
dnl
|
||||
dnl More DRI setup
|
||||
@@ -1115,6 +1099,7 @@ if test "x$enable_dri" = xyes; then
|
||||
esac
|
||||
;;
|
||||
*freebsd* | dragonfly* | *netbsd* | openbsd*)
|
||||
DEFINES="$DEFINES -DHAVE_PTHREAD"
|
||||
DEFINES="$DEFINES -DHAVE_ALIAS"
|
||||
;;
|
||||
gnu*)
|
||||
@@ -1139,13 +1124,14 @@ if test "x$enable_dri" = xyes; then
|
||||
fi
|
||||
|
||||
# Check for expat
|
||||
PKG_CHECK_MODULES([EXPAT], [expat], [],
|
||||
# expat version 2.0 and earlier do not provide expat.pc
|
||||
[AC_CHECK_HEADER([expat.h],[],
|
||||
[AC_MSG_ERROR([Expat headers required for DRI not found])])
|
||||
AC_CHECK_LIB([expat],[XML_ParserCreate],[],
|
||||
[AC_MSG_ERROR([Expat library required for DRI not found])])
|
||||
EXPAT_LIBS="-lexpat"])
|
||||
PKG_CHECK_EXISTS([expat], [have_expat=yes], [have_expat=no])
|
||||
if test "x$have_expat" = "xyes"; then
|
||||
PKG_CHECK_MODULES([EXPAT], [expat], [],
|
||||
AC_MSG_ERROR([Expat required for DRI.]))
|
||||
else
|
||||
# expat version 2.0 and earlier do not provide expat.pc
|
||||
EXPAT_LIBS=-lexpat
|
||||
fi
|
||||
|
||||
DRICOMMON_NEED_LIBDRM=no
|
||||
# If we are building any DRI driver other than swrast.
|
||||
@@ -1256,10 +1242,12 @@ if test "x$enable_osmesa" = xyes -o "x$enable_gallium_osmesa" = xyes; then
|
||||
else
|
||||
OSMESA_LIB_DEPS=""
|
||||
fi
|
||||
OSMESA_MESA_DEPS=""
|
||||
OSMESA_PC_LIB_PRIV="-lm $PTHREAD_LIBS $SELINUX_LIBS $DLOPEN_LIBS"
|
||||
fi
|
||||
|
||||
AC_SUBST([OSMESA_LIB_DEPS])
|
||||
AC_SUBST([OSMESA_MESA_DEPS])
|
||||
AC_SUBST([OSMESA_PC_REQ])
|
||||
AC_SUBST([OSMESA_PC_LIB_PRIV])
|
||||
|
||||
@@ -1323,6 +1311,56 @@ fi
|
||||
AM_CONDITIONAL(HAVE_EGL, test "x$enable_egl" = xyes)
|
||||
AC_SUBST([EGL_LIB_DEPS])
|
||||
|
||||
dnl
|
||||
dnl EGL Gallium configuration
|
||||
dnl
|
||||
if test "x$enable_gallium_egl" = xyes; then
|
||||
if test -z "$with_gallium_drivers"; then
|
||||
AC_MSG_ERROR([cannot enable egl_gallium without Gallium])
|
||||
fi
|
||||
if test "x$enable_egl" = xno; then
|
||||
AC_MSG_ERROR([cannot enable egl_gallium without EGL])
|
||||
fi
|
||||
if test "x$have_libdrm" != xyes; then
|
||||
AC_MSG_ERROR([egl_gallium requires libdrm >= $LIBDRM_REQUIRED])
|
||||
fi
|
||||
|
||||
GALLIUM_STATE_TRACKERS_DIRS="egl $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl-static"
|
||||
# XXX: Uncomment once converted to use static/shared pipe-drivers
|
||||
# enable_gallium_loader=$enable_shared_pipe_drivers
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_GALLIUM_EGL, test "x$enable_gallium_egl" = xyes)
|
||||
|
||||
dnl
|
||||
dnl gbm Gallium configuration
|
||||
dnl
|
||||
if test "x$enable_gallium_gbm" = xauto; then
|
||||
case "$enable_gbm$enable_gallium_egl$enable_dri$with_egl_platforms" in
|
||||
yesyesyes*drm*)
|
||||
enable_gallium_gbm=yes ;;
|
||||
*)
|
||||
enable_gallium_gbm=no ;;
|
||||
esac
|
||||
fi
|
||||
if test "x$enable_gallium_gbm" = xyes; then
|
||||
if test -z "$with_gallium_drivers"; then
|
||||
AC_MSG_ERROR([cannot enable gbm_gallium without Gallium])
|
||||
fi
|
||||
if test "x$enable_gbm" = xno; then
|
||||
AC_MSG_ERROR([cannot enable gbm_gallium without gbm])
|
||||
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_TARGET_DIRS="$GALLIUM_TARGET_DIRS gbm"
|
||||
enable_gallium_loader=$enable_shared_pipe_drivers
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_GALLIUM_GBM, test "x$enable_gallium_gbm" = xyes)
|
||||
|
||||
dnl
|
||||
dnl XA configuration
|
||||
dnl
|
||||
@@ -1335,6 +1373,7 @@ if test "x$enable_xa" = xyes; then
|
||||
enabling XA.
|
||||
Example: ./configure --enable-xa --with-gallium-drivers=svga...])
|
||||
fi
|
||||
GALLIUM_STATE_TRACKERS_DIRS="xa $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
enable_gallium_loader=$enable_shared_pipe_drivers
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_ST_XA, test "x$enable_xa" = xyes)
|
||||
@@ -1351,12 +1390,13 @@ if test "x$enable_openvg" = xyes; then
|
||||
if test -z "$with_gallium_drivers"; then
|
||||
AC_MSG_ERROR([cannot enable OpenVG without Gallium])
|
||||
fi
|
||||
|
||||
AC_MSG_ERROR([Cannot enable OpenVG, because egl_gallium has been removed and
|
||||
OpenVG hasn't been integrated into standard libEGL yet])
|
||||
if test "x$enable_gallium_egl" = xno; then
|
||||
AC_MSG_ERROR([cannot enable OpenVG without egl_gallium])
|
||||
fi
|
||||
|
||||
EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)'
|
||||
VG_LIB_DEPS="$VG_LIB_DEPS $SELINUX_LIBS $PTHREAD_LIBS"
|
||||
GALLIUM_STATE_TRACKERS_DIRS="vega $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
VG_PC_LIB_PRIV="-lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
|
||||
AC_SUBST([VG_PC_LIB_PRIV])
|
||||
fi
|
||||
@@ -1377,56 +1417,30 @@ if test -n "$with_gallium_drivers" -a "x$with_gallium_drivers" != xswrast; then
|
||||
if test "x$enable_omx" = xauto; then
|
||||
PKG_CHECK_EXISTS([libomxil-bellagio], [enable_omx=yes], [enable_omx=no])
|
||||
fi
|
||||
|
||||
if test "x$enable_va" = xauto; then
|
||||
PKG_CHECK_EXISTS([libva], [enable_va=yes], [enable_va=no])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$enable_xvmc" = xyes; then
|
||||
PKG_CHECK_MODULES([XVMC], [xvmc >= $XVMC_REQUIRED x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED])
|
||||
PKG_CHECK_MODULES([XVMC], [xvmc >= $XVMC_REQUIRED x11-xcb xcb-dri2 >= $XCBDRI2_REQUIRED])
|
||||
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xvmc"
|
||||
enable_gallium_loader=$enable_shared_pipe_drivers
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_ST_XVMC, test "x$enable_xvmc" = xyes)
|
||||
|
||||
if test "x$enable_vdpau" = xyes; then
|
||||
PKG_CHECK_MODULES([VDPAU], [vdpau >= $VDPAU_REQUIRED x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED],
|
||||
[VDPAU_LIBS="`$PKG_CONFIG --libs x11-xcb xcb xcb-dri2`"])
|
||||
PKG_CHECK_MODULES([VDPAU], [vdpau >= $VDPAU_REQUIRED x11-xcb xcb-dri2 >= $XCBDRI2_REQUIRED],
|
||||
[VDPAU_LIBS="`$PKG_CONFIG --libs x11-xcb xcb-dri2`"])
|
||||
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS vdpau"
|
||||
enable_gallium_loader=$enable_shared_pipe_drivers
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_ST_VDPAU, test "x$enable_vdpau" = xyes)
|
||||
|
||||
if test "x$enable_omx" = xyes; then
|
||||
PKG_CHECK_MODULES([OMX], [libomxil-bellagio >= $LIBOMXIL_BELLAGIO_REQUIRED x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED])
|
||||
PKG_CHECK_MODULES([OMX], [libomxil-bellagio >= $LIBOMXIL_BELLAGIO_REQUIRED x11-xcb xcb-dri2 >= $XCBDRI2_REQUIRED])
|
||||
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS omx"
|
||||
enable_gallium_loader=$enable_shared_pipe_drivers
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_ST_OMX, test "x$enable_omx" = xyes)
|
||||
|
||||
if test "x$enable_va" = xyes; then
|
||||
PKG_CHECK_MODULES([VA], [libva >= 0.35.0 x11-xcb xcb-dri2 >= $XCBDRI2_REQUIRED],
|
||||
[VA_LIBS="`$PKG_CONFIG --libs x11-xcb xcb-dri2`"])
|
||||
enable_gallium_loader=$enable_shared_pipe_drivers
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_ST_VA, test "x$enable_va" = xyes)
|
||||
|
||||
dnl
|
||||
dnl Nine Direct3D9 configuration
|
||||
dnl
|
||||
if test "x$enable_nine" = xyes; then
|
||||
if ! echo "$with_gallium_drivers" | grep -q 'swrast'; then
|
||||
AC_MSG_ERROR([nine requires the gallium swrast driver])
|
||||
fi
|
||||
if test "x$with_gallium_drivers" == xswrast; then
|
||||
AC_MSG_ERROR([nine requires at least one non-swrast gallium driver])
|
||||
fi
|
||||
if test "x$enable_dri3" = xno; then
|
||||
AC_MSG_WARN([using nine together with wine requires DRI3 enabled system])
|
||||
fi
|
||||
|
||||
enable_gallium_loader=$enable_shared_pipe_drivers
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_ST_NINE, test "x$enable_nine" = xyes)
|
||||
|
||||
dnl
|
||||
dnl OpenCL configuration
|
||||
dnl
|
||||
@@ -1451,7 +1465,6 @@ AC_ARG_WITH([clang-libdir],
|
||||
[CLANG_LIBDIR=''])
|
||||
|
||||
PKG_CHECK_EXISTS([libclc], [have_libclc=yes], [have_libclc=no])
|
||||
AC_CHECK_LIB([elf], [elf_memory], [have_libelf=yes;ELF_LIB=-lelf])
|
||||
|
||||
if test "x$enable_opencl" = xyes; then
|
||||
if test -z "$with_gallium_drivers"; then
|
||||
@@ -1474,6 +1487,8 @@ if test "x$enable_opencl" = xyes; then
|
||||
AC_SUBST([LIBCLC_LIBEXECDIR])
|
||||
fi
|
||||
|
||||
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS clover"
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS opencl"
|
||||
# XXX: Use $enable_shared_pipe_drivers once converted to use static/shared pipe-drivers
|
||||
enable_gallium_loader=yes
|
||||
|
||||
@@ -1482,10 +1497,6 @@ if test "x$enable_opencl" = xyes; then
|
||||
else
|
||||
OPENCL_LIBNAME="OpenCL"
|
||||
fi
|
||||
|
||||
if test "x$have_libelf" != xyes; then
|
||||
AC_MSG_ERROR([Clover requires libelf])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes)
|
||||
AM_CONDITIONAL(HAVE_CLOVER_ICD, test "x$enable_opencl_icd" = xyes)
|
||||
@@ -1540,6 +1551,7 @@ for plat in $egl_platforms; do
|
||||
case "$plat" in
|
||||
wayland)
|
||||
PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED wayland-server >= $WAYLAND_REQUIRED])
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland"
|
||||
|
||||
WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
|
||||
AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],,
|
||||
@@ -1547,7 +1559,7 @@ for plat in $egl_platforms; do
|
||||
;;
|
||||
|
||||
x11)
|
||||
PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED xcb-xfixes])
|
||||
PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 >= $XCBDRI2_REQUIRED xcb-xfixes])
|
||||
;;
|
||||
|
||||
drm)
|
||||
@@ -1581,6 +1593,7 @@ else
|
||||
fi
|
||||
|
||||
if echo "$egl_platforms" | grep -q 'x11'; then
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib"
|
||||
NEED_WINSYS_XLIB=yes
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_EGL_PLATFORM_X11, echo "$egl_platforms" | grep -q 'x11')
|
||||
@@ -1601,6 +1614,13 @@ if ! echo "$egl_platforms" | grep -q 'x11'; then
|
||||
GL_PC_CFLAGS="$GL_PC_CFLAGS -DMESA_EGL_NO_X11_HEADERS"
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([egl-driver-dir],
|
||||
[AS_HELP_STRING([--with-egl-driver-dir=DIR],
|
||||
[directory for EGL drivers @<:@default=${libdir}/egl@:>@])],
|
||||
[EGL_DRIVER_INSTALL_DIR="$withval"],
|
||||
[EGL_DRIVER_INSTALL_DIR='${libdir}/egl'])
|
||||
AC_SUBST([EGL_DRIVER_INSTALL_DIR])
|
||||
|
||||
AC_ARG_WITH([max-width],
|
||||
[AS_HELP_STRING([--with-max-width=N],
|
||||
[Maximum framebuffer width (4096)])],
|
||||
@@ -1679,7 +1699,7 @@ if test "x$enable_gallium_llvm" = xyes; then
|
||||
fi
|
||||
|
||||
if test "x$LLVM_CONFIG" != xno; then
|
||||
LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[[0-9.]]+'`
|
||||
LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'`
|
||||
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
|
||||
LLVM_BINDIR=`$LLVM_CONFIG --bindir`
|
||||
LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
|
||||
@@ -1705,7 +1725,7 @@ if test "x$enable_gallium_llvm" = xyes; then
|
||||
fi
|
||||
|
||||
LLVM_REQUIRED_VERSION_MAJOR="3"
|
||||
LLVM_REQUIRED_VERSION_MINOR="3"
|
||||
LLVM_REQUIRED_VERSION_MINOR="1"
|
||||
if test "$LLVM_VERSION_INT" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
|
||||
AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is required])
|
||||
fi
|
||||
@@ -1775,6 +1795,11 @@ if test "x$enable_gallium_tests" = xyes; then
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_GALLIUM_TESTS, test "x$enable_gallium_tests" = xyes)
|
||||
|
||||
if test "x$enable_gallium_loader" = xyes; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS pipe-loader"
|
||||
fi
|
||||
AM_CONDITIONAL(NEED_GALLIUM_LOADER, test "x$enable_gallium_loader" = xyes)
|
||||
|
||||
dnl Directory for VDPAU libs
|
||||
AC_ARG_WITH([vdpau-libdir],
|
||||
[AS_HELP_STRING([--with-vdpau-libdir=DIR],
|
||||
@@ -1783,37 +1808,50 @@ AC_ARG_WITH([vdpau-libdir],
|
||||
[VDPAU_LIB_INSTALL_DIR='${libdir}/vdpau'])
|
||||
AC_SUBST([VDPAU_LIB_INSTALL_DIR])
|
||||
|
||||
dnl Directory for OMX libs
|
||||
OMX_LIB_INSTALL_DIR_DEFAULT=''
|
||||
if test "x$enable_omx" = xyes; then
|
||||
OMX_LIB_INSTALL_DIR_DEFAULT=`$PKG_CONFIG --variable=pluginsdir libomxil-bellagio`
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([omx-libdir],
|
||||
[AS_HELP_STRING([--with-omx-libdir=DIR],
|
||||
[directory for the OMX libraries])],
|
||||
[OMX_LIB_INSTALL_DIR="$withval"],
|
||||
[OMX_LIB_INSTALL_DIR=`$PKG_CONFIG --define-variable=libdir=\$libdir --variable=pluginsdir libomxil-bellagio`])
|
||||
[OMX_LIB_INSTALL_DIR="$OMX_LIB_INSTALL_DIR_DEFAULT"])
|
||||
AC_SUBST([OMX_LIB_INSTALL_DIR])
|
||||
|
||||
dnl Directory for VA libs
|
||||
|
||||
AC_ARG_WITH([va-libdir],
|
||||
[AS_HELP_STRING([--with-va-libdir=DIR],
|
||||
[directory for the VA libraries @<:@${libdir}/dri@:>@])],
|
||||
[VA_LIB_INSTALL_DIR="$withval"],
|
||||
[VA_LIB_INSTALL_DIR="${libdir}/dri"])
|
||||
AC_SUBST([VA_LIB_INSTALL_DIR])
|
||||
|
||||
AC_ARG_WITH([d3d-libdir],
|
||||
[AS_HELP_STRING([--with-d3d-libdir=DIR],
|
||||
[directory for the D3D modules @<:@${libdir}/d3d@:>@])],
|
||||
[D3D_DRIVER_INSTALL_DIR="$withval"],
|
||||
[D3D_DRIVER_INSTALL_DIR="${libdir}/d3d"])
|
||||
AC_SUBST([D3D_DRIVER_INSTALL_DIR])
|
||||
dnl Directory for OpenCL libs
|
||||
AC_ARG_WITH([opencl-libdir],
|
||||
[AS_HELP_STRING([--with-opencl-libdir=DIR],
|
||||
[directory for auxiliary libraries used by the OpenCL implementation @<:@default=${libdir}/opencl@:>@])],
|
||||
[OPENCL_LIB_INSTALL_DIR="$withval"],
|
||||
[OPENCL_LIB_INSTALL_DIR='${libdir}/opencl'])
|
||||
AC_SUBST([OPENCL_LIB_INSTALL_DIR])
|
||||
|
||||
dnl
|
||||
dnl Gallium helper functions
|
||||
dnl
|
||||
gallium_require_drm() {
|
||||
if test "x$have_libdrm" != xyes; then
|
||||
AC_MSG_ERROR([$1 requires libdrm >= $LIBDRM_REQUIRED])
|
||||
gallium_check_st() {
|
||||
if test "x$NEED_NONNULL_WINSYS" = xyes; then
|
||||
if test "x$have_libdrm" != xyes; then
|
||||
AC_MSG_ERROR([DRI or Xorg DDX requires libdrm >= $LIBDRM_REQUIRED])
|
||||
fi
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS $1"
|
||||
fi
|
||||
if test "x$enable_dri" = xyes && test -n "$2"; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $2"
|
||||
fi
|
||||
if test "x$enable_xa" = xyes && test -n "$3"; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $3"
|
||||
fi
|
||||
if test "x$enable_xvmc" = xyes && test -n "$4"; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $4"
|
||||
fi
|
||||
if test "x$enable_vdpau" = xyes && test -n "$5"; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $5"
|
||||
fi
|
||||
if test "x$enable_omx" = xyes && test "x$6" != x; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $6"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1831,11 +1869,11 @@ gallium_require_drm_loader() {
|
||||
if test "x$need_pci_id$have_pci_id" = xyesno; then
|
||||
AC_MSG_ERROR([Gallium drm loader requires libudev >= $LIBUDEV_REQUIRED or sysfs])
|
||||
fi
|
||||
if test "x$have_libdrm" != xyes; then
|
||||
AC_MSG_ERROR([Gallium drm loader requires libdrm >= $LIBDRM_REQUIRED])
|
||||
fi
|
||||
enable_gallium_drm_loader=yes
|
||||
fi
|
||||
if test "x$enable_va" = xyes && test "x$7" != x; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $7"
|
||||
fi
|
||||
}
|
||||
|
||||
require_egl_drm() {
|
||||
@@ -1868,11 +1906,17 @@ radeon_llvm_check() {
|
||||
fi
|
||||
LLVM_COMPONENTS="${LLVM_COMPONENTS} r600 bitreader ipo"
|
||||
NEED_RADEON_LLVM=yes
|
||||
if test "x$have_libelf" != xyes; then
|
||||
AC_MSG_ERROR([$1 requires libelf when using llvm])
|
||||
fi
|
||||
AC_CHECK_LIB([elf], [elf_memory], [ELF_LIB=-lelf],
|
||||
[AC_MSG_ERROR([$1 requires libelf when using LLVM])])
|
||||
}
|
||||
|
||||
dnl Gallium drivers
|
||||
if test "x$enable_dri" = xyes -o "x$enable_xa" = xyes -o \
|
||||
"x$enable_xvmc" = xyes -o "x$enable_vdpau" = xyes; then
|
||||
NEED_NONNULL_WINSYS=yes
|
||||
fi
|
||||
AM_CONDITIONAL(NEED_NONNULL_WINSYS, test "x$NEED_NONNULL_WINSYS" = xyes)
|
||||
|
||||
dnl Duplicates in GALLIUM_DRIVERS_DIRS are removed by sorting it after this block
|
||||
if test -n "$with_gallium_drivers"; then
|
||||
gallium_drivers=`IFS=', '; echo $with_gallium_drivers`
|
||||
@@ -1880,33 +1924,40 @@ if test -n "$with_gallium_drivers"; then
|
||||
case "x$driver" in
|
||||
xsvga)
|
||||
HAVE_GALLIUM_SVGA=yes
|
||||
gallium_require_drm "svga"
|
||||
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_require_drm_loader
|
||||
gallium_check_st "svga/drm" "dri/vmwgfx" "xa/vmwgfx"
|
||||
;;
|
||||
xi915)
|
||||
HAVE_GALLIUM_I915=yes
|
||||
PKG_CHECK_MODULES([INTEL], [libdrm_intel >= $LIBDRM_INTEL_REQUIRED])
|
||||
gallium_require_drm "Gallium i915"
|
||||
gallium_require_drm_loader
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915"
|
||||
gallium_check_st "i915/drm" "dri/i915" "xa/i915"
|
||||
;;
|
||||
xilo)
|
||||
HAVE_GALLIUM_ILO=yes
|
||||
PKG_CHECK_MODULES([INTEL], [libdrm_intel >= $LIBDRM_INTEL_REQUIRED])
|
||||
gallium_require_drm "Gallium i965/ilo"
|
||||
gallium_require_drm_loader
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS ilo"
|
||||
gallium_check_st "intel/drm" "dri/ilo" "xa/ilo"
|
||||
;;
|
||||
xr300)
|
||||
HAVE_GALLIUM_R300=yes
|
||||
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
|
||||
gallium_require_drm "Gallium R300"
|
||||
gallium_require_drm_loader
|
||||
gallium_require_llvm "Gallium R300"
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
|
||||
gallium_check_st "radeon/drm" "dri/r300"
|
||||
;;
|
||||
xr600)
|
||||
HAVE_GALLIUM_R600=yes
|
||||
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
|
||||
gallium_require_drm "Gallium R600"
|
||||
gallium_require_drm_loader
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
|
||||
if test "x$enable_r600_llvm" = xyes -o "x$enable_opencl" = xyes; then
|
||||
radeon_llvm_check "r600g"
|
||||
LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser"
|
||||
@@ -1917,37 +1968,52 @@ if test -n "$with_gallium_drivers"; then
|
||||
if test "x$enable_opencl" = xyes; then
|
||||
LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser"
|
||||
fi
|
||||
gallium_check_st "radeon/drm" "dri/r600" "" "xvmc/r600" "vdpau/r600" "omx/r600"
|
||||
;;
|
||||
xradeonsi)
|
||||
HAVE_GALLIUM_RADEONSI=yes
|
||||
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
|
||||
gallium_require_drm "radeonsi"
|
||||
gallium_require_drm_loader
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS radeonsi"
|
||||
radeon_llvm_check "radeonsi"
|
||||
require_egl_drm "radeonsi"
|
||||
gallium_check_st "radeon/drm" "dri/radeonsi" "" "" "vdpau/radeonsi" "omx/radeonsi"
|
||||
;;
|
||||
xnouveau)
|
||||
HAVE_GALLIUM_NOUVEAU=yes
|
||||
PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
|
||||
gallium_require_drm "nouveau"
|
||||
gallium_require_drm_loader
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau"
|
||||
gallium_check_st "nouveau/drm" "dri/nouveau" "xa/nouveau" "xvmc/nouveau" "vdpau/nouveau" "omx/nouveau"
|
||||
;;
|
||||
xfreedreno)
|
||||
HAVE_GALLIUM_FREEDRENO=yes
|
||||
PKG_CHECK_MODULES([FREEDRENO], [libdrm_freedreno >= $LIBDRM_FREEDRENO_REQUIRED])
|
||||
gallium_require_drm "freedreno"
|
||||
gallium_require_drm_loader
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS freedreno"
|
||||
gallium_check_st "freedreno/drm" "dri/freedreno" "xa/freedreno" "" ""
|
||||
;;
|
||||
xswrast)
|
||||
HAVE_GALLIUM_SOFTPIPE=yes
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS softpipe"
|
||||
if test "x$MESA_LLVM" = x1; then
|
||||
HAVE_GALLIUM_LLVMPIPE=yes
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
|
||||
fi
|
||||
|
||||
if test "x$enable_dri" = xyes; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri/swrast"
|
||||
fi
|
||||
|
||||
if test "x$have_libdrm" = xyes; then
|
||||
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri/kms-swrast"
|
||||
fi
|
||||
;;
|
||||
xvc4)
|
||||
HAVE_GALLIUM_VC4=yes
|
||||
gallium_require_drm "vc4"
|
||||
gallium_require_drm_loader
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS vc4"
|
||||
gallium_check_st "vc4/drm" "dri-vc4" "" "" ""
|
||||
|
||||
case "$host_cpu" in
|
||||
i?86 | x86_64 | amd64)
|
||||
@@ -1963,7 +2029,7 @@ if test -n "$with_gallium_drivers"; then
|
||||
fi
|
||||
|
||||
dnl Set LLVM_LIBS - This is done after the driver configuration so
|
||||
dnl that drivers can add additional components to LLVM_COMPONENTS.
|
||||
dnl that drivers can add additonal components to LLVM_COMPONENTS.
|
||||
dnl Previously, gallium drivers were updating LLVM_LIBS directly
|
||||
dnl by calling llvm-config --libs ${DRIVER_LLVM_COMPONENTS}, but
|
||||
dnl this was causing the same libraries to be appear multiple times
|
||||
@@ -1996,7 +2062,7 @@ if test "x$MESA_LLVM" != x0; then
|
||||
invocation and rebuild.])])
|
||||
|
||||
dnl We don't need to update LLVM_LIBS in this case because the LLVM
|
||||
dnl install uses a shared object for each component and we have
|
||||
dnl install uses a shared object for each compoenent and we have
|
||||
dnl already added all of these objects to LLVM_LIBS.
|
||||
fi
|
||||
else
|
||||
@@ -2023,6 +2089,11 @@ AM_CONDITIONAL(HAVE_GALLIUM_SOFTPIPE, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes)
|
||||
AM_CONDITIONAL(HAVE_GALLIUM_LLVMPIPE, test "x$HAVE_GALLIUM_LLVMPIPE" = xyes)
|
||||
AM_CONDITIONAL(HAVE_GALLIUM_VC4, test "x$HAVE_GALLIUM_VC4" = xyes)
|
||||
|
||||
AM_CONDITIONAL(NEED_GALLIUM_SOFTPIPE_DRIVER, test "x$HAVE_GALLIUM_SVGA" = xyes -o \
|
||||
"x$HAVE_GALLIUM_SOFTPIPE" = xyes)
|
||||
AM_CONDITIONAL(NEED_GALLIUM_LLVMPIPE_DRIVER, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes \
|
||||
&& test "x$MESA_LLVM" = x1)
|
||||
|
||||
AM_CONDITIONAL(HAVE_GALLIUM_STATIC_TARGETS, test "x$enable_shared_pipe_drivers" = xno)
|
||||
|
||||
# NOTE: anything using xcb or other client side libs ends up in separate
|
||||
@@ -2031,6 +2102,8 @@ AM_CONDITIONAL(HAVE_GALLIUM_STATIC_TARGETS, test "x$enable_shared_pipe_drivers"
|
||||
# use by XA tracker in particular, but could be used in any case
|
||||
# where communication with xserver is not desired).
|
||||
if test "x$enable_gallium_loader" = xyes; then
|
||||
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/null"
|
||||
|
||||
if test "x$NEED_WINSYS_XLIB" = xyes; then
|
||||
GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_XLIB"
|
||||
fi
|
||||
@@ -2065,9 +2138,12 @@ AM_CONDITIONAL(HAVE_R200_DRI, test x$HAVE_R200_DRI = xyes)
|
||||
AM_CONDITIONAL(HAVE_RADEON_DRI, test x$HAVE_RADEON_DRI = xyes)
|
||||
AM_CONDITIONAL(HAVE_SWRAST_DRI, test x$HAVE_SWRAST_DRI = xyes)
|
||||
|
||||
AM_CONDITIONAL(NEED_RADEON_DRM_WINSYS, test "x$HAVE_GALLIUM_R300" = xyes -o \
|
||||
AM_CONDITIONAL(NEED_RADEON_DRM_WINSYS, test "x$NEED_NONNULL_WINSYS" = xyes -a \
|
||||
"x$HAVE_GALLIUM_R300" = xyes -o \
|
||||
"x$HAVE_GALLIUM_R600" = xyes -o \
|
||||
"x$HAVE_GALLIUM_RADEONSI" = xyes)
|
||||
AM_CONDITIONAL(NEED_WINSYS_WRAPPER, test "x$HAVE_GALLIUM_I915" = xyes -o \
|
||||
"x$HAVE_GALLIUM_SVGA" = xyes)
|
||||
AM_CONDITIONAL(NEED_WINSYS_XLIB, test "x$NEED_WINSYS_XLIB" = xyes)
|
||||
AM_CONDITIONAL(NEED_RADEON_LLVM, test x$NEED_RADEON_LLVM = xyes)
|
||||
AM_CONDITIONAL(USE_R600_LLVM_COMPILER, test x$USE_R600_LLVM_COMPILER = xyes)
|
||||
@@ -2092,19 +2168,9 @@ AM_CONDITIONAL(HAVE_X86_ASM, test "x$asm_arch" = xx86 -o "x$asm_arch" = xx86_64)
|
||||
AM_CONDITIONAL(HAVE_X86_64_ASM, test "x$asm_arch" = xx86_64)
|
||||
AM_CONDITIONAL(HAVE_SPARC_ASM, test "x$asm_arch" = xsparc)
|
||||
|
||||
AC_SUBST([NINE_MAJOR], 1)
|
||||
AC_SUBST([NINE_MINOR], 0)
|
||||
AC_SUBST([NINE_TINY], 0)
|
||||
AC_SUBST([NINE_VERSION], "$NINE_MAJOR.$NINE_MINOR.$NINE_TINY")
|
||||
|
||||
AC_SUBST([VDPAU_MAJOR], 1)
|
||||
AC_SUBST([VDPAU_MINOR], 0)
|
||||
|
||||
VA_MAJOR=`$PKG_CONFIG --modversion libva | $SED -n 's/\([[^\.]]*\)\..*$/\1/p'`
|
||||
VA_MINOR=`$PKG_CONFIG --modversion libva | $SED -n 's/.*\.\(.*\)\..*$/\1/p'`
|
||||
AC_SUBST([VA_MAJOR], $VA_MAJOR)
|
||||
AC_SUBST([VA_MINOR], $VA_MINOR)
|
||||
|
||||
AC_SUBST([XVMC_MAJOR], 1)
|
||||
AC_SUBST([XVMC_MINOR], 0)
|
||||
|
||||
@@ -2162,20 +2228,17 @@ AC_CONFIG_FILES([Makefile
|
||||
src/gallium/drivers/svga/Makefile
|
||||
src/gallium/drivers/trace/Makefile
|
||||
src/gallium/drivers/vc4/Makefile
|
||||
src/gallium/drivers/vc4/kernel/Makefile
|
||||
src/gallium/state_trackers/clover/Makefile
|
||||
src/gallium/state_trackers/dri/Makefile
|
||||
src/gallium/state_trackers/egl/Makefile
|
||||
src/gallium/state_trackers/gbm/Makefile
|
||||
src/gallium/state_trackers/glx/xlib/Makefile
|
||||
src/gallium/state_trackers/nine/Makefile
|
||||
src/gallium/state_trackers/omx/Makefile
|
||||
src/gallium/state_trackers/osmesa/Makefile
|
||||
src/gallium/state_trackers/va/Makefile
|
||||
src/gallium/state_trackers/vdpau/Makefile
|
||||
src/gallium/state_trackers/vega/Makefile
|
||||
src/gallium/state_trackers/xa/Makefile
|
||||
src/gallium/state_trackers/xvmc/Makefile
|
||||
src/gallium/targets/d3dadapter9/Makefile
|
||||
src/gallium/targets/d3dadapter9/d3d.pc
|
||||
src/gallium/targets/dri/Makefile
|
||||
src/gallium/targets/egl-static/Makefile
|
||||
src/gallium/targets/gbm/Makefile
|
||||
@@ -2185,7 +2248,6 @@ AC_CONFIG_FILES([Makefile
|
||||
src/gallium/targets/osmesa/Makefile
|
||||
src/gallium/targets/osmesa/osmesa.pc
|
||||
src/gallium/targets/pipe-loader/Makefile
|
||||
src/gallium/targets/va/Makefile
|
||||
src/gallium/targets/vdpau/Makefile
|
||||
src/gallium/targets/xa/Makefile
|
||||
src/gallium/targets/xa/xatracker.pc
|
||||
@@ -2239,6 +2301,12 @@ AC_CONFIG_FILES([Makefile
|
||||
src/util/Makefile
|
||||
src/util/tests/hash_table/Makefile])
|
||||
|
||||
dnl Sort the dirs alphabetically
|
||||
GALLIUM_TARGET_DIRS=`echo $GALLIUM_TARGET_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
|
||||
GALLIUM_WINSYS_DIRS=`echo $GALLIUM_WINSYS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
|
||||
GALLIUM_DRIVERS_DIRS=`echo $GALLIUM_DRIVERS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
|
||||
GALLIUM_STATE_TRACKERS_DIRS=`echo $GALLIUM_STATE_TRACKERS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
dnl
|
||||
@@ -2303,7 +2371,12 @@ if test "$enable_egl" = yes; then
|
||||
egl_drivers="$egl_drivers builtin:egl_dri2"
|
||||
fi
|
||||
|
||||
echo " EGL drivers: $egl_drivers"
|
||||
if test "x$enable_gallium_egl" = xyes; then
|
||||
echo " EGL drivers: ${egl_drivers} egl_gallium"
|
||||
echo " EGL Gallium STs:$EGL_CLIENT_APIS"
|
||||
else
|
||||
echo " EGL drivers: $egl_drivers"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ""
|
||||
@@ -2318,6 +2391,10 @@ fi
|
||||
echo ""
|
||||
if test -n "$with_gallium_drivers"; then
|
||||
echo " Gallium: yes"
|
||||
echo " Target dirs: $GALLIUM_TARGET_DIRS"
|
||||
echo " Winsys dirs: $GALLIUM_WINSYS_DIRS"
|
||||
echo " Driver dirs: $GALLIUM_DRIVERS_DIRS"
|
||||
echo " Trackers dirs: $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
else
|
||||
echo " Gallium: no"
|
||||
fi
|
||||
|
68
docs/GL3.txt
68
docs/GL3.txt
@@ -18,7 +18,7 @@ are exposed in the 3.0 context as extensions.
|
||||
Feature Status
|
||||
----------------------------------------------------- ------------------------
|
||||
|
||||
GL 3.0, GLSL 1.30 --- all DONE: i965, nv50, nvc0, r600, radeonsi, llvmpipe (*), softpipe (*)
|
||||
GL 3.0, GLSL 1.30 --- all DONE: i965, nv50, nvc0, r600, radeonsi
|
||||
|
||||
glBindFragDataLocation, glGetFragDataLocation DONE
|
||||
Conditional rendering (GL_NV_conditional_render) DONE (r300, swrast)
|
||||
@@ -47,10 +47,8 @@ GL 3.0, GLSL 1.30 --- all DONE: i965, nv50, nvc0, r600, radeonsi, llvmpipe (*),
|
||||
GLX_ARB_create_context (GLX 1.4 is required) DONE
|
||||
Multisample anti-aliasing DONE (r300)
|
||||
|
||||
(*) llvmpipe and softpipe have fake Multisample anti-aliasing support
|
||||
|
||||
|
||||
GL 3.1, GLSL 1.40 --- all DONE: i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe
|
||||
GL 3.1, GLSL 1.40 --- all DONE: i965, nv50, nvc0, r600, radeonsi
|
||||
|
||||
Forward compatible context support/deprecations DONE ()
|
||||
Instanced drawing (GL_ARB_draw_instanced) DONE (swrast)
|
||||
@@ -63,7 +61,7 @@ GL 3.1, GLSL 1.40 --- all DONE: i965, nv50, nvc0, r600, radeonsi, llvmpipe, soft
|
||||
Signed normalized textures (GL_EXT_texture_snorm) DONE (r300)
|
||||
|
||||
|
||||
GL 3.2, GLSL 1.50 --- all DONE: i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe
|
||||
GL 3.2, GLSL 1.50 --- all DONE: i965, nv50, nvc0, r600, radeonsi
|
||||
|
||||
Core/compatibility profiles DONE
|
||||
Geometry shaders DONE ()
|
||||
@@ -78,9 +76,9 @@ GL 3.2, GLSL 1.50 --- all DONE: i965, nv50, nvc0, r600, radeonsi, llvmpipe, soft
|
||||
GLX_ARB_create_context_profile DONE
|
||||
|
||||
|
||||
GL 3.3, GLSL 3.30 --- all DONE: i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe
|
||||
GL 3.3, GLSL 3.30 --- all DONE: i965, nv50, nvc0, r600, radeonsi
|
||||
|
||||
GL_ARB_blend_func_extended DONE ()
|
||||
GL_ARB_blend_func_extended DONE (softpipe)
|
||||
GL_ARB_explicit_attrib_location DONE (all drivers that support GLSL)
|
||||
GL_ARB_occlusion_query2 DONE (r300, swrast)
|
||||
GL_ARB_sampler_objects DONE (all drivers)
|
||||
@@ -94,27 +92,27 @@ GL 3.3, GLSL 3.30 --- all DONE: i965, nv50, nvc0, r600, radeonsi, llvmpipe, soft
|
||||
|
||||
GL 4.0, GLSL 4.00:
|
||||
|
||||
GL_ARB_draw_buffers_blend DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe)
|
||||
GL_ARB_draw_indirect DONE (i965, nvc0, radeonsi, llvmpipe, softpipe)
|
||||
GL_ARB_draw_buffers_blend DONE (i965, nv50, nvc0, r600, radeonsi, softpipe)
|
||||
GL_ARB_draw_indirect DONE (i965, nvc0, radeonsi, softpipe, llvmpipe)
|
||||
GL_ARB_gpu_shader5 DONE (i965, nvc0)
|
||||
- 'precise' qualifier DONE
|
||||
- Dynamically uniform sampler array indices DONE (r600)
|
||||
- Dynamically uniform UBO array indices DONE (r600)
|
||||
- Dynamically uniform sampler array indices DONE ()
|
||||
- Dynamically uniform UBO array indices DONE ()
|
||||
- Implicit signed -> unsigned conversions DONE
|
||||
- Fused multiply-add DONE ()
|
||||
- Packing/bitfield/conversion functions DONE (r600)
|
||||
- Enhanced textureGather DONE (r600, radeonsi)
|
||||
- Geometry shader instancing DONE (r600)
|
||||
- Geometry shader instancing DONE ()
|
||||
- Geometry shader multiple streams DONE ()
|
||||
- Enhanced per-sample shading DONE (r600)
|
||||
- Interpolation functions DONE (r600)
|
||||
- Interpolation functions DONE ()
|
||||
- New overload resolution rules DONE
|
||||
GL_ARB_gpu_shader_fp64 started (Dave)
|
||||
GL_ARB_sample_shading DONE (i965, nv50, nvc0, r600, radeonsi)
|
||||
GL_ARB_sample_shading DONE (i965, nv50, nvc0, radeonsi)
|
||||
GL_ARB_shader_subroutine not started
|
||||
GL_ARB_tessellation_shader started (Chris, Ilia)
|
||||
GL_ARB_texture_buffer_object_rgb32 DONE (i965, nvc0, r600, radeonsi, llvmpipe, softpipe)
|
||||
GL_ARB_texture_cube_map_array DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe)
|
||||
GL_ARB_tessellation_shader started (Fabian)
|
||||
GL_ARB_texture_buffer_object_rgb32 DONE (i965, nvc0, r600, radeonsi, softpipe)
|
||||
GL_ARB_texture_cube_map_array DONE (i965, nv50, nvc0, r600, radeonsi, softpipe)
|
||||
GL_ARB_texture_gather DONE (i965, nv50, nvc0, r600, radeonsi)
|
||||
GL_ARB_texture_query_lod DONE (i965, nv50, nvc0, r600, radeonsi)
|
||||
GL_ARB_transform_feedback2 DONE (i965, nv50, nvc0, r600, radeonsi)
|
||||
@@ -123,12 +121,12 @@ GL 4.0, GLSL 4.00:
|
||||
|
||||
GL 4.1, GLSL 4.10:
|
||||
|
||||
GL_ARB_ES2_compatibility DONE (i965, nv50, nvc0, r300, r600, radeonsi, llvmpipe, softpipe)
|
||||
GL_ARB_ES2_compatibility DONE (i965, nv50, nvc0, r300, r600, radeonsi)
|
||||
GL_ARB_get_program_binary DONE (0 binary formats)
|
||||
GL_ARB_separate_shader_objects DONE (all drivers)
|
||||
GL_ARB_shader_precision started (Micah)
|
||||
GL_ARB_vertex_attrib_64bit started (Dave)
|
||||
GL_ARB_viewport_array DONE (i965, nv50, nvc0, r600, llvmpipe)
|
||||
GL_ARB_viewport_array DONE (i965, nv50, nvc0, r600)
|
||||
|
||||
|
||||
GL 4.2, GLSL 4.20:
|
||||
@@ -138,11 +136,11 @@ GL 4.2, GLSL 4.20:
|
||||
GL_ARB_shader_atomic_counters DONE (i965)
|
||||
GL_ARB_texture_storage DONE (all drivers)
|
||||
GL_ARB_transform_feedback_instanced DONE (i965, nv50, nvc0, r600, radeonsi)
|
||||
GL_ARB_base_instance DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe)
|
||||
GL_ARB_base_instance DONE (i965, nv50, nvc0, r600, radeonsi)
|
||||
GL_ARB_shader_image_load_store in progress (curro)
|
||||
GL_ARB_conservative_depth DONE (all drivers that support GLSL 1.30)
|
||||
GL_ARB_shading_language_420pack DONE (all drivers that support GLSL 1.30)
|
||||
GL_ARB_internalformat_query DONE (i965, nv50, nvc0, r300, r600, radeonsi, llvmpipe, softpipe)
|
||||
GL_ARB_internalformat_query DONE (i965, nv50, nvc0, r300, r600, radeonsi)
|
||||
GL_ARB_map_buffer_alignment DONE (all drivers)
|
||||
|
||||
|
||||
@@ -151,58 +149,58 @@ GL 4.3, GLSL 4.30:
|
||||
GL_ARB_arrays_of_arrays started (Timothy)
|
||||
GL_ARB_ES3_compatibility DONE (all drivers that support GLSL 3.30)
|
||||
GL_ARB_clear_buffer_object DONE (all drivers)
|
||||
GL_ARB_compute_shader in progress (jljusten)
|
||||
GL_ARB_compute_shader started (currently stalled)
|
||||
GL_ARB_copy_image DONE (i965)
|
||||
GL_KHR_debug DONE (all drivers)
|
||||
GL_ARB_explicit_uniform_location DONE (all drivers that support GLSL)
|
||||
GL_ARB_fragment_layer_viewport DONE (nv50, nvc0, r600, llvmpipe)
|
||||
GL_ARB_fragment_layer_viewport DONE (nv50, nvc0, r600)
|
||||
GL_ARB_framebuffer_no_attachments not started
|
||||
GL_ARB_internalformat_query2 not started
|
||||
GL_ARB_invalidate_subdata DONE (all drivers)
|
||||
GL_ARB_multi_draw_indirect DONE (i965, nvc0, radeonsi, llvmpipe, softpipe)
|
||||
GL_ARB_multi_draw_indirect DONE (i965, nvc0, radeonsi, softpipe, llvmpipe)
|
||||
GL_ARB_program_interface_query not started
|
||||
GL_ARB_robust_buffer_access_behavior not started
|
||||
GL_ARB_shader_image_size not started
|
||||
GL_ARB_shader_storage_buffer_object not started
|
||||
GL_ARB_stencil_texturing DONE (i965/gen8+, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe)
|
||||
GL_ARB_texture_buffer_range DONE (nv50, nvc0, i965, r600, radeonsi, llvmpipe)
|
||||
GL_ARB_stencil_texturing DONE (i965/gen8+, nv50, nvc0, r600, radeonsi)
|
||||
GL_ARB_texture_buffer_range DONE (nv50, nvc0, i965, r600, radeonsi)
|
||||
GL_ARB_texture_query_levels DONE (all drivers that support GLSL 1.30)
|
||||
GL_ARB_texture_storage_multisample DONE (all drivers that support GL_ARB_texture_multisample)
|
||||
GL_ARB_texture_view DONE (i965, nv50, nvc0)
|
||||
GL_ARB_texture_view DONE (i965)
|
||||
GL_ARB_vertex_attrib_binding DONE (all drivers)
|
||||
|
||||
|
||||
GL 4.4, GLSL 4.40:
|
||||
|
||||
GL_MAX_VERTEX_ATTRIB_STRIDE DONE (all drivers)
|
||||
GL_MAX_VERTEX_ATTRIB_STRIDE not started
|
||||
GL_ARB_buffer_storage DONE (i965, nv30, nv50, nvc0, r300, r600, radeonsi)
|
||||
GL_ARB_clear_texture DONE (i965)
|
||||
GL_ARB_enhanced_layouts not started
|
||||
GL_ARB_multi_bind DONE (all drivers)
|
||||
GL_ARB_query_buffer_object not started
|
||||
GL_ARB_texture_mirror_clamp_to_edge DONE (i965, nv30, nv50, nvc0, r300, r600, radeonsi, swrast, llvmpipe, softpipe)
|
||||
GL_ARB_texture_mirror_clamp_to_edge DONE (i965, nv30, nv50, nvc0, r300, r600, radeonsi, swrast)
|
||||
GL_ARB_texture_stencil8 not started
|
||||
GL_ARB_vertex_type_10f_11f_11f_rev DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe)
|
||||
GL_ARB_vertex_type_10f_11f_11f_rev DONE (i965, nv50, nvc0, r600, radeonsi)
|
||||
|
||||
GL 4.5, GLSL 4.50:
|
||||
|
||||
GL_ARB_ES3_1_compatibility not started
|
||||
GL_ARB_clip_control DONE (nv50, nvc0, r300, r600, radeonsi, llvmpipe, softpipe)
|
||||
GL_ARB_conditional_render_inverted DONE (i965, nv50, nvc0, llvmpipe, softpipe)
|
||||
GL_ARB_clip_control not started
|
||||
GL_ARB_conditional_render_inverted DONE (i965, nvc0, softpipe, llvmpipe)
|
||||
GL_ARB_cull_distance not started
|
||||
GL_ARB_derivative_control DONE (i965, nv50, nvc0, r600)
|
||||
GL_ARB_direct_state_access not started
|
||||
GL_ARB_get_texture_sub_image started (Brian Paul)
|
||||
GL_ARB_shader_texture_image_samples not started
|
||||
GL_ARB_texture_barrier DONE (nv50, nvc0, r300, r600, radeonsi)
|
||||
GL_KHR_context_flush_control DONE (all - but needs GLX/EXT extension to be useful)
|
||||
GL_KHR_context_flush_control not started
|
||||
GL_KHR_robust_buffer_access_behavior not started
|
||||
GL_KHR_robustness 90% done (the ARB variant)
|
||||
|
||||
These are the extensions cherry-picked to make GLES 3.1
|
||||
GLES3.1, GLSL ES 3.1
|
||||
GL_ARB_arrays_of_arrays started (Timothy)
|
||||
GL_ARB_compute_shader in progress (jljusten)
|
||||
GL_ARB_compute_shader started (currently stalled)
|
||||
GL_ARB_explicit_uniform_location DONE (all drivers that support GLSL)
|
||||
GL_ARB_framebuffer_no_attachments not started
|
||||
GL_ARB_program_interface_query not started
|
||||
@@ -210,7 +208,7 @@ GLES3.1, GLSL ES 3.1
|
||||
GL_ARB_shader_image_load_store in progress (curro)
|
||||
GL_ARB_shader_storage_buffer_object not started
|
||||
GL_ARB_separate_shader_objects DONE (all drivers)
|
||||
GL_ARB_stencil_texturing DONE (i965/gen8+, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe)
|
||||
GL_ARB_stencil_texturing DONE (i965/gen8+, nv50, nvc0, r600, radeonsi)
|
||||
GL_ARB_vertex_attrib_binding DONE (all drivers)
|
||||
GS5 Enhanced textureGather DONE (i965, nvc0, r600, radeonsi)
|
||||
GS5 Packing/bitfield/conversion functions DONE (i965, nvc0, r600)
|
||||
|
@@ -218,93 +218,15 @@ commit ID of the commit of interest (as it appears in the mesa master branch).
|
||||
|
||||
The latest set of patches that have been nominated, accepted, or rejected for
|
||||
the upcoming stable release can always be seen on the
|
||||
<a href="http://cworth.org/~cworth/mesa-stable-queue/">Mesa Stable Queue</a>
|
||||
<a href=http://cworth.org/~cworth/mesa-stable-queue/">Mesa Stable Queue</a>
|
||||
page.
|
||||
|
||||
<h2>Criteria for accepting patches to the stable branch</h2>
|
||||
<h2>Cherry-picking candidates for a stable branch</h2>
|
||||
|
||||
Mesa has a designated release manager for each stable branch, and the release
|
||||
manager is the only developer that should be pushing changes to these
|
||||
branches. Everyone else should simply nominate patches using the mechanism
|
||||
described above.
|
||||
|
||||
The stable-release manager will work with the list of nominated patches, and
|
||||
for each patch that meets the crtieria below will cherry-pick the patch with:
|
||||
<code>git cherry-pick -x <commit></code>. The <code>-x</code> option is
|
||||
important so that the picked patch references the comit ID of the original
|
||||
patch.
|
||||
|
||||
The stable-release manager may at times need to force-push changes to the
|
||||
stable branches, for example, to drop a previously-picked patch that was later
|
||||
identified as causing a regression). These force-pushes may cause changes to
|
||||
be lost from the stable branch if developers push things directly. Consider
|
||||
yourself warned.
|
||||
|
||||
The stable-release manager is also given broad discretion in rejecting patches
|
||||
that have been nominated for the stable branch. The most basic rule is that
|
||||
the stable branch is for bug fixes only, (no new features, no
|
||||
regressions). Here is a non-exhaustive list of some reasons that a patch may
|
||||
be rejected:
|
||||
|
||||
<ul>
|
||||
<li>Patch introduces a regression. Any reported build breakage or other
|
||||
regression caused by a particular patch, (game no longer work, piglit test
|
||||
changes from PASS to FAIL), is justification for rejecting a patch.</li>
|
||||
|
||||
<li>Patch is too large, (say, larger than 100 lines)</li>
|
||||
|
||||
<li>Patch is not a fix. For example, a commit that moves code around with no
|
||||
functional change should be rejected.</li>
|
||||
|
||||
<li>Patch fix is not clearly described. For example, a commit message
|
||||
of only a single line, no description of the bug, no mention of bugzilla,
|
||||
etc.</li>
|
||||
|
||||
<li>Patch has not obviously been reviewed, For example, the commit message
|
||||
has no Reviewed-by, Signed-off-by, nor Tested-by tags from anyone but the
|
||||
author.</li>
|
||||
|
||||
<li>Patch has not already been merged to the master branch. As a rule, bug
|
||||
fixes should never be applied first to a stable branch. Patches should land
|
||||
first on the master branch and then be cherry-picked to a stable
|
||||
branch. (This is to avoid future releases causing regressions if the patch
|
||||
is not also applied to master.) The only things that might look like
|
||||
exceptions would be backports of patches from master that happen to look
|
||||
significantly different.</li>
|
||||
|
||||
<li>Patch depends on too many other patches. Ideally, all stable-branch
|
||||
patches should be self-contained. It sometimes occurs that a single, logical
|
||||
bug-fix occurs as two separate patches on master, (such as an original
|
||||
patch, then a subsequent fix-up to that patch). In such a case, these two
|
||||
patches should be squashed into a single, self-contained patch for the
|
||||
stable branch. (Of course, if the squashing makes the patch too large, then
|
||||
that could be a reason to reject the patch.)</li>
|
||||
|
||||
<li>Patch includes new feature development, not bug fixes. New OpenGL
|
||||
features, extensions, etc. should be applied to Mesa master and included in
|
||||
the next major release. Stable releases are intended only for bug fixes.
|
||||
|
||||
Note: As an exception to this rule, the stable-release manager may accept
|
||||
hardware-enabling "features". For example, backports of new code to support
|
||||
a newly-developed hardware product can be accepted if they can be reasonably
|
||||
determined to not have effects on other hardware.</li>
|
||||
|
||||
<li>Patch is a performance optimization. As a rule, performance patches are
|
||||
not candidates for the stable branch. The only exception might be a case
|
||||
where an application's performance was recently severely impacted so as to
|
||||
become unusable. The fix for this performance regression could then be
|
||||
considered for a stable branch. The optimization must also be
|
||||
non-controversial and the patches still need to meet the other criteria of
|
||||
being simple and self-contained</li>
|
||||
|
||||
<li>Patch introduces a new failure mode (such as an assert). While the new
|
||||
assert might technically be correct, for example to make Mesa more
|
||||
conformant, this is not the kind of "bug fix" we want in a stable
|
||||
release. The potential problem here is that an OpenGL program that was
|
||||
previously working, (even if technically non-compliant with the
|
||||
specification), could stop working after this patch. So that would be a
|
||||
regression that is unaacceptable for the stable branch.</li>
|
||||
</ul>
|
||||
<p>
|
||||
Please use <code>git cherry-pick -x <commit></code> for cherry-picking a commit
|
||||
from master to a stable branch.
|
||||
</p>
|
||||
|
||||
<h2>Making a New Mesa Release</h2>
|
||||
|
||||
@@ -315,205 +237,64 @@ These are the instructions for making a new Mesa release.
|
||||
<h3>Get latest source files</h3>
|
||||
<p>
|
||||
Use git to get the latest Mesa files from the git repository, from whatever
|
||||
branch is relevant. This document uses the convention X.Y.Z for the release
|
||||
being created, which should be created from a branch named X.Y.
|
||||
branch is relevant.
|
||||
</p>
|
||||
|
||||
<h3>Perform basic testing</h3>
|
||||
|
||||
<h3>Verify and update version info in VERSION</h3>
|
||||
|
||||
<p>
|
||||
The release manager should, at the very least, test the code by compiling it,
|
||||
installing it, and running the latest piglit to ensure that no piglit tests
|
||||
have regressed since the previous release.
|
||||
Create a docs/relnotes/x.y.z.html file.
|
||||
The bin/bugzilla_mesa.sh and bin/shortlog_mesa.sh scripts can be used to
|
||||
create the HTML-formatted lists of bugfixes and changes to include in the file.
|
||||
Link the new docs/relnotes/x.y.z.html file into the main <a href="relnotes.html">relnotes.html</a> file.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The release manager should do this testing with at least one hardware driver,
|
||||
(say, whatever is contained in the local development machine), as well as on
|
||||
both Gallium and non-Gallium software drivers. The software testing can be
|
||||
performed by running piglit with the following environment-variable set:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
LIBGL_ALWAYS_SOFTWARE=1
|
||||
</pre>
|
||||
|
||||
And Gallium vs. non-Gallium software drivers can be obtained by using the
|
||||
following configure flags on separate builds:
|
||||
|
||||
<pre>
|
||||
--with-dri-drivers=swrast
|
||||
--with-gallium-drivers=swrast
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Note: If both options are given in one build, both swrast_dri.so drivers will
|
||||
be compiled, but only one will be installed. The following command can be used
|
||||
to ensure the correct driver is being tested:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
LIBGL_ALWAYS_SOFTWARE=1 glxinfo | grep "renderer string"
|
||||
</pre>
|
||||
|
||||
If any regressions are found in this testing with piglit, stop here, and do
|
||||
not perform a release until regressions are fixed.
|
||||
|
||||
<h3>Update version in file VERSION</h3>
|
||||
|
||||
<p>
|
||||
Increment the version contained in the file VERSION at Mesa's top-level, then
|
||||
commit this change.
|
||||
</p>
|
||||
|
||||
<h3>Create release notes for the new release</h3>
|
||||
|
||||
<p>
|
||||
Create a new file docs/relnotes/X.Y.Z.html, (follow the style of the previous
|
||||
release notes). Note that the sha256sums section of the release notes should
|
||||
be empty at this point.
|
||||
Update <a href="index.html">docs/index.html</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Two scripts are available to help generate portions of the release notes:
|
||||
|
||||
<pre>
|
||||
./bin/bugzilla_mesa.sh
|
||||
./bin/shortlog_mesa.sh
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
The first script identifies commits that reference bugzilla bugs and obtains
|
||||
the descriptions of those bugs from bugzilla. The second script generates a
|
||||
log of all commits. In both cases, HTML-formatted lists are printed to stdout
|
||||
to be included in the release notes.
|
||||
Tag the files with the release name (in the form <b>mesa-x.y</b>)
|
||||
with: <code>git tag -s mesa-x.y -m "Mesa x.y Release"</code>
|
||||
Then: <code>git push origin mesa-x.y</code>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Commit these changes
|
||||
</p>
|
||||
|
||||
<h3>Make the release archives, signatures, and the release tag</h3>
|
||||
<h3>Make the tarballs</h3>
|
||||
<p>
|
||||
From inside the Mesa directory:
|
||||
Make the distribution files. From inside the Mesa directory:
|
||||
<pre>
|
||||
./autogen.sh
|
||||
make -j1 tarballs
|
||||
make tarballs
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
After the tarballs are created, the sha256 checksums for the files will
|
||||
be computed and printed. These will be used in a step below.
|
||||
After the tarballs are created, the md5 checksums for the files will
|
||||
be computed.
|
||||
Add them to the docs/relnotes/x.y.html file.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
It's important at this point to also verify that the constructed tar file
|
||||
actually builds:
|
||||
Copy the distribution files to a temporary directory, unpack them,
|
||||
compile everything, and run some demos to be sure everything works.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
tar xjf MesaLib-X.Y.Z.tar.bz2
|
||||
cd Mesa-X.Y.Z
|
||||
./configure --enable-gallium-llvm
|
||||
make -j6
|
||||
make install
|
||||
</pre>
|
||||
|
||||
<h3>Update the website and announce the release</h3>
|
||||
<p>
|
||||
Some touch testing should also be performed at this point, (run glxgears or
|
||||
more involved OpenGL programs against the installed Mesa).
|
||||
Make a new directory for the release on annarchy.freedesktop.org with:
|
||||
<br>
|
||||
<code>
|
||||
mkdir /srv/ftp.freedesktop.org/pub/mesa/x.y
|
||||
</code>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Create detached GPG signatures for each of the archive files created above:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
gpg --sign --detach MesaLib-X.Y.Z.tar.gz
|
||||
gpg --sign --detach MesaLib-X.Y.Z.tar.bz2
|
||||
gpg --sign --detach MesaLib-X.Y.Z.zip
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Tag the commit used for the build:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
git tag -s mesa-X.Y.X -m "Mesa X.Y.Z release"
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Note: It would be nice to investigate and fix the issue that causes the
|
||||
tarballs target to fail with multiple build process, such as with "-j4". It
|
||||
would also be nice to incorporate all of the above commands into a single
|
||||
makefile target. And instead of a custom "tarballs" target, we should
|
||||
incorporate things into the standard "make dist" and "make distcheck" targets.
|
||||
</p>
|
||||
|
||||
<h3>Add the sha256sums to the release notes</h3>
|
||||
|
||||
<p>
|
||||
Edit docs/relnotes/X.Y.Z.html to add the sha256sums printed as part of "make
|
||||
tarballs" in the previous step. Commit this change.
|
||||
</p>
|
||||
|
||||
<h3>Push all commits and the tag creates above</h3>
|
||||
|
||||
<p>
|
||||
This is the first step that cannot easily be undone. The release is going
|
||||
forward from this point:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
git push origin X.Y --tags
|
||||
</pre>
|
||||
|
||||
<h3>Install the release files and signatures on the distribution server</h3>
|
||||
|
||||
<p>
|
||||
The following commands can be used to copy the release archive files and
|
||||
signatures to the freedesktop.org server:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
scp MesaLib-X.Y.Z* people.freedesktop.org:
|
||||
ssh people.freedesktop.org
|
||||
cd /srv/ftp.freedesktop.org/pub/mesa
|
||||
mkdir X.Y.Z
|
||||
cd X.Y.Z
|
||||
mv ~/MesaLib-X.Y.Z* .
|
||||
</pre>
|
||||
|
||||
<h3>Back on mesa master, andd the new release notes into the tree</h3>
|
||||
|
||||
<p>
|
||||
Something like the following steps will do the trick:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
cp docs/relnotes/X.Y.Z.html /tmp
|
||||
git checkout master
|
||||
cp /tmp/X.Y.Z.html docs/relnotes
|
||||
git add docs/relnotes/X.Y.Z.html
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Also, edit docs/relnotes.html to add a link to the new release notes, and edit
|
||||
docs/index.html to add a news entry. Then commit and push:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
git commit -a -m "docs: Import X.Y.Z release notes, add news item."
|
||||
git push origin
|
||||
</pre>
|
||||
|
||||
<h3>Update the mesa3d.org website</h3>
|
||||
|
||||
<p>
|
||||
NOTE: The recent release managers have not been performing this step
|
||||
themselves, but leaving this to Brian Paul, (who has access to the
|
||||
sourceforge.net hosting for mesa3d.org). Brian is more than willing to grant
|
||||
the permission necessary to future release managers to do this step on their
|
||||
own.
|
||||
Basically, to upload the tarball files with:
|
||||
<br>
|
||||
<code>
|
||||
rsync -avP -e ssh MesaLib-x.y.* USERNAME@annarchy.freedesktop.org:/srv/ftp.freedesktop.org/pub/mesa/x.y/
|
||||
</code>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -525,22 +306,13 @@ sftp USERNAME,mesa3d@web.sourceforge.net
|
||||
</code>
|
||||
</p>
|
||||
|
||||
|
||||
<h3>Announce the release</h3>
|
||||
<p>
|
||||
Make an announcement on the mailing lists:
|
||||
|
||||
<em>mesa-dev@lists.freedesktop.org</em>,
|
||||
<em>mesa-users@lists.freedesktop.org</em>
|
||||
and
|
||||
<em>mesa-announce@lists.freedesktop.org</em>
|
||||
|
||||
Follow the template of previously-sent release announcements. The following
|
||||
command can be used to generate the log of changes to be included in the
|
||||
release announcement:
|
||||
|
||||
<pre>
|
||||
git shortlog mesa-X.Y.Z-1..mesa-X.Y.Z
|
||||
</pre>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@@ -77,6 +77,13 @@ drivers will be installed to <code>${libdir}/egl</code>.</p>
|
||||
|
||||
</dd>
|
||||
|
||||
<dt><code>--enable-gallium-egl</code></dt>
|
||||
<dd>
|
||||
|
||||
<p>Enable the optional <code>egl_gallium</code> driver.</p>
|
||||
|
||||
</dd>
|
||||
|
||||
<dt><code>--with-egl-platforms</code></dt>
|
||||
<dd>
|
||||
|
||||
|
@@ -16,37 +16,6 @@
|
||||
|
||||
<h1>News</h1>
|
||||
|
||||
<h2>December 14, 2014</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.4.html">Mesa 10.4</a> is released. This is a new
|
||||
development release. See the release notes for more information about
|
||||
the release.
|
||||
</p>
|
||||
|
||||
<h2>November 8, 2014</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.3.3.html">Mesa 10.3.3</a> is released.
|
||||
This is a bug-fix release.
|
||||
</p>
|
||||
|
||||
<h2>October 24, 2014</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.3.2.html">Mesa 10.3.2</a> is released.
|
||||
This is a bug-fix release.
|
||||
</p>
|
||||
|
||||
<h2>October 12, 2014</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.2.9.html">Mesa 10.2.9</a>
|
||||
and <a href="relnotes/10.3.1.html">Mesa 10.3.1</a> are released.
|
||||
|
||||
These are bug-fix releases from the 10.2 and 10.3 branches, respectively.
|
||||
<br>
|
||||
NOTE: It is anticipated that 10.2.9 will be the final release in the 10.2
|
||||
series. Users of 10.2 are encouraged to migrate to the 10.3 series in order
|
||||
to obtain future fixes.
|
||||
</p>
|
||||
|
||||
<h2>September 19, 2014</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.3.html">Mesa 10.3</a> is released. This is a new
|
||||
@@ -58,12 +27,6 @@ Also, <a href="relnotes/10.2.8.html">Mesa 10.2.8</a> is released.
|
||||
This is a bug fix release from the 10.2 branch.
|
||||
</p>
|
||||
|
||||
<h2>September 6, 2014</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.2.7.html">Mesa 10.2.7</a> is released.
|
||||
This is a bug-fix release.
|
||||
</p>
|
||||
|
||||
<h2>August 19, 2014</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.2.6.html">Mesa 10.2.6</a> is released.
|
||||
|
@@ -43,7 +43,7 @@ It's the fastest software rasterizer for Mesa.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>LLVM: version 3.4 recommended; 3.3 or later required.</p>
|
||||
<p>LLVM: version 3.4 recommended; 3.1 or later required.</p>
|
||||
<p>
|
||||
For Linux, on a recent Debian based distribution do:
|
||||
</p>
|
||||
|
@@ -21,14 +21,8 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="relnotes/10.4.html">10.4 release notes</a>
|
||||
<li><a href="relnotes/10.3.3.html">10.3.3 release notes</a>
|
||||
<li><a href="relnotes/10.3.2.html">10.3.2 release notes</a>
|
||||
<li><a href="relnotes/10.3.1.html">10.3.1 release notes</a>
|
||||
<li><a href="relnotes/10.2.9.html">10.2.9 release notes</a>
|
||||
<li><a href="relnotes/10.3.html">10.3 release notes</a>
|
||||
<li><a href="relnotes/10.2.8.html">10.2.8 release notes</a>
|
||||
<li><a href="relnotes/10.2.7.html">10.2.7 release notes</a>
|
||||
<li><a href="relnotes/10.2.6.html">10.2.6 release notes</a>
|
||||
<li><a href="relnotes/10.2.5.html">10.2.5 release notes</a>
|
||||
<li><a href="relnotes/10.2.4.html">10.2.4 release notes</a>
|
||||
|
@@ -1,211 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 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>
|
@@ -1,130 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 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>
|
@@ -1,101 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 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>
|
106
docs/relnotes/10.3.4.html
Normal file
106
docs/relnotes/10.3.4.html
Normal file
@@ -0,0 +1,106 @@
|
||||
<!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.3.4 Release Notes / November 21, 2014</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.3.4 is a bug fix release which fixes bugs found since the 10.3.3 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.3.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>
|
||||
26482495ef6177f889dbd87c7edcccfedd995598785bbbd7e3e066352574c8e0 MesaLib-10.3.4.tar.gz
|
||||
e6373913142338d10515daf619d659433bfd2989988198930c13b0945a15e98a MesaLib-10.3.4.tar.bz2
|
||||
8c3ebbb6535daf3414305860ebca6ac67dbb6e3d35058c7a6ce18b84b5945b7f MesaLib-10.3.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=76252">Bug 76252</a> - Dynamic loading/unloading of opengl32.dll results in a deadlock</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=78770">Bug 78770</a> - [SNB bisected]Webglc conformance/textures/texture-size-limit.html fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83500">Bug 83500</a> - si_dma_copy_tile causes GPU hangs</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85647">Bug 85647</a> - Random radeonsi crashes with mesa 10.3.x</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
<p>Brian Paul (1):</p>
|
||||
<ul>
|
||||
<li>st/mesa: copy sampler_array_size field when copying instructions</li>
|
||||
</ul>
|
||||
|
||||
<p>Chad Versace (1):</p>
|
||||
<ul>
|
||||
<li>i965: Fix segfault in WebGL Conformance on Ivybridge</li>
|
||||
</ul>
|
||||
|
||||
<p>Dave Airlie (5):</p>
|
||||
<ul>
|
||||
<li>r600g/cayman: fix integer multiplication output overwrite (v2)</li>
|
||||
<li>r600g/cayman: fix texture gather tests</li>
|
||||
<li>r600g/cayman: handle empty vertex shaders</li>
|
||||
<li>r600g: geom shaders: always load texture src regs from inputs</li>
|
||||
<li>r600g: limit texture offset application to specific types (v2)</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (3):</p>
|
||||
<ul>
|
||||
<li>docs: Add sha256 sums for the 10.3.3 release</li>
|
||||
<li>configure.ac: roll up a program for the sse4.1 check</li>
|
||||
<li>get-pick-list.sh: Require explicit "10.3" for nominating stable patches</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (1):</p>
|
||||
<ul>
|
||||
<li>st/mesa: add a fallback for clear_with_quad when no vs_layer</li>
|
||||
</ul>
|
||||
|
||||
<p>José Fonseca (1):</p>
|
||||
<ul>
|
||||
<li>llvmpipe: Avoid deadlock when unloading opengl32.dll</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (1):</p>
|
||||
<ul>
|
||||
<li>i915g: we also have more than 0 viewports!</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (1):</p>
|
||||
<ul>
|
||||
<li>radeonsi: Disable asynchronous DMA except for PIPE_BUFFER</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
88
docs/relnotes/10.3.5.html
Normal file
88
docs/relnotes/10.3.5.html
Normal file
@@ -0,0 +1,88 @@
|
||||
<!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.3.5 Release Notes / December 5, 2014</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.3.5 is a bug fix release which fixes bugs found since the 10.3.4 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.3.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>
|
||||
7ea71c3cce89114df3dc050376afa1c6f6bf235d77a68f9703273603d6a90621 MesaLib-10.3.5.tar.gz
|
||||
eb75d2790f1606d59d50a6acaa637b6c75f2155b3e0eca3d5099165c0d9556ae MesaLib-10.3.5.tar.bz2
|
||||
164bc64ba63fb07ff255ff8de6ed3c95ff545dfe8f864c44c33abe94788da910 MesaLib-10.3.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=86618">Bug 86618</a> - [NV96] neg modifiers not working in MIN and MAX operations</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
<p>Brian Paul (2):</p>
|
||||
<ul>
|
||||
<li>mesa: fix arithmetic error in _mesa_compute_compressed_pixelstore()</li>
|
||||
<li>mesa: fix height error check for 1D array textures</li>
|
||||
</ul>
|
||||
|
||||
<p>Chris Forbes (2):</p>
|
||||
<ul>
|
||||
<li>i965: Handle nested uniform array indexing</li>
|
||||
<li>mesa: Fix Get(GL_TRANSPOSE_CURRENT_MATRIX_ARB) to transpose</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (2):</p>
|
||||
<ul>
|
||||
<li>docs: Add sha256 sums for the 10.3.5 release</li>
|
||||
<li>Update version to 10.3.5</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (6):</p>
|
||||
<ul>
|
||||
<li>nv50/ir: set neg modifiers on min/max args</li>
|
||||
<li>nv50,nvc0: actually check constbufs for invalidation</li>
|
||||
<li>nv50,nvc0: buffer resources can be bound as other things down the line</li>
|
||||
<li>freedreno/ir3: don't pass consts to madsh.m16 in MOD logic</li>
|
||||
<li>freedreno/a3xx: only enable blend clamp for non-float formats</li>
|
||||
<li>freedreno/ir3: fix UMAD</li>
|
||||
</ul>
|
||||
|
||||
<p>Rob Clark (1):</p>
|
||||
<ul>
|
||||
<li>configure.ac: bump libdrm_freedreno requirement</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -14,13 +14,13 @@
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.4.1 Release Notes / December 29, 2014</h1>
|
||||
<h1>Mesa 10.3.6 Release Notes / December 29, 2014</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.4.1 is a bug fix release which fixes bugs found since the 10.4.0 release.
|
||||
Mesa 10.3.6 is a bug fix release which fixes bugs found since the 10.3.5 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.4.1 implements the OpenGL 3.3 API, but the version reported by
|
||||
Mesa 10.3.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
|
||||
@@ -30,7 +30,9 @@ because compatibility contexts are not supported.
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
TBD
|
||||
c4d053d6bc6604cb5c93c99e0ef2e815c539f26dc5a03737eb3809bc1767d12f MesaLib-10.3.6.tar.gz
|
||||
8d43673c6788fbf85f9c36c3a95c61ccf46f8835fc9c0d85d34474490d80572b MesaLib-10.3.6.tar.bz2
|
||||
6b5b1e9a13949cfdb76fe51e8dcc3ea71e464a5ca73d11fdc29c20c4ba3f411a MesaLib-10.3.6.zip
|
||||
</pre>
|
||||
|
||||
<h2>New features</h2>
|
||||
@@ -42,15 +44,16 @@ TBD
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60879">Bug 60879</a> - [radeonsi] X11 can't start with acceleration enabled</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82585">Bug 82585</a> - geometry shader with optional out variable segfaults</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82991">Bug 82991</a> - Inverted bumpmap in webgl applications</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83908">Bug 83908</a> - [i965] Incorrect icon colors in Steam Big Picture</li>
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84777">Bug 84777</a> - [BSW]Piglit spec_glsl-1.50_execution_geometry-basic fails</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Andres Gomez (1):</p>
|
||||
@@ -58,16 +61,21 @@ TBD
|
||||
<li>i965/brw_reg: struct constructor now needs explicit negate and abs values.</li>
|
||||
</ul>
|
||||
|
||||
<p>Cody Northrop (1):</p>
|
||||
<p>Ben Widawsky (1):</p>
|
||||
<ul>
|
||||
<li>i965: Require pixel alignment for GPU copy blit</li>
|
||||
<li>i965/gs: Avoid DW * DW mul</li>
|
||||
</ul>
|
||||
|
||||
<p>Dave Airlie (1):</p>
|
||||
<ul>
|
||||
<li>r600g: only init GS_VERT_ITEMSIZE on r600</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (3):</p>
|
||||
<ul>
|
||||
<li>docs: Add 10.4 sha256 sums, news item and link release notes</li>
|
||||
<li>docs: Add sha256 sums for the 10.3.5 release</li>
|
||||
<li>Revert "glx/dri3: Request non-vsynced Present for swapinterval zero. (v3)"</li>
|
||||
<li>Update version to 10.4.1</li>
|
||||
<li>Update version to 10.3.6</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (2):</p>
|
||||
@@ -76,6 +84,23 @@ TBD
|
||||
<li>linker: Assign varying locations geometry shader inputs for SSO</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (3):</p>
|
||||
<ul>
|
||||
<li>util/primconvert: pass index bias through</li>
|
||||
<li>util/primconvert: support instanced rendering</li>
|
||||
<li>util/primconvert: take ib offset into account</li>
|
||||
</ul>
|
||||
|
||||
<p>José Fonseca (1):</p>
|
||||
<ul>
|
||||
<li>util/primconvert: Avoid point arithmetic; apply offset on all cases.</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (1):</p>
|
||||
<ul>
|
||||
<li>docs/relnotes: document the removal of GALLIUM_MSAA</li>
|
||||
</ul>
|
||||
|
||||
<p>Mario Kleiner (4):</p>
|
||||
<ul>
|
||||
<li>glx/dri3: Fix glXWaitForSbcOML() to handle targetSBC==0 correctly. (v2)</li>
|
||||
@@ -89,6 +114,10 @@ TBD
|
||||
<li>glsl: Add gl_MaxViewports to available builtin constants</li>
|
||||
</ul>
|
||||
|
||||
<p>Tom Stellard (1):</p>
|
||||
<ul>
|
||||
<li>radeonsi: Program RASTER_CONFIG for harvested GPUs v5</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
93
docs/relnotes/10.3.7.html
Normal file
93
docs/relnotes/10.3.7.html
Normal file
@@ -0,0 +1,93 @@
|
||||
<!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.3.7 Release Notes / January 12, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.3.7 is a bug fix release which fixes bugs found since the 10.3.6 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.3.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>
|
||||
bc13f33c19bc9f44a0565fdd51a8f9d1c0153a3365c429ceaf4ef43b7022b052 MesaLib-10.3.7.tar.gz
|
||||
43c6ced15e237cbb21b3082d7c0b42777c50c1f731d0d4b5efb5231063fb6a5b MesaLib-10.3.7.tar.bz2
|
||||
d821fd46baf804fecfcf403e901800a4b996c7dd1c83f20a354b46566a49026f MesaLib-10.3.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=85529">Bug 85529</a> - Surfaces not drawn in Unvanquished</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=87619">Bug 87619</a> - Changes to state such as render targets change fragment shader without marking it dirty.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Chad Versace (2):</p>
|
||||
<ul>
|
||||
<li>i965: Use safer pointer arithmetic in intel_texsubimage_tiled_memcpy()</li>
|
||||
<li>i965: Use safer pointer arithmetic in gather_oa_results()</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (2):</p>
|
||||
<ul>
|
||||
<li>docs: Add sha256 sums for the 10.3.6 release</li>
|
||||
<li>Update version to 10.3.7</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (2):</p>
|
||||
<ul>
|
||||
<li>nv50,nvc0: set vertex id base to index_bias</li>
|
||||
<li>nv50/ir: fix texture offsets in release builds</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (2):</p>
|
||||
<ul>
|
||||
<li>i965: Add missing BRW_NEW_*_PROG_DATA to texture/renderbuffer atoms.</li>
|
||||
<li>i965: Fix start/base_vertex_location for >1 prims but !BRW_NEW_VERTICES.</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (3):</p>
|
||||
<ul>
|
||||
<li>glsl_to_tgsi: fix a bug in copy propagation</li>
|
||||
<li>vbo: ignore primitive restart if FixedIndex is enabled in DrawArrays</li>
|
||||
<li>st/mesa: fix GL_PRIMITIVE_RESTART_FIXED_INDEX</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (1):</p>
|
||||
<ul>
|
||||
<li>radeonsi: Don't modify PA_SC_RASTER_CONFIG register value if rb_mask == 0</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,259 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.4 Release Notes / December 14, 2014</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.4 is a new development release.
|
||||
People who are concerned with stability and reliability should stick
|
||||
with a previous release or wait for Mesa 10.4.1.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.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>
|
||||
abfbfd2d91ce81491c5bb6923ae649212ad5f82d0bee277de8704cc948dc221e MesaLib-10.4.0.tar.gz
|
||||
98a7dff3a1a6708c79789de8b9a05d8042e867067f70e8f30387c15026233219 MesaLib-10.4.0.tar.bz2
|
||||
443a6d46d0691b5ac811d8d30091b1716c365689b16d49c57cf273c2b76086fe MesaLib-10.4.0.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
|
||||
<p>
|
||||
Note: some of the new features are only available with certain drivers.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>GL_ARB_conditional_render_inverted on nv50</li>
|
||||
<li>GL_ARB_sample_shading on r600</li>
|
||||
<li>GL_ARB_texture_view on nv50, nvc0</li>
|
||||
<li>GL_ARB_clip_control on nv50, nvc0, r300, r600, radeonsi, llvmpipe, softpipe</li>
|
||||
<li>GL_KHR_context_flush_control on all drivers</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79963">Bug 79963</a> - [ILK Bisected]some piglit and ogles2conform cases fail </li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29661">Bug 29661</a> - MSVC built u_format_test fails on Windows</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=38873">Bug 38873</a> - [855gm] gnome-shell misrendered</li>
|
||||
|
||||
<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=60879">Bug 60879</a> - [radeonsi] X11 can't start with acceleration enabled</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=61415">Bug 61415</a> - Clover ignores --with-opencl-libdir path</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64471">Bug 64471</a> - Radeon HD6570 lockup in Brütal Legend with HyperZ</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=67672">Bug 67672</a> - [llvmpipe] lp_test_arit fails on old CPUs</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69200">Bug 69200</a> - [Bisected]Piglit glx/glx-multithread-shader-compile aborted</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70410">Bug 70410</a> - egl-static/Makefile: linking fails with llvm >= 3.4</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72685">Bug 72685</a> - [radeonsi hyperz] Artifacts in Unigine Sanctuary</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72819">Bug 72819</a> - [855GM] Incorrect drop shadow color on windows and strange white rectangle when showing/hiding GLX-dock...</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74563">Bug 74563</a> - Surfaceless contexts are not properly released by DRI drivers</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74863">Bug 74863</a> - [r600g] HyperZ broken on RV770 and CYPRESS (Left 4 Dead 2 trees corruption) bisected!</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75011">Bug 75011</a> - [hyperz] Performance drop since git-01e6371 (disable hyperz by default) with radeonsi</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75112">Bug 75112</a> - Meta Bug for HyperZ issues on r600g and radeonsi</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76252">Bug 76252</a> - Dynamic loading/unloading of opengl32.dll results in a deadlock</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76861">Bug 76861</a> - mid3 generates slow code for constant arguments</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77957">Bug 77957</a> - Variably-indexed constant arrays result in terrible shader code</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=78468">Bug 78468</a> - Compiling of shader gets stuck in infinite loop</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=78770">Bug 78770</a> - [SNB bisected]Webglc conformance/textures/texture-size-limit.html fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79155">Bug 79155</a> - [Tesseract Game] Global Illumination: Medium Causes Color Distortion</li>
|
||||
|
||||
<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=80011">Bug 80011</a> - [softpipe] tgsi/tgsi_exec.c:2023:exec_txf: Assertion `0' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80012">Bug 80012</a> - [softpipe] draw/draw_gs.c:113:tgsi_fetch_gs_outputs: Assertion `!util_is_inf_or_nan(output[slot][0])' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80050">Bug 80050</a> - [855GM] Incorrect drop shadow color under windows in Cinnamon persists with MESA 10.1.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80247">Bug 80247</a> - Khronos conformance test ES3-CTS.gtf.GL3Tests.transform_feedback.transform_feedback_vertex_id fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80561">Bug 80561</a> - Incorrect implementation of some VDPAU APIs.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80615">Bug 80615</a> - Files in bellagio directory [omx tracker] don't respect installation folder</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80848">Bug 80848</a> - [dri3] Building mesa fails with dri3 enabled</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=81680">Bug 81680</a> - [r600g] Firefox crashes with hardware acceleration turned on</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=82472">Bug 82472</a> - piglit 16385-consecutive-chars regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82537">Bug 82537</a> - Stunt Rally GLSL compiler assertion failure</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82538">Bug 82538</a> - Super Maryo Chronicles fails with st/mesa assertion failure</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=82796">Bug 82796</a> - [IVB/BYT-M/HSW/BDW Bisected]Synmark2_v6.0_OglTerrainFlyInst/OglTerrainPanInst cannot run as image validation failed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82804">Bug 82804</a> - unreal engine 4 rendering errors</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82828">Bug 82828</a> - Regression: Crash in 3Dmark2001</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82846">Bug 82846</a> - [BDW Bisected] Gpu hang when running Lightsmark v2008/Warsow v1.0/Xonotic v0.7/unigine-demos</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82881">Bug 82881</a> - test_vec4_register_coalesce regression</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=82921">Bug 82921</a> - layout(location=0) emits error >= MAX_UNIFORM_LOCATIONS due to integer underflow</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82929">Bug 82929</a> - [BDW Bisected]glxgears causes X hang</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82932">Bug 82932</a> - [SNB+ Bisected]Ogles3conform ES3-CTS.shaders.indexing.vector_subscript.vec3_static_loop_subscript_write_direct_read_vertex fails</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=83080">Bug 83080</a> - [SNB+ Bisected]ES3-CTS.shaders.loops.do_while_constant_iterations.mixed_break_continue_fragment fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83081">Bug 83081</a> - [BDW Bisected]Piglit spec_ARB_sample_shading_builtin-gl-sample-mask_2 is core dumped</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83127">Bug 83127</a> - [ILK Bisected]Piglit glean_texCombine fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83148">Bug 83148</a> - Unity invisible under Ubuntu 14.04 and 14.10</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>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83380">Bug 83380</a> - Linking fails when not writing gl_Position.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83418">Bug 83418</a> - EU IV is incorrectly rendered after git1409011930.d571f2</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=83463">Bug 83463</a> - [swrast] piglit glsl-vs-clamp-1 regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83468">Bug 83468</a> - [UBO] Using bool from UBO as if-statement condition asserts</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83500">Bug 83500</a> - si_dma_copy_tile causes GPU hangs</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83506">Bug 83506</a> - [UBO] row_major layout ignored inside structures</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83533">Bug 83533</a> - [UBO] nested structures don't get appropriate padding</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83573">Bug 83573</a> - [swrast] piglit fs-op-not-bool-using-if regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83574">Bug 83574</a> - [llvmpipe] [softpipe] piglit arb_explicit_uniform_location-use-of-unused-loc regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83741">Bug 83741</a> - [UBO] row_major layout partially ignored for arrays of structures</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83777">Bug 83777</a> - [regression] ilo fails to build</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83934">Bug 83934</a> - Structures must have same name to be considered same type.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84140">Bug 84140</a> - mplayer crashes playing some files using vdpau output</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84145">Bug 84145</a> - UE4: Realistic Rendering Demo render blue</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84178">Bug 84178</a> - Big glamor regression in Xorg server 1.6.99.1 GIT: x11perf 1.5 Test: PutImage XY 500x500 Square</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84355">Bug 84355</a> - texture2DProjLod and textureCubeLod are not supported when using GLES.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84529">Bug 84529</a> - [IVB bisected] glean fragProg1 CMP test failed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84538">Bug 84538</a> - lp_test_format.c:226:4: error: too few arguments to function ‘gallivm_create’</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84539">Bug 84539</a> - brw_fs_register_coalesce.cpp:183: bool fs_visitor::register_coalesce(): Assertion `src_size <= 11' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84557">Bug 84557</a> - [HSW] "Emit ELSE/ENDIF JIP with type D on Gen 7" causes Atomic Afterlife and GPU hangs</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84651">Bug 84651</a> - Distorted graphics or black window when running Battle.net app on Intel hardware via wine</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84662">Bug 84662</a> - Long pauses with Unreal demo Elemental on R9270X since : Always flush the HDP cache before submitting a CS to the GPU</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84777">Bug 84777</a> - [BSW]Piglit spec_glsl-1.50_execution_geometry-basic fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84807">Bug 84807</a> - Build issue starting between bf4aecfb2acc8d0dc815105d2f36eccbc97c284b and a3e9582f09249ad27716ba82c7dfcee685b65d51</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85189">Bug 85189</a> - llvm/invocation.cpp: In function 'void {anonymous}::optimize(llvm::Module*, unsigned int, const std::vector<llvm::Function*>&)': llvm/invocation.cpp:324:18: error: expected type-specifier</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85267">Bug 85267</a> - vlc crashes with vdpau (Radeon 3850HD) [r600]</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85377">Bug 85377</a> - lp_test_format failure with llvm-3.6</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85425">Bug 85425</a> - [bisected] Compiler error in clip control operations in meta</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85429">Bug 85429</a> - indirect.c:296: multiple definition of `__indirect_glNewList'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85454">Bug 85454</a> - Unigine Sanctuary with Wine crashes on Mesa Git</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85647">Bug 85647</a> - Random radeonsi crashes with mesa 10.3.x</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85683">Bug 85683</a> - [i965 Bisected]Piglit shaders_glsl-vs-raytrace-bug26691 segfault</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85691">Bug 85691</a> - 'glsl: Drop constant 0.0 components from dot products.' broke piglit shaders/glsl-gnome-shell-dim-window and a few others with Gallium</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86025">Bug 86025</a> - src\glsl\list.h(535) : error C2143: syntax error : missing ';' before 'type'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86089">Bug 86089</a> - [r600g][mesa 10.4.0-dev] shader failure - r600_sb::bc_finalizer::cf_peephole() when starting Second Life</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86145">Bug 86145</a> - Pipeline statistic counter values for VF always 0</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86618">Bug 86618</a> - [NV96] neg modifiers not working in MIN and MAX operations</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86760">Bug 86760</a> - mesa doesn't build: recipe for target 'r600_llvm.lo' failed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86764">Bug 86764</a> - [SNB+ Bisected]Piglit glean/pointSprite fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86788">Bug 86788</a> - (bisected) 32bit UrbanTerror 4.1 timedemo sse4.1 segfault...</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<ul>
|
||||
<li>The environment variable GALLIUM_MSAA that forced a multisample GLX visual was removed.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
1858
include/D3D9/d3d9.h
1858
include/D3D9/d3d9.h
File diff suppressed because it is too large
Load Diff
@@ -1,387 +0,0 @@
|
||||
/*
|
||||
* Copyright 2011 Joakim Sindholt <opensource@zhasha.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
|
||||
* on the rights to use, copy, modify, merge, publish, distribute, sub
|
||||
* license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
* USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef _D3D9CAPS_H_
|
||||
#define _D3D9CAPS_H_
|
||||
|
||||
#include "d3d9types.h"
|
||||
|
||||
/* Caps flags */
|
||||
#define D3DCAPS2_FULLSCREENGAMMA 0x00020000
|
||||
#define D3DCAPS2_CANCALIBRATEGAMMA 0x00100000
|
||||
#define D3DCAPS2_RESERVED 0x02000000
|
||||
#define D3DCAPS2_CANMANAGERESOURCE 0x10000000
|
||||
#define D3DCAPS2_DYNAMICTEXTURES 0x20000000
|
||||
#define D3DCAPS2_CANAUTOGENMIPMAP 0x40000000
|
||||
#define D3DCAPS2_CANSHARERESOURCE 0x80000000
|
||||
|
||||
#define D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD 0x00000020
|
||||
#define D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION 0x00000080
|
||||
#define D3DCAPS3_COPY_TO_VIDMEM 0x00000100
|
||||
#define D3DCAPS3_COPY_TO_SYSTEMMEM 0x00000200
|
||||
#define D3DCAPS3_DXVAHD 0x00000400
|
||||
#define D3DCAPS3_RESERVED 0x8000001F
|
||||
|
||||
#define D3DPRESENT_INTERVAL_DEFAULT 0x00000000
|
||||
#define D3DPRESENT_INTERVAL_ONE 0x00000001
|
||||
#define D3DPRESENT_INTERVAL_TWO 0x00000002
|
||||
#define D3DPRESENT_INTERVAL_THREE 0x00000004
|
||||
#define D3DPRESENT_INTERVAL_FOUR 0x00000008
|
||||
#define D3DPRESENT_INTERVAL_IMMEDIATE 0x80000000
|
||||
|
||||
#define D3DCURSORCAPS_COLOR 0x00000001
|
||||
#define D3DCURSORCAPS_LOWRES 0x00000002
|
||||
|
||||
#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010
|
||||
#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020
|
||||
#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040
|
||||
#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080
|
||||
#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100
|
||||
#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200
|
||||
#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400
|
||||
#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800
|
||||
#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000
|
||||
#define D3DDEVCAPS_DRAWPRIMITIVES2 0x00002000
|
||||
#define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000
|
||||
#define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000
|
||||
#define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000
|
||||
#define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000
|
||||
#define D3DDEVCAPS_HWRASTERIZATION 0x00080000
|
||||
#define D3DDEVCAPS_PUREDEVICE 0x00100000
|
||||
#define D3DDEVCAPS_QUINTICRTPATCHES 0x00200000
|
||||
#define D3DDEVCAPS_RTPATCHES 0x00400000
|
||||
#define D3DDEVCAPS_RTPATCHHANDLEZERO 0x00800000
|
||||
#define D3DDEVCAPS_NPATCHES 0x01000000
|
||||
|
||||
#define D3DPMISCCAPS_MASKZ 0x00000002
|
||||
#define D3DPMISCCAPS_CULLNONE 0x00000010
|
||||
#define D3DPMISCCAPS_CULLCW 0x00000020
|
||||
#define D3DPMISCCAPS_CULLCCW 0x00000040
|
||||
#define D3DPMISCCAPS_COLORWRITEENABLE 0x00000080
|
||||
#define D3DPMISCCAPS_CLIPPLANESCALEDPOINTS 0x00000100
|
||||
#define D3DPMISCCAPS_CLIPTLVERTS 0x00000200
|
||||
#define D3DPMISCCAPS_TSSARGTEMP 0x00000400
|
||||
#define D3DPMISCCAPS_BLENDOP 0x00000800
|
||||
#define D3DPMISCCAPS_NULLREFERENCE 0x00001000
|
||||
#define D3DPMISCCAPS_INDEPENDENTWRITEMASKS 0x00004000
|
||||
#define D3DPMISCCAPS_PERSTAGECONSTANT 0x00008000
|
||||
#define D3DPMISCCAPS_FOGANDSPECULARALPHA 0x00010000
|
||||
#define D3DPMISCCAPS_SEPARATEALPHABLEND 0x00020000
|
||||
#define D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS 0x00040000
|
||||
#define D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING 0x00080000
|
||||
#define D3DPMISCCAPS_FOGVERTEXCLAMPED 0x00100000
|
||||
#define D3DPMISCCAPS_POSTBLENDSRGBCONVERT 0x00200000
|
||||
|
||||
#define D3DPRASTERCAPS_DITHER 0x00000001
|
||||
#define D3DPRASTERCAPS_ZTEST 0x00000010
|
||||
#define D3DPRASTERCAPS_FOGVERTEX 0x00000080
|
||||
#define D3DPRASTERCAPS_FOGTABLE 0x00000100
|
||||
#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000
|
||||
#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000
|
||||
#define D3DPRASTERCAPS_FOGRANGE 0x00010000
|
||||
#define D3DPRASTERCAPS_ANISOTROPY 0x00020000
|
||||
#define D3DPRASTERCAPS_WBUFFER 0x00040000
|
||||
#define D3DPRASTERCAPS_WFOG 0x00100000
|
||||
#define D3DPRASTERCAPS_ZFOG 0x00200000
|
||||
#define D3DPRASTERCAPS_COLORPERSPECTIVE 0x00400000
|
||||
#define D3DPRASTERCAPS_SCISSORTEST 0x01000000
|
||||
#define D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS 0x02000000
|
||||
#define D3DPRASTERCAPS_DEPTHBIAS 0x04000000
|
||||
#define D3DPRASTERCAPS_MULTISAMPLE_TOGGLE 0x08000000
|
||||
|
||||
#define D3DPCMPCAPS_NEVER 0x00000001
|
||||
#define D3DPCMPCAPS_LESS 0x00000002
|
||||
#define D3DPCMPCAPS_EQUAL 0x00000004
|
||||
#define D3DPCMPCAPS_LESSEQUAL 0x00000008
|
||||
#define D3DPCMPCAPS_GREATER 0x00000010
|
||||
#define D3DPCMPCAPS_NOTEQUAL 0x00000020
|
||||
#define D3DPCMPCAPS_GREATEREQUAL 0x00000040
|
||||
#define D3DPCMPCAPS_ALWAYS 0x00000080
|
||||
|
||||
#define D3DPBLENDCAPS_ZERO 0x00000001
|
||||
#define D3DPBLENDCAPS_ONE 0x00000002
|
||||
#define D3DPBLENDCAPS_SRCCOLOR 0x00000004
|
||||
#define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008
|
||||
#define D3DPBLENDCAPS_SRCALPHA 0x00000010
|
||||
#define D3DPBLENDCAPS_INVSRCALPHA 0x00000020
|
||||
#define D3DPBLENDCAPS_DESTALPHA 0x00000040
|
||||
#define D3DPBLENDCAPS_INVDESTALPHA 0x00000080
|
||||
#define D3DPBLENDCAPS_DESTCOLOR 0x00000100
|
||||
#define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200
|
||||
#define D3DPBLENDCAPS_SRCALPHASAT 0x00000400
|
||||
#define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800
|
||||
#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000
|
||||
#define D3DPBLENDCAPS_BLENDFACTOR 0x00002000
|
||||
#ifndef D3D_DISABLE_9EX
|
||||
# define D3DPBLENDCAPS_SRCCOLOR2 0x00004000
|
||||
# define D3DPBLENDCAPS_INVSRCCOLOR2 0x00008000
|
||||
#endif
|
||||
|
||||
#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008
|
||||
#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200
|
||||
#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000
|
||||
#define D3DPSHADECAPS_FOGGOURAUD 0x00080000
|
||||
|
||||
#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001
|
||||
#define D3DPTEXTURECAPS_POW2 0x00000002
|
||||
#define D3DPTEXTURECAPS_ALPHA 0x00000004
|
||||
#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020
|
||||
#define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040
|
||||
#define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080
|
||||
#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100
|
||||
#define D3DPTEXTURECAPS_PROJECTED 0x00000400
|
||||
#define D3DPTEXTURECAPS_CUBEMAP 0x00000800
|
||||
#define D3DPTEXTURECAPS_VOLUMEMAP 0x00002000
|
||||
#define D3DPTEXTURECAPS_MIPMAP 0x00004000
|
||||
#define D3DPTEXTURECAPS_MIPVOLUMEMAP 0x00008000
|
||||
#define D3DPTEXTURECAPS_MIPCUBEMAP 0x00010000
|
||||
#define D3DPTEXTURECAPS_CUBEMAP_POW2 0x00020000
|
||||
#define D3DPTEXTURECAPS_VOLUMEMAP_POW2 0x00040000
|
||||
#define D3DPTEXTURECAPS_NOPROJECTEDBUMPENV 0x00200000
|
||||
|
||||
#define D3DPTFILTERCAPS_MINFPOINT 0x00000100
|
||||
#define D3DPTFILTERCAPS_MINFLINEAR 0x00000200
|
||||
#define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400
|
||||
#define D3DPTFILTERCAPS_MINFPYRAMIDALQUAD 0x00000800
|
||||
#define D3DPTFILTERCAPS_MINFGAUSSIANQUAD 0x00001000
|
||||
#define D3DPTFILTERCAPS_MIPFPOINT 0x00010000
|
||||
#define D3DPTFILTERCAPS_MIPFLINEAR 0x00020000
|
||||
#define D3DPTFILTERCAPS_MAGFPOINT 0x01000000
|
||||
#define D3DPTFILTERCAPS_MAGFLINEAR 0x02000000
|
||||
#define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000
|
||||
#define D3DPTFILTERCAPS_MAGFPYRAMIDALQUAD 0x08000000
|
||||
#define D3DPTFILTERCAPS_MAGFGAUSSIANQUAD 0x10000000
|
||||
|
||||
#define D3DPTADDRESSCAPS_WRAP 0x00000001
|
||||
#define D3DPTADDRESSCAPS_MIRROR 0x00000002
|
||||
#define D3DPTADDRESSCAPS_CLAMP 0x00000004
|
||||
#define D3DPTADDRESSCAPS_BORDER 0x00000008
|
||||
#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010
|
||||
#define D3DPTADDRESSCAPS_MIRRORONCE 0x00000020
|
||||
|
||||
#define D3DLINECAPS_TEXTURE 0x00000001
|
||||
#define D3DLINECAPS_ZTEST 0x00000002
|
||||
#define D3DLINECAPS_BLEND 0x00000004
|
||||
#define D3DLINECAPS_ALPHACMP 0x00000008
|
||||
#define D3DLINECAPS_FOG 0x00000010
|
||||
#define D3DLINECAPS_ANTIALIAS 0x00000020
|
||||
|
||||
#define D3DSTENCILCAPS_KEEP 0x00000001
|
||||
#define D3DSTENCILCAPS_ZERO 0x00000002
|
||||
#define D3DSTENCILCAPS_REPLACE 0x00000004
|
||||
#define D3DSTENCILCAPS_INCRSAT 0x00000008
|
||||
#define D3DSTENCILCAPS_DECRSAT 0x00000010
|
||||
#define D3DSTENCILCAPS_INVERT 0x00000020
|
||||
#define D3DSTENCILCAPS_INCR 0x00000040
|
||||
#define D3DSTENCILCAPS_DECR 0x00000080
|
||||
#define D3DSTENCILCAPS_TWOSIDED 0x00000100
|
||||
|
||||
#define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000FFFF
|
||||
#define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000
|
||||
#define D3DFVFCAPS_PSIZE 0x00100000
|
||||
|
||||
#define D3DTEXOPCAPS_DISABLE 0x00000001
|
||||
#define D3DTEXOPCAPS_SELECTARG1 0x00000002
|
||||
#define D3DTEXOPCAPS_SELECTARG2 0x00000004
|
||||
#define D3DTEXOPCAPS_MODULATE 0x00000008
|
||||
#define D3DTEXOPCAPS_MODULATE2X 0x00000010
|
||||
#define D3DTEXOPCAPS_MODULATE4X 0x00000020
|
||||
#define D3DTEXOPCAPS_ADD 0x00000040
|
||||
#define D3DTEXOPCAPS_ADDSIGNED 0x00000080
|
||||
#define D3DTEXOPCAPS_ADDSIGNED2X 0x00000100
|
||||
#define D3DTEXOPCAPS_SUBTRACT 0x00000200
|
||||
#define D3DTEXOPCAPS_ADDSMOOTH 0x00000400
|
||||
#define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800
|
||||
#define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000
|
||||
#define D3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000
|
||||
#define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000
|
||||
#define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000
|
||||
#define D3DTEXOPCAPS_PREMODULATE 0x00010000
|
||||
#define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000
|
||||
#define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000
|
||||
#define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000
|
||||
#define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000
|
||||
#define D3DTEXOPCAPS_BUMPENVMAP 0x00200000
|
||||
#define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000
|
||||
#define D3DTEXOPCAPS_DOTPRODUCT3 0x00800000
|
||||
#define D3DTEXOPCAPS_MULTIPLYADD 0x01000000
|
||||
#define D3DTEXOPCAPS_LERP 0x02000000
|
||||
|
||||
#define D3DVTXPCAPS_TEXGEN 0x00000001
|
||||
#define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002
|
||||
#define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008
|
||||
#define D3DVTXPCAPS_POSITIONALLIGHTS 0x00000010
|
||||
#define D3DVTXPCAPS_LOCALVIEWER 0x00000020
|
||||
#define D3DVTXPCAPS_TWEENING 0x00000040
|
||||
#define D3DVTXPCAPS_TEXGEN_SPHEREMAP 0x00000100
|
||||
#define D3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER 0x00000200
|
||||
|
||||
#define D3DDEVCAPS2_STREAMOFFSET 0x00000001
|
||||
#define D3DDEVCAPS2_DMAPNPATCH 0x00000002
|
||||
#define D3DDEVCAPS2_ADAPTIVETESSRTPATCH 0x00000004
|
||||
#define D3DDEVCAPS2_ADAPTIVETESSNPATCH 0x00000008
|
||||
#define D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES 0x00000010
|
||||
#define D3DDEVCAPS2_PRESAMPLEDDMAPNPATCH 0x00000020
|
||||
#define D3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET 0x00000040
|
||||
|
||||
#define D3DDTCAPS_UBYTE4 0x00000001
|
||||
#define D3DDTCAPS_UBYTE4N 0x00000002
|
||||
#define D3DDTCAPS_SHORT2N 0x00000004
|
||||
#define D3DDTCAPS_SHORT4N 0x00000008
|
||||
#define D3DDTCAPS_USHORT2N 0x00000010
|
||||
#define D3DDTCAPS_USHORT4N 0x00000020
|
||||
#define D3DDTCAPS_UDEC3 0x00000040
|
||||
#define D3DDTCAPS_DEC3N 0x00000080
|
||||
#define D3DDTCAPS_FLOAT16_2 0x00000100
|
||||
#define D3DDTCAPS_FLOAT16_4 0x00000200
|
||||
|
||||
|
||||
#define D3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH 24
|
||||
#define D3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH 0
|
||||
#define D3DVS20_MAX_NUMTEMPS 32
|
||||
#define D3DVS20_MIN_NUMTEMPS 12
|
||||
#define D3DVS20_MAX_STATICFLOWCONTROLDEPTH 4
|
||||
#define D3DVS20_MIN_STATICFLOWCONTROLDEPTH 1
|
||||
|
||||
#define D3DVS20CAPS_PREDICATION (1 << 0)
|
||||
|
||||
#define D3DPS20CAPS_ARBITRARYSWIZZLE (1 << 0)
|
||||
#define D3DPS20CAPS_GRADIENTINSTRUCTIONS (1 << 1)
|
||||
#define D3DPS20CAPS_PREDICATION (1 << 2)
|
||||
#define D3DPS20CAPS_NODEPENDENTREADLIMIT (1 << 3)
|
||||
#define D3DPS20CAPS_NOTEXINSTRUCTIONLIMIT (1 << 4)
|
||||
|
||||
#define D3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH 24
|
||||
#define D3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH 0
|
||||
#define D3DPS20_MAX_NUMTEMPS 32
|
||||
#define D3DPS20_MIN_NUMTEMPS 12
|
||||
#define D3DPS20_MAX_STATICFLOWCONTROLDEPTH 4
|
||||
#define D3DPS20_MIN_STATICFLOWCONTROLDEPTH 0
|
||||
#define D3DPS20_MAX_NUMINSTRUCTIONSLOTS 512
|
||||
#define D3DPS20_MIN_NUMINSTRUCTIONSLOTS 96
|
||||
|
||||
#define D3DMIN30SHADERINSTRUCTIONS 512
|
||||
#define D3DMAX30SHADERINSTRUCTIONS 32768
|
||||
|
||||
/* Structs */
|
||||
typedef struct _D3DVSHADERCAPS2_0 {
|
||||
DWORD Caps;
|
||||
INT DynamicFlowControlDepth;
|
||||
INT NumTemps;
|
||||
INT StaticFlowControlDepth;
|
||||
} D3DVSHADERCAPS2_0, *PD3DVSHADERCAPS2_0, *LPD3DVSHADERCAPS2_0;
|
||||
|
||||
typedef struct _D3DPSHADERCAPS2_0 {
|
||||
DWORD Caps;
|
||||
INT DynamicFlowControlDepth;
|
||||
INT NumTemps;
|
||||
INT StaticFlowControlDepth;
|
||||
INT NumInstructionSlots;
|
||||
} D3DPSHADERCAPS2_0, *PD3DPSHADERCAPS2_0, *LPD3DPSHADERCAPS2_0;
|
||||
|
||||
typedef struct _D3DCAPS9 {
|
||||
D3DDEVTYPE DeviceType;
|
||||
UINT AdapterOrdinal;
|
||||
DWORD Caps;
|
||||
DWORD Caps2;
|
||||
DWORD Caps3;
|
||||
DWORD PresentationIntervals;
|
||||
DWORD CursorCaps;
|
||||
DWORD DevCaps;
|
||||
DWORD PrimitiveMiscCaps;
|
||||
DWORD RasterCaps;
|
||||
DWORD ZCmpCaps;
|
||||
DWORD SrcBlendCaps;
|
||||
DWORD DestBlendCaps;
|
||||
DWORD AlphaCmpCaps;
|
||||
DWORD ShadeCaps;
|
||||
DWORD TextureCaps;
|
||||
DWORD TextureFilterCaps;
|
||||
DWORD CubeTextureFilterCaps;
|
||||
DWORD VolumeTextureFilterCaps;
|
||||
DWORD TextureAddressCaps;
|
||||
DWORD VolumeTextureAddressCaps;
|
||||
DWORD LineCaps;
|
||||
DWORD MaxTextureWidth;
|
||||
DWORD MaxTextureHeight;
|
||||
DWORD MaxVolumeExtent;
|
||||
DWORD MaxTextureRepeat;
|
||||
DWORD MaxTextureAspectRatio;
|
||||
DWORD MaxAnisotropy;
|
||||
float MaxVertexW;
|
||||
float GuardBandLeft;
|
||||
float GuardBandTop;
|
||||
float GuardBandRight;
|
||||
float GuardBandBottom;
|
||||
float ExtentsAdjust;
|
||||
DWORD StencilCaps;
|
||||
DWORD FVFCaps;
|
||||
DWORD TextureOpCaps;
|
||||
DWORD MaxTextureBlendStages;
|
||||
DWORD MaxSimultaneousTextures;
|
||||
DWORD VertexProcessingCaps;
|
||||
DWORD MaxActiveLights;
|
||||
DWORD MaxUserClipPlanes;
|
||||
DWORD MaxVertexBlendMatrices;
|
||||
DWORD MaxVertexBlendMatrixIndex;
|
||||
float MaxPointSize;
|
||||
DWORD MaxPrimitiveCount;
|
||||
DWORD MaxVertexIndex;
|
||||
DWORD MaxStreams;
|
||||
DWORD MaxStreamStride;
|
||||
DWORD VertexShaderVersion;
|
||||
DWORD MaxVertexShaderConst;
|
||||
DWORD PixelShaderVersion;
|
||||
float PixelShader1xMaxValue;
|
||||
DWORD DevCaps2;
|
||||
float MaxNpatchTessellationLevel;
|
||||
DWORD Reserved5;
|
||||
UINT MasterAdapterOrdinal;
|
||||
UINT AdapterOrdinalInGroup;
|
||||
UINT NumberOfAdaptersInGroup;
|
||||
DWORD DeclTypes;
|
||||
DWORD NumSimultaneousRTs;
|
||||
DWORD StretchRectFilterCaps;
|
||||
D3DVSHADERCAPS2_0 VS20Caps;
|
||||
D3DPSHADERCAPS2_0 PS20Caps;
|
||||
DWORD VertexTextureFilterCaps;
|
||||
DWORD MaxVShaderInstructionsExecuted;
|
||||
DWORD MaxPShaderInstructionsExecuted;
|
||||
DWORD MaxVertexShader30InstructionSlots;
|
||||
DWORD MaxPixelShader30InstructionSlots;
|
||||
} D3DCAPS9, *PD3DCAPS9, *LPD3DCAPS9;
|
||||
|
||||
typedef struct _D3DCONTENTPROTECTIONCAPS {
|
||||
DWORD Caps;
|
||||
GUID KeyExchangeType;
|
||||
UINT BufferAlignmentStart;
|
||||
UINT BlockAlignmentSize;
|
||||
ULONGLONG ProtectedMemorySize;
|
||||
} D3DCONTENTPROTECTIONCAPS, *PD3DCONTENTPROTECTIONCAPS, *LPD3DCONTENTPROTECTIONCAPS;
|
||||
|
||||
typedef struct _D3DOVERLAYCAPS {
|
||||
UINT Caps;
|
||||
UINT MaxOverlayDisplayWidth;
|
||||
UINT MaxOverlayDisplayHeight;
|
||||
} D3DOVERLAYCAPS, *PD3DOVERLAYCAPS, *LPD3DOVERLAYCAPS;
|
||||
|
||||
#endif /* _D3D9CAPS_H_ */
|
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* \file dri_sarea.h
|
||||
* \file sarea.h
|
||||
* SAREA definitions.
|
||||
*
|
||||
* \author Kevin E. Martin <kevin@precisioninsight.com>
|
@@ -33,14 +33,14 @@ extern "C" {
|
||||
** used to make the header, and the header can be found at
|
||||
** http://www.opengl.org/registry/
|
||||
**
|
||||
** Khronos $Revision: 28335 $ on $Date: 2014-09-26 18:55:45 -0700 (Fri, 26 Sep 2014) $
|
||||
** Khronos $Revision: 25922 $ on $Date: 2014-03-17 03:54:32 -0700 (Mon, 17 Mar 2014) $
|
||||
*/
|
||||
|
||||
#ifndef GL_APIENTRYP
|
||||
#define GL_APIENTRYP GL_APIENTRY*
|
||||
#endif
|
||||
|
||||
/* Generated on date 20140926 */
|
||||
/* Generated on date 20140317 */
|
||||
|
||||
/* Generated C header for:
|
||||
* API: gles2
|
||||
@@ -54,6 +54,7 @@ extern "C" {
|
||||
|
||||
#ifndef GL_KHR_blend_equation_advanced
|
||||
#define GL_KHR_blend_equation_advanced 1
|
||||
#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285
|
||||
#define GL_MULTIPLY_KHR 0x9294
|
||||
#define GL_SCREEN_KHR 0x9295
|
||||
#define GL_OVERLAY_KHR 0x9296
|
||||
@@ -75,17 +76,6 @@ GL_APICALL void GL_APIENTRY glBlendBarrierKHR (void);
|
||||
#endif
|
||||
#endif /* GL_KHR_blend_equation_advanced */
|
||||
|
||||
#ifndef GL_KHR_blend_equation_advanced_coherent
|
||||
#define GL_KHR_blend_equation_advanced_coherent 1
|
||||
#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285
|
||||
#endif /* GL_KHR_blend_equation_advanced_coherent */
|
||||
|
||||
#ifndef GL_KHR_context_flush_control
|
||||
#define GL_KHR_context_flush_control 1
|
||||
#define GL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x82FB
|
||||
#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x82FC
|
||||
#endif /* GL_KHR_context_flush_control */
|
||||
|
||||
#ifndef GL_KHR_debug
|
||||
#define GL_KHR_debug 1
|
||||
typedef void (GL_APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
|
||||
@@ -155,34 +145,6 @@ GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, void **params);
|
||||
#endif
|
||||
#endif /* GL_KHR_debug */
|
||||
|
||||
#ifndef GL_KHR_robust_buffer_access_behavior
|
||||
#define GL_KHR_robust_buffer_access_behavior 1
|
||||
#endif /* GL_KHR_robust_buffer_access_behavior */
|
||||
|
||||
#ifndef GL_KHR_robustness
|
||||
#define GL_KHR_robustness 1
|
||||
#define GL_CONTEXT_ROBUST_ACCESS_KHR 0x90F3
|
||||
#define GL_LOSE_CONTEXT_ON_RESET_KHR 0x8252
|
||||
#define GL_GUILTY_CONTEXT_RESET_KHR 0x8253
|
||||
#define GL_INNOCENT_CONTEXT_RESET_KHR 0x8254
|
||||
#define GL_UNKNOWN_CONTEXT_RESET_KHR 0x8255
|
||||
#define GL_RESET_NOTIFICATION_STRATEGY_KHR 0x8256
|
||||
#define GL_NO_RESET_NOTIFICATION_KHR 0x8261
|
||||
#define GL_CONTEXT_LOST_KHR 0x0507
|
||||
typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC) (void);
|
||||
typedef void (GL_APIENTRYP PFNGLREADNPIXELSKHRPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
|
||||
typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETNUNIFORMUIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusKHR (void);
|
||||
GL_APICALL void GL_APIENTRY glReadnPixelsKHR (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
|
||||
GL_APICALL void GL_APIENTRY glGetnUniformfvKHR (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glGetnUniformivKHR (GLuint program, GLint location, GLsizei bufSize, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetnUniformuivKHR (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
|
||||
#endif
|
||||
#endif /* GL_KHR_robustness */
|
||||
|
||||
#ifndef GL_KHR_texture_compression_astc_hdr
|
||||
#define GL_KHR_texture_compression_astc_hdr 1
|
||||
#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
|
||||
@@ -238,10 +200,6 @@ GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum targe
|
||||
#define GL_SAMPLER_EXTERNAL_OES 0x8D66
|
||||
#endif /* GL_OES_EGL_image_external */
|
||||
|
||||
#ifndef GL_OES_compressed_ETC1_RGB8_sub_texture
|
||||
#define GL_OES_compressed_ETC1_RGB8_sub_texture 1
|
||||
#endif /* GL_OES_compressed_ETC1_RGB8_sub_texture */
|
||||
|
||||
#ifndef GL_OES_compressed_ETC1_RGB8_texture
|
||||
#define GL_OES_compressed_ETC1_RGB8_texture 1
|
||||
#define GL_ETC1_RGB8_OES 0x8D64
|
||||
@@ -554,10 +512,6 @@ GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLen
|
||||
#define GL_Z400_BINARY_AMD 0x8740
|
||||
#endif /* GL_AMD_program_binary_Z400 */
|
||||
|
||||
#ifndef GL_ANDROID_extension_pack_es31a
|
||||
#define GL_ANDROID_extension_pack_es31a 1
|
||||
#endif /* GL_ANDROID_extension_pack_es31a */
|
||||
|
||||
#ifndef GL_ANGLE_depth_texture
|
||||
#define GL_ANGLE_depth_texture 1
|
||||
#endif /* GL_ANGLE_depth_texture */
|
||||
@@ -633,23 +587,6 @@ GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLs
|
||||
#endif
|
||||
#endif /* GL_ANGLE_translated_shader_source */
|
||||
|
||||
#ifndef GL_APPLE_clip_distance
|
||||
#define GL_APPLE_clip_distance 1
|
||||
#define GL_MAX_CLIP_DISTANCES_APPLE 0x0D32
|
||||
#define GL_CLIP_DISTANCE0_APPLE 0x3000
|
||||
#define GL_CLIP_DISTANCE1_APPLE 0x3001
|
||||
#define GL_CLIP_DISTANCE2_APPLE 0x3002
|
||||
#define GL_CLIP_DISTANCE3_APPLE 0x3003
|
||||
#define GL_CLIP_DISTANCE4_APPLE 0x3004
|
||||
#define GL_CLIP_DISTANCE5_APPLE 0x3005
|
||||
#define GL_CLIP_DISTANCE6_APPLE 0x3006
|
||||
#define GL_CLIP_DISTANCE7_APPLE 0x3007
|
||||
#endif /* GL_APPLE_clip_distance */
|
||||
|
||||
#ifndef GL_APPLE_color_buffer_packed_float
|
||||
#define GL_APPLE_color_buffer_packed_float 1
|
||||
#endif /* GL_APPLE_color_buffer_packed_float */
|
||||
|
||||
#ifndef GL_APPLE_copy_texture_levels
|
||||
#define GL_APPLE_copy_texture_levels 1
|
||||
typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
|
||||
@@ -730,14 +667,6 @@ GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei
|
||||
#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
|
||||
#endif /* GL_APPLE_texture_max_level */
|
||||
|
||||
#ifndef GL_APPLE_texture_packed_float
|
||||
#define GL_APPLE_texture_packed_float 1
|
||||
#define GL_UNSIGNED_INT_10F_11F_11F_REV_APPLE 0x8C3B
|
||||
#define GL_UNSIGNED_INT_5_9_9_9_REV_APPLE 0x8C3E
|
||||
#define GL_R11F_G11F_B10F_APPLE 0x8C3A
|
||||
#define GL_RGB9_E5_APPLE 0x8C3D
|
||||
#endif /* GL_APPLE_texture_packed_float */
|
||||
|
||||
#ifndef GL_ARM_mali_program_binary
|
||||
#define GL_ARM_mali_program_binary 1
|
||||
#define GL_MALI_PROGRAM_BINARY_ARM 0x8F61
|
||||
@@ -762,13 +691,6 @@ GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei
|
||||
#define GL_ARM_shader_framebuffer_fetch_depth_stencil 1
|
||||
#endif /* GL_ARM_shader_framebuffer_fetch_depth_stencil */
|
||||
|
||||
#ifndef GL_DMP_program_binary
|
||||
#define GL_DMP_program_binary 1
|
||||
#define GL_SMAPHS30_PROGRAM_BINARY_DMP 0x9251
|
||||
#define GL_SMAPHS_PROGRAM_BINARY_DMP 0x9252
|
||||
#define GL_DMP_PROGRAM_BINARY_DMP 0x9253
|
||||
#endif /* GL_DMP_program_binary */
|
||||
|
||||
#ifndef GL_DMP_shader_binary
|
||||
#define GL_DMP_shader_binary 1
|
||||
#define GL_SHADER_BINARY_DMP 0x9250
|
||||
@@ -790,14 +712,6 @@ GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei
|
||||
#define GL_UNSIGNED_NORMALIZED_EXT 0x8C17
|
||||
#endif /* GL_EXT_color_buffer_half_float */
|
||||
|
||||
#ifndef GL_EXT_copy_image
|
||||
#define GL_EXT_copy_image 1
|
||||
typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAEXTPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glCopyImageSubDataEXT (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
|
||||
#endif
|
||||
#endif /* GL_EXT_copy_image */
|
||||
|
||||
#ifndef GL_EXT_debug_label
|
||||
#define GL_EXT_debug_label 1
|
||||
#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
|
||||
@@ -915,30 +829,6 @@ GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs);
|
||||
#endif
|
||||
#endif /* GL_EXT_draw_buffers */
|
||||
|
||||
#ifndef GL_EXT_draw_buffers_indexed
|
||||
#define GL_EXT_draw_buffers_indexed 1
|
||||
#define GL_MIN 0x8007
|
||||
#define GL_MAX 0x8008
|
||||
typedef void (GL_APIENTRYP PFNGLENABLEIEXTPROC) (GLenum target, GLuint index);
|
||||
typedef void (GL_APIENTRYP PFNGLDISABLEIEXTPROC) (GLenum target, GLuint index);
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIEXTPROC) (GLuint buf, GLenum mode);
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIEXTPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDFUNCIEXTPROC) (GLuint buf, GLenum src, GLenum dst);
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIEXTPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
typedef void (GL_APIENTRYP PFNGLCOLORMASKIEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIEXTPROC) (GLenum target, GLuint index);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glEnableiEXT (GLenum target, GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glDisableiEXT (GLenum target, GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glBlendEquationiEXT (GLuint buf, GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glBlendEquationSeparateiEXT (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendFunciEXT (GLuint buf, GLenum src, GLenum dst);
|
||||
GL_APICALL void GL_APIENTRY glBlendFuncSeparateiEXT (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
GL_APICALL void GL_APIENTRY glColorMaskiEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsEnablediEXT (GLenum target, GLuint index);
|
||||
#endif
|
||||
#endif /* GL_EXT_draw_buffers_indexed */
|
||||
|
||||
#ifndef GL_EXT_draw_instanced
|
||||
#define GL_EXT_draw_instanced 1
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
|
||||
@@ -949,55 +839,6 @@ GL_APICALL void GL_APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei cou
|
||||
#endif
|
||||
#endif /* GL_EXT_draw_instanced */
|
||||
|
||||
#ifndef GL_EXT_geometry_point_size
|
||||
#define GL_EXT_geometry_point_size 1
|
||||
#endif /* GL_EXT_geometry_point_size */
|
||||
|
||||
#ifndef GL_EXT_geometry_shader
|
||||
#define GL_EXT_geometry_shader 1
|
||||
#define GL_GEOMETRY_SHADER_EXT 0x8DD9
|
||||
#define GL_GEOMETRY_SHADER_BIT_EXT 0x00000004
|
||||
#define GL_GEOMETRY_LINKED_VERTICES_OUT_EXT 0x8916
|
||||
#define GL_GEOMETRY_LINKED_INPUT_TYPE_EXT 0x8917
|
||||
#define GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT 0x8918
|
||||
#define GL_GEOMETRY_SHADER_INVOCATIONS_EXT 0x887F
|
||||
#define GL_LAYER_PROVOKING_VERTEX_EXT 0x825E
|
||||
#define GL_LINES_ADJACENCY_EXT 0x000A
|
||||
#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
|
||||
#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
|
||||
#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
|
||||
#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
|
||||
#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT 0x8A2C
|
||||
#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8A32
|
||||
#define GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT 0x9123
|
||||
#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT 0x9124
|
||||
#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
|
||||
#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
|
||||
#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT 0x8E5A
|
||||
#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
|
||||
#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT 0x92CF
|
||||
#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT 0x92D5
|
||||
#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT 0x90CD
|
||||
#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT 0x90D7
|
||||
#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D
|
||||
#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E
|
||||
#define GL_UNDEFINED_VERTEX_EXT 0x8260
|
||||
#define GL_PRIMITIVES_GENERATED_EXT 0x8C87
|
||||
#define GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT 0x9312
|
||||
#define GL_MAX_FRAMEBUFFER_LAYERS_EXT 0x9317
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
|
||||
#define GL_REFERENCED_BY_GEOMETRY_SHADER_EXT 0x9309
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level);
|
||||
#endif
|
||||
#endif /* GL_EXT_geometry_shader */
|
||||
|
||||
#ifndef GL_EXT_gpu_shader5
|
||||
#define GL_EXT_gpu_shader5 1
|
||||
#endif /* GL_EXT_gpu_shader5 */
|
||||
|
||||
#ifndef GL_EXT_instanced_arrays
|
||||
#define GL_EXT_instanced_arrays 1
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_EXT 0x88FE
|
||||
@@ -1070,23 +911,12 @@ GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLi
|
||||
#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A
|
||||
#endif /* GL_EXT_occlusion_query_boolean */
|
||||
|
||||
#ifndef GL_EXT_primitive_bounding_box
|
||||
#define GL_EXT_primitive_bounding_box 1
|
||||
#define GL_PRIMITIVE_BOUNDING_BOX_EXT 0x92BE
|
||||
typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXEXTPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxEXT (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
|
||||
#endif
|
||||
#endif /* GL_EXT_primitive_bounding_box */
|
||||
|
||||
#ifndef GL_EXT_pvrtc_sRGB
|
||||
#define GL_EXT_pvrtc_sRGB 1
|
||||
#define GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT 0x8A54
|
||||
#define GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT 0x8A55
|
||||
#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT 0x8A56
|
||||
#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT 0x8A57
|
||||
#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG 0x93F0
|
||||
#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG 0x93F1
|
||||
#endif /* GL_EXT_pvrtc_sRGB */
|
||||
|
||||
#ifndef GL_EXT_read_format_bgra
|
||||
@@ -1234,18 +1064,10 @@ GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLin
|
||||
#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52
|
||||
#endif /* GL_EXT_shader_framebuffer_fetch */
|
||||
|
||||
#ifndef GL_EXT_shader_implicit_conversions
|
||||
#define GL_EXT_shader_implicit_conversions 1
|
||||
#endif /* GL_EXT_shader_implicit_conversions */
|
||||
|
||||
#ifndef GL_EXT_shader_integer_mix
|
||||
#define GL_EXT_shader_integer_mix 1
|
||||
#endif /* GL_EXT_shader_integer_mix */
|
||||
|
||||
#ifndef GL_EXT_shader_io_blocks
|
||||
#define GL_EXT_shader_io_blocks 1
|
||||
#endif /* GL_EXT_shader_io_blocks */
|
||||
|
||||
#ifndef GL_EXT_shader_pixel_local_storage
|
||||
#define GL_EXT_shader_pixel_local_storage 1
|
||||
#define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63
|
||||
@@ -1265,109 +1087,6 @@ GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLin
|
||||
#define GL_SAMPLER_2D_SHADOW_EXT 0x8B62
|
||||
#endif /* GL_EXT_shadow_samplers */
|
||||
|
||||
#ifndef GL_EXT_tessellation_point_size
|
||||
#define GL_EXT_tessellation_point_size 1
|
||||
#endif /* GL_EXT_tessellation_point_size */
|
||||
|
||||
#ifndef GL_EXT_tessellation_shader
|
||||
#define GL_EXT_tessellation_shader 1
|
||||
#define GL_PATCHES_EXT 0x000E
|
||||
#define GL_PATCH_VERTICES_EXT 0x8E72
|
||||
#define GL_TESS_CONTROL_OUTPUT_VERTICES_EXT 0x8E75
|
||||
#define GL_TESS_GEN_MODE_EXT 0x8E76
|
||||
#define GL_TESS_GEN_SPACING_EXT 0x8E77
|
||||
#define GL_TESS_GEN_VERTEX_ORDER_EXT 0x8E78
|
||||
#define GL_TESS_GEN_POINT_MODE_EXT 0x8E79
|
||||
#define GL_ISOLINES_EXT 0x8E7A
|
||||
#define GL_QUADS_EXT 0x0007
|
||||
#define GL_FRACTIONAL_ODD_EXT 0x8E7B
|
||||
#define GL_FRACTIONAL_EVEN_EXT 0x8E7C
|
||||
#define GL_MAX_PATCH_VERTICES_EXT 0x8E7D
|
||||
#define GL_MAX_TESS_GEN_LEVEL_EXT 0x8E7E
|
||||
#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E7F
|
||||
#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E80
|
||||
#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT 0x8E81
|
||||
#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT 0x8E82
|
||||
#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT 0x8E83
|
||||
#define GL_MAX_TESS_PATCH_COMPONENTS_EXT 0x8E84
|
||||
#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT 0x8E85
|
||||
#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT 0x8E86
|
||||
#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT 0x8E89
|
||||
#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT 0x8E8A
|
||||
#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT 0x886C
|
||||
#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT 0x886D
|
||||
#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E1E
|
||||
#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E1F
|
||||
#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT 0x92CD
|
||||
#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT 0x92CE
|
||||
#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT 0x92D3
|
||||
#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT 0x92D4
|
||||
#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT 0x90CB
|
||||
#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT 0x90CC
|
||||
#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT 0x90D8
|
||||
#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT 0x90D9
|
||||
#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221
|
||||
#define GL_IS_PER_PATCH_EXT 0x92E7
|
||||
#define GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT 0x9307
|
||||
#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT 0x9308
|
||||
#define GL_TESS_CONTROL_SHADER_EXT 0x8E88
|
||||
#define GL_TESS_EVALUATION_SHADER_EXT 0x8E87
|
||||
#define GL_TESS_CONTROL_SHADER_BIT_EXT 0x00000008
|
||||
#define GL_TESS_EVALUATION_SHADER_BIT_EXT 0x00000010
|
||||
typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIEXTPROC) (GLenum pname, GLint value);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glPatchParameteriEXT (GLenum pname, GLint value);
|
||||
#endif
|
||||
#endif /* GL_EXT_tessellation_shader */
|
||||
|
||||
#ifndef GL_EXT_texture_border_clamp
|
||||
#define GL_EXT_texture_border_clamp 1
|
||||
#define GL_TEXTURE_BORDER_COLOR_EXT 0x1004
|
||||
#define GL_CLAMP_TO_BORDER_EXT 0x812D
|
||||
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, const GLint *param);
|
||||
typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, const GLuint *param);
|
||||
typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, GLuint *params);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params);
|
||||
GL_APICALL void GL_APIENTRY glSamplerParameterIivEXT (GLuint sampler, GLenum pname, const GLint *param);
|
||||
GL_APICALL void GL_APIENTRY glSamplerParameterIuivEXT (GLuint sampler, GLenum pname, const GLuint *param);
|
||||
GL_APICALL void GL_APIENTRY glGetSamplerParameterIivEXT (GLuint sampler, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivEXT (GLuint sampler, GLenum pname, GLuint *params);
|
||||
#endif
|
||||
#endif /* GL_EXT_texture_border_clamp */
|
||||
|
||||
#ifndef GL_EXT_texture_buffer
|
||||
#define GL_EXT_texture_buffer 1
|
||||
#define GL_TEXTURE_BUFFER_EXT 0x8C2A
|
||||
#define GL_TEXTURE_BUFFER_BINDING_EXT 0x8C2A
|
||||
#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
|
||||
#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
|
||||
#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
|
||||
#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_EXT 0x919F
|
||||
#define GL_SAMPLER_BUFFER_EXT 0x8DC2
|
||||
#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
|
||||
#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
|
||||
#define GL_IMAGE_BUFFER_EXT 0x9051
|
||||
#define GL_INT_IMAGE_BUFFER_EXT 0x905C
|
||||
#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067
|
||||
#define GL_TEXTURE_BUFFER_OFFSET_EXT 0x919D
|
||||
#define GL_TEXTURE_BUFFER_SIZE_EXT 0x919E
|
||||
typedef void (GL_APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEEXTPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer);
|
||||
GL_APICALL void GL_APIENTRY glTexBufferRangeEXT (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
#endif
|
||||
#endif /* GL_EXT_texture_buffer */
|
||||
|
||||
#ifndef GL_EXT_texture_compression_dxt1
|
||||
#define GL_EXT_texture_compression_dxt1 1
|
||||
#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
|
||||
@@ -1380,19 +1099,6 @@ GL_APICALL void GL_APIENTRY glTexBufferRangeEXT (GLenum target, GLenum internalf
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
|
||||
#endif /* GL_EXT_texture_compression_s3tc */
|
||||
|
||||
#ifndef GL_EXT_texture_cube_map_array
|
||||
#define GL_EXT_texture_cube_map_array 1
|
||||
#define GL_TEXTURE_CUBE_MAP_ARRAY_EXT 0x9009
|
||||
#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT 0x900A
|
||||
#define GL_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900C
|
||||
#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT 0x900D
|
||||
#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900E
|
||||
#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900F
|
||||
#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054
|
||||
#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F
|
||||
#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A
|
||||
#endif /* GL_EXT_texture_cube_map_array */
|
||||
|
||||
#ifndef GL_EXT_texture_filter_anisotropic
|
||||
#define GL_EXT_texture_filter_anisotropic 1
|
||||
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
|
||||
@@ -1455,19 +1161,6 @@ GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target
|
||||
#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
|
||||
#endif /* GL_EXT_texture_type_2_10_10_10_REV */
|
||||
|
||||
#ifndef GL_EXT_texture_view
|
||||
#define GL_EXT_texture_view 1
|
||||
#define GL_TEXTURE_VIEW_MIN_LEVEL_EXT 0x82DB
|
||||
#define GL_TEXTURE_VIEW_NUM_LEVELS_EXT 0x82DC
|
||||
#define GL_TEXTURE_VIEW_MIN_LAYER_EXT 0x82DD
|
||||
#define GL_TEXTURE_VIEW_NUM_LAYERS_EXT 0x82DE
|
||||
#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
|
||||
typedef void (GL_APIENTRYP PFNGLTEXTUREVIEWEXTPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glTextureViewEXT (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
|
||||
#endif
|
||||
#endif /* GL_EXT_texture_view */
|
||||
|
||||
#ifndef GL_EXT_unpack_subimage
|
||||
#define GL_EXT_unpack_subimage 1
|
||||
#define GL_UNPACK_ROW_LENGTH_EXT 0x0CF2
|
||||
|
@@ -7,4 +7,4 @@
|
||||
|
||||
// Projects needing GL/glu.h and GL/glut.h should now
|
||||
// include these headers independently as glu and glut
|
||||
// are no longer core parts of mesa
|
||||
// are no longe core parts of mesa
|
||||
|
@@ -1,101 +0,0 @@
|
||||
/*
|
||||
* Copyright 2011 Joakim Sindholt <opensource@zhasha.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
|
||||
* on the rights to use, copy, modify, merge, publish, distribute, sub
|
||||
* license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
* USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef _D3DADAPTER9_H_
|
||||
#define _D3DADAPTER9_H_
|
||||
|
||||
#include "present.h"
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
/* Representation of an adapter group, although since this is implemented by
|
||||
* the driver, it knows nothing about the windowing system it's on */
|
||||
typedef struct ID3DAdapter9Vtbl
|
||||
{
|
||||
/* IUnknown */
|
||||
HRESULT (WINAPI *QueryInterface)(ID3DAdapter9 *This, REFIID riid, void **ppvObject);
|
||||
ULONG (WINAPI *AddRef)(ID3DAdapter9 *This);
|
||||
ULONG (WINAPI *Release)(ID3DAdapter9 *This);
|
||||
|
||||
/* ID3DAdapter9 */
|
||||
HRESULT (WINAPI *GetAdapterIdentifier)(ID3DAdapter9 *This, DWORD Flags, D3DADAPTER_IDENTIFIER9 *pIdentifier);
|
||||
HRESULT (WINAPI *CheckDeviceType)(ID3DAdapter9 *This, D3DDEVTYPE DevType, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat, BOOL bWindowed);
|
||||
HRESULT (WINAPI *CheckDeviceFormat)(ID3DAdapter9 *This, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat);
|
||||
HRESULT (WINAPI *CheckDeviceMultiSampleType)(ID3DAdapter9 *This, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD *pQualityLevels);
|
||||
HRESULT (WINAPI *CheckDepthStencilMatch)(ID3DAdapter9 *This, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat);
|
||||
HRESULT (WINAPI *CheckDeviceFormatConversion)(ID3DAdapter9 *This, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat);
|
||||
HRESULT (WINAPI *GetDeviceCaps)(ID3DAdapter9 *This, D3DDEVTYPE DeviceType, D3DCAPS9 *pCaps);
|
||||
HRESULT (WINAPI *CreateDevice)(ID3DAdapter9 *This, UINT RealAdapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS *pPresentationParameters, IDirect3D9 *pD3D9, ID3DPresentGroup *pPresentationFactory, IDirect3DDevice9 **ppReturnedDeviceInterface);
|
||||
HRESULT (WINAPI *CreateDeviceEx)(ID3DAdapter9 *This, UINT RealAdapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS *pPresentationParameters, D3DDISPLAYMODEEX *pFullscreenDisplayMode, IDirect3D9Ex *pD3D9Ex, ID3DPresentGroup *pPresentationFactory, IDirect3DDevice9Ex **ppReturnedDeviceInterface);
|
||||
} ID3DAdapter9Vtbl;
|
||||
|
||||
struct ID3DAdapter9
|
||||
{
|
||||
ID3DAdapter9Vtbl *lpVtbl;
|
||||
};
|
||||
|
||||
/* IUnknown macros */
|
||||
#define ID3DAdapter9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define ID3DAdapter9_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define ID3DAdapter9_Release(p) (p)->lpVtbl->Release(p)
|
||||
/* ID3DAdapter9 macros */
|
||||
#define ID3DAdapter9_GetAdapterIdentifier(p,a,b) (p)->lpVtbl->GetAdapterIdentifier(p,a,b)
|
||||
#define ID3DAdapter9_CheckDeviceType(p,a,b,c,d) (p)->lpVtbl->CheckDeviceType(p,a,b,c,d)
|
||||
#define ID3DAdapter9_CheckDeviceFormat(p,a,b,c,d,e) (p)->lpVtbl->CheckDeviceFormat(p,a,b,c,d,e)
|
||||
#define ID3DAdapter9_CheckDeviceMultiSampleType(p,a,b,c,d,e) (p)->lpVtbl->CheckDeviceMultiSampleType(p,a,b,c,d,e)
|
||||
#define ID3DAdapter9_CheckDepthStencilMatch(p,a,b,c,d) (p)->lpVtbl->CheckDepthStencilMatch(p,a,b,c,d)
|
||||
#define ID3DAdapter9_CheckDeviceFormatConversion(p,a,b,c) (p)->lpVtbl->CheckDeviceFormatConversion(p,a,b,c)
|
||||
#define ID3DAdapter9_GetDeviceCaps(p,a,b) (p)->lpVtbl->GetDeviceCaps(p,a,b)
|
||||
#define ID3DAdapter9_CreateDevice(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->CreateDevice(p,a,b,c,d,e,f,g,h)
|
||||
#define ID3DAdapter9_CreateDeviceEx(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
#else /* __cplusplus */
|
||||
|
||||
struct ID3DAdapter9 : public IUnknown
|
||||
{
|
||||
HRESULT WINAPI GetAdapterIdentifier(DWORD Flags, D3DADAPTER_IDENTIFIER9 *pIdentifier);
|
||||
HRESULT WINAPI CheckDeviceType(D3DDEVTYPE DevType, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat, BOOL bWindowed);
|
||||
HRESULT WINAPI CheckDeviceFormat(D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat);
|
||||
HRESULT WINAPI CheckDeviceMultiSampleType(D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD *pQualityLevels);
|
||||
HRESULT WINAPI CheckDepthStencilMatch(D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat);
|
||||
HRESULT WINAPI CheckDeviceFormatConversion(D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat);
|
||||
HRESULT WINAPI GetDeviceCaps(D3DDEVTYPE DeviceType, D3DCAPS9 *pCaps);
|
||||
HRESULT WINAPI CreateDevice(UINT RealAdapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS *pPresentationParameters, IDirect3D9 *pD3D9, ID3DPresentGroup *pPresentationFactory, IDirect3DDevice9 **ppReturnedDeviceInterface);
|
||||
HRESULT WINAPI CreateDeviceEx(UINT RealAdapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS *pPresentationParameters, D3DDISPLAYMODEEX *pFullscreenDisplayMode, IDirect3D9Ex *pD3D9Ex, ID3DPresentGroup *pPresentationFactory, IDirect3DDevice9Ex **ppReturnedDeviceInterface);
|
||||
};
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* acquire a const struct D3DAdapter9* structure describing the interface
|
||||
* queried. See */
|
||||
const void * WINAPI
|
||||
D3DAdapter9GetProc( const char *name );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _D3DADAPTER9_H_ */
|
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright 2011 Joakim Sindholt <opensource@zhasha.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
|
||||
* on the rights to use, copy, modify, merge, publish, distribute, sub
|
||||
* license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
* USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef _D3DADAPTER9_DRM_H_
|
||||
#define _D3DADAPTER9_DRM_H_
|
||||
|
||||
#include "d3dadapter9.h"
|
||||
|
||||
/* query driver support name */
|
||||
#define D3DADAPTER9DRM_NAME "drm"
|
||||
/* current version */
|
||||
#define D3DADAPTER9DRM_MAJOR 0
|
||||
#define D3DADAPTER9DRM_MINOR 0
|
||||
|
||||
struct D3DAdapter9DRM
|
||||
{
|
||||
unsigned major_version; /* ABI break */
|
||||
unsigned minor_version; /* backwards compatible feature additions */
|
||||
|
||||
/* NOTE: upon passing an fd to this function, it's now owned by this
|
||||
function. If this function fails, the fd will be closed here as well */
|
||||
HRESULT (WINAPI *create_adapter)(int fd, ID3DAdapter9 **ppAdapter);
|
||||
};
|
||||
|
||||
#endif /* _D3DADAPTER9_DRM_H_ */
|
@@ -1,136 +0,0 @@
|
||||
/*
|
||||
* Copyright 2011 Joakim Sindholt <opensource@zhasha.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
|
||||
* on the rights to use, copy, modify, merge, publish, distribute, sub
|
||||
* license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
* USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef _D3DADAPTER_PRESENT_H_
|
||||
#define _D3DADAPTER_PRESENT_H_
|
||||
|
||||
#include <d3d9.h>
|
||||
|
||||
#ifndef D3DOK_WINDOW_OCCLUDED
|
||||
#define D3DOK_WINDOW_OCCLUDED MAKE_D3DSTATUS(2531)
|
||||
#endif /* D3DOK_WINDOW_OCCLUDED */
|
||||
|
||||
#ifndef __cplusplus
|
||||
typedef struct ID3DPresent ID3DPresent;
|
||||
typedef struct ID3DPresentGroup ID3DPresentGroup;
|
||||
typedef struct ID3DAdapter9 ID3DAdapter9;
|
||||
typedef struct D3DWindowBuffer D3DWindowBuffer;
|
||||
|
||||
/* Presentation backend for drivers to display their brilliant work */
|
||||
typedef struct ID3DPresentVtbl
|
||||
{
|
||||
/* IUnknown */
|
||||
HRESULT (WINAPI *QueryInterface)(ID3DPresent *This, REFIID riid, void **ppvObject);
|
||||
ULONG (WINAPI *AddRef)(ID3DPresent *This);
|
||||
ULONG (WINAPI *Release)(ID3DPresent *This);
|
||||
|
||||
/* ID3DPresent */
|
||||
/* This function initializes the screen and window provided at creation.
|
||||
* Hence why this should always be called as the one of first things a new
|
||||
* swap chain does */
|
||||
HRESULT (WINAPI *SetPresentParameters)(ID3DPresent *This, D3DPRESENT_PARAMETERS *pPresentationParameters, D3DDISPLAYMODEEX *pFullscreenDisplayMode);
|
||||
/* Make a buffer visible to the window system via dma-buf fd.
|
||||
* For better compatibility, it must be 32bpp and format ARGB/XRGB */
|
||||
HRESULT (WINAPI *NewD3DWindowBufferFromDmaBuf)(ID3DPresent *This, int dmaBufFd, int width, int height, int stride, int depth, int bpp, D3DWindowBuffer **out);
|
||||
HRESULT (WINAPI *DestroyD3DWindowBuffer)(ID3DPresent *This, D3DWindowBuffer *buffer);
|
||||
/* After presenting a buffer to the window system, the buffer
|
||||
* may be used as is (no copy of the content) by the window system.
|
||||
* You must not use a non-released buffer, else the user may see undefined content. */
|
||||
HRESULT (WINAPI *WaitBufferReleased)(ID3DPresent *This, D3DWindowBuffer *buffer);
|
||||
HRESULT (WINAPI *FrontBufferCopy)(ID3DPresent *This, D3DWindowBuffer *buffer);
|
||||
/* It is possible to do partial copy, but impossible to do resizing, which must
|
||||
* be done by the client after checking the front buffer size */
|
||||
HRESULT (WINAPI *PresentBuffer)(ID3DPresent *This, D3DWindowBuffer *buffer, HWND hWndOverride, const RECT *pSourceRect, const RECT *pDestRect, const RGNDATA *pDirtyRegion, DWORD Flags);
|
||||
HRESULT (WINAPI *GetRasterStatus)(ID3DPresent *This, D3DRASTER_STATUS *pRasterStatus);
|
||||
HRESULT (WINAPI *GetDisplayMode)(ID3DPresent *This, D3DDISPLAYMODEEX *pMode, D3DDISPLAYROTATION *pRotation);
|
||||
HRESULT (WINAPI *GetPresentStats)(ID3DPresent *This, D3DPRESENTSTATS *pStats);
|
||||
HRESULT (WINAPI *GetCursorPos)(ID3DPresent *This, POINT *pPoint);
|
||||
HRESULT (WINAPI *SetCursorPos)(ID3DPresent *This, POINT *pPoint);
|
||||
/* Cursor size is always 32x32. pBitmap and pHotspot can be NULL. */
|
||||
HRESULT (WINAPI *SetCursor)(ID3DPresent *This, void *pBitmap, POINT *pHotspot, BOOL bShow);
|
||||
HRESULT (WINAPI *SetGammaRamp)(ID3DPresent *This, const D3DGAMMARAMP *pRamp, HWND hWndOverride);
|
||||
HRESULT (WINAPI *GetWindowInfo)(ID3DPresent *This, HWND hWnd, int *width, int *height, int *depth);
|
||||
} ID3DPresentVtbl;
|
||||
|
||||
struct ID3DPresent
|
||||
{
|
||||
ID3DPresentVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
/* IUnknown macros */
|
||||
#define ID3DPresent_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define ID3DPresent_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define ID3DPresent_Release(p) (p)->lpVtbl->Release(p)
|
||||
/* ID3DPresent macros */
|
||||
#define ID3DPresent_GetPresentParameters(p,a) (p)->lpVtbl->GetPresentParameters(p,a)
|
||||
#define ID3DPresent_SetPresentParameters(p,a,b) (p)->lpVtbl->SetPresentParameters(p,a,b)
|
||||
#define ID3DPresent_NewD3DWindowBufferFromDmaBuf(p,a,b,c,d,e,f,g) (p)->lpVtbl->NewD3DWindowBufferFromDmaBuf(p,a,b,c,d,e,f,g)
|
||||
#define ID3DPresent_DestroyD3DWindowBuffer(p,a) (p)->lpVtbl->DestroyD3DWindowBuffer(p,a)
|
||||
#define ID3DPresent_WaitBufferReleased(p,a) (p)->lpVtbl->WaitBufferReleased(p,a)
|
||||
#define ID3DPresent_FrontBufferCopy(p,a) (p)->lpVtbl->FrontBufferCopy(p,a)
|
||||
#define ID3DPresent_PresentBuffer(p,a,b,c,d,e,f) (p)->lpVtbl->PresentBuffer(p,a,b,c,d,e,f)
|
||||
#define ID3DPresent_GetRasterStatus(p,a) (p)->lpVtbl->GetRasterStatus(p,a)
|
||||
#define ID3DPresent_GetDisplayMode(p,a,b) (p)->lpVtbl->GetDisplayMode(p,a,b)
|
||||
#define ID3DPresent_GetPresentStats(p,a) (p)->lpVtbl->GetPresentStats(p,a)
|
||||
#define ID3DPresent_GetCursorPos(p,a) (p)->lpVtbl->GetCursorPos(p,a)
|
||||
#define ID3DPresent_SetCursorPos(p,a) (p)->lpVtbl->SetCursorPos(p,a)
|
||||
#define ID3DPresent_SetCursor(p,a,b,c) (p)->lpVtbl->SetCursor(p,a,b,c)
|
||||
#define ID3DPresent_SetGammaRamp(p,a,b) (p)->lpVtbl->SetGammaRamp(p,a,b)
|
||||
#define ID3DPresent_GetWindowInfo(p,a,b,c,d) (p)->lpVtbl->GetWindowSize(p,a,b,c,d)
|
||||
|
||||
typedef struct ID3DPresentGroupVtbl
|
||||
{
|
||||
/* IUnknown */
|
||||
HRESULT (WINAPI *QueryInterface)(ID3DPresentGroup *This, REFIID riid, void **ppvObject);
|
||||
ULONG (WINAPI *AddRef)(ID3DPresentGroup *This);
|
||||
ULONG (WINAPI *Release)(ID3DPresentGroup *This);
|
||||
|
||||
/* ID3DPresentGroup */
|
||||
/* When creating a device, it's relevant for the driver to know how many
|
||||
* implicit swap chains to create. It has to create one per monitor in a
|
||||
* multi-monitor setup */
|
||||
UINT (WINAPI *GetMultiheadCount)(ID3DPresentGroup *This);
|
||||
/* returns only the implicit present interfaces */
|
||||
HRESULT (WINAPI *GetPresent)(ID3DPresentGroup *This, UINT Index, ID3DPresent **ppPresent);
|
||||
/* used to create additional presentation interfaces along the way */
|
||||
HRESULT (WINAPI *CreateAdditionalPresent)(ID3DPresentGroup *This, D3DPRESENT_PARAMETERS *pPresentationParameters, ID3DPresent **ppPresent);
|
||||
void (WINAPI *GetVersion) (ID3DPresentGroup *This, int *major, int *minor);
|
||||
} ID3DPresentGroupVtbl;
|
||||
|
||||
struct ID3DPresentGroup
|
||||
{
|
||||
ID3DPresentGroupVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
/* IUnknown macros */
|
||||
#define ID3DPresentGroup_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define ID3DPresentGroup_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define ID3DPresentGroup_Release(p) (p)->lpVtbl->Release(p)
|
||||
/* ID3DPresentGroup */
|
||||
#define ID3DPresentGroup_GetMultiheadCount(p) (p)->lpVtbl->GetMultiheadCount(p)
|
||||
#define ID3DPresentGroup_GetPresent(p,a,b) (p)->lpVtbl->GetPresent(p,a,b)
|
||||
#define ID3DPresentGroup_CreateAdditionalPresent(p,a,b) (p)->lpVtbl->CreateAdditionalPresent(p,a,b)
|
||||
#define ID3DPresentGroup_GetVersion(p,a,b) (p)->lpVtbl->GetVersion(p,a,b)
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _D3DADAPTER_PRESENT_H_ */
|
@@ -1,78 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_GNU_MAKE()
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro searches for a GNU version of make. If a match is found, the
|
||||
# makefile variable `ifGNUmake' is set to the empty string, otherwise it
|
||||
# is set to "#". This is useful for including a special features in a
|
||||
# Makefile, which cannot be handled by other versions of make. The
|
||||
# variable _cv_gnu_make_command is set to the command to invoke GNU make
|
||||
# if it exists, the empty string otherwise.
|
||||
#
|
||||
# Here is an example of its use:
|
||||
#
|
||||
# Makefile.in might contain:
|
||||
#
|
||||
# # A failsafe way of putting a dependency rule into a makefile
|
||||
# $(DEPEND):
|
||||
# $(CC) -MM $(srcdir)/*.c > $(DEPEND)
|
||||
#
|
||||
# @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
|
||||
# @ifGNUmake@ include $(DEPEND)
|
||||
# @ifGNUmake@ endif
|
||||
#
|
||||
# Then configure.in would normally contain:
|
||||
#
|
||||
# AX_CHECK_GNU_MAKE()
|
||||
# AC_OUTPUT(Makefile)
|
||||
#
|
||||
# Then perhaps to cause gnu make to override any other make, we could do
|
||||
# something like this (note that GNU make always looks for GNUmakefile
|
||||
# first):
|
||||
#
|
||||
# if ! test x$_cv_gnu_make_command = x ; then
|
||||
# mv Makefile GNUmakefile
|
||||
# echo .DEFAULT: > Makefile ;
|
||||
# echo \ $_cv_gnu_make_command \$@ >> Makefile;
|
||||
# fi
|
||||
#
|
||||
# Then, if any (well almost any) other make is called, and GNU make also
|
||||
# exists, then the other make wraps the GNU make.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 John Darrington <j.darrington@elvis.murdoch.edu.au>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 7
|
||||
|
||||
AC_DEFUN([AX_CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
|
||||
_cv_gnu_make_command='' ;
|
||||
dnl Search all the common names for GNU make
|
||||
for a in "$MAKE" make gmake gnumake ; do
|
||||
if test -z "$a" ; then continue ; fi ;
|
||||
if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
|
||||
_cv_gnu_make_command=$a ;
|
||||
break;
|
||||
fi
|
||||
done ;
|
||||
) ;
|
||||
dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
|
||||
if test "x$_cv_gnu_make_command" != "x" ; then
|
||||
ifGNUmake='' ;
|
||||
else
|
||||
ifGNUmake='#' ;
|
||||
AC_MSG_RESULT("Not found");
|
||||
fi
|
||||
AC_SUBST(ifGNUmake)
|
||||
] )
|
@@ -1,223 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_gcc_func_attribute.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_GCC_FUNC_ATTRIBUTE(ATTRIBUTE)
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro checks if the compiler supports one of GCC's function
|
||||
# attributes; many other compilers also provide function attributes with
|
||||
# the same syntax. Compiler warnings are used to detect supported
|
||||
# attributes as unsupported ones are ignored by default so quieting
|
||||
# warnings when using this macro will yield false positives.
|
||||
#
|
||||
# The ATTRIBUTE parameter holds the name of the attribute to be checked.
|
||||
#
|
||||
# If ATTRIBUTE is supported define HAVE_FUNC_ATTRIBUTE_<ATTRIBUTE>.
|
||||
#
|
||||
# The macro caches its result in the ax_cv_have_func_attribute_<attribute>
|
||||
# variable.
|
||||
#
|
||||
# The macro currently supports the following function attributes:
|
||||
#
|
||||
# alias
|
||||
# aligned
|
||||
# alloc_size
|
||||
# always_inline
|
||||
# artificial
|
||||
# cold
|
||||
# const
|
||||
# constructor
|
||||
# deprecated
|
||||
# destructor
|
||||
# dllexport
|
||||
# dllimport
|
||||
# error
|
||||
# externally_visible
|
||||
# flatten
|
||||
# format
|
||||
# format_arg
|
||||
# gnu_inline
|
||||
# hot
|
||||
# ifunc
|
||||
# leaf
|
||||
# malloc
|
||||
# noclone
|
||||
# noinline
|
||||
# nonnull
|
||||
# noreturn
|
||||
# nothrow
|
||||
# optimize
|
||||
# packed
|
||||
# pure
|
||||
# unused
|
||||
# used
|
||||
# visibility
|
||||
# warning
|
||||
# warn_unused_result
|
||||
# weak
|
||||
# weakref
|
||||
#
|
||||
# Unsuppored function attributes will be tested with a prototype returning
|
||||
# an int and not accepting any arguments and the result of the check might
|
||||
# be wrong or meaningless so use with care.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2013 Gabriele Svelto <gabriele.svelto@gmail.com>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 2
|
||||
|
||||
AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
|
||||
AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1])
|
||||
|
||||
AC_CACHE_CHECK([for __attribute__(($1))], [ac_var], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
||||
m4_case([$1],
|
||||
[alias], [
|
||||
int foo( void ) { return 0; }
|
||||
int bar( void ) __attribute__(($1("foo")));
|
||||
],
|
||||
[aligned], [
|
||||
int foo( void ) __attribute__(($1(32)));
|
||||
],
|
||||
[alloc_size], [
|
||||
void *foo(int a) __attribute__(($1(1)));
|
||||
],
|
||||
[always_inline], [
|
||||
inline __attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[artificial], [
|
||||
inline __attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[cold], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[const], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[constructor], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[deprecated], [
|
||||
int foo( void ) __attribute__(($1("")));
|
||||
],
|
||||
[destructor], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[dllexport], [
|
||||
__attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[dllimport], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[error], [
|
||||
int foo( void ) __attribute__(($1("")));
|
||||
],
|
||||
[externally_visible], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[flatten], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[format], [
|
||||
int foo(const char *p, ...) __attribute__(($1(printf, 1, 2)));
|
||||
],
|
||||
[format_arg], [
|
||||
char *foo(const char *p) __attribute__(($1(1)));
|
||||
],
|
||||
[gnu_inline], [
|
||||
inline __attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[hot], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[ifunc], [
|
||||
int my_foo( void ) { return 0; }
|
||||
static int (*resolve_foo(void))(void) { return my_foo; }
|
||||
int foo( void ) __attribute__(($1("resolve_foo")));
|
||||
],
|
||||
[leaf], [
|
||||
__attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[malloc], [
|
||||
void *foo( void ) __attribute__(($1));
|
||||
],
|
||||
[noclone], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[noinline], [
|
||||
__attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[nonnull], [
|
||||
int foo(char *p) __attribute__(($1(1)));
|
||||
],
|
||||
[noreturn], [
|
||||
void foo( void ) __attribute__(($1));
|
||||
],
|
||||
[nothrow], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[optimize], [
|
||||
__attribute__(($1(3))) int foo( void ) { return 0; }
|
||||
],
|
||||
[packed], [
|
||||
struct __attribute__(($1)) foo { int bar; };
|
||||
],
|
||||
[pure], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[unused], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[used], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[visibility], [
|
||||
int foo_def( void ) __attribute__(($1("default")));
|
||||
int foo_hid( void ) __attribute__(($1("hidden")));
|
||||
int foo_int( void ) __attribute__(($1("internal")));
|
||||
int foo_pro( void ) __attribute__(($1("protected")));
|
||||
],
|
||||
[warning], [
|
||||
int foo( void ) __attribute__(($1("")));
|
||||
],
|
||||
[warn_unused_result], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[weak], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[weakref], [
|
||||
static int foo( void ) { return 0; }
|
||||
static int bar( void ) __attribute__(($1("foo")));
|
||||
],
|
||||
[
|
||||
m4_warn([syntax], [Unsupported attribute $1, the test may fail])
|
||||
int foo( void ) __attribute__(($1));
|
||||
]
|
||||
)], [])
|
||||
],
|
||||
dnl GCC doesn't exit with an error if an unknown attribute is
|
||||
dnl provided but only outputs a warning, so accept the attribute
|
||||
dnl only if no warning were issued.
|
||||
[AS_IF([test -s conftest.err],
|
||||
[AS_VAR_SET([ac_var], [no])],
|
||||
[AS_VAR_SET([ac_var], [yes])])],
|
||||
[AS_VAR_SET([ac_var], [no])])
|
||||
])
|
||||
|
||||
AS_IF([test yes = AS_VAR_GET([ac_var])],
|
||||
[AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_FUNC_ATTRIBUTE_$1), 1,
|
||||
[Define to 1 if the system has the `$1' function attribute])], [])
|
||||
|
||||
AS_VAR_POPDEF([ac_var])
|
||||
])
|
@@ -301,10 +301,6 @@ def generate(env):
|
||||
cppdefines += ['HAVE_ALIAS']
|
||||
else:
|
||||
cppdefines += ['GLX_ALIAS_UNSUPPORTED']
|
||||
|
||||
if env['platform'] in ('linux', 'darwin'):
|
||||
cppdefines += ['HAVE_XLOCALE_H']
|
||||
|
||||
if env['platform'] == 'haiku':
|
||||
cppdefines += [
|
||||
'HAVE_PTHREAD',
|
||||
@@ -533,10 +529,6 @@ def generate(env):
|
||||
else:
|
||||
env['_LIBFLAGS'] = '-Wl,--start-group ' + env['_LIBFLAGS'] + ' -Wl,--end-group'
|
||||
if env['platform'] == 'windows':
|
||||
linkflags += [
|
||||
'-Wl,--nxcompat', # DEP
|
||||
'-Wl,--dynamicbase', # ASLR
|
||||
]
|
||||
# Avoid depending on gcc runtime DLLs
|
||||
linkflags += ['-static-libgcc']
|
||||
if 'w64' in env['CC'].split('-'):
|
||||
@@ -555,8 +547,6 @@ def generate(env):
|
||||
linkflags += [
|
||||
'/fixed:no',
|
||||
'/incremental:no',
|
||||
'/dynamicbase', # ASLR
|
||||
'/nxcompat', # DEP
|
||||
]
|
||||
env.Append(LINKFLAGS = linkflags)
|
||||
env.Append(SHLINKFLAGS = shlinkflags)
|
||||
@@ -587,30 +577,6 @@ def generate(env):
|
||||
env.Append(CCFLAGS = ['-fopenmp'])
|
||||
env.Append(LIBS = ['gomp'])
|
||||
|
||||
if gcc_compat:
|
||||
ccversion = env['CCVERSION']
|
||||
cppdefines += [
|
||||
'HAVE___BUILTIN_EXPECT',
|
||||
'HAVE___BUILTIN_FFS',
|
||||
'HAVE___BUILTIN_FFSLL',
|
||||
'HAVE_FUNC_ATTRIBUTE_FLATTEN',
|
||||
]
|
||||
if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('3'):
|
||||
cppdefines += [
|
||||
'HAVE_FUNC_ATTRIBUTE_FORMAT',
|
||||
'HAVE_FUNC_ATTRIBUTE_PACKED',
|
||||
]
|
||||
if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('3.4'):
|
||||
cppdefines += [
|
||||
'HAVE___BUILTIN_CTZ',
|
||||
'HAVE___BUILTIN_POPCOUNT',
|
||||
'HAVE___BUILTIN_POPCOUNTLL',
|
||||
'HAVE___BUILTIN_CLZ',
|
||||
'HAVE___BUILTIN_CLZLL',
|
||||
]
|
||||
if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.5'):
|
||||
cppdefines += ['HAVE___BUILTIN_UNREACHABLE']
|
||||
|
||||
# Load tools
|
||||
env.Tool('lex')
|
||||
env.Tool('yacc')
|
||||
@@ -621,7 +587,7 @@ def generate(env):
|
||||
env.Tool('custom')
|
||||
createInstallMethods(env)
|
||||
|
||||
env.PkgCheckModules('X11', ['x11', 'xext', 'xdamage', 'xfixes', 'glproto >= 1.4.13'])
|
||||
env.PkgCheckModules('X11', ['x11', 'xext', 'xdamage', 'xfixes'])
|
||||
env.PkgCheckModules('XCB', ['x11-xcb', 'xcb-glx >= 1.8.1', 'xcb-dri2 >= 1.8'])
|
||||
env.PkgCheckModules('XF86VIDMODE', ['xxf86vm'])
|
||||
env.PkgCheckModules('DRM', ['libdrm >= 2.4.38'])
|
||||
|
@@ -37,7 +37,7 @@ import SCons.Errors
|
||||
import SCons.Util
|
||||
|
||||
|
||||
required_llvm_version = '3.3'
|
||||
required_llvm_version = '3.1'
|
||||
|
||||
|
||||
def generate(env):
|
||||
@@ -98,7 +98,7 @@ def generate(env):
|
||||
'HAVE_STDINT_H',
|
||||
])
|
||||
env.Prepend(LIBPATH = [os.path.join(llvm_dir, 'lib')])
|
||||
if True:
|
||||
if llvm_version >= distutils.version.LooseVersion('3.2'):
|
||||
# 3.2
|
||||
env.Prepend(LIBS = [
|
||||
'LLVMBitWriter', 'LLVMX86Disassembler', 'LLVMX86AsmParser',
|
||||
@@ -110,6 +110,18 @@ def generate(env):
|
||||
'LLVMAnalysis', 'LLVMTarget', 'LLVMMC', 'LLVMCore',
|
||||
'LLVMSupport', 'LLVMRuntimeDyld', 'LLVMObject'
|
||||
])
|
||||
else:
|
||||
# 3.1
|
||||
env.Prepend(LIBS = [
|
||||
'LLVMBitWriter', 'LLVMX86Disassembler', 'LLVMX86AsmParser',
|
||||
'LLVMX86CodeGen', 'LLVMX86Desc', 'LLVMSelectionDAG',
|
||||
'LLVMAsmPrinter', 'LLVMMCParser', 'LLVMX86AsmPrinter',
|
||||
'LLVMX86Utils', 'LLVMX86Info', 'LLVMMCJIT', 'LLVMJIT',
|
||||
'LLVMExecutionEngine', 'LLVMCodeGen', 'LLVMScalarOpts',
|
||||
'LLVMInstCombine', 'LLVMTransformUtils', 'LLVMipa',
|
||||
'LLVMAnalysis', 'LLVMTarget', 'LLVMMC', 'LLVMCore',
|
||||
'LLVMSupport'
|
||||
])
|
||||
env.Append(LIBS = [
|
||||
'imagehlp',
|
||||
'psapi',
|
||||
|
@@ -543,10 +543,6 @@ dri2_setup_screen(_EGLDisplay *disp)
|
||||
}
|
||||
}
|
||||
|
||||
/* All platforms but DRM call this function to create the screen, query the
|
||||
* dri extensions, setup the vtables and populate the driver_configs.
|
||||
* DRM inherits all that information from its display - GBM.
|
||||
*/
|
||||
EGLBoolean
|
||||
dri2_create_screen(_EGLDisplay *disp)
|
||||
{
|
||||
@@ -670,7 +666,6 @@ static EGLBoolean
|
||||
dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
unsigned i;
|
||||
|
||||
_eglReleaseDisplayResources(drv, disp);
|
||||
_eglCleanupDisplay(disp);
|
||||
@@ -711,15 +706,6 @@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
break;
|
||||
}
|
||||
|
||||
/* The drm platform does not create the screen/driver_configs but reuses
|
||||
* the ones from the gbm device. As such the gbm itself is responsible
|
||||
* for the cleanup.
|
||||
*/
|
||||
if (disp->Platform != _EGL_PLATFORM_DRM) {
|
||||
for (i = 0; dri2_dpy->driver_configs[i]; i++)
|
||||
free((__DRIconfig *) dri2_dpy->driver_configs[i]);
|
||||
free(dri2_dpy->driver_configs);
|
||||
}
|
||||
free(dri2_dpy);
|
||||
disp->DriverData = NULL;
|
||||
|
||||
|
@@ -184,7 +184,6 @@ struct dri2_egl_display
|
||||
|
||||
#ifdef HAVE_X11_PLATFORM
|
||||
xcb_connection_t *conn;
|
||||
int screen;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
|
@@ -352,7 +352,7 @@ dri2_drm_get_buffers(__DRIdrawable * driDrawable,
|
||||
const unsigned int format = 32;
|
||||
int i;
|
||||
|
||||
attachments_with_format = calloc(count, 2 * sizeof(unsigned int));
|
||||
attachments_with_format = calloc(count * 2, sizeof(unsigned int));
|
||||
if (!attachments_with_format) {
|
||||
*out_count = 0;
|
||||
return NULL;
|
||||
@@ -418,14 +418,6 @@ dri2_drm_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
|
||||
for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++)
|
||||
if (dri2_surf->color_buffers[i].age > 0)
|
||||
dri2_surf->color_buffers[i].age++;
|
||||
|
||||
/* Make sure we have a back buffer in case we're swapping without
|
||||
* ever rendering. */
|
||||
if (get_back_bo(dri2_surf) < 0) {
|
||||
_eglError(EGL_BAD_ALLOC, "dri2_swap_buffers");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
dri2_surf->current = dri2_surf->back;
|
||||
dri2_surf->current->age = 1;
|
||||
dri2_surf->back = NULL;
|
||||
|
@@ -468,7 +468,7 @@ dri2_wl_get_buffers(__DRIdrawable * driDrawable,
|
||||
const unsigned int format = 32;
|
||||
int i;
|
||||
|
||||
attachments_with_format = calloc(count, 2 * sizeof(unsigned int));
|
||||
attachments_with_format = calloc(count * 2, sizeof(unsigned int));
|
||||
if (!attachments_with_format) {
|
||||
*out_count = 0;
|
||||
return NULL;
|
||||
|
@@ -178,17 +178,6 @@ swrastGetImage(__DRIdrawable * read,
|
||||
}
|
||||
|
||||
|
||||
static xcb_screen_t *
|
||||
get_xcb_screen(xcb_screen_iterator_t iter, int screen)
|
||||
{
|
||||
for (; iter.rem; --screen, xcb_screen_next(&iter))
|
||||
if (screen == 0)
|
||||
return iter.data;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
|
||||
*/
|
||||
@@ -205,7 +194,6 @@ dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
|
||||
xcb_screen_iterator_t s;
|
||||
xcb_generic_error_t *error;
|
||||
xcb_drawable_t drawable;
|
||||
xcb_screen_t *screen;
|
||||
|
||||
STATIC_ASSERT(sizeof(uintptr_t) == sizeof(native_surface));
|
||||
drawable = (uintptr_t) native_surface;
|
||||
@@ -223,16 +211,10 @@ dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
|
||||
|
||||
dri2_surf->region = XCB_NONE;
|
||||
if (type == EGL_PBUFFER_BIT) {
|
||||
s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
|
||||
screen = get_xcb_screen(s, dri2_dpy->screen);
|
||||
if (!screen) {
|
||||
_eglError(EGL_BAD_NATIVE_WINDOW, "dri2_create_surface");
|
||||
goto cleanup_surf;
|
||||
}
|
||||
|
||||
dri2_surf->drawable = xcb_generate_id(dri2_dpy->conn);
|
||||
s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
|
||||
xcb_create_pixmap(dri2_dpy->conn, conf->BufferSize,
|
||||
dri2_surf->drawable, screen->root,
|
||||
dri2_surf->drawable, s.data->root,
|
||||
dri2_surf->base.Width, dri2_surf->base.Height);
|
||||
} else {
|
||||
dri2_surf->drawable = drawable;
|
||||
@@ -510,7 +492,6 @@ dri2_x11_connect(struct dri2_egl_display *dri2_dpy)
|
||||
xcb_dri2_connect_cookie_t connect_cookie;
|
||||
xcb_generic_error_t *error;
|
||||
xcb_screen_iterator_t s;
|
||||
xcb_screen_t *screen;
|
||||
char *driver_name, *device_name;
|
||||
const xcb_query_extension_reply_t *extension;
|
||||
|
||||
@@ -534,13 +515,9 @@ dri2_x11_connect(struct dri2_egl_display *dri2_dpy)
|
||||
XCB_DRI2_MINOR_VERSION);
|
||||
|
||||
s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
|
||||
screen = get_xcb_screen(s, dri2_dpy->screen);
|
||||
if (!screen) {
|
||||
_eglError(EGL_BAD_NATIVE_WINDOW, "dri2_x11_connect");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
connect_cookie = xcb_dri2_connect_unchecked(dri2_dpy->conn, screen->root,
|
||||
XCB_DRI2_DRIVER_TYPE_DRI);
|
||||
connect_cookie = xcb_dri2_connect_unchecked (dri2_dpy->conn,
|
||||
s.data->root,
|
||||
XCB_DRI2_DRIVER_TYPE_DRI);
|
||||
|
||||
xfixes_query =
|
||||
xcb_xfixes_query_version_reply (dri2_dpy->conn,
|
||||
@@ -600,19 +577,11 @@ dri2_x11_authenticate(_EGLDisplay *disp, uint32_t id)
|
||||
xcb_dri2_authenticate_reply_t *authenticate;
|
||||
xcb_dri2_authenticate_cookie_t authenticate_cookie;
|
||||
xcb_screen_iterator_t s;
|
||||
xcb_screen_t *screen;
|
||||
int ret = 0;
|
||||
|
||||
s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
|
||||
|
||||
screen = get_xcb_screen(s, dri2_dpy->screen);
|
||||
if (!screen) {
|
||||
_eglError(EGL_BAD_NATIVE_WINDOW, "dri2_x11_authenticate");
|
||||
return -1;
|
||||
}
|
||||
|
||||
authenticate_cookie =
|
||||
xcb_dri2_authenticate_unchecked(dri2_dpy->conn, screen->root, id);
|
||||
xcb_dri2_authenticate_unchecked(dri2_dpy->conn, s.data->root, id);
|
||||
authenticate =
|
||||
xcb_dri2_authenticate_reply(dri2_dpy->conn, authenticate_cookie, NULL);
|
||||
|
||||
@@ -661,7 +630,7 @@ dri2_x11_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
|
||||
};
|
||||
|
||||
s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
|
||||
d = xcb_screen_allowed_depths_iterator(get_xcb_screen(s, dri2_dpy->screen));
|
||||
d = xcb_screen_allowed_depths_iterator(s.data);
|
||||
id = 1;
|
||||
|
||||
surface_type =
|
||||
@@ -1096,13 +1065,10 @@ dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
|
||||
disp->DriverData = (void *) dri2_dpy;
|
||||
if (disp->PlatformDisplay == NULL) {
|
||||
dri2_dpy->conn = xcb_connect(0, &dri2_dpy->screen);
|
||||
dri2_dpy->conn = xcb_connect(0, 0);
|
||||
dri2_dpy->own_device = true;
|
||||
} else {
|
||||
Display *dpy = disp->PlatformDisplay;
|
||||
|
||||
dri2_dpy->conn = XGetXCBConnection(dpy);
|
||||
dri2_dpy->screen = DefaultScreen(dpy);
|
||||
dri2_dpy->conn = XGetXCBConnection((Display *) disp->PlatformDisplay);
|
||||
}
|
||||
|
||||
if (xcb_connection_has_error(dri2_dpy->conn)) {
|
||||
@@ -1219,13 +1185,10 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
|
||||
disp->DriverData = (void *) dri2_dpy;
|
||||
if (disp->PlatformDisplay == NULL) {
|
||||
dri2_dpy->conn = xcb_connect(0, &dri2_dpy->screen);
|
||||
dri2_dpy->conn = xcb_connect(0, 0);
|
||||
dri2_dpy->own_device = true;
|
||||
} else {
|
||||
Display *dpy = disp->PlatformDisplay;
|
||||
|
||||
dri2_dpy->conn = XGetXCBConnection(dpy);
|
||||
dri2_dpy->screen = DefaultScreen(dpy);
|
||||
dri2_dpy->conn = XGetXCBConnection((Display *) disp->PlatformDisplay);
|
||||
}
|
||||
|
||||
if (xcb_connection_has_error(dri2_dpy->conn)) {
|
||||
|
@@ -28,7 +28,7 @@ AM_CFLAGS = \
|
||||
$(VISIBILITY_CFLAGS) \
|
||||
$(EGL_CFLAGS) \
|
||||
-D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) \
|
||||
-D_EGL_DRIVER_SEARCH_DIR=\"$(libdir)/egl\" \
|
||||
-D_EGL_DRIVER_SEARCH_DIR=\"$(EGL_DRIVER_INSTALL_DIR)\" \
|
||||
-D_EGL_OS_UNIX=1
|
||||
|
||||
lib_LTLIBRARIES = libEGL.la
|
||||
|
@@ -517,6 +517,19 @@ _eglAddUserDriver(void)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add egl_gallium to the module array.
|
||||
*/
|
||||
static void
|
||||
_eglAddGalliumDriver(void)
|
||||
{
|
||||
#ifndef _EGL_BUILT_IN_DRIVER_GALLIUM
|
||||
void *external = (void *) "egl_gallium";
|
||||
_eglPreloadForEach(_eglGetSearchPath(), _eglLoaderFile, external);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add built-in drivers to the module array.
|
||||
*/
|
||||
@@ -549,6 +562,7 @@ _eglAddDrivers(void)
|
||||
* Add other drivers only when EGL_DRIVER is not set. The order here
|
||||
* decides the priorities.
|
||||
*/
|
||||
_eglAddGalliumDriver();
|
||||
_eglAddBuiltInDrivers();
|
||||
}
|
||||
|
||||
|
@@ -16,7 +16,6 @@ GALLIUM_DRIVER_CFLAGS = \
|
||||
-I$(top_srcdir)/src/gallium/include \
|
||||
-I$(top_srcdir)/src/gallium/auxiliary \
|
||||
-I$(top_srcdir)/src/gallium/drivers \
|
||||
-I$(top_srcdir)/src/gallium/winsys \
|
||||
$(DEFINES) \
|
||||
$(VISIBILITY_CFLAGS)
|
||||
|
||||
@@ -27,7 +26,6 @@ GALLIUM_DRIVER_CXXFLAGS = \
|
||||
-I$(top_srcdir)/src/gallium/include \
|
||||
-I$(top_srcdir)/src/gallium/auxiliary \
|
||||
-I$(top_srcdir)/src/gallium/drivers \
|
||||
-I$(top_srcdir)/src/gallium/winsys \
|
||||
$(DEFINES) \
|
||||
$(VISIBILITY_CXXFLAGS)
|
||||
|
||||
@@ -58,8 +56,7 @@ GALLIUM_WINSYS_CFLAGS = \
|
||||
|
||||
|
||||
GALLIUM_PIPE_LOADER_WINSYS_LIBS = \
|
||||
$(top_builddir)/src/gallium/winsys/sw/null/libws_null.la \
|
||||
$(top_builddir)/src/gallium/winsys/sw/wrapper/libwsw.la
|
||||
$(top_builddir)/src/gallium/winsys/sw/null/libws_null.la
|
||||
|
||||
if HAVE_DRISW
|
||||
GALLIUM_PIPE_LOADER_WINSYS_LIBS += \
|
||||
|
@@ -68,11 +68,11 @@ SUBDIRS += winsys/radeon/drm
|
||||
endif
|
||||
|
||||
## swrast/softpipe
|
||||
if HAVE_GALLIUM_SOFTPIPE
|
||||
if NEED_GALLIUM_SOFTPIPE_DRIVER
|
||||
SUBDIRS += drivers/softpipe
|
||||
|
||||
## swrast/llvmpipe
|
||||
if HAVE_GALLIUM_LLVMPIPE
|
||||
if NEED_GALLIUM_LLVMPIPE_DRIVER
|
||||
SUBDIRS += drivers/llvmpipe
|
||||
endif
|
||||
endif
|
||||
@@ -105,23 +105,16 @@ if HAVE_EGL_PLATFORM_WAYLAND
|
||||
SUBDIRS += winsys/sw/wayland
|
||||
endif
|
||||
|
||||
if NEED_WINSYS_WRAPPER
|
||||
SUBDIRS += winsys/sw/wrapper
|
||||
|
||||
##
|
||||
## Don't forget to bundle the remaining (non autotools) winsys'
|
||||
##
|
||||
|
||||
EXTRA_DIST = \
|
||||
winsys/sw/android \
|
||||
winsys/sw/gdi \
|
||||
winsys/sw/hgl
|
||||
endif
|
||||
|
||||
|
||||
##
|
||||
## Gallium state trackers and their users (targets)
|
||||
##
|
||||
|
||||
if HAVE_LOADER_GALLIUM
|
||||
if NEED_GALLIUM_LOADER
|
||||
SUBDIRS += targets/pipe-loader
|
||||
endif
|
||||
|
||||
@@ -138,6 +131,14 @@ if HAVE_OPENVG
|
||||
SUBDIRS += state_trackers/vega
|
||||
endif
|
||||
|
||||
if HAVE_GALLIUM_EGL
|
||||
SUBDIRS += state_trackers/egl targets/egl-static
|
||||
endif
|
||||
|
||||
if HAVE_GALLIUM_GBM
|
||||
SUBDIRS += state_trackers/gbm targets/gbm
|
||||
endif
|
||||
|
||||
if HAVE_X11_DRIVER
|
||||
SUBDIRS += state_trackers/glx/xlib targets/libgl-xlib
|
||||
endif
|
||||
@@ -150,10 +151,6 @@ if HAVE_GALLIUM_OSMESA
|
||||
SUBDIRS += state_trackers/osmesa targets/osmesa
|
||||
endif
|
||||
|
||||
if HAVE_ST_VA
|
||||
SUBDIRS += state_trackers/va targets/va
|
||||
endif
|
||||
|
||||
if HAVE_ST_VDPAU
|
||||
SUBDIRS += state_trackers/vdpau targets/vdpau
|
||||
endif
|
||||
@@ -166,22 +163,6 @@ if HAVE_ST_XVMC
|
||||
SUBDIRS += state_trackers/xvmc targets/xvmc
|
||||
endif
|
||||
|
||||
if HAVE_ST_NINE
|
||||
SUBDIRS += state_trackers/nine targets/d3dadapter9
|
||||
endif
|
||||
|
||||
##
|
||||
## Don't forget to bundle the remaining (non autotools) state-trackers/targets
|
||||
##
|
||||
|
||||
EXTRA_DIST += \
|
||||
state_trackers/README \
|
||||
state_trackers/wgl targets/libgl-gdi \
|
||||
targets/graw-gdi targets/graw-null targets/graw-xlib \
|
||||
state_trackers/hgl targets/haiku-softpipe \
|
||||
tools
|
||||
|
||||
|
||||
##
|
||||
## Gallium tests
|
||||
##
|
||||
@@ -191,7 +172,3 @@ SUBDIRS += \
|
||||
tests/trivial \
|
||||
tests/unit
|
||||
endif
|
||||
|
||||
EXTRA_DIST += \
|
||||
tests/graw \
|
||||
tests/python
|
||||
|
@@ -85,7 +85,6 @@ if not env['embedded']:
|
||||
|
||||
if env['platform'] == 'haiku':
|
||||
SConscript([
|
||||
'state_trackers/hgl/SConscript',
|
||||
'targets/haiku-softpipe/SConscript',
|
||||
])
|
||||
|
||||
|
@@ -1,9 +1,5 @@
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
|
||||
if HAVE_LOADER_GALLIUM
|
||||
SUBDIRS := pipe-loader
|
||||
endif
|
||||
|
||||
include Makefile.sources
|
||||
include $(top_srcdir)/src/gallium/Automake.inc
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
SUBDIRS := pipe-loader
|
||||
|
||||
C_SOURCES := \
|
||||
cso_cache/cso_cache.c \
|
||||
cso_cache/cso_context.c \
|
||||
@@ -75,7 +77,6 @@ C_SOURCES := \
|
||||
tgsi/tgsi_exec.c \
|
||||
tgsi/tgsi_info.c \
|
||||
tgsi/tgsi_iterate.c \
|
||||
tgsi/tgsi_lowering.c \
|
||||
tgsi/tgsi_parse.c \
|
||||
tgsi/tgsi_sanity.c \
|
||||
tgsi/tgsi_scan.c \
|
||||
|
@@ -239,8 +239,18 @@ static void cso_init_vbuf(struct cso_context *cso)
|
||||
{
|
||||
struct u_vbuf_caps caps;
|
||||
|
||||
u_vbuf_get_caps(cso->pipe->screen, &caps);
|
||||
|
||||
/* Install u_vbuf if there is anything unsupported. */
|
||||
if (u_vbuf_get_caps(cso->pipe->screen, &caps)) {
|
||||
if (!caps.buffer_offset_unaligned ||
|
||||
!caps.buffer_stride_unaligned ||
|
||||
!caps.velem_src_offset_unaligned ||
|
||||
!caps.format_fixed32 ||
|
||||
!caps.format_float16 ||
|
||||
!caps.format_float64 ||
|
||||
!caps.format_norm32 ||
|
||||
!caps.format_scaled32 ||
|
||||
!caps.user_vertex_buffers) {
|
||||
cso->vbuf = u_vbuf_create(cso->pipe, &caps,
|
||||
cso->aux_vertex_buffer_index);
|
||||
}
|
||||
|
@@ -81,8 +81,7 @@ draw_get_option_use_llvm(void)
|
||||
* Create new draw module context with gallivm state for LLVM JIT.
|
||||
*/
|
||||
static struct draw_context *
|
||||
draw_create_context(struct pipe_context *pipe, void *context,
|
||||
boolean try_llvm)
|
||||
draw_create_context(struct pipe_context *pipe, boolean try_llvm)
|
||||
{
|
||||
struct draw_context *draw = CALLOC_STRUCT( draw_context );
|
||||
if (draw == NULL)
|
||||
@@ -93,7 +92,9 @@ draw_create_context(struct pipe_context *pipe, void *context,
|
||||
|
||||
#if HAVE_LLVM
|
||||
if (try_llvm && draw_get_option_use_llvm()) {
|
||||
draw->llvm = draw_llvm_create(draw, (LLVMContextRef)context);
|
||||
draw->llvm = draw_llvm_create(draw);
|
||||
if (!draw->llvm)
|
||||
goto err_destroy;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -121,26 +122,17 @@ err_out:
|
||||
struct draw_context *
|
||||
draw_create(struct pipe_context *pipe)
|
||||
{
|
||||
return draw_create_context(pipe, NULL, TRUE);
|
||||
return draw_create_context(pipe, TRUE);
|
||||
}
|
||||
|
||||
|
||||
#if HAVE_LLVM
|
||||
struct draw_context *
|
||||
draw_create_with_llvm_context(struct pipe_context *pipe,
|
||||
void *context)
|
||||
{
|
||||
return draw_create_context(pipe, context, TRUE);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Create a new draw context, without LLVM JIT.
|
||||
*/
|
||||
struct draw_context *
|
||||
draw_create_no_llvm(struct pipe_context *pipe)
|
||||
{
|
||||
return draw_create_context(pipe, NULL, FALSE);
|
||||
return draw_create_context(pipe, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -64,11 +64,6 @@ struct draw_so_target {
|
||||
|
||||
struct draw_context *draw_create( struct pipe_context *pipe );
|
||||
|
||||
#if HAVE_LLVM
|
||||
struct draw_context *draw_create_with_llvm_context(struct pipe_context *pipe,
|
||||
void *context);
|
||||
#endif
|
||||
|
||||
struct draw_context *draw_create_no_llvm(struct pipe_context *pipe);
|
||||
|
||||
void draw_destroy( struct draw_context *draw );
|
||||
|
@@ -64,7 +64,7 @@ draw_gs_get_input_index(int semantic, int index,
|
||||
* We execute geometry shaders in the SOA mode, so ideally we want to
|
||||
* flush when the number of currently fetched primitives is equal to
|
||||
* the number of elements in the SOA vector. This ensures that the
|
||||
* throughput is optimized for the given vector instruction set.
|
||||
* throughput is optimized for the given vector instrunction set.
|
||||
*/
|
||||
static INLINE boolean
|
||||
draw_gs_should_flush(struct draw_geometry_shader *shader)
|
||||
@@ -90,7 +90,7 @@ tgsi_fetch_gs_outputs(struct draw_geometry_shader *shader,
|
||||
|
||||
for (prim_idx = 0; prim_idx < num_primitives; ++prim_idx) {
|
||||
unsigned num_verts_per_prim = machine->Primitives[prim_idx];
|
||||
shader->primitive_lengths[prim_idx + shader->emitted_primitives] =
|
||||
shader->primitive_lengths[prim_idx + shader->emitted_primitives] =
|
||||
machine->Primitives[prim_idx];
|
||||
shader->emitted_vertices += num_verts_per_prim;
|
||||
for (j = 0; j < num_verts_per_prim; j++, current_idx++) {
|
||||
@@ -110,6 +110,7 @@ tgsi_fetch_gs_outputs(struct draw_geometry_shader *shader,
|
||||
output[slot][2],
|
||||
output[slot][3]);
|
||||
#endif
|
||||
debug_assert(!util_is_inf_or_nan(output[slot][0]));
|
||||
}
|
||||
output = (float (*)[4])((char *)output + shader->vertex_size);
|
||||
}
|
||||
@@ -750,6 +751,9 @@ draw_create_geometry_shader(struct draw_context *draw,
|
||||
tgsi_scan_shader(state->tokens, &gs->info);
|
||||
|
||||
/* setup the defaults */
|
||||
gs->input_primitive = PIPE_PRIM_TRIANGLES;
|
||||
gs->output_primitive = PIPE_PRIM_TRIANGLE_STRIP;
|
||||
gs->max_output_vertices = 32;
|
||||
gs->max_out_prims = 0;
|
||||
|
||||
#ifdef HAVE_LLVM
|
||||
@@ -765,15 +769,17 @@ draw_create_geometry_shader(struct draw_context *draw,
|
||||
gs->vector_length = 1;
|
||||
}
|
||||
|
||||
gs->input_primitive =
|
||||
gs->info.properties[TGSI_PROPERTY_GS_INPUT_PRIM];
|
||||
gs->output_primitive =
|
||||
gs->info.properties[TGSI_PROPERTY_GS_OUTPUT_PRIM];
|
||||
gs->max_output_vertices =
|
||||
gs->info.properties[TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES];
|
||||
if (!gs->max_output_vertices)
|
||||
gs->max_output_vertices = 32;
|
||||
|
||||
for (i = 0; i < gs->info.num_properties; ++i) {
|
||||
if (gs->info.properties[i].name ==
|
||||
TGSI_PROPERTY_GS_INPUT_PRIM)
|
||||
gs->input_primitive = gs->info.properties[i].data[0];
|
||||
else if (gs->info.properties[i].name ==
|
||||
TGSI_PROPERTY_GS_OUTPUT_PRIM)
|
||||
gs->output_primitive = gs->info.properties[i].data[0];
|
||||
else if (gs->info.properties[i].name ==
|
||||
TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES)
|
||||
gs->max_output_vertices = gs->info.properties[i].data[0];
|
||||
}
|
||||
/* Primitive boundary is bigger than max_output_vertices by one, because
|
||||
* the specification says that the geometry shader should exit if the
|
||||
* number of emitted vertices is bigger or equal to max_output_vertices and
|
||||
|
@@ -480,26 +480,17 @@ get_vertex_header_ptr_type(struct draw_llvm_variant *variant)
|
||||
* Create per-context LLVM info.
|
||||
*/
|
||||
struct draw_llvm *
|
||||
draw_llvm_create(struct draw_context *draw, LLVMContextRef context)
|
||||
draw_llvm_create(struct draw_context *draw)
|
||||
{
|
||||
struct draw_llvm *llvm;
|
||||
|
||||
if (!lp_build_init())
|
||||
return NULL;
|
||||
|
||||
llvm = CALLOC_STRUCT( draw_llvm );
|
||||
if (!llvm)
|
||||
return NULL;
|
||||
|
||||
llvm->draw = draw;
|
||||
lp_build_init();
|
||||
|
||||
llvm->context = context;
|
||||
if (!llvm->context) {
|
||||
llvm->context = LLVMContextCreate();
|
||||
llvm->context_owned = true;
|
||||
}
|
||||
if (!llvm->context)
|
||||
goto fail;
|
||||
llvm->draw = draw;
|
||||
|
||||
llvm->nr_variants = 0;
|
||||
make_empty_list(&llvm->vs_variants_list);
|
||||
@@ -508,10 +499,6 @@ draw_llvm_create(struct draw_context *draw, LLVMContextRef context)
|
||||
make_empty_list(&llvm->gs_variants_list);
|
||||
|
||||
return llvm;
|
||||
|
||||
fail:
|
||||
draw_llvm_destroy(llvm);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -521,10 +508,6 @@ fail:
|
||||
void
|
||||
draw_llvm_destroy(struct draw_llvm *llvm)
|
||||
{
|
||||
if (llvm->context_owned)
|
||||
LLVMContextDispose(llvm->context);
|
||||
llvm->context = NULL;
|
||||
|
||||
/* XXX free other draw_llvm data? */
|
||||
FREE(llvm);
|
||||
}
|
||||
@@ -556,7 +539,7 @@ draw_llvm_create_variant(struct draw_llvm *llvm,
|
||||
util_snprintf(module_name, sizeof(module_name), "draw_llvm_vs_variant%u",
|
||||
variant->shader->variants_cached);
|
||||
|
||||
variant->gallivm = gallivm_create(module_name, llvm->context);
|
||||
variant->gallivm = gallivm_create(module_name);
|
||||
|
||||
create_jit_types(variant);
|
||||
|
||||
@@ -605,12 +588,16 @@ generate_vs(struct draw_llvm_variant *variant,
|
||||
draw_jit_context_vs_constants(variant->gallivm, context_ptr);
|
||||
LLVMValueRef num_consts_ptr =
|
||||
draw_jit_context_num_vs_constants(variant->gallivm, context_ptr);
|
||||
struct lp_build_sampler_soa *sampler = 0;
|
||||
|
||||
if (gallivm_debug & (GALLIVM_DEBUG_TGSI | GALLIVM_DEBUG_IR)) {
|
||||
tgsi_dump(tokens, 0);
|
||||
draw_llvm_dump_variant_key(&variant->key);
|
||||
}
|
||||
|
||||
if (llvm->draw->num_sampler_views && llvm->draw->num_samplers)
|
||||
sampler = draw_sampler;
|
||||
|
||||
lp_build_tgsi_soa(variant->gallivm,
|
||||
tokens,
|
||||
vs_type,
|
||||
@@ -620,7 +607,7 @@ generate_vs(struct draw_llvm_variant *variant,
|
||||
system_values,
|
||||
inputs,
|
||||
outputs,
|
||||
draw_sampler,
|
||||
sampler,
|
||||
&llvm->draw->vs.vertex_shader->info,
|
||||
NULL);
|
||||
|
||||
@@ -658,8 +645,7 @@ generate_fetch(struct gallivm_state *gallivm,
|
||||
struct pipe_vertex_element *velem,
|
||||
LLVMValueRef vbuf,
|
||||
LLVMValueRef index,
|
||||
LLVMValueRef instance_id,
|
||||
LLVMValueRef start_instance)
|
||||
LLVMValueRef instance_id)
|
||||
{
|
||||
const struct util_format_description *format_desc =
|
||||
util_format_description(velem->src_format);
|
||||
@@ -689,11 +675,11 @@ generate_fetch(struct gallivm_state *gallivm,
|
||||
* index = start_instance + (instance_id / divisor)
|
||||
*/
|
||||
LLVMValueRef current_instance;
|
||||
index = lp_build_const_int32(gallivm, draw->start_instance);
|
||||
current_instance = LLVMBuildUDiv(builder, instance_id,
|
||||
lp_build_const_int32(gallivm, velem->instance_divisor),
|
||||
"instance_divisor");
|
||||
index = lp_build_uadd_overflow(gallivm, start_instance,
|
||||
current_instance, &ofbit);
|
||||
index = lp_build_uadd_overflow(gallivm, index, current_instance, &ofbit);
|
||||
}
|
||||
|
||||
stride = lp_build_umul_overflow(gallivm, vb_stride, index, &ofbit);
|
||||
@@ -1487,7 +1473,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
|
||||
struct gallivm_state *gallivm = variant->gallivm;
|
||||
LLVMContextRef context = gallivm->context;
|
||||
LLVMTypeRef int32_type = LLVMInt32TypeInContext(context);
|
||||
LLVMTypeRef arg_types[11];
|
||||
LLVMTypeRef arg_types[10];
|
||||
unsigned num_arg_types =
|
||||
elts ? Elements(arg_types) : Elements(arg_types) - 1;
|
||||
LLVMTypeRef func_type;
|
||||
@@ -1498,7 +1484,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
|
||||
struct lp_type vs_type;
|
||||
LLVMValueRef end, start;
|
||||
LLVMValueRef count, fetch_elts, fetch_elt_max, fetch_count;
|
||||
LLVMValueRef vertex_id_offset, start_instance;
|
||||
LLVMValueRef vertex_id_offset;
|
||||
LLVMValueRef stride, step, io_itr;
|
||||
LLVMValueRef io_ptr, vbuffers_ptr, vb_ptr;
|
||||
LLVMValueRef zero = lp_build_const_int32(gallivm, 0);
|
||||
@@ -1547,7 +1533,6 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
|
||||
arg_types[i++] = get_vb_ptr_type(variant); /* pipe_vertex_buffer's */
|
||||
arg_types[i++] = int32_type; /* instance_id */
|
||||
arg_types[i++] = int32_type; /* vertex_id_offset */
|
||||
arg_types[i++] = int32_type; /* start_instance */
|
||||
|
||||
func_type = LLVMFunctionType(int32_type, arg_types, num_arg_types, 0);
|
||||
|
||||
@@ -1571,7 +1556,6 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
|
||||
vb_ptr = LLVMGetParam(variant_func, 6 + (elts ? 1 : 0));
|
||||
system_values.instance_id = LLVMGetParam(variant_func, 7 + (elts ? 1 : 0));
|
||||
vertex_id_offset = LLVMGetParam(variant_func, 8 + (elts ? 1 : 0));
|
||||
start_instance = LLVMGetParam(variant_func, 9 + (elts ? 1 : 0));
|
||||
|
||||
lp_build_name(context_ptr, "context");
|
||||
lp_build_name(io_ptr, "io");
|
||||
@@ -1580,7 +1564,6 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
|
||||
lp_build_name(vb_ptr, "vb");
|
||||
lp_build_name(system_values.instance_id, "instance_id");
|
||||
lp_build_name(vertex_id_offset, "vertex_id_offset");
|
||||
lp_build_name(start_instance, "start_instance");
|
||||
|
||||
if (elts) {
|
||||
fetch_elts = LLVMGetParam(variant_func, 3);
|
||||
@@ -1729,7 +1712,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
|
||||
LLVMValueRef vb = LLVMBuildGEP(builder, vb_ptr, &vb_index, 1, "");
|
||||
generate_fetch(gallivm, draw, vbuffers_ptr,
|
||||
&aos_attribs[j][i], velem, vb, true_index,
|
||||
system_values.instance_id, start_instance);
|
||||
system_values.instance_id);
|
||||
}
|
||||
}
|
||||
convert_to_soa(gallivm, aos_attribs, inputs,
|
||||
@@ -2211,7 +2194,7 @@ draw_gs_llvm_create_variant(struct draw_llvm *llvm,
|
||||
util_snprintf(module_name, sizeof(module_name), "draw_llvm_gs_variant%u",
|
||||
variant->shader->variants_cached);
|
||||
|
||||
variant->gallivm = gallivm_create(module_name, llvm->context);
|
||||
variant->gallivm = gallivm_create(module_name);
|
||||
|
||||
create_gs_jit_types(variant);
|
||||
|
||||
|
@@ -274,8 +274,7 @@ typedef int
|
||||
unsigned stride,
|
||||
struct pipe_vertex_buffer *vertex_buffers,
|
||||
unsigned instance_id,
|
||||
unsigned vertex_id_offset,
|
||||
unsigned start_instance);
|
||||
unsigned vertex_id_offset);
|
||||
|
||||
|
||||
typedef int
|
||||
@@ -288,8 +287,7 @@ typedef int
|
||||
unsigned stride,
|
||||
struct pipe_vertex_buffer *vertex_buffers,
|
||||
unsigned instance_id,
|
||||
unsigned vertex_id_offset,
|
||||
unsigned start_instance);
|
||||
unsigned vertex_id_offset);
|
||||
|
||||
|
||||
typedef int
|
||||
@@ -461,9 +459,6 @@ struct llvm_geometry_shader {
|
||||
struct draw_llvm {
|
||||
struct draw_context *draw;
|
||||
|
||||
LLVMContextRef context;
|
||||
boolean context_owned;
|
||||
|
||||
struct draw_jit_context jit_context;
|
||||
struct draw_gs_jit_context gs_jit_context;
|
||||
|
||||
@@ -491,7 +486,7 @@ llvm_geometry_shader(struct draw_geometry_shader *gs)
|
||||
|
||||
|
||||
struct draw_llvm *
|
||||
draw_llvm_create(struct draw_context *draw, LLVMContextRef llvm_context);
|
||||
draw_llvm_create(struct draw_context *draw);
|
||||
|
||||
void
|
||||
draw_llvm_destroy(struct draw_llvm *llvm);
|
||||
|
@@ -140,6 +140,7 @@ struct aa_transform_context {
|
||||
int freeSampler; /** an available sampler for the pstipple */
|
||||
int maxInput, maxGeneric; /**< max input index found */
|
||||
int colorTemp, texTemp; /**< temp registers */
|
||||
boolean firstInstruction;
|
||||
};
|
||||
|
||||
|
||||
@@ -195,106 +196,149 @@ free_bit(uint bitfield)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TGSI transform prolog callback.
|
||||
*/
|
||||
static void
|
||||
aa_transform_prolog(struct tgsi_transform_context *ctx)
|
||||
{
|
||||
struct aa_transform_context *aactx = (struct aa_transform_context *) ctx;
|
||||
uint i;
|
||||
|
||||
/* find free sampler */
|
||||
aactx->freeSampler = free_bit(aactx->samplersUsed);
|
||||
if (aactx->freeSampler >= PIPE_MAX_SAMPLERS)
|
||||
aactx->freeSampler = PIPE_MAX_SAMPLERS - 1;
|
||||
|
||||
/* find two free temp regs */
|
||||
for (i = 0; i < 32; i++) {
|
||||
if ((aactx->tempsUsed & (1 << i)) == 0) {
|
||||
/* found a free temp */
|
||||
if (aactx->colorTemp < 0)
|
||||
aactx->colorTemp = i;
|
||||
else if (aactx->texTemp < 0)
|
||||
aactx->texTemp = i;
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
assert(aactx->colorTemp >= 0);
|
||||
assert(aactx->texTemp >= 0);
|
||||
|
||||
/* declare new generic input/texcoord */
|
||||
tgsi_transform_input_decl(ctx, aactx->maxInput + 1,
|
||||
TGSI_SEMANTIC_GENERIC, aactx->maxGeneric + 1,
|
||||
TGSI_INTERPOLATE_LINEAR);
|
||||
|
||||
/* declare new sampler */
|
||||
tgsi_transform_sampler_decl(ctx, aactx->freeSampler);
|
||||
|
||||
/* declare new temp regs */
|
||||
tgsi_transform_temp_decl(ctx, aactx->texTemp);
|
||||
tgsi_transform_temp_decl(ctx, aactx->colorTemp);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TGSI transform epilog callback.
|
||||
*/
|
||||
static void
|
||||
aa_transform_epilog(struct tgsi_transform_context *ctx)
|
||||
{
|
||||
struct aa_transform_context *aactx = (struct aa_transform_context *) ctx;
|
||||
|
||||
if (aactx->colorOutput != -1) {
|
||||
/* insert texture sampling code for antialiasing. */
|
||||
|
||||
/* TEX texTemp, input_coord, sampler */
|
||||
tgsi_transform_tex_2d_inst(ctx,
|
||||
TGSI_FILE_TEMPORARY, aactx->texTemp,
|
||||
TGSI_FILE_INPUT, aactx->maxInput + 1,
|
||||
aactx->freeSampler);
|
||||
|
||||
/* MOV rgb */
|
||||
tgsi_transform_op1_inst(ctx, TGSI_OPCODE_MOV,
|
||||
TGSI_FILE_OUTPUT, aactx->colorOutput,
|
||||
TGSI_WRITEMASK_XYZ,
|
||||
TGSI_FILE_TEMPORARY, aactx->colorTemp);
|
||||
|
||||
/* MUL alpha */
|
||||
tgsi_transform_op2_inst(ctx, TGSI_OPCODE_MUL,
|
||||
TGSI_FILE_OUTPUT, aactx->colorOutput,
|
||||
TGSI_WRITEMASK_W,
|
||||
TGSI_FILE_TEMPORARY, aactx->colorTemp,
|
||||
TGSI_FILE_TEMPORARY, aactx->texTemp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TGSI instruction transform callback.
|
||||
* Replace writes to result.color w/ a temp reg.
|
||||
* Upon END instruction, insert texture sampling code for antialiasing.
|
||||
*/
|
||||
static void
|
||||
aa_transform_inst(struct tgsi_transform_context *ctx,
|
||||
struct tgsi_full_instruction *inst)
|
||||
{
|
||||
struct aa_transform_context *aactx = (struct aa_transform_context *) ctx;
|
||||
uint i;
|
||||
|
||||
/*
|
||||
* Look for writes to result.color and replace with colorTemp reg.
|
||||
*/
|
||||
for (i = 0; i < inst->Instruction.NumDstRegs; i++) {
|
||||
struct tgsi_full_dst_register *dst = &inst->Dst[i];
|
||||
if (dst->Register.File == TGSI_FILE_OUTPUT &&
|
||||
dst->Register.Index == aactx->colorOutput) {
|
||||
dst->Register.File = TGSI_FILE_TEMPORARY;
|
||||
dst->Register.Index = aactx->colorTemp;
|
||||
if (aactx->firstInstruction) {
|
||||
/* emit our new declarations before the first instruction */
|
||||
|
||||
struct tgsi_full_declaration decl;
|
||||
uint i;
|
||||
|
||||
/* find free sampler */
|
||||
aactx->freeSampler = free_bit(aactx->samplersUsed);
|
||||
if (aactx->freeSampler >= PIPE_MAX_SAMPLERS)
|
||||
aactx->freeSampler = PIPE_MAX_SAMPLERS - 1;
|
||||
|
||||
/* find two free temp regs */
|
||||
for (i = 0; i < 32; i++) {
|
||||
if ((aactx->tempsUsed & (1 << i)) == 0) {
|
||||
/* found a free temp */
|
||||
if (aactx->colorTemp < 0)
|
||||
aactx->colorTemp = i;
|
||||
else if (aactx->texTemp < 0)
|
||||
aactx->texTemp = i;
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
assert(aactx->colorTemp >= 0);
|
||||
assert(aactx->texTemp >= 0);
|
||||
|
||||
/* declare new generic input/texcoord */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_INPUT;
|
||||
/* XXX this could be linear... */
|
||||
decl.Declaration.Interpolate = 1;
|
||||
decl.Declaration.Semantic = 1;
|
||||
decl.Semantic.Name = TGSI_SEMANTIC_GENERIC;
|
||||
decl.Semantic.Index = aactx->maxGeneric + 1;
|
||||
decl.Range.First =
|
||||
decl.Range.Last = aactx->maxInput + 1;
|
||||
decl.Interp.Interpolate = TGSI_INTERPOLATE_PERSPECTIVE;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
/* declare new sampler */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_SAMPLER;
|
||||
decl.Range.First =
|
||||
decl.Range.Last = aactx->freeSampler;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
/* declare new temp regs */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_TEMPORARY;
|
||||
decl.Range.First =
|
||||
decl.Range.Last = aactx->texTemp;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_TEMPORARY;
|
||||
decl.Range.First =
|
||||
decl.Range.Last = aactx->colorTemp;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
aactx->firstInstruction = FALSE;
|
||||
}
|
||||
|
||||
ctx->emit_instruction(ctx, inst);
|
||||
if (inst->Instruction.Opcode == TGSI_OPCODE_END &&
|
||||
aactx->colorOutput != -1) {
|
||||
struct tgsi_full_instruction newInst;
|
||||
|
||||
/* TEX */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_TEX;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Dst[0].Register.Index = aactx->texTemp;
|
||||
newInst.Instruction.NumSrcRegs = 2;
|
||||
newInst.Instruction.Texture = TRUE;
|
||||
newInst.Texture.Texture = TGSI_TEXTURE_2D;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_INPUT;
|
||||
newInst.Src[0].Register.Index = aactx->maxInput + 1;
|
||||
newInst.Src[1].Register.File = TGSI_FILE_SAMPLER;
|
||||
newInst.Src[1].Register.Index = aactx->freeSampler;
|
||||
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
/* MOV rgb */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_MOV;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_OUTPUT;
|
||||
newInst.Dst[0].Register.Index = aactx->colorOutput;
|
||||
newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_XYZ;
|
||||
newInst.Instruction.NumSrcRegs = 1;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[0].Register.Index = aactx->colorTemp;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
/* MUL alpha */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_MUL;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_OUTPUT;
|
||||
newInst.Dst[0].Register.Index = aactx->colorOutput;
|
||||
newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_W;
|
||||
newInst.Instruction.NumSrcRegs = 2;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[0].Register.Index = aactx->colorTemp;
|
||||
newInst.Src[1].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[1].Register.Index = aactx->texTemp;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
/* END */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_END;
|
||||
newInst.Instruction.NumDstRegs = 0;
|
||||
newInst.Instruction.NumSrcRegs = 0;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
}
|
||||
else {
|
||||
/* Not an END instruction.
|
||||
* Look for writes to result.color and replace with colorTemp reg.
|
||||
*/
|
||||
uint i;
|
||||
|
||||
for (i = 0; i < inst->Instruction.NumDstRegs; i++) {
|
||||
struct tgsi_full_dst_register *dst = &inst->Dst[i];
|
||||
if (dst->Register.File == TGSI_FILE_OUTPUT &&
|
||||
dst->Register.Index == aactx->colorOutput) {
|
||||
dst->Register.File = TGSI_FILE_TEMPORARY;
|
||||
dst->Register.Index = aactx->colorTemp;
|
||||
}
|
||||
}
|
||||
|
||||
ctx->emit_instruction(ctx, inst);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -322,8 +366,7 @@ generate_aaline_fs(struct aaline_stage *aaline)
|
||||
transform.maxGeneric = -1;
|
||||
transform.colorTemp = -1;
|
||||
transform.texTemp = -1;
|
||||
transform.base.prolog = aa_transform_prolog;
|
||||
transform.base.epilog = aa_transform_epilog;
|
||||
transform.firstInstruction = TRUE;
|
||||
transform.base.transform_instruction = aa_transform_inst;
|
||||
transform.base.transform_declaration = aa_transform_decl;
|
||||
|
||||
|
@@ -121,6 +121,7 @@ struct aa_transform_context {
|
||||
int colorOutput; /**< which output is the primary color */
|
||||
int maxInput, maxGeneric; /**< max input index found */
|
||||
int tmp0, colorTemp; /**< temp registers */
|
||||
boolean firstInstruction;
|
||||
};
|
||||
|
||||
|
||||
@@ -160,188 +161,325 @@ aa_transform_decl(struct tgsi_transform_context *ctx,
|
||||
|
||||
|
||||
/**
|
||||
* TGSI transform callback.
|
||||
* Insert new declarations and instructions before first instruction.
|
||||
*/
|
||||
static void
|
||||
aa_transform_prolog(struct tgsi_transform_context *ctx)
|
||||
{
|
||||
/* emit our new declarations before the first instruction */
|
||||
struct aa_transform_context *aactx = (struct aa_transform_context *) ctx;
|
||||
struct tgsi_full_instruction newInst;
|
||||
const int texInput = aactx->maxInput + 1;
|
||||
int tmp0;
|
||||
uint i;
|
||||
|
||||
/* find two free temp regs */
|
||||
for (i = 0; i < 32; i++) {
|
||||
if ((aactx->tempsUsed & (1 << i)) == 0) {
|
||||
/* found a free temp */
|
||||
if (aactx->tmp0 < 0)
|
||||
aactx->tmp0 = i;
|
||||
else if (aactx->colorTemp < 0)
|
||||
aactx->colorTemp = i;
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
assert(aactx->colorTemp != aactx->tmp0);
|
||||
|
||||
tmp0 = aactx->tmp0;
|
||||
|
||||
/* declare new generic input/texcoord */
|
||||
tgsi_transform_input_decl(ctx, texInput,
|
||||
TGSI_SEMANTIC_GENERIC, aactx->maxGeneric + 1,
|
||||
TGSI_INTERPOLATE_LINEAR);
|
||||
|
||||
/* declare new temp regs */
|
||||
tgsi_transform_temp_decl(ctx, tmp0);
|
||||
tgsi_transform_temp_decl(ctx, aactx->colorTemp);
|
||||
|
||||
/*
|
||||
* Emit code to compute fragment coverage, kill if outside point radius
|
||||
*
|
||||
* Temp reg0 usage:
|
||||
* t0.x = distance of fragment from center point
|
||||
* t0.y = boolean, is t0.x > 1.0, also misc temp usage
|
||||
* t0.z = temporary for computing 1/(1-k) value
|
||||
* t0.w = final coverage value
|
||||
*/
|
||||
|
||||
/* MUL t0.xy, tex, tex; # compute x^2, y^2 */
|
||||
tgsi_transform_op2_inst(ctx, TGSI_OPCODE_MUL,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_XY,
|
||||
TGSI_FILE_INPUT, texInput,
|
||||
TGSI_FILE_INPUT, texInput);
|
||||
|
||||
/* ADD t0.x, t0.x, t0.y; # x^2 + y^2 */
|
||||
tgsi_transform_op2_swz_inst(ctx, TGSI_OPCODE_ADD,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_X,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_SWIZZLE_X,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_SWIZZLE_Y);
|
||||
|
||||
#if NORMALIZE /* OPTIONAL normalization of length */
|
||||
/* RSQ t0.x, t0.x; */
|
||||
tgsi_transform_op1_inst(ctx, TGSI_OPCODE_RSQ,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_X,
|
||||
TGSI_FILE_TEMPORARY, tmp0);
|
||||
|
||||
/* RCP t0.x, t0.x; */
|
||||
tgsi_transform_op1_inst(ctx, TGSI_OPCODE_RCP,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_X,
|
||||
TGSI_FILE_TEMPORARY, tmp0);
|
||||
#endif
|
||||
|
||||
/* SGT t0.y, t0.xxxx, tex.wwww; # bool b = d > 1 (NOTE tex.w == 1) */
|
||||
tgsi_transform_op2_swz_inst(ctx, TGSI_OPCODE_SGT,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_Y,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_SWIZZLE_X,
|
||||
TGSI_FILE_INPUT, texInput, TGSI_SWIZZLE_W);
|
||||
|
||||
/* KILL_IF -tmp0.yyyy; # if -tmp0.y < 0, KILL */
|
||||
tgsi_transform_kill_inst(ctx, TGSI_FILE_TEMPORARY, tmp0, TGSI_SWIZZLE_Y);
|
||||
|
||||
/* compute coverage factor = (1-d)/(1-k) */
|
||||
|
||||
/* SUB t0.z, tex.w, tex.z; # m = 1 - k */
|
||||
tgsi_transform_op2_swz_inst(ctx, TGSI_OPCODE_SUB,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_Z,
|
||||
TGSI_FILE_INPUT, texInput, TGSI_SWIZZLE_W,
|
||||
TGSI_FILE_INPUT, texInput, TGSI_SWIZZLE_Z);
|
||||
|
||||
/* RCP t0.z, t0.z; # t0.z = 1 / m */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_RCP;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Dst[0].Register.Index = tmp0;
|
||||
newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_Z;
|
||||
newInst.Instruction.NumSrcRegs = 1;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[0].Register.Index = tmp0;
|
||||
newInst.Src[0].Register.SwizzleX = TGSI_SWIZZLE_Z;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
/* SUB t0.y, 1, t0.x; # d = 1 - d */
|
||||
tgsi_transform_op2_swz_inst(ctx, TGSI_OPCODE_SUB,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_Y,
|
||||
TGSI_FILE_INPUT, texInput, TGSI_SWIZZLE_W,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_SWIZZLE_X);
|
||||
|
||||
/* MUL t0.w, t0.y, t0.z; # coverage = d * m */
|
||||
tgsi_transform_op2_swz_inst(ctx, TGSI_OPCODE_MUL,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_W,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_SWIZZLE_Y,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_SWIZZLE_Z);
|
||||
|
||||
/* SLE t0.y, t0.x, tex.z; # bool b = distance <= k */
|
||||
tgsi_transform_op2_swz_inst(ctx, TGSI_OPCODE_SLE,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_Y,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_SWIZZLE_X,
|
||||
TGSI_FILE_INPUT, texInput, TGSI_SWIZZLE_Z);
|
||||
|
||||
/* CMP t0.w, -t0.y, tex.w, t0.w;
|
||||
* # if -t0.y < 0 then
|
||||
* t0.w = 1
|
||||
* else
|
||||
* t0.w = t0.w
|
||||
*/
|
||||
tgsi_transform_op3_swz_inst(ctx, TGSI_OPCODE_CMP,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_W,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_SWIZZLE_Y, 1,
|
||||
TGSI_FILE_INPUT, texInput, TGSI_SWIZZLE_W,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_SWIZZLE_W);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TGSI transform callback.
|
||||
* Insert new instructions before the END instruction.
|
||||
*/
|
||||
static void
|
||||
aa_transform_epilog(struct tgsi_transform_context *ctx)
|
||||
{
|
||||
struct aa_transform_context *aactx = (struct aa_transform_context *) ctx;
|
||||
|
||||
/* add alpha modulation code at tail of program */
|
||||
|
||||
/* MOV result.color.xyz, colorTemp; */
|
||||
tgsi_transform_op1_inst(ctx, TGSI_OPCODE_MOV,
|
||||
TGSI_FILE_OUTPUT, aactx->colorOutput,
|
||||
TGSI_WRITEMASK_XYZ,
|
||||
TGSI_FILE_TEMPORARY, aactx->colorTemp);
|
||||
|
||||
/* MUL result.color.w, colorTemp, tmp0.w; */
|
||||
tgsi_transform_op2_inst(ctx, TGSI_OPCODE_MUL,
|
||||
TGSI_FILE_OUTPUT, aactx->colorOutput,
|
||||
TGSI_WRITEMASK_W,
|
||||
TGSI_FILE_TEMPORARY, aactx->colorTemp,
|
||||
TGSI_FILE_TEMPORARY, aactx->tmp0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TGSI transform callback.
|
||||
* Called per instruction.
|
||||
* TGSI instruction transform callback.
|
||||
* Replace writes to result.color w/ a temp reg.
|
||||
* Upon END instruction, insert texture sampling code for antialiasing.
|
||||
*/
|
||||
static void
|
||||
aa_transform_inst(struct tgsi_transform_context *ctx,
|
||||
struct tgsi_full_instruction *inst)
|
||||
{
|
||||
struct aa_transform_context *aactx = (struct aa_transform_context *) ctx;
|
||||
unsigned i;
|
||||
struct tgsi_full_instruction newInst;
|
||||
|
||||
/* Not an END instruction.
|
||||
* Look for writes to result.color and replace with colorTemp reg.
|
||||
*/
|
||||
for (i = 0; i < inst->Instruction.NumDstRegs; i++) {
|
||||
struct tgsi_full_dst_register *dst = &inst->Dst[i];
|
||||
if (dst->Register.File == TGSI_FILE_OUTPUT &&
|
||||
dst->Register.Index == aactx->colorOutput) {
|
||||
dst->Register.File = TGSI_FILE_TEMPORARY;
|
||||
dst->Register.Index = aactx->colorTemp;
|
||||
if (aactx->firstInstruction) {
|
||||
/* emit our new declarations before the first instruction */
|
||||
|
||||
struct tgsi_full_declaration decl;
|
||||
const int texInput = aactx->maxInput + 1;
|
||||
int tmp0;
|
||||
uint i;
|
||||
|
||||
/* find two free temp regs */
|
||||
for (i = 0; i < 32; i++) {
|
||||
if ((aactx->tempsUsed & (1 << i)) == 0) {
|
||||
/* found a free temp */
|
||||
if (aactx->tmp0 < 0)
|
||||
aactx->tmp0 = i;
|
||||
else if (aactx->colorTemp < 0)
|
||||
aactx->colorTemp = i;
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
assert(aactx->colorTemp != aactx->tmp0);
|
||||
|
||||
tmp0 = aactx->tmp0;
|
||||
|
||||
/* declare new generic input/texcoord */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_INPUT;
|
||||
/* XXX this could be linear... */
|
||||
decl.Declaration.Interpolate = 1;
|
||||
decl.Declaration.Semantic = 1;
|
||||
decl.Semantic.Name = TGSI_SEMANTIC_GENERIC;
|
||||
decl.Semantic.Index = aactx->maxGeneric + 1;
|
||||
decl.Range.First =
|
||||
decl.Range.Last = texInput;
|
||||
decl.Interp.Interpolate = TGSI_INTERPOLATE_PERSPECTIVE;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
/* declare new temp regs */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_TEMPORARY;
|
||||
decl.Range.First =
|
||||
decl.Range.Last = tmp0;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_TEMPORARY;
|
||||
decl.Range.First =
|
||||
decl.Range.Last = aactx->colorTemp;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
aactx->firstInstruction = FALSE;
|
||||
|
||||
|
||||
/*
|
||||
* Emit code to compute fragment coverage, kill if outside point radius
|
||||
*
|
||||
* Temp reg0 usage:
|
||||
* t0.x = distance of fragment from center point
|
||||
* t0.y = boolean, is t0.x > 1.0, also misc temp usage
|
||||
* t0.z = temporary for computing 1/(1-k) value
|
||||
* t0.w = final coverage value
|
||||
*/
|
||||
|
||||
/* MUL t0.xy, tex, tex; # compute x^2, y^2 */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_MUL;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Dst[0].Register.Index = tmp0;
|
||||
newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_XY;
|
||||
newInst.Instruction.NumSrcRegs = 2;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_INPUT;
|
||||
newInst.Src[0].Register.Index = texInput;
|
||||
newInst.Src[1].Register.File = TGSI_FILE_INPUT;
|
||||
newInst.Src[1].Register.Index = texInput;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
/* ADD t0.x, t0.x, t0.y; # x^2 + y^2 */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_ADD;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Dst[0].Register.Index = tmp0;
|
||||
newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_X;
|
||||
newInst.Instruction.NumSrcRegs = 2;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[0].Register.Index = tmp0;
|
||||
newInst.Src[0].Register.SwizzleX = TGSI_SWIZZLE_X;
|
||||
newInst.Src[1].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[1].Register.Index = tmp0;
|
||||
newInst.Src[1].Register.SwizzleX = TGSI_SWIZZLE_Y;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
#if NORMALIZE /* OPTIONAL normalization of length */
|
||||
/* RSQ t0.x, t0.x; */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_RSQ;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Dst[0].Register.Index = tmp0;
|
||||
newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_X;
|
||||
newInst.Instruction.NumSrcRegs = 1;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[0].Register.Index = tmp0;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
/* RCP t0.x, t0.x; */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_RCP;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Dst[0].Register.Index = tmp0;
|
||||
newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_X;
|
||||
newInst.Instruction.NumSrcRegs = 1;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[0].Register.Index = tmp0;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
#endif
|
||||
|
||||
/* SGT t0.y, t0.xxxx, tex.wwww; # bool b = d > 1 (NOTE tex.w == 1) */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_SGT;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Dst[0].Register.Index = tmp0;
|
||||
newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_Y;
|
||||
newInst.Instruction.NumSrcRegs = 2;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[0].Register.Index = tmp0;
|
||||
newInst.Src[0].Register.SwizzleY = TGSI_SWIZZLE_X;
|
||||
newInst.Src[1].Register.File = TGSI_FILE_INPUT;
|
||||
newInst.Src[1].Register.Index = texInput;
|
||||
newInst.Src[1].Register.SwizzleY = TGSI_SWIZZLE_W;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
/* KILL_IF -tmp0.yyyy; # if -tmp0.y < 0, KILL */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_KILL_IF;
|
||||
newInst.Instruction.NumDstRegs = 0;
|
||||
newInst.Instruction.NumSrcRegs = 1;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[0].Register.Index = tmp0;
|
||||
newInst.Src[0].Register.SwizzleX = TGSI_SWIZZLE_Y;
|
||||
newInst.Src[0].Register.SwizzleY = TGSI_SWIZZLE_Y;
|
||||
newInst.Src[0].Register.SwizzleZ = TGSI_SWIZZLE_Y;
|
||||
newInst.Src[0].Register.SwizzleW = TGSI_SWIZZLE_Y;
|
||||
newInst.Src[0].Register.Negate = 1;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
|
||||
/* compute coverage factor = (1-d)/(1-k) */
|
||||
|
||||
/* SUB t0.z, tex.w, tex.z; # m = 1 - k */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_SUB;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Dst[0].Register.Index = tmp0;
|
||||
newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_Z;
|
||||
newInst.Instruction.NumSrcRegs = 2;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_INPUT;
|
||||
newInst.Src[0].Register.Index = texInput;
|
||||
newInst.Src[0].Register.SwizzleZ = TGSI_SWIZZLE_W;
|
||||
newInst.Src[1].Register.File = TGSI_FILE_INPUT;
|
||||
newInst.Src[1].Register.Index = texInput;
|
||||
newInst.Src[1].Register.SwizzleZ = TGSI_SWIZZLE_Z;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
/* RCP t0.z, t0.z; # t0.z = 1 / m */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_RCP;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Dst[0].Register.Index = tmp0;
|
||||
newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_Z;
|
||||
newInst.Instruction.NumSrcRegs = 1;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[0].Register.Index = tmp0;
|
||||
newInst.Src[0].Register.SwizzleX = TGSI_SWIZZLE_Z;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
/* SUB t0.y, 1, t0.x; # d = 1 - d */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_SUB;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Dst[0].Register.Index = tmp0;
|
||||
newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_Y;
|
||||
newInst.Instruction.NumSrcRegs = 2;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_INPUT;
|
||||
newInst.Src[0].Register.Index = texInput;
|
||||
newInst.Src[0].Register.SwizzleY = TGSI_SWIZZLE_W;
|
||||
newInst.Src[1].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[1].Register.Index = tmp0;
|
||||
newInst.Src[1].Register.SwizzleY = TGSI_SWIZZLE_X;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
/* MUL t0.w, t0.y, t0.z; # coverage = d * m */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_MUL;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Dst[0].Register.Index = tmp0;
|
||||
newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_W;
|
||||
newInst.Instruction.NumSrcRegs = 2;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[0].Register.Index = tmp0;
|
||||
newInst.Src[0].Register.SwizzleW = TGSI_SWIZZLE_Y;
|
||||
newInst.Src[1].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[1].Register.Index = tmp0;
|
||||
newInst.Src[1].Register.SwizzleW = TGSI_SWIZZLE_Z;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
/* SLE t0.y, t0.x, tex.z; # bool b = distance <= k */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_SLE;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Dst[0].Register.Index = tmp0;
|
||||
newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_Y;
|
||||
newInst.Instruction.NumSrcRegs = 2;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[0].Register.Index = tmp0;
|
||||
newInst.Src[0].Register.SwizzleY = TGSI_SWIZZLE_X;
|
||||
newInst.Src[1].Register.File = TGSI_FILE_INPUT;
|
||||
newInst.Src[1].Register.Index = texInput;
|
||||
newInst.Src[1].Register.SwizzleY = TGSI_SWIZZLE_Z;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
/* CMP t0.w, -t0.y, tex.w, t0.w;
|
||||
* # if -t0.y < 0 then
|
||||
* t0.w = 1
|
||||
* else
|
||||
* t0.w = t0.w
|
||||
*/
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_CMP;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Dst[0].Register.Index = tmp0;
|
||||
newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_W;
|
||||
newInst.Instruction.NumSrcRegs = 3;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[0].Register.Index = tmp0;
|
||||
newInst.Src[0].Register.SwizzleX = TGSI_SWIZZLE_Y;
|
||||
newInst.Src[0].Register.SwizzleY = TGSI_SWIZZLE_Y;
|
||||
newInst.Src[0].Register.SwizzleZ = TGSI_SWIZZLE_Y;
|
||||
newInst.Src[0].Register.SwizzleW = TGSI_SWIZZLE_Y;
|
||||
newInst.Src[0].Register.Negate = 1;
|
||||
newInst.Src[1].Register.File = TGSI_FILE_INPUT;
|
||||
newInst.Src[1].Register.Index = texInput;
|
||||
newInst.Src[1].Register.SwizzleX = TGSI_SWIZZLE_W;
|
||||
newInst.Src[1].Register.SwizzleY = TGSI_SWIZZLE_W;
|
||||
newInst.Src[1].Register.SwizzleZ = TGSI_SWIZZLE_W;
|
||||
newInst.Src[1].Register.SwizzleW = TGSI_SWIZZLE_W;
|
||||
newInst.Src[2].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[2].Register.Index = tmp0;
|
||||
newInst.Src[2].Register.SwizzleX = TGSI_SWIZZLE_W;
|
||||
newInst.Src[2].Register.SwizzleY = TGSI_SWIZZLE_W;
|
||||
newInst.Src[2].Register.SwizzleZ = TGSI_SWIZZLE_W;
|
||||
newInst.Src[2].Register.SwizzleW = TGSI_SWIZZLE_W;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
}
|
||||
|
||||
if (inst->Instruction.Opcode == TGSI_OPCODE_END) {
|
||||
/* add alpha modulation code at tail of program */
|
||||
|
||||
/* MOV result.color.xyz, colorTemp; */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_MOV;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_OUTPUT;
|
||||
newInst.Dst[0].Register.Index = aactx->colorOutput;
|
||||
newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_XYZ;
|
||||
newInst.Instruction.NumSrcRegs = 1;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[0].Register.Index = aactx->colorTemp;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
/* MUL result.color.w, colorTemp, tmp0.w; */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_MUL;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_OUTPUT;
|
||||
newInst.Dst[0].Register.Index = aactx->colorOutput;
|
||||
newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_W;
|
||||
newInst.Instruction.NumSrcRegs = 2;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[0].Register.Index = aactx->colorTemp;
|
||||
newInst.Src[1].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[1].Register.Index = aactx->tmp0;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
}
|
||||
else {
|
||||
/* Not an END instruction.
|
||||
* Look for writes to result.color and replace with colorTemp reg.
|
||||
*/
|
||||
uint i;
|
||||
|
||||
for (i = 0; i < inst->Instruction.NumDstRegs; i++) {
|
||||
struct tgsi_full_dst_register *dst = &inst->Dst[i];
|
||||
if (dst->Register.File == TGSI_FILE_OUTPUT &&
|
||||
dst->Register.Index == aactx->colorOutput) {
|
||||
dst->Register.File = TGSI_FILE_TEMPORARY;
|
||||
dst->Register.Index = aactx->colorTemp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,8 +511,7 @@ generate_aapoint_fs(struct aapoint_stage *aapoint)
|
||||
transform.maxGeneric = -1;
|
||||
transform.colorTemp = -1;
|
||||
transform.tmp0 = -1;
|
||||
transform.base.prolog = aa_transform_prolog;
|
||||
transform.base.epilog = aa_transform_epilog;
|
||||
transform.firstInstruction = TRUE;
|
||||
transform.base.transform_instruction = aa_transform_inst;
|
||||
transform.base.transform_declaration = aa_transform_decl;
|
||||
|
||||
|
@@ -47,6 +47,10 @@
|
||||
#define DEBUG_CLIP 0
|
||||
|
||||
|
||||
#ifndef IS_NEGATIVE
|
||||
#define IS_NEGATIVE(X) ((X) < 0.0)
|
||||
#endif
|
||||
|
||||
#ifndef DIFFERENT_SIGNS
|
||||
#define DIFFERENT_SIGNS(x, y) ((x) * (y) <= 0.0F && (x) - (y) != 0.0F)
|
||||
#endif
|
||||
@@ -433,7 +437,7 @@ do_clip_tri( struct draw_stage *stage,
|
||||
if (util_is_inf_or_nan(dp))
|
||||
return; //discard nan
|
||||
|
||||
if (dp_prev >= 0.0f) {
|
||||
if (!IS_NEGATIVE(dp_prev)) {
|
||||
assert(outcount < MAX_CLIPPED_VERTICES);
|
||||
if (outcount >= MAX_CLIPPED_VERTICES)
|
||||
return;
|
||||
@@ -457,7 +461,7 @@ do_clip_tri( struct draw_stage *stage,
|
||||
new_edge = &outEdges[outcount];
|
||||
outlist[outcount++] = new_vert;
|
||||
|
||||
if (dp < 0.0f) {
|
||||
if (IS_NEGATIVE(dp)) {
|
||||
/* Going out of bounds. Avoid division by zero as we
|
||||
* know dp != dp_prev from DIFFERENT_SIGNS, above.
|
||||
*/
|
||||
|
@@ -129,6 +129,7 @@ struct pstip_transform_context {
|
||||
int freeSampler; /** an available sampler for the pstipple */
|
||||
int texTemp; /**< temp registers */
|
||||
int numImmed;
|
||||
boolean firstInstruction;
|
||||
};
|
||||
|
||||
|
||||
@@ -191,85 +192,147 @@ free_bit(uint bitfield)
|
||||
|
||||
|
||||
/**
|
||||
* TGSI transform prolog callback.
|
||||
* TGSI instruction transform callback.
|
||||
* Replace writes to result.color w/ a temp reg.
|
||||
* Upon END instruction, insert texture sampling code for antialiasing.
|
||||
*/
|
||||
static void
|
||||
pstip_transform_prolog(struct tgsi_transform_context *ctx)
|
||||
pstip_transform_inst(struct tgsi_transform_context *ctx,
|
||||
struct tgsi_full_instruction *inst)
|
||||
{
|
||||
struct pstip_transform_context *pctx = (struct pstip_transform_context *) ctx;
|
||||
uint i;
|
||||
int wincoordInput;
|
||||
|
||||
/* find free sampler */
|
||||
pctx->freeSampler = free_bit(pctx->samplersUsed);
|
||||
if (pctx->freeSampler >= PIPE_MAX_SAMPLERS)
|
||||
pctx->freeSampler = PIPE_MAX_SAMPLERS - 1;
|
||||
if (pctx->firstInstruction) {
|
||||
/* emit our new declarations before the first instruction */
|
||||
|
||||
if (pctx->wincoordInput < 0)
|
||||
wincoordInput = pctx->maxInput + 1;
|
||||
else
|
||||
wincoordInput = pctx->wincoordInput;
|
||||
struct tgsi_full_declaration decl;
|
||||
struct tgsi_full_instruction newInst;
|
||||
uint i;
|
||||
int wincoordInput;
|
||||
|
||||
/* find one free temp reg */
|
||||
for (i = 0; i < 32; i++) {
|
||||
if ((pctx->tempsUsed & (1 << i)) == 0) {
|
||||
/* found a free temp */
|
||||
if (pctx->texTemp < 0)
|
||||
pctx->texTemp = i;
|
||||
/* find free sampler */
|
||||
pctx->freeSampler = free_bit(pctx->samplersUsed);
|
||||
if (pctx->freeSampler >= PIPE_MAX_SAMPLERS)
|
||||
pctx->freeSampler = PIPE_MAX_SAMPLERS - 1;
|
||||
|
||||
if (pctx->wincoordInput < 0)
|
||||
wincoordInput = pctx->maxInput + 1;
|
||||
else
|
||||
break;
|
||||
wincoordInput = pctx->wincoordInput;
|
||||
|
||||
/* find one free temp reg */
|
||||
for (i = 0; i < 32; i++) {
|
||||
if ((pctx->tempsUsed & (1 << i)) == 0) {
|
||||
/* found a free temp */
|
||||
if (pctx->texTemp < 0)
|
||||
pctx->texTemp = i;
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
assert(pctx->texTemp >= 0);
|
||||
assert(pctx->texTemp >= 0);
|
||||
|
||||
if (pctx->wincoordInput < 0) {
|
||||
/* declare new position input reg */
|
||||
tgsi_transform_input_decl(ctx, wincoordInput,
|
||||
TGSI_SEMANTIC_POSITION, 1,
|
||||
TGSI_INTERPOLATE_LINEAR);
|
||||
if (pctx->wincoordInput < 0) {
|
||||
/* declare new position input reg */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_INPUT;
|
||||
decl.Declaration.Interpolate = 1;
|
||||
decl.Declaration.Semantic = 1;
|
||||
decl.Semantic.Name = TGSI_SEMANTIC_POSITION;
|
||||
decl.Semantic.Index = 0;
|
||||
decl.Range.First =
|
||||
decl.Range.Last = wincoordInput;
|
||||
decl.Interp.Interpolate = TGSI_INTERPOLATE_LINEAR; /* XXX? */
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
}
|
||||
|
||||
/* declare new sampler */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_SAMPLER;
|
||||
decl.Range.First =
|
||||
decl.Range.Last = pctx->freeSampler;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
/* declare new temp regs */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_TEMPORARY;
|
||||
decl.Range.First =
|
||||
decl.Range.Last = pctx->texTemp;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
/* emit immediate = {1/32, 1/32, 1, 1}
|
||||
* The index/position of this immediate will be pctx->numImmed
|
||||
*/
|
||||
{
|
||||
static const float value[4] = { 1.0/32, 1.0/32, 1.0, 1.0 };
|
||||
struct tgsi_full_immediate immed;
|
||||
uint size = 4;
|
||||
immed = tgsi_default_full_immediate();
|
||||
immed.Immediate.NrTokens = 1 + size; /* one for the token itself */
|
||||
immed.u[0].Float = value[0];
|
||||
immed.u[1].Float = value[1];
|
||||
immed.u[2].Float = value[2];
|
||||
immed.u[3].Float = value[3];
|
||||
ctx->emit_immediate(ctx, &immed);
|
||||
}
|
||||
|
||||
pctx->firstInstruction = FALSE;
|
||||
|
||||
|
||||
/*
|
||||
* Insert new MUL/TEX/KILL_IF instructions at start of program
|
||||
* Take gl_FragCoord, divide by 32 (stipple size), sample the
|
||||
* texture and kill fragment if needed.
|
||||
*
|
||||
* We'd like to use non-normalized texcoords to index into a RECT
|
||||
* texture, but we can only use GL_REPEAT wrap mode with normalized
|
||||
* texcoords. Darn.
|
||||
*/
|
||||
|
||||
/* MUL texTemp, INPUT[wincoord], 1/32; */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_MUL;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Dst[0].Register.Index = pctx->texTemp;
|
||||
newInst.Instruction.NumSrcRegs = 2;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_INPUT;
|
||||
newInst.Src[0].Register.Index = wincoordInput;
|
||||
newInst.Src[1].Register.File = TGSI_FILE_IMMEDIATE;
|
||||
newInst.Src[1].Register.Index = pctx->numImmed;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
/* TEX texTemp, texTemp, sampler; */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_TEX;
|
||||
newInst.Instruction.NumDstRegs = 1;
|
||||
newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Dst[0].Register.Index = pctx->texTemp;
|
||||
newInst.Instruction.NumSrcRegs = 2;
|
||||
newInst.Instruction.Texture = TRUE;
|
||||
newInst.Texture.Texture = TGSI_TEXTURE_2D;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[0].Register.Index = pctx->texTemp;
|
||||
newInst.Src[1].Register.File = TGSI_FILE_SAMPLER;
|
||||
newInst.Src[1].Register.Index = pctx->freeSampler;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
|
||||
/* KILL_IF -texTemp; # if -texTemp < 0, KILL fragment */
|
||||
newInst = tgsi_default_full_instruction();
|
||||
newInst.Instruction.Opcode = TGSI_OPCODE_KILL_IF;
|
||||
newInst.Instruction.NumDstRegs = 0;
|
||||
newInst.Instruction.NumSrcRegs = 1;
|
||||
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
newInst.Src[0].Register.Index = pctx->texTemp;
|
||||
newInst.Src[0].Register.Negate = 1;
|
||||
ctx->emit_instruction(ctx, &newInst);
|
||||
}
|
||||
|
||||
/* declare new sampler */
|
||||
tgsi_transform_sampler_decl(ctx, pctx->freeSampler);
|
||||
|
||||
/* declare new temp regs */
|
||||
tgsi_transform_temp_decl(ctx, pctx->texTemp);
|
||||
|
||||
/* emit immediate = {1/32, 1/32, 1, 1}
|
||||
* The index/position of this immediate will be pctx->numImmed
|
||||
*/
|
||||
tgsi_transform_immediate_decl(ctx, 1.0/32.0, 1.0/32.0, 1.0, 1.0);
|
||||
|
||||
/*
|
||||
* Insert new MUL/TEX/KILL_IF instructions at start of program
|
||||
* Take gl_FragCoord, divide by 32 (stipple size), sample the
|
||||
* texture and kill fragment if needed.
|
||||
*
|
||||
* We'd like to use non-normalized texcoords to index into a RECT
|
||||
* texture, but we can only use GL_REPEAT wrap mode with normalized
|
||||
* texcoords. Darn.
|
||||
*/
|
||||
|
||||
/* MUL texTemp, INPUT[wincoord], 1/32; */
|
||||
tgsi_transform_op2_inst(ctx, TGSI_OPCODE_MUL,
|
||||
TGSI_FILE_TEMPORARY, pctx->texTemp,
|
||||
TGSI_WRITEMASK_XYZW,
|
||||
TGSI_FILE_INPUT, wincoordInput,
|
||||
TGSI_FILE_IMMEDIATE, pctx->numImmed);
|
||||
|
||||
/* TEX texTemp, texTemp, sampler; */
|
||||
tgsi_transform_tex_2d_inst(ctx,
|
||||
TGSI_FILE_TEMPORARY, pctx->texTemp,
|
||||
TGSI_FILE_TEMPORARY, pctx->texTemp,
|
||||
pctx->freeSampler);
|
||||
|
||||
/* KILL_IF -texTemp.wwww; # if -texTemp < 0, KILL fragment */
|
||||
tgsi_transform_kill_inst(ctx,
|
||||
TGSI_FILE_TEMPORARY, pctx->texTemp, TGSI_SWIZZLE_W);
|
||||
/* emit this instruction */
|
||||
ctx->emit_instruction(ctx, inst);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Generate the frag shader we'll use for doing polygon stipple.
|
||||
* This will be the user's shader prefixed with a TEX and KIL instruction.
|
||||
@@ -292,7 +355,8 @@ generate_pstip_fs(struct pstip_stage *pstip)
|
||||
transform.wincoordInput = -1;
|
||||
transform.maxInput = -1;
|
||||
transform.texTemp = -1;
|
||||
transform.base.prolog = pstip_transform_prolog;
|
||||
transform.firstInstruction = TRUE;
|
||||
transform.base.transform_instruction = pstip_transform_inst;
|
||||
transform.base.transform_declaration = pstip_transform_decl;
|
||||
transform.base.transform_immediate = pstip_transform_immed;
|
||||
|
||||
|
@@ -192,6 +192,18 @@ llvm_middle_end_prepare( struct draw_pt_middle_end *middle,
|
||||
*/
|
||||
fpme->vertex_size = sizeof(struct vertex_header) + nr * 4 * sizeof(float);
|
||||
|
||||
/* Get the number of float[4] attributes per vertex.
|
||||
* Note: this must be done after draw_pt_emit_prepare() since that
|
||||
* can effect the vertex size.
|
||||
*/
|
||||
nr = MAX2(vs->info.num_inputs, draw_total_vs_outputs(draw));
|
||||
|
||||
/* Always leave room for the vertex header whether we need it or
|
||||
* not. It's hard to get rid of it in particular because of the
|
||||
* viewport code in draw_pt_post_vs.c.
|
||||
*/
|
||||
fpme->vertex_size = sizeof(struct vertex_header) + nr * 4 * sizeof(float);
|
||||
|
||||
/* return even number */
|
||||
*max_vertices = *max_vertices & ~1;
|
||||
|
||||
@@ -375,8 +387,7 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle,
|
||||
fpme->vertex_size,
|
||||
draw->pt.vertex_buffer,
|
||||
draw->instance_id,
|
||||
draw->start_index,
|
||||
draw->start_instance);
|
||||
draw->start_index);
|
||||
else
|
||||
clipped = fpme->current_variant->jit_func_elts( &fpme->llvm->jit_context,
|
||||
llvm_vert_info.verts,
|
||||
@@ -387,8 +398,7 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle,
|
||||
fpme->vertex_size,
|
||||
draw->pt.vertex_buffer,
|
||||
draw->instance_id,
|
||||
draw->pt.user.eltBias,
|
||||
draw->start_instance);
|
||||
draw->pt.user.eltBias);
|
||||
|
||||
/* Finished with fetch and vs:
|
||||
*/
|
||||
|
@@ -53,16 +53,8 @@
|
||||
#ifndef HAVE_LLVM
|
||||
#error "HAVE_LLVM should be set with LLVM's version number, e.g. (0x0207 for 2.7)"
|
||||
#endif
|
||||
#if HAVE_LLVM < 0x303
|
||||
#error "LLVM 3.3 or newer required"
|
||||
#endif
|
||||
|
||||
|
||||
#if HAVE_LLVM <= 0x0303
|
||||
/* We won't actually use LLVMMCJITMemoryManagerRef, just create a dummy
|
||||
* typedef to simplify things elsewhere.
|
||||
*/
|
||||
typedef void *LLVMMCJITMemoryManagerRef;
|
||||
#if HAVE_LLVM < 0x301
|
||||
#error "LLVM 3.1 or newer required"
|
||||
#endif
|
||||
|
||||
|
||||
|
@@ -134,8 +134,7 @@ lp_build_min_simple(struct lp_build_context *bld,
|
||||
}
|
||||
}
|
||||
else if (type.floating && util_cpu_caps.has_altivec) {
|
||||
if (nan_behavior == GALLIVM_NAN_RETURN_NAN ||
|
||||
nan_behavior == GALLIVM_NAN_RETURN_NAN_FIRST_NONNAN) {
|
||||
if (nan_behavior == GALLIVM_NAN_RETURN_NAN) {
|
||||
debug_printf("%s: altivec doesn't support nan return nan behavior\n",
|
||||
__FUNCTION__);
|
||||
}
|
||||
@@ -203,19 +202,18 @@ lp_build_min_simple(struct lp_build_context *bld,
|
||||
*/
|
||||
if (util_cpu_caps.has_sse && type.floating &&
|
||||
nan_behavior != GALLIVM_NAN_BEHAVIOR_UNDEFINED &&
|
||||
nan_behavior != GALLIVM_NAN_RETURN_OTHER_SECOND_NONNAN &&
|
||||
nan_behavior != GALLIVM_NAN_RETURN_NAN_FIRST_NONNAN) {
|
||||
LLVMValueRef isnan, min;
|
||||
min = lp_build_intrinsic_binary_anylength(bld->gallivm, intrinsic,
|
||||
nan_behavior != GALLIVM_NAN_RETURN_OTHER_SECOND_NONNAN) {
|
||||
LLVMValueRef isnan, max;
|
||||
max = lp_build_intrinsic_binary_anylength(bld->gallivm, intrinsic,
|
||||
type,
|
||||
intr_size, a, b);
|
||||
if (nan_behavior == GALLIVM_NAN_RETURN_OTHER) {
|
||||
isnan = lp_build_isnan(bld, b);
|
||||
return lp_build_select(bld, isnan, a, min);
|
||||
return lp_build_select(bld, isnan, a, max);
|
||||
} else {
|
||||
assert(nan_behavior == GALLIVM_NAN_RETURN_NAN);
|
||||
isnan = lp_build_isnan(bld, a);
|
||||
return lp_build_select(bld, isnan, a, min);
|
||||
return lp_build_select(bld, isnan, a, max);
|
||||
}
|
||||
} else {
|
||||
return lp_build_intrinsic_binary_anylength(bld->gallivm, intrinsic,
|
||||
@@ -243,9 +241,6 @@ lp_build_min_simple(struct lp_build_context *bld,
|
||||
case GALLIVM_NAN_RETURN_OTHER_SECOND_NONNAN:
|
||||
cond = lp_build_cmp_ordered(bld, PIPE_FUNC_LESS, a, b);
|
||||
return lp_build_select(bld, cond, a, b);
|
||||
case GALLIVM_NAN_RETURN_NAN_FIRST_NONNAN:
|
||||
cond = lp_build_cmp(bld, PIPE_FUNC_LESS, b, a);
|
||||
return lp_build_select(bld, cond, b, a);
|
||||
case GALLIVM_NAN_BEHAVIOR_UNDEFINED:
|
||||
cond = lp_build_cmp(bld, PIPE_FUNC_LESS, a, b);
|
||||
return lp_build_select(bld, cond, a, b);
|
||||
@@ -315,8 +310,7 @@ lp_build_max_simple(struct lp_build_context *bld,
|
||||
}
|
||||
}
|
||||
else if (type.floating && util_cpu_caps.has_altivec) {
|
||||
if (nan_behavior == GALLIVM_NAN_RETURN_NAN ||
|
||||
nan_behavior == GALLIVM_NAN_RETURN_NAN_FIRST_NONNAN) {
|
||||
if (nan_behavior == GALLIVM_NAN_RETURN_NAN) {
|
||||
debug_printf("%s: altivec doesn't support nan return nan behavior\n",
|
||||
__FUNCTION__);
|
||||
}
|
||||
@@ -379,19 +373,18 @@ lp_build_max_simple(struct lp_build_context *bld,
|
||||
if(intrinsic) {
|
||||
if (util_cpu_caps.has_sse && type.floating &&
|
||||
nan_behavior != GALLIVM_NAN_BEHAVIOR_UNDEFINED &&
|
||||
nan_behavior != GALLIVM_NAN_RETURN_OTHER_SECOND_NONNAN &&
|
||||
nan_behavior != GALLIVM_NAN_RETURN_NAN_FIRST_NONNAN) {
|
||||
LLVMValueRef isnan, max;
|
||||
max = lp_build_intrinsic_binary_anylength(bld->gallivm, intrinsic,
|
||||
nan_behavior != GALLIVM_NAN_RETURN_OTHER_SECOND_NONNAN) {
|
||||
LLVMValueRef isnan, min;
|
||||
min = lp_build_intrinsic_binary_anylength(bld->gallivm, intrinsic,
|
||||
type,
|
||||
intr_size, a, b);
|
||||
if (nan_behavior == GALLIVM_NAN_RETURN_OTHER) {
|
||||
isnan = lp_build_isnan(bld, b);
|
||||
return lp_build_select(bld, isnan, a, max);
|
||||
return lp_build_select(bld, isnan, a, min);
|
||||
} else {
|
||||
assert(nan_behavior == GALLIVM_NAN_RETURN_NAN);
|
||||
isnan = lp_build_isnan(bld, a);
|
||||
return lp_build_select(bld, isnan, a, max);
|
||||
return lp_build_select(bld, isnan, a, min);
|
||||
}
|
||||
} else {
|
||||
return lp_build_intrinsic_binary_anylength(bld->gallivm, intrinsic,
|
||||
@@ -419,9 +412,6 @@ lp_build_max_simple(struct lp_build_context *bld,
|
||||
case GALLIVM_NAN_RETURN_OTHER_SECOND_NONNAN:
|
||||
cond = lp_build_cmp_ordered(bld, PIPE_FUNC_GREATER, a, b);
|
||||
return lp_build_select(bld, cond, a, b);
|
||||
case GALLIVM_NAN_RETURN_NAN_FIRST_NONNAN:
|
||||
cond = lp_build_cmp(bld, PIPE_FUNC_GREATER, b, a);
|
||||
return lp_build_select(bld, cond, b, a);
|
||||
case GALLIVM_NAN_BEHAVIOR_UNDEFINED:
|
||||
cond = lp_build_cmp(bld, PIPE_FUNC_GREATER, a, b);
|
||||
return lp_build_select(bld, cond, a, b);
|
||||
@@ -522,20 +512,9 @@ lp_build_add(struct lp_build_context *bld,
|
||||
return lp_build_intrinsic_binary(builder, intrinsic, lp_build_vec_type(bld->gallivm, bld->type), a, b);
|
||||
}
|
||||
|
||||
if(type.norm && !type.floating && !type.fixed) {
|
||||
if (type.sign) {
|
||||
uint64_t sign = (uint64_t)1 << (type.width - 1);
|
||||
LLVMValueRef max_val = lp_build_const_int_vec(bld->gallivm, type, sign - 1);
|
||||
LLVMValueRef min_val = lp_build_const_int_vec(bld->gallivm, type, sign);
|
||||
/* a_clamp_max is the maximum a for positive b,
|
||||
a_clamp_min is the minimum a for negative b. */
|
||||
LLVMValueRef a_clamp_max = lp_build_min_simple(bld, a, LLVMBuildSub(builder, max_val, b, ""), GALLIVM_NAN_BEHAVIOR_UNDEFINED);
|
||||
LLVMValueRef a_clamp_min = lp_build_max_simple(bld, a, LLVMBuildSub(builder, min_val, b, ""), GALLIVM_NAN_BEHAVIOR_UNDEFINED);
|
||||
a = lp_build_select(bld, lp_build_cmp(bld, PIPE_FUNC_GREATER, b, bld->zero), a_clamp_max, a_clamp_min);
|
||||
} else {
|
||||
a = lp_build_min_simple(bld, a, lp_build_comp(bld, b), GALLIVM_NAN_BEHAVIOR_UNDEFINED);
|
||||
}
|
||||
}
|
||||
/* TODO: handle signed case */
|
||||
if(type.norm && !type.floating && !type.fixed && !type.sign)
|
||||
a = lp_build_min_simple(bld, a, lp_build_comp(bld, b), GALLIVM_NAN_BEHAVIOR_UNDEFINED);
|
||||
|
||||
if(LLVMIsConstant(a) && LLVMIsConstant(b))
|
||||
if (type.floating)
|
||||
@@ -814,20 +793,9 @@ lp_build_sub(struct lp_build_context *bld,
|
||||
return lp_build_intrinsic_binary(builder, intrinsic, lp_build_vec_type(bld->gallivm, bld->type), a, b);
|
||||
}
|
||||
|
||||
if(type.norm && !type.floating && !type.fixed) {
|
||||
if (type.sign) {
|
||||
uint64_t sign = (uint64_t)1 << (type.width - 1);
|
||||
LLVMValueRef max_val = lp_build_const_int_vec(bld->gallivm, type, sign - 1);
|
||||
LLVMValueRef min_val = lp_build_const_int_vec(bld->gallivm, type, sign);
|
||||
/* a_clamp_max is the maximum a for negative b,
|
||||
a_clamp_min is the minimum a for positive b. */
|
||||
LLVMValueRef a_clamp_max = lp_build_min_simple(bld, a, LLVMBuildAdd(builder, max_val, b, ""), GALLIVM_NAN_BEHAVIOR_UNDEFINED);
|
||||
LLVMValueRef a_clamp_min = lp_build_max_simple(bld, a, LLVMBuildAdd(builder, min_val, b, ""), GALLIVM_NAN_BEHAVIOR_UNDEFINED);
|
||||
a = lp_build_select(bld, lp_build_cmp(bld, PIPE_FUNC_GREATER, b, bld->zero), a_clamp_min, a_clamp_max);
|
||||
} else {
|
||||
a = lp_build_max_simple(bld, a, b, GALLIVM_NAN_BEHAVIOR_UNDEFINED);
|
||||
}
|
||||
}
|
||||
/* TODO: handle signed case */
|
||||
if(type.norm && !type.floating && !type.fixed && !type.sign)
|
||||
a = lp_build_max_simple(bld, a, b, GALLIVM_NAN_BEHAVIOR_UNDEFINED);
|
||||
|
||||
if(LLVMIsConstant(a) && LLVMIsConstant(b))
|
||||
if (type.floating)
|
||||
@@ -1095,7 +1063,7 @@ lp_build_div(struct lp_build_context *bld,
|
||||
|
||||
if(a == bld->zero)
|
||||
return bld->zero;
|
||||
if(a == bld->one && type.floating)
|
||||
if(a == bld->one)
|
||||
return lp_build_rcp(bld, b);
|
||||
if(b == bld->zero)
|
||||
return bld->undef;
|
||||
@@ -3072,6 +3040,7 @@ lp_build_exp2(struct lp_build_context *bld,
|
||||
|
||||
assert(lp_check_value(bld->type, x));
|
||||
|
||||
|
||||
/* TODO: optimize the constant case */
|
||||
if (gallivm_debug & GALLIVM_DEBUG_PERF &&
|
||||
LLVMIsConstant(x)) {
|
||||
@@ -3084,14 +3053,15 @@ lp_build_exp2(struct lp_build_context *bld,
|
||||
/* We want to preserve NaN and make sure than for exp2 if x > 128,
|
||||
* the result is INF and if it's smaller than -126.9 the result is 0 */
|
||||
x = lp_build_min_ext(bld, lp_build_const_vec(bld->gallivm, type, 128.0), x,
|
||||
GALLIVM_NAN_RETURN_NAN_FIRST_NONNAN);
|
||||
x = lp_build_max_ext(bld, lp_build_const_vec(bld->gallivm, type, -126.99999),
|
||||
x, GALLIVM_NAN_RETURN_NAN_FIRST_NONNAN);
|
||||
GALLIVM_NAN_RETURN_OTHER_SECOND_NONNAN);
|
||||
x = lp_build_max(bld, lp_build_const_vec(bld->gallivm, type, -126.99999), x);
|
||||
|
||||
/* ipart = floor(x) */
|
||||
/* fpart = x - ipart */
|
||||
lp_build_ifloor_fract(bld, x, &ipart, &fpart);
|
||||
|
||||
|
||||
|
||||
/* expipart = (float) (1 << ipart) */
|
||||
expipart = LLVMBuildAdd(builder, ipart,
|
||||
lp_build_const_int_vec(bld->gallivm, type, 127), "");
|
||||
@@ -3099,11 +3069,13 @@ lp_build_exp2(struct lp_build_context *bld,
|
||||
lp_build_const_int_vec(bld->gallivm, type, 23), "");
|
||||
expipart = LLVMBuildBitCast(builder, expipart, vec_type, "");
|
||||
|
||||
|
||||
expfpart = lp_build_polynomial(bld, fpart, lp_build_exp2_polynomial,
|
||||
Elements(lp_build_exp2_polynomial));
|
||||
|
||||
res = LLVMBuildFMul(builder, expipart, expfpart, "");
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@@ -138,7 +138,7 @@ lp_build_lerp_3d(struct lp_build_context *bld,
|
||||
enum gallivm_nan_behavior {
|
||||
/* Results are undefined with NaN. Results in fastest code */
|
||||
GALLIVM_NAN_BEHAVIOR_UNDEFINED,
|
||||
/* If one of the inputs is NaN, NaN is returned */
|
||||
/* If input is NaN, NaN is returned */
|
||||
GALLIVM_NAN_RETURN_NAN,
|
||||
/* If one of the inputs is NaN, the other operand is returned */
|
||||
GALLIVM_NAN_RETURN_OTHER,
|
||||
@@ -146,13 +146,7 @@ enum gallivm_nan_behavior {
|
||||
* but we guarantee the second operand is not a NaN.
|
||||
* In min/max it will be as fast as undefined with sse opcodes,
|
||||
* and archs having native return_other can benefit too. */
|
||||
GALLIVM_NAN_RETURN_OTHER_SECOND_NONNAN,
|
||||
/* If one of the inputs is NaN, NaN is returned,
|
||||
* but we guarantee the first operand is not a NaN.
|
||||
* In min/max it will be as fast as undefined with sse opcodes,
|
||||
* and archs having native return_nan can benefit too. */
|
||||
GALLIVM_NAN_RETURN_NAN_FIRST_NONNAN,
|
||||
|
||||
GALLIVM_NAN_RETURN_OTHER_SECOND_NONNAN
|
||||
};
|
||||
|
||||
LLVMValueRef
|
||||
|
@@ -32,11 +32,10 @@
|
||||
#include <llvm/Target/TargetInstrInfo.h>
|
||||
#include <llvm/Support/raw_ostream.h>
|
||||
#include <llvm/Support/Format.h>
|
||||
#include <llvm/Support/MemoryObject.h>
|
||||
|
||||
#if HAVE_LLVM >= 0x0306
|
||||
#include <llvm/Target/TargetSubtargetInfo.h>
|
||||
#else
|
||||
#include <llvm/Support/MemoryObject.h>
|
||||
#endif
|
||||
|
||||
#include <llvm/Support/TargetRegistry.h>
|
||||
@@ -44,7 +43,11 @@
|
||||
|
||||
#include <llvm/Support/Host.h>
|
||||
|
||||
#if HAVE_LLVM >= 0x0303
|
||||
#include <llvm/IR/Module.h>
|
||||
#else
|
||||
#include <llvm/Module.h>
|
||||
#endif
|
||||
|
||||
#include <llvm/MC/MCDisassembler.h>
|
||||
#include <llvm/MC/MCAsmInfo.h>
|
||||
@@ -54,7 +57,7 @@
|
||||
|
||||
#if HAVE_LLVM >= 0x0305
|
||||
#define OwningPtr std::unique_ptr
|
||||
#else
|
||||
#elif HAVE_LLVM >= 0x0303
|
||||
#include <llvm/ADT/OwningPtr.h>
|
||||
#endif
|
||||
|
||||
@@ -143,8 +146,6 @@ lp_debug_dump_value(LLVMValueRef value)
|
||||
}
|
||||
|
||||
|
||||
#if HAVE_LLVM < 0x0306
|
||||
|
||||
/*
|
||||
* MemoryObject wrapper around a buffer of memory, to be used by MC
|
||||
* disassembler.
|
||||
@@ -180,8 +181,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* HAVE_LLVM < 0x0306 */
|
||||
|
||||
|
||||
/*
|
||||
* Disassemble a function, using the LLVM MC disassembler.
|
||||
@@ -285,11 +284,7 @@ disassemble(const void* func, llvm::raw_ostream & Out)
|
||||
/*
|
||||
* Wrap the data in a MemoryObject
|
||||
*/
|
||||
#if HAVE_LLVM >= 0x0306
|
||||
ArrayRef<uint8_t> memoryObject((const uint8_t *)bytes, extent);
|
||||
#else
|
||||
BufferMemoryObject memoryObject((const uint8_t *)bytes, extent);
|
||||
#endif
|
||||
|
||||
uint64_t pc;
|
||||
pc = 0;
|
||||
@@ -419,7 +414,6 @@ disassemble(const void* func, llvm::raw_ostream & Out)
|
||||
extern "C" void
|
||||
lp_disassemble(LLVMValueRef func, const void *code) {
|
||||
raw_debug_ostream Out;
|
||||
Out << LLVMGetValueName(func) << ":\n";
|
||||
disassemble(code, Out);
|
||||
}
|
||||
|
||||
|
@@ -43,19 +43,43 @@
|
||||
#include <llvm-c/BitWriter.h>
|
||||
|
||||
|
||||
/* Only MCJIT is available as of LLVM SVN r216982 */
|
||||
#if HAVE_LLVM >= 0x0306
|
||||
/**
|
||||
* AVX is supported in:
|
||||
* - standard JIT from LLVM 3.2 onwards
|
||||
* - MC-JIT from LLVM 3.1
|
||||
* - MC-JIT supports limited OSes (MacOSX and Linux)
|
||||
* - standard JIT in LLVM 3.1, with backports
|
||||
*/
|
||||
#if defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_S390) || defined(PIPE_ARCH_ARM) || defined(PIPE_ARCH_AARCH64)
|
||||
# define USE_MCJIT 1
|
||||
#elif defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_S390) || defined(PIPE_ARCH_ARM) || defined(PIPE_ARCH_AARCH64)
|
||||
# define HAVE_AVX 0
|
||||
#elif HAVE_LLVM >= 0x0302 || (HAVE_LLVM == 0x0301 && defined(HAVE_JIT_AVX_SUPPORT))
|
||||
# define USE_MCJIT 0
|
||||
# define HAVE_AVX 1
|
||||
#elif HAVE_LLVM == 0x0301 && (defined(PIPE_OS_LINUX) || defined(PIPE_OS_APPLE))
|
||||
# define USE_MCJIT 1
|
||||
# define HAVE_AVX 1
|
||||
#else
|
||||
# define USE_MCJIT 0
|
||||
# define HAVE_AVX 0
|
||||
#endif
|
||||
|
||||
|
||||
#if USE_MCJIT
|
||||
void LLVMLinkInMCJIT();
|
||||
#endif
|
||||
|
||||
/*
|
||||
* LLVM has several global caches which pointing/derived from objects
|
||||
* owned by the context, so if we freeing contexts causes
|
||||
* memory leaks and false cache hits when these objects are destroyed.
|
||||
*
|
||||
* TODO: For thread safety on multi-threaded OpenGL we should use one LLVM
|
||||
* context per thread, and put them in a pool when threads are destroyed.
|
||||
*/
|
||||
#define USE_GLOBAL_CONTEXT 1
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
unsigned gallivm_debug = 0;
|
||||
|
||||
@@ -106,7 +130,6 @@ enum LLVM_CodeGenOpt_Level {
|
||||
static boolean
|
||||
create_pass_manager(struct gallivm_state *gallivm)
|
||||
{
|
||||
char *td_str;
|
||||
assert(!gallivm->passmgr);
|
||||
assert(gallivm->target);
|
||||
|
||||
@@ -114,14 +137,8 @@ create_pass_manager(struct gallivm_state *gallivm)
|
||||
if (!gallivm->passmgr)
|
||||
return FALSE;
|
||||
|
||||
// Old versions of LLVM get the DataLayout from the pass manager.
|
||||
LLVMAddTargetData(gallivm->target, gallivm->passmgr);
|
||||
|
||||
// New ones from the Module.
|
||||
td_str = LLVMCopyStringRepOfTargetData(gallivm->target);
|
||||
LLVMSetDataLayout(gallivm->module, td_str);
|
||||
free(td_str);
|
||||
|
||||
if ((gallivm_debug & GALLIVM_DEBUG_NO_OPT) == 0) {
|
||||
/* These are the passes currently listed in llvm-c/Transforms/Scalar.h,
|
||||
* but there are more on SVN.
|
||||
@@ -176,7 +193,8 @@ gallivm_free_ir(struct gallivm_state *gallivm)
|
||||
if (gallivm->builder)
|
||||
LLVMDisposeBuilder(gallivm->builder);
|
||||
|
||||
/* The LLVMContext should be owned by the parent of gallivm. */
|
||||
if (!USE_GLOBAL_CONTEXT && gallivm->context)
|
||||
LLVMContextDispose(gallivm->context);
|
||||
|
||||
gallivm->engine = NULL;
|
||||
gallivm->target = NULL;
|
||||
@@ -197,8 +215,6 @@ gallivm_free_code(struct gallivm_state *gallivm)
|
||||
assert(!gallivm->engine);
|
||||
lp_free_generated_code(gallivm->code);
|
||||
gallivm->code = NULL;
|
||||
lp_free_memory_manager(gallivm->memorymgr);
|
||||
gallivm->memorymgr = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +236,6 @@ init_gallivm_engine(struct gallivm_state *gallivm)
|
||||
ret = lp_build_create_jit_compiler_for_module(&gallivm->engine,
|
||||
&gallivm->code,
|
||||
gallivm->module,
|
||||
gallivm->memorymgr,
|
||||
(unsigned) optlevel,
|
||||
USE_MCJIT,
|
||||
&error);
|
||||
@@ -270,17 +285,18 @@ fail:
|
||||
* \return TRUE for success, FALSE for failure
|
||||
*/
|
||||
static boolean
|
||||
init_gallivm_state(struct gallivm_state *gallivm, const char *name,
|
||||
LLVMContextRef context)
|
||||
init_gallivm_state(struct gallivm_state *gallivm, const char *name)
|
||||
{
|
||||
assert(!gallivm->context);
|
||||
assert(!gallivm->module);
|
||||
|
||||
if (!lp_build_init())
|
||||
return FALSE;
|
||||
|
||||
gallivm->context = context;
|
||||
lp_build_init();
|
||||
|
||||
if (USE_GLOBAL_CONTEXT) {
|
||||
gallivm->context = LLVMGetGlobalContext();
|
||||
} else {
|
||||
gallivm->context = LLVMContextCreate();
|
||||
}
|
||||
if (!gallivm->context)
|
||||
goto fail;
|
||||
|
||||
@@ -293,10 +309,6 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name,
|
||||
if (!gallivm->builder)
|
||||
goto fail;
|
||||
|
||||
gallivm->memorymgr = lp_get_default_memory_manager();
|
||||
if (!gallivm->memorymgr)
|
||||
goto fail;
|
||||
|
||||
/* FIXME: MC-JIT only allows compiling one module at a time, and it must be
|
||||
* complete when MC-JIT is created. So defer the MC-JIT engine creation for
|
||||
* now.
|
||||
@@ -354,11 +366,11 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
boolean
|
||||
void
|
||||
lp_build_init(void)
|
||||
{
|
||||
if (gallivm_initialized)
|
||||
return TRUE;
|
||||
return;
|
||||
|
||||
#ifdef DEBUG
|
||||
gallivm_debug = debug_get_option_gallivm_debug();
|
||||
@@ -381,7 +393,8 @@ lp_build_init(void)
|
||||
* See also:
|
||||
* - http://www.anandtech.com/show/4955/the-bulldozer-review-amd-fx8150-tested/2
|
||||
*/
|
||||
if (util_cpu_caps.has_avx &&
|
||||
if (HAVE_AVX &&
|
||||
util_cpu_caps.has_avx &&
|
||||
util_cpu_caps.has_intel) {
|
||||
lp_native_vector_width = 256;
|
||||
} else {
|
||||
@@ -406,6 +419,16 @@ lp_build_init(void)
|
||||
util_cpu_caps.has_avx2 = 0;
|
||||
}
|
||||
|
||||
if (!HAVE_AVX) {
|
||||
/*
|
||||
* note these instructions are VEX-only, so can only emit if we use
|
||||
* avx (don't want to base it on has_avx & has_f16c later as that would
|
||||
* omit it unnecessarily on amd cpus, see above).
|
||||
*/
|
||||
util_cpu_caps.has_f16c = 0;
|
||||
util_cpu_caps.has_xop = 0;
|
||||
}
|
||||
|
||||
#ifdef PIPE_ARCH_PPC_64
|
||||
/* Set the NJ bit in VSCR to 0 so denormalized values are handled as
|
||||
* specified by IEEE standard (PowerISA 2.06 - Section 6.3). This guarantees
|
||||
@@ -438,8 +461,6 @@ lp_build_init(void)
|
||||
util_cpu_caps.has_avx = 0;
|
||||
util_cpu_caps.has_f16c = 0;
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -448,13 +469,13 @@ lp_build_init(void)
|
||||
* Create a new gallivm_state object.
|
||||
*/
|
||||
struct gallivm_state *
|
||||
gallivm_create(const char *name, LLVMContextRef context)
|
||||
gallivm_create(const char *name)
|
||||
{
|
||||
struct gallivm_state *gallivm;
|
||||
|
||||
gallivm = CALLOC_STRUCT(gallivm_state);
|
||||
if (gallivm) {
|
||||
if (!init_gallivm_state(gallivm, name, context)) {
|
||||
if (!init_gallivm_state(gallivm, name)) {
|
||||
FREE(gallivm);
|
||||
gallivm = NULL;
|
||||
}
|
||||
|
@@ -44,18 +44,17 @@ struct gallivm_state
|
||||
LLVMPassManagerRef passmgr;
|
||||
LLVMContextRef context;
|
||||
LLVMBuilderRef builder;
|
||||
LLVMMCJITMemoryManagerRef memorymgr;
|
||||
struct lp_generated_code *code;
|
||||
unsigned compiled;
|
||||
};
|
||||
|
||||
|
||||
boolean
|
||||
void
|
||||
lp_build_init(void);
|
||||
|
||||
|
||||
struct gallivm_state *
|
||||
gallivm_create(const char *name, LLVMContextRef context);
|
||||
gallivm_create(const char *name);
|
||||
|
||||
void
|
||||
gallivm_destroy(struct gallivm_state *gallivm);
|
||||
|
@@ -97,8 +97,6 @@ gallivm_get_shader_param(enum pipe_shader_cap param)
|
||||
return LP_MAX_TGSI_NESTING;
|
||||
case PIPE_SHADER_CAP_MAX_INPUTS:
|
||||
return PIPE_MAX_SHADER_INPUTS;
|
||||
case PIPE_SHADER_CAP_MAX_OUTPUTS:
|
||||
return 32;
|
||||
case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE:
|
||||
return sizeof(float[4]) * 4096;
|
||||
case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
|
||||
|
@@ -55,20 +55,18 @@
|
||||
#include <llvm/Target/TargetOptions.h>
|
||||
#include <llvm/ExecutionEngine/ExecutionEngine.h>
|
||||
#include <llvm/ADT/Triple.h>
|
||||
#if HAVE_LLVM < 0x0306
|
||||
#include <llvm/ExecutionEngine/JITMemoryManager.h>
|
||||
#else
|
||||
#include <llvm/ExecutionEngine/SectionMemoryManager.h>
|
||||
#endif
|
||||
#include <llvm/Support/CommandLine.h>
|
||||
#include <llvm/Support/Host.h>
|
||||
#include <llvm/Support/PrettyStackTrace.h>
|
||||
|
||||
#include <llvm/Support/TargetSelect.h>
|
||||
|
||||
#if HAVE_LLVM >= 0x0303
|
||||
#include <llvm/IR/IRBuilder.h>
|
||||
#include <llvm/IR/Module.h>
|
||||
#include <llvm/Support/CBindingWrapping.h>
|
||||
#endif
|
||||
|
||||
#include "pipe/p_config.h"
|
||||
#include "util/u_debug.h"
|
||||
@@ -82,9 +80,15 @@ class LLVMEnsureMultithreaded {
|
||||
public:
|
||||
LLVMEnsureMultithreaded()
|
||||
{
|
||||
#if HAVE_LLVM < 0x0303
|
||||
if (!llvm::llvm_is_multithreaded()) {
|
||||
llvm::llvm_start_multithreaded();
|
||||
}
|
||||
#else
|
||||
if (!LLVMIsMultithreaded()) {
|
||||
LLVMStartMultithreaded();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
@@ -134,31 +138,23 @@ lp_set_load_alignment(LLVMValueRef Inst,
|
||||
extern "C"
|
||||
void
|
||||
lp_set_store_alignment(LLVMValueRef Inst,
|
||||
unsigned Align)
|
||||
unsigned Align)
|
||||
{
|
||||
llvm::unwrap<llvm::StoreInst>(Inst)->setAlignment(Align);
|
||||
}
|
||||
|
||||
|
||||
#if HAVE_LLVM < 0x0306
|
||||
typedef llvm::JITMemoryManager BaseMemoryManager;
|
||||
#else
|
||||
typedef llvm::RTDyldMemoryManager BaseMemoryManager;
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Delegating is tedious but the default manager class is hidden in an
|
||||
* anonymous namespace in LLVM, so we cannot just derive from it to change
|
||||
* its behavior.
|
||||
*/
|
||||
class DelegatingJITMemoryManager : public BaseMemoryManager {
|
||||
class DelegatingJITMemoryManager : public llvm::JITMemoryManager {
|
||||
|
||||
protected:
|
||||
virtual BaseMemoryManager *mgr() const = 0;
|
||||
virtual llvm::JITMemoryManager *mgr() const = 0;
|
||||
|
||||
public:
|
||||
#if HAVE_LLVM < 0x0306
|
||||
/*
|
||||
* From JITMemoryManager
|
||||
*/
|
||||
@@ -242,7 +238,6 @@ class DelegatingJITMemoryManager : public BaseMemoryManager {
|
||||
virtual unsigned GetNumStubSlabs() {
|
||||
return mgr()->GetNumStubSlabs();
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* From RTDyldMemoryManager
|
||||
@@ -262,6 +257,7 @@ class DelegatingJITMemoryManager : public BaseMemoryManager {
|
||||
return mgr()->allocateCodeSection(Size, Alignment, SectionID);
|
||||
}
|
||||
#endif
|
||||
#if HAVE_LLVM >= 0x0303
|
||||
virtual uint8_t *allocateDataSection(uintptr_t Size,
|
||||
unsigned Alignment,
|
||||
unsigned SectionID,
|
||||
@@ -286,16 +282,23 @@ class DelegatingJITMemoryManager : public BaseMemoryManager {
|
||||
virtual void registerEHFrames(llvm::StringRef SectionData) {
|
||||
mgr()->registerEHFrames(SectionData);
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
virtual uint8_t *allocateDataSection(uintptr_t Size,
|
||||
unsigned Alignment,
|
||||
unsigned SectionID) {
|
||||
return mgr()->allocateDataSection(Size, Alignment, SectionID);
|
||||
}
|
||||
#endif
|
||||
virtual void *getPointerToNamedFunction(const std::string &Name,
|
||||
bool AbortOnFailure=true) {
|
||||
return mgr()->getPointerToNamedFunction(Name, AbortOnFailure);
|
||||
}
|
||||
#if HAVE_LLVM <= 0x0303
|
||||
#if HAVE_LLVM == 0x0303
|
||||
virtual bool applyPermissions(std::string *ErrMsg = 0) {
|
||||
return mgr()->applyPermissions(ErrMsg);
|
||||
}
|
||||
#else
|
||||
#elif HAVE_LLVM > 0x0303
|
||||
virtual bool finalizeMemory(std::string *ErrMsg = 0) {
|
||||
return mgr()->finalizeMemory(ErrMsg);
|
||||
}
|
||||
@@ -316,15 +319,15 @@ class DelegatingJITMemoryManager : public BaseMemoryManager {
|
||||
*/
|
||||
class ShaderMemoryManager : public DelegatingJITMemoryManager {
|
||||
|
||||
BaseMemoryManager *TheMM;
|
||||
static llvm::JITMemoryManager *TheMM;
|
||||
static unsigned NumUsers;
|
||||
|
||||
struct GeneratedCode {
|
||||
typedef std::vector<void *> Vec;
|
||||
Vec FunctionBody, ExceptionTable;
|
||||
BaseMemoryManager *TheMM;
|
||||
|
||||
GeneratedCode(BaseMemoryManager *MM) {
|
||||
TheMM = MM;
|
||||
GeneratedCode() {
|
||||
++NumUsers;
|
||||
}
|
||||
|
||||
~GeneratedCode() {
|
||||
@@ -332,31 +335,36 @@ class ShaderMemoryManager : public DelegatingJITMemoryManager {
|
||||
* Deallocate things as previously requested and
|
||||
* free shared manager when no longer used.
|
||||
*/
|
||||
#if HAVE_LLVM < 0x0306
|
||||
Vec::iterator i;
|
||||
Vec::iterator i;
|
||||
|
||||
assert(TheMM);
|
||||
for ( i = FunctionBody.begin(); i != FunctionBody.end(); ++i )
|
||||
TheMM->deallocateFunctionBody(*i);
|
||||
assert(TheMM);
|
||||
for ( i = FunctionBody.begin(); i != FunctionBody.end(); ++i )
|
||||
TheMM->deallocateFunctionBody(*i);
|
||||
#if HAVE_LLVM < 0x0304
|
||||
for ( i = ExceptionTable.begin(); i != ExceptionTable.end(); ++i )
|
||||
TheMM->deallocateExceptionTable(*i);
|
||||
#endif /* HAVE_LLVM < 0x0304 */
|
||||
#endif /* HAVE_LLVM < 0x0306 */
|
||||
for ( i = ExceptionTable.begin(); i != ExceptionTable.end(); ++i )
|
||||
TheMM->deallocateExceptionTable(*i);
|
||||
#endif
|
||||
--NumUsers;
|
||||
if (NumUsers == 0) {
|
||||
delete TheMM;
|
||||
TheMM = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
GeneratedCode *code;
|
||||
|
||||
BaseMemoryManager *mgr() const {
|
||||
llvm::JITMemoryManager *mgr() const {
|
||||
if (!TheMM) {
|
||||
TheMM = CreateDefaultMemManager();
|
||||
}
|
||||
return TheMM;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
ShaderMemoryManager(BaseMemoryManager* MM) {
|
||||
TheMM = MM;
|
||||
code = new GeneratedCode(MM);
|
||||
ShaderMemoryManager() {
|
||||
code = new GeneratedCode;
|
||||
}
|
||||
|
||||
virtual ~ShaderMemoryManager() {
|
||||
@@ -387,6 +395,9 @@ class ShaderMemoryManager : public DelegatingJITMemoryManager {
|
||||
}
|
||||
};
|
||||
|
||||
llvm::JITMemoryManager *ShaderMemoryManager::TheMM = 0;
|
||||
unsigned ShaderMemoryManager::NumUsers = 0;
|
||||
|
||||
|
||||
/**
|
||||
* Same as LLVMCreateJITCompilerForModule, but:
|
||||
@@ -403,7 +414,6 @@ LLVMBool
|
||||
lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
||||
lp_generated_code **OutCode,
|
||||
LLVMModuleRef M,
|
||||
LLVMMCJITMemoryManagerRef CMM,
|
||||
unsigned OptLevel,
|
||||
int useMCJIT,
|
||||
char **OutError)
|
||||
@@ -433,9 +443,7 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
||||
options.JITEmitDebugInfo = true;
|
||||
#endif
|
||||
|
||||
/* XXX: Workaround http://llvm.org/PR21435 */
|
||||
#if defined(DEBUG) || defined(PROFILE) || \
|
||||
(HAVE_LLVM >= 0x0303 && (defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)))
|
||||
#if defined(DEBUG) || defined(PROFILE)
|
||||
#if HAVE_LLVM < 0x0304
|
||||
options.NoFramePointerElimNonLeaf = true;
|
||||
#endif
|
||||
@@ -448,9 +456,7 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
||||
.setOptLevel((CodeGenOpt::Level)OptLevel);
|
||||
|
||||
if (useMCJIT) {
|
||||
#if HAVE_LLVM < 0x0306
|
||||
builder.setUseMCJIT(true);
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
* MCJIT works on Windows, but currently only through ELF object format.
|
||||
@@ -493,30 +499,24 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
||||
builder.setMCPU(MCPU);
|
||||
#endif
|
||||
|
||||
ShaderMemoryManager *MM;
|
||||
if (useMCJIT) {
|
||||
#if HAVE_LLVM > 0x0303
|
||||
BaseMemoryManager* JMM = reinterpret_cast<BaseMemoryManager*>(CMM);
|
||||
MM = new ShaderMemoryManager(JMM);
|
||||
*OutCode = MM->getGeneratedCode();
|
||||
ShaderMemoryManager *MM = new ShaderMemoryManager();
|
||||
*OutCode = MM->getGeneratedCode();
|
||||
|
||||
builder.setMCJITMemoryManager(MM);
|
||||
#endif
|
||||
} else {
|
||||
#if HAVE_LLVM < 0x0306
|
||||
BaseMemoryManager* JMM = reinterpret_cast<BaseMemoryManager*>(CMM);
|
||||
MM = new ShaderMemoryManager(JMM);
|
||||
*OutCode = MM->getGeneratedCode();
|
||||
|
||||
builder.setJITMemoryManager(MM);
|
||||
#else
|
||||
assert(0);
|
||||
#endif
|
||||
}
|
||||
builder.setJITMemoryManager(MM);
|
||||
|
||||
ExecutionEngine *JIT;
|
||||
|
||||
#if HAVE_LLVM >= 0x0302
|
||||
JIT = builder.create();
|
||||
#else
|
||||
/*
|
||||
* Workaround http://llvm.org/PR12833
|
||||
*/
|
||||
StringRef MArch = "";
|
||||
StringRef MCPU = "";
|
||||
Triple TT(unwrap(M)->getTargetTriple());
|
||||
JIT = builder.create(builder.selectTarget(TT, MArch, MCPU, MAttrs));
|
||||
#endif
|
||||
if (JIT) {
|
||||
*OutJIT = wrap(JIT);
|
||||
return 0;
|
||||
@@ -535,23 +535,3 @@ lp_free_generated_code(struct lp_generated_code *code)
|
||||
{
|
||||
ShaderMemoryManager::freeGeneratedCode(code);
|
||||
}
|
||||
|
||||
extern "C"
|
||||
LLVMMCJITMemoryManagerRef
|
||||
lp_get_default_memory_manager()
|
||||
{
|
||||
BaseMemoryManager *mm;
|
||||
#if HAVE_LLVM < 0x0306
|
||||
mm = llvm::JITMemoryManager::CreateDefaultMemManager();
|
||||
#else
|
||||
mm = new llvm::SectionMemoryManager();
|
||||
#endif
|
||||
return reinterpret_cast<LLVMMCJITMemoryManagerRef>(mm);
|
||||
}
|
||||
|
||||
extern "C"
|
||||
void
|
||||
lp_free_memory_manager(LLVMMCJITMemoryManagerRef memorymgr)
|
||||
{
|
||||
delete reinterpret_cast<BaseMemoryManager*>(memorymgr);
|
||||
}
|
||||
|
@@ -54,7 +54,6 @@ extern int
|
||||
lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
||||
struct lp_generated_code **OutCode,
|
||||
LLVMModuleRef M,
|
||||
LLVMMCJITMemoryManagerRef MM,
|
||||
unsigned OptLevel,
|
||||
int useMCJIT,
|
||||
char **OutError);
|
||||
@@ -62,11 +61,6 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
||||
extern void
|
||||
lp_free_generated_code(struct lp_generated_code *code);
|
||||
|
||||
extern LLVMMCJITMemoryManagerRef
|
||||
lp_get_default_memory_manager();
|
||||
|
||||
extern void
|
||||
lp_free_memory_manager(LLVMMCJITMemoryManagerRef memorymgr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -1313,7 +1313,10 @@ lp_build_mipmap_level_sizes(struct lp_build_sample_context *bld,
|
||||
bld->row_stride_array,
|
||||
ilevel);
|
||||
}
|
||||
if (dims == 3 || has_layer_coord(bld->static_texture_state->target)) {
|
||||
if (dims == 3 ||
|
||||
bld->static_texture_state->target == PIPE_TEXTURE_CUBE ||
|
||||
bld->static_texture_state->target == PIPE_TEXTURE_1D_ARRAY ||
|
||||
bld->static_texture_state->target == PIPE_TEXTURE_2D_ARRAY) {
|
||||
*img_stride_vec = lp_build_get_level_stride_vec(bld,
|
||||
bld->img_stride_array,
|
||||
ilevel);
|
||||
|
@@ -356,7 +356,9 @@ texture_dims(enum pipe_texture_target tex)
|
||||
case PIPE_TEXTURE_2D_ARRAY:
|
||||
case PIPE_TEXTURE_RECT:
|
||||
case PIPE_TEXTURE_CUBE:
|
||||
return 2;
|
||||
case PIPE_TEXTURE_CUBE_ARRAY:
|
||||
assert(0);
|
||||
return 2;
|
||||
case PIPE_TEXTURE_3D:
|
||||
return 3;
|
||||
@@ -366,21 +368,6 @@ texture_dims(enum pipe_texture_target tex)
|
||||
}
|
||||
}
|
||||
|
||||
static INLINE boolean
|
||||
has_layer_coord(enum pipe_texture_target tex)
|
||||
{
|
||||
switch (tex) {
|
||||
case PIPE_TEXTURE_1D_ARRAY:
|
||||
case PIPE_TEXTURE_2D_ARRAY:
|
||||
/* cube is not layered but 3rd coord (after cube mapping) behaves the same */
|
||||
case PIPE_TEXTURE_CUBE:
|
||||
case PIPE_TEXTURE_CUBE_ARRAY:
|
||||
return TRUE;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
boolean
|
||||
lp_sampler_wrap_mode_uses_border_color(unsigned mode,
|
||||
|
@@ -704,7 +704,9 @@ lp_build_sample_image_nearest(struct lp_build_sample_context *bld,
|
||||
offset = lp_build_add(&bld->int_coord_bld, offset, z_offset);
|
||||
}
|
||||
}
|
||||
if (has_layer_coord(bld->static_texture_state->target)) {
|
||||
if (bld->static_texture_state->target == PIPE_TEXTURE_CUBE ||
|
||||
bld->static_texture_state->target == PIPE_TEXTURE_1D_ARRAY ||
|
||||
bld->static_texture_state->target == PIPE_TEXTURE_2D_ARRAY) {
|
||||
LLVMValueRef z_offset;
|
||||
/* The r coord is the cube face in [0,5] or array layer */
|
||||
z_offset = lp_build_mul(&bld->int_coord_bld, r, img_stride_vec);
|
||||
@@ -779,7 +781,9 @@ lp_build_sample_image_nearest_afloat(struct lp_build_sample_context *bld,
|
||||
&z_icoord);
|
||||
}
|
||||
}
|
||||
if (has_layer_coord(bld->static_texture_state->target)) {
|
||||
if (bld->static_texture_state->target == PIPE_TEXTURE_CUBE ||
|
||||
bld->static_texture_state->target == PIPE_TEXTURE_1D_ARRAY ||
|
||||
bld->static_texture_state->target == PIPE_TEXTURE_2D_ARRAY) {
|
||||
z_icoord = r;
|
||||
}
|
||||
|
||||
@@ -1126,7 +1130,9 @@ lp_build_sample_image_linear(struct lp_build_sample_context *bld,
|
||||
&x_subcoord[0], &x_subcoord[1]);
|
||||
|
||||
/* add potential cube/array/mip offsets now as they are constant per pixel */
|
||||
if (has_layer_coord(bld->static_texture_state->target)) {
|
||||
if (bld->static_texture_state->target == PIPE_TEXTURE_CUBE ||
|
||||
bld->static_texture_state->target == PIPE_TEXTURE_1D_ARRAY ||
|
||||
bld->static_texture_state->target == PIPE_TEXTURE_2D_ARRAY) {
|
||||
LLVMValueRef z_offset;
|
||||
z_offset = lp_build_mul(&bld->int_coord_bld, r, img_stride_vec);
|
||||
/* The r coord is the cube face in [0,5] or array layer */
|
||||
@@ -1295,7 +1301,9 @@ lp_build_sample_image_linear_afloat(struct lp_build_sample_context *bld,
|
||||
&x_offset1, &x_subcoord[1]);
|
||||
|
||||
/* add potential cube/array/mip offsets now as they are constant per pixel */
|
||||
if (has_layer_coord(bld->static_texture_state->target)) {
|
||||
if (bld->static_texture_state->target == PIPE_TEXTURE_CUBE ||
|
||||
bld->static_texture_state->target == PIPE_TEXTURE_1D_ARRAY ||
|
||||
bld->static_texture_state->target == PIPE_TEXTURE_2D_ARRAY) {
|
||||
LLVMValueRef z_offset;
|
||||
z_offset = lp_build_mul(&bld->int_coord_bld, r, img_stride_vec);
|
||||
/* The r coord is the cube face in [0,5] or array layer */
|
||||
|
@@ -752,14 +752,10 @@ lp_build_sample_image_nearest(struct lp_build_sample_context *bld,
|
||||
lp_build_name(z, "tex.z.wrapped");
|
||||
}
|
||||
}
|
||||
if (has_layer_coord(bld->static_texture_state->target)) {
|
||||
if (bld->static_texture_state->target == PIPE_TEXTURE_CUBE_ARRAY) {
|
||||
/* add cube layer to face */
|
||||
z = lp_build_add(&bld->int_coord_bld, coords[2], coords[3]);
|
||||
}
|
||||
else {
|
||||
z = coords[2];
|
||||
}
|
||||
if (bld->static_texture_state->target == PIPE_TEXTURE_CUBE ||
|
||||
bld->static_texture_state->target == PIPE_TEXTURE_1D_ARRAY ||
|
||||
bld->static_texture_state->target == PIPE_TEXTURE_2D_ARRAY) {
|
||||
z = coords[2];
|
||||
lp_build_name(z, "tex.z.layer");
|
||||
}
|
||||
|
||||
@@ -872,8 +868,7 @@ lp_build_sample_image_linear(struct lp_build_sample_context *bld,
|
||||
int chan, texel_index;
|
||||
boolean seamless_cube_filter, accurate_cube_corners;
|
||||
|
||||
seamless_cube_filter = (bld->static_texture_state->target == PIPE_TEXTURE_CUBE ||
|
||||
bld->static_texture_state->target == PIPE_TEXTURE_CUBE_ARRAY) &&
|
||||
seamless_cube_filter = bld->static_texture_state->target == PIPE_TEXTURE_CUBE &&
|
||||
bld->static_sampler_state->seamless_cube_map;
|
||||
accurate_cube_corners = ACCURATE_CUBE_CORNERS && seamless_cube_filter;
|
||||
|
||||
@@ -928,15 +923,10 @@ lp_build_sample_image_linear(struct lp_build_sample_context *bld,
|
||||
lp_build_name(z1, "tex.z1.wrapped");
|
||||
}
|
||||
}
|
||||
if (has_layer_coord(bld->static_texture_state->target)) {
|
||||
if (bld->static_texture_state->target == PIPE_TEXTURE_CUBE_ARRAY) {
|
||||
/* add cube layer to face */
|
||||
z00 = z01 = z10 = z11 = z1 =
|
||||
lp_build_add(&bld->int_coord_bld, coords[2], coords[3]);
|
||||
}
|
||||
else {
|
||||
z00 = z01 = z10 = z11 = z1 = coords[2]; /* cube face or layer */
|
||||
}
|
||||
if (bld->static_texture_state->target == PIPE_TEXTURE_CUBE ||
|
||||
bld->static_texture_state->target == PIPE_TEXTURE_1D_ARRAY ||
|
||||
bld->static_texture_state->target == PIPE_TEXTURE_2D_ARRAY) {
|
||||
z00 = z01 = z10 = z11 = z1 = coords[2]; /* cube face or layer */
|
||||
lp_build_name(z00, "tex.z0.layer");
|
||||
lp_build_name(z1, "tex.z1.layer");
|
||||
}
|
||||
@@ -1057,14 +1047,6 @@ lp_build_sample_image_linear(struct lp_build_sample_context *bld,
|
||||
z10 = lp_build_select(ivec_bld, fall_off_yp_notxm, new_faces[3], z10);
|
||||
z11 = lp_build_select(ivec_bld, fall_off_yp_notxp, new_faces[3], z11);
|
||||
|
||||
if (bld->static_texture_state->target == PIPE_TEXTURE_CUBE_ARRAY) {
|
||||
/* now can add cube layer to face (per sample) */
|
||||
z00 = lp_build_add(ivec_bld, z00, coords[3]);
|
||||
z01 = lp_build_add(ivec_bld, z01, coords[3]);
|
||||
z10 = lp_build_add(ivec_bld, z10, coords[3]);
|
||||
z11 = lp_build_add(ivec_bld, z11, coords[3]);
|
||||
}
|
||||
|
||||
LLVMBuildStore(builder, x00, xs[0]);
|
||||
LLVMBuildStore(builder, x01, xs[1]);
|
||||
LLVMBuildStore(builder, x10, xs[2]);
|
||||
@@ -1088,19 +1070,10 @@ lp_build_sample_image_linear(struct lp_build_sample_context *bld,
|
||||
LLVMBuildStore(builder, y0, ys[1]);
|
||||
LLVMBuildStore(builder, y1, ys[2]);
|
||||
LLVMBuildStore(builder, y1, ys[3]);
|
||||
if (bld->static_texture_state->target == PIPE_TEXTURE_CUBE_ARRAY) {
|
||||
LLVMValueRef cube_layer = lp_build_add(ivec_bld, face, coords[3]);
|
||||
LLVMBuildStore(builder, cube_layer, zs[0]);
|
||||
LLVMBuildStore(builder, cube_layer, zs[1]);
|
||||
LLVMBuildStore(builder, cube_layer, zs[2]);
|
||||
LLVMBuildStore(builder, cube_layer, zs[3]);
|
||||
}
|
||||
else {
|
||||
LLVMBuildStore(builder, face, zs[0]);
|
||||
LLVMBuildStore(builder, face, zs[1]);
|
||||
LLVMBuildStore(builder, face, zs[2]);
|
||||
LLVMBuildStore(builder, face, zs[3]);
|
||||
}
|
||||
LLVMBuildStore(builder, face, zs[0]);
|
||||
LLVMBuildStore(builder, face, zs[1]);
|
||||
LLVMBuildStore(builder, face, zs[2]);
|
||||
LLVMBuildStore(builder, face, zs[3]);
|
||||
|
||||
lp_build_endif(&edge_if);
|
||||
|
||||
@@ -1671,7 +1644,6 @@ lp_build_sample_mipmap_both(struct lp_build_sample_context *bld,
|
||||
static LLVMValueRef
|
||||
lp_build_layer_coord(struct lp_build_sample_context *bld,
|
||||
unsigned texture_unit,
|
||||
boolean is_cube_array,
|
||||
LLVMValueRef layer,
|
||||
LLVMValueRef *out_of_bounds)
|
||||
{
|
||||
@@ -1683,7 +1655,6 @@ lp_build_layer_coord(struct lp_build_sample_context *bld,
|
||||
|
||||
if (out_of_bounds) {
|
||||
LLVMValueRef out1, out;
|
||||
assert(!is_cube_array);
|
||||
num_layers = lp_build_broadcast_scalar(int_coord_bld, num_layers);
|
||||
out = lp_build_cmp(int_coord_bld, PIPE_FUNC_LESS, layer, int_coord_bld->zero);
|
||||
out1 = lp_build_cmp(int_coord_bld, PIPE_FUNC_GEQUAL, layer, num_layers);
|
||||
@@ -1692,9 +1663,7 @@ lp_build_layer_coord(struct lp_build_sample_context *bld,
|
||||
}
|
||||
else {
|
||||
LLVMValueRef maxlayer;
|
||||
LLVMValueRef s = is_cube_array ? lp_build_const_int32(bld->gallivm, 6) :
|
||||
bld->int_bld.one;
|
||||
maxlayer = lp_build_sub(&bld->int_bld, num_layers, s);
|
||||
maxlayer = lp_build_sub(&bld->int_bld, num_layers, bld->int_bld.one);
|
||||
maxlayer = lp_build_broadcast_scalar(int_coord_bld, maxlayer);
|
||||
return lp_build_clamp(int_coord_bld, layer, int_coord_bld->zero, maxlayer);
|
||||
}
|
||||
@@ -1734,7 +1703,7 @@ lp_build_sample_common(struct lp_build_sample_context *bld,
|
||||
* Choose cube face, recompute texcoords for the chosen face and
|
||||
* compute rho here too (as it requires transform of derivatives).
|
||||
*/
|
||||
if (target == PIPE_TEXTURE_CUBE || target == PIPE_TEXTURE_CUBE_ARRAY) {
|
||||
if (target == PIPE_TEXTURE_CUBE) {
|
||||
boolean need_derivs;
|
||||
need_derivs = ((min_filter != mag_filter ||
|
||||
mip_filter != PIPE_TEX_MIPFILTER_NONE) &&
|
||||
@@ -1742,19 +1711,11 @@ lp_build_sample_common(struct lp_build_sample_context *bld,
|
||||
!explicit_lod);
|
||||
lp_build_cube_lookup(bld, coords, derivs, &cube_rho, &cube_derivs, need_derivs);
|
||||
derivs = &cube_derivs;
|
||||
if (target == PIPE_TEXTURE_CUBE_ARRAY) {
|
||||
/* calculate cube layer coord now */
|
||||
LLVMValueRef layer = lp_build_iround(&bld->coord_bld, coords[3]);
|
||||
LLVMValueRef six = lp_build_const_int_vec(bld->gallivm, bld->int_coord_type, 6);
|
||||
layer = lp_build_mul(&bld->int_coord_bld, layer, six);
|
||||
coords[3] = lp_build_layer_coord(bld, texture_index, TRUE, layer, NULL);
|
||||
/* because of seamless filtering can't add it to face (coords[2]) here. */
|
||||
}
|
||||
}
|
||||
else if (target == PIPE_TEXTURE_1D_ARRAY ||
|
||||
target == PIPE_TEXTURE_2D_ARRAY) {
|
||||
coords[2] = lp_build_iround(&bld->coord_bld, coords[2]);
|
||||
coords[2] = lp_build_layer_coord(bld, texture_index, FALSE, coords[2], NULL);
|
||||
coords[2] = lp_build_layer_coord(bld, texture_index, coords[2], NULL);
|
||||
}
|
||||
|
||||
if (bld->static_sampler_state->compare_mode != PIPE_TEX_COMPARE_NONE) {
|
||||
@@ -2262,11 +2223,11 @@ lp_build_fetch_texel(struct lp_build_sample_context *bld,
|
||||
if (target == PIPE_TEXTURE_1D_ARRAY ||
|
||||
target == PIPE_TEXTURE_2D_ARRAY) {
|
||||
if (out_of_bound_ret_zero) {
|
||||
z = lp_build_layer_coord(bld, texture_unit, FALSE, z, &out1);
|
||||
z = lp_build_layer_coord(bld, texture_unit, z, &out1);
|
||||
out_of_bounds = lp_build_or(int_coord_bld, out_of_bounds, out1);
|
||||
}
|
||||
else {
|
||||
z = lp_build_layer_coord(bld, texture_unit, FALSE, z, NULL);
|
||||
z = lp_build_layer_coord(bld, texture_unit, z, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2502,8 +2463,7 @@ lp_build_sample_soa(struct gallivm_state *gallivm,
|
||||
|
||||
if ((gallivm_debug & GALLIVM_DEBUG_NO_QUAD_LOD) &&
|
||||
(gallivm_debug & GALLIVM_DEBUG_NO_RHO_APPROX) &&
|
||||
(static_texture_state->target == PIPE_TEXTURE_CUBE ||
|
||||
static_texture_state->target == PIPE_TEXTURE_CUBE_ARRAY) &&
|
||||
(static_texture_state->target == PIPE_TEXTURE_CUBE) &&
|
||||
(!is_fetch && mip_filter != PIPE_TEX_MIPFILTER_NONE)) {
|
||||
/*
|
||||
* special case for using per-pixel lod even for implicit lod,
|
||||
@@ -2641,8 +2601,7 @@ lp_build_sample_soa(struct gallivm_state *gallivm,
|
||||
use_aos &= lp_is_simple_wrap_mode(derived_sampler_state.wrap_r);
|
||||
}
|
||||
}
|
||||
if ((static_texture_state->target == PIPE_TEXTURE_CUBE ||
|
||||
static_texture_state->target == PIPE_TEXTURE_CUBE_ARRAY) &&
|
||||
if (static_texture_state->target == PIPE_TEXTURE_CUBE &&
|
||||
derived_sampler_state.seamless_cube_map &&
|
||||
(derived_sampler_state.min_img_filter == PIPE_TEX_FILTER_LINEAR ||
|
||||
derived_sampler_state.mag_img_filter == PIPE_TEX_FILTER_LINEAR)) {
|
||||
@@ -2672,13 +2631,6 @@ lp_build_sample_soa(struct gallivm_state *gallivm,
|
||||
&lod_positive, &lod_fpart,
|
||||
&ilevel0, &ilevel1);
|
||||
|
||||
if (use_aos && static_texture_state->target == PIPE_TEXTURE_CUBE_ARRAY) {
|
||||
/* The aos path doesn't do seamless filtering so simply add cube layer
|
||||
* to face now.
|
||||
*/
|
||||
newcoords[2] = lp_build_add(&bld.int_coord_bld, newcoords[2], newcoords[3]);
|
||||
}
|
||||
|
||||
/*
|
||||
* we only try 8-wide sampling with soa as it appears to
|
||||
* be a loss with aos with AVX (but it should work, except
|
||||
@@ -2743,8 +2695,7 @@ lp_build_sample_soa(struct gallivm_state *gallivm,
|
||||
bld4.num_mips = bld4.num_lods = 1;
|
||||
if ((gallivm_debug & GALLIVM_DEBUG_NO_QUAD_LOD) &&
|
||||
(gallivm_debug & GALLIVM_DEBUG_NO_RHO_APPROX) &&
|
||||
(static_texture_state->target == PIPE_TEXTURE_CUBE ||
|
||||
static_texture_state->target == PIPE_TEXTURE_CUBE_ARRAY) &&
|
||||
(static_texture_state->target == PIPE_TEXTURE_CUBE) &&
|
||||
(!is_fetch && mip_filter != PIPE_TEX_MIPFILTER_NONE)) {
|
||||
bld4.num_mips = type4.length;
|
||||
bld4.num_lods = type4.length;
|
||||
@@ -2940,7 +2891,6 @@ lp_build_size_query_soa(struct gallivm_state *gallivm,
|
||||
switch (target) {
|
||||
case PIPE_TEXTURE_1D_ARRAY:
|
||||
case PIPE_TEXTURE_2D_ARRAY:
|
||||
case PIPE_TEXTURE_CUBE_ARRAY:
|
||||
has_array = TRUE;
|
||||
break;
|
||||
default:
|
||||
@@ -2982,20 +2932,10 @@ lp_build_size_query_soa(struct gallivm_state *gallivm,
|
||||
|
||||
size = lp_build_minify(&bld_int_vec4, size, lod, TRUE);
|
||||
|
||||
if (has_array) {
|
||||
LLVMValueRef layers = dynamic_state->depth(dynamic_state, gallivm, texture_unit);
|
||||
if (target == PIPE_TEXTURE_CUBE_ARRAY) {
|
||||
/*
|
||||
* It looks like GL wants number of cubes, d3d10.1 has it undefined?
|
||||
* Could avoid this by passing in number of cubes instead of total
|
||||
* number of layers (might make things easier elsewhere too).
|
||||
*/
|
||||
LLVMValueRef six = lp_build_const_int32(gallivm, 6);
|
||||
layers = LLVMBuildSDiv(gallivm->builder, layers, six, "");
|
||||
}
|
||||
size = LLVMBuildInsertElement(gallivm->builder, size, layers,
|
||||
if (has_array)
|
||||
size = LLVMBuildInsertElement(gallivm->builder, size,
|
||||
dynamic_state->depth(dynamic_state, gallivm, texture_unit),
|
||||
lp_build_const_int32(gallivm, dims), "");
|
||||
}
|
||||
|
||||
/*
|
||||
* d3d10 requires zero for x/y/z values (but not w, i.e. mip levels)
|
||||
|
@@ -126,12 +126,6 @@ struct lp_tgsi_info
|
||||
*/
|
||||
unsigned indirect_textures:1;
|
||||
|
||||
/*
|
||||
* Whether any of the texture (sample) ocpodes use different sampler
|
||||
* and sampler view unit.
|
||||
*/
|
||||
unsigned sampler_texture_units_different:1;
|
||||
|
||||
/*
|
||||
* Whether any immediate values are outside the range of 0 and 1
|
||||
*/
|
||||
@@ -544,8 +538,6 @@ struct lp_build_tgsi_aos_context
|
||||
|
||||
struct lp_build_sampler_aos *sampler;
|
||||
|
||||
struct tgsi_declaration_sampler_view sv[PIPE_MAX_SHADER_SAMPLER_VIEWS];
|
||||
|
||||
LLVMValueRef immediates[LP_MAX_INLINED_IMMEDIATES];
|
||||
LLVMValueRef temps[LP_MAX_INLINED_TEMPS];
|
||||
LLVMValueRef addr[LP_MAX_TGSI_ADDRS];
|
||||
|
@@ -391,37 +391,6 @@ emit_tex(struct lp_build_tgsi_aos_context *bld,
|
||||
}
|
||||
|
||||
|
||||
static LLVMValueRef
|
||||
emit_sample(struct lp_build_tgsi_aos_context *bld,
|
||||
const struct tgsi_full_instruction *inst,
|
||||
enum lp_build_tex_modifier modifier)
|
||||
{
|
||||
unsigned target;
|
||||
unsigned unit;
|
||||
LLVMValueRef coords;
|
||||
struct lp_derivatives derivs = { {NULL}, {NULL} };
|
||||
|
||||
if (!bld->sampler) {
|
||||
_debug_printf("warning: found texture instruction but no sampler generator supplied\n");
|
||||
return bld->bld_base.base.undef;
|
||||
}
|
||||
|
||||
coords = lp_build_emit_fetch( &bld->bld_base, inst, 0 , LP_CHAN_ALL);
|
||||
|
||||
/* ignore modifiers, can't handle different sampler / sampler view, etc... */
|
||||
unit = inst->Src[1].Register.Index;
|
||||
assert(inst->Src[2].Register.Index == unit);
|
||||
|
||||
target = bld->sv[unit].Resource;
|
||||
|
||||
return bld->sampler->emit_fetch_texel(bld->sampler,
|
||||
&bld->bld_base.base,
|
||||
target, unit,
|
||||
coords, derivs,
|
||||
modifier);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
lp_emit_declaration_aos(
|
||||
struct lp_build_tgsi_aos_context *bld,
|
||||
@@ -461,17 +430,6 @@ lp_emit_declaration_aos(
|
||||
bld->preds[idx] = lp_build_alloca(gallivm, vec_type, "");
|
||||
break;
|
||||
|
||||
case TGSI_FILE_SAMPLER_VIEW:
|
||||
/*
|
||||
* The target stored here MUST match whatever there actually
|
||||
* is in the set sampler views (what about return type?).
|
||||
*/
|
||||
assert(last < PIPE_MAX_SHADER_SAMPLER_VIEWS);
|
||||
for (idx = first; idx <= last; ++idx) {
|
||||
bld->sv[idx] = decl->SamplerView;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
/* don't need to declare other vars */
|
||||
break;
|
||||
@@ -824,8 +782,7 @@ lp_emit_instruction_aos(
|
||||
return FALSE;
|
||||
|
||||
case TGSI_OPCODE_RET:
|
||||
/* safe to ignore at end */
|
||||
break;
|
||||
return FALSE;
|
||||
|
||||
case TGSI_OPCODE_END:
|
||||
*pc = -1;
|
||||
@@ -858,6 +815,7 @@ lp_emit_instruction_aos(
|
||||
return FALSE;
|
||||
|
||||
case TGSI_OPCODE_DIV:
|
||||
/* deprecated */
|
||||
assert(0);
|
||||
return FALSE;
|
||||
break;
|
||||
@@ -916,11 +874,13 @@ lp_emit_instruction_aos(
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_I2F:
|
||||
/* deprecated? */
|
||||
assert(0);
|
||||
return FALSE;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_NOT:
|
||||
/* deprecated? */
|
||||
assert(0);
|
||||
return FALSE;
|
||||
break;
|
||||
@@ -931,46 +891,55 @@ lp_emit_instruction_aos(
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_SHL:
|
||||
/* deprecated? */
|
||||
assert(0);
|
||||
return FALSE;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_ISHR:
|
||||
/* deprecated? */
|
||||
assert(0);
|
||||
return FALSE;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_AND:
|
||||
/* deprecated? */
|
||||
assert(0);
|
||||
return FALSE;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_OR:
|
||||
/* deprecated? */
|
||||
assert(0);
|
||||
return FALSE;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_MOD:
|
||||
/* deprecated? */
|
||||
assert(0);
|
||||
return FALSE;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_XOR:
|
||||
/* deprecated? */
|
||||
assert(0);
|
||||
return FALSE;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_SAD:
|
||||
/* deprecated? */
|
||||
assert(0);
|
||||
return FALSE;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_TXF:
|
||||
/* deprecated? */
|
||||
assert(0);
|
||||
return FALSE;
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_TXQ:
|
||||
/* deprecated? */
|
||||
assert(0);
|
||||
return FALSE;
|
||||
break;
|
||||
@@ -989,10 +958,6 @@ lp_emit_instruction_aos(
|
||||
case TGSI_OPCODE_NOP:
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_SAMPLE:
|
||||
dst0 = emit_sample(bld, inst, LP_BLD_TEX_MODIFIER_NONE);
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
@@ -48,7 +48,6 @@ struct analysis_context
|
||||
|
||||
unsigned num_imms;
|
||||
float imm[LP_MAX_TGSI_IMMEDIATES][4];
|
||||
unsigned sample_target[PIPE_MAX_SHADER_SAMPLER_VIEWS];
|
||||
|
||||
struct lp_tgsi_channel_info temp[32][4];
|
||||
};
|
||||
@@ -130,29 +129,29 @@ analyse_tex(struct analysis_context *ctx,
|
||||
case TGSI_TEXTURE_SHADOW2D:
|
||||
case TGSI_TEXTURE_SHADOWRECT:
|
||||
case TGSI_TEXTURE_2D_ARRAY:
|
||||
case TGSI_TEXTURE_2D_MSAA:
|
||||
case TGSI_TEXTURE_3D:
|
||||
case TGSI_TEXTURE_CUBE:
|
||||
readmask = TGSI_WRITEMASK_XYZ;
|
||||
break;
|
||||
case TGSI_TEXTURE_SHADOW2D_ARRAY:
|
||||
case TGSI_TEXTURE_SHADOWCUBE:
|
||||
case TGSI_TEXTURE_2D_ARRAY_MSAA:
|
||||
readmask = TGSI_WRITEMASK_XYZW;
|
||||
break;
|
||||
case TGSI_TEXTURE_CUBE_ARRAY:
|
||||
readmask = TGSI_WRITEMASK_XYZW;
|
||||
/* modifier would be in another not analyzed reg so just say indirect */
|
||||
if (modifier != LP_BLD_TEX_MODIFIER_NONE) {
|
||||
indirect = TRUE;
|
||||
}
|
||||
break;
|
||||
case TGSI_TEXTURE_SHADOWCUBE_ARRAY:
|
||||
readmask = TGSI_WRITEMASK_XYZW;
|
||||
indirect = TRUE;
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
return;
|
||||
}
|
||||
/* XXX
|
||||
* For cube map arrays, this will not analyze lod or shadow argument.
|
||||
* For shadow cube, this will not analyze lod bias argument.
|
||||
* "Indirect" really has no meaning for such textures anyway though.
|
||||
*/
|
||||
|
||||
if (modifier == LP_BLD_TEX_MODIFIER_EXPLICIT_DERIV) {
|
||||
/* We don't track explicit derivatives, although we could */
|
||||
@@ -208,45 +207,20 @@ analyse_sample(struct analysis_context *ctx,
|
||||
|
||||
if (info->num_texs < Elements(info->tex)) {
|
||||
struct lp_tgsi_texture_info *tex_info = &info->tex[info->num_texs];
|
||||
unsigned target = ctx->sample_target[inst->Src[1].Register.Index];
|
||||
boolean indirect = FALSE;
|
||||
boolean shadow = FALSE;
|
||||
unsigned readmask;
|
||||
|
||||
switch (target) {
|
||||
/* note no shadow targets here */
|
||||
case TGSI_TEXTURE_BUFFER:
|
||||
case TGSI_TEXTURE_1D:
|
||||
readmask = TGSI_WRITEMASK_X;
|
||||
break;
|
||||
case TGSI_TEXTURE_1D_ARRAY:
|
||||
case TGSI_TEXTURE_2D:
|
||||
case TGSI_TEXTURE_RECT:
|
||||
readmask = TGSI_WRITEMASK_XY;
|
||||
break;
|
||||
case TGSI_TEXTURE_2D_ARRAY:
|
||||
case TGSI_TEXTURE_2D_MSAA:
|
||||
case TGSI_TEXTURE_3D:
|
||||
case TGSI_TEXTURE_CUBE:
|
||||
readmask = TGSI_WRITEMASK_XYZ;
|
||||
break;
|
||||
case TGSI_TEXTURE_CUBE_ARRAY:
|
||||
case TGSI_TEXTURE_2D_ARRAY_MSAA:
|
||||
readmask = TGSI_WRITEMASK_XYZW;
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* We don't really get much information here, in particular not
|
||||
* the target info, hence no useful writemask neither. Maybe should just
|
||||
* forget the whole function.
|
||||
*/
|
||||
readmask = TGSI_WRITEMASK_XYZW;
|
||||
|
||||
tex_info->target = target;
|
||||
tex_info->texture_unit = inst->Src[1].Register.Index;
|
||||
tex_info->sampler_unit = inst->Src[2].Register.Index;
|
||||
|
||||
if (tex_info->texture_unit != tex_info->sampler_unit) {
|
||||
info->sampler_texture_units_different = TRUE;
|
||||
}
|
||||
|
||||
if (modifier == LP_BLD_TEX_MODIFIER_EXPLICIT_DERIV ||
|
||||
modifier == LP_BLD_TEX_MODIFIER_EXPLICIT_LOD ||
|
||||
modifier == LP_BLD_TEX_MODIFIER_LOD_BIAS || shadow) {
|
||||
@@ -550,14 +524,7 @@ lp_build_tgsi_info(const struct tgsi_token *tokens,
|
||||
tgsi_parse_token(&parse);
|
||||
|
||||
switch (parse.FullToken.Token.Type) {
|
||||
case TGSI_TOKEN_TYPE_DECLARATION: {
|
||||
struct tgsi_full_declaration *decl = &parse.FullToken.FullDeclaration;
|
||||
if (decl->Declaration.File == TGSI_FILE_SAMPLER_VIEW) {
|
||||
for (index = decl->Range.First; index <= decl->Range.Last; index++) {
|
||||
ctx->sample_target[index] = decl->SamplerView.Resource;
|
||||
}
|
||||
}
|
||||
}
|
||||
case TGSI_TOKEN_TYPE_DECLARATION:
|
||||
break;
|
||||
|
||||
case TGSI_TOKEN_TYPE_INSTRUCTION:
|
||||
|
@@ -2333,7 +2333,7 @@ emit_fetch_texels( struct lp_build_tgsi_soa_context *bld,
|
||||
unsigned unit, target;
|
||||
LLVMValueRef coord_undef = LLVMGetUndef(bld->bld_base.base.int_vec_type);
|
||||
LLVMValueRef explicit_lod = NULL;
|
||||
LLVMValueRef coords[5];
|
||||
LLVMValueRef coords[3];
|
||||
LLVMValueRef offsets[3] = { NULL };
|
||||
enum lp_sampler_lod_property lod_property = LP_SAMPLER_LOD_SCALAR;
|
||||
unsigned dims, i;
|
||||
@@ -2395,8 +2395,7 @@ emit_fetch_texels( struct lp_build_tgsi_soa_context *bld,
|
||||
for (i = 0; i < dims; i++) {
|
||||
coords[i] = lp_build_emit_fetch(&bld->bld_base, inst, 0, i);
|
||||
}
|
||||
/* never use more than 3 coords here but emit_fetch_texel copies all 5 anyway */
|
||||
for (i = dims; i < 5; i++) {
|
||||
for (i = dims; i < 3; i++) {
|
||||
coords[i] = coord_undef;
|
||||
}
|
||||
if (layer_coord)
|
||||
@@ -3855,8 +3854,8 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm,
|
||||
* were forgetting so we're using MAX_VERTEX_VARYING from
|
||||
* that spec even though we could debug_assert if it's not
|
||||
* set, but that's a lot uglier. */
|
||||
uint max_output_vertices;
|
||||
|
||||
uint max_output_vertices = 32;
|
||||
uint i = 0;
|
||||
/* inputs are always indirect with gs */
|
||||
bld.indirect_files |= (1 << TGSI_FILE_INPUT);
|
||||
bld.gs_iface = gs_iface;
|
||||
@@ -3864,11 +3863,12 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm,
|
||||
bld.bld_base.op_actions[TGSI_OPCODE_EMIT].emit = emit_vertex;
|
||||
bld.bld_base.op_actions[TGSI_OPCODE_ENDPRIM].emit = end_primitive;
|
||||
|
||||
max_output_vertices =
|
||||
info->properties[TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES];
|
||||
if (!max_output_vertices)
|
||||
max_output_vertices = 32;
|
||||
|
||||
for (i = 0; i < info->num_properties; ++i) {
|
||||
if (info->properties[i].name ==
|
||||
TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES) {
|
||||
max_output_vertices = info->properties[i].data[0];
|
||||
}
|
||||
}
|
||||
bld.max_output_vertices_vec =
|
||||
lp_build_const_int_vec(gallivm, bld.bld_base.int_bld.type,
|
||||
max_output_vertices);
|
||||
|
@@ -44,7 +44,6 @@
|
||||
#include "util/u_inlines.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "util/u_math.h"
|
||||
#include "util/u_sampler.h"
|
||||
#include "util/u_simple_shaders.h"
|
||||
#include "util/u_string.h"
|
||||
#include "util/u_upload_mgr.h"
|
||||
@@ -1051,8 +1050,12 @@ hud_create(struct pipe_context *pipe, struct cso_context *cso)
|
||||
}
|
||||
|
||||
/* sampler view */
|
||||
u_sampler_view_default_template(
|
||||
&view_templ, hud->font.texture, hud->font.texture->format);
|
||||
memset(&view_templ, 0, sizeof(view_templ));
|
||||
view_templ.format = hud->font.texture->format;
|
||||
view_templ.swizzle_r = PIPE_SWIZZLE_RED;
|
||||
view_templ.swizzle_g = PIPE_SWIZZLE_GREEN;
|
||||
view_templ.swizzle_b = PIPE_SWIZZLE_BLUE;
|
||||
view_templ.swizzle_a = PIPE_SWIZZLE_ALPHA;
|
||||
hud->font_sampler_view = pipe->create_sampler_view(pipe, hud->font.texture,
|
||||
&view_templ);
|
||||
|
||||
|
@@ -45,7 +45,6 @@
|
||||
#include "util/u_draw.h"
|
||||
#include "util/u_inlines.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "util/u_upload_mgr.h"
|
||||
|
||||
#include "indices/u_indices.h"
|
||||
#include "indices/u_primconvert.h"
|
||||
@@ -56,7 +55,7 @@ struct primconvert_context
|
||||
struct pipe_index_buffer saved_ib;
|
||||
uint32_t primtypes_mask;
|
||||
unsigned api_pv;
|
||||
struct u_upload_mgr *upload;
|
||||
// TODO we could cache/recycle the indexbuf created to translate prims..
|
||||
};
|
||||
|
||||
|
||||
@@ -113,10 +112,10 @@ util_primconvert_draw_vbo(struct primconvert_context *pc,
|
||||
struct pipe_index_buffer *ib = &pc->saved_ib;
|
||||
struct pipe_index_buffer new_ib;
|
||||
struct pipe_draw_info new_info;
|
||||
struct pipe_transfer *src_transfer = NULL;
|
||||
struct pipe_transfer *src_transfer = NULL, *dst_transfer = NULL;
|
||||
u_translate_func trans_func;
|
||||
u_generate_func gen_func;
|
||||
const void *src = NULL;
|
||||
const void *src;
|
||||
void *dst;
|
||||
|
||||
memset(&new_ib, 0, sizeof(new_ib));
|
||||
@@ -149,12 +148,14 @@ util_primconvert_draw_vbo(struct primconvert_context *pc,
|
||||
&gen_func);
|
||||
}
|
||||
|
||||
if (!pc->upload) {
|
||||
pc->upload = u_upload_create(pc->pipe, 4096, 4, PIPE_BIND_INDEX_BUFFER);
|
||||
}
|
||||
|
||||
u_upload_alloc(pc->upload, 0, new_ib.index_size * new_info.count,
|
||||
&new_ib.offset, &new_ib.buffer, &dst);
|
||||
new_ib.buffer = pipe_buffer_create(pc->pipe->screen,
|
||||
PIPE_BIND_INDEX_BUFFER,
|
||||
PIPE_USAGE_IMMUTABLE,
|
||||
new_ib.index_size * new_info.count);
|
||||
dst =
|
||||
pipe_buffer_map(pc->pipe, new_ib.buffer, PIPE_TRANSFER_WRITE,
|
||||
&dst_transfer);
|
||||
|
||||
if (info->indexed) {
|
||||
trans_func(src, info->start, new_info.count, dst);
|
||||
@@ -166,7 +167,8 @@ util_primconvert_draw_vbo(struct primconvert_context *pc,
|
||||
if (src_transfer)
|
||||
pipe_buffer_unmap(pc->pipe, src_transfer);
|
||||
|
||||
u_upload_unmap(pc->upload);
|
||||
if (dst_transfer)
|
||||
pipe_buffer_unmap(pc->pipe, dst_transfer);
|
||||
|
||||
/* bind new index buffer: */
|
||||
pc->pipe->set_index_buffer(pc->pipe, &new_ib);
|
||||
|
@@ -47,7 +47,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_SOLARIS)
|
||||
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_CYGWIN)
|
||||
# include <unistd.h>
|
||||
#elif defined(PIPE_OS_APPLE) || defined(PIPE_OS_BSD)
|
||||
# include <sys/sysctl.h>
|
||||
@@ -111,7 +111,7 @@ os_get_option(const char *name)
|
||||
bool
|
||||
os_get_total_physical_memory(uint64_t *size)
|
||||
{
|
||||
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_SOLARIS)
|
||||
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_CYGWIN)
|
||||
const long phys_pages = sysconf(_SC_PHYS_PAGES);
|
||||
const long page_size = sysconf(_SC_PAGE_SIZE);
|
||||
|
||||
@@ -128,8 +128,6 @@ os_get_total_physical_memory(uint64_t *size)
|
||||
mib[1] = HW_PHYSMEM64;
|
||||
#elif defined(PIPE_OS_FREEBSD)
|
||||
mib[1] = HW_REALMEM;
|
||||
#elif defined(PIPE_OS_DRAGONFLY)
|
||||
mib[1] = HW_PHYSMEM;
|
||||
#else
|
||||
#error Unsupported *BSD
|
||||
#endif
|
||||
|
@@ -40,6 +40,9 @@
|
||||
#include "pipe/p_compiler.h"
|
||||
|
||||
#if defined(PIPE_OS_UNIX)
|
||||
# ifndef _FILE_OFFSET_BITS
|
||||
# error _FILE_OFFSET_BITS must be defined to 64
|
||||
# endif
|
||||
# include <sys/mman.h>
|
||||
#else
|
||||
# error Unsupported OS
|
||||
@@ -58,8 +61,7 @@ extern "C" {
|
||||
|
||||
extern void *__mmap2(void *, size_t, int, int, int, size_t);
|
||||
|
||||
static INLINE void *os_mmap(void *addr, size_t length, int prot, int flags,
|
||||
int fd, loff_t offset)
|
||||
static INLINE void *os_mmap(void *addr, size_t length, int prot, int flags, int fd, loff_t offset)
|
||||
{
|
||||
/* offset must be aligned to 4096 (not necessarily the page size) */
|
||||
if (unlikely(offset & 4095)) {
|
||||
@@ -70,27 +72,13 @@ static INLINE void *os_mmap(void *addr, size_t length, int prot, int flags,
|
||||
return __mmap2(addr, length, prot, flags, fd, (size_t) (offset >> 12));
|
||||
}
|
||||
|
||||
# define drm_munmap(addr, length) \
|
||||
munmap(addr, length)
|
||||
|
||||
#else
|
||||
/* assume large file support exists */
|
||||
# define os_mmap(addr, length, prot, flags, fd, offset) \
|
||||
mmap(addr, length, prot, flags, fd, offset)
|
||||
|
||||
static INLINE int os_munmap(void *addr, size_t length)
|
||||
{
|
||||
/* Copied from configure code generated by AC_SYS_LARGEFILE */
|
||||
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + \
|
||||
(((off_t) 1 << 31) << 31))
|
||||
STATIC_ASSERT(LARGE_OFF_T % 2147483629 == 721 &&
|
||||
LARGE_OFF_T % 2147483647 == 1);
|
||||
#undef LARGE_OFF_T
|
||||
|
||||
return munmap(addr, length);
|
||||
}
|
||||
# define os_mmap(addr, length, prot, flags, fd, offset) mmap(addr, length, prot, flags, fd, offset)
|
||||
#endif
|
||||
|
||||
#define os_munmap(addr, length) munmap(addr, length)
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -8,7 +8,10 @@ AM_CPPFLAGS = $(DEFINES) \
|
||||
-I$(top_srcdir)/src/gallium/auxiliary \
|
||||
-I$(top_srcdir)/src/gallium/winsys
|
||||
|
||||
noinst_LTLIBRARIES = libpipe_loader.la
|
||||
noinst_LTLIBRARIES =
|
||||
|
||||
if HAVE_LOADER_GALLIUM
|
||||
noinst_LTLIBRARIES += libpipe_loader.la
|
||||
noinst_LTLIBRARIES += libpipe_loader_client.la
|
||||
|
||||
COMMON_SOURCES = \
|
||||
@@ -40,3 +43,5 @@ libpipe_loader_client_la_CFLAGS = \
|
||||
libpipe_loader_client_la_SOURCES = $(COMMON_SOURCES)
|
||||
libpipe_loader_client_la_LIBADD = $(COMMON_LIBADD) \
|
||||
$(GALLIUM_PIPE_LOADER_CLIENT_LIBS)
|
||||
|
||||
endif
|
||||
|
@@ -166,17 +166,6 @@ pipe_loader_sw_probe_null(struct pipe_loader_device **devs);
|
||||
int
|
||||
pipe_loader_sw_probe(struct pipe_loader_device **devs, int ndev);
|
||||
|
||||
/**
|
||||
* Get a software device wrapped atop another device.
|
||||
*
|
||||
* This function is platform-specific.
|
||||
*
|
||||
* \sa pipe_loader_probe
|
||||
*/
|
||||
boolean
|
||||
pipe_loader_sw_probe_wrapped(struct pipe_loader_device **dev,
|
||||
struct pipe_screen *screen);
|
||||
|
||||
#ifdef HAVE_PIPE_LOADER_DRM
|
||||
|
||||
/**
|
||||
|
@@ -33,7 +33,6 @@
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <xf86drm.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_PIPE_LOADER_XCB
|
||||
|
||||
@@ -64,20 +63,6 @@ struct pipe_loader_drm_device {
|
||||
|
||||
static struct pipe_loader_ops pipe_loader_drm_ops;
|
||||
|
||||
#ifdef HAVE_PIPE_LOADER_XCB
|
||||
|
||||
static xcb_screen_t *
|
||||
get_xcb_screen(xcb_screen_iterator_t iter, int screen)
|
||||
{
|
||||
for (; iter.rem; --screen, xcb_screen_next(&iter))
|
||||
if (screen == 0)
|
||||
return iter.data;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
pipe_loader_drm_x_auth(int fd)
|
||||
{
|
||||
@@ -92,9 +77,8 @@ pipe_loader_drm_x_auth(int fd)
|
||||
drm_magic_t magic;
|
||||
xcb_dri2_authenticate_cookie_t authenticate_cookie;
|
||||
xcb_dri2_authenticate_reply_t *authenticate;
|
||||
int screen;
|
||||
|
||||
xcb_conn = xcb_connect(NULL, &screen);
|
||||
xcb_conn = xcb_connect(NULL, NULL);
|
||||
|
||||
if(!xcb_conn)
|
||||
return;
|
||||
@@ -105,8 +89,7 @@ pipe_loader_drm_x_auth(int fd)
|
||||
goto disconnect;
|
||||
|
||||
s = xcb_setup_roots_iterator(xcb_setup);
|
||||
connect_cookie = xcb_dri2_connect_unchecked(xcb_conn,
|
||||
get_xcb_screen(s, screen)->root,
|
||||
connect_cookie = xcb_dri2_connect_unchecked(xcb_conn, s.data->root,
|
||||
XCB_DRI2_DRIVER_TYPE_DRI);
|
||||
connect = xcb_dri2_connect_reply(xcb_conn, connect_cookie, NULL);
|
||||
|
||||
|
@@ -31,7 +31,6 @@
|
||||
#include "util/u_dl.h"
|
||||
#include "sw/dri/dri_sw_winsys.h"
|
||||
#include "sw/null/null_sw_winsys.h"
|
||||
#include "sw/wrapper/wrapper_sw_winsys.h"
|
||||
#ifdef HAVE_PIPE_LOADER_XLIB
|
||||
/* Explicitly wrap the header to ease build without X11 headers */
|
||||
#include "sw/xlib/xlib_sw_winsys.h"
|
||||
@@ -141,28 +140,6 @@ pipe_loader_sw_probe(struct pipe_loader_device **devs, int ndev)
|
||||
return i;
|
||||
}
|
||||
|
||||
boolean
|
||||
pipe_loader_sw_probe_wrapped(struct pipe_loader_device **dev,
|
||||
struct pipe_screen *screen)
|
||||
{
|
||||
struct pipe_loader_sw_device *sdev = CALLOC_STRUCT(pipe_loader_sw_device);
|
||||
|
||||
if (!sdev)
|
||||
return false;
|
||||
|
||||
sdev->base.type = PIPE_LOADER_DEVICE_SOFTWARE;
|
||||
sdev->base.driver_name = "swrast";
|
||||
sdev->base.ops = &pipe_loader_sw_ops;
|
||||
sdev->ws = wrapper_sw_winsys_wrap_pipe_screen(screen);
|
||||
|
||||
if (!sdev->ws) {
|
||||
FREE(sdev);
|
||||
return false;
|
||||
}
|
||||
*dev = &sdev->base;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
pipe_loader_sw_release(struct pipe_loader_device **dev)
|
||||
{
|
||||
|
@@ -163,8 +163,7 @@ struct pb_manager *
|
||||
pb_cache_manager_create(struct pb_manager *provider,
|
||||
unsigned usecs,
|
||||
float size_factor,
|
||||
unsigned bypass_usage,
|
||||
uint64_t maximum_cache_size);
|
||||
unsigned bypass_usage);
|
||||
|
||||
|
||||
struct pb_fence_ops;
|
||||
|
@@ -84,7 +84,6 @@ struct pb_cache_manager
|
||||
pb_size numDelayed;
|
||||
float size_factor;
|
||||
unsigned bypass_usage;
|
||||
uint64_t cache_size, max_cache_size;
|
||||
};
|
||||
|
||||
|
||||
@@ -115,7 +114,6 @@ _pb_cache_buffer_destroy(struct pb_cache_buffer *buf)
|
||||
LIST_DEL(&buf->head);
|
||||
assert(mgr->numDelayed);
|
||||
--mgr->numDelayed;
|
||||
mgr->cache_size -= buf->base.size;
|
||||
assert(!pipe_is_referenced(&buf->base.reference));
|
||||
pb_reference(&buf->buffer, NULL);
|
||||
FREE(buf);
|
||||
@@ -160,20 +158,11 @@ pb_cache_buffer_destroy(struct pb_buffer *_buf)
|
||||
assert(!pipe_is_referenced(&buf->base.reference));
|
||||
|
||||
_pb_cache_buffer_list_check_free(mgr);
|
||||
|
||||
/* Directly release any buffer that exceeds the limit. */
|
||||
if (mgr->cache_size + buf->base.size > mgr->max_cache_size) {
|
||||
pb_reference(&buf->buffer, NULL);
|
||||
FREE(buf);
|
||||
pipe_mutex_unlock(mgr->mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
buf->start = os_time_get();
|
||||
buf->end = buf->start + mgr->usecs;
|
||||
LIST_ADDTAIL(&buf->head, &mgr->delayed);
|
||||
++mgr->numDelayed;
|
||||
mgr->cache_size += buf->base.size;
|
||||
pipe_mutex_unlock(mgr->mutex);
|
||||
}
|
||||
|
||||
@@ -325,7 +314,6 @@ pb_cache_manager_create_buffer(struct pb_manager *_mgr,
|
||||
}
|
||||
|
||||
if(buf) {
|
||||
mgr->cache_size -= buf->base.size;
|
||||
LIST_DEL(&buf->head);
|
||||
--mgr->numDelayed;
|
||||
pipe_mutex_unlock(mgr->mutex);
|
||||
@@ -412,15 +400,12 @@ pb_cache_manager_destroy(struct pb_manager *mgr)
|
||||
* the requested size as cache hits.
|
||||
* @param bypass_usage Bitmask. If (requested usage & bypass_usage) != 0,
|
||||
* buffer allocation requests are redirected to the provider.
|
||||
* @param maximum_cache_size Maximum size of all unused buffers the cache can
|
||||
* hold.
|
||||
*/
|
||||
struct pb_manager *
|
||||
pb_cache_manager_create(struct pb_manager *provider,
|
||||
unsigned usecs,
|
||||
float size_factor,
|
||||
unsigned bypass_usage,
|
||||
uint64_t maximum_cache_size)
|
||||
unsigned bypass_usage)
|
||||
{
|
||||
struct pb_cache_manager *mgr;
|
||||
|
||||
@@ -440,7 +425,6 @@ pb_cache_manager_create(struct pb_manager *provider,
|
||||
mgr->bypass_usage = bypass_usage;
|
||||
LIST_INITHEAD(&mgr->delayed);
|
||||
mgr->numDelayed = 0;
|
||||
mgr->max_cache_size = maximum_cache_size;
|
||||
pipe_mutex_init(mgr->mutex);
|
||||
|
||||
return &mgr->base;
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#endif
|
||||
|
||||
#if GALLIUM_ILO
|
||||
#include "intel/drm/intel_drm_public.h"
|
||||
#include "intel/intel_winsys.h"
|
||||
#include "ilo/ilo_public.h"
|
||||
#endif
|
||||
|
||||
@@ -408,7 +408,7 @@ static const struct drm_conf_ret share_fd_ret = {
|
||||
{true},
|
||||
};
|
||||
|
||||
static inline const struct drm_conf_ret *
|
||||
static const struct drm_conf_ret *
|
||||
configuration_query(enum drm_conf conf)
|
||||
{
|
||||
switch (conf) {
|
||||
|
@@ -91,34 +91,6 @@ drisw_create_screen(struct drisw_loader_funcs *lf)
|
||||
return screen;
|
||||
}
|
||||
#endif // DRI_TARGET
|
||||
|
||||
#if defined(NINE_TARGET)
|
||||
#include "sw/wrapper/wrapper_sw_winsys.h"
|
||||
#include "target-helpers/inline_debug_helper.h"
|
||||
|
||||
extern struct pipe_screen *ninesw_create_screen(struct pipe_screen *screen);
|
||||
|
||||
INLINE struct pipe_screen *
|
||||
ninesw_create_screen(struct pipe_screen *pscreen)
|
||||
{
|
||||
struct sw_winsys *winsys = NULL;
|
||||
struct pipe_screen *screen = NULL;
|
||||
|
||||
winsys = wrapper_sw_winsys_wrap_pipe_screen(pscreen);
|
||||
if (winsys == NULL)
|
||||
return NULL;
|
||||
|
||||
screen = sw_screen_create(winsys);
|
||||
if (screen == NULL) {
|
||||
winsys->destroy(winsys);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
screen = debug_screen_wrap(screen);
|
||||
return screen;
|
||||
}
|
||||
#endif // NINE_TARGET
|
||||
|
||||
#endif // GALLIUM_SOFTPIPE
|
||||
|
||||
|
||||
|
@@ -297,10 +297,10 @@ tgsi_default_declaration_sampler_view(void)
|
||||
struct tgsi_declaration_sampler_view dsv;
|
||||
|
||||
dsv.Resource = TGSI_TEXTURE_BUFFER;
|
||||
dsv.ReturnTypeX = TGSI_RETURN_TYPE_UNORM;
|
||||
dsv.ReturnTypeY = TGSI_RETURN_TYPE_UNORM;
|
||||
dsv.ReturnTypeZ = TGSI_RETURN_TYPE_UNORM;
|
||||
dsv.ReturnTypeW = TGSI_RETURN_TYPE_UNORM;
|
||||
dsv.ReturnTypeX = PIPE_TYPE_UNORM;
|
||||
dsv.ReturnTypeY = PIPE_TYPE_UNORM;
|
||||
dsv.ReturnTypeZ = PIPE_TYPE_UNORM;
|
||||
dsv.ReturnTypeW = PIPE_TYPE_UNORM;
|
||||
|
||||
return dsv;
|
||||
}
|
||||
|
@@ -329,15 +329,15 @@ iter_declaration(
|
||||
if ((decl->SamplerView.ReturnTypeX == decl->SamplerView.ReturnTypeY) &&
|
||||
(decl->SamplerView.ReturnTypeX == decl->SamplerView.ReturnTypeZ) &&
|
||||
(decl->SamplerView.ReturnTypeX == decl->SamplerView.ReturnTypeW)) {
|
||||
ENM(decl->SamplerView.ReturnTypeX, tgsi_return_type_names);
|
||||
ENM(decl->SamplerView.ReturnTypeX, tgsi_type_names);
|
||||
} else {
|
||||
ENM(decl->SamplerView.ReturnTypeX, tgsi_return_type_names);
|
||||
ENM(decl->SamplerView.ReturnTypeX, tgsi_type_names);
|
||||
TXT(", ");
|
||||
ENM(decl->SamplerView.ReturnTypeY, tgsi_return_type_names);
|
||||
ENM(decl->SamplerView.ReturnTypeY, tgsi_type_names);
|
||||
TXT(", ");
|
||||
ENM(decl->SamplerView.ReturnTypeZ, tgsi_return_type_names);
|
||||
ENM(decl->SamplerView.ReturnTypeZ, tgsi_type_names);
|
||||
TXT(", ");
|
||||
ENM(decl->SamplerView.ReturnTypeW, tgsi_return_type_names);
|
||||
ENM(decl->SamplerView.ReturnTypeW, tgsi_type_names);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -573,11 +573,8 @@ iter_instruction(
|
||||
}
|
||||
|
||||
if (inst->Instruction.Texture) {
|
||||
if (!(inst->Instruction.Opcode >= TGSI_OPCODE_SAMPLE &&
|
||||
inst->Instruction.Opcode <= TGSI_OPCODE_GATHER4)) {
|
||||
TXT( ", " );
|
||||
ENM( inst->Texture.Texture, tgsi_texture_names );
|
||||
}
|
||||
TXT( ", " );
|
||||
ENM( inst->Texture.Texture, tgsi_texture_names );
|
||||
for (i = 0; i < inst->Texture.NumOffsets; i++) {
|
||||
TXT( ", " );
|
||||
TXT(tgsi_file_name(inst->TexOffsets[i].File));
|
||||
|
@@ -1949,8 +1949,7 @@ exec_txd(struct tgsi_exec_machine *mach,
|
||||
case TGSI_TEXTURE_3D:
|
||||
case TGSI_TEXTURE_CUBE:
|
||||
case TGSI_TEXTURE_CUBE_ARRAY:
|
||||
case TGSI_TEXTURE_SHADOWCUBE:
|
||||
/* only TEXTURE_CUBE_ARRAY and TEXTURE_SHADOWCUBE actually need W */
|
||||
/* only TEXTURE_CUBE_ARRAY actually needs W */
|
||||
FETCH(&r[0], 0, TGSI_CHAN_X);
|
||||
FETCH(&r[1], 0, TGSI_CHAN_Y);
|
||||
FETCH(&r[2], 0, TGSI_CHAN_Z);
|
||||
@@ -2005,7 +2004,6 @@ exec_txf(struct tgsi_exec_machine *mach,
|
||||
case TGSI_TEXTURE_3D:
|
||||
case TGSI_TEXTURE_2D_ARRAY:
|
||||
case TGSI_TEXTURE_SHADOW2D_ARRAY:
|
||||
case TGSI_TEXTURE_2D_ARRAY_MSAA:
|
||||
IFETCH(&r[2], 0, TGSI_CHAN_Z);
|
||||
/* fallthrough */
|
||||
case TGSI_TEXTURE_2D:
|
||||
@@ -2014,7 +2012,6 @@ exec_txf(struct tgsi_exec_machine *mach,
|
||||
case TGSI_TEXTURE_SHADOW2D:
|
||||
case TGSI_TEXTURE_SHADOWRECT:
|
||||
case TGSI_TEXTURE_1D_ARRAY:
|
||||
case TGSI_TEXTURE_2D_MSAA:
|
||||
IFETCH(&r[1], 0, TGSI_CHAN_Y);
|
||||
/* fallthrough */
|
||||
case TGSI_TEXTURE_BUFFER:
|
||||
|
@@ -426,8 +426,6 @@ tgsi_exec_get_shader_param(enum pipe_shader_cap param)
|
||||
return TGSI_EXEC_MAX_NESTING;
|
||||
case PIPE_SHADER_CAP_MAX_INPUTS:
|
||||
return TGSI_EXEC_MAX_INPUT_ATTRIBS;
|
||||
case PIPE_SHADER_CAP_MAX_OUTPUTS:
|
||||
return 32;
|
||||
case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE:
|
||||
return TGSI_EXEC_MAX_CONST_BUFFER_SIZE;
|
||||
case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,88 +0,0 @@
|
||||
/*
|
||||
* 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 TGSI_LOWERING_H_
|
||||
#define TGSI_LOWERING_H_
|
||||
|
||||
#include "pipe/p_shader_tokens.h"
|
||||
#include "tgsi/tgsi_scan.h"
|
||||
|
||||
struct tgsi_lowering_config
|
||||
{
|
||||
/* For fragment shaders, generate a shader that emulates two
|
||||
* sided color by inserting a BGCOLOR input for each COLOR
|
||||
* input, and insert a CMP instruction to select the correct
|
||||
* color to use based on the TGSI_SEMANTIC_FACE input.
|
||||
*
|
||||
* Note that drivers which use this to emulate two sided color
|
||||
* will:
|
||||
* a) need to generate (on demand) alternate shaders to use
|
||||
* depending on the rasterizer state (ie. whether two
|
||||
* sided shading enabled)
|
||||
* b) expect to see the BGCOLOR semantic name in fragment
|
||||
* shaders. During linkage, the driver should simply
|
||||
* map VS.OUT.BGCOLOR[n] to FS.IN.BGCOLOR[n] (in the
|
||||
* same was as linking other outs/ins).
|
||||
*/
|
||||
unsigned color_two_side:1;
|
||||
|
||||
/* TODO support for alpha_to_one as well?? */
|
||||
|
||||
/* Individual OPC lowerings, if lower_<opc> is TRUE then
|
||||
* enable lowering of TGSI_OPCODE_<opc>
|
||||
*/
|
||||
unsigned lower_DST:1;
|
||||
unsigned lower_XPD:1;
|
||||
unsigned lower_SCS:1;
|
||||
unsigned lower_LRP:1;
|
||||
unsigned lower_FRC:1;
|
||||
unsigned lower_POW:1;
|
||||
unsigned lower_LIT:1;
|
||||
unsigned lower_EXP:1;
|
||||
unsigned lower_LOG:1;
|
||||
unsigned lower_DP4:1;
|
||||
unsigned lower_DP3:1;
|
||||
unsigned lower_DPH:1;
|
||||
unsigned lower_DP2:1;
|
||||
unsigned lower_DP2A:1;
|
||||
|
||||
/* To emulate certain texture wrap modes, this can be used
|
||||
* to saturate the specified tex coord to [0.0, 1.0]. The
|
||||
* bits are according to sampler #, ie. if, for example:
|
||||
*
|
||||
* (conf->saturate_s & (1 << n))
|
||||
*
|
||||
* is true, then the s coord for sampler n is saturated.
|
||||
*/
|
||||
unsigned saturate_s, saturate_t, saturate_r;
|
||||
};
|
||||
|
||||
const struct tgsi_token *
|
||||
tgsi_transform_lowering(const struct tgsi_lowering_config *config,
|
||||
const struct tgsi_token *tokens,
|
||||
struct tgsi_shader_info *info);
|
||||
|
||||
#endif /* FREEDRENO_LOWERING_H_ */
|
@@ -201,7 +201,6 @@ OP13_SAMPLE(GATHER4)
|
||||
OP12(SVIEWINFO)
|
||||
OP13(SAMPLE_POS)
|
||||
OP12(SAMPLE_INFO)
|
||||
OP11(UARL)
|
||||
|
||||
OP13(UCMP)
|
||||
|
||||
|
@@ -291,16 +291,6 @@ tgsi_alloc_tokens(unsigned num_tokens)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Free tokens allocated by tgsi_alloc_tokens() or tgsi_dup_tokens()
|
||||
*/
|
||||
void
|
||||
tgsi_free_tokens(const struct tgsi_token *tokens)
|
||||
{
|
||||
FREE((void *) tokens);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
tgsi_dump_tokens(const struct tgsi_token *tokens)
|
||||
{
|
||||
|
@@ -150,9 +150,6 @@ tgsi_dup_tokens(const struct tgsi_token *tokens);
|
||||
struct tgsi_token *
|
||||
tgsi_alloc_tokens(unsigned num_tokens);
|
||||
|
||||
void
|
||||
tgsi_free_tokens(const struct tgsi_token *tokens);
|
||||
|
||||
|
||||
#if defined __cplusplus
|
||||
}
|
||||
|
@@ -277,10 +277,13 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
|
||||
{
|
||||
const struct tgsi_full_property *fullprop
|
||||
= &parse.FullToken.FullProperty;
|
||||
unsigned name = fullprop->Property.PropertyName;
|
||||
|
||||
assert(name < Elements(info->properties));
|
||||
info->properties[name] = fullprop->u[0].Data;
|
||||
info->properties[info->num_properties].name =
|
||||
fullprop->Property.PropertyName;
|
||||
memcpy(info->properties[info->num_properties].data,
|
||||
fullprop->u, 8 * sizeof(unsigned));;
|
||||
|
||||
++info->num_properties;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -292,19 +295,36 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
|
||||
info->uses_kill = (info->opcode_count[TGSI_OPCODE_KILL_IF] ||
|
||||
info->opcode_count[TGSI_OPCODE_KILL]);
|
||||
|
||||
/* The dimensions of the IN decleration in geometry shader have
|
||||
* to be deduced from the type of the input primitive.
|
||||
*/
|
||||
if (procType == TGSI_PROCESSOR_GEOMETRY) {
|
||||
unsigned input_primitive =
|
||||
info->properties[TGSI_PROPERTY_GS_INPUT_PRIM];
|
||||
int num_verts = u_vertices_per_prim(input_primitive);
|
||||
int j;
|
||||
info->file_count[TGSI_FILE_INPUT] = num_verts;
|
||||
info->file_max[TGSI_FILE_INPUT] =
|
||||
MAX2(info->file_max[TGSI_FILE_INPUT], num_verts - 1);
|
||||
for (j = 0; j < num_verts; ++j) {
|
||||
info->file_mask[TGSI_FILE_INPUT] |= (1 << j);
|
||||
/* extract simple properties */
|
||||
for (i = 0; i < info->num_properties; ++i) {
|
||||
switch (info->properties[i].name) {
|
||||
case TGSI_PROPERTY_FS_COORD_ORIGIN:
|
||||
info->origin_lower_left = info->properties[i].data[0];
|
||||
break;
|
||||
case TGSI_PROPERTY_FS_COORD_PIXEL_CENTER:
|
||||
info->pixel_center_integer = info->properties[i].data[0];
|
||||
break;
|
||||
case TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS:
|
||||
info->color0_writes_all_cbufs = info->properties[i].data[0];
|
||||
break;
|
||||
case TGSI_PROPERTY_GS_INPUT_PRIM:
|
||||
/* The dimensions of the IN decleration in geometry shader have
|
||||
* to be deduced from the type of the input primitive.
|
||||
*/
|
||||
if (procType == TGSI_PROCESSOR_GEOMETRY) {
|
||||
unsigned input_primitive = info->properties[i].data[0];
|
||||
int num_verts = u_vertices_per_prim(input_primitive);
|
||||
int j;
|
||||
info->file_count[TGSI_FILE_INPUT] = num_verts;
|
||||
info->file_max[TGSI_FILE_INPUT] =
|
||||
MAX2(info->file_max[TGSI_FILE_INPUT], num_verts - 1);
|
||||
for (j = 0; j < num_verts; ++j) {
|
||||
info->file_mask[TGSI_FILE_INPUT] |= (1 << j);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -76,6 +76,9 @@ struct tgsi_shader_info
|
||||
boolean uses_vertexid;
|
||||
boolean uses_primid;
|
||||
boolean uses_frontface;
|
||||
boolean origin_lower_left;
|
||||
boolean pixel_center_integer;
|
||||
boolean color0_writes_all_cbufs;
|
||||
boolean writes_viewport_index;
|
||||
boolean writes_layer;
|
||||
boolean is_msaa_sampler[PIPE_MAX_SAMPLERS];
|
||||
@@ -88,7 +91,11 @@ struct tgsi_shader_info
|
||||
*/
|
||||
unsigned indirect_files;
|
||||
|
||||
unsigned properties[TGSI_PROPERTY_COUNT]; /* index with TGSI_PROPERTY_ */
|
||||
struct {
|
||||
unsigned name;
|
||||
unsigned data[8];
|
||||
} properties[TGSI_PROPERTY_COUNT];
|
||||
uint num_properties;
|
||||
};
|
||||
|
||||
extern void
|
||||
|
@@ -125,7 +125,7 @@ const char *tgsi_property_names[TGSI_PROPERTY_COUNT] =
|
||||
"VS_POSITION_WINDOW_SPACE"
|
||||
};
|
||||
|
||||
const char *tgsi_return_type_names[TGSI_RETURN_TYPE_COUNT] =
|
||||
const char *tgsi_type_names[5] =
|
||||
{
|
||||
"UNORM",
|
||||
"SNORM",
|
||||
@@ -195,9 +195,8 @@ tgsi_strings_check(void)
|
||||
STATIC_ASSERT(Elements(tgsi_property_names) == TGSI_PROPERTY_COUNT);
|
||||
STATIC_ASSERT(Elements(tgsi_primitive_names) == PIPE_PRIM_MAX);
|
||||
STATIC_ASSERT(Elements(tgsi_interpolate_names) == TGSI_INTERPOLATE_COUNT);
|
||||
STATIC_ASSERT(Elements(tgsi_return_type_names) == TGSI_RETURN_TYPE_COUNT);
|
||||
(void) tgsi_processor_type_names;
|
||||
(void) tgsi_return_type_names;
|
||||
(void) tgsi_type_names;
|
||||
(void) tgsi_immediate_type_names;
|
||||
(void) tgsi_fs_coord_origin_names;
|
||||
(void) tgsi_fs_coord_pixel_center_names;
|
||||
|
@@ -46,7 +46,7 @@ extern const char *tgsi_texture_names[TGSI_TEXTURE_COUNT];
|
||||
|
||||
extern const char *tgsi_property_names[TGSI_PROPERTY_COUNT];
|
||||
|
||||
extern const char *tgsi_return_type_names[TGSI_RETURN_TYPE_COUNT];
|
||||
extern const char *tgsi_type_names[5];
|
||||
|
||||
extern const char *tgsi_interpolate_names[TGSI_INTERPOLATE_COUNT];
|
||||
|
||||
|
@@ -993,7 +993,8 @@ parse_instruction(
|
||||
/*
|
||||
* These are not considered tex opcodes here (no additional
|
||||
* target argument) however we're required to set the Texture
|
||||
* bit so we can set the number of tex offsets.
|
||||
* bit so we can set the number of tex offsets (offsets aren't
|
||||
* actually handled here yet in any case).
|
||||
*/
|
||||
inst.Instruction.Texture = 1;
|
||||
inst.Texture.Texture = TGSI_TEXTURE_UNKNOWN;
|
||||
@@ -1039,7 +1040,7 @@ parse_instruction(
|
||||
|
||||
cur = ctx->cur;
|
||||
eat_opt_white( &cur );
|
||||
for (i = 0; inst.Instruction.Texture && *cur == ','; i++) {
|
||||
for (i = 0; info->is_tex && *cur == ','; i++) {
|
||||
cur++;
|
||||
eat_opt_white( &cur );
|
||||
ctx->cur = cur;
|
||||
@@ -1258,8 +1259,8 @@ static boolean parse_declaration( struct translate_ctx *ctx )
|
||||
++cur;
|
||||
eat_opt_white( &cur );
|
||||
for (j = 0; j < 4; ++j) {
|
||||
for (i = 0; i < TGSI_RETURN_TYPE_COUNT; ++i) {
|
||||
if (str_match_nocase_whole(&cur, tgsi_return_type_names[i])) {
|
||||
for (i = 0; i < PIPE_TYPE_COUNT; ++i) {
|
||||
if (str_match_nocase_whole(&cur, tgsi_type_names[i])) {
|
||||
switch (j) {
|
||||
case 0:
|
||||
decl.SamplerView.ReturnTypeX = i;
|
||||
@@ -1279,7 +1280,7 @@ static boolean parse_declaration( struct translate_ctx *ctx )
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == TGSI_RETURN_TYPE_COUNT) {
|
||||
if (i == PIPE_TYPE_COUNT) {
|
||||
if (j == 0 || j > 2) {
|
||||
report_error(ctx, "Expected type name");
|
||||
return FALSE;
|
||||
|
@@ -109,7 +109,6 @@ tgsi_transform_shader(const struct tgsi_token *tokens_in,
|
||||
struct tgsi_transform_context *ctx)
|
||||
{
|
||||
uint procType;
|
||||
boolean first_instruction = TRUE;
|
||||
|
||||
/* input shader */
|
||||
struct tgsi_parse_context parse;
|
||||
@@ -167,28 +166,10 @@ tgsi_transform_shader(const struct tgsi_token *tokens_in,
|
||||
struct tgsi_full_instruction *fullinst
|
||||
= &parse.FullToken.FullInstruction;
|
||||
|
||||
if (first_instruction && ctx->prolog) {
|
||||
ctx->prolog(ctx);
|
||||
}
|
||||
|
||||
/* XXX Note: we may also want to look for a main/top-level
|
||||
* TGSI_OPCODE_RET instruction in the future.
|
||||
*/
|
||||
if (fullinst->Instruction.Opcode == TGSI_OPCODE_END
|
||||
&& ctx->epilog) {
|
||||
/* Emit caller's epilog */
|
||||
ctx->epilog(ctx);
|
||||
/* Emit END */
|
||||
if (ctx->transform_instruction)
|
||||
ctx->transform_instruction(ctx, fullinst);
|
||||
else
|
||||
ctx->emit_instruction(ctx, fullinst);
|
||||
}
|
||||
else {
|
||||
if (ctx->transform_instruction)
|
||||
ctx->transform_instruction(ctx, fullinst);
|
||||
else
|
||||
ctx->emit_instruction(ctx, fullinst);
|
||||
}
|
||||
|
||||
first_instruction = FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -232,6 +213,10 @@ tgsi_transform_shader(const struct tgsi_token *tokens_in,
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->epilog) {
|
||||
ctx->epilog(ctx);
|
||||
}
|
||||
|
||||
tgsi_parse_free (&parse);
|
||||
|
||||
return ctx->ti;
|
||||
|
@@ -56,12 +56,6 @@ struct tgsi_transform_context
|
||||
void (*transform_property)(struct tgsi_transform_context *ctx,
|
||||
struct tgsi_full_property *prop);
|
||||
|
||||
/**
|
||||
* Called after last declaration, before first instruction. This is
|
||||
* where the user might insert new declarations and/or instructions.
|
||||
*/
|
||||
void (*prolog)(struct tgsi_transform_context *ctx);
|
||||
|
||||
/**
|
||||
* Called at end of input program to allow caller to append extra
|
||||
* instructions. Return number of tokens emitted.
|
||||
@@ -91,339 +85,6 @@ struct tgsi_transform_context
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Helper for emitting temporary register declarations.
|
||||
*/
|
||||
static INLINE void
|
||||
tgsi_transform_temp_decl(struct tgsi_transform_context *ctx,
|
||||
unsigned index)
|
||||
{
|
||||
struct tgsi_full_declaration decl;
|
||||
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_TEMPORARY;
|
||||
decl.Range.First =
|
||||
decl.Range.Last = index;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
tgsi_transform_input_decl(struct tgsi_transform_context *ctx,
|
||||
unsigned index,
|
||||
unsigned sem_name, unsigned sem_index,
|
||||
unsigned interp)
|
||||
{
|
||||
struct tgsi_full_declaration decl;
|
||||
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_INPUT;
|
||||
decl.Declaration.Interpolate = 1;
|
||||
decl.Declaration.Semantic = 1;
|
||||
decl.Semantic.Name = sem_name;
|
||||
decl.Semantic.Index = sem_index;
|
||||
decl.Range.First =
|
||||
decl.Range.Last = index;
|
||||
decl.Interp.Interpolate = interp;
|
||||
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
tgsi_transform_sampler_decl(struct tgsi_transform_context *ctx,
|
||||
unsigned index)
|
||||
{
|
||||
struct tgsi_full_declaration decl;
|
||||
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_SAMPLER;
|
||||
decl.Range.First =
|
||||
decl.Range.Last = index;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
tgsi_transform_immediate_decl(struct tgsi_transform_context *ctx,
|
||||
float x, float y, float z, float w)
|
||||
{
|
||||
struct tgsi_full_immediate immed;
|
||||
unsigned size = 4;
|
||||
|
||||
immed = tgsi_default_full_immediate();
|
||||
immed.Immediate.NrTokens = 1 + size; /* one for the token itself */
|
||||
immed.u[0].Float = x;
|
||||
immed.u[1].Float = y;
|
||||
immed.u[2].Float = z;
|
||||
immed.u[3].Float = w;
|
||||
|
||||
ctx->emit_immediate(ctx, &immed);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Helper for emitting 1-operand instructions.
|
||||
*/
|
||||
static INLINE void
|
||||
tgsi_transform_op1_inst(struct tgsi_transform_context *ctx,
|
||||
unsigned opcode,
|
||||
unsigned dst_file,
|
||||
unsigned dst_index,
|
||||
unsigned dst_writemask,
|
||||
unsigned src0_file,
|
||||
unsigned src0_index)
|
||||
{
|
||||
struct tgsi_full_instruction inst;
|
||||
|
||||
inst = tgsi_default_full_instruction();
|
||||
inst.Instruction.Opcode = opcode;
|
||||
inst.Instruction.NumDstRegs = 1;
|
||||
inst.Dst[0].Register.File = dst_file,
|
||||
inst.Dst[0].Register.Index = dst_index;
|
||||
inst.Dst[0].Register.WriteMask = dst_writemask;
|
||||
inst.Instruction.NumSrcRegs = 1;
|
||||
inst.Src[0].Register.File = src0_file;
|
||||
inst.Src[0].Register.Index = src0_index;
|
||||
|
||||
ctx->emit_instruction(ctx, &inst);
|
||||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
tgsi_transform_op2_inst(struct tgsi_transform_context *ctx,
|
||||
unsigned opcode,
|
||||
unsigned dst_file,
|
||||
unsigned dst_index,
|
||||
unsigned dst_writemask,
|
||||
unsigned src0_file,
|
||||
unsigned src0_index,
|
||||
unsigned src1_file,
|
||||
unsigned src1_index)
|
||||
{
|
||||
struct tgsi_full_instruction inst;
|
||||
|
||||
inst = tgsi_default_full_instruction();
|
||||
inst.Instruction.Opcode = opcode;
|
||||
inst.Instruction.NumDstRegs = 1;
|
||||
inst.Dst[0].Register.File = dst_file,
|
||||
inst.Dst[0].Register.Index = dst_index;
|
||||
inst.Dst[0].Register.WriteMask = dst_writemask;
|
||||
inst.Instruction.NumSrcRegs = 2;
|
||||
inst.Src[0].Register.File = src0_file;
|
||||
inst.Src[0].Register.Index = src0_index;
|
||||
inst.Src[1].Register.File = src1_file;
|
||||
inst.Src[1].Register.Index = src1_index;
|
||||
|
||||
ctx->emit_instruction(ctx, &inst);
|
||||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
tgsi_transform_op1_swz_inst(struct tgsi_transform_context *ctx,
|
||||
unsigned opcode,
|
||||
unsigned dst_file,
|
||||
unsigned dst_index,
|
||||
unsigned dst_writemask,
|
||||
unsigned src0_file,
|
||||
unsigned src0_index,
|
||||
unsigned src0_swizzle)
|
||||
{
|
||||
struct tgsi_full_instruction inst;
|
||||
|
||||
inst = tgsi_default_full_instruction();
|
||||
inst.Instruction.Opcode = opcode;
|
||||
inst.Instruction.NumDstRegs = 1;
|
||||
inst.Dst[0].Register.File = dst_file,
|
||||
inst.Dst[0].Register.Index = dst_index;
|
||||
inst.Dst[0].Register.WriteMask = dst_writemask;
|
||||
inst.Instruction.NumSrcRegs = 1;
|
||||
inst.Src[0].Register.File = src0_file;
|
||||
inst.Src[0].Register.Index = src0_index;
|
||||
switch (dst_writemask) {
|
||||
case TGSI_WRITEMASK_X:
|
||||
inst.Src[0].Register.SwizzleX = src0_swizzle;
|
||||
break;
|
||||
case TGSI_WRITEMASK_Y:
|
||||
inst.Src[0].Register.SwizzleY = src0_swizzle;
|
||||
break;
|
||||
case TGSI_WRITEMASK_Z:
|
||||
inst.Src[0].Register.SwizzleZ = src0_swizzle;
|
||||
break;
|
||||
case TGSI_WRITEMASK_W:
|
||||
inst.Src[0].Register.SwizzleW = src0_swizzle;
|
||||
break;
|
||||
default:
|
||||
; /* nothing */
|
||||
}
|
||||
|
||||
ctx->emit_instruction(ctx, &inst);
|
||||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
tgsi_transform_op2_swz_inst(struct tgsi_transform_context *ctx,
|
||||
unsigned opcode,
|
||||
unsigned dst_file,
|
||||
unsigned dst_index,
|
||||
unsigned dst_writemask,
|
||||
unsigned src0_file,
|
||||
unsigned src0_index,
|
||||
unsigned src0_swizzle,
|
||||
unsigned src1_file,
|
||||
unsigned src1_index,
|
||||
unsigned src1_swizzle)
|
||||
{
|
||||
struct tgsi_full_instruction inst;
|
||||
|
||||
inst = tgsi_default_full_instruction();
|
||||
inst.Instruction.Opcode = opcode;
|
||||
inst.Instruction.NumDstRegs = 1;
|
||||
inst.Dst[0].Register.File = dst_file,
|
||||
inst.Dst[0].Register.Index = dst_index;
|
||||
inst.Dst[0].Register.WriteMask = dst_writemask;
|
||||
inst.Instruction.NumSrcRegs = 2;
|
||||
inst.Src[0].Register.File = src0_file;
|
||||
inst.Src[0].Register.Index = src0_index;
|
||||
inst.Src[1].Register.File = src1_file;
|
||||
inst.Src[1].Register.Index = src1_index;
|
||||
switch (dst_writemask) {
|
||||
case TGSI_WRITEMASK_X:
|
||||
inst.Src[0].Register.SwizzleX = src0_swizzle;
|
||||
inst.Src[1].Register.SwizzleX = src1_swizzle;
|
||||
break;
|
||||
case TGSI_WRITEMASK_Y:
|
||||
inst.Src[0].Register.SwizzleY = src0_swizzle;
|
||||
inst.Src[1].Register.SwizzleY = src1_swizzle;
|
||||
break;
|
||||
case TGSI_WRITEMASK_Z:
|
||||
inst.Src[0].Register.SwizzleZ = src0_swizzle;
|
||||
inst.Src[1].Register.SwizzleZ = src1_swizzle;
|
||||
break;
|
||||
case TGSI_WRITEMASK_W:
|
||||
inst.Src[0].Register.SwizzleW = src0_swizzle;
|
||||
inst.Src[1].Register.SwizzleW = src1_swizzle;
|
||||
break;
|
||||
default:
|
||||
; /* nothing */
|
||||
}
|
||||
|
||||
ctx->emit_instruction(ctx, &inst);
|
||||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
tgsi_transform_op3_swz_inst(struct tgsi_transform_context *ctx,
|
||||
unsigned opcode,
|
||||
unsigned dst_file,
|
||||
unsigned dst_index,
|
||||
unsigned dst_writemask,
|
||||
unsigned src0_file,
|
||||
unsigned src0_index,
|
||||
unsigned src0_swizzle,
|
||||
unsigned src0_negate,
|
||||
unsigned src1_file,
|
||||
unsigned src1_index,
|
||||
unsigned src1_swizzle,
|
||||
unsigned src2_file,
|
||||
unsigned src2_index,
|
||||
unsigned src2_swizzle)
|
||||
{
|
||||
struct tgsi_full_instruction inst;
|
||||
|
||||
inst = tgsi_default_full_instruction();
|
||||
inst.Instruction.Opcode = opcode;
|
||||
inst.Instruction.NumDstRegs = 1;
|
||||
inst.Dst[0].Register.File = dst_file,
|
||||
inst.Dst[0].Register.Index = dst_index;
|
||||
inst.Dst[0].Register.WriteMask = dst_writemask;
|
||||
inst.Instruction.NumSrcRegs = 3;
|
||||
inst.Src[0].Register.File = src0_file;
|
||||
inst.Src[0].Register.Index = src0_index;
|
||||
inst.Src[0].Register.Negate = src0_negate;
|
||||
inst.Src[1].Register.File = src1_file;
|
||||
inst.Src[1].Register.Index = src1_index;
|
||||
inst.Src[2].Register.File = src2_file;
|
||||
inst.Src[2].Register.Index = src2_index;
|
||||
switch (dst_writemask) {
|
||||
case TGSI_WRITEMASK_X:
|
||||
inst.Src[0].Register.SwizzleX = src0_swizzle;
|
||||
inst.Src[1].Register.SwizzleX = src1_swizzle;
|
||||
inst.Src[2].Register.SwizzleX = src2_swizzle;
|
||||
break;
|
||||
case TGSI_WRITEMASK_Y:
|
||||
inst.Src[0].Register.SwizzleY = src0_swizzle;
|
||||
inst.Src[1].Register.SwizzleY = src1_swizzle;
|
||||
inst.Src[2].Register.SwizzleY = src2_swizzle;
|
||||
break;
|
||||
case TGSI_WRITEMASK_Z:
|
||||
inst.Src[0].Register.SwizzleZ = src0_swizzle;
|
||||
inst.Src[1].Register.SwizzleZ = src1_swizzle;
|
||||
inst.Src[2].Register.SwizzleZ = src2_swizzle;
|
||||
break;
|
||||
case TGSI_WRITEMASK_W:
|
||||
inst.Src[0].Register.SwizzleW = src0_swizzle;
|
||||
inst.Src[1].Register.SwizzleW = src1_swizzle;
|
||||
inst.Src[2].Register.SwizzleW = src2_swizzle;
|
||||
break;
|
||||
default:
|
||||
; /* nothing */
|
||||
}
|
||||
|
||||
ctx->emit_instruction(ctx, &inst);
|
||||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
tgsi_transform_kill_inst(struct tgsi_transform_context *ctx,
|
||||
unsigned src_file,
|
||||
unsigned src_index,
|
||||
unsigned src_swizzle)
|
||||
{
|
||||
struct tgsi_full_instruction inst;
|
||||
|
||||
inst = tgsi_default_full_instruction();
|
||||
inst.Instruction.Opcode = TGSI_OPCODE_KILL_IF;
|
||||
inst.Instruction.NumDstRegs = 0;
|
||||
inst.Instruction.NumSrcRegs = 1;
|
||||
inst.Src[0].Register.File = src_file;
|
||||
inst.Src[0].Register.Index = src_index;
|
||||
inst.Src[0].Register.SwizzleX =
|
||||
inst.Src[0].Register.SwizzleY =
|
||||
inst.Src[0].Register.SwizzleZ =
|
||||
inst.Src[0].Register.SwizzleW = src_swizzle;
|
||||
inst.Src[0].Register.Negate = 1;
|
||||
|
||||
ctx->emit_instruction(ctx, &inst);
|
||||
}
|
||||
|
||||
|
||||
static INLINE void
|
||||
tgsi_transform_tex_2d_inst(struct tgsi_transform_context *ctx,
|
||||
unsigned dst_file,
|
||||
unsigned dst_index,
|
||||
unsigned src_file,
|
||||
unsigned src_index,
|
||||
unsigned sampler_index)
|
||||
{
|
||||
struct tgsi_full_instruction inst;
|
||||
|
||||
inst = tgsi_default_full_instruction();
|
||||
inst.Instruction.Opcode = TGSI_OPCODE_TEX;
|
||||
inst.Instruction.NumDstRegs = 1;
|
||||
inst.Dst[0].Register.File = dst_file;
|
||||
inst.Dst[0].Register.Index = dst_index;
|
||||
inst.Instruction.NumSrcRegs = 2;
|
||||
inst.Instruction.Texture = TRUE;
|
||||
inst.Texture.Texture = TGSI_TEXTURE_2D;
|
||||
inst.Src[0].Register.File = src_file;
|
||||
inst.Src[0].Register.Index = src_index;
|
||||
inst.Src[1].Register.File = TGSI_FILE_SAMPLER;
|
||||
inst.Src[1].Register.Index = sampler_index;
|
||||
|
||||
ctx->emit_instruction(ctx, &inst);
|
||||
}
|
||||
|
||||
|
||||
extern int
|
||||
tgsi_transform_shader(const struct tgsi_token *tokens_in,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user