Compare commits
207 Commits
mesa-10.1
...
mesa-10.1.
Author | SHA1 | Date | |
---|---|---|---|
|
5f41cae633 | ||
|
0e76bc55ed | ||
|
ce6877491f | ||
|
f9b6457986 | ||
|
04ca4cef97 | ||
|
b574944a05 | ||
|
838b0d9928 | ||
|
c2dc58fe96 | ||
|
d947156407 | ||
|
bf50129ba6 | ||
|
68af044a0c | ||
|
151e7ac3cf | ||
|
920428a30a | ||
|
77619d927b | ||
|
e7537b3410 | ||
|
39c599a666 | ||
|
8e8fab2ef6 | ||
|
283acc26e4 | ||
|
9f5eea0cc9 | ||
|
e03020abbc | ||
|
e4c65664ea | ||
|
f6bf295924 | ||
|
1d7b8bc085 | ||
|
2889608534 | ||
|
45bf29b53d | ||
|
feb4c7284c | ||
|
b614628a3c | ||
|
1f08d1bf46 | ||
|
a73894a7ed | ||
|
cf08c24750 | ||
|
4d676c5ed2 | ||
|
4942eae869 | ||
|
1776a562b4 | ||
|
d2f5638ade | ||
|
ee0207a212 | ||
|
36e0e9c5e7 | ||
|
5d8e60dcc7 | ||
|
a23e73e00d | ||
|
a02f6639f7 | ||
|
cc9b282f8a | ||
|
edab352b25 | ||
|
ec83a39e2b | ||
|
ea5839c8fe | ||
|
2d6f733979 | ||
|
507d2e523c | ||
|
07ada102cb | ||
|
13b142a420 | ||
|
1ba2298131 | ||
|
736e16288b | ||
|
7396efb19a | ||
|
c8e24aa5a9 | ||
|
16dfaf495a | ||
|
f3eb3455c8 | ||
|
9e1eb6fb93 | ||
|
0028eb1083 | ||
|
d4c7ca04c1 | ||
|
e16de70a90 | ||
|
f7b949723a | ||
|
558c20fa95 | ||
|
31462dc748 | ||
|
994203bf5e | ||
|
08da743a97 | ||
|
bde3135717 | ||
|
75049062d5 | ||
|
3d648f0f50 | ||
|
ff117336b7 | ||
|
2cd8ce4c67 | ||
|
ec70be5628 | ||
|
2d9bfe4bf4 | ||
|
efba496d03 | ||
|
853c313ce3 | ||
|
2981bc9ff8 | ||
|
18e6cd5e61 | ||
|
4ee60a14df | ||
|
2b5ad9baa1 | ||
|
87173023b2 | ||
|
51e80d1a8b | ||
|
755bf62c2e | ||
|
81f98ffb61 | ||
|
072a79b188 | ||
|
87655f1805 | ||
|
3c6c42b86d | ||
|
8792eda0eb | ||
|
0860c95d5c | ||
|
f4b0b3a402 | ||
|
f9f10f681e | ||
|
996fbd4e2b | ||
|
e19c702eac | ||
|
5d680bc082 | ||
|
e43327bdd9 | ||
|
c8ac5294eb | ||
|
d404180430 | ||
|
c7adf5d1c7 | ||
|
62ba29b236 | ||
|
8ea3790d49 | ||
|
110b6af5f4 | ||
|
5e688c0601 | ||
|
1602419b16 | ||
|
081e37b3b6 | ||
|
4f3abcfee4 | ||
|
d17b75f1e5 | ||
|
1d0e7fb691 | ||
|
468c1a2d46 | ||
|
74194a4bfc | ||
|
b3e3ba5c37 | ||
|
62b1970ccc | ||
|
6a154a4875 | ||
|
66765bb6a6 | ||
|
657a185dc0 | ||
|
b22bdb5cd2 | ||
|
90eae12ae0 | ||
|
c9ceb03147 | ||
|
488f5b4390 | ||
|
eed256688f | ||
|
58ca56ddf5 | ||
|
e16df44a85 | ||
|
b026b6bbfe | ||
|
cda6610d85 | ||
|
4cd6530885 | ||
|
780817af84 | ||
|
e31f76bf66 | ||
|
527210f15d | ||
|
a616fbd7aa | ||
|
9abd686e3f | ||
|
3a194cd77e | ||
|
a38db439df | ||
|
5f685d9925 | ||
|
b3f1ee8b18 | ||
|
c862a14676 | ||
|
23e42eeab0 | ||
|
cc0e6d87be | ||
|
dab5a7a9f9 | ||
|
358d05617a | ||
|
df9e7ee445 | ||
|
933215ac63 | ||
|
c755ebfecf | ||
|
c60b97e9ba | ||
|
37c4ba3e69 | ||
|
9f1fe12fd1 | ||
|
92c43a3a88 | ||
|
b8e0e34555 | ||
|
0c6be6e146 | ||
|
30be758fd2 | ||
|
aae5cf54a2 | ||
|
c5612ba549 | ||
|
e52117cefb | ||
|
18055f9136 | ||
|
563fd9d736 | ||
|
9aa0b296f8 | ||
|
82db52a55e | ||
|
8f4fb58dbf | ||
|
8f85bf57fc | ||
|
76c84a0f75 | ||
|
b38c141850 | ||
|
b088d4649c | ||
|
8d6eea9824 | ||
|
91543aef3b | ||
|
4d7504c0c4 | ||
|
d7df21d08b | ||
|
b853dceb4b | ||
|
71c4e4f420 | ||
|
95bba69398 | ||
|
e144e14c0a | ||
|
c1fbfa4859 | ||
|
2ea18474a6 | ||
|
740bd738a9 | ||
|
e801b8d677 | ||
|
da726d3d93 | ||
|
1d32349f70 | ||
|
b3c9041cca | ||
|
6619158873 | ||
|
6466e99aa0 | ||
|
f5fe91c087 | ||
|
cb89da2e61 | ||
|
1dba985788 | ||
|
3a4a0882cb | ||
|
352b9e8faf | ||
|
87587c6683 | ||
|
ee71a08f23 | ||
|
9cb82a0319 | ||
|
ec6be857f3 | ||
|
365975e5eb | ||
|
3b7fd0351d | ||
|
676cc8e39d | ||
|
c2c1c902f9 | ||
|
d78131f695 | ||
|
8648c2b2a0 | ||
|
9bfe1b3773 | ||
|
a77c10a1a4 | ||
|
ac14d741ee | ||
|
acfb3f7f02 | ||
|
228ad18b84 | ||
|
7c09f4bb44 | ||
|
3eb2103ce0 | ||
|
58fe564607 | ||
|
16fc050e07 | ||
|
248d82515f | ||
|
728f58c534 | ||
|
df15372b65 | ||
|
50d65b4374 | ||
|
f4e348d008 | ||
|
34e8881ac7 | ||
|
30274cf36c | ||
|
64f54cc8f4 | ||
|
4f668babc6 | ||
|
ee51c6aae7 | ||
|
3491c57bd9 |
28
bin/.cherry-ignore
Normal file
28
bin/.cherry-ignore
Normal file
@@ -0,0 +1,28 @@
|
||||
# This patch does not apply cleanly, author says it can be skipped.
|
||||
dff3eccd158d648482bb47118ef5d57a9186e5a4
|
||||
|
||||
# And this one depends on the above, author says it too can be skipped.
|
||||
ac35ded4733883037316d556af596524e5e02535
|
||||
|
||||
# This patch introduces some regressions. See:
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=77443
|
||||
1afe3359258a9e89b62c8638761f52d78f6d1cbc
|
||||
|
||||
# Author retracted this from consideration for stable branch
|
||||
3e817e7e56806d8adb8f16c35136045c29908944
|
||||
|
||||
# And this one was simply a bug fix for the previously-retracted commit
|
||||
2bab95973d8ad3a84f62670143d6f26c230d9582
|
||||
|
||||
# Here we have a commit, and its subsequent "revert" both proposed within a
|
||||
# single window of the stable release. So we can achieve the same final effect
|
||||
# by ignoring both of the commits.
|
||||
e3cc0d90e14e62a0a787b6c07a6df0f5c84039be
|
||||
0d5ec2c615784929be095951f9269773a790a2dd
|
||||
|
||||
# The function being modified here (_eglCreateWindowSurfaceCommon) does not
|
||||
# exist in the 10.1 branch.
|
||||
91ff0d4c6510dc38f279c586ced17fba917873e7
|
||||
|
||||
# This patch is not needed (modifies work only in 10.2)
|
||||
6980cae6aeb6671b6b0245e20a2d34957c1fff0a
|
@@ -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\.1.*mesa-stable\)' HEAD..origin/master |\
|
||||
while read sha
|
||||
do
|
||||
# Check to see whether the patch is on the ignore list.
|
||||
|
75
configure.ac
75
configure.ac
@@ -542,11 +542,20 @@ AC_ARG_ENABLE([dri],
|
||||
[enable DRI modules @<:@default=enabled@:>@])],
|
||||
[enable_dri="$enableval"],
|
||||
[enable_dri=yes])
|
||||
|
||||
case "$host_os" in
|
||||
linux*)
|
||||
dri3_default=yes
|
||||
;;
|
||||
*)
|
||||
dri3_default=no
|
||||
;;
|
||||
esac
|
||||
AC_ARG_ENABLE([dri3],
|
||||
[AS_HELP_STRING([--enable-dri3],
|
||||
[enable DRI3 @<:@default=enabled@:>@])],
|
||||
[enable DRI3 @<:@default=auto@:>@])],
|
||||
[enable_dri3="$enableval"],
|
||||
[enable_dri3=yes])
|
||||
[enable_dri3="$dri3_default"])
|
||||
AC_ARG_ENABLE([glx],
|
||||
[AS_HELP_STRING([--enable-glx],
|
||||
[enable GLX library @<:@default=enabled@:>@])],
|
||||
@@ -771,6 +780,13 @@ if test "x$have_libdrm" = xyes; then
|
||||
DEFINES="$DEFINES -DHAVE_LIBDRM"
|
||||
fi
|
||||
|
||||
case "$host_os" in
|
||||
linux*)
|
||||
need_libudev=yes ;;
|
||||
*)
|
||||
need_libudev=no ;;
|
||||
esac
|
||||
|
||||
PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED],
|
||||
have_libudev=yes, have_libudev=no)
|
||||
|
||||
@@ -830,9 +846,6 @@ xyesno)
|
||||
PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
|
||||
GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED"
|
||||
if test x"$enable_dri3" = xyes; then
|
||||
if test x"$have_libudev" != xyes; then
|
||||
AC_MSG_ERROR([DRI3 requires libudev >= $LIBUDEV_REQUIRED])
|
||||
fi
|
||||
PKG_CHECK_MODULES([DRI3PROTO], [dri3proto >= $DRI3PROTO_REQUIRED])
|
||||
PKG_CHECK_MODULES([PRESENTPROTO], [presentproto >= $PRESENTPROTO_REQUIRED])
|
||||
fi
|
||||
@@ -1017,7 +1030,7 @@ if test "x$enable_dri" = xyes; then
|
||||
gnu*)
|
||||
DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
|
||||
DEFINES="$DEFINES -DHAVE_ALIAS"
|
||||
;;
|
||||
;;
|
||||
solaris*)
|
||||
DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
|
||||
;;
|
||||
@@ -1037,7 +1050,7 @@ if test "x$enable_dri" = xyes; then
|
||||
DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'`
|
||||
|
||||
# Check for expat
|
||||
PKG_CHECK_EXISTS([EXPAT], [have_expat=yes], [have_expat=no])
|
||||
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.]))
|
||||
@@ -1178,8 +1191,8 @@ if test "x$enable_gbm" = xauto; then
|
||||
esac
|
||||
fi
|
||||
if test "x$enable_gbm" = xyes; then
|
||||
if test x"$have_libudev" != xyes; then
|
||||
AC_MSG_ERROR([gbm needs udev])
|
||||
if test "x$need_libudev$have_libudev" = xyesno; then
|
||||
AC_MSG_ERROR([gbm requires udev >= $LIBUDEV_REQUIRED])
|
||||
fi
|
||||
|
||||
if test "x$enable_dri" = xyes; then
|
||||
@@ -1187,10 +1200,21 @@ if test "x$enable_gbm" = xyes; then
|
||||
if test "x$enable_shared_glapi" = xno; then
|
||||
AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi])
|
||||
fi
|
||||
else
|
||||
# Strictly speaking libgbm does not require --enable-dri, although
|
||||
# both of its backends do. Thus one can build libgbm without any
|
||||
# backends if --disable-dri is set.
|
||||
# To avoid unnecessary complexity of checking if at least one backend
|
||||
# is available when building, just mandate --enable-dri.
|
||||
AC_MSG_ERROR([gbm requires --enable-dri])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)
|
||||
GBM_PC_REQ_PRIV="libudev"
|
||||
if test "x$need_libudev" = xyes; then
|
||||
GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED"
|
||||
else
|
||||
GBM_PC_REQ_PRIV=""
|
||||
fi
|
||||
GBM_PC_LIB_PRIV="$DLOPEN_LIBS"
|
||||
AC_SUBST([GBM_PC_REQ_PRIV])
|
||||
AC_SUBST([GBM_PC_LIB_PRIV])
|
||||
@@ -1461,9 +1485,9 @@ for plat in $egl_platforms; do
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$plat$have_libudev" in
|
||||
waylandno|drmno)
|
||||
AC_MSG_ERROR([cannot build $plat platfrom without udev]) ;;
|
||||
case "$plat$need_libudev$have_libudev" in
|
||||
waylandyesno|drmyesno)
|
||||
AC_MSG_ERROR([cannot build $plat platform without udev >= $LIBUDEV_REQUIRED]) ;;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -1529,11 +1553,11 @@ AC_ARG_ENABLE([gallium-llvm],
|
||||
[enable_gallium_llvm="$enableval"],
|
||||
[enable_gallium_llvm=auto])
|
||||
|
||||
AC_ARG_WITH([llvm-shared-libs],
|
||||
[AS_HELP_STRING([--with-llvm-shared-libs],
|
||||
[link with LLVM shared libraries @<:@default=disabled@:>@])],
|
||||
AC_ARG_ENABLE([llvm-shared-libs],
|
||||
[AS_HELP_STRING([--enable-llvm-shared-libs],
|
||||
[link with LLVM shared libraries @<:@default=enabled@:>@])],
|
||||
[],
|
||||
[with_llvm_shared_libs=no])
|
||||
[with_llvm_shared_libs=yes])
|
||||
|
||||
AC_ARG_WITH([llvm-prefix],
|
||||
[AS_HELP_STRING([--with-llvm-prefix],
|
||||
@@ -1588,6 +1612,12 @@ if test "x$enable_gallium_llvm" = xyes; then
|
||||
AC_COMPUTE_INT([LLVM_VERSION_MINOR], [LLVM_VERSION_MINOR],
|
||||
[#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
|
||||
|
||||
dnl In LLVM 3.4.1 patch level was defined in config.h and not
|
||||
dnl llvm-config.h
|
||||
AC_COMPUTE_INT([LLVM_VERSION_PATCH], [LLVM_VERSION_PATCH],
|
||||
[#include "${LLVM_INCLUDEDIR}/llvm/Config/config.h"],
|
||||
LLVM_VERSION_PATCH=0) dnl Default if LLVM_VERSION_PATCH not found
|
||||
|
||||
if test "x${LLVM_VERSION_MAJOR}" != x; then
|
||||
LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
|
||||
else
|
||||
@@ -1610,7 +1640,7 @@ if test "x$enable_gallium_llvm" = xyes; then
|
||||
LLVM_COMPONENTS="${LLVM_COMPONENTS} option"
|
||||
fi
|
||||
fi
|
||||
DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT"
|
||||
DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DLLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
|
||||
MESA_LLVM=1
|
||||
|
||||
dnl Check for Clang internal headers
|
||||
@@ -1629,6 +1659,10 @@ if test "x$enable_gallium_llvm" = xyes; then
|
||||
else
|
||||
MESA_LLVM=0
|
||||
LLVM_VERSION_INT=0
|
||||
|
||||
if test "x$enable_opencl" = xyes; then
|
||||
AC_MSG_ERROR([cannot enable OpenCL without LLVM])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Directory for XVMC libs
|
||||
@@ -1702,8 +1736,9 @@ gallium_require_llvm() {
|
||||
|
||||
gallium_require_drm_loader() {
|
||||
if test "x$enable_gallium_loader" = xyes; then
|
||||
PKG_CHECK_MODULES([LIBUDEV], [libudev], [],
|
||||
AC_MSG_ERROR([Gallium drm loader requires libudev]))
|
||||
if test "x$need_libudev$have_libudev" = xyesno; then
|
||||
AC_MSG_ERROR([Gallium drm loader requires libudev >= $LIBUDEV_REQUIRED])
|
||||
fi
|
||||
if test "x$have_libdrm" != xyes; then
|
||||
AC_MSG_ERROR([Gallium drm loader requires libdrm >= $LIBDRM_REQUIRED])
|
||||
fi
|
||||
|
254
docs/relnotes/10.1.1.html
Normal file
254
docs/relnotes/10.1.1.html
Normal file
@@ -0,0 +1,254 @@
|
||||
<!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.1.1 Release Notes / (April 18, 2014)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.1 is a bug fix release which fixes bugs found since the 10.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.1.1 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
96e63674ccfa98e7ec6eb4fee3f770c3 MesaLib-10.1.1.tar.gz
|
||||
1fde7ed079df7aeb9b6a744ca033de8d MesaLib-10.1.1.tar.bz2
|
||||
e64d0a562638664b13d2edf22321df59 MesaLib-10.1.1.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71547">Bug 71547</a> - compilation failure :#error "SSE4.1 instruction set not enabled"</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74868">Bug 74868</a> - r600g: Diablo III Crashes After a few minutes</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74988">Bug 74988</a> - Buffer overrun (segfault) decompressing ETC2 texture in GLBenchmark 3.0 Manhattan</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75279">Bug 75279</a> - XCloseDisplay() takes one minute around nouveau_dri.so, freezing Firefox startup</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75543">Bug 75543</a> - OSMesa Gallium OSMesaMakeCurrent</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75660">Bug 75660</a> - u_inlines.h:277:pipe_buffer_map_range: Assertion `length' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76323">Bug 76323</a> - GLSL compiler ignores layout(binding=N) on uniform blocks</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76377">Bug 76377</a> - DRI3 should only be enabled on Linux due to a udev dependency</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76749">Bug 76749</a> - [HSW] DOTA world lighting has no effect</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77102">Bug 77102</a> - gallium nouveau has no profile in vdpau and libva</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77207">Bug 77207</a> - [ivb/hsw] batch overwritten with garbage</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Aaron Watry (1):</p>
|
||||
<ul>
|
||||
<li>gallium/util: Fix memory leak</li>
|
||||
</ul>
|
||||
|
||||
<p>Alexander von Gluck IV (1):</p>
|
||||
<ul>
|
||||
<li>haiku: Fix build through scons corrections and viewport fixes</li>
|
||||
</ul>
|
||||
|
||||
<p>Anuj Phogat (2):</p>
|
||||
<ul>
|
||||
<li>mesa: Set initial internal format of a texture to GL_RGBA</li>
|
||||
<li>mesa: Allow GL_DEPTH_COMPONENT and GL_DEPTH_STENCIL combinations in glTexImage{123}D()</li>
|
||||
</ul>
|
||||
|
||||
<p>Brian Paul (12):</p>
|
||||
<ul>
|
||||
<li>softpipe: use 64-bit arithmetic in softpipe_resource_layout()</li>
|
||||
<li>mesa: don't call ctx->Driver.ClearBufferSubData() if size==0</li>
|
||||
<li>st/osmesa: check buffer size when searching for buffers</li>
|
||||
<li>mesa: fix copy & paste bugs in pack_ubyte_SARGB8()</li>
|
||||
<li>mesa: fix copy & paste bugs in pack_ubyte_SRGB8()</li>
|
||||
<li>c11/threads: don't include assert.h if the assert macro is already defined</li>
|
||||
<li>mesa: fix unpack_Z32_FLOAT_X24S8() / unpack_Z32_FLOAT() mix-up</li>
|
||||
<li>st/mesa: add null pointer checking in query object functions</li>
|
||||
<li>mesa: fix glMultiDrawArrays inside a display list</li>
|
||||
<li>cso: fix sampler view count in cso_set_sampler_views()</li>
|
||||
<li>svga: replace sampler assertion with conditional</li>
|
||||
<li>svga: move LIST_INITHEAD(dirty_buffers) earlier in svga_context_create()</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (3):</p>
|
||||
<ul>
|
||||
<li>cherry-ignore: Ignore a few patches</li>
|
||||
<li>glsl: Allow explicit binding on atomics again</li>
|
||||
<li>Update VERSION to 10.1.1</li>
|
||||
</ul>
|
||||
|
||||
<p>Chia-I Wu (1):</p>
|
||||
<ul>
|
||||
<li>i965/vec4: fix record clearing in copy propagation</li>
|
||||
</ul>
|
||||
|
||||
<p>Christian König (2):</p>
|
||||
<ul>
|
||||
<li>st/mesa: recreate sampler view on context change v3</li>
|
||||
<li>st/mesa: fix sampler view handling with shared textures v4</li>
|
||||
</ul>
|
||||
|
||||
<p>Courtney Goeltzenleuchter (1):</p>
|
||||
<ul>
|
||||
<li>mesa: add bounds checking to eliminate buffer overrun</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (5):</p>
|
||||
<ul>
|
||||
<li>nv50: add missing brackets when handling the samplers array</li>
|
||||
<li>mesa: return v.value_int64 when the requested type is TYPE_INT64</li>
|
||||
<li>configure: enable dri3 only for linux</li>
|
||||
<li>glx: drop obsolete _XUnlock_Mutex in __glXInitialize error path</li>
|
||||
<li>configure: cleanup libudev handling</li>
|
||||
</ul>
|
||||
|
||||
<p>Eric Anholt (1):</p>
|
||||
<ul>
|
||||
<li>i965: Fix buffer overruns in MSAA MCS buffer clearing.</li>
|
||||
</ul>
|
||||
|
||||
<p>Hans (2):</p>
|
||||
<ul>
|
||||
<li>util: don't define isfinite(), isnan() for MSVC >= 1800</li>
|
||||
<li>mesa: don't define c99 math functions for MSVC >= 1800</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (7):</p>
|
||||
<ul>
|
||||
<li>linker: Split set_uniform_binding into separate functions for blocks and samplers</li>
|
||||
<li>linker: Various trivial clean-ups in set_sampler_binding</li>
|
||||
<li>linker: Fold set_uniform_binding into call site</li>
|
||||
<li>linker: Clean up "unused parameter" warnings</li>
|
||||
<li>linker: Set block bindings based on UniformBlocks rather than UniformStorage</li>
|
||||
<li>linker: Set binding for all elements of UBO array</li>
|
||||
<li>glsl: Propagate explicit binding information from the AST all the way to the linker</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (8):</p>
|
||||
<ul>
|
||||
<li>nouveau: fix fence waiting logic in screen destroy</li>
|
||||
<li>nv50: adjust blit_3d handling of ms output textures</li>
|
||||
<li>loader: add special logic to distinguish nouveau from nouveau_vieux</li>
|
||||
<li>mesa/main: condition GL_DEPTH_STENCIL on ARB_depth_texture</li>
|
||||
<li>nouveau: add forgotten GL_COMPRESSED_INTENSITY to texture format list</li>
|
||||
<li>nouveau: there may not have been a texture if the fbo was incomplete</li>
|
||||
<li>nvc0/ir: move sample id to second source arg to fix sampler2DMS</li>
|
||||
<li>nouveau: fix firmware check on nvd7/nvd9</li>
|
||||
</ul>
|
||||
|
||||
<p>Johannes Nixdorf (1):</p>
|
||||
<ul>
|
||||
<li>configure.ac: fix the detection of expat with pkg-config</li>
|
||||
</ul>
|
||||
|
||||
<p>Jonathan Gray (7):</p>
|
||||
<ul>
|
||||
<li>gallium: add endian detection for OpenBSD</li>
|
||||
<li>loader: use 0 instead of FALSE which isn't defined</li>
|
||||
<li>loader: don't limit the non-udev path to only android</li>
|
||||
<li>megadriver_stub.c: don't use _GNU_SOURCE to gate the compat code</li>
|
||||
<li>egl/dri2: don't require libudev to build drm/wayland platforms</li>
|
||||
<li>egl/dri2: use drm macros to construct device name</li>
|
||||
<li>configure: don't require libudev for gbm or egl drm/wayland</li>
|
||||
</ul>
|
||||
|
||||
<p>José Fonseca (4):</p>
|
||||
<ul>
|
||||
<li>c11/threads: Fix nano to milisecond conversion.</li>
|
||||
<li>mapi/u_thread: Use GetCurrentThreadId</li>
|
||||
<li>c11/threads: Don't implement thrd_current on Windows.</li>
|
||||
<li>draw: Duplicate TGSI tokens in draw_pipe_pstipple module.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (4):</p>
|
||||
<ul>
|
||||
<li>i965/fs: Fix register comparisons in saturate propagation.</li>
|
||||
<li>glsl: Fix lack of i2u in lower_ubo_reference.</li>
|
||||
<li>i965: Stop advertising GL_MESA_ycbcr_texture.</li>
|
||||
<li>glsl: Try vectorizing when seeing a repeated assignment to a channel.</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (13):</p>
|
||||
<ul>
|
||||
<li>r600g: fix texelFetchOffset GLSL functions</li>
|
||||
<li>r600g: fix blitting the last 2 mipmap levels for Evergreen</li>
|
||||
<li>mesa: fix the format of glEdgeFlagPointer</li>
|
||||
<li>r600g,radeonsi: fix MAX_TEXTURE_3D_LEVELS and MAX_TEXTURE_ARRAY_LAYERS limits</li>
|
||||
<li>st/mesa: fix per-vertex edge flags and GLSL support (v2)</li>
|
||||
<li>mesa: mark GL_RGB9_E5 as not color-renderable</li>
|
||||
<li>mesa: fix texture border handling for cube arrays</li>
|
||||
<li>mesa: allow generating mipmaps for cube arrays</li>
|
||||
<li>mesa: fix software fallback for generating mipmaps for cube arrays</li>
|
||||
<li>mesa: fix software fallback for generating mipmaps for 3D textures</li>
|
||||
<li>st/mesa: fix generating mipmaps for cube arrays</li>
|
||||
<li>st/mesa: drop the lowering of quad strips to triangle strips</li>
|
||||
<li>r600g: implement edge flags</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (4):</p>
|
||||
<ul>
|
||||
<li>mesa: Wrap SSE4.1 code in #ifdef __SSE4_1__.</li>
|
||||
<li>i965/fs: Fix off-by-one in saturate propagation.</li>
|
||||
<li>i965/fs: Don't propagate saturate modifiers into partial writes.</li>
|
||||
<li>i965/fs: Don't propagate saturation modifiers if there are source modifiers.</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (1):</p>
|
||||
<ul>
|
||||
<li>r600g: Don't leak bytecode on shader compile failure</li>
|
||||
</ul>
|
||||
|
||||
<p>Mike Stroyan (1):</p>
|
||||
<ul>
|
||||
<li>i965: Avoid dependency hints on math opcodes</li>
|
||||
</ul>
|
||||
|
||||
<p>Thomas Hellstrom (5):</p>
|
||||
<ul>
|
||||
<li>winsys/svga: Replace the query mm buffer pool with a slab pool v3</li>
|
||||
<li>winsys/svga: Update the vmwgfx_drm.h header to latest version from kernel</li>
|
||||
<li>winsys/svga: Fix prime surface references also for guest-backed surfaces</li>
|
||||
<li>st/xa: Bind destination before setting new state</li>
|
||||
<li>st/xa: Make sure unused samplers are set to NULL</li>
|
||||
</ul>
|
||||
|
||||
<p>Tom Stellard (1):</p>
|
||||
<ul>
|
||||
<li>configure: Use LLVM shared libraries by default</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
179
docs/relnotes/10.1.2.html
Normal file
179
docs/relnotes/10.1.2.html
Normal file
@@ -0,0 +1,179 @@
|
||||
<!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.1.2 Release Notes / (May 5, 2014)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.2 is a bug fix release which fixes bugs found since the 10.1.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.1.2 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
37d79f94b1f41852a89d1fc3900bea76 MesaLib-10.1.2.tar.gz
|
||||
28b60d15ac9f364da1e0155911eaf44e MesaLib-10.1.2.tar.bz2
|
||||
05300039085a65fc53c5472c4bb5747a MesaLib-10.1.2.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=27499">Bug 27499</a> - [855GM i915] GL_LINE_STIPPLE displays incorrect colors</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75723">Bug 75723</a> - (regression since Linux 3.14?) brw_get_graphics_reset_status: Assertion `brw->hw_ctx != ((void *)0)' failed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76894">Bug 76894</a> - Piglit/spec/EXT_framebuffer_object/fbo-bind-renderbuffer failed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77702">Bug 77702</a> - [i965 Bisected]Piglit spec/NV_conditional_render_blitframebuffer fails</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Ander Conselvan de Oliveira (2):</p>
|
||||
<ul>
|
||||
<li>gbm/dri: Fix out-of-memory error path in dri_device_create()</li>
|
||||
<li>egl: Protect use of gbm_dri with ifdef HAVE_DRM_PLATFORM</li>
|
||||
</ul>
|
||||
|
||||
<p>Anuj Phogat (27):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix glGetVertexAttribi(GL_VERTEX_ATTRIB_ARRAY_SIZE)</li>
|
||||
<li>swrast: Add glBlitFramebuffer to commands affected by conditional rendering</li>
|
||||
<li>mesa: Fix error condition for multisample proxy texture targets</li>
|
||||
<li>i965: Put an assertion to check valid varying_to_slot[varying]</li>
|
||||
<li>i965: Fix component mask and varying_to_slot mapping for gl_Layer</li>
|
||||
<li>i965: Fix component mask and varying_to_slot mapping for gl_ViewportIndex</li>
|
||||
<li>mesa: Add helper function _mesa_is_format_integer()</li>
|
||||
<li>mesa: Add error condition for integer formats in glGetTexImage()</li>
|
||||
<li>mesa: Add an error condition in glGetFramebufferAttachmentParameteriv()</li>
|
||||
<li>mesa: Fix error code generation in glReadPixels()</li>
|
||||
<li>glsl: Allow overlapping locations for vertex input attributes</li>
|
||||
<li>mesa: Fix querying location of nth element of an array variable</li>
|
||||
<li>mesa: Use location VERT_ATTRIB_GENERIC0 for vertex attribute 0</li>
|
||||
<li>glsl: Compile error if fs defines conflicting qualifiers for gl_FragCoord</li>
|
||||
<li>glsl: Compile error if fs uses gl_FragCoord before first redeclaration</li>
|
||||
<li>mesa: Add entry for extension ARB_texture_stencil8</li>
|
||||
<li>mesa: Add error condition for format=STENCIL_INDEX in glGetTexImage()</li>
|
||||
<li>i965: Fix crash in do_blit_readpixels()</li>
|
||||
<li>mesa: Add missing types in _mesa_texstore_xx_xx() functions</li>
|
||||
<li>mesa: Allow srcFormat=GL_DEPTH_STENCIL in _mesa_texstore_xx_xx() functions</li>
|
||||
<li>mesa: Add new helper function _mesa_unpack_depth_stencil_row()</li>
|
||||
<li>mesa: Add support to unpack depth-stencil texture in to FLOAT_32_UNSIGNED_INT_24_8_REV</li>
|
||||
<li>mesa: Allow FLOAT_32_UNSIGNED_INT_24_8_REV in get_tex_depth_stencil()</li>
|
||||
<li>i965: Add glBlitFramebuffer to commands affected by conditional rendering</li>
|
||||
<li>glsl: Use switch to allow adding more shader types</li>
|
||||
<li>glsl: Link error if fs defines conflicting qualifiers for gl_FragCoord</li>
|
||||
<li>glsl: Apply the link error conditions to GL_ARB_fragment_coord_conventions</li>
|
||||
</ul>
|
||||
|
||||
<p>Benjamin Bellec (1):</p>
|
||||
<ul>
|
||||
<li>mesa: fix GetStringi error message with correct function name</li>
|
||||
</ul>
|
||||
|
||||
<p>Brian Paul (1):</p>
|
||||
<ul>
|
||||
<li>swrast: allocate swrast_texture_image::ImageSlices array if needed</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (4):</p>
|
||||
<ul>
|
||||
<li>docs: Add the MD5 sums for the 10.1.1 release tar files.</li>
|
||||
<li>cherry-ignore: Ignore a patch causing a regression</li>
|
||||
<li>cherry-ignore: Drop an ignored patch now that piglit has been updated.</li>
|
||||
<li>Update VERSION to 10.1.2</li>
|
||||
</ul>
|
||||
|
||||
<p>Chris Forbes (1):</p>
|
||||
<ul>
|
||||
<li>glsl: Only allow `invariant` on shader in/out between stages.</li>
|
||||
</ul>
|
||||
|
||||
<p>Eric Anholt (1):</p>
|
||||
<ul>
|
||||
<li>i965: Fix render-to-texture in non-FinishRenderTexture cases.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (1):</p>
|
||||
<ul>
|
||||
<li>dri3: Enable GLX_MESA_query_renderer on DRI3 too</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (2):</p>
|
||||
<ul>
|
||||
<li>i965: Don't enable reset notification support on Gen4-5.</li>
|
||||
<li>i965: Actually emit PIPELINE_SELECT and 3DSTATE_VF_STATISTICS.</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (10):</p>
|
||||
<ul>
|
||||
<li>r300g: don't crash when getting NULL colorbuffers</li>
|
||||
<li>st/mesa: remove trailing NULL colorbuffers</li>
|
||||
<li>r600g: fix edge flags and layered rendering on R600-R700</li>
|
||||
<li>r600g: disable async DMA on R700</li>
|
||||
<li>r600g: fix MSAA resolve on R6xx when the destination is 1D-tiled</li>
|
||||
<li>r600g: fix flushing on RV670, RS780, RS880 again</li>
|
||||
<li>r600g: fix buffer copying on R600-R700</li>
|
||||
<li>r600g: fix for broken CULL_FRONT behavior on R6xx</li>
|
||||
<li>r600g: fix for an MSAA hang on RV770</li>
|
||||
<li>r600g: fix hang on RV740 by using DX_RASTERIZATION_KILL instead of SX_MISC</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (2):</p>
|
||||
<ul>
|
||||
<li>r600g: Disable LLVM by default at runtime for graphics</li>
|
||||
<li>st/mesa: Fix NULL pointer dereference for incomplete framebuffers</li>
|
||||
</ul>
|
||||
|
||||
<p>Neil Roberts (1):</p>
|
||||
<ul>
|
||||
<li>wayland: Fix the logic in disabling the prime capability</li>
|
||||
</ul>
|
||||
|
||||
<p>Samuel Iglesias Gonsalvez (1):</p>
|
||||
<ul>
|
||||
<li>mesa: fix check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()</li>
|
||||
</ul>
|
||||
|
||||
<p>Thomas Hellstrom (1):</p>
|
||||
<ul>
|
||||
<li>st/xa: Cache render target surface</li>
|
||||
</ul>
|
||||
|
||||
<p>nick (1):</p>
|
||||
<ul>
|
||||
<li>swrast: Fix vertex color in _swsetup_Translate()</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
90
docs/relnotes/10.1.3.html
Normal file
90
docs/relnotes/10.1.3.html
Normal file
@@ -0,0 +1,90 @@
|
||||
<!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.1.3 Release Notes / (May 9, 2014)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.3 is a bug fix release which fixes bugs found since the 10.1.2 release.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Note: Mesa 10.1.3 is being released sooner than originally scheduled to make
|
||||
available a fix for a performance rgression that was inadvertently introduced
|
||||
to Mesa 10.1.2. The performance regression is reported to make vmware
|
||||
swapbuffers fall back to software.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.3 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
665fe1656aaa2c37b32042068aff92cb MesaLib-10.1.3.tar.gz
|
||||
ba6dbe2b9cab0b4de840c996b9b6a3ad MesaLib-10.1.3.tar.bz2
|
||||
4e6f26330a63d3c47e62ac4bdead39e8 MesaLib-10.1.3.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77245">Bug 77245</a> - Bogus GL_ARB_explicit_attrib_location layout identifier warnings</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Carl Worth (3):</p>
|
||||
<ul>
|
||||
<li>docs: Add MD5 sums for Mesa 10.1.2</li>
|
||||
<li>get-pick-list.sh: Require explicit "10.1" for nominating stable patches</li>
|
||||
<li>VERSION: Update to 10.1.3</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (2):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix MaxNumLayers for 1D array textures.</li>
|
||||
<li>i965: Fix depth (array slices) computation for 1D_ARRAY render targets.</li>
|
||||
</ul>
|
||||
|
||||
<p>Tapani Pälli (1):</p>
|
||||
<ul>
|
||||
<li>glsl: fix bogus layout qualifier warnings</li>
|
||||
</ul>
|
||||
|
||||
<p>Thomas Hellstrom (1):</p>
|
||||
<ul>
|
||||
<li>st/xa: Fix performance regression introduced by commit "Cache render target surface"</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
100
docs/relnotes/10.1.4.html
Normal file
100
docs/relnotes/10.1.4.html
Normal file
@@ -0,0 +1,100 @@
|
||||
<!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.1.4 Release Notes / (May 20, 2014)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.4 is a bug fix release which fixes bugs found since the 10.1.3 release.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.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>MD5 checksums</h2>
|
||||
<pre>
|
||||
e934365d77f384bfaec844999440bef8 MesaLib-10.1.4.tar.gz
|
||||
6fddee101f49b7409cd29994c34ddee7 MesaLib-10.1.4.tar.bz2
|
||||
ba5f48e7d5e373922c804c2651fec6c1 MesaLib-10.1.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=78225">Bug 78225</a> - Compile error due to undefined reference to `gbm_dri_backend', fix attached</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=78537">Bug 78537</a> - no anisotropic filtering in a native Half-Life 2</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Brian Paul (1):</p>
|
||||
<ul>
|
||||
<li>mesa: fix double-freeing of dispatch tables inside glBegin/End.</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (3):</p>
|
||||
<ul>
|
||||
<li>docs: Add MD5 sums for 10.1.3</li>
|
||||
<li>cherry-ignore: Roland and Michel agreed to drop these patches.</li>
|
||||
<li>VERSION: Update to 10.1.4</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (1):</p>
|
||||
<ul>
|
||||
<li>configure: error out if building GBM without dri</li>
|
||||
</ul>
|
||||
|
||||
<p>Eric Anholt (1):</p>
|
||||
<ul>
|
||||
<li>i965/vs: Use samplers for UBOs in the VS like we do for non-UBO pulls.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (3):</p>
|
||||
<ul>
|
||||
<li>nv50/ir: make sure to reverse cond codes on all the OP_SET variants</li>
|
||||
<li>nv50: fix setting of texture ms info to be per-stage</li>
|
||||
<li>nv50/ir: fix integer mul lowering for u32 x u32 -> high u32</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (1):</p>
|
||||
<ul>
|
||||
<li>radeonsi: Fix anisotropic filtering state setup</li>
|
||||
</ul>
|
||||
|
||||
<p>Tom Stellard (2):</p>
|
||||
<ul>
|
||||
<li>configure.ac: Add LLVM_VERSION_PATCH to DEFINES</li>
|
||||
<li>radeonsi: Enable geometry shaders with LLVM 3.4.1</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
105
docs/relnotes/10.1.5.html
Normal file
105
docs/relnotes/10.1.5.html
Normal file
@@ -0,0 +1,105 @@
|
||||
<!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.1.5 Release Notes / (June 6, 2014)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.5 is a bug fix release which fixes bugs found since the 10.1.4 release.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.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>
|
||||
b0aceaa75bc9a9b2d9215a113e2ad488b5cf85c99005a7624f8cf7c37c5d0eaa MesaLib-10.1.5.tar.gz
|
||||
bc6c5ec7836f254a49d055a29d9aa34c97c54c038f47ad3a00fa57a5fef15bbc MesaLib-10.1.5.tar.bz2
|
||||
78b7255cab0af7918945452a84de7989096ebcdd27e99b31c56c0589274cbc77 MesaLib-10.1.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=79115">Bug 79115</a> - </li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79421">Bug 79421</a> - </li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Brian Paul (1):</p>
|
||||
<ul>
|
||||
<li>glsl: fix use-after free bug/crash in ast_declarator_list::hir()</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (5):</p>
|
||||
<ul>
|
||||
<li>docs: Add md5sums for 10.1.4 release</li>
|
||||
<li>Merge remote-tracking branch 'origin/10.1' into 10.1</li>
|
||||
<li>cherry-ignore: Ignore two commits.</li>
|
||||
<li>Ignore a patch that is not needed for the 10.1 branch.</li>
|
||||
<li>Update version to 10.1.5</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (1):</p>
|
||||
<ul>
|
||||
<li>glx: do not leak dri3Display</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (2):</p>
|
||||
<ul>
|
||||
<li>nv50/ir: fix s32 x s32 -> high s32 multiply logic</li>
|
||||
<li>nv50/ir: fix constant folding for OP_MUL subop HIGH</li>
|
||||
</ul>
|
||||
|
||||
<p>James Legg (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix unbinding GL_DEPTH_STENCIL_ATTACHMENT</li>
|
||||
</ul>
|
||||
|
||||
<p>Jeremy Huddleston Sequoia (2):</p>
|
||||
<ul>
|
||||
<li>glapi: Avoid heap corruption in _glapi_table</li>
|
||||
<li>darwin: Fix test for kCGLPFAOpenGLProfile support at runtime</li>
|
||||
</ul>
|
||||
|
||||
<p>Pavel Popov (2):</p>
|
||||
<ul>
|
||||
<li>i965: Properly return *RESET* status in glGetGraphicsResetStatusARB</li>
|
||||
<li>i965: Fix Line Stipple enable bit in 3DSTATE_SF for Haswell.</li>
|
||||
</ul>
|
||||
|
||||
<p>Roland Scheidegger (1):</p>
|
||||
<ul>
|
||||
<li>llvmpipe: fix crash when not all attachments are populated in a fb</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
135
docs/relnotes/10.1.6.html
Normal file
135
docs/relnotes/10.1.6.html
Normal file
@@ -0,0 +1,135 @@
|
||||
<!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.1.6 Release Notes / (June 24, 2014)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.6 is a bug fix release which fixes bugs found since the 10.1.5 release.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.6 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
</pre>
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=54372">Bug 54372</a> - GLX_INTEL_swap_event crashes driver when swapping window buffers</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74005">Bug 74005</a> - [i965 Bisected]Piglit/glx_glx-make-glxdrawable-current fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=78581">Bug 78581</a> - </li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79729">Bug 79729</a> - [i965] glClear on a multisample texture doesn't work</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Adrian Negreanu (7):</p>
|
||||
<ul>
|
||||
<li>add megadriver_stub_FILES</li>
|
||||
<li>android: adapt to the megadriver mechanism</li>
|
||||
<li>android: add libloader to libGLES_mesa and libmesa_egl_dri2</li>
|
||||
<li>android: add src/gallium/auxiliary as include path for libmesa_dricore</li>
|
||||
<li>android, egl: add correct drm include for libmesa_egl_dri2</li>
|
||||
<li>android, mesa_gen_matypes: pull in timespec POSIX definition</li>
|
||||
<li>android, dricore: undefined reference to _mesa_streaming_load_memcpy</li>
|
||||
</ul>
|
||||
|
||||
<p>Beren Minor (1):</p>
|
||||
<ul>
|
||||
<li>egl/main: Fix eglMakeCurrent when releasing context from current thread.</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (3):</p>
|
||||
<ul>
|
||||
<li>docs: Add SHA256 checksums for the 10.1.5 release</li>
|
||||
<li>cherry-ignore: Add a patch to ignore</li>
|
||||
<li>Update VERSION to 10.1.6</li>
|
||||
</ul>
|
||||
|
||||
<p>Daniel Manjarres (1):</p>
|
||||
<ul>
|
||||
<li>glx: Don't crash on swap event for a Window (non-GLXWindow)</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (1):</p>
|
||||
<ul>
|
||||
<li>configure: error out when building opencl without LLVM</li>
|
||||
</ul>
|
||||
|
||||
<p>Iago Toral Quiroga (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Copy Geom.UsesEndPrimitive when cloning a geometry program.</li>
|
||||
</ul>
|
||||
|
||||
<p>José Fonseca (3):</p>
|
||||
<ul>
|
||||
<li>mesa/main: Make get_hash.c values constant.</li>
|
||||
<li>mesa: Make glGetIntegerv(GL_*_ARRAY_SIZE) return GL_BGRA.</li>
|
||||
<li>mesa/main: Prevent sefgault on glGetIntegerv(GL_ATOMIC_COUNTER_BUFFER_BINDING).</li>
|
||||
</ul>
|
||||
|
||||
<p>Kristian Høgsberg (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Remove glClear optimization based on drawable size</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (1):</p>
|
||||
<ul>
|
||||
<li>configure: Only check for OpenCL without LLVM when the latter is certain</li>
|
||||
</ul>
|
||||
|
||||
<p>Neil Roberts (1):</p>
|
||||
<ul>
|
||||
<li>i965: Set the fast clear color value for texture surfaces</li>
|
||||
</ul>
|
||||
|
||||
<p>Roland Scheidegger (1):</p>
|
||||
<ul>
|
||||
<li>draw: (trivial) fix clamping of viewport index</li>
|
||||
</ul>
|
||||
|
||||
<p>Tobias Klausmann (1):</p>
|
||||
<ul>
|
||||
<li>nv50/ir: clear subop when folding constant expressions</li>
|
||||
</ul>
|
||||
|
||||
<p>Tom Stellard (2):</p>
|
||||
<ul>
|
||||
<li>clover: Prevent Clang from printing number of errors and warnings to stderr.</li>
|
||||
<li>clover: Don't use llvm's global context</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -27,7 +27,9 @@
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#ifndef assert
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
@@ -26,7 +26,9 @@
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef assert
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include <process.h> // MSVCRT
|
||||
@@ -146,7 +148,7 @@ static unsigned __stdcall impl_thrd_routine(void *p)
|
||||
|
||||
static DWORD impl_xtime2msec(const xtime *xt)
|
||||
{
|
||||
return (DWORD)((xt->sec * 1000u) + (xt->nsec / 1000));
|
||||
return (DWORD)((xt->sec * 1000U) + (xt->nsec / 1000000L));
|
||||
}
|
||||
|
||||
#ifdef EMULATED_THREADS_USE_NATIVE_CALL_ONCE
|
||||
@@ -492,12 +494,42 @@ thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
#if 0
|
||||
// 7.25.5.2
|
||||
static inline thrd_t
|
||||
thrd_current(void)
|
||||
{
|
||||
return GetCurrentThread();
|
||||
HANDLE hCurrentThread;
|
||||
BOOL bRet;
|
||||
|
||||
/* GetCurrentThread() returns a pseudo-handle, which is useless. We need
|
||||
* to call DuplicateHandle to get a real handle. However the handle value
|
||||
* will not match the one returned by thread_create.
|
||||
*
|
||||
* Other potential solutions would be:
|
||||
* - define thrd_t as a thread Ids, but this would mean we'd need to OpenThread for many operations
|
||||
* - use malloc'ed memory for thrd_t. This would imply using TLS for current thread.
|
||||
*
|
||||
* Neither is particularly nice.
|
||||
*
|
||||
* Life would be much easier if C11 threads had different abstractions for
|
||||
* threads and thread IDs, just like C++11 threads does...
|
||||
*/
|
||||
|
||||
bRet = DuplicateHandle(GetCurrentProcess(), // source process (pseudo) handle
|
||||
GetCurrentThread(), // source (pseudo) handle
|
||||
GetCurrentProcess(), // target process
|
||||
&hCurrentThread, // target handle
|
||||
0,
|
||||
FALSE,
|
||||
DUPLICATE_SAME_ACCESS);
|
||||
assert(bRet);
|
||||
if (!bRet) {
|
||||
hCurrentThread = GetCurrentThread();
|
||||
}
|
||||
return hCurrentThread;
|
||||
}
|
||||
#endif
|
||||
|
||||
// 7.25.5.3
|
||||
static inline int
|
||||
@@ -511,7 +543,7 @@ thrd_detach(thrd_t thr)
|
||||
static inline int
|
||||
thrd_equal(thrd_t thr0, thrd_t thr1)
|
||||
{
|
||||
return (thr0 == thr1);
|
||||
return GetThreadId(thr0) == GetThreadId(thr1);
|
||||
}
|
||||
|
||||
// 7.25.5.5
|
||||
|
@@ -269,6 +269,11 @@ def generate(env):
|
||||
cppdefines += ['HAVE_ALIAS']
|
||||
else:
|
||||
cppdefines += ['GLX_ALIAS_UNSUPPORTED']
|
||||
if env['platform'] == 'haiku':
|
||||
cppdefines += [
|
||||
'HAVE_PTHREAD',
|
||||
'HAVE_POSIX_MEMALIGN'
|
||||
]
|
||||
if platform == 'windows':
|
||||
cppdefines += [
|
||||
'WIN32',
|
||||
|
@@ -40,8 +40,12 @@ LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src/mapi \
|
||||
$(MESA_TOP)/src/egl/main \
|
||||
$(MESA_TOP)/src/loader \
|
||||
$(DRM_TOP)/include/drm \
|
||||
$(DRM_GRALLOC_TOP)
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
libloader
|
||||
|
||||
LOCAL_MODULE := libmesa_egl_dri2
|
||||
|
||||
include $(MESA_COMMON_MK)
|
||||
|
@@ -626,7 +626,6 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
return dri2_initialize_x11(drv, disp);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBUDEV
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
case _EGL_PLATFORM_DRM:
|
||||
if (disp->Options.TestOnly)
|
||||
@@ -639,7 +638,6 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
return EGL_TRUE;
|
||||
return dri2_initialize_wayland(drv, disp);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_ANDROID_PLATFORM
|
||||
case _EGL_PLATFORM_ANDROID:
|
||||
if (disp->Options.TestOnly)
|
||||
@@ -1894,10 +1892,12 @@ dri2_bind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
if (!dri2_dpy->wl_server_drm)
|
||||
return EGL_FALSE;
|
||||
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
/* We have to share the wl_drm instance with gbm, so gbm can convert
|
||||
* wl_buffers to gbm bos. */
|
||||
if (dri2_dpy->gbm_dri)
|
||||
dri2_dpy->gbm_dri->wl_drm = dri2_dpy->wl_server_drm;
|
||||
#endif
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
@@ -458,7 +458,12 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
|
||||
gbm = disp->PlatformDisplay;
|
||||
if (gbm == NULL) {
|
||||
fd = open("/dev/dri/card0", O_RDWR);
|
||||
char buf[64];
|
||||
int n = snprintf(buf, sizeof(buf), DRM_DEV_NAME, DRM_DIR_NAME, 0);
|
||||
if (n != -1 && n < sizeof(buf))
|
||||
fd = open(buf, O_RDWR);
|
||||
if (fd < 0)
|
||||
fd = open("/dev/dri/card0", O_RDWR);
|
||||
dri2_dpy->own_device = 1;
|
||||
gbm = gbm_create_device(fd);
|
||||
if (gbm == NULL)
|
||||
|
@@ -1045,7 +1045,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
|
||||
if (dri2_dpy->image->base.version < 7 ||
|
||||
dri2_dpy->image->createImageFromFds == NULL)
|
||||
dri2_dpy->capabilities &= WL_DRM_CAPABILITY_PRIME;
|
||||
dri2_dpy->capabilities &= ~WL_DRM_CAPABILITY_PRIME;
|
||||
|
||||
types = EGL_WINDOW_BIT;
|
||||
for (i = 0; dri2_dpy->driver_configs[i]; i++) {
|
||||
|
@@ -154,11 +154,14 @@ LOCAL_STATIC_LIBRARIES := \
|
||||
libmesa_glsl \
|
||||
libmesa_glsl_utils \
|
||||
libmesa_gallium \
|
||||
libloader \
|
||||
$(LOCAL_STATIC_LIBRARIES)
|
||||
|
||||
endif # MESA_BUILD_GALLIUM
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
$(LOCAL_STATIC_LIBRARIES) \
|
||||
libloader
|
||||
|
||||
LOCAL_MODULE := libGLES_mesa
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
|
||||
|
||||
|
@@ -490,8 +490,12 @@ eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read,
|
||||
if (!context && ctx != EGL_NO_CONTEXT)
|
||||
RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_FALSE);
|
||||
if (!draw_surf || !read_surf) {
|
||||
/* surfaces may be NULL if surfaceless */
|
||||
if (!disp->Extensions.KHR_surfaceless_context)
|
||||
/* From the EGL 1.4 (20130211) spec:
|
||||
*
|
||||
* To release the current context without assigning a new one, set ctx
|
||||
* to EGL_NO_CONTEXT and set draw and read to EGL_NO_SURFACE.
|
||||
*/
|
||||
if (!disp->Extensions.KHR_surfaceless_context && ctx != EGL_NO_CONTEXT)
|
||||
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
|
||||
|
||||
if ((!draw_surf && draw != EGL_NO_SURFACE) ||
|
||||
|
@@ -1187,11 +1187,12 @@ cso_set_sampler_views(struct cso_context *ctx,
|
||||
pipe_sampler_view_reference(&info->views[i], NULL);
|
||||
}
|
||||
|
||||
info->nr_views = count;
|
||||
|
||||
/* bind the new sampler views */
|
||||
ctx->pipe->set_sampler_views(ctx->pipe, shader_stage, 0, count,
|
||||
ctx->pipe->set_sampler_views(ctx->pipe, shader_stage, 0,
|
||||
MAX2(info->nr_views, count),
|
||||
info->views);
|
||||
|
||||
info->nr_views = count;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -673,7 +673,7 @@ pstip_create_fs_state(struct pipe_context *pipe,
|
||||
struct pstip_fragment_shader *pstipfs = CALLOC_STRUCT(pstip_fragment_shader);
|
||||
|
||||
if (pstipfs) {
|
||||
pstipfs->state = *fs;
|
||||
pstipfs->state.tokens = tgsi_dup_tokens(fs->tokens);
|
||||
|
||||
/* pass-through */
|
||||
pstipfs->driver_fs = pstip->driver_create_fs_state(pstip->pipe, fs);
|
||||
@@ -707,6 +707,7 @@ pstip_delete_fs_state(struct pipe_context *pipe, void *fs)
|
||||
if (pstipfs->pstip_fs)
|
||||
pstip->driver_delete_fs_state(pstip->pipe, pstipfs->pstip_fs);
|
||||
|
||||
FREE((void*)pstipfs->state.tokens);
|
||||
FREE(pstipfs);
|
||||
}
|
||||
|
||||
|
@@ -495,7 +495,7 @@ draw_stats_clipper_primitives(struct draw_context *draw,
|
||||
static INLINE unsigned
|
||||
draw_clamp_viewport_idx(int idx)
|
||||
{
|
||||
return ((PIPE_MAX_VIEWPORTS > idx || idx < 0) ? idx : 0);
|
||||
return ((PIPE_MAX_VIEWPORTS > idx && idx >= 0) ? idx : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -364,6 +364,8 @@ void util_blitter_destroy(struct blitter_context *blitter)
|
||||
pipe->delete_vs_state(pipe, ctx->vs);
|
||||
if (ctx->vs_pos_only)
|
||||
pipe->delete_vs_state(pipe, ctx->vs_pos_only);
|
||||
if (ctx->vs_layered)
|
||||
pipe->delete_vs_state(pipe, ctx->vs_layered);
|
||||
pipe->delete_vertex_elements_state(pipe, ctx->velem_state);
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (ctx->velem_state_readbuf[i]) {
|
||||
|
@@ -1382,7 +1382,7 @@ get_next_slot(struct gen_mipmap_state *ctx)
|
||||
static unsigned
|
||||
set_vertex_data(struct gen_mipmap_state *ctx,
|
||||
enum pipe_texture_target tex_target,
|
||||
uint layer, float r)
|
||||
uint face, float r)
|
||||
{
|
||||
unsigned offset;
|
||||
|
||||
@@ -1403,14 +1403,21 @@ set_vertex_data(struct gen_mipmap_state *ctx,
|
||||
ctx->vertices[3][0][1] = 1.0f;
|
||||
|
||||
/* Setup vertex texcoords. This is a little tricky for cube maps. */
|
||||
if (tex_target == PIPE_TEXTURE_CUBE) {
|
||||
if (tex_target == PIPE_TEXTURE_CUBE ||
|
||||
tex_target == PIPE_TEXTURE_CUBE_ARRAY) {
|
||||
static const float st[4][2] = {
|
||||
{0.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, 1.0f}, {0.0f, 1.0f}
|
||||
};
|
||||
|
||||
util_map_texcoords2d_onto_cubemap(layer, &st[0][0], 2,
|
||||
util_map_texcoords2d_onto_cubemap(face, &st[0][0], 2,
|
||||
&ctx->vertices[0][1][0], 8,
|
||||
FALSE);
|
||||
|
||||
/* set the layer for cube arrays */
|
||||
ctx->vertices[0][1][3] = r;
|
||||
ctx->vertices[1][1][3] = r;
|
||||
ctx->vertices[2][1][3] = r;
|
||||
ctx->vertices[3][1][3] = r;
|
||||
}
|
||||
else if (tex_target == PIPE_TEXTURE_1D_ARRAY) {
|
||||
/* 1D texture array */
|
||||
@@ -1520,29 +1527,7 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
|
||||
assert(filter == PIPE_TEX_FILTER_LINEAR ||
|
||||
filter == PIPE_TEX_FILTER_NEAREST);
|
||||
|
||||
switch (pt->target) {
|
||||
case PIPE_TEXTURE_1D:
|
||||
type = TGSI_TEXTURE_1D;
|
||||
break;
|
||||
case PIPE_TEXTURE_2D:
|
||||
type = TGSI_TEXTURE_2D;
|
||||
break;
|
||||
case PIPE_TEXTURE_3D:
|
||||
type = TGSI_TEXTURE_3D;
|
||||
break;
|
||||
case PIPE_TEXTURE_CUBE:
|
||||
type = TGSI_TEXTURE_CUBE;
|
||||
break;
|
||||
case PIPE_TEXTURE_1D_ARRAY:
|
||||
type = TGSI_TEXTURE_1D_ARRAY;
|
||||
break;
|
||||
case PIPE_TEXTURE_2D_ARRAY:
|
||||
type = TGSI_TEXTURE_2D_ARRAY;
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
type = TGSI_TEXTURE_2D;
|
||||
}
|
||||
type = util_pipe_tex_to_tgsi_tex(pt->target, 1);
|
||||
|
||||
/* check if we can render in the texture's format */
|
||||
if (!screen->is_format_supported(screen, psv->format, pt->target,
|
||||
@@ -1600,7 +1585,9 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
|
||||
|
||||
if (pt->target == PIPE_TEXTURE_3D)
|
||||
nr_layers = u_minify(pt->depth0, dstLevel);
|
||||
else if (pt->target == PIPE_TEXTURE_2D_ARRAY || pt->target == PIPE_TEXTURE_1D_ARRAY)
|
||||
else if (pt->target == PIPE_TEXTURE_2D_ARRAY ||
|
||||
pt->target == PIPE_TEXTURE_1D_ARRAY ||
|
||||
pt->target == PIPE_TEXTURE_CUBE_ARRAY)
|
||||
nr_layers = pt->array_size;
|
||||
else
|
||||
nr_layers = 1;
|
||||
@@ -1613,9 +1600,14 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
|
||||
layer = i;
|
||||
/* XXX hmm really? */
|
||||
rcoord = (float)layer / (float)nr_layers + 1.0f / (float)(nr_layers * 2);
|
||||
} else if (pt->target == PIPE_TEXTURE_2D_ARRAY || pt->target == PIPE_TEXTURE_1D_ARRAY) {
|
||||
} else if (pt->target == PIPE_TEXTURE_2D_ARRAY ||
|
||||
pt->target == PIPE_TEXTURE_1D_ARRAY) {
|
||||
layer = i;
|
||||
rcoord = (float)layer;
|
||||
} else if (pt->target == PIPE_TEXTURE_CUBE_ARRAY) {
|
||||
layer = i;
|
||||
face = layer % 6;
|
||||
rcoord = layer / 6;
|
||||
} else
|
||||
layer = face;
|
||||
|
||||
|
@@ -112,10 +112,13 @@ static INLINE float logf( float f )
|
||||
#define logf(x) ((float)log((double)(x)))
|
||||
#endif /* logf */
|
||||
|
||||
#if _MSC_VER < 1800
|
||||
#define isfinite(x) _finite((double)(x))
|
||||
#define isnan(x) _isnan((double)(x))
|
||||
#endif /* _MSC_VER < 1800 */
|
||||
#endif /* _MSC_VER < 1400 && !defined(__cplusplus) */
|
||||
|
||||
#if _MSC_VER < 1800
|
||||
static INLINE double log2( double x )
|
||||
{
|
||||
const double invln2 = 1.442695041;
|
||||
@@ -133,6 +136,7 @@ roundf(float x)
|
||||
{
|
||||
return x >= 0.0f ? floorf(x + 0.5f) : ceilf(x - 0.5f);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define INFINITY (DBL_MAX + DBL_MAX)
|
||||
#define NAN (INFINITY - INFINITY)
|
||||
|
@@ -376,9 +376,15 @@ lp_rast_shade_tile(struct lp_rasterizer_task *task,
|
||||
|
||||
/* color buffer */
|
||||
for (i = 0; i < scene->fb.nr_cbufs; i++){
|
||||
stride[i] = scene->cbufs[i].stride;
|
||||
color[i] = lp_rast_get_unswizzled_color_block_pointer(task, i, tile_x + x,
|
||||
tile_y + y, inputs->layer);
|
||||
if (scene->fb.cbufs[i]) {
|
||||
stride[i] = scene->cbufs[i].stride;
|
||||
color[i] = lp_rast_get_unswizzled_color_block_pointer(task, i, tile_x + x,
|
||||
tile_y + y, inputs->layer);
|
||||
}
|
||||
else {
|
||||
stride[i] = 0;
|
||||
color[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* depth buffer */
|
||||
|
@@ -37,18 +37,25 @@ namespace nv50_ir {
|
||||
// ah*bl 00
|
||||
//
|
||||
// fffe0001 + fffe0001
|
||||
//
|
||||
// Note that this sort of splitting doesn't work for signed values, so we
|
||||
// compute the sign on those manually and then perform an unsigned multiply.
|
||||
static bool
|
||||
expandIntegerMUL(BuildUtil *bld, Instruction *mul)
|
||||
{
|
||||
const bool highResult = mul->subOp == NV50_IR_SUBOP_MUL_HIGH;
|
||||
|
||||
DataType fTy = mul->sType; // full type
|
||||
DataType hTy;
|
||||
DataType fTy; // full type
|
||||
switch (mul->sType) {
|
||||
case TYPE_S32: fTy = TYPE_U32; break;
|
||||
case TYPE_S64: fTy = TYPE_U64; break;
|
||||
default: fTy = mul->sType; break;
|
||||
}
|
||||
|
||||
DataType hTy; // half type
|
||||
switch (fTy) {
|
||||
case TYPE_S32: hTy = TYPE_S16; break;
|
||||
case TYPE_U32: hTy = TYPE_U16; break;
|
||||
case TYPE_U64: hTy = TYPE_U32; break;
|
||||
case TYPE_S64: hTy = TYPE_S32; break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -59,15 +66,25 @@ expandIntegerMUL(BuildUtil *bld, Instruction *mul)
|
||||
|
||||
bld->setPosition(mul, true);
|
||||
|
||||
Value *s[2];
|
||||
Value *a[2], *b[2];
|
||||
Value *c[2];
|
||||
Value *t[4];
|
||||
for (int j = 0; j < 4; ++j)
|
||||
t[j] = bld->getSSA(fullSize);
|
||||
|
||||
s[0] = mul->getSrc(0);
|
||||
s[1] = mul->getSrc(1);
|
||||
|
||||
if (isSignedType(mul->sType)) {
|
||||
s[0] = bld->getSSA(fullSize);
|
||||
s[1] = bld->getSSA(fullSize);
|
||||
bld->mkOp1(OP_ABS, mul->sType, s[0], mul->getSrc(0));
|
||||
bld->mkOp1(OP_ABS, mul->sType, s[1], mul->getSrc(1));
|
||||
}
|
||||
|
||||
// split sources into halves
|
||||
i[0] = bld->mkSplit(a, halfSize, mul->getSrc(0));
|
||||
i[1] = bld->mkSplit(b, halfSize, mul->getSrc(1));
|
||||
i[0] = bld->mkSplit(a, halfSize, s[0]);
|
||||
i[1] = bld->mkSplit(b, halfSize, s[1]);
|
||||
|
||||
i[2] = bld->mkOp2(OP_MUL, fTy, t[0], a[0], b[1]);
|
||||
i[3] = bld->mkOp3(OP_MAD, fTy, t[1], a[1], b[0], t[0]);
|
||||
@@ -75,23 +92,76 @@ expandIntegerMUL(BuildUtil *bld, Instruction *mul)
|
||||
i[4] = bld->mkOp3(OP_MAD, fTy, t[3], a[0], b[0], t[2]);
|
||||
|
||||
if (highResult) {
|
||||
Value *r[3];
|
||||
Value *c[2];
|
||||
Value *r[5];
|
||||
Value *imm = bld->loadImm(NULL, 1 << (halfSize * 8));
|
||||
c[0] = bld->getSSA(1, FILE_FLAGS);
|
||||
c[1] = bld->getSSA(1, FILE_FLAGS);
|
||||
for (int j = 0; j < 3; ++j)
|
||||
for (int j = 0; j < 5; ++j)
|
||||
r[j] = bld->getSSA(fullSize);
|
||||
|
||||
i[8] = bld->mkOp2(OP_SHR, fTy, r[0], t[1], bld->mkImm(halfSize * 8));
|
||||
i[6] = bld->mkOp2(OP_ADD, fTy, r[1], r[0], imm);
|
||||
bld->mkOp2(OP_UNION, TYPE_U32, r[2], r[1], r[0]);
|
||||
i[5] = bld->mkOp3(OP_MAD, fTy, mul->getDef(0), a[1], b[1], r[2]);
|
||||
bld->mkMov(r[3], r[0])->setPredicate(CC_NC, c[0]);
|
||||
bld->mkOp2(OP_UNION, TYPE_U32, r[2], r[1], r[3]);
|
||||
i[5] = bld->mkOp3(OP_MAD, fTy, r[4], a[1], b[1], r[2]);
|
||||
|
||||
// set carry defs / sources
|
||||
i[3]->setFlagsDef(1, c[0]);
|
||||
i[4]->setFlagsDef(0, c[1]); // actual result not required, just the carry
|
||||
// actual result required in negative case, but ignored for
|
||||
// unsigned. for some reason the compiler ends up dropping the whole
|
||||
// instruction if the destination is unused but the flags are.
|
||||
if (isSignedType(mul->sType))
|
||||
i[4]->setFlagsDef(1, c[1]);
|
||||
else
|
||||
i[4]->setFlagsDef(0, c[1]);
|
||||
i[6]->setPredicate(CC_C, c[0]);
|
||||
i[5]->setFlagsSrc(3, c[1]);
|
||||
|
||||
if (isSignedType(mul->sType)) {
|
||||
Value *cc[2];
|
||||
Value *rr[7];
|
||||
Value *one = bld->getSSA(fullSize);
|
||||
bld->loadImm(one, 1);
|
||||
for (int j = 0; j < 7; j++)
|
||||
rr[j] = bld->getSSA(fullSize);
|
||||
|
||||
// NOTE: this logic uses predicates because splitting basic blocks is
|
||||
// ~impossible during the SSA phase. The RA relies on a correlation
|
||||
// between edge order and phi node sources.
|
||||
|
||||
// Set the sign of the result based on the inputs
|
||||
bld->mkOp2(OP_XOR, fTy, NULL, mul->getSrc(0), mul->getSrc(1))
|
||||
->setFlagsDef(0, (cc[0] = bld->getSSA(1, FILE_FLAGS)));
|
||||
|
||||
// 1s complement of 64-bit value
|
||||
bld->mkOp1(OP_NOT, fTy, rr[0], r[4])
|
||||
->setPredicate(CC_S, cc[0]);
|
||||
bld->mkOp1(OP_NOT, fTy, rr[1], t[3])
|
||||
->setPredicate(CC_S, cc[0]);
|
||||
|
||||
// add to low 32-bits, keep track of the carry
|
||||
Instruction *n = bld->mkOp2(OP_ADD, fTy, NULL, rr[1], one);
|
||||
n->setPredicate(CC_S, cc[0]);
|
||||
n->setFlagsDef(0, (cc[1] = bld->getSSA(1, FILE_FLAGS)));
|
||||
|
||||
// If there was a carry, add 1 to the upper 32 bits
|
||||
// XXX: These get executed even if they shouldn't be
|
||||
bld->mkOp2(OP_ADD, fTy, rr[2], rr[0], one)
|
||||
->setPredicate(CC_C, cc[1]);
|
||||
bld->mkMov(rr[3], rr[0])
|
||||
->setPredicate(CC_NC, cc[1]);
|
||||
bld->mkOp2(OP_UNION, fTy, rr[4], rr[2], rr[3]);
|
||||
|
||||
// Merge the results from the negative and non-negative paths
|
||||
bld->mkMov(rr[5], rr[4])
|
||||
->setPredicate(CC_S, cc[0]);
|
||||
bld->mkMov(rr[6], r[4])
|
||||
->setPredicate(CC_NS, cc[0]);
|
||||
bld->mkOp2(OP_UNION, mul->sType, mul->getDef(0), rr[5], rr[6]);
|
||||
} else {
|
||||
bld->mkMov(mul->getDef(0), r[4]);
|
||||
}
|
||||
} else {
|
||||
bld->mkMov(mul->getDef(0), t[3]);
|
||||
}
|
||||
@@ -590,6 +660,10 @@ void NV50LoweringPreSSA::loadTexMsInfo(uint32_t off, Value **ms,
|
||||
Value *tmp = new_LValue(func, FILE_GPR);
|
||||
uint8_t b = prog->driver->io.resInfoCBSlot;
|
||||
off += prog->driver->io.suInfoBase;
|
||||
if (prog->getType() > Program::TYPE_VERTEX)
|
||||
off += 16 * 2 * 4;
|
||||
if (prog->getType() > Program::TYPE_GEOMETRY)
|
||||
off += 16 * 2 * 4;
|
||||
*ms_x = bld.mkLoadv(TYPE_U32, bld.mkSymbol(
|
||||
FILE_MEMORY_CONST, b, TYPE_U32, off + 0), NULL);
|
||||
*ms_y = bld.mkLoadv(TYPE_U32, bld.mkSymbol(
|
||||
|
@@ -666,8 +666,9 @@ NVC0LoweringPass::handleTEX(TexInstruction *i)
|
||||
const int dim = i->tex.target.getDim() + i->tex.target.isCube();
|
||||
const int arg = i->tex.target.getArgCount();
|
||||
const int lyr = arg - (i->tex.target.isMS() ? 2 : 1);
|
||||
const int chipset = prog->getTarget()->getChipset();
|
||||
|
||||
if (prog->getTarget()->getChipset() >= NVISA_GK104_CHIPSET) {
|
||||
if (chipset >= NVISA_GK104_CHIPSET) {
|
||||
if (i->tex.rIndirectSrc >= 0 || i->tex.sIndirectSrc >= 0) {
|
||||
WARN("indirect TEX not implemented\n");
|
||||
}
|
||||
@@ -697,7 +698,7 @@ NVC0LoweringPass::handleTEX(TexInstruction *i)
|
||||
}
|
||||
} else
|
||||
// (nvc0) generate and move the tsc/tic/array source to the front
|
||||
if (dim != arg || i->tex.rIndirectSrc >= 0 || i->tex.sIndirectSrc >= 0) {
|
||||
if (i->tex.target.isArray() || i->tex.rIndirectSrc >= 0 || i->tex.sIndirectSrc >= 0) {
|
||||
LValue *src = new_LValue(func, FILE_GPR); // 0xttxsaaaa
|
||||
|
||||
Value *arrayIndex = i->tex.target.isArray() ? i->getSrc(lyr) : NULL;
|
||||
@@ -728,6 +729,13 @@ NVC0LoweringPass::handleTEX(TexInstruction *i)
|
||||
i->setSrc(0, src);
|
||||
}
|
||||
|
||||
// For nvc0, the sample id has to be in the second operand, as the offset
|
||||
// does. Right now we don't know how to pass both in, and this case can't
|
||||
// happen with OpenGL. On nve0, the sample id is part of the texture
|
||||
// coordinate argument.
|
||||
assert(chipset >= NVISA_GK104_CHIPSET ||
|
||||
!i->tex.useOffsets || !i->tex.target.isMS());
|
||||
|
||||
// offset is last source (lod 1st, dc 2nd)
|
||||
if (i->tex.useOffsets) {
|
||||
uint32_t value = 0;
|
||||
@@ -741,7 +749,7 @@ NVC0LoweringPass::handleTEX(TexInstruction *i)
|
||||
i->setSrc(s, bld.loadImm(NULL, value));
|
||||
}
|
||||
|
||||
if (prog->getTarget()->getChipset() >= NVISA_GK104_CHIPSET) {
|
||||
if (chipset >= NVISA_GK104_CHIPSET) {
|
||||
//
|
||||
// If TEX requires more than 4 sources, the 2nd register tuple must be
|
||||
// aligned to 4, even if it consists of just a single 4-byte register.
|
||||
|
@@ -187,7 +187,8 @@ LoadPropagation::checkSwapSrc01(Instruction *insn)
|
||||
return;
|
||||
}
|
||||
|
||||
if (insn->op == OP_SET)
|
||||
if (insn->op == OP_SET || insn->op == OP_SET_AND ||
|
||||
insn->op == OP_SET_OR || insn->op == OP_SET_XOR)
|
||||
insn->asCmp()->setCond = reverseCondCode(insn->asCmp()->setCond);
|
||||
else
|
||||
if (insn->op == OP_SLCT)
|
||||
@@ -417,7 +418,17 @@ ConstantFolding::expr(Instruction *i,
|
||||
case TYPE_F32: res.data.f32 = a->data.f32 * b->data.f32; break;
|
||||
case TYPE_F64: res.data.f64 = a->data.f64 * b->data.f64; break;
|
||||
case TYPE_S32:
|
||||
case TYPE_U32: res.data.u32 = a->data.u32 * b->data.u32; break;
|
||||
if (i->subOp == NV50_IR_SUBOP_MUL_HIGH) {
|
||||
res.data.s32 = ((int64_t)a->data.s32 * b->data.s32) >> 32;
|
||||
break;
|
||||
}
|
||||
/* fallthrough */
|
||||
case TYPE_U32:
|
||||
if (i->subOp == NV50_IR_SUBOP_MUL_HIGH) {
|
||||
res.data.u32 = ((uint64_t)a->data.u32 * b->data.u32) >> 32;
|
||||
break;
|
||||
}
|
||||
res.data.u32 = a->data.u32 * b->data.u32; break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
@@ -524,6 +535,7 @@ ConstantFolding::expr(Instruction *i,
|
||||
} else {
|
||||
i->op = OP_MOV;
|
||||
}
|
||||
i->subOp = 0;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -625,12 +637,41 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
|
||||
{
|
||||
const int t = !s;
|
||||
const operation op = i->op;
|
||||
Instruction *newi = i;
|
||||
|
||||
switch (i->op) {
|
||||
case OP_MUL:
|
||||
if (i->dType == TYPE_F32)
|
||||
tryCollapseChainedMULs(i, s, imm0);
|
||||
|
||||
if (i->subOp == NV50_IR_SUBOP_MUL_HIGH) {
|
||||
assert(!isFloatType(i->sType));
|
||||
if (imm0.isInteger(1) && i->dType == TYPE_S32) {
|
||||
bld.setPosition(i, false);
|
||||
// Need to set to the sign value, which is a compare.
|
||||
newi = bld.mkCmp(OP_SET, CC_LT, TYPE_S32, i->getDef(0),
|
||||
TYPE_S32, i->getSrc(t), bld.mkImm(0));
|
||||
delete_Instruction(prog, i);
|
||||
} else if (imm0.isInteger(0) || imm0.isInteger(1)) {
|
||||
// The high bits can't be set in this case (either mul by 0 or
|
||||
// unsigned by 1)
|
||||
i->op = OP_MOV;
|
||||
i->subOp = 0;
|
||||
i->setSrc(0, new_ImmediateValue(prog, 0u));
|
||||
i->src(0).mod = Modifier(0);
|
||||
i->setSrc(1, NULL);
|
||||
} else if (!imm0.isNegative() && imm0.isPow2()) {
|
||||
// Translate into a shift
|
||||
imm0.applyLog2();
|
||||
i->op = OP_SHR;
|
||||
i->subOp = 0;
|
||||
imm0.reg.data.u32 = 32 - imm0.reg.data.u32;
|
||||
i->setSrc(0, i->getSrc(t));
|
||||
i->src(0).mod = i->src(t).mod;
|
||||
i->setSrc(1, new_ImmediateValue(prog, imm0.reg.data.u32));
|
||||
i->src(1).mod = 0;
|
||||
}
|
||||
} else
|
||||
if (imm0.isInteger(0)) {
|
||||
i->op = OP_MOV;
|
||||
i->setSrc(0, new_ImmediateValue(prog, 0u));
|
||||
@@ -721,7 +762,7 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
|
||||
else
|
||||
tA = tB;
|
||||
tB = s ? bld.getSSA() : i->getDef(0);
|
||||
bld.mkOp2(OP_ADD, TYPE_U32, tB, mul->getDef(0), tA);
|
||||
newi = bld.mkOp2(OP_ADD, TYPE_U32, tB, mul->getDef(0), tA);
|
||||
if (s)
|
||||
bld.mkOp2(OP_SHR, TYPE_U32, i->getDef(0), tB, bld.mkImm(s));
|
||||
|
||||
@@ -753,7 +794,7 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
|
||||
tA = bld.getSSA();
|
||||
bld.mkCmp(OP_SET, CC_LT, TYPE_S32, tA, TYPE_S32, i->getSrc(0), bld.mkImm(0));
|
||||
tD = (d < 0) ? bld.getSSA() : i->getDef(0)->asLValue();
|
||||
bld.mkOp2(OP_SUB, TYPE_U32, tD, tB, tA);
|
||||
newi = bld.mkOp2(OP_SUB, TYPE_U32, tD, tB, tA);
|
||||
if (d < 0)
|
||||
bld.mkOp1(OP_NEG, TYPE_S32, i->getDef(0), tB);
|
||||
|
||||
@@ -831,7 +872,7 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
|
||||
default:
|
||||
return;
|
||||
}
|
||||
if (i->op != op)
|
||||
if (newi->op != op)
|
||||
foldCount++;
|
||||
}
|
||||
|
||||
|
@@ -1914,7 +1914,7 @@ RegAlloc::InsertConstraintsPass::texConstraintNVC0(TexInstruction *tex)
|
||||
s = tex->srcCount(0xff);
|
||||
n = 0;
|
||||
} else {
|
||||
s = tex->tex.target.getArgCount();
|
||||
s = tex->tex.target.getArgCount() - tex->tex.target.isMS();
|
||||
if (!tex->tex.target.isArray() &&
|
||||
(tex->tex.rIndirectSrc >= 0 || tex->tex.sIndirectSrc >= 0))
|
||||
++s;
|
||||
|
@@ -329,6 +329,8 @@ TargetNV50::insnCanLoad(const Instruction *i, int s,
|
||||
return false;
|
||||
if (sf == FILE_IMMEDIATE)
|
||||
return false;
|
||||
if (i->subOp == NV50_IR_SUBOP_MUL_HIGH && sf == FILE_MEMORY_CONST)
|
||||
return false;
|
||||
ldSize = 2;
|
||||
} else {
|
||||
ldSize = typeSizeof(ld->dType);
|
||||
|
@@ -371,10 +371,10 @@ firmware_present(struct pipe_screen *pscreen, enum pipe_video_profile profile)
|
||||
int size, oclass;
|
||||
if (chipset < 0xc0)
|
||||
oclass = 0x85b1;
|
||||
else if (vp5)
|
||||
oclass = 0x95b1;
|
||||
else
|
||||
else if (chipset < 0xe0)
|
||||
oclass = 0x90b1;
|
||||
else
|
||||
oclass = 0x95b1;
|
||||
|
||||
if (chipset < 0xc0) {
|
||||
data = &nv04_data;
|
||||
|
@@ -302,10 +302,16 @@ nv30_screen_destroy(struct pipe_screen *pscreen)
|
||||
{
|
||||
struct nv30_screen *screen = nv30_screen(pscreen);
|
||||
|
||||
if (screen->base.fence.current &&
|
||||
screen->base.fence.current->state >= NOUVEAU_FENCE_STATE_EMITTED) {
|
||||
nouveau_fence_wait(screen->base.fence.current);
|
||||
nouveau_fence_ref (NULL, &screen->base.fence.current);
|
||||
if (screen->base.fence.current) {
|
||||
struct nouveau_fence *current = NULL;
|
||||
|
||||
/* nouveau_fence_wait will create a new current fence, so wait on the
|
||||
* _current_ one, and remove both.
|
||||
*/
|
||||
nouveau_fence_ref(screen->base.fence.current, ¤t);
|
||||
nouveau_fence_wait(current);
|
||||
nouveau_fence_ref(NULL, ¤t);
|
||||
nouveau_fence_ref(NULL, &screen->base.fence.current);
|
||||
}
|
||||
|
||||
nouveau_object_del(&screen->query);
|
||||
|
@@ -77,13 +77,13 @@
|
||||
/* 8 user clip planes, at 4 32-bit floats each */
|
||||
#define NV50_CB_AUX_UCP_OFFSET 0x0000
|
||||
#define NV50_CB_AUX_UCP_SIZE (8 * 4 * 4)
|
||||
/* 256 textures, each with ms_x, ms_y u32 pairs */
|
||||
/* 16 textures * 3 shaders, each with ms_x, ms_y u32 pairs */
|
||||
#define NV50_CB_AUX_TEX_MS_OFFSET 0x0080
|
||||
#define NV50_CB_AUX_TEX_MS_SIZE (256 * 2 * 4)
|
||||
#define NV50_CB_AUX_TEX_MS_SIZE (16 * 3 * 2 * 4)
|
||||
/* For each MS level (4), 8 sets of 32-bit integer pairs sample offsets */
|
||||
#define NV50_CB_AUX_MS_OFFSET 0x880
|
||||
#define NV50_CB_AUX_MS_OFFSET 0x200
|
||||
#define NV50_CB_AUX_MS_SIZE (4 * 8 * 4 * 2)
|
||||
/* next spot: 0x980 */
|
||||
/* next spot: 0x300 */
|
||||
/* 4 32-bit floats for the vertex runout, put at the end */
|
||||
#define NV50_CB_AUX_RUNOUT_OFFSET (NV50_CB_AUX_SIZE - 0x10)
|
||||
|
||||
|
@@ -290,8 +290,15 @@ nv50_screen_destroy(struct pipe_screen *pscreen)
|
||||
struct nv50_screen *screen = nv50_screen(pscreen);
|
||||
|
||||
if (screen->base.fence.current) {
|
||||
nouveau_fence_wait(screen->base.fence.current);
|
||||
nouveau_fence_ref (NULL, &screen->base.fence.current);
|
||||
struct nouveau_fence *current = NULL;
|
||||
|
||||
/* nouveau_fence_wait will create a new current fence, so wait on the
|
||||
* _current_ one, and remove both.
|
||||
*/
|
||||
nouveau_fence_ref(screen->base.fence.current, ¤t);
|
||||
nouveau_fence_wait(current);
|
||||
nouveau_fence_ref(NULL, ¤t);
|
||||
nouveau_fence_ref(NULL, &screen->base.fence.current);
|
||||
}
|
||||
if (screen->base.pushbuf)
|
||||
screen->base.pushbuf->user_priv = NULL;
|
||||
|
@@ -556,11 +556,12 @@ nv50_sampler_state_delete(struct pipe_context *pipe, void *hwcso)
|
||||
{
|
||||
unsigned s, i;
|
||||
|
||||
for (s = 0; s < 3; ++s)
|
||||
for (s = 0; s < 3; ++s) {
|
||||
assert(nv50_context(pipe)->num_samplers[s] <= PIPE_MAX_SAMPLERS);
|
||||
for (i = 0; i < nv50_context(pipe)->num_samplers[s]; ++i)
|
||||
if (nv50_context(pipe)->samplers[s][i] == hwcso)
|
||||
nv50_context(pipe)->samplers[s][i] = NULL;
|
||||
}
|
||||
|
||||
nv50_screen_tsc_free(nv50_context(pipe)->screen, nv50_tsc_entry(hwcso));
|
||||
|
||||
|
@@ -977,6 +977,7 @@ nv50_blit_3d(struct nv50_context *nv50, const struct pipe_blit_info *info)
|
||||
float x0, x1, y0, y1, z;
|
||||
float dz;
|
||||
float x_range, y_range;
|
||||
float tri_x, tri_y;
|
||||
|
||||
blit->mode = nv50_blit_select_mode(info);
|
||||
blit->color_mask = nv50_blit_derive_color_mask(info);
|
||||
@@ -996,11 +997,14 @@ nv50_blit_3d(struct nv50_context *nv50, const struct pipe_blit_info *info)
|
||||
x_range = (float)info->src.box.width / (float)info->dst.box.width;
|
||||
y_range = (float)info->src.box.height / (float)info->dst.box.height;
|
||||
|
||||
tri_x = 16384 << nv50_miptree(dst)->ms_x;
|
||||
tri_y = 16384 << nv50_miptree(dst)->ms_y;
|
||||
|
||||
x0 = (float)info->src.box.x - x_range * (float)info->dst.box.x;
|
||||
y0 = (float)info->src.box.y - y_range * (float)info->dst.box.y;
|
||||
|
||||
x1 = x0 + 16384.0f * x_range;
|
||||
y1 = y0 + 16384.0f * y_range;
|
||||
x1 = x0 + tri_x * x_range;
|
||||
y1 = y0 + tri_y * y_range;
|
||||
|
||||
x0 *= (float)(1 << nv50_miptree(src)->ms_x);
|
||||
x1 *= (float)(1 << nv50_miptree(src)->ms_x);
|
||||
@@ -1069,7 +1073,7 @@ nv50_blit_3d(struct nv50_context *nv50, const struct pipe_blit_info *info)
|
||||
PUSH_DATAf(push, y0);
|
||||
PUSH_DATAf(push, z);
|
||||
BEGIN_NV04(push, NV50_3D(VTX_ATTR_2F_X(0)), 2);
|
||||
PUSH_DATAf(push, 16384 << nv50_miptree(dst)->ms_x);
|
||||
PUSH_DATAf(push, tri_x);
|
||||
PUSH_DATAf(push, 0.0f);
|
||||
BEGIN_NV04(push, NV50_3D(VTX_ATTR_3F_X(1)), 3);
|
||||
PUSH_DATAf(push, x0);
|
||||
@@ -1077,7 +1081,7 @@ nv50_blit_3d(struct nv50_context *nv50, const struct pipe_blit_info *info)
|
||||
PUSH_DATAf(push, z);
|
||||
BEGIN_NV04(push, NV50_3D(VTX_ATTR_2F_X(0)), 2);
|
||||
PUSH_DATAf(push, 0.0f);
|
||||
PUSH_DATAf(push, 16384 << nv50_miptree(dst)->ms_y);
|
||||
PUSH_DATAf(push, tri_y);
|
||||
BEGIN_NV04(push, NV50_3D(VERTEX_END_GL), 1);
|
||||
PUSH_DATA (push, 0);
|
||||
}
|
||||
|
@@ -286,7 +286,7 @@ nv50_validate_tic(struct nv50_context *nv50, int s)
|
||||
}
|
||||
if (nv50->num_textures[s]) {
|
||||
BEGIN_NV04(push, NV50_3D(CB_ADDR), 1);
|
||||
PUSH_DATA (push, (NV50_CB_AUX_TEX_MS_OFFSET << (8 - 2)) | NV50_CB_AUX);
|
||||
PUSH_DATA (push, ((NV50_CB_AUX_TEX_MS_OFFSET + 16 * s * 2 * 4) << (8 - 2)) | NV50_CB_AUX);
|
||||
BEGIN_NI04(push, NV50_3D(CB_DATA(0)), nv50->num_textures[s] * 2);
|
||||
for (i = 0; i < nv50->num_textures[s]; i++) {
|
||||
struct nv50_tic_entry *tic = nv50_tic_entry(nv50->textures[s][i]);
|
||||
|
@@ -334,7 +334,14 @@ nvc0_screen_destroy(struct pipe_screen *pscreen)
|
||||
struct nvc0_screen *screen = nvc0_screen(pscreen);
|
||||
|
||||
if (screen->base.fence.current) {
|
||||
nouveau_fence_wait(screen->base.fence.current);
|
||||
struct nouveau_fence *current = NULL;
|
||||
|
||||
/* nouveau_fence_wait will create a new current fence, so wait on the
|
||||
* _current_ one, and remove both.
|
||||
*/
|
||||
nouveau_fence_ref(screen->base.fence.current, ¤t);
|
||||
nouveau_fence_wait(current);
|
||||
nouveau_fence_ref(NULL, ¤t);
|
||||
nouveau_fence_ref(NULL, &screen->base.fence.current);
|
||||
}
|
||||
if (screen->base.pushbuf)
|
||||
|
@@ -130,7 +130,7 @@ static boolean r300_cbzb_clear_allowed(struct r300_context *r300,
|
||||
(struct pipe_framebuffer_state*)r300->fb_state.state;
|
||||
|
||||
/* Only color clear allowed, and only one colorbuffer. */
|
||||
if ((clear_buffers & ~PIPE_CLEAR_COLOR) != 0 || fb->nr_cbufs != 1)
|
||||
if ((clear_buffers & ~PIPE_CLEAR_COLOR) != 0 || fb->nr_cbufs != 1 || !fb->cbufs[0])
|
||||
return FALSE;
|
||||
|
||||
return r300_surface(fb->cbufs[0])->cbzb_allowed;
|
||||
@@ -313,7 +313,7 @@ static void r300_clear(struct pipe_context* pipe,
|
||||
/* Use fast color clear for an AA colorbuffer.
|
||||
* The CMASK is shared between all colorbuffers, so we use it
|
||||
* if there is only one colorbuffer bound. */
|
||||
if ((buffers & PIPE_CLEAR_COLOR) && fb->nr_cbufs == 1 &&
|
||||
if ((buffers & PIPE_CLEAR_COLOR) && fb->nr_cbufs == 1 && fb->cbufs[0] &&
|
||||
r300_resource(fb->cbufs[0]->texture)->tex.cmask_dwords) {
|
||||
/* Try to obtain the access to the CMASK if we don't have one. */
|
||||
if (!r300->cmask_access) {
|
||||
|
@@ -688,6 +688,20 @@ static INLINE void r300_mark_atom_dirty(struct r300_context *r300,
|
||||
}
|
||||
}
|
||||
|
||||
static INLINE struct pipe_surface *
|
||||
r300_get_nonnull_cb(struct pipe_framebuffer_state *fb, unsigned i)
|
||||
{
|
||||
if (fb->cbufs[i])
|
||||
return fb->cbufs[i];
|
||||
|
||||
/* The i-th framebuffer is NULL, return any non-NULL one. */
|
||||
for (i = 0; i < fb->nr_cbufs; i++)
|
||||
if (fb->cbufs[i])
|
||||
return fb->cbufs[i];
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct pipe_context* r300_create_context(struct pipe_screen* screen,
|
||||
void *priv);
|
||||
|
||||
|
@@ -42,15 +42,18 @@ void r300_emit_blend_state(struct r300_context* r300,
|
||||
struct r300_blend_state* blend = (struct r300_blend_state*)state;
|
||||
struct pipe_framebuffer_state* fb =
|
||||
(struct pipe_framebuffer_state*)r300->fb_state.state;
|
||||
struct pipe_surface *cb;
|
||||
CS_LOCALS(r300);
|
||||
|
||||
if (fb->nr_cbufs) {
|
||||
if (fb->cbufs[0]->format == PIPE_FORMAT_R16G16B16A16_FLOAT) {
|
||||
cb = fb->nr_cbufs ? r300_get_nonnull_cb(fb, 0) : NULL;
|
||||
|
||||
if (cb) {
|
||||
if (cb->format == PIPE_FORMAT_R16G16B16A16_FLOAT) {
|
||||
WRITE_CS_TABLE(blend->cb_noclamp, size);
|
||||
} else if (fb->cbufs[0]->format == PIPE_FORMAT_R16G16B16X16_FLOAT) {
|
||||
} else if (cb->format == PIPE_FORMAT_R16G16B16X16_FLOAT) {
|
||||
WRITE_CS_TABLE(blend->cb_noclamp_noalpha, size);
|
||||
} else {
|
||||
unsigned swz = r300_surface(fb->cbufs[0])->colormask_swizzle;
|
||||
unsigned swz = r300_surface(cb)->colormask_swizzle;
|
||||
WRITE_CS_TABLE(blend->cb_clamp[swz], size);
|
||||
}
|
||||
} else {
|
||||
@@ -88,9 +91,11 @@ void r300_emit_dsa_state(struct r300_context* r300, unsigned size, void* state)
|
||||
/* Choose the alpha ref value between 8-bit (FG_ALPHA_FUNC.AM_VAL) and
|
||||
* 16-bit (FG_ALPHA_VALUE). */
|
||||
if (is_r500 && (alpha_func & R300_FG_ALPHA_FUNC_ENABLE)) {
|
||||
if (fb->nr_cbufs &&
|
||||
(fb->cbufs[0]->format == PIPE_FORMAT_R16G16B16A16_FLOAT ||
|
||||
fb->cbufs[0]->format == PIPE_FORMAT_R16G16B16X16_FLOAT)) {
|
||||
struct pipe_surface *cb = fb->nr_cbufs ? r300_get_nonnull_cb(fb, 0) : NULL;
|
||||
|
||||
if (cb &&
|
||||
(cb->format == PIPE_FORMAT_R16G16B16A16_FLOAT ||
|
||||
cb->format == PIPE_FORMAT_R16G16B16X16_FLOAT)) {
|
||||
alpha_func |= R500_FG_ALPHA_FUNC_FP16_ENABLE;
|
||||
} else {
|
||||
alpha_func |= R500_FG_ALPHA_FUNC_8BIT;
|
||||
@@ -419,7 +424,7 @@ void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state)
|
||||
|
||||
/* Set up colorbuffers. */
|
||||
for (i = 0; i < fb->nr_cbufs; i++) {
|
||||
surf = r300_surface(fb->cbufs[i]);
|
||||
surf = r300_surface(r300_get_nonnull_cb(fb, i));
|
||||
|
||||
OUT_CS_REG(R300_RB3D_COLOROFFSET0 + (4 * i), surf->offset);
|
||||
OUT_CS_RELOC(surf);
|
||||
@@ -600,7 +605,7 @@ void r300_emit_fb_state_pipelined(struct r300_context *r300,
|
||||
* (must be written after unpipelined regs) */
|
||||
OUT_CS_REG_SEQ(R300_US_OUT_FMT_0, 4);
|
||||
for (i = 0; i < num_cbufs; i++) {
|
||||
OUT_CS(r300_surface(fb->cbufs[i])->format);
|
||||
OUT_CS(r300_surface(r300_get_nonnull_cb(fb, i))->format);
|
||||
}
|
||||
for (; i < 1; i++) {
|
||||
OUT_CS(R300_US_OUT_FMT_C4_8 |
|
||||
@@ -1310,6 +1315,8 @@ validate:
|
||||
if (r300->fb_state.dirty) {
|
||||
/* Color buffers... */
|
||||
for (i = 0; i < fb->nr_cbufs; i++) {
|
||||
if (!fb->cbufs[i])
|
||||
continue;
|
||||
tex = r300_resource(fb->cbufs[i]->texture);
|
||||
assert(tex && tex->buf && "cbuf is marked, but NULL!");
|
||||
r300->rws->cs_add_reloc(r300->cs, tex->cs_buf,
|
||||
|
@@ -579,16 +579,17 @@ static void r300_set_blend_color(struct pipe_context* pipe,
|
||||
struct r300_blend_color_state *state =
|
||||
(struct r300_blend_color_state*)r300->blend_color_state.state;
|
||||
struct pipe_blend_color c;
|
||||
enum pipe_format format = fb->nr_cbufs ? fb->cbufs[0]->format : 0;
|
||||
struct pipe_surface *cb;
|
||||
float tmp;
|
||||
CB_LOCALS;
|
||||
|
||||
state->state = *color; /* Save it, so that we can reuse it in set_fb_state */
|
||||
c = *color;
|
||||
cb = fb->nr_cbufs ? r300_get_nonnull_cb(fb, 0) : NULL;
|
||||
|
||||
/* The blend color is dependent on the colorbuffer format. */
|
||||
if (fb->nr_cbufs) {
|
||||
switch (format) {
|
||||
if (cb) {
|
||||
switch (cb->format) {
|
||||
case PIPE_FORMAT_R8_UNORM:
|
||||
case PIPE_FORMAT_L8_UNORM:
|
||||
case PIPE_FORMAT_I8_UNORM:
|
||||
@@ -623,7 +624,7 @@ static void r300_set_blend_color(struct pipe_context* pipe,
|
||||
BEGIN_CB(state->cb, 3);
|
||||
OUT_CB_REG_SEQ(R500_RB3D_CONSTANT_COLOR_AR, 2);
|
||||
|
||||
switch (format) {
|
||||
switch (cb ? cb->format : 0) {
|
||||
case PIPE_FORMAT_R16G16B16A16_FLOAT:
|
||||
case PIPE_FORMAT_R16G16B16X16_FLOAT:
|
||||
OUT_CB(util_float_to_half(c.color[2]) |
|
||||
@@ -858,6 +859,9 @@ static void r300_fb_set_tiling_flags(struct r300_context *r300,
|
||||
|
||||
/* Set tiling flags for new surfaces. */
|
||||
for (i = 0; i < state->nr_cbufs; i++) {
|
||||
if (!state->cbufs[i])
|
||||
continue;
|
||||
|
||||
r300_tex_set_tiling_flags(r300,
|
||||
r300_resource(state->cbufs[i]->texture),
|
||||
state->cbufs[i]->u.tex.level);
|
||||
@@ -950,7 +954,8 @@ static unsigned r300_get_num_samples(struct r300_context *r300)
|
||||
num_samples = 6;
|
||||
|
||||
for (i = 0; i < fb->nr_cbufs; i++)
|
||||
num_samples = MIN2(num_samples, fb->cbufs[i]->texture->nr_samples);
|
||||
if (fb->cbufs[i])
|
||||
num_samples = MIN2(num_samples, fb->cbufs[i]->texture->nr_samples);
|
||||
|
||||
if (fb->zsbuf)
|
||||
num_samples = MIN2(num_samples, fb->zsbuf->texture->nr_samples);
|
||||
@@ -967,7 +972,7 @@ r300_set_framebuffer_state(struct pipe_context* pipe,
|
||||
{
|
||||
struct r300_context* r300 = r300_context(pipe);
|
||||
struct r300_aa_state *aa = (struct r300_aa_state*)r300->aa_state.state;
|
||||
struct pipe_framebuffer_state *old_state = r300->fb_state.state;
|
||||
struct pipe_framebuffer_state *current_state = r300->fb_state.state;
|
||||
unsigned max_width, max_height, i;
|
||||
uint32_t zbuffer_bpp = 0;
|
||||
boolean unlock_zbuffer = FALSE;
|
||||
@@ -986,17 +991,17 @@ r300_set_framebuffer_state(struct pipe_context* pipe,
|
||||
return;
|
||||
}
|
||||
|
||||
if (old_state->zsbuf && r300->zmask_in_use && !r300->locked_zbuffer) {
|
||||
if (current_state->zsbuf && r300->zmask_in_use && !r300->locked_zbuffer) {
|
||||
/* There is a zmask in use, what are we gonna do? */
|
||||
if (state->zsbuf) {
|
||||
if (!pipe_surface_equal(old_state->zsbuf, state->zsbuf)) {
|
||||
if (!pipe_surface_equal(current_state->zsbuf, state->zsbuf)) {
|
||||
/* Decompress the currently bound zbuffer before we bind another one. */
|
||||
r300_decompress_zmask(r300);
|
||||
r300->hiz_in_use = FALSE;
|
||||
}
|
||||
} else {
|
||||
/* We don't bind another zbuffer, so lock the current one. */
|
||||
pipe_surface_reference(&r300->locked_zbuffer, old_state->zsbuf);
|
||||
pipe_surface_reference(&r300->locked_zbuffer, current_state->zsbuf);
|
||||
}
|
||||
} else if (r300->locked_zbuffer) {
|
||||
/* We have a locked zbuffer now, what are we gonna do? */
|
||||
@@ -1014,9 +1019,20 @@ r300_set_framebuffer_state(struct pipe_context* pipe,
|
||||
}
|
||||
assert(state->zsbuf || (r300->locked_zbuffer && !unlock_zbuffer) || !r300->zmask_in_use);
|
||||
|
||||
/* If zsbuf is set from NULL to non-NULL or vice versa.. */
|
||||
if (!!current_state->zsbuf != !!state->zsbuf) {
|
||||
r300_mark_atom_dirty(r300, &r300->dsa_state);
|
||||
}
|
||||
|
||||
util_copy_framebuffer_state(r300->fb_state.state, state);
|
||||
|
||||
/* Remove trailing NULL colorbuffers. */
|
||||
while (current_state->nr_cbufs && !current_state->cbufs[current_state->nr_cbufs-1])
|
||||
current_state->nr_cbufs--;
|
||||
|
||||
/* Set whether CMASK can be used. */
|
||||
r300->cmask_in_use =
|
||||
state->nr_cbufs == 1 &&
|
||||
state->nr_cbufs == 1 && state->cbufs[0] &&
|
||||
r300->screen->cmask_resource == state->cbufs[0]->texture;
|
||||
|
||||
/* Need to reset clamping or colormask. */
|
||||
@@ -1025,11 +1041,6 @@ r300_set_framebuffer_state(struct pipe_context* pipe,
|
||||
/* Re-swizzle the blend color. */
|
||||
r300_set_blend_color(pipe, &((struct r300_blend_color_state*)r300->blend_color_state.state)->state);
|
||||
|
||||
/* If zsbuf is set from NULL to non-NULL or vice versa.. */
|
||||
if (!!old_state->zsbuf != !!state->zsbuf) {
|
||||
r300_mark_atom_dirty(r300, &r300->dsa_state);
|
||||
}
|
||||
|
||||
if (r300->screen->info.drm_minor < 12) {
|
||||
/* The tiling flags are dependent on the surface miplevel, unfortunately.
|
||||
* This workarounds a bad design decision in old kernels which were
|
||||
@@ -1037,8 +1048,6 @@ r300_set_framebuffer_state(struct pipe_context* pipe,
|
||||
r300_fb_set_tiling_flags(r300, state);
|
||||
}
|
||||
|
||||
util_copy_framebuffer_state(r300->fb_state.state, state);
|
||||
|
||||
if (unlock_zbuffer) {
|
||||
pipe_surface_reference(&r300->locked_zbuffer, NULL);
|
||||
}
|
||||
@@ -1089,7 +1098,8 @@ r300_set_framebuffer_state(struct pipe_context* pipe,
|
||||
if (DBG_ON(r300, DBG_FB)) {
|
||||
fprintf(stderr, "r300: set_framebuffer_state:\n");
|
||||
for (i = 0; i < state->nr_cbufs; i++) {
|
||||
r300_print_fb_surf_info(state->cbufs[i], i, "CB");
|
||||
if (state->cbufs[i])
|
||||
r300_print_fb_surf_info(state->cbufs[i], i, "CB");
|
||||
}
|
||||
if (state->zsbuf) {
|
||||
r300_print_fb_surf_info(state->zsbuf, 0, "ZB");
|
||||
|
@@ -927,7 +927,8 @@ static void *evergreen_create_rs_state(struct pipe_context *ctx,
|
||||
S_028810_PS_UCP_MODE(3) |
|
||||
S_028810_ZCLIP_NEAR_DISABLE(!state->depth_clip) |
|
||||
S_028810_ZCLIP_FAR_DISABLE(!state->depth_clip) |
|
||||
S_028810_DX_LINEAR_ATTR_CLIP_ENA(1);
|
||||
S_028810_DX_LINEAR_ATTR_CLIP_ENA(1) |
|
||||
S_028810_DX_RASTERIZATION_KILL(state->rasterizer_discard);
|
||||
rs->multisample_enable = state->multisample;
|
||||
|
||||
/* offset */
|
||||
@@ -996,7 +997,6 @@ static void *evergreen_create_rs_state(struct pipe_context *ctx,
|
||||
state->fill_back != PIPE_POLYGON_MODE_FILL) |
|
||||
S_028814_POLYMODE_FRONT_PTYPE(r600_translate_fill(state->fill_front)) |
|
||||
S_028814_POLYMODE_BACK_PTYPE(r600_translate_fill(state->fill_back)));
|
||||
r600_store_context_reg(&rs->buffer, R_028350_SX_MISC, S_028350_MULTIPASS(state->rasterizer_discard));
|
||||
return rs;
|
||||
}
|
||||
|
||||
@@ -1097,7 +1097,8 @@ struct pipe_sampler_view *
|
||||
evergreen_create_sampler_view_custom(struct pipe_context *ctx,
|
||||
struct pipe_resource *texture,
|
||||
const struct pipe_sampler_view *state,
|
||||
unsigned width0, unsigned height0)
|
||||
unsigned width0, unsigned height0,
|
||||
unsigned force_level)
|
||||
{
|
||||
struct r600_screen *rscreen = (struct r600_screen*)ctx->screen;
|
||||
struct r600_pipe_sampler_view *view = CALLOC_STRUCT(r600_pipe_sampler_view);
|
||||
@@ -1109,6 +1110,8 @@ evergreen_create_sampler_view_custom(struct pipe_context *ctx,
|
||||
unsigned macro_aspect, tile_split, bankh, bankw, nbanks, fmask_bankh;
|
||||
enum pipe_format pipe_format = state->format;
|
||||
struct radeon_surface_level *surflevel;
|
||||
unsigned base_level, first_level, last_level;
|
||||
uint64_t va;
|
||||
|
||||
if (view == NULL)
|
||||
return NULL;
|
||||
@@ -1165,13 +1168,26 @@ evergreen_create_sampler_view_custom(struct pipe_context *ctx,
|
||||
|
||||
endian = r600_colorformat_endian_swap(format);
|
||||
|
||||
base_level = 0;
|
||||
first_level = state->u.tex.first_level;
|
||||
last_level = state->u.tex.last_level;
|
||||
width = width0;
|
||||
height = height0;
|
||||
depth = texture->depth0;
|
||||
pitch = surflevel[0].nblk_x * util_format_get_blockwidth(pipe_format);
|
||||
|
||||
if (force_level) {
|
||||
base_level = force_level;
|
||||
first_level = 0;
|
||||
last_level = 0;
|
||||
width = u_minify(width, force_level);
|
||||
height = u_minify(height, force_level);
|
||||
depth = u_minify(depth, force_level);
|
||||
}
|
||||
|
||||
pitch = surflevel[base_level].nblk_x * util_format_get_blockwidth(pipe_format);
|
||||
non_disp_tiling = tmp->non_disp_tiling;
|
||||
|
||||
switch (surflevel[0].mode) {
|
||||
switch (surflevel[base_level].mode) {
|
||||
case RADEON_SURF_MODE_LINEAR_ALIGNED:
|
||||
array_mode = V_028C70_ARRAY_LINEAR_ALIGNED;
|
||||
break;
|
||||
@@ -1210,6 +1226,8 @@ evergreen_create_sampler_view_custom(struct pipe_context *ctx,
|
||||
} else if (texture->target == PIPE_TEXTURE_CUBE_ARRAY)
|
||||
depth = texture->array_size / 6;
|
||||
|
||||
va = r600_resource_va(ctx->screen, texture);
|
||||
|
||||
view->tex_resource = &tmp->resource;
|
||||
view->tex_resource_words[0] = (S_030000_DIM(r600_tex_dim(texture->target, texture->nr_samples)) |
|
||||
S_030000_PITCH((pitch / 8) - 1) |
|
||||
@@ -1221,7 +1239,7 @@ evergreen_create_sampler_view_custom(struct pipe_context *ctx,
|
||||
view->tex_resource_words[1] = (S_030004_TEX_HEIGHT(height - 1) |
|
||||
S_030004_TEX_DEPTH(depth - 1) |
|
||||
S_030004_ARRAY_MODE(array_mode));
|
||||
view->tex_resource_words[2] = (surflevel[0].offset + r600_resource_va(ctx->screen, texture)) >> 8;
|
||||
view->tex_resource_words[2] = (surflevel[base_level].offset + va) >> 8;
|
||||
|
||||
/* TEX_RESOURCE_WORD3.MIP_ADDRESS */
|
||||
if (texture->nr_samples > 1 && rscreen->has_compressed_msaa_texturing) {
|
||||
@@ -1231,12 +1249,12 @@ evergreen_create_sampler_view_custom(struct pipe_context *ctx,
|
||||
view->skip_mip_address_reloc = true;
|
||||
} else {
|
||||
/* FMASK should be in MIP_ADDRESS for multisample textures */
|
||||
view->tex_resource_words[3] = (tmp->fmask.offset + r600_resource_va(ctx->screen, texture)) >> 8;
|
||||
view->tex_resource_words[3] = (tmp->fmask.offset + va) >> 8;
|
||||
}
|
||||
} else if (state->u.tex.last_level && texture->nr_samples <= 1) {
|
||||
view->tex_resource_words[3] = (surflevel[1].offset + r600_resource_va(ctx->screen, texture)) >> 8;
|
||||
} else if (last_level && texture->nr_samples <= 1) {
|
||||
view->tex_resource_words[3] = (surflevel[1].offset + va) >> 8;
|
||||
} else {
|
||||
view->tex_resource_words[3] = (surflevel[0].offset + r600_resource_va(ctx->screen, texture)) >> 8;
|
||||
view->tex_resource_words[3] = (surflevel[base_level].offset + va) >> 8;
|
||||
}
|
||||
|
||||
view->tex_resource_words[4] = (word4 |
|
||||
@@ -1255,8 +1273,8 @@ evergreen_create_sampler_view_custom(struct pipe_context *ctx,
|
||||
view->tex_resource_words[5] |= S_030014_LAST_LEVEL(log_samples);
|
||||
view->tex_resource_words[6] |= S_030018_FMASK_BANK_HEIGHT(fmask_bankh);
|
||||
} else {
|
||||
view->tex_resource_words[4] |= S_030010_BASE_LEVEL(state->u.tex.first_level);
|
||||
view->tex_resource_words[5] |= S_030014_LAST_LEVEL(state->u.tex.last_level);
|
||||
view->tex_resource_words[4] |= S_030010_BASE_LEVEL(first_level);
|
||||
view->tex_resource_words[5] |= S_030014_LAST_LEVEL(last_level);
|
||||
/* aniso max 16 samples */
|
||||
view->tex_resource_words[6] |= S_030018_MAX_ANISO(4);
|
||||
}
|
||||
@@ -1277,7 +1295,7 @@ evergreen_create_sampler_view(struct pipe_context *ctx,
|
||||
const struct pipe_sampler_view *state)
|
||||
{
|
||||
return evergreen_create_sampler_view_custom(ctx, tex, state,
|
||||
tex->width0, tex->height0);
|
||||
tex->width0, tex->height0, 0);
|
||||
}
|
||||
|
||||
static void evergreen_emit_clip_state(struct r600_context *rctx, struct r600_atom *atom)
|
||||
@@ -1824,7 +1842,10 @@ static void evergreen_set_framebuffer_state(struct pipe_context *ctx,
|
||||
}
|
||||
|
||||
log_samples = util_logbase2(rctx->framebuffer.nr_samples);
|
||||
if (rctx->b.chip_class == CAYMAN && rctx->db_misc_state.log_samples != log_samples) {
|
||||
/* This is for Cayman to program SAMPLE_RATE, and for RV770 to fix a hw bug. */
|
||||
if ((rctx->b.chip_class == CAYMAN ||
|
||||
rctx->b.family == CHIP_RV770) &&
|
||||
rctx->db_misc_state.log_samples != log_samples) {
|
||||
rctx->db_misc_state.log_samples = log_samples;
|
||||
rctx->db_misc_state.atom.dirty = true;
|
||||
}
|
||||
@@ -2809,7 +2830,9 @@ void cayman_init_common_regs(struct r600_command_buffer *cb,
|
||||
|
||||
r600_store_context_reg(cb, R_028A4C_PA_SC_MODE_CNTL_1, 0);
|
||||
|
||||
r600_store_context_reg(cb, R_028354_SX_SURFACE_SYNC, S_028354_SURFACE_SYNC_MASK(0xf));
|
||||
r600_store_context_reg_seq(cb, R_028350_SX_MISC, 2);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, S_028354_SURFACE_SYNC_MASK(0xf));
|
||||
|
||||
r600_store_context_reg(cb, R_028800_DB_DEPTH_CONTROL, 0);
|
||||
}
|
||||
@@ -3085,7 +3108,9 @@ void evergreen_init_common_regs(struct r600_command_buffer *cb,
|
||||
/* The cs checker requires this register to be set. */
|
||||
r600_store_context_reg(cb, R_028800_DB_DEPTH_CONTROL, 0);
|
||||
|
||||
r600_store_context_reg(cb, R_028354_SX_SURFACE_SYNC, S_028354_SURFACE_SYNC_MASK(0xf));
|
||||
r600_store_context_reg_seq(cb, R_028350_SX_MISC, 2);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, S_028354_SURFACE_SYNC_MASK(0xf));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -3603,30 +3628,6 @@ void evergreen_update_es_state(struct pipe_context *ctx, struct r600_pipe_shader
|
||||
/* After that, the NOP relocation packet must be emitted (shader->bo, RADEON_USAGE_READ). */
|
||||
}
|
||||
|
||||
static unsigned r600_conv_prim_to_gs_out(unsigned mode)
|
||||
{
|
||||
static const int prim_conv[] = {
|
||||
V_028A6C_OUTPRIM_TYPE_POINTLIST,
|
||||
V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP
|
||||
};
|
||||
assert(mode < Elements(prim_conv));
|
||||
|
||||
return prim_conv[mode];
|
||||
}
|
||||
|
||||
void evergreen_update_gs_state(struct pipe_context *ctx, struct r600_pipe_shader *shader)
|
||||
{
|
||||
struct r600_context *rctx = (struct r600_context *)ctx;
|
||||
@@ -3727,6 +3728,7 @@ void evergreen_update_vs_state(struct pipe_context *ctx, struct r600_pipe_shader
|
||||
S_02881C_VS_OUT_CCDIST1_VEC_ENA((rshader->clip_dist_write & 0xF0) != 0) |
|
||||
S_02881C_VS_OUT_MISC_VEC_ENA(rshader->vs_out_misc_write) |
|
||||
S_02881C_USE_VTX_POINT_SIZE(rshader->vs_out_point_size) |
|
||||
S_02881C_USE_VTX_EDGE_FLAG(rshader->vs_out_edgeflag) |
|
||||
S_02881C_USE_VTX_RENDER_TARGET_INDX(rshader->vs_out_layer);
|
||||
}
|
||||
|
||||
|
@@ -582,6 +582,9 @@
|
||||
#define S_028810_VTX_KILL_OR(x) (((x) & 0x1) << 21)
|
||||
#define G_028810_VTX_KILL_OR(x) (((x) >> 21) & 0x1)
|
||||
#define C_028810_VTX_KILL_OR 0xFFDFFFFF
|
||||
#define S_028810_DX_RASTERIZATION_KILL(x) (((x) & 0x1) << 22)
|
||||
#define G_028810_DX_RASTERIZATION_KILL(x) (((x) >> 22) & 0x1)
|
||||
#define C_028810_DX_RASTERIZATION_KILL 0xFFBFFFFF
|
||||
#define S_028810_DX_LINEAR_ATTR_CLIP_ENA(x) (((x) & 0x1) << 24)
|
||||
#define G_028810_DX_LINEAR_ATTR_CLIP_ENA(x) (((x) >> 24) & 0x1)
|
||||
#define C_028810_DX_LINEAR_ATTR_CLIP_ENA 0xFEFFFFFF
|
||||
|
@@ -599,6 +599,12 @@ static void r600_copy_buffer(struct pipe_context *ctx, struct pipe_resource *dst
|
||||
} else {
|
||||
util_resource_copy_region(ctx, dst, 0, dstx, 0, 0, src, 0, src_box);
|
||||
}
|
||||
|
||||
/* The index buffer (VGT) doesn't seem to see the result of the copying.
|
||||
* Can we somehow flush the index buffer cache? Starting a new IB seems
|
||||
* to do the trick. */
|
||||
if (rctx->b.chip_class <= R700)
|
||||
rctx->b.rings.gfx.flush(ctx, RADEON_FLUSH_ASYNC);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -679,6 +685,7 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
|
||||
struct pipe_surface *dst_view, dst_templ;
|
||||
struct pipe_sampler_view src_templ, *src_view;
|
||||
unsigned dst_width, dst_height, src_width0, src_height0, src_widthFL, src_heightFL;
|
||||
unsigned src_force_level = 0;
|
||||
struct pipe_box sbox, dstbox;
|
||||
|
||||
/* Handle buffers first. */
|
||||
@@ -737,6 +744,8 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
|
||||
sbox.height = util_format_get_nblocksy(src->format, src_box->height);
|
||||
sbox.depth = src_box->depth;
|
||||
src_box = &sbox;
|
||||
|
||||
src_force_level = src_level;
|
||||
} else if (!util_blitter_is_copy_supported(rctx->blitter, dst, src)) {
|
||||
if (util_format_is_subsampled_2x1_32bpp(src->format)) {
|
||||
|
||||
@@ -789,7 +798,8 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
|
||||
|
||||
if (rctx->b.chip_class >= EVERGREEN) {
|
||||
src_view = evergreen_create_sampler_view_custom(ctx, src, &src_templ,
|
||||
src_width0, src_height0);
|
||||
src_width0, src_height0,
|
||||
src_force_level);
|
||||
} else {
|
||||
src_view = r600_create_sampler_view_custom(ctx, src, &src_templ,
|
||||
src_widthFL, src_heightFL);
|
||||
|
@@ -81,7 +81,7 @@ void r600_need_cs_space(struct r600_context *ctx, unsigned num_dw,
|
||||
}
|
||||
|
||||
/* SX_MISC */
|
||||
if (ctx->b.chip_class <= R700) {
|
||||
if (ctx->b.chip_class == R600) {
|
||||
num_dw += 3;
|
||||
}
|
||||
|
||||
@@ -210,6 +210,15 @@ void r600_flush_emit(struct r600_context *rctx)
|
||||
S_0085F0_SMX_ACTION_ENA(1);
|
||||
}
|
||||
|
||||
/* Workaround for buggy flushing on some R6xx chipsets. */
|
||||
if (rctx->b.flags & R600_CONTEXT_FLUSH_AND_INV &&
|
||||
(rctx->b.family == CHIP_RV670 ||
|
||||
rctx->b.family == CHIP_RS780 ||
|
||||
rctx->b.family == CHIP_RS880)) {
|
||||
cp_coher_cntl |= S_0085F0_CB1_DEST_BASE_ENA(1) |
|
||||
S_0085F0_DEST_BASE_0_ENA(1);
|
||||
}
|
||||
|
||||
if (cp_coher_cntl) {
|
||||
cs->buf[cs->cdw++] = PKT3(PKT3_SURFACE_SYNC, 3, 0);
|
||||
cs->buf[cs->cdw++] = cp_coher_cntl; /* CP_COHER_CNTL */
|
||||
@@ -260,7 +269,7 @@ void r600_context_flush(struct r600_context *ctx, unsigned flags)
|
||||
r600_flush_emit(ctx);
|
||||
|
||||
/* old kernels and userspace don't set SX_MISC, so we must reset it to 0 here */
|
||||
if (ctx->b.chip_class <= R700) {
|
||||
if (ctx->b.chip_class == R600) {
|
||||
r600_write_context_reg(cs, R_028350_SX_MISC, 0);
|
||||
}
|
||||
|
||||
|
@@ -44,7 +44,7 @@
|
||||
static const struct debug_named_value r600_debug_options[] = {
|
||||
/* features */
|
||||
#if defined(R600_USE_LLVM)
|
||||
{ "nollvm", DBG_NO_LLVM, "Disable the LLVM shader compiler" },
|
||||
{ "llvm", DBG_LLVM, "Enable the LLVM shader compiler" },
|
||||
#endif
|
||||
{ "nocpdma", DBG_NO_CP_DMA, "Disable CP DMA" },
|
||||
{ "nodma", DBG_NO_ASYNC_DMA, "Disable asynchronous DMA" },
|
||||
@@ -419,15 +419,17 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
|
||||
|
||||
/* Texturing. */
|
||||
case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
|
||||
case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
|
||||
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
|
||||
if (family >= CHIP_CEDAR)
|
||||
return 15;
|
||||
else
|
||||
return 14;
|
||||
case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
|
||||
/* textures support 8192, but layered rendering supports 2048 */
|
||||
return 12;
|
||||
case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:
|
||||
return rscreen->b.info.drm_minor >= 9 ?
|
||||
(family >= CHIP_CEDAR ? 16384 : 8192) : 0;
|
||||
/* textures support 8192, but layered rendering supports 2048 */
|
||||
return rscreen->b.info.drm_minor >= 9 ? 2048 : 0;
|
||||
case PIPE_CAP_MAX_COMBINED_SAMPLERS:
|
||||
return 48;
|
||||
|
||||
@@ -589,8 +591,8 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws)
|
||||
rscreen->b.debug_flags |= DBG_FS | DBG_VS | DBG_GS | DBG_PS | DBG_CS;
|
||||
if (debug_get_bool_option("R600_HYPERZ", FALSE))
|
||||
rscreen->b.debug_flags |= DBG_HYPERZ;
|
||||
if (!debug_get_bool_option("R600_LLVM", TRUE))
|
||||
rscreen->b.debug_flags |= DBG_NO_LLVM;
|
||||
if (debug_get_bool_option("R600_LLVM", FALSE))
|
||||
rscreen->b.debug_flags |= DBG_LLVM;
|
||||
|
||||
if (rscreen->b.family == CHIP_UNKNOWN) {
|
||||
fprintf(stderr, "r600: Unknown chipset 0x%04X\n", rscreen->b.info.pci_id);
|
||||
|
@@ -42,7 +42,7 @@
|
||||
|
||||
/* the number of CS dwords for flushing and drawing */
|
||||
#define R600_MAX_FLUSH_CS_DWORDS 16
|
||||
#define R600_MAX_DRAW_CS_DWORDS 34
|
||||
#define R600_MAX_DRAW_CS_DWORDS 37
|
||||
#define R600_TRACE_CS_DWORDS 7
|
||||
|
||||
#define R600_MAX_USER_CONST_BUFFERS 13
|
||||
@@ -195,7 +195,7 @@ struct r600_gs_rings_state {
|
||||
|
||||
/* This must start from 16. */
|
||||
/* features */
|
||||
#define DBG_NO_LLVM (1 << 17)
|
||||
#define DBG_LLVM (1 << 17)
|
||||
#define DBG_NO_CP_DMA (1 << 18)
|
||||
#define DBG_NO_ASYNC_DMA (1 << 19)
|
||||
/* shader backend */
|
||||
@@ -235,6 +235,7 @@ struct r600_rasterizer_state {
|
||||
unsigned clip_plane_enable;
|
||||
unsigned pa_sc_line_stipple;
|
||||
unsigned pa_cl_clip_cntl;
|
||||
unsigned pa_su_sc_mode_cntl;
|
||||
float offset_units;
|
||||
float offset_scale;
|
||||
bool offset_enable;
|
||||
@@ -511,7 +512,8 @@ struct pipe_sampler_view *
|
||||
evergreen_create_sampler_view_custom(struct pipe_context *ctx,
|
||||
struct pipe_resource *texture,
|
||||
const struct pipe_sampler_view *state,
|
||||
unsigned width0, unsigned height0);
|
||||
unsigned width0, unsigned height0,
|
||||
unsigned force_level);
|
||||
void evergreen_init_common_regs(struct r600_command_buffer *cb,
|
||||
enum chip_class ctx_chip_class,
|
||||
enum radeon_family ctx_family,
|
||||
@@ -825,15 +827,6 @@ static INLINE uint32_t S_FIXED(float value, uint32_t frac_bits)
|
||||
}
|
||||
#define ALIGN_DIVUP(x, y) (((x) + (y) - 1) / (y))
|
||||
|
||||
static inline unsigned r600_tex_aniso_filter(unsigned filter)
|
||||
{
|
||||
if (filter <= 1) return 0;
|
||||
if (filter <= 2) return 1;
|
||||
if (filter <= 4) return 2;
|
||||
if (filter <= 8) return 3;
|
||||
/* else */ return 4;
|
||||
}
|
||||
|
||||
/* 12.4 fixed-point */
|
||||
static INLINE unsigned r600_pack_float_12p4(float x)
|
||||
{
|
||||
@@ -841,4 +834,32 @@ static INLINE unsigned r600_pack_float_12p4(float x)
|
||||
x >= 4096 ? 0xffff : x * 16;
|
||||
}
|
||||
|
||||
#define V_028A6C_OUTPRIM_TYPE_POINTLIST 0
|
||||
#define V_028A6C_OUTPRIM_TYPE_LINESTRIP 1
|
||||
#define V_028A6C_OUTPRIM_TYPE_TRISTRIP 2
|
||||
|
||||
static INLINE unsigned r600_conv_prim_to_gs_out(unsigned mode)
|
||||
{
|
||||
static const int prim_conv[] = {
|
||||
V_028A6C_OUTPRIM_TYPE_POINTLIST,
|
||||
V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP
|
||||
};
|
||||
assert(mode < Elements(prim_conv));
|
||||
|
||||
return prim_conv[mode];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -155,7 +155,7 @@ int r600_pipe_shader_create(struct pipe_context *ctx,
|
||||
r = r600_shader_from_tgsi(rctx, shader, key);
|
||||
if (r) {
|
||||
R600_ERR("translation from TGSI failed !\n");
|
||||
return r;
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* disable SB for geom shaders - it can't handle the CF_EMIT instructions */
|
||||
@@ -169,7 +169,7 @@ int r600_pipe_shader_create(struct pipe_context *ctx,
|
||||
r = r600_bytecode_build(&shader->shader.bc);
|
||||
if (r) {
|
||||
R600_ERR("building bytecode failed !\n");
|
||||
return r;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ int r600_pipe_shader_create(struct pipe_context *ctx,
|
||||
dump, use_sb);
|
||||
if (r) {
|
||||
R600_ERR("r600_sb_bytecode_process failed !\n");
|
||||
return r;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,16 +192,16 @@ int r600_pipe_shader_create(struct pipe_context *ctx,
|
||||
r = r600_sb_bytecode_process(rctx, &shader->gs_copy_shader->shader.bc,
|
||||
&shader->gs_copy_shader->shader, dump, 0);
|
||||
if (r)
|
||||
return r;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((r = store_shader(ctx, shader->gs_copy_shader)))
|
||||
return r;
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Store the shader in a buffer. */
|
||||
if ((r = store_shader(ctx, shader)))
|
||||
return r;
|
||||
goto error;
|
||||
|
||||
/* Build state. */
|
||||
switch (shader->shader.processor_type) {
|
||||
@@ -235,9 +235,14 @@ int r600_pipe_shader_create(struct pipe_context *ctx,
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
r = -EINVAL;
|
||||
goto error;
|
||||
}
|
||||
return 0;
|
||||
|
||||
error:
|
||||
r600_pipe_shader_destroy(ctx, shader);
|
||||
return r;
|
||||
}
|
||||
|
||||
void r600_pipe_shader_destroy(struct pipe_context *ctx, struct r600_pipe_shader *shader)
|
||||
@@ -286,6 +291,7 @@ struct r600_shader_ctx {
|
||||
int colors_used;
|
||||
boolean clip_vertex_write;
|
||||
unsigned cv_output;
|
||||
unsigned edgeflag_output;
|
||||
int fragcoord_input;
|
||||
int native_integers;
|
||||
int next_ring_offset;
|
||||
@@ -490,9 +496,10 @@ static int r600_spi_sid(struct r600_shader_io * io)
|
||||
* semantic indices, so we'll use 0 for them.
|
||||
*/
|
||||
if (name == TGSI_SEMANTIC_POSITION ||
|
||||
name == TGSI_SEMANTIC_PSIZE ||
|
||||
name == TGSI_SEMANTIC_LAYER ||
|
||||
name == TGSI_SEMANTIC_FACE)
|
||||
name == TGSI_SEMANTIC_PSIZE ||
|
||||
name == TGSI_SEMANTIC_EDGEFLAG ||
|
||||
name == TGSI_SEMANTIC_LAYER ||
|
||||
name == TGSI_SEMANTIC_FACE)
|
||||
index = 0;
|
||||
else {
|
||||
if (name == TGSI_SEMANTIC_GENERIC) {
|
||||
@@ -623,6 +630,11 @@ static int tgsi_declaration(struct r600_shader_ctx *ctx)
|
||||
ctx->shader->vs_out_misc_write = 1;
|
||||
ctx->shader->vs_out_point_size = 1;
|
||||
break;
|
||||
case TGSI_SEMANTIC_EDGEFLAG:
|
||||
ctx->shader->vs_out_misc_write = 1;
|
||||
ctx->shader->vs_out_edgeflag = 1;
|
||||
ctx->edgeflag_output = i;
|
||||
break;
|
||||
case TGSI_SEMANTIC_LAYER:
|
||||
ctx->shader->vs_out_misc_write = 1;
|
||||
ctx->shader->vs_out_layer = 1;
|
||||
@@ -1157,6 +1169,35 @@ out_err:
|
||||
return r;
|
||||
}
|
||||
|
||||
static void convert_edgeflag_to_int(struct r600_shader_ctx *ctx)
|
||||
{
|
||||
struct r600_bytecode_alu alu;
|
||||
unsigned reg;
|
||||
|
||||
if (!ctx->shader->vs_out_edgeflag)
|
||||
return;
|
||||
|
||||
reg = ctx->shader->output[ctx->edgeflag_output].gpr;
|
||||
|
||||
/* clamp(x, 0, 1) */
|
||||
memset(&alu, 0, sizeof(alu));
|
||||
alu.op = ALU_OP1_MOV;
|
||||
alu.src[0].sel = reg;
|
||||
alu.dst.sel = reg;
|
||||
alu.dst.write = 1;
|
||||
alu.dst.clamp = 1;
|
||||
alu.last = 1;
|
||||
r600_bytecode_add_alu(ctx->bc, &alu);
|
||||
|
||||
memset(&alu, 0, sizeof(alu));
|
||||
alu.op = ALU_OP1_FLT_TO_INT;
|
||||
alu.src[0].sel = reg;
|
||||
alu.dst.sel = reg;
|
||||
alu.dst.write = 1;
|
||||
alu.last = 1;
|
||||
r600_bytecode_add_alu(ctx->bc, &alu);
|
||||
}
|
||||
|
||||
static int generate_gs_copy_shader(struct r600_context *rctx,
|
||||
struct r600_pipe_shader *gs,
|
||||
struct pipe_stream_output_info *so)
|
||||
@@ -1480,7 +1521,7 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
|
||||
bool pos_emitted = false;
|
||||
|
||||
#ifdef R600_USE_LLVM
|
||||
use_llvm = !(rscreen->b.debug_flags & DBG_NO_LLVM);
|
||||
use_llvm = rscreen->b.debug_flags & DBG_LLVM;
|
||||
#endif
|
||||
ctx.bc = &shader->bc;
|
||||
ctx.shader = shader;
|
||||
@@ -1901,6 +1942,8 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
|
||||
so.num_outputs && !use_llvm)
|
||||
emit_streamout(&ctx, &so);
|
||||
|
||||
convert_edgeflag_to_int(&ctx);
|
||||
|
||||
if (ring_outputs) {
|
||||
if (key.vs_as_es)
|
||||
emit_gs_ring_writes(&ctx, FALSE);
|
||||
@@ -1936,6 +1979,15 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
|
||||
output[j].type = V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_POS;
|
||||
pos_emitted = true;
|
||||
break;
|
||||
case TGSI_SEMANTIC_EDGEFLAG:
|
||||
output[j].array_base = 61;
|
||||
output[j].swizzle_x = 7;
|
||||
output[j].swizzle_y = 0;
|
||||
output[j].swizzle_z = 7;
|
||||
output[j].swizzle_w = 7;
|
||||
output[j].type = V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_POS;
|
||||
pos_emitted = true;
|
||||
break;
|
||||
case TGSI_SEMANTIC_LAYER:
|
||||
output[j].array_base = 61;
|
||||
output[j].swizzle_x = 7;
|
||||
@@ -4338,11 +4390,16 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
|
||||
(inst->Texture.Texture == TGSI_TEXTURE_2D_MSAA ||
|
||||
inst->Texture.Texture == TGSI_TEXTURE_2D_ARRAY_MSAA);
|
||||
|
||||
bool txf_add_offsets = inst->Texture.NumOffsets &&
|
||||
inst->Instruction.Opcode == TGSI_OPCODE_TXF &&
|
||||
inst->Texture.Texture != TGSI_TEXTURE_BUFFER;
|
||||
|
||||
/* Texture fetch instructions can only use gprs as source.
|
||||
* Also they cannot negate the source or take the absolute value */
|
||||
const boolean src_requires_loading = (inst->Instruction.Opcode != TGSI_OPCODE_TXQ_LZ &&
|
||||
tgsi_tex_src_requires_loading(ctx, 0)) ||
|
||||
read_compressed_msaa;
|
||||
read_compressed_msaa || txf_add_offsets;
|
||||
|
||||
boolean src_loaded = FALSE;
|
||||
unsigned sampler_src_reg = inst->Instruction.Opcode == TGSI_OPCODE_TXQ_LZ ? 0 : 1;
|
||||
int8_t offset_x = 0, offset_y = 0, offset_z = 0;
|
||||
@@ -4375,15 +4432,6 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
/* get offset values */
|
||||
if (inst->Texture.NumOffsets) {
|
||||
assert(inst->Texture.NumOffsets == 1);
|
||||
|
||||
offset_x = ctx->literals[4 * inst->TexOffsets[0].Index + inst->TexOffsets[0].SwizzleX] << 1;
|
||||
offset_y = ctx->literals[4 * inst->TexOffsets[0].Index + inst->TexOffsets[0].SwizzleY] << 1;
|
||||
offset_z = ctx->literals[4 * inst->TexOffsets[0].Index + inst->TexOffsets[0].SwizzleZ] << 1;
|
||||
}
|
||||
|
||||
if (inst->Instruction.Opcode == TGSI_OPCODE_TXD) {
|
||||
/* TGSI moves the sampler to src reg 3 for TXD */
|
||||
sampler_src_reg = 3;
|
||||
@@ -4736,6 +4784,77 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
|
||||
src_gpr = ctx->temp_reg;
|
||||
}
|
||||
|
||||
/* get offset values */
|
||||
if (inst->Texture.NumOffsets) {
|
||||
assert(inst->Texture.NumOffsets == 1);
|
||||
|
||||
if (txf_add_offsets) {
|
||||
/* Add the offsets for texelFetch manually. */
|
||||
const struct tgsi_texture_offset *off = inst->TexOffsets;
|
||||
|
||||
switch (inst->Texture.Texture) {
|
||||
case TGSI_TEXTURE_3D:
|
||||
memset(&alu, 0, sizeof(struct r600_bytecode_alu));
|
||||
alu.op = ALU_OP2_ADD_INT;
|
||||
alu.src[0].sel = src_gpr;
|
||||
alu.src[0].chan = 2;
|
||||
alu.src[1].sel = V_SQ_ALU_SRC_LITERAL;
|
||||
alu.src[1].value = ctx->literals[4 * off[0].Index + off[0].SwizzleZ];
|
||||
alu.dst.sel = src_gpr;
|
||||
alu.dst.chan = 2;
|
||||
alu.dst.write = 1;
|
||||
alu.last = 1;
|
||||
r = r600_bytecode_add_alu(ctx->bc, &alu);
|
||||
if (r)
|
||||
return r;
|
||||
/* fall through */
|
||||
|
||||
case TGSI_TEXTURE_2D:
|
||||
case TGSI_TEXTURE_SHADOW2D:
|
||||
case TGSI_TEXTURE_RECT:
|
||||
case TGSI_TEXTURE_SHADOWRECT:
|
||||
case TGSI_TEXTURE_2D_ARRAY:
|
||||
case TGSI_TEXTURE_SHADOW2D_ARRAY:
|
||||
memset(&alu, 0, sizeof(struct r600_bytecode_alu));
|
||||
alu.op = ALU_OP2_ADD_INT;
|
||||
alu.src[0].sel = src_gpr;
|
||||
alu.src[0].chan = 1;
|
||||
alu.src[1].sel = V_SQ_ALU_SRC_LITERAL;
|
||||
alu.src[1].value = ctx->literals[4 * off[0].Index + off[0].SwizzleY];
|
||||
alu.dst.sel = src_gpr;
|
||||
alu.dst.chan = 1;
|
||||
alu.dst.write = 1;
|
||||
alu.last = 1;
|
||||
r = r600_bytecode_add_alu(ctx->bc, &alu);
|
||||
if (r)
|
||||
return r;
|
||||
/* fall through */
|
||||
|
||||
case TGSI_TEXTURE_1D:
|
||||
case TGSI_TEXTURE_SHADOW1D:
|
||||
case TGSI_TEXTURE_1D_ARRAY:
|
||||
case TGSI_TEXTURE_SHADOW1D_ARRAY:
|
||||
memset(&alu, 0, sizeof(struct r600_bytecode_alu));
|
||||
alu.op = ALU_OP2_ADD_INT;
|
||||
alu.src[0].sel = src_gpr;
|
||||
alu.src[1].sel = V_SQ_ALU_SRC_LITERAL;
|
||||
alu.src[1].value = ctx->literals[4 * off[0].Index + off[0].SwizzleX];
|
||||
alu.dst.sel = src_gpr;
|
||||
alu.dst.write = 1;
|
||||
alu.last = 1;
|
||||
r = r600_bytecode_add_alu(ctx->bc, &alu);
|
||||
if (r)
|
||||
return r;
|
||||
break;
|
||||
/* texture offsets do not apply to other texture targets */
|
||||
}
|
||||
} else {
|
||||
offset_x = ctx->literals[4 * inst->TexOffsets[0].Index + inst->TexOffsets[0].SwizzleX] << 1;
|
||||
offset_y = ctx->literals[4 * inst->TexOffsets[0].Index + inst->TexOffsets[0].SwizzleY] << 1;
|
||||
offset_z = ctx->literals[4 * inst->TexOffsets[0].Index + inst->TexOffsets[0].SwizzleZ] << 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Obtain the sample index for reading a compressed MSAA color texture.
|
||||
* To read the FMASK, we use the ldfptr instruction, which tells us
|
||||
* where the samples are stored.
|
||||
|
@@ -63,6 +63,7 @@ struct r600_shader {
|
||||
boolean vs_out_misc_write;
|
||||
boolean vs_out_point_size;
|
||||
boolean vs_out_layer;
|
||||
boolean vs_out_edgeflag;
|
||||
boolean has_txq_cube_array_z_comp;
|
||||
boolean uses_tex_buffers;
|
||||
boolean gs_prim_id_input;
|
||||
|
@@ -911,6 +911,10 @@ static void *r600_create_rs_state(struct pipe_context *ctx,
|
||||
S_028810_ZCLIP_NEAR_DISABLE(!state->depth_clip) |
|
||||
S_028810_ZCLIP_FAR_DISABLE(!state->depth_clip) |
|
||||
S_028810_DX_LINEAR_ATTR_CLIP_ENA(1);
|
||||
if (rctx->b.chip_class == R700) {
|
||||
rs->pa_cl_clip_cntl |=
|
||||
S_028810_DX_RASTERIZATION_KILL(state->rasterizer_discard);
|
||||
}
|
||||
rs->multisample_enable = state->multisample;
|
||||
|
||||
/* offset */
|
||||
@@ -968,19 +972,25 @@ static void *r600_create_rs_state(struct pipe_context *ctx,
|
||||
S_028C08_PIX_CENTER_HALF(state->half_pixel_center) |
|
||||
S_028C08_QUANT_MODE(V_028C08_X_1_256TH));
|
||||
r600_store_context_reg(&rs->buffer, R_028DFC_PA_SU_POLY_OFFSET_CLAMP, fui(state->offset_clamp));
|
||||
r600_store_context_reg(&rs->buffer, R_028814_PA_SU_SC_MODE_CNTL,
|
||||
S_028814_PROVOKING_VTX_LAST(!state->flatshade_first) |
|
||||
S_028814_CULL_FRONT(state->cull_face & PIPE_FACE_FRONT ? 1 : 0) |
|
||||
S_028814_CULL_BACK(state->cull_face & PIPE_FACE_BACK ? 1 : 0) |
|
||||
S_028814_FACE(!state->front_ccw) |
|
||||
S_028814_POLY_OFFSET_FRONT_ENABLE(state->offset_tri) |
|
||||
S_028814_POLY_OFFSET_BACK_ENABLE(state->offset_tri) |
|
||||
S_028814_POLY_OFFSET_PARA_ENABLE(state->offset_tri) |
|
||||
S_028814_POLY_MODE(state->fill_front != PIPE_POLYGON_MODE_FILL ||
|
||||
state->fill_back != PIPE_POLYGON_MODE_FILL) |
|
||||
S_028814_POLYMODE_FRONT_PTYPE(r600_translate_fill(state->fill_front)) |
|
||||
S_028814_POLYMODE_BACK_PTYPE(r600_translate_fill(state->fill_back)));
|
||||
r600_store_context_reg(&rs->buffer, R_028350_SX_MISC, S_028350_MULTIPASS(state->rasterizer_discard));
|
||||
|
||||
rs->pa_su_sc_mode_cntl = S_028814_PROVOKING_VTX_LAST(!state->flatshade_first) |
|
||||
S_028814_CULL_FRONT(state->cull_face & PIPE_FACE_FRONT ? 1 : 0) |
|
||||
S_028814_CULL_BACK(state->cull_face & PIPE_FACE_BACK ? 1 : 0) |
|
||||
S_028814_FACE(!state->front_ccw) |
|
||||
S_028814_POLY_OFFSET_FRONT_ENABLE(state->offset_tri) |
|
||||
S_028814_POLY_OFFSET_BACK_ENABLE(state->offset_tri) |
|
||||
S_028814_POLY_OFFSET_PARA_ENABLE(state->offset_tri) |
|
||||
S_028814_POLY_MODE(state->fill_front != PIPE_POLYGON_MODE_FILL ||
|
||||
state->fill_back != PIPE_POLYGON_MODE_FILL) |
|
||||
S_028814_POLYMODE_FRONT_PTYPE(r600_translate_fill(state->fill_front)) |
|
||||
S_028814_POLYMODE_BACK_PTYPE(r600_translate_fill(state->fill_back));
|
||||
if (rctx->b.chip_class == R700) {
|
||||
r600_store_context_reg(&rs->buffer, R_028814_PA_SU_SC_MODE_CNTL, rs->pa_su_sc_mode_cntl);
|
||||
}
|
||||
if (rctx->b.chip_class == R600) {
|
||||
r600_store_context_reg(&rs->buffer, R_028350_SX_MISC,
|
||||
S_028350_MULTIPASS(state->rasterizer_discard));
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
|
||||
@@ -2052,6 +2062,11 @@ static void r600_emit_db_misc_state(struct r600_context *rctx, struct r600_atom
|
||||
db_render_control |= S_028D0C_DEPTH_CLEAR_ENABLE(1);
|
||||
}
|
||||
|
||||
/* RV770 workaround for a hang with 8x MSAA. */
|
||||
if (rctx->b.family == CHIP_RV770 && a->log_samples == 3) {
|
||||
db_render_override |= S_028D10_MAX_TILES_IN_DTT(6);
|
||||
}
|
||||
|
||||
r600_write_context_reg_seq(cs, R_028D0C_DB_RENDER_CONTROL, 2);
|
||||
radeon_emit(cs, db_render_control); /* R_028D0C_DB_RENDER_CONTROL */
|
||||
radeon_emit(cs, db_render_override); /* R_028D10_DB_RENDER_OVERRIDE */
|
||||
@@ -2817,8 +2832,11 @@ void r600_init_atom_start_cs(struct r600_context *rctx)
|
||||
|
||||
r600_store_context_reg(cb, R_0288A4_SQ_PGM_RESOURCES_FS, 0);
|
||||
|
||||
if (rctx->b.chip_class == R700)
|
||||
r600_store_context_reg(cb, R_028350_SX_MISC, 0);
|
||||
if (rctx->b.chip_class == R700 && rctx->screen->b.has_streamout)
|
||||
r600_store_context_reg(cb, R_028354_SX_SURFACE_SYNC, S_028354_SURFACE_SYNC_MASK(0xf));
|
||||
|
||||
r600_store_context_reg(cb, R_028800_DB_DEPTH_CONTROL, 0);
|
||||
if (rctx->screen->b.has_streamout) {
|
||||
r600_store_context_reg(cb, R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET, 0);
|
||||
@@ -2996,31 +3014,9 @@ void r600_update_vs_state(struct pipe_context *ctx, struct r600_pipe_shader *sha
|
||||
S_02881C_VS_OUT_CCDIST0_VEC_ENA((rshader->clip_dist_write & 0x0F) != 0) |
|
||||
S_02881C_VS_OUT_CCDIST1_VEC_ENA((rshader->clip_dist_write & 0xF0) != 0) |
|
||||
S_02881C_VS_OUT_MISC_VEC_ENA(rshader->vs_out_misc_write) |
|
||||
S_02881C_USE_VTX_POINT_SIZE(rshader->vs_out_point_size);
|
||||
}
|
||||
|
||||
static unsigned r600_conv_prim_to_gs_out(unsigned mode)
|
||||
{
|
||||
static const int prim_conv[] = {
|
||||
V_028A6C_OUTPRIM_TYPE_POINTLIST,
|
||||
V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
V_028A6C_OUTPRIM_TYPE_TRISTRIP
|
||||
};
|
||||
assert(mode < Elements(prim_conv));
|
||||
|
||||
return prim_conv[mode];
|
||||
S_02881C_USE_VTX_POINT_SIZE(rshader->vs_out_point_size) |
|
||||
S_02881C_USE_VTX_EDGE_FLAG(rshader->vs_out_edgeflag) |
|
||||
S_02881C_USE_VTX_RENDER_TARGET_INDX(rshader->vs_out_layer);
|
||||
}
|
||||
|
||||
void r600_update_gs_state(struct pipe_context *ctx, struct r600_pipe_shader *shader)
|
||||
|
@@ -1408,6 +1408,25 @@ static void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info
|
||||
r600_emit_atom(rctx, rctx->atoms[i]);
|
||||
}
|
||||
|
||||
/* On R6xx, CULL_FRONT=1 culls all points, lines, and rectangles,
|
||||
* even though it should have no effect on those. */
|
||||
if (rctx->b.chip_class == R600 && rctx->rasterizer) {
|
||||
unsigned su_sc_mode_cntl = rctx->rasterizer->pa_su_sc_mode_cntl;
|
||||
unsigned prim = info.mode;
|
||||
|
||||
if (rctx->gs_shader) {
|
||||
prim = rctx->gs_shader->current->shader.gs_output_prim;
|
||||
}
|
||||
prim = r600_conv_prim_to_gs_out(prim); /* decrease the number of types to 3 */
|
||||
|
||||
if (prim == V_028A6C_OUTPRIM_TYPE_POINTLIST ||
|
||||
prim == V_028A6C_OUTPRIM_TYPE_LINESTRIP ||
|
||||
info.mode == R600_PRIM_RECTANGLE_LIST) {
|
||||
su_sc_mode_cntl &= C_028814_CULL_FRONT;
|
||||
}
|
||||
r600_write_context_reg(cs, R_028814_PA_SU_SC_MODE_CNTL, su_sc_mode_cntl);
|
||||
}
|
||||
|
||||
/* Update start instance. */
|
||||
if (rctx->last_start_instance != info.start_instance) {
|
||||
r600_write_ctl_const(cs, R_03CFF4_SQ_VTX_START_INST_LOC, info.start_instance);
|
||||
|
@@ -543,6 +543,9 @@
|
||||
#define S_028810_VTX_KILL_OR(x) (((x) & 0x1) << 21)
|
||||
#define G_028810_VTX_KILL_OR(x) (((x) >> 21) & 0x1)
|
||||
#define C_028810_VTX_KILL_OR 0xFFDFFFFF
|
||||
#define S_028810_DX_RASTERIZATION_KILL(x) (((x) & 0x1) << 22) /* R700 only? */
|
||||
#define G_028810_DX_RASTERIZATION_KILL(x) (((x) >> 22) & 0x1)
|
||||
#define C_028810_DX_RASTERIZATION_KILL 0xFFBFFFFF
|
||||
#define S_028810_DX_LINEAR_ATTR_CLIP_ENA(x) (((x) & 0x1) << 24)
|
||||
#define G_028810_DX_LINEAR_ATTR_CLIP_ENA(x) (((x) >> 24) & 0x1)
|
||||
#define C_028810_DX_LINEAR_ATTR_CLIP_ENA 0xFEFFFFFF
|
||||
@@ -818,6 +821,9 @@
|
||||
#define S_028D10_IGNORE_SC_ZRANGE(x) (((x) & 0x1) << 17)
|
||||
#define G_028D10_IGNORE_SC_ZRANGE(x) (((x) >> 17) & 0x1)
|
||||
#define C_028D10_IGNORE_SC_ZRANGE 0xFFFDFFFF
|
||||
#define S_028D10_MAX_TILES_IN_DTT(x) (((x) & 0x1F) << 21)
|
||||
#define G_028D10_MAX_TILES_IN_DTT(x) (((x) >> 21) & 0x1F)
|
||||
#define C_028D10_MAX_TILES_IN_DTT 0xFC1FFFFF
|
||||
#define R_02880C_DB_SHADER_CONTROL 0x02880C
|
||||
#define S_02880C_Z_EXPORT_ENABLE(x) (((x) & 0x1) << 0)
|
||||
#define G_02880C_Z_EXPORT_ENABLE(x) (((x) >> 0) & 0x1)
|
||||
|
@@ -390,6 +390,15 @@ r600_resource_reference(struct r600_resource **ptr, struct r600_resource *res)
|
||||
(struct pipe_resource *)res);
|
||||
}
|
||||
|
||||
static inline unsigned r600_tex_aniso_filter(unsigned filter)
|
||||
{
|
||||
if (filter <= 1) return 0;
|
||||
if (filter <= 2) return 1;
|
||||
if (filter <= 4) return 2;
|
||||
if (filter <= 8) return 3;
|
||||
/* else */ return 4;
|
||||
}
|
||||
|
||||
#define R600_ERR(fmt, args...) \
|
||||
fprintf(stderr, "EE %s:%d %s - "fmt, __FILE__, __LINE__, __func__, ##args)
|
||||
|
||||
|
@@ -296,6 +296,12 @@ void r600_texture_get_fmask_info(struct r600_common_screen *rscreen,
|
||||
fmask.nsamples = 1;
|
||||
fmask.flags |= RADEON_SURF_FMASK;
|
||||
|
||||
/* Force 2D tiling if it wasn't set. This may occur when creating
|
||||
* FMASK for MSAA resolve on R6xx. On R6xx, the single-sample
|
||||
* destination buffer must have an FMASK too. */
|
||||
fmask.flags = RADEON_SURF_CLR(fmask.flags, MODE);
|
||||
fmask.flags |= RADEON_SURF_SET(RADEON_SURF_MODE_2D, MODE);
|
||||
|
||||
if (rscreen->chip_class >= SI) {
|
||||
fmask.flags |= RADEON_SURF_HAS_TILE_MODE_INDEX;
|
||||
}
|
||||
|
@@ -151,7 +151,7 @@ static void si_update_descriptors(struct si_context *sctx,
|
||||
7 + /* copy */
|
||||
(4 + desc->element_dw_size) * util_bitcount(desc->dirty_mask) + /* update */
|
||||
4; /* pointer update */
|
||||
#if HAVE_LLVM >= 0x0305
|
||||
#if LLVM_SUPPORTS_GEOM_SHADERS
|
||||
if (desc->shader_userdata_reg >= R_00B130_SPI_SHADER_USER_DATA_VS_0 &&
|
||||
desc->shader_userdata_reg < R_00B230_SPI_SHADER_USER_DATA_GS_0)
|
||||
desc->atom.num_dw += 4; /* second pointer update */
|
||||
@@ -176,7 +176,7 @@ static void si_emit_shader_pointer(struct si_context *sctx,
|
||||
radeon_emit(cs, va);
|
||||
radeon_emit(cs, va >> 32);
|
||||
|
||||
#if HAVE_LLVM >= 0x0305
|
||||
#if LLVM_SUPPORTS_GEOM_SHADERS
|
||||
if (desc->shader_userdata_reg >= R_00B130_SPI_SHADER_USER_DATA_VS_0 &&
|
||||
desc->shader_userdata_reg < R_00B230_SPI_SHADER_USER_DATA_GS_0) {
|
||||
radeon_emit(cs, PKT3(PKT3_SET_SH_REG, 2, 0));
|
||||
|
@@ -269,7 +269,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
|
||||
return 256;
|
||||
|
||||
case PIPE_CAP_GLSL_FEATURE_LEVEL:
|
||||
return HAVE_LLVM >= 0x0305 ? 330 : 140;
|
||||
return (LLVM_SUPPORTS_GEOM_SHADERS) ? 330 : 140;
|
||||
|
||||
case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
|
||||
return 1;
|
||||
@@ -307,11 +307,14 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
|
||||
|
||||
/* Texturing. */
|
||||
case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
|
||||
case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
|
||||
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
|
||||
return 15;
|
||||
return 15; /* 16384 */
|
||||
case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
|
||||
/* textures support 8192, but layered rendering supports 2048 */
|
||||
return 12;
|
||||
case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:
|
||||
return 16384;
|
||||
/* textures support 8192, but layered rendering supports 2048 */
|
||||
return 2048;
|
||||
case PIPE_CAP_MAX_COMBINED_SAMPLERS:
|
||||
return HAVE_LLVM >= 0x0305 ? 48 : 32;
|
||||
|
||||
@@ -346,7 +349,7 @@ static int si_get_shader_param(struct pipe_screen* pscreen, unsigned shader, enu
|
||||
case PIPE_SHADER_VERTEX:
|
||||
break;
|
||||
case PIPE_SHADER_GEOMETRY:
|
||||
#if HAVE_LLVM < 0x0305
|
||||
#if !(LLVM_SUPPORTS_GEOM_SHADERS)
|
||||
return 0;
|
||||
#endif
|
||||
break;
|
||||
|
@@ -39,6 +39,10 @@
|
||||
|
||||
#define SI_MAX_DRAW_CS_DWORDS 18
|
||||
|
||||
#define LLVM_SUPPORTS_GEOM_SHADERS \
|
||||
((HAVE_LLVM >= 0x0305) || \
|
||||
(HAVE_LLVM == 0x0304 && LLVM_VERSION_PATCH >= 1))
|
||||
|
||||
struct si_pipe_compute;
|
||||
|
||||
struct si_screen {
|
||||
|
@@ -2307,7 +2307,7 @@ static void *si_create_fs_state(struct pipe_context *ctx,
|
||||
return si_create_shader_state(ctx, state, PIPE_SHADER_FRAGMENT);
|
||||
}
|
||||
|
||||
#if HAVE_LLVM >= 0x0305
|
||||
#if LLVM_SUPPORTS_GEOM_SHADERS
|
||||
|
||||
static void *si_create_gs_state(struct pipe_context *ctx,
|
||||
const struct pipe_shader_state *state)
|
||||
@@ -2337,7 +2337,7 @@ static void si_bind_vs_shader(struct pipe_context *ctx, void *state)
|
||||
sctx->vs_shader = sel;
|
||||
}
|
||||
|
||||
#if HAVE_LLVM >= 0x0305
|
||||
#if LLVM_SUPPORTS_GEOM_SHADERS
|
||||
|
||||
static void si_bind_gs_shader(struct pipe_context *ctx, void *state)
|
||||
{
|
||||
@@ -2396,7 +2396,7 @@ static void si_delete_vs_shader(struct pipe_context *ctx, void *state)
|
||||
si_delete_shader_selector(ctx, sel);
|
||||
}
|
||||
|
||||
#if HAVE_LLVM >= 0x0305
|
||||
#if LLVM_SUPPORTS_GEOM_SHADERS
|
||||
|
||||
static void si_delete_gs_shader(struct pipe_context *ctx, void *state)
|
||||
{
|
||||
@@ -2723,16 +2723,15 @@ static void *si_create_sampler_state(struct pipe_context *ctx,
|
||||
rstate->val[0] = (S_008F30_CLAMP_X(si_tex_wrap(state->wrap_s)) |
|
||||
S_008F30_CLAMP_Y(si_tex_wrap(state->wrap_t)) |
|
||||
S_008F30_CLAMP_Z(si_tex_wrap(state->wrap_r)) |
|
||||
(state->max_anisotropy & 0x7) << 9 | /* XXX */
|
||||
r600_tex_aniso_filter(state->max_anisotropy) << 9 |
|
||||
S_008F30_DEPTH_COMPARE_FUNC(si_tex_compare(state->compare_func)) |
|
||||
S_008F30_FORCE_UNNORMALIZED(!state->normalized_coords) |
|
||||
aniso_flag_offset << 16 | /* XXX */
|
||||
S_008F30_DISABLE_CUBE_WRAP(!state->seamless_cube_map));
|
||||
rstate->val[1] = (S_008F34_MIN_LOD(S_FIXED(CLAMP(state->min_lod, 0, 15), 8)) |
|
||||
S_008F34_MAX_LOD(S_FIXED(CLAMP(state->max_lod, 0, 15), 8)));
|
||||
rstate->val[2] = (S_008F38_LOD_BIAS(S_FIXED(CLAMP(state->lod_bias, -16, 16), 8)) |
|
||||
S_008F38_XY_MAG_FILTER(si_tex_filter(state->mag_img_filter)) |
|
||||
S_008F38_XY_MIN_FILTER(si_tex_filter(state->min_img_filter)) |
|
||||
S_008F38_XY_MAG_FILTER(si_tex_filter(state->mag_img_filter) | aniso_flag_offset) |
|
||||
S_008F38_XY_MIN_FILTER(si_tex_filter(state->min_img_filter) | aniso_flag_offset) |
|
||||
S_008F38_MIP_FILTER(si_tex_mipfilter(state->min_mip_filter)));
|
||||
rstate->val[3] = S_008F3C_BORDER_COLOR_TYPE(border_color_type);
|
||||
|
||||
@@ -2890,7 +2889,7 @@ static void si_bind_vs_sampler_states(struct pipe_context *ctx, unsigned count,
|
||||
si_set_sampler_states(sctx, pm4, count, states,
|
||||
&sctx->samplers[PIPE_SHADER_VERTEX],
|
||||
R_00B130_SPI_SHADER_USER_DATA_VS_0);
|
||||
#if HAVE_LLVM >= 0x0305
|
||||
#if LLVM_SUPPORTS_GEOM_SHADERS
|
||||
si_set_sampler_states(sctx, pm4, count, states,
|
||||
&sctx->samplers[PIPE_SHADER_VERTEX],
|
||||
R_00B330_SPI_SHADER_USER_DATA_ES_0);
|
||||
@@ -3166,7 +3165,7 @@ void si_init_state_functions(struct si_context *sctx)
|
||||
sctx->b.b.bind_fs_state = si_bind_ps_shader;
|
||||
sctx->b.b.delete_vs_state = si_delete_vs_shader;
|
||||
sctx->b.b.delete_fs_state = si_delete_ps_shader;
|
||||
#if HAVE_LLVM >= 0x0305
|
||||
#if LLVM_SUPPORTS_GEOM_SHADERS
|
||||
sctx->b.b.create_gs_state = si_create_gs_state;
|
||||
sctx->b.b.bind_gs_state = si_bind_gs_shader;
|
||||
sctx->b.b.delete_gs_state = si_delete_gs_shader;
|
||||
|
@@ -60,7 +60,7 @@ softpipe_resource_layout(struct pipe_screen *screen,
|
||||
unsigned width = pt->width0;
|
||||
unsigned height = pt->height0;
|
||||
unsigned depth = pt->depth0;
|
||||
unsigned buffer_size = 0;
|
||||
uint64_t buffer_size = 0;
|
||||
|
||||
for (level = 0; level <= pt->last_level; level++) {
|
||||
unsigned slices;
|
||||
@@ -76,8 +76,8 @@ softpipe_resource_layout(struct pipe_screen *screen,
|
||||
|
||||
spr->level_offset[level] = buffer_size;
|
||||
|
||||
buffer_size += (util_format_get_nblocksy(pt->format, height) *
|
||||
slices * spr->stride[level]);
|
||||
buffer_size += (uint64_t) util_format_get_nblocksy(pt->format, height) *
|
||||
slices * spr->stride[level];
|
||||
|
||||
width = u_minify(width, 1);
|
||||
height = u_minify(height, 1);
|
||||
|
@@ -92,6 +92,8 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
|
||||
if (svga == NULL)
|
||||
goto no_svga;
|
||||
|
||||
LIST_INITHEAD(&svga->dirty_buffers);
|
||||
|
||||
svga->pipe.screen = screen;
|
||||
svga->pipe.priv = priv;
|
||||
svga->pipe.destroy = svga_destroy;
|
||||
@@ -154,8 +156,6 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
|
||||
|
||||
svga->dirty = ~0;
|
||||
|
||||
LIST_INITHEAD(&svga->dirty_buffers);
|
||||
|
||||
return &svga->pipe;
|
||||
|
||||
no_state:
|
||||
|
@@ -235,15 +235,43 @@ make_fs_key(const struct svga_context *svga,
|
||||
if (svga->curr.blend->need_white_fragments) {
|
||||
key->white_fragments = 1;
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
/*
|
||||
* We expect a consistent set of samplers and sampler views.
|
||||
* Do some debug checks/warnings here.
|
||||
*/
|
||||
{
|
||||
static boolean warned = FALSE;
|
||||
unsigned i, n = MAX2(svga->curr.num_sampler_views,
|
||||
svga->curr.num_samplers);
|
||||
/* Only warn once to prevent too much debug output */
|
||||
if (!warned) {
|
||||
if (svga->curr.num_sampler_views != svga->curr.num_samplers) {
|
||||
debug_printf("svga: mismatched number of sampler views (%u) "
|
||||
"vs. samplers (%u)\n",
|
||||
svga->curr.num_sampler_views,
|
||||
svga->curr.num_samplers);
|
||||
}
|
||||
for (i = 0; i < n; i++) {
|
||||
if ((svga->curr.sampler_views[i] == NULL) !=
|
||||
(svga->curr.sampler[i] == NULL))
|
||||
debug_printf("sampler_view[%u] = %p but sampler[%u] = %p\n",
|
||||
i, svga->curr.sampler_views[i],
|
||||
i, svga->curr.sampler[i]);
|
||||
}
|
||||
warned = TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* XXX: want to limit this to the textures that the shader actually
|
||||
* refers to.
|
||||
*
|
||||
* SVGA_NEW_TEXTURE_BINDING | SVGA_NEW_SAMPLER
|
||||
*/
|
||||
for (i = 0; i < svga->curr.num_sampler_views; i++) {
|
||||
if (svga->curr.sampler_views[i]) {
|
||||
assert(svga->curr.sampler[i]);
|
||||
if (svga->curr.sampler_views[i] && svga->curr.sampler[i]) {
|
||||
assert(svga->curr.sampler_views[i]->texture);
|
||||
key->tex[i].texture_target = svga->curr.sampler_views[i]->texture->target;
|
||||
if (!svga->curr.sampler[i]->normalized_coords) {
|
||||
@@ -262,7 +290,7 @@ make_fs_key(const struct svga_context *svga,
|
||||
|
||||
idx = 0;
|
||||
for (i = 0; i < svga->curr.num_samplers; ++i) {
|
||||
if (svga->curr.sampler_views[i]) {
|
||||
if (svga->curr.sampler_views[i] && svga->curr.sampler[i]) {
|
||||
struct pipe_resource *tex = svga->curr.sampler_views[i]->texture;
|
||||
struct svga_texture *stex = svga_texture(tex);
|
||||
SVGA3dSurfaceFormat format = stex->key.format;
|
||||
|
@@ -85,7 +85,7 @@ update_tss_binding(struct svga_context *svga,
|
||||
struct pipe_sampler_view *sv = svga->curr.sampler_views[i];
|
||||
|
||||
/* get min max lod */
|
||||
if (sv) {
|
||||
if (sv && s) {
|
||||
min_lod = MAX2(0, (s->view_min_lod + sv->u.tex.first_level));
|
||||
max_lod = MIN2(s->view_max_lod + sv->u.tex.first_level,
|
||||
sv->texture->last_level);
|
||||
|
@@ -157,6 +157,16 @@
|
||||
# define PIPE_ARCH_BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
#elif defined(__OpenBSD__)
|
||||
#include <sys/types.h>
|
||||
#include <machine/endian.h>
|
||||
|
||||
#if _BYTE_ORDER == _LITTLE_ENDIAN
|
||||
# define PIPE_ARCH_LITTLE_ENDIAN
|
||||
#elif _BYTE_ORDER == _BIG_ENDIAN
|
||||
# define PIPE_ARCH_BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) || defined(PIPE_ARCH_ARM) || defined(PIPE_ARCH_AARCH64)
|
||||
|
@@ -112,12 +112,13 @@ namespace {
|
||||
#endif
|
||||
|
||||
llvm::Module *
|
||||
compile(const std::string &source, const std::string &name,
|
||||
const std::string &triple, const std::string &processor,
|
||||
const std::string &opts, clang::LangAS::Map& address_spaces) {
|
||||
compile(llvm::LLVMContext &llvm_ctx, const std::string &source,
|
||||
const std::string &name, const std::string &triple,
|
||||
const std::string &processor, const std::string &opts,
|
||||
clang::LangAS::Map& address_spaces) {
|
||||
|
||||
clang::CompilerInstance c;
|
||||
clang::EmitLLVMOnlyAction act(&llvm::getGlobalContext());
|
||||
clang::EmitLLVMOnlyAction act(&llvm_ctx);
|
||||
std::string log;
|
||||
llvm::raw_string_ostream s_log(log);
|
||||
std::string libclc_path = LIBCLC_LIBEXECDIR + processor + "-"
|
||||
@@ -182,6 +183,11 @@ namespace {
|
||||
c.getLangOpts().NoBuiltin = true;
|
||||
c.getTargetOpts().Triple = triple;
|
||||
c.getTargetOpts().CPU = processor;
|
||||
|
||||
// This is a workaround for a Clang bug which causes the number
|
||||
// of warnings and errors to be printed to stderr.
|
||||
// http://www.llvm.org/bugs/show_bug.cgi?id=19735
|
||||
c.getDiagnosticOpts().ShowCarets = false;
|
||||
#if HAVE_LLVM <= 0x0301
|
||||
c.getInvocation().setLangDefaults(clang::IK_OpenCL);
|
||||
#else
|
||||
@@ -379,10 +385,12 @@ clover::compile_program_llvm(const compat::string &source,
|
||||
target.size() - processor_str_len - 1);
|
||||
clang::LangAS::Map address_spaces;
|
||||
|
||||
llvm::LLVMContext llvm_ctx;
|
||||
|
||||
// The input file name must have the .cl extension in order for the
|
||||
// CompilerInvocation class to recognize it as an OpenCL source file.
|
||||
llvm::Module *mod = compile(source, "input.cl", triple, processor, opts,
|
||||
address_spaces);
|
||||
llvm::Module *mod = compile(llvm_ctx, source, "input.cl", triple, processor,
|
||||
opts, address_spaces);
|
||||
|
||||
find_kernels(mod, kernels);
|
||||
|
||||
|
@@ -480,12 +480,13 @@ osmesa_create_buffer(enum pipe_format color_format,
|
||||
|
||||
|
||||
/**
|
||||
* Search linked list for a buffer with matching pixel formats.
|
||||
* Search linked list for a buffer with matching pixel formats and size.
|
||||
*/
|
||||
static struct osmesa_buffer *
|
||||
osmesa_find_buffer(enum pipe_format color_format,
|
||||
enum pipe_format ds_format,
|
||||
enum pipe_format accum_format)
|
||||
enum pipe_format accum_format,
|
||||
GLsizei width, GLsizei height)
|
||||
{
|
||||
struct osmesa_buffer *b;
|
||||
|
||||
@@ -493,7 +494,9 @@ osmesa_find_buffer(enum pipe_format color_format,
|
||||
for (b = BufferList; b; b = b->next) {
|
||||
if (b->visual.color_format == color_format &&
|
||||
b->visual.depth_stencil_format == ds_format &&
|
||||
b->visual.accum_format == accum_format) {
|
||||
b->visual.accum_format == accum_format &&
|
||||
b->width == width &&
|
||||
b->height == height) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
@@ -673,7 +676,7 @@ OSMesaMakeCurrent(OSMesaContext osmesa, void *buffer, GLenum type,
|
||||
/* See if we already have a buffer that uses these pixel formats */
|
||||
osbuffer = osmesa_find_buffer(color_format,
|
||||
osmesa->depth_stencil_format,
|
||||
osmesa->accum_format);
|
||||
osmesa->accum_format, width, height);
|
||||
if (!osbuffer) {
|
||||
/* Existing buffer found, create new buffer */
|
||||
osbuffer = osmesa_create_buffer(color_format,
|
||||
|
@@ -78,6 +78,8 @@ xa_context_destroy(struct xa_context *r)
|
||||
}
|
||||
|
||||
xa_ctx_sampler_views_destroy(r);
|
||||
if (r->srf)
|
||||
pipe_surface_reference(&r->srf, NULL);
|
||||
|
||||
if (r->cso) {
|
||||
cso_release_all(r->cso);
|
||||
@@ -185,8 +187,15 @@ xa_ctx_srf_create(struct xa_context *ctx, struct xa_surface *dst)
|
||||
struct pipe_screen *screen = ctx->pipe->screen;
|
||||
struct pipe_surface srf_templ;
|
||||
|
||||
if (ctx->srf)
|
||||
return -XA_ERR_INVAL;
|
||||
/*
|
||||
* Cache surfaces unless we change render target
|
||||
*/
|
||||
if (ctx->srf) {
|
||||
if (ctx->srf->texture == dst->tex)
|
||||
return XA_ERR_NONE;
|
||||
|
||||
pipe_surface_reference(&ctx->srf, NULL);
|
||||
}
|
||||
|
||||
if (!screen->is_format_supported(screen, dst->tex->format,
|
||||
PIPE_TEXTURE_2D, 0,
|
||||
@@ -204,14 +213,17 @@ xa_ctx_srf_create(struct xa_context *ctx, struct xa_surface *dst)
|
||||
void
|
||||
xa_ctx_srf_destroy(struct xa_context *ctx)
|
||||
{
|
||||
pipe_surface_reference(&ctx->srf, NULL);
|
||||
/*
|
||||
* Cache surfaces unless we change render target.
|
||||
* Final destruction on context destroy.
|
||||
*/
|
||||
}
|
||||
|
||||
XA_EXPORT int
|
||||
xa_copy_prepare(struct xa_context *ctx,
|
||||
struct xa_surface *dst, struct xa_surface *src)
|
||||
{
|
||||
if (src == dst || ctx->srf != NULL)
|
||||
if (src == dst)
|
||||
return -XA_ERR_INVAL;
|
||||
|
||||
if (src->tex->format != dst->tex->format) {
|
||||
|
@@ -406,6 +406,9 @@ renderer_copy_prepare(struct xa_context *r,
|
||||
PIPE_BIND_RENDER_TARGET));
|
||||
(void)screen;
|
||||
|
||||
renderer_bind_destination(r, dst_surface,
|
||||
dst_surface->width, dst_surface->height);
|
||||
|
||||
/* set misc state we care about */
|
||||
{
|
||||
struct pipe_blend_state blend;
|
||||
@@ -422,6 +425,7 @@ renderer_copy_prepare(struct xa_context *r,
|
||||
/* sampler */
|
||||
{
|
||||
struct pipe_sampler_state sampler;
|
||||
const struct pipe_sampler_state *p_sampler = &sampler;
|
||||
|
||||
memset(&sampler, 0, sizeof(sampler));
|
||||
sampler.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
|
||||
@@ -431,13 +435,10 @@ renderer_copy_prepare(struct xa_context *r,
|
||||
sampler.min_img_filter = PIPE_TEX_FILTER_NEAREST;
|
||||
sampler.mag_img_filter = PIPE_TEX_FILTER_NEAREST;
|
||||
sampler.normalized_coords = 1;
|
||||
cso_single_sampler(r->cso, PIPE_SHADER_FRAGMENT, 0, &sampler);
|
||||
cso_single_sampler_done(r->cso, PIPE_SHADER_FRAGMENT);
|
||||
cso_set_samplers(r->cso, PIPE_SHADER_FRAGMENT, 1, &p_sampler);
|
||||
r->num_bound_samplers = 1;
|
||||
}
|
||||
|
||||
renderer_bind_destination(r, dst_surface,
|
||||
dst_surface->width, dst_surface->height);
|
||||
|
||||
/* texture/sampler view */
|
||||
{
|
||||
struct pipe_sampler_view templ;
|
||||
|
@@ -44,9 +44,15 @@ extern "C" {
|
||||
|
||||
|
||||
static void
|
||||
hgl_viewport(struct gl_context* glContext, GLint x, GLint y,
|
||||
GLsizei width, GLsizei height)
|
||||
hgl_viewport(struct gl_context* glContext)
|
||||
{
|
||||
// TODO: We should try to eliminate this function
|
||||
|
||||
GLint x = glContext->ViewportArray[0].X;
|
||||
GLint y = glContext->ViewportArray[0].Y;
|
||||
GLint width = glContext->ViewportArray[0].Width;
|
||||
GLint height = glContext->ViewportArray[0].Height;
|
||||
|
||||
TRACE("%s(glContext: %p, x: %d, y: %d, w: %d, h: %d\n", __func__,
|
||||
glContext, x, y, width, height);
|
||||
|
||||
@@ -525,7 +531,7 @@ GalliumContext::ResizeViewport(int32 width, int32 height)
|
||||
for (context_id i = 0; i < CONTEXT_MAX; i++) {
|
||||
if (fContext[i] && fContext[i]->st) {
|
||||
struct st_context *stContext = (struct st_context*)fContext[i]->st;
|
||||
_mesa_set_viewport(stContext->ctx, 0, 0, width, height);
|
||||
_mesa_set_viewport(stContext->ctx, 0, 0, 0, width, height);
|
||||
st_manager_validate_framebuffers(stContext);
|
||||
}
|
||||
}
|
||||
|
@@ -337,7 +337,8 @@ static boolean do_winsys_init(struct radeon_drm_winsys *ws)
|
||||
|
||||
/* Check for dma */
|
||||
ws->info.r600_has_dma = FALSE;
|
||||
if (ws->info.chip_class >= R700 && ws->info.drm_minor >= 27) {
|
||||
/* DMA is disabled on R700. There is IB corruption and hangs. */
|
||||
if (ws->info.chip_class >= EVERGREEN && ws->info.drm_minor >= 27) {
|
||||
ws->info.r600_has_dma = TRUE;
|
||||
}
|
||||
|
||||
|
@@ -74,6 +74,7 @@ struct vmw_winsys_screen
|
||||
struct vmw_cap_3d *cap_3d;
|
||||
uint64_t max_mob_memory;
|
||||
uint64_t max_surface_memory;
|
||||
boolean have_drm_2_6;
|
||||
} ioctl;
|
||||
|
||||
struct {
|
||||
@@ -138,10 +139,11 @@ vmw_ioctl_gb_surface_create(struct vmw_winsys_screen *vws,
|
||||
|
||||
int
|
||||
vmw_ioctl_gb_surface_ref(struct vmw_winsys_screen *vws,
|
||||
uint32_t handle,
|
||||
const struct winsys_handle *whandle,
|
||||
SVGA3dSurfaceFlags *flags,
|
||||
SVGA3dSurfaceFormat *format,
|
||||
uint32_t *numMipLevels,
|
||||
uint32_t *handle,
|
||||
struct vmw_region **p_region);
|
||||
|
||||
void
|
||||
|
@@ -183,10 +183,11 @@ vmw_drm_gb_surface_from_handle(struct svga_winsys_screen *sws,
|
||||
struct vmw_buffer_desc desc;
|
||||
struct pb_manager *provider = vws->pools.gmr;
|
||||
struct pb_buffer *pb_buf;
|
||||
uint32_t handle;
|
||||
int ret;
|
||||
|
||||
ret = vmw_ioctl_gb_surface_ref(vws, whandle->handle, &flags, format,
|
||||
&mip_levels, &desc.region);
|
||||
ret = vmw_ioctl_gb_surface_ref(vws, whandle, &flags, format,
|
||||
&mip_levels, &handle, &desc.region);
|
||||
|
||||
if (ret) {
|
||||
fprintf(stderr, "Failed referencing shared surface. SID %d.\n"
|
||||
@@ -209,7 +210,7 @@ vmw_drm_gb_surface_from_handle(struct svga_winsys_screen *sws,
|
||||
pipe_reference_init(&vsrf->refcnt, 1);
|
||||
p_atomic_set(&vsrf->validated, 0);
|
||||
vsrf->screen = vws;
|
||||
vsrf->sid = whandle->handle;
|
||||
vsrf->sid = handle;
|
||||
vsrf->size = vmw_region_size(desc.region);
|
||||
|
||||
/*
|
||||
|
@@ -37,6 +37,7 @@
|
||||
#include "util/u_memory.h"
|
||||
#include "util/u_math.h"
|
||||
#include "svgadump/svga_dump.h"
|
||||
#include "state_tracker/drm_driver.h"
|
||||
#include "vmw_screen.h"
|
||||
#include "vmw_context.h"
|
||||
#include "vmw_fence.h"
|
||||
@@ -250,6 +251,63 @@ out_fail_create:
|
||||
return SVGA3D_INVALID_ID;
|
||||
}
|
||||
|
||||
/**
|
||||
* vmw_ioctl_surface_req - Fill in a struct surface_req
|
||||
*
|
||||
* @vws: Winsys screen
|
||||
* @whandle: Surface handle
|
||||
* @req: The struct surface req to fill in
|
||||
* @needs_unref: This call takes a kernel surface reference that needs to
|
||||
* be unreferenced.
|
||||
*
|
||||
* Returns 0 on success, negative error type otherwise.
|
||||
* Fills in the surface_req structure according to handle type and kernel
|
||||
* capabilities.
|
||||
*/
|
||||
static int
|
||||
vmw_ioctl_surface_req(const struct vmw_winsys_screen *vws,
|
||||
const struct winsys_handle *whandle,
|
||||
struct drm_vmw_surface_arg *req,
|
||||
boolean *needs_unref)
|
||||
{
|
||||
int ret;
|
||||
|
||||
switch(whandle->type) {
|
||||
case DRM_API_HANDLE_TYPE_SHARED:
|
||||
case DRM_API_HANDLE_TYPE_KMS:
|
||||
*needs_unref = FALSE;
|
||||
req->handle_type = DRM_VMW_HANDLE_LEGACY;
|
||||
req->sid = whandle->handle;
|
||||
break;
|
||||
case DRM_API_HANDLE_TYPE_FD:
|
||||
if (!vws->ioctl.have_drm_2_6) {
|
||||
uint32_t handle;
|
||||
|
||||
ret = drmPrimeFDToHandle(vws->ioctl.drm_fd, whandle->handle, &handle);
|
||||
if (ret) {
|
||||
vmw_error("Failed to get handle from prime fd %d.\n",
|
||||
(int) whandle->handle);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
*needs_unref = TRUE;
|
||||
req->handle_type = DRM_VMW_HANDLE_LEGACY;
|
||||
req->sid = handle;
|
||||
} else {
|
||||
*needs_unref = FALSE;
|
||||
req->handle_type = DRM_VMW_HANDLE_PRIME;
|
||||
req->sid = whandle->handle;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
vmw_error("Attempt to import unsupported handle type %d.\n",
|
||||
whandle->type);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* vmw_ioctl_gb_surface_ref - Put a reference on a guest-backed surface and
|
||||
* get surface information
|
||||
@@ -266,16 +324,18 @@ out_fail_create:
|
||||
*/
|
||||
int
|
||||
vmw_ioctl_gb_surface_ref(struct vmw_winsys_screen *vws,
|
||||
uint32_t handle,
|
||||
const struct winsys_handle *whandle,
|
||||
SVGA3dSurfaceFlags *flags,
|
||||
SVGA3dSurfaceFormat *format,
|
||||
uint32_t *numMipLevels,
|
||||
uint32_t *handle,
|
||||
struct vmw_region **p_region)
|
||||
{
|
||||
union drm_vmw_gb_surface_reference_arg s_arg;
|
||||
struct drm_vmw_surface_arg *req = &s_arg.req;
|
||||
struct drm_vmw_gb_surface_ref_rep *rep = &s_arg.rep;
|
||||
struct vmw_region *region = NULL;
|
||||
boolean needs_unref = FALSE;
|
||||
int ret;
|
||||
|
||||
vmw_printf("%s flags %d format %d\n", __FUNCTION__, flags, format);
|
||||
@@ -286,8 +346,11 @@ vmw_ioctl_gb_surface_ref(struct vmw_winsys_screen *vws,
|
||||
return -ENOMEM;
|
||||
|
||||
memset(&s_arg, 0, sizeof(s_arg));
|
||||
req->sid = handle;
|
||||
ret = vmw_ioctl_surface_req(vws, whandle, req, &needs_unref);
|
||||
if (ret)
|
||||
goto out_fail_req;
|
||||
|
||||
*handle = req->sid;
|
||||
ret = drmCommandWriteRead(vws->ioctl.drm_fd, DRM_VMW_GB_SURFACE_REF,
|
||||
&s_arg, sizeof(s_arg));
|
||||
|
||||
@@ -300,12 +363,19 @@ vmw_ioctl_gb_surface_ref(struct vmw_winsys_screen *vws,
|
||||
region->size = rep->crep.backup_size;
|
||||
*p_region = region;
|
||||
|
||||
*handle = rep->crep.handle;
|
||||
*flags = rep->creq.svga3d_flags;
|
||||
*format = rep->creq.format;
|
||||
*numMipLevels = rep->creq.mip_levels;
|
||||
|
||||
if (needs_unref)
|
||||
vmw_ioctl_surface_destroy(vws, *handle);
|
||||
|
||||
return 0;
|
||||
out_fail_ref:
|
||||
if (needs_unref)
|
||||
vmw_ioctl_surface_destroy(vws, *handle);
|
||||
out_fail_req:
|
||||
if (region)
|
||||
FREE(region);
|
||||
return ret;
|
||||
@@ -772,6 +842,8 @@ vmw_ioctl_init(struct vmw_winsys_screen *vws)
|
||||
|
||||
have_drm_2_5 = version->version_major > 2 ||
|
||||
(version->version_major == 2 && version->version_minor > 4);
|
||||
vws->ioctl.have_drm_2_6 = version->version_major > 2 ||
|
||||
(version->version_major == 2 && version->version_minor > 5);
|
||||
|
||||
memset(&gp_arg, 0, sizeof(gp_arg));
|
||||
gp_arg.param = DRM_VMW_PARAM_3D;
|
||||
|
@@ -76,15 +76,23 @@ vmw_pools_cleanup(struct vmw_winsys_screen *vws)
|
||||
*
|
||||
* Typically this pool should be created on demand when we
|
||||
* detect that the app will be using queries. There's nothing
|
||||
* special with this pool other than the backing kernel buffer size,
|
||||
* which is limited to 8192.
|
||||
* special with this pool other than the backing kernel buffer sizes,
|
||||
* which are limited to 8192.
|
||||
* If there is a performance issue with allocation and freeing of the
|
||||
* query slabs, it should be easily fixable by allocating them out
|
||||
* of a buffer cache.
|
||||
*/
|
||||
boolean
|
||||
vmw_query_pools_init(struct vmw_winsys_screen *vws)
|
||||
{
|
||||
vws->pools.query_mm = mm_bufmgr_create(vws->pools.gmr,
|
||||
VMW_QUERY_POOL_SIZE,
|
||||
3 /* 8 alignment */);
|
||||
struct pb_desc desc;
|
||||
|
||||
desc.alignment = 16;
|
||||
desc.usage = ~(VMW_BUFFER_USAGE_SHARED | VMW_BUFFER_USAGE_SYNC);
|
||||
|
||||
vws->pools.query_mm = pb_slab_range_manager_create(vws->pools.gmr, 16, 128,
|
||||
VMW_QUERY_POOL_SIZE,
|
||||
&desc);
|
||||
if (!vws->pools.query_mm)
|
||||
return FALSE;
|
||||
|
||||
|
@@ -87,6 +87,16 @@
|
||||
#define DRM_VMW_PARAM_MAX_SURF_MEMORY 7
|
||||
#define DRM_VMW_PARAM_3D_CAPS_SIZE 8
|
||||
#define DRM_VMW_PARAM_MAX_MOB_MEMORY 9
|
||||
#define DRM_VMW_PARAM_MAX_MOB_SIZE 10
|
||||
|
||||
/**
|
||||
* enum drm_vmw_handle_type - handle type for ref ioctls
|
||||
*
|
||||
*/
|
||||
enum drm_vmw_handle_type {
|
||||
DRM_VMW_HANDLE_LEGACY = 0,
|
||||
DRM_VMW_HANDLE_PRIME = 1
|
||||
};
|
||||
|
||||
/**
|
||||
* struct drm_vmw_getparam_arg
|
||||
@@ -176,6 +186,7 @@ struct drm_vmw_surface_create_req {
|
||||
* struct drm_wmv_surface_arg
|
||||
*
|
||||
* @sid: Surface id of created surface or surface to destroy or reference.
|
||||
* @handle_type: Handle type for DRM_VMW_REF_SURFACE Ioctl.
|
||||
*
|
||||
* Output data from the DRM_VMW_CREATE_SURFACE Ioctl.
|
||||
* Input argument to the DRM_VMW_UNREF_SURFACE Ioctl.
|
||||
@@ -184,7 +195,7 @@ struct drm_vmw_surface_create_req {
|
||||
|
||||
struct drm_vmw_surface_arg {
|
||||
int32_t sid;
|
||||
uint32_t pad64;
|
||||
enum drm_vmw_handle_type handle_type;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -684,6 +684,8 @@ dri_device_create(int fd)
|
||||
int ret;
|
||||
|
||||
dri = calloc(1, sizeof *dri);
|
||||
if (!dri)
|
||||
return NULL;
|
||||
|
||||
dri->base.base.fd = fd;
|
||||
dri->base.base.bo_create = gbm_dri_bo_create;
|
||||
|
@@ -119,6 +119,11 @@ _mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state)
|
||||
instructions->push_head(var);
|
||||
}
|
||||
|
||||
/* Figure out if gl_FragCoord is actually used in fragment shader */
|
||||
ir_variable *const var = state->symbols->get_variable("gl_FragCoord");
|
||||
if (var != NULL)
|
||||
state->fs_uses_gl_fragcoord = var->data.used;
|
||||
|
||||
/* From section 7.1 (Built-In Language Variables) of the GLSL 4.10 spec:
|
||||
*
|
||||
* If multiple shaders using members of a built-in block belonging to
|
||||
@@ -2203,6 +2208,34 @@ validate_explicit_location(const struct ast_type_qualifier *qual,
|
||||
return;
|
||||
}
|
||||
|
||||
static inline const char*
|
||||
get_layout_qualifier_string(bool origin_upper_left, bool pixel_center_integer)
|
||||
{
|
||||
if (origin_upper_left && pixel_center_integer)
|
||||
return "origin_upper_left, pixel_center_integer";
|
||||
else if (origin_upper_left)
|
||||
return "origin_upper_left";
|
||||
else if (pixel_center_integer)
|
||||
return "pixel_center_integer";
|
||||
else
|
||||
return " ";
|
||||
}
|
||||
|
||||
static inline bool
|
||||
is_conflicting_fragcoord_redeclaration(struct _mesa_glsl_parse_state *state,
|
||||
const struct ast_type_qualifier *qual)
|
||||
{
|
||||
/* If gl_FragCoord was previously declared, and the qualifiers were
|
||||
* different in any way, return true.
|
||||
*/
|
||||
if (state->fs_redeclares_gl_fragcoord) {
|
||||
return (state->fs_pixel_center_integer != qual->flags.q.pixel_center_integer
|
||||
|| state->fs_origin_upper_left != qual->flags.q.origin_upper_left);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void
|
||||
apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
|
||||
ir_variable *var,
|
||||
@@ -2357,6 +2390,53 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
|
||||
qual_string);
|
||||
}
|
||||
|
||||
if (var->name != NULL && strcmp(var->name, "gl_FragCoord") == 0) {
|
||||
|
||||
/* Section 4.3.8.1, page 39 of GLSL 1.50 spec says:
|
||||
*
|
||||
* "Within any shader, the first redeclarations of gl_FragCoord
|
||||
* must appear before any use of gl_FragCoord."
|
||||
*
|
||||
* Generate a compiler error if above condition is not met by the
|
||||
* fragment shader.
|
||||
*/
|
||||
ir_variable *earlier = state->symbols->get_variable("gl_FragCoord");
|
||||
if (earlier != NULL &&
|
||||
earlier->data.used &&
|
||||
!state->fs_redeclares_gl_fragcoord) {
|
||||
_mesa_glsl_error(loc, state,
|
||||
"gl_FragCoord used before its first redeclaration "
|
||||
"in fragment shader");
|
||||
}
|
||||
|
||||
/* Make sure all gl_FragCoord redeclarations specify the same layout
|
||||
* qualifiers.
|
||||
*/
|
||||
if (is_conflicting_fragcoord_redeclaration(state, qual)) {
|
||||
const char *const qual_string =
|
||||
get_layout_qualifier_string(qual->flags.q.origin_upper_left,
|
||||
qual->flags.q.pixel_center_integer);
|
||||
|
||||
const char *const state_string =
|
||||
get_layout_qualifier_string(state->fs_origin_upper_left,
|
||||
state->fs_pixel_center_integer);
|
||||
|
||||
_mesa_glsl_error(loc, state,
|
||||
"gl_FragCoord redeclared with different layout "
|
||||
"qualifiers (%s) and (%s) ",
|
||||
state_string,
|
||||
qual_string);
|
||||
}
|
||||
state->fs_origin_upper_left = qual->flags.q.origin_upper_left;
|
||||
state->fs_pixel_center_integer = qual->flags.q.pixel_center_integer;
|
||||
state->fs_redeclares_gl_fragcoord_with_no_layout_qualifiers =
|
||||
!qual->flags.q.origin_upper_left && !qual->flags.q.pixel_center_integer;
|
||||
state->fs_redeclares_gl_fragcoord =
|
||||
state->fs_origin_upper_left ||
|
||||
state->fs_pixel_center_integer ||
|
||||
state->fs_redeclares_gl_fragcoord_with_no_layout_qualifiers;
|
||||
}
|
||||
|
||||
if (qual->flags.q.explicit_location) {
|
||||
validate_explicit_location(qual, var, state, loc);
|
||||
} else if (qual->flags.q.explicit_index) {
|
||||
@@ -2908,16 +2988,10 @@ ast_declarator_list::hir(exec_list *instructions,
|
||||
_mesa_glsl_error(& loc, state,
|
||||
"undeclared variable `%s' cannot be marked "
|
||||
"invariant", decl->identifier);
|
||||
} else if ((state->stage == MESA_SHADER_VERTEX)
|
||||
&& (earlier->data.mode != ir_var_shader_out)) {
|
||||
_mesa_glsl_error(& loc, state,
|
||||
"`%s' cannot be marked invariant, vertex shader "
|
||||
"outputs only", decl->identifier);
|
||||
} else if ((state->stage == MESA_SHADER_FRAGMENT)
|
||||
&& (earlier->data.mode != ir_var_shader_in)) {
|
||||
_mesa_glsl_error(& loc, state,
|
||||
"`%s' cannot be marked invariant, fragment shader "
|
||||
"inputs only", decl->identifier);
|
||||
} else if (!is_varying_var(earlier, state->stage)) {
|
||||
_mesa_glsl_error(&loc, state,
|
||||
"`%s' cannot be marked invariant; interfaces between "
|
||||
"shader stages only.", decl->identifier);
|
||||
} else if (earlier->data.used) {
|
||||
_mesa_glsl_error(& loc, state,
|
||||
"variable `%s' may not be redeclared "
|
||||
@@ -3092,20 +3166,11 @@ ast_declarator_list::hir(exec_list *instructions,
|
||||
& loc, false);
|
||||
|
||||
if (this->type->qualifier.flags.q.invariant) {
|
||||
if ((state->stage == MESA_SHADER_VERTEX) &&
|
||||
var->data.mode != ir_var_shader_out) {
|
||||
_mesa_glsl_error(& loc, state,
|
||||
"`%s' cannot be marked invariant, vertex shader "
|
||||
"outputs only", var->name);
|
||||
} else if ((state->stage == MESA_SHADER_FRAGMENT) &&
|
||||
var->data.mode != ir_var_shader_in) {
|
||||
/* FINISHME: Note that this doesn't work for invariant on
|
||||
* a function signature inval
|
||||
*/
|
||||
_mesa_glsl_error(& loc, state,
|
||||
"`%s' cannot be marked invariant, fragment shader "
|
||||
"inputs only", var->name);
|
||||
}
|
||||
if (!is_varying_var(var, state->stage)) {
|
||||
_mesa_glsl_error(&loc, state,
|
||||
"`%s' cannot be marked invariant; interfaces between "
|
||||
"shader stages only", var->name);
|
||||
}
|
||||
}
|
||||
|
||||
if (state->current_function != NULL) {
|
||||
@@ -3429,11 +3494,15 @@ ast_declarator_list::hir(exec_list *instructions,
|
||||
* instruction stream.
|
||||
*/
|
||||
exec_list initializer_instructions;
|
||||
|
||||
/* Examine var name here since var may get deleted in the next call */
|
||||
bool var_is_gl_id = (strncmp(var->name, "gl_", 3) == 0);
|
||||
|
||||
ir_variable *earlier =
|
||||
get_variable_being_redeclared(var, decl->get_location(), state,
|
||||
false /* allow_all_redeclarations */);
|
||||
if (earlier != NULL) {
|
||||
if (strncmp(var->name, "gl_", 3) == 0 &&
|
||||
if (var_is_gl_id &&
|
||||
earlier->data.how_declared == ir_var_declared_in_block) {
|
||||
_mesa_glsl_error(&loc, state,
|
||||
"`%s' has already been redeclared using "
|
||||
@@ -5143,6 +5212,13 @@ ast_interface_block::hir(exec_list *instructions,
|
||||
earlier->reinit_interface_type(block_type);
|
||||
delete var;
|
||||
} else {
|
||||
/* Propagate the "binding" keyword into this UBO's fields;
|
||||
* the UBO declaration itself doesn't get an ir_variable unless it
|
||||
* has an instance name. This is ugly.
|
||||
*/
|
||||
var->data.explicit_binding = this->layout.flags.q.explicit_binding;
|
||||
var->data.binding = this->layout.binding;
|
||||
|
||||
state->symbols->add_variable(var);
|
||||
instructions->push_tail(var);
|
||||
}
|
||||
|
@@ -1242,6 +1242,13 @@ layout_qualifier_id:
|
||||
if (match_layout_qualifier("location", $1, state) == 0) {
|
||||
$$.flags.q.explicit_location = 1;
|
||||
|
||||
if ($$.flags.q.attribute == 1 &&
|
||||
state->ARB_explicit_attrib_location_warn) {
|
||||
_mesa_glsl_warning(& @1, state,
|
||||
"GL_ARB_explicit_attrib_location layout "
|
||||
"identifier `%s' used", $1);
|
||||
}
|
||||
|
||||
if ($3 >= 0) {
|
||||
$$.location = $3;
|
||||
} else {
|
||||
@@ -1298,10 +1305,6 @@ layout_qualifier_id:
|
||||
_mesa_glsl_error(& @1, state, "unrecognized layout identifier "
|
||||
"`%s'", $1);
|
||||
YYERROR;
|
||||
} else if (state->ARB_explicit_attrib_location_warn) {
|
||||
_mesa_glsl_warning(& @1, state,
|
||||
"GL_ARB_explicit_attrib_location layout "
|
||||
"identifier `%s' used", $1);
|
||||
}
|
||||
}
|
||||
| interface_block_layout_qualifier
|
||||
|
@@ -186,6 +186,12 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
|
||||
this->default_uniform_qualifier->flags.q.shared = 1;
|
||||
this->default_uniform_qualifier->flags.q.column_major = 1;
|
||||
|
||||
this->fs_uses_gl_fragcoord = false;
|
||||
this->fs_redeclares_gl_fragcoord = false;
|
||||
this->fs_origin_upper_left = false;
|
||||
this->fs_pixel_center_integer = false;
|
||||
this->fs_redeclares_gl_fragcoord_with_no_layout_qualifiers = false;
|
||||
|
||||
this->gs_input_prim_type_specified = false;
|
||||
this->gs_input_prim_type = GL_POINTS;
|
||||
this->gs_input_size = 0;
|
||||
@@ -1332,23 +1338,47 @@ set_shader_inout_layout(struct gl_shader *shader,
|
||||
/* Should have been prevented by the parser. */
|
||||
assert(!state->gs_input_prim_type_specified);
|
||||
assert(!state->out_qualifier->flags.i);
|
||||
return;
|
||||
}
|
||||
|
||||
shader->Geom.VerticesOut = 0;
|
||||
if (state->out_qualifier->flags.q.max_vertices)
|
||||
shader->Geom.VerticesOut = state->out_qualifier->max_vertices;
|
||||
|
||||
if (state->gs_input_prim_type_specified) {
|
||||
shader->Geom.InputType = state->gs_input_prim_type;
|
||||
} else {
|
||||
shader->Geom.InputType = PRIM_UNKNOWN;
|
||||
if (shader->Stage != MESA_SHADER_FRAGMENT) {
|
||||
/* Should have been prevented by the parser. */
|
||||
assert(!state->fs_uses_gl_fragcoord);
|
||||
assert(!state->fs_redeclares_gl_fragcoord);
|
||||
assert(!state->fs_pixel_center_integer);
|
||||
assert(!state->fs_origin_upper_left);
|
||||
}
|
||||
|
||||
if (state->out_qualifier->flags.q.prim_type) {
|
||||
shader->Geom.OutputType = state->out_qualifier->prim_type;
|
||||
} else {
|
||||
shader->Geom.OutputType = PRIM_UNKNOWN;
|
||||
switch(shader->Stage) {
|
||||
case MESA_SHADER_GEOMETRY:
|
||||
shader->Geom.VerticesOut = 0;
|
||||
if (state->out_qualifier->flags.q.max_vertices)
|
||||
shader->Geom.VerticesOut = state->out_qualifier->max_vertices;
|
||||
|
||||
if (state->gs_input_prim_type_specified) {
|
||||
shader->Geom.InputType = state->gs_input_prim_type;
|
||||
} else {
|
||||
shader->Geom.InputType = PRIM_UNKNOWN;
|
||||
}
|
||||
|
||||
if (state->out_qualifier->flags.q.prim_type) {
|
||||
shader->Geom.OutputType = state->out_qualifier->prim_type;
|
||||
} else {
|
||||
shader->Geom.OutputType = PRIM_UNKNOWN;
|
||||
}
|
||||
break;
|
||||
|
||||
case MESA_SHADER_FRAGMENT:
|
||||
shader->redeclares_gl_fragcoord = state->fs_redeclares_gl_fragcoord;
|
||||
shader->uses_gl_fragcoord = state->fs_uses_gl_fragcoord;
|
||||
shader->pixel_center_integer = state->fs_pixel_center_integer;
|
||||
shader->origin_upper_left = state->fs_origin_upper_left;
|
||||
shader->ARB_fragment_coord_conventions_enable =
|
||||
state->ARB_fragment_coord_conventions_enable;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* Nothing to do. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -181,6 +181,18 @@ struct _mesa_glsl_parse_state {
|
||||
*/
|
||||
struct ast_type_qualifier *default_uniform_qualifier;
|
||||
|
||||
/**
|
||||
* Variables to track different cases if a fragment shader redeclares
|
||||
* built-in variable gl_FragCoord.
|
||||
*
|
||||
* Note: These values are computed at ast_to_hir time rather than at parse
|
||||
* time.
|
||||
*/
|
||||
bool fs_redeclares_gl_fragcoord;
|
||||
bool fs_origin_upper_left;
|
||||
bool fs_pixel_center_integer;
|
||||
bool fs_redeclares_gl_fragcoord_with_no_layout_qualifiers;
|
||||
|
||||
/**
|
||||
* True if a geometry shader input primitive type was specified using a
|
||||
* layout directive.
|
||||
@@ -362,6 +374,7 @@ struct _mesa_glsl_parse_state {
|
||||
const struct gl_extensions *extensions;
|
||||
|
||||
bool uses_builtin_functions;
|
||||
bool fs_uses_gl_fragcoord;
|
||||
|
||||
/**
|
||||
* For geometry shaders, size of the most recently seen input declaration
|
||||
|
@@ -46,6 +46,14 @@ process_block(void *mem_ctx, struct hash_table *ht, ir_variable *var)
|
||||
b->type = block_type;
|
||||
b->has_instance_name = var->is_interface_instance();
|
||||
|
||||
if (var->data.explicit_binding) {
|
||||
b->has_binding = true;
|
||||
b->binding = var->data.binding;
|
||||
} else {
|
||||
b->has_binding = false;
|
||||
b->binding = 0;
|
||||
}
|
||||
|
||||
_mesa_hash_table_insert(ht, h, var->get_interface_type()->name,
|
||||
(void *) b);
|
||||
return b;
|
||||
|
@@ -36,7 +36,10 @@ struct link_uniform_block_active {
|
||||
unsigned *array_elements;
|
||||
unsigned num_array_elements;
|
||||
|
||||
unsigned binding;
|
||||
|
||||
bool has_instance_name;
|
||||
bool has_binding;
|
||||
};
|
||||
|
||||
class link_uniform_block_active_visitor : public ir_hierarchical_visitor {
|
||||
|
@@ -251,7 +251,17 @@ link_uniform_blocks(void *mem_ctx,
|
||||
blocks[i].Name = ralloc_asprintf(blocks, "%s[%u]", name,
|
||||
b->array_elements[j]);
|
||||
blocks[i].Uniforms = &variables[parcel.index];
|
||||
blocks[i].Binding = 0;
|
||||
|
||||
/* The GL_ARB_shading_language_420pack spec says:
|
||||
*
|
||||
* "If the binding identifier is used with a uniform block
|
||||
* instanced as an array then the first element of the array
|
||||
* takes the specified block binding and each subsequent
|
||||
* element takes the next consecutive uniform block binding
|
||||
* point."
|
||||
*/
|
||||
blocks[i].Binding = (b->has_binding) ? b->binding + j : 0;
|
||||
|
||||
blocks[i].UniformBufferSize = 0;
|
||||
blocks[i]._Packing =
|
||||
gl_uniform_block_packing(block_type->interface_packing);
|
||||
@@ -269,7 +279,7 @@ link_uniform_blocks(void *mem_ctx,
|
||||
} else {
|
||||
blocks[i].Name = ralloc_strdup(blocks, block_type->name);
|
||||
blocks[i].Uniforms = &variables[parcel.index];
|
||||
blocks[i].Binding = 0;
|
||||
blocks[i].Binding = (b->has_binding) ? b->binding : 0;
|
||||
blocks[i].UniformBufferSize = 0;
|
||||
blocks[i]._Packing =
|
||||
gl_uniform_block_packing(block_type->interface_packing);
|
||||
|
@@ -46,6 +46,18 @@ get_storage(gl_uniform_storage *storage, unsigned num_storage,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static unsigned
|
||||
get_uniform_block_index(const gl_shader_program *shProg,
|
||||
const char *uniformBlockName)
|
||||
{
|
||||
for (unsigned i = 0; i < shProg->NumUniformBlocks; i++) {
|
||||
if (!strcmp(shProg->UniformBlocks[i].Name, uniformBlockName))
|
||||
return i;
|
||||
}
|
||||
|
||||
return GL_INVALID_INDEX;
|
||||
}
|
||||
|
||||
void
|
||||
copy_constant_to_storage(union gl_constant_value *storage,
|
||||
const ir_constant *val,
|
||||
@@ -83,8 +95,7 @@ copy_constant_to_storage(union gl_constant_value *storage,
|
||||
}
|
||||
|
||||
void
|
||||
set_uniform_binding(void *mem_ctx, gl_shader_program *prog,
|
||||
const char *name, const glsl_type *type, int binding)
|
||||
set_sampler_binding(gl_shader_program *prog, const char *name, int binding)
|
||||
{
|
||||
struct gl_uniform_storage *const storage =
|
||||
get_storage(prog->UniformStorage, prog->NumUserUniformStorage, name);
|
||||
@@ -94,42 +105,53 @@ set_uniform_binding(void *mem_ctx, gl_shader_program *prog,
|
||||
return;
|
||||
}
|
||||
|
||||
if (storage->type->is_sampler()) {
|
||||
unsigned elements = MAX2(storage->array_elements, 1);
|
||||
const unsigned elements = MAX2(storage->array_elements, 1);
|
||||
|
||||
/* From section 4.4.4 of the GLSL 4.20 specification:
|
||||
* "If the binding identifier is used with an array, the first element
|
||||
* of the array takes the specified unit and each subsequent element
|
||||
* takes the next consecutive unit."
|
||||
*/
|
||||
for (unsigned int i = 0; i < elements; i++) {
|
||||
storage->storage[i].i = binding + i;
|
||||
}
|
||||
/* Section 4.4.4 (Opaque-Uniform Layout Qualifiers) of the GLSL 4.20 spec
|
||||
* says:
|
||||
*
|
||||
* "If the binding identifier is used with an array, the first element
|
||||
* of the array takes the specified unit and each subsequent element
|
||||
* takes the next consecutive unit."
|
||||
*/
|
||||
for (unsigned int i = 0; i < elements; i++) {
|
||||
storage->storage[i].i = binding + i;
|
||||
}
|
||||
|
||||
for (int sh = 0; sh < MESA_SHADER_STAGES; sh++) {
|
||||
gl_shader *shader = prog->_LinkedShaders[sh];
|
||||
for (int sh = 0; sh < MESA_SHADER_STAGES; sh++) {
|
||||
gl_shader *shader = prog->_LinkedShaders[sh];
|
||||
|
||||
if (shader && storage->sampler[sh].active) {
|
||||
for (unsigned i = 0; i < elements; i++) {
|
||||
unsigned index = storage->sampler[sh].index + i;
|
||||
if (shader && storage->sampler[sh].active) {
|
||||
for (unsigned i = 0; i < elements; i++) {
|
||||
unsigned index = storage->sampler[sh].index + i;
|
||||
|
||||
shader->SamplerUnits[index] = storage->storage[i].i;
|
||||
}
|
||||
shader->SamplerUnits[index] = storage->storage[i].i;
|
||||
}
|
||||
}
|
||||
} else if (storage->block_index != -1) {
|
||||
}
|
||||
|
||||
storage->initialized = true;
|
||||
}
|
||||
|
||||
void
|
||||
set_block_binding(gl_shader_program *prog, const char *block_name, int binding)
|
||||
{
|
||||
const unsigned block_index = get_uniform_block_index(prog, block_name);
|
||||
|
||||
if (block_index == GL_INVALID_INDEX) {
|
||||
assert(block_index != GL_INVALID_INDEX);
|
||||
return;
|
||||
}
|
||||
|
||||
/* This is a field of a UBO. val is the binding index. */
|
||||
for (int i = 0; i < MESA_SHADER_STAGES; i++) {
|
||||
int stage_index = prog->UniformBlockStageIndex[i][storage->block_index];
|
||||
int stage_index = prog->UniformBlockStageIndex[i][block_index];
|
||||
|
||||
if (stage_index != -1) {
|
||||
struct gl_shader *sh = prog->_LinkedShaders[i];
|
||||
sh->UniformBlocks[stage_index].Binding = binding;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
storage->initialized = true;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -231,8 +253,53 @@ link_set_uniform_initializers(struct gl_shader_program *prog)
|
||||
mem_ctx = ralloc_context(NULL);
|
||||
|
||||
if (var->data.explicit_binding) {
|
||||
linker::set_uniform_binding(mem_ctx, prog, var->name,
|
||||
var->type, var->data.binding);
|
||||
const glsl_type *const type = var->type;
|
||||
|
||||
if (type->is_sampler()
|
||||
|| (type->is_array() && type->fields.array->is_sampler())) {
|
||||
linker::set_sampler_binding(prog, var->name, var->data.binding);
|
||||
} else if (var->is_in_uniform_block()) {
|
||||
const glsl_type *const iface_type = var->get_interface_type();
|
||||
|
||||
/* If the variable is an array and it is an interface instance,
|
||||
* we need to set the binding for each array element. Just
|
||||
* checking that the variable is an array is not sufficient.
|
||||
* The variable could be an array element of a uniform block
|
||||
* that lacks an instance name. For example:
|
||||
*
|
||||
* uniform U {
|
||||
* float f[4];
|
||||
* };
|
||||
*
|
||||
* In this case "f" would pass is_in_uniform_block (above) and
|
||||
* type->is_array(), but it will fail is_interface_instance().
|
||||
*/
|
||||
if (var->is_interface_instance() && var->type->is_array()) {
|
||||
for (unsigned i = 0; i < var->type->length; i++) {
|
||||
const char *name =
|
||||
ralloc_asprintf(mem_ctx, "%s[%u]", iface_type->name, i);
|
||||
|
||||
/* Section 4.4.3 (Uniform Block Layout Qualifiers) of the
|
||||
* GLSL 4.20 spec says:
|
||||
*
|
||||
* "If the binding identifier is used with a uniform
|
||||
* block instanced as an array then the first element
|
||||
* of the array takes the specified block binding and
|
||||
* each subsequent element takes the next consecutive
|
||||
* uniform block binding point."
|
||||
*/
|
||||
linker::set_block_binding(prog, name,
|
||||
var->data.binding + i);
|
||||
}
|
||||
} else {
|
||||
linker::set_block_binding(prog, iface_type->name,
|
||||
var->data.binding);
|
||||
}
|
||||
} else if (type->contains_atomic()) {
|
||||
/* we don't actually need to do anything. */
|
||||
} else {
|
||||
assert(!"Explicit binding not on a sampler, UBO or atomic.");
|
||||
}
|
||||
} else if (var->constant_value) {
|
||||
linker::set_uniform_initializer(mem_ctx, prog, var->name,
|
||||
var->type, var->constant_value);
|
||||
|
@@ -1194,6 +1194,83 @@ private:
|
||||
hash_table *unnamed_interfaces;
|
||||
};
|
||||
|
||||
/**
|
||||
* Performs the cross-validation of layout qualifiers specified in
|
||||
* redeclaration of gl_FragCoord for the attached fragment shaders,
|
||||
* and propagates them to the linked FS and linked shader program.
|
||||
*/
|
||||
static void
|
||||
link_fs_input_layout_qualifiers(struct gl_shader_program *prog,
|
||||
struct gl_shader *linked_shader,
|
||||
struct gl_shader **shader_list,
|
||||
unsigned num_shaders)
|
||||
{
|
||||
linked_shader->redeclares_gl_fragcoord = false;
|
||||
linked_shader->uses_gl_fragcoord = false;
|
||||
linked_shader->origin_upper_left = false;
|
||||
linked_shader->pixel_center_integer = false;
|
||||
|
||||
if (linked_shader->Stage != MESA_SHADER_FRAGMENT ||
|
||||
(prog->Version < 150 && !prog->ARB_fragment_coord_conventions_enable))
|
||||
return;
|
||||
|
||||
for (unsigned i = 0; i < num_shaders; i++) {
|
||||
struct gl_shader *shader = shader_list[i];
|
||||
/* From the GLSL 1.50 spec, page 39:
|
||||
*
|
||||
* "If gl_FragCoord is redeclared in any fragment shader in a program,
|
||||
* it must be redeclared in all the fragment shaders in that program
|
||||
* that have a static use gl_FragCoord."
|
||||
*
|
||||
* Exclude the case when one of the 'linked_shader' or 'shader' redeclares
|
||||
* gl_FragCoord with no layout qualifiers but the other one doesn't
|
||||
* redeclare it. If we strictly follow GLSL 1.50 spec's language, it
|
||||
* should be a link error. But, generating link error for this case will
|
||||
* be a wrong behaviour which spec didn't intend to do and it could also
|
||||
* break some applications.
|
||||
*/
|
||||
if ((linked_shader->redeclares_gl_fragcoord
|
||||
&& !shader->redeclares_gl_fragcoord
|
||||
&& shader->uses_gl_fragcoord
|
||||
&& (linked_shader->origin_upper_left
|
||||
|| linked_shader->pixel_center_integer))
|
||||
|| (shader->redeclares_gl_fragcoord
|
||||
&& !linked_shader->redeclares_gl_fragcoord
|
||||
&& linked_shader->uses_gl_fragcoord
|
||||
&& (shader->origin_upper_left
|
||||
|| shader->pixel_center_integer))) {
|
||||
linker_error(prog, "fragment shader defined with conflicting "
|
||||
"layout qualifiers for gl_FragCoord\n");
|
||||
}
|
||||
|
||||
/* From the GLSL 1.50 spec, page 39:
|
||||
*
|
||||
* "All redeclarations of gl_FragCoord in all fragment shaders in a
|
||||
* single program must have the same set of qualifiers."
|
||||
*/
|
||||
if (linked_shader->redeclares_gl_fragcoord && shader->redeclares_gl_fragcoord
|
||||
&& (shader->origin_upper_left != linked_shader->origin_upper_left
|
||||
|| shader->pixel_center_integer != linked_shader->pixel_center_integer)) {
|
||||
linker_error(prog, "fragment shader defined with conflicting "
|
||||
"layout qualifiers for gl_FragCoord\n");
|
||||
}
|
||||
|
||||
/* Update the linked shader state. Note that uses_gl_fragcoord should
|
||||
* accumulate the results. The other values should replace. If there
|
||||
* are multiple redeclarations, all the fields except uses_gl_fragcoord
|
||||
* are already known to be the same.
|
||||
*/
|
||||
if (shader->redeclares_gl_fragcoord || shader->uses_gl_fragcoord) {
|
||||
linked_shader->redeclares_gl_fragcoord =
|
||||
shader->redeclares_gl_fragcoord;
|
||||
linked_shader->uses_gl_fragcoord = linked_shader->uses_gl_fragcoord
|
||||
|| shader->uses_gl_fragcoord;
|
||||
linked_shader->origin_upper_left = shader->origin_upper_left;
|
||||
linked_shader->pixel_center_integer = shader->pixel_center_integer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs the cross-validation of geometry shader max_vertices and
|
||||
* primitive type layout qualifiers for the attached geometry shaders,
|
||||
@@ -1390,6 +1467,7 @@ link_intrastage_shaders(void *mem_ctx,
|
||||
linked->NumUniformBlocks = num_uniform_blocks;
|
||||
ralloc_steal(linked, linked->UniformBlocks);
|
||||
|
||||
link_fs_input_layout_qualifiers(prog, linked, shader_list, num_shaders);
|
||||
link_gs_inout_layout_qualifiers(prog, linked, shader_list, num_shaders);
|
||||
|
||||
populate_symbol_table(linked);
|
||||
@@ -1716,10 +1794,12 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
|
||||
* active attribute array, both of which require multiple
|
||||
* contiguous generic attributes."
|
||||
*
|
||||
* Previous versions of the spec contain similar language but omit
|
||||
* the bit about attribute arrays.
|
||||
* I think above text prohibits the aliasing of explicit and
|
||||
* automatic assignments. But, aliasing is allowed in manual
|
||||
* assignments of attribute locations. See below comments for
|
||||
* the details.
|
||||
*
|
||||
* Page 61 of the OpenGL 4.0 spec also says:
|
||||
* From OpenGL 4.0 spec, page 61:
|
||||
*
|
||||
* "It is possible for an application to bind more than one
|
||||
* attribute name to the same location. This is referred to as
|
||||
@@ -1732,29 +1812,84 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
|
||||
* but implementations are not required to generate an error
|
||||
* in this case."
|
||||
*
|
||||
* These two paragraphs are either somewhat contradictory, or I
|
||||
* don't fully understand one or both of them.
|
||||
*/
|
||||
/* FINISHME: The code as currently written does not support
|
||||
* FINISHME: attribute location aliasing (see comment above).
|
||||
* From GLSL 4.30 spec, page 54:
|
||||
*
|
||||
* "A program will fail to link if any two non-vertex shader
|
||||
* input variables are assigned to the same location. For
|
||||
* vertex shaders, multiple input variables may be assigned
|
||||
* to the same location using either layout qualifiers or via
|
||||
* the OpenGL API. However, such aliasing is intended only to
|
||||
* support vertex shaders where each execution path accesses
|
||||
* at most one input per each location. Implementations are
|
||||
* permitted, but not required, to generate link-time errors
|
||||
* if they detect that every path through the vertex shader
|
||||
* executable accesses multiple inputs assigned to any single
|
||||
* location. For all shader types, a program will fail to link
|
||||
* if explicit location assignments leave the linker unable
|
||||
* to find space for other variables without explicit
|
||||
* assignments."
|
||||
*
|
||||
* From OpenGL ES 3.0 spec, page 56:
|
||||
*
|
||||
* "Binding more than one attribute name to the same location
|
||||
* is referred to as aliasing, and is not permitted in OpenGL
|
||||
* ES Shading Language 3.00 vertex shaders. LinkProgram will
|
||||
* fail when this condition exists. However, aliasing is
|
||||
* possible in OpenGL ES Shading Language 1.00 vertex shaders.
|
||||
* This will only work if only one of the aliased attributes
|
||||
* is active in the executable program, or if no path through
|
||||
* the shader consumes more than one attribute of a set of
|
||||
* attributes aliased to the same location. A link error can
|
||||
* occur if the linker determines that every path through the
|
||||
* shader consumes multiple aliased attributes, but implemen-
|
||||
* tations are not required to generate an error in this case."
|
||||
*
|
||||
* After looking at above references from OpenGL, OpenGL ES and
|
||||
* GLSL specifications, we allow aliasing of vertex input variables
|
||||
* in: OpenGL 2.0 (and above) and OpenGL ES 2.0.
|
||||
*
|
||||
* NOTE: This is not required by the spec but its worth mentioning
|
||||
* here that we're not doing anything to make sure that no path
|
||||
* through the vertex shader executable accesses multiple inputs
|
||||
* assigned to any single location.
|
||||
*/
|
||||
|
||||
/* Mask representing the contiguous slots that will be used by
|
||||
* this attribute.
|
||||
*/
|
||||
const unsigned attr = var->data.location - generic_base;
|
||||
const unsigned use_mask = (1 << slots) - 1;
|
||||
const char *const string = (target_index == MESA_SHADER_VERTEX)
|
||||
? "vertex shader input" : "fragment shader output";
|
||||
|
||||
/* Generate a link error if the requested locations for this
|
||||
* attribute exceed the maximum allowed attribute location.
|
||||
*/
|
||||
if (attr + slots > max_index) {
|
||||
linker_error(prog,
|
||||
"insufficient contiguous locations "
|
||||
"available for %s `%s' %d %d %d", string,
|
||||
var->name, used_locations, use_mask, attr);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Generate a link error if the set of bits requested for this
|
||||
* attribute overlaps any previously allocated bits.
|
||||
*/
|
||||
if ((~(use_mask << attr) & used_locations) != used_locations) {
|
||||
const char *const string = (target_index == MESA_SHADER_VERTEX)
|
||||
? "vertex shader input" : "fragment shader output";
|
||||
linker_error(prog,
|
||||
"insufficient contiguous locations "
|
||||
"available for %s `%s' %d %d %d", string,
|
||||
var->name, used_locations, use_mask, attr);
|
||||
return false;
|
||||
if (target_index == MESA_SHADER_FRAGMENT ||
|
||||
(prog->IsES && prog->Version >= 300)) {
|
||||
linker_error(prog,
|
||||
"overlapping location is assigned "
|
||||
"to %s `%s' %d %d %d\n", string,
|
||||
var->name, used_locations, use_mask, attr);
|
||||
return false;
|
||||
} else {
|
||||
linker_warning(prog,
|
||||
"overlapping location is assigned "
|
||||
"to %s `%s' %d %d %d\n", string,
|
||||
var->name, used_locations, use_mask, attr);
|
||||
}
|
||||
}
|
||||
|
||||
used_locations |= (use_mask << attr);
|
||||
@@ -1993,6 +2128,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
||||
ralloc_free(prog->AtomicBuffers);
|
||||
prog->AtomicBuffers = NULL;
|
||||
prog->NumAtomicBuffers = 0;
|
||||
prog->ARB_fragment_coord_conventions_enable = false;
|
||||
|
||||
/* Separate the shaders into groups based on their type.
|
||||
*/
|
||||
@@ -2019,6 +2155,9 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
||||
goto done;
|
||||
}
|
||||
|
||||
prog->ARB_fragment_coord_conventions_enable |=
|
||||
prog->Shaders[i]->ARB_fragment_coord_conventions_enable;
|
||||
|
||||
gl_shader_stage shader_type = prog->Shaders[i]->Stage;
|
||||
shader_list[shader_type][num_shaders[shader_type]] = prog->Shaders[i];
|
||||
num_shaders[shader_type]++;
|
||||
|
@@ -194,12 +194,16 @@ lower_ubo_reference_visitor::handle_rvalue(ir_rvalue **rvalue)
|
||||
array_stride = glsl_align(array_stride, 16);
|
||||
}
|
||||
|
||||
ir_constant *const_index = deref_array->array_index->as_constant();
|
||||
ir_rvalue *array_index = deref_array->array_index;
|
||||
if (array_index->type->base_type == GLSL_TYPE_INT)
|
||||
array_index = i2u(array_index);
|
||||
|
||||
ir_constant *const_index = array_index->as_constant();
|
||||
if (const_index) {
|
||||
const_offset += array_stride * const_index->value.i[0];
|
||||
const_offset += array_stride * const_index->value.u[0];
|
||||
} else {
|
||||
offset = add(offset,
|
||||
mul(deref_array->array_index,
|
||||
mul(array_index,
|
||||
new(mem_ctx) ir_constant(array_stride)));
|
||||
}
|
||||
deref = deref_array->array->as_dereference();
|
||||
|
@@ -260,6 +260,7 @@ ir_vectorize_visitor::visit_enter(ir_assignment *ir)
|
||||
if (ir->condition ||
|
||||
this->channels >= 4 ||
|
||||
!single_channel_write_mask(ir->write_mask) ||
|
||||
this->assignment[write_mask_to_swizzle(ir->write_mask)] != NULL ||
|
||||
(lhs && !ir->lhs->equals(lhs)) ||
|
||||
(rhs && !ir->rhs->equals(rhs, ir_type_swizzle))) {
|
||||
try_vectorize();
|
||||
|
@@ -73,11 +73,15 @@ apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const struct glx_config * m
|
||||
GLint vsref = 0;
|
||||
CGLError error = 0;
|
||||
|
||||
/* Request an OpenGL 3.2 profile if one is available */
|
||||
if(apple_cgl.version_major > 1 || (apple_cgl.version_major == 1 && apple_cgl.version_minor >= 3)) {
|
||||
attr[numattr++] = kCGLPFAOpenGLProfile;
|
||||
attr[numattr++] = kCGLOGLPVersion_3_2_Core;
|
||||
}
|
||||
/* Request an OpenGL 3.2 profile if one is available and supported */
|
||||
attr[numattr++] = kCGLPFAOpenGLProfile;
|
||||
attr[numattr++] = kCGLOGLPVersion_3_2_Core;
|
||||
|
||||
/* Test for kCGLPFAOpenGLProfile support at runtime and roll it out if not supported */
|
||||
attr[numattr] = 0;
|
||||
error = apple_cgl.choose_pixel_format(attr, pfobj, &vsref);
|
||||
if (error == kCGLBadAttribute)
|
||||
numattr -= 2;
|
||||
|
||||
if (offscreen) {
|
||||
apple_glx_diagnostic
|
||||
|
@@ -132,10 +132,14 @@ DRI2WireToEvent(Display *dpy, XEvent *event, xEvent *wire)
|
||||
aevent->msc = ((CARD64)awire->msc_hi << 32) | awire->msc_lo;
|
||||
|
||||
glxDraw = GetGLXDrawable(dpy, pdraw->drawable);
|
||||
if (awire->sbc < glxDraw->lastEventSbc)
|
||||
glxDraw->eventSbcWrap += 0x100000000;
|
||||
glxDraw->lastEventSbc = awire->sbc;
|
||||
aevent->sbc = awire->sbc + glxDraw->eventSbcWrap;
|
||||
if (glxDraw != NULL) {
|
||||
if (awire->sbc < glxDraw->lastEventSbc)
|
||||
glxDraw->eventSbcWrap += 0x100000000;
|
||||
glxDraw->lastEventSbc = awire->sbc;
|
||||
aevent->sbc = awire->sbc + glxDraw->eventSbcWrap;
|
||||
} else {
|
||||
aevent->sbc = awire->sbc;
|
||||
}
|
||||
|
||||
return True;
|
||||
}
|
||||
|
@@ -95,4 +95,12 @@ _X_HIDDEN int
|
||||
dri2_query_renderer_string(struct glx_screen *base, int attribute,
|
||||
const char **value);
|
||||
|
||||
_X_HIDDEN int
|
||||
dri3_query_renderer_integer(struct glx_screen *base, int attribute,
|
||||
unsigned int *value);
|
||||
|
||||
_X_HIDDEN int
|
||||
dri3_query_renderer_string(struct glx_screen *base, int attribute,
|
||||
const char **value);
|
||||
|
||||
#endif
|
||||
|
@@ -1201,6 +1201,16 @@ dri2CreateScreen(int screen, struct glx_display * priv)
|
||||
goto handle_error;
|
||||
}
|
||||
|
||||
if (drmGetMagic(psc->fd, &magic)) {
|
||||
ErrorMessageF("failed to get magic\n");
|
||||
goto handle_error;
|
||||
}
|
||||
|
||||
if (!DRI2Authenticate(priv->dpy, RootWindow(priv->dpy, screen), magic)) {
|
||||
ErrorMessageF("failed to authenticate magic %d\n", magic);
|
||||
goto handle_error;
|
||||
}
|
||||
|
||||
/* If Mesa knows about the appropriate driver for this fd, then trust it.
|
||||
* Otherwise, default to the server's value.
|
||||
*/
|
||||
@@ -1232,16 +1242,6 @@ dri2CreateScreen(int screen, struct glx_display * priv)
|
||||
goto handle_error;
|
||||
}
|
||||
|
||||
if (drmGetMagic(psc->fd, &magic)) {
|
||||
ErrorMessageF("failed to get magic\n");
|
||||
goto handle_error;
|
||||
}
|
||||
|
||||
if (!DRI2Authenticate(priv->dpy, RootWindow(priv->dpy, screen), magic)) {
|
||||
ErrorMessageF("failed to authenticate magic %d\n", magic);
|
||||
goto handle_error;
|
||||
}
|
||||
|
||||
if (psc->dri2->base.version >= 4) {
|
||||
psc->driScreen =
|
||||
psc->dri2->createNewScreen2(screen, psc->fd,
|
||||
|
@@ -29,6 +29,9 @@
|
||||
#include "dri2.h"
|
||||
#include "dri_interface.h"
|
||||
#include "dri2_priv.h"
|
||||
#if defined(HAVE_DRI3)
|
||||
#include "dri3_priv.h"
|
||||
#endif
|
||||
|
||||
static int
|
||||
dri2_convert_glx_query_renderer_attribs(int attribute)
|
||||
@@ -99,4 +102,44 @@ dri2_query_renderer_string(struct glx_screen *base, int attribute,
|
||||
return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, value);
|
||||
}
|
||||
|
||||
#if defined(HAVE_DRI3)
|
||||
_X_HIDDEN int
|
||||
dri3_query_renderer_integer(struct glx_screen *base, int attribute,
|
||||
unsigned int *value)
|
||||
{
|
||||
struct dri3_screen *const psc = (struct dri3_screen *) base;
|
||||
|
||||
/* Even though there are invalid values (and
|
||||
* dri2_convert_glx_query_renderer_attribs may return -1), the higher level
|
||||
* GLX code is required to perform the filtering. Assume that we got a
|
||||
* good value.
|
||||
*/
|
||||
const int dri_attribute = dri2_convert_glx_query_renderer_attribs(attribute);
|
||||
|
||||
if (psc->rendererQuery == NULL)
|
||||
return -1;
|
||||
|
||||
return psc->rendererQuery->queryInteger(psc->driScreen, dri_attribute,
|
||||
value);
|
||||
}
|
||||
|
||||
_X_HIDDEN int
|
||||
dri3_query_renderer_string(struct glx_screen *base, int attribute,
|
||||
const char **value)
|
||||
{
|
||||
struct dri3_screen *const psc = (struct dri3_screen *) base;
|
||||
|
||||
/* Even though queryString only accepts a subset of the possible GLX
|
||||
* queries, the higher level GLX code is required to perform the filtering.
|
||||
* Assume that we got a good value.
|
||||
*/
|
||||
const int dri_attribute = dri2_convert_glx_query_renderer_attribs(attribute);
|
||||
|
||||
if (psc->rendererQuery == NULL)
|
||||
return -1;
|
||||
|
||||
return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, value);
|
||||
}
|
||||
#endif /* HAVE_DRI3 */
|
||||
|
||||
#endif /* GLX_DIRECT_RENDERING */
|
||||
|
@@ -79,6 +79,7 @@
|
||||
#include "dri_common.h"
|
||||
#include "dri3_priv.h"
|
||||
#include "loader.h"
|
||||
#include "dri2.h"
|
||||
|
||||
static const struct glx_context_vtable dri3_context_vtable;
|
||||
|
||||
@@ -1580,12 +1581,19 @@ dri3_bind_extensions(struct dri3_screen *psc, struct glx_display * priv,
|
||||
if (strcmp(extensions[i]->name, __DRI2_ROBUSTNESS) == 0)
|
||||
__glXEnableDirectExtension(&psc->base,
|
||||
"GLX_ARB_create_context_robustness");
|
||||
|
||||
if (strcmp(extensions[i]->name, __DRI2_RENDERER_QUERY) == 0) {
|
||||
psc->rendererQuery = (__DRI2rendererQueryExtension *) extensions[i];
|
||||
__glXEnableDirectExtension(&psc->base, "GLX_MESA_query_renderer");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static const struct glx_screen_vtable dri3_screen_vtable = {
|
||||
dri3_create_context,
|
||||
dri3_create_context_attribs
|
||||
dri3_create_context_attribs,
|
||||
dri3_query_renderer_integer,
|
||||
dri3_query_renderer_string,
|
||||
};
|
||||
|
||||
/** dri3_create_screen
|
||||
|
@@ -129,6 +129,7 @@ struct dri3_screen {
|
||||
const __DRI2flushExtension *f;
|
||||
const __DRI2configQueryExtension *config;
|
||||
const __DRItexBufferExtension *texBuffer;
|
||||
const __DRI2rendererQueryExtension *rendererQuery;
|
||||
const __DRIconfig **driver_configs;
|
||||
|
||||
void *driver;
|
||||
|
@@ -249,6 +249,10 @@ glx_display_free(struct glx_display *priv)
|
||||
if (priv->dri2Display)
|
||||
(*priv->dri2Display->destroyDisplay) (priv->dri2Display);
|
||||
priv->dri2Display = NULL;
|
||||
|
||||
if (priv->dri3Display)
|
||||
(*priv->dri3Display->destroyDisplay) (priv->dri3Display);
|
||||
priv->dri3Display = NULL;
|
||||
#endif
|
||||
|
||||
free((char *) priv);
|
||||
@@ -825,7 +829,6 @@ __glXInitialize(Display * dpy)
|
||||
dpyPriv->codes = XInitExtension(dpy, __glXExtensionName);
|
||||
if (!dpyPriv->codes) {
|
||||
free(dpyPriv);
|
||||
_XUnlockMutex(_Xglobal_lock);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -841,7 +844,6 @@ __glXInitialize(Display * dpy)
|
||||
&dpyPriv->majorVersion, &dpyPriv->minorVersion)
|
||||
|| (dpyPriv->majorVersion == 1 && dpyPriv->minorVersion < 1)) {
|
||||
free(dpyPriv);
|
||||
_XUnlockMutex(_Xglobal_lock);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -906,7 +908,7 @@ __glXInitialize(Display * dpy)
|
||||
dpyPriv->next = glx_displays;
|
||||
glx_displays = dpyPriv;
|
||||
|
||||
_XUnlockMutex(_Xglobal_lock);
|
||||
_XUnlockMutex(_Xglobal_lock);
|
||||
|
||||
return dpyPriv;
|
||||
}
|
||||
|
@@ -1,2 +1,3 @@
|
||||
LOADER_C_FILES := \
|
||||
loader.c
|
||||
loader.c \
|
||||
pci_id_driver_map.c
|
||||
|
@@ -78,7 +78,7 @@
|
||||
#endif
|
||||
|
||||
#define __IS_LOADER
|
||||
#include "pci_ids/pci_id_driver_map.h"
|
||||
#include "pci_id_driver_map.h"
|
||||
|
||||
static void default_logger(int level, const char *fmt, ...)
|
||||
{
|
||||
@@ -202,7 +202,7 @@ out:
|
||||
return (*chip_id >= 0);
|
||||
}
|
||||
|
||||
#elif defined(ANDROID) && !defined(__NOT_HAVE_DRM_H)
|
||||
#elif !defined(__NOT_HAVE_DRM_H)
|
||||
|
||||
/* for i915 */
|
||||
#include <i915_drm.h>
|
||||
@@ -219,12 +219,12 @@ loader_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id)
|
||||
version = drmGetVersion(fd);
|
||||
if (!version) {
|
||||
log_(_LOADER_WARNING, "MESA-LOADER: invalid drm fd\n");
|
||||
return FALSE;
|
||||
return 0;
|
||||
}
|
||||
if (!version->name) {
|
||||
log_(_LOADER_WARNING, "MESA-LOADER: unable to determine the driver name\n");
|
||||
drmFreeVersion(version);
|
||||
return FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strcmp(version->name, "i915") == 0) {
|
||||
@@ -352,6 +352,9 @@ loader_get_driver_for_fd(int fd, unsigned driver_types)
|
||||
if (!(driver_types & driver_map[i].driver_types))
|
||||
continue;
|
||||
|
||||
if (driver_map[i].predicate && !driver_map[i].predicate(fd))
|
||||
continue;
|
||||
|
||||
if (driver_map[i].num_chips_ids == -1) {
|
||||
driver = strdup(driver_map[i].driver);
|
||||
goto out;
|
||||
|
55
src/loader/pci_id_driver_map.c
Normal file
55
src/loader/pci_id_driver_map.c
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2014 Ilia Mirkin
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
int is_nouveau_vieux(int fd);
|
||||
|
||||
#ifndef __NOT_HAVE_DRM_H
|
||||
|
||||
#include <xf86drm.h>
|
||||
#include <nouveau_drm.h>
|
||||
|
||||
static int
|
||||
nouveau_chipset(int fd)
|
||||
{
|
||||
struct drm_nouveau_getparam gp = { NOUVEAU_GETPARAM_CHIPSET_ID, 0 };
|
||||
int ret;
|
||||
|
||||
ret = drmCommandWriteRead(fd, DRM_NOUVEAU_GETPARAM, &gp, sizeof(gp));
|
||||
if (ret)
|
||||
return -1;
|
||||
|
||||
return gp.value;
|
||||
}
|
||||
|
||||
int
|
||||
is_nouveau_vieux(int fd)
|
||||
{
|
||||
int chipset = nouveau_chipset(fd);
|
||||
return chipset > 0 && chipset < 0x30;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int is_nouveau_vieux(int fd) { return 0; }
|
||||
|
||||
#endif
|
@@ -59,12 +59,15 @@ static const int vmwgfx_chip_ids[] = {
|
||||
#undef CHIPSET
|
||||
};
|
||||
|
||||
int is_nouveau_vieux(int fd);
|
||||
|
||||
static const struct {
|
||||
int vendor_id;
|
||||
const char *driver;
|
||||
const int *chip_ids;
|
||||
int num_chips_ids;
|
||||
unsigned driver_types;
|
||||
int (*predicate)(int fd);
|
||||
} driver_map[] = {
|
||||
{ 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids), _LOADER_DRI | _LOADER_GALLIUM },
|
||||
{ 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids), _LOADER_DRI | _LOADER_GALLIUM },
|
||||
@@ -73,7 +76,8 @@ static const struct {
|
||||
{ 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids), _LOADER_GALLIUM },
|
||||
{ 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids), _LOADER_GALLIUM },
|
||||
{ 0x1002, "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids), _LOADER_GALLIUM},
|
||||
{ 0x10de, "nouveau", NULL, -1, _LOADER_GALLIUM },
|
||||
{ 0x10de, "nouveau_vieux", NULL, -1, _LOADER_DRI, is_nouveau_vieux },
|
||||
{ 0x10de, "nouveau", NULL, -1, _LOADER_GALLIUM },
|
||||
{ 0x15ad, "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids), _LOADER_GALLIUM },
|
||||
{ 0x0000, NULL, NULL, 0 },
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user