Compare commits
152 Commits
mesa-10.0.
...
10.0
Author | SHA1 | Date | |
---|---|---|---|
|
0da7d59ac2 | ||
|
c941373838 | ||
|
c78a676998 | ||
|
5e718c11c6 | ||
|
b2f14a6284 | ||
|
498853b9fd | ||
|
45fd1d336a | ||
|
cbaaf8fe42 | ||
|
7b580a567f | ||
|
69a777dd21 | ||
|
76f33938dd | ||
|
68fef3983e | ||
|
5ab0f978b7 | ||
|
9cd2daa0ef | ||
|
15b2587334 | ||
|
6cc6c921b1 | ||
|
132df6a9a5 | ||
|
0c37a0b94d | ||
|
1184293f40 | ||
|
2bd3830197 | ||
|
f15356c70a | ||
|
40a05673a7 | ||
|
437f291d64 | ||
|
5c4f80dca6 | ||
|
860ee22480 | ||
|
5ad6062ee6 | ||
|
063f9c6aef | ||
|
6490bdf358 | ||
|
1062066fad | ||
|
fd5f0644af | ||
|
ef793cbf6d | ||
|
f6ce0eba76 | ||
|
2cfd35186e | ||
|
7494e2e50c | ||
|
c29c9947a3 | ||
|
518526700e | ||
|
2f9e7f6394 | ||
|
9cdb86a1da | ||
|
4588a32dee | ||
|
aba40445c2 | ||
|
6a81f2bc9b | ||
|
a02c50ef4e | ||
|
af1831d003 | ||
|
59ab5bf0a0 | ||
|
85e04ad280 | ||
|
6b2cf05192 | ||
|
3fc389efeb | ||
|
bab122c320 | ||
|
cf7daac483 | ||
|
de6068a218 | ||
|
c074e34745 | ||
|
00d1daf2a8 | ||
|
09a346a1c1 | ||
|
5202312160 | ||
|
d6e83e9a7a | ||
|
ad54c842fa | ||
|
a4719eff1a | ||
|
5f35078700 | ||
|
aa1f7b4237 | ||
|
d141825eff | ||
|
d13adcae22 | ||
|
e91dd3661c | ||
|
490b810d0e | ||
|
d37086c6fc | ||
|
cfd8aed240 | ||
|
1b6aec4b5a | ||
|
6d6bdd88e7 | ||
|
2a19186953 | ||
|
dc0053b33f | ||
|
e70e368af5 | ||
|
e10b0e0f50 | ||
|
b74da80b71 | ||
|
89c6473ff0 | ||
|
a4a8af4cbb | ||
|
c1bcdcde1c | ||
|
d18b182134 | ||
|
5297fdc0c8 | ||
|
edf066f385 | ||
|
593484a1c4 | ||
|
d8225ac67a | ||
|
3eac4b550d | ||
|
cb7caac053 | ||
|
0461451dcd | ||
|
0657a6a6ae | ||
|
559d9b894e | ||
|
765e3d373b | ||
|
ae286af09d | ||
|
ed437df208 | ||
|
f7848574b3 | ||
|
319d6d6067 | ||
|
6f27353c20 | ||
|
99f695f716 | ||
|
ef75bf0777 | ||
|
0cd3d50f07 | ||
|
31b2e73a2d | ||
|
df62691a02 | ||
|
fe2678accd | ||
|
83e9eb81be | ||
|
8c467b825f | ||
|
79ef990ef8 | ||
|
b1694c9f87 | ||
|
e2b6834c87 | ||
|
04e5f2e94f | ||
|
a3f259e404 | ||
|
705da42130 | ||
|
b646441307 | ||
|
0ec1ae90ef | ||
|
0fd4cf4bf8 | ||
|
45f0736aa5 | ||
|
b513c66a4e | ||
|
dbc0ae1079 | ||
|
9ca4c8f6a2 | ||
|
502d89b260 | ||
|
3a6271890c | ||
|
9b3ed4c8c2 | ||
|
38235d2923 | ||
|
0df489f0e0 | ||
|
31e2824d99 | ||
|
700b916da1 | ||
|
c24489b0ef | ||
|
2b205f2864 | ||
|
b1ff3f6270 | ||
|
5310a8cc20 | ||
|
108e50c3bc | ||
|
44dfcf6e88 | ||
|
e833368e04 | ||
|
3efc2bbf07 | ||
|
d46a58703a | ||
|
8eee788bd6 | ||
|
9ccb6cc7b7 | ||
|
4d7961e95e | ||
|
b8be00e5f2 | ||
|
347f149332 | ||
|
49c865180a | ||
|
765ceb6a36 | ||
|
7a7166f832 | ||
|
a4a2f239d7 | ||
|
23d290d102 | ||
|
2a20bf3ed2 | ||
|
87cdd13324 | ||
|
b2ea582679 | ||
|
0057a2b0e7 | ||
|
8518b6360d | ||
|
ffd89b27a7 | ||
|
b0ee1b1748 | ||
|
8dd89b8ad8 | ||
|
ec80a279a5 | ||
|
f6ea5b7bd7 | ||
|
db0dc5c008 | ||
|
c2940d11d0 | ||
|
27623f2645 | ||
|
6f7da0188a |
@@ -11,3 +11,29 @@ f0f202e6b764be803470e27cba9102f14361ae22 glx: conditionaly build dri3 and presen
|
|||||||
# the 10.0 branch. See
|
# the 10.0 branch. See
|
||||||
# http://lists.freedesktop.org/archives/mesa-stable/2013-December/000500.html
|
# http://lists.freedesktop.org/archives/mesa-stable/2013-December/000500.html
|
||||||
a057b837ddd1c725a7504eedc53c6df05a012773 egl: add HAVE_LIBDRM define, fix EGL X11 platform
|
a057b837ddd1c725a7504eedc53c6df05a012773 egl: add HAVE_LIBDRM define, fix EGL X11 platform
|
||||||
|
|
||||||
|
# Author requested skipping due to regressions
|
||||||
|
# Picking it would require at least also picking:
|
||||||
|
# 73c3c7e3, 3e0e9e3b, c59a605c
|
||||||
|
b2d1c579bb84a88179072a6a783f8827e218db55 glcpp: Set extension defines after resolving the GLSL version.
|
||||||
|
|
||||||
|
# These patches depend on other code not in stable branch.
|
||||||
|
# (at least 3b22146dc714b6090f7423abbc4df53d7d1fdaa9)
|
||||||
|
e190709119d8eb85c67bfbad5be699d39ad0118e mesa: Ensure that transform feedback refers to the correct program.
|
||||||
|
43e77215b13b2f86e461cd8a62b542fc6854dd1c i965/gen7: Use to the correct program when uploading transform feedback state.
|
||||||
|
|
||||||
|
# Author requested to ignore these four (since they depend on commits not in
|
||||||
|
# stable).
|
||||||
|
3313cc269bd428ca96a132d86da5fddc0f27386a i965: Add an option to ignore sample qualifier
|
||||||
|
a92e5f7cf63d496ad7830b5cea4bbab287c25b8e i965: Use sample barycentric coordinates with per sample shading
|
||||||
|
f5cfb4ae21df8eebfc6b86c0ce858b1c0a9160dd i965: Ignore 'centroid' interpolation qualifier in case of persample shading
|
||||||
|
dc2f94bc786768329973403248820a2e5249f102 i965: Ignore 'centroid' interpolation qualifier in case of persample shading
|
||||||
|
|
||||||
|
# This depends on the clear_buffer_object extensions work which is not in 10.0
|
||||||
|
# (See commit 5f7bc0c75904a40da0973329badea8497e53a26a on other branches)
|
||||||
|
aff7c5e78ab133866a90f67613508735c9b75094
|
||||||
|
|
||||||
|
# These patches are fixing code not present in 10.0
|
||||||
|
f34d75d6f69f4c0bf391e0adf1fd469601b01b04
|
||||||
|
e8d85034dad37177fce780ee3e09501e60be6e81
|
||||||
|
a61d859519d520b849c11ad5c1c1972870abd956
|
||||||
|
@@ -14,7 +14,7 @@ git log --reverse --grep="cherry picked from commit" origin/master..HEAD |\
|
|||||||
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
|
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
|
||||||
|
|
||||||
# Grep for commits that were marked as a candidate for the stable tree.
|
# Grep for commits that were marked as a candidate for the stable tree.
|
||||||
git log --reverse --pretty=%H -i --grep='^\([[:space:]]*NOTE: .*[Cc]andidate\|CC:.*mesa-stable\)' HEAD..origin/master |\
|
git log --reverse --pretty=%H -i --grep='^\([[:space:]]*NOTE: .*[Cc]andidate.*10\.0\|CC:.*10\.0.*mesa-stable\)' HEAD..origin/master |\
|
||||||
while read sha
|
while read sha
|
||||||
do
|
do
|
||||||
# Check to see whether the patch is on the ignore list.
|
# Check to see whether the patch is on the ignore list.
|
||||||
|
@@ -100,4 +100,4 @@ def AddOptions(opts):
|
|||||||
opts.Add(BoolOption('quiet', 'DEPRECATED: profile build', 'yes'))
|
opts.Add(BoolOption('quiet', 'DEPRECATED: profile build', 'yes'))
|
||||||
opts.Add(BoolOption('texture_float', 'enable floating-point textures and renderbuffers', 'no'))
|
opts.Add(BoolOption('texture_float', 'enable floating-point textures and renderbuffers', 'no'))
|
||||||
if host_platform == 'windows':
|
if host_platform == 'windows':
|
||||||
opts.Add(EnumOption('MSVC_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0', '10.0', '11.0')))
|
opts.Add(EnumOption('MSVC_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0', '10.0', '11.0', '12.0')))
|
||||||
|
12
configure.ac
12
configure.ac
@@ -227,6 +227,12 @@ esac
|
|||||||
AC_SUBST([VISIBILITY_CFLAGS])
|
AC_SUBST([VISIBILITY_CFLAGS])
|
||||||
AC_SUBST([VISIBILITY_CXXFLAGS])
|
AC_SUBST([VISIBILITY_CXXFLAGS])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Optional flags, check for compiler support
|
||||||
|
dnl
|
||||||
|
AX_CHECK_COMPILE_FLAG([-msse4.1], [SSE41_SUPPORTED=1], [SSE41_SUPPORTED=0])
|
||||||
|
AM_CONDITIONAL([SSE41_SUPPORTED], [test x$SSE41_SUPPORTED = x1])
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Hacks to enable 32 or 64 bit build
|
dnl Hacks to enable 32 or 64 bit build
|
||||||
dnl
|
dnl
|
||||||
@@ -993,7 +999,7 @@ if test "x$enable_dri" = xyes; then
|
|||||||
DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'`
|
DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'`
|
||||||
|
|
||||||
# Check for expat
|
# 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
|
if test "x$have_expat" = "xyes"; then
|
||||||
PKG_CHECK_MODULES([EXPAT], [expat], [],
|
PKG_CHECK_MODULES([EXPAT], [expat], [],
|
||||||
AC_MSG_ERROR([Expat required for DRI.]))
|
AC_MSG_ERROR([Expat required for DRI.]))
|
||||||
@@ -1527,9 +1533,9 @@ if test "x$enable_gallium_llvm" = xauto; then
|
|||||||
fi
|
fi
|
||||||
if test "x$enable_gallium_llvm" = xyes; then
|
if test "x$enable_gallium_llvm" = xyes; then
|
||||||
if test "x$llvm_prefix" != x; then
|
if test "x$llvm_prefix" != x; then
|
||||||
AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix/bin"])
|
AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix/bin"])
|
||||||
else
|
else
|
||||||
AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no])
|
AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$LLVM_CONFIG" != xno; then
|
if test "x$LLVM_CONFIG" != xno; then
|
||||||
|
@@ -31,6 +31,9 @@ because compatibility contexts not supported.
|
|||||||
|
|
||||||
<h2>MD5 checksums</h2>
|
<h2>MD5 checksums</h2>
|
||||||
<pre>
|
<pre>
|
||||||
|
0a72ca5b36046a658bf6038326ff32ed MesaLib-10.0.1.tar.bz2
|
||||||
|
01bde35c912e504ba62caf1ef9f7022c MesaLib-10.0.1.tar.gz
|
||||||
|
59a174a11a89e6b1b8ee9c3f7e3c388c MesaLib-10.0.1.zip
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
|
161
docs/relnotes/10.0.2.html
Normal file
161
docs/relnotes/10.0.2.html
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
<!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.0.2 Release Notes / (January 9, 2014)</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mesa 10.0.2 is a bug fix release which fixes bugs found since the 10.0.1 release.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Mesa 10.0.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 not supported.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>MD5 checksums</h2>
|
||||||
|
<pre>
|
||||||
|
de7d14baf0101b697c140d2f47ef27e9 MesaLib-10.0.2.tar.gz
|
||||||
|
8544c0ab3e438a08b5103421ea15b6d2 MesaLib-10.0.2.tar.bz2
|
||||||
|
181b0d6c1afca38e98a930d0e564ed90 MesaLib-10.0.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=70740">Bug 70740</a> - HiZ on SNB causes GPU hang with WebGL web app</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72026">Bug 72026</a> - SIGSEGV in fs_visitor::visit(ir_dereference_variable*)</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72264">Bug 72264</a> - GLSL error reporting</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72369">Bug 72369</a> - glitches in serious sam 3 with the sb shader backend</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Changes</h2>
|
||||||
|
|
||||||
|
<p>The full set of changes can be viewed by using the following git command:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
git log mesa-10.0.1..mesa-10.0.2
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Aaron Watry (8):</p>
|
||||||
|
<ul>
|
||||||
|
<li>clover: Remove unused variable</li>
|
||||||
|
<li>pipe_loader/sw: close dev->lib when initialization fails</li>
|
||||||
|
<li>radeon/compute: Stop leaking LLVMContexts in radeon_llvm_parse_bitcode</li>
|
||||||
|
<li>r600/compute: Free compiled kernels when deleting compute state</li>
|
||||||
|
<li>r600/compute: Use the correct FREE macro when deleting compute state</li>
|
||||||
|
<li>radeon/llvm: Free target data at end of optimization</li>
|
||||||
|
<li>st/vdpau: Destroy context when initialization fails</li>
|
||||||
|
<li>r600/pipe: Stop leaking context->start_compute_cs_cmd.buf on EG/CM</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Alex Deucher (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>r600g: fix SUMO2 pci id</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Alexander von Gluck IV (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>Haiku: Add in public GL kit headers</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Anuj Phogat (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: Fix error code generation in glBeginConditionalRender()</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Carl Worth (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>docs: Add md5sums for the 10.0.1 release.</li>
|
||||||
|
<li>Update version to 10.0.2</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Chad Versace (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965/gen6: Fix HiZ hang in WebGL Google Maps</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Erik Faye-Lund (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>glcpp: error on multiple #else/#elif directives</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Henri Verbeet (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i915: Add support for gl_FragData[0] reads.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ilia Mirkin (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>nv50: fix a small leak on context destroy</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Jonathan Liu (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>st/mesa: use pipe_sampler_view_release()</li>
|
||||||
|
<li>llvmpipe: use pipe_sampler_view_release() to avoid segfault</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Kenneth Graunke (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: Fix 3DSTATE_PUSH_CONSTANT_ALLOC_PS packet creation.</li>
|
||||||
|
<li>Revert "mesa: Remove GLXContextID typedef from glx.h."</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Kevin Rogovin (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>Use line number information from entire function expression</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Kristian Høgsberg (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>dri_util: Don't assume __DRIcontext->driverPrivate is a gl_context</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Marek Olšák (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: fix interpretation of glClearBuffer(drawbuffer)</li>
|
||||||
|
<li>st/mesa: fix glClear with multiple colorbuffers and different formats</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Paul Berry (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>glsl: Teach ir_variable_refcount about ir_loop::counter variables.</li>
|
||||||
|
<li>glsl: Fix inconsistent assumptions about ir_loop::counter.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Vadim Girlin (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>r600g/sb: fix stack size computation on evergreen</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
206
docs/relnotes/10.0.3.html
Normal file
206
docs/relnotes/10.0.3.html
Normal file
@@ -0,0 +1,206 @@
|
|||||||
|
<!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.0.3 Release Notes / (February 3, 2014)</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mesa 10.0.3 is a bug fix release which fixes bugs found since the 10.0.2 release.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Mesa 10.0.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 not supported.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>MD5 checksums</h2>
|
||||||
|
<pre>
|
||||||
|
5f9f463ef08129f6762106b434910adb MesaLib-10.0.3.tar.bz2
|
||||||
|
fb3997b6500e153bc32370cb3fc4ca9e MesaLib-10.0.3.tar.gz
|
||||||
|
a07b4b6b9eb449b88a6cb5061e51c331 MesaLib-10.0.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=72708">Bug 72708</a> - Master fails to build with older gcc due to -msse4.1</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72926">Bug 72926</a> - [REGRESSION,swrast] Memory-related crash with anti-aliasing enabled</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=73096">Bug 73096</a> - Query GL_RGBA_SIGNED_COMPONENTS_EXT missing</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=73100">Bug 73100</a> - Please use AC_PATH_TOOL instead of AC_PATH_PROG for llvm-config</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=73418">Bug 73418</a> - OpenCL hangs graphics on CAYMAN</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=73473">Bug 73473</a> - Potential crash bug in src/gallium/auxiliary/rtasm/rtasm_execmem.c</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=73915">Bug 73915</a> - sample shading + centroid broken since f5cfb4a</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=73956">Bug 73956</a> - SIGSEGV when passing GL_NONE to glReadBuffer</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74026">Bug 74026</a> - Compiler rejects chained assignments involving array dereferences</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Changes</h2>
|
||||||
|
|
||||||
|
<p>The full set of changes can be viewed by using the following git command:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
git log mesa-10.0.2..mesa-10.0.3
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Aaron Watry (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>radeon: Move gfx/dma cs cleanup to r600_common_context_cleanup</li>
|
||||||
|
<li>st/dri: prevent leak of dri option default values</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Andreas Fänger (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>swrast: fix delayed texel buffer allocation regression for OpenMP</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Anuj Phogat (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>glsl: Disable ARB_texture_rectangle in shader version 100.</li>
|
||||||
|
<li>i965: Use sample barycentric coordinates with per sample shading</li>
|
||||||
|
<li>i965: Ignore 'centroid' interpolation qualifier in case of persample shading</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Brian Paul (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: implement missing glGet(GL_RGBA_SIGNED_COMPONENTS_EXT) query</li>
|
||||||
|
<li>st/mesa: fix glReadBuffer(GL_NONE) segfault</li>
|
||||||
|
<li>draw: fix incorrect vertex size computation in LLVM drawing code</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Carl Worth (5):</p>
|
||||||
|
<ul>
|
||||||
|
<li>Add md5sums for 10.0.2. release.</li>
|
||||||
|
<li>cherry-ignore: Ignore several patches not yet ready for the stable branch</li>
|
||||||
|
<li>Drop another couple of patches.</li>
|
||||||
|
<li>cherry-ignore: Ignore 4 patches at teh request of the author, (Anuj).</li>
|
||||||
|
<li>Update version to 10.0.3</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Chad Versace (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965/gen6/blorp: Emit more flushes to workaround hangs</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Chris Forbes (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: fold offset into coord for textureOffset(gsampler2DRect)</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Emil Velikov (5):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: use signed temporary variable to store _ColorDrawBufferIndexes</li>
|
||||||
|
<li>st/mesa: use signed temporary variable to store _ColorDrawBufferIndexes</li>
|
||||||
|
<li>nv50: access only the available amount of textures</li>
|
||||||
|
<li>nv50: access only the available amount of constbuf</li>
|
||||||
|
<li>gallium/rtasm: handle mmap failures appropriately</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Eric Anholt (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: Fix handling of MESA_pack_invert in blit (PBO) readpixels.</li>
|
||||||
|
<li>i965: Don't do the temporary-and-blit-copy for INVALIDATE_RANGE maps.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ian Romanick (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: Add COMPRESSED_RGBA_S3TC_DXT1_EXT to COMPRESSED_TEXTURE_FORMATS for GLES</li>
|
||||||
|
<li>radeon / r200: Pass the API into _mesa_initialize_context</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ilia Mirkin (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: fix GL_COLOR_SUM enum for drivers without ARB_vertex_program</li>
|
||||||
|
<li>st/vdpau: don't return a device if the screen doesn't support NPOT</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>José Fonseca (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: Use IROUND instead of roundf.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Kenneth Graunke (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>glsl: Rename "expr" to "lhs_expr" in vector_extract munging code.</li>
|
||||||
|
<li>glsl: Fix chained assignments of vector channels.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Lauri Kasanen (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: Fix build to properly check for supported compiler flags</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Marek Olšák (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>st/mesa: use sRGB formats for MSAA resolving if destination is sRGB</li>
|
||||||
|
<li>gallium/util: util_format_srgb should not return FORMAT_NONE for sRGB formats</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Matt Turner (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>glcpp: Define GL_EXT_shader_integer_mix in both GL and ES.</li>
|
||||||
|
<li>glx: Update glxext.h to revision 24777.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Michał Górny (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>Use AC_PATH_TOOL instead of AC_PATH_PROG for llvm-config.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Paul Berry (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: Ensure that all necessary state is re-emitted if we run out of aperture.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Paul Seidler (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>build: move ARCH_LIBS definition outside of ASM definition</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Thomas Sondergaard (4):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: Preliminary support for MSVC_VERSION=12.0</li>
|
||||||
|
<li>mesa: Fix compile error with MSVC 2013</li>
|
||||||
|
<li>mesa: Work around internal compiler error</li>
|
||||||
|
<li>mesa: Namespace qualify fma to override ambiguity with fma from math.h</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Tom Stellard (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>r600g/compute: Emit DEALLOC_STATE on cayman after dispatching a compute shader.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
191
docs/relnotes/10.0.4.html
Normal file
191
docs/relnotes/10.0.4.html
Normal file
@@ -0,0 +1,191 @@
|
|||||||
|
<!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.0.4 Release Notes / (March 12, 2014)</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mesa 10.0.4 is a bug fix release which fixes bugs found since the 10.0.3 release.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Mesa 10.0.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 not supported.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>MD5 checksums</h2>
|
||||||
|
<pre>
|
||||||
|
5a3c5b90776ec8a9fcd777c99e0607e2 MesaLib-10.0.4.tar.gz
|
||||||
|
8b148869d2620b0720c8a8d2b7eb3e38 MesaLib-10.0.4.tar.bz2
|
||||||
|
da2418d25bfbc273660af7e755fb367e MesaLib-10.0.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=71870">Bug 71870</a> - Metro: Last Light rendering issues</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72895">Bug 72895</a> - Missing trees in flightgear 2.12.1 with mesa 10.0.1</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74251">Bug 74251</a> - Segfault in st_finalize_texture with Texture Buffer</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74723">Bug 74723</a> - main/shaderapi.c:407: detach_shader: Assertion `shProg->Shaders[j]->Type == 0x8B31 || shProg->Shaders[j]->Type == 0x8B30' failed.</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Changes</h2>
|
||||||
|
|
||||||
|
<p>The full set of changes can be viewed by using the following git command:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
git log mesa-10.0.3..mesa-10.0.4
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Anuj Phogat (4):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: Generate correct error code in glDrawBuffers()</li>
|
||||||
|
<li>mesa: Add GL_TEXTURE_CUBE_MAP_ARRAY to legal_get_tex_level_parameter_target()</li>
|
||||||
|
<li>glsl: Fix condition to generate shader link error</li>
|
||||||
|
<li>i965: Fix the region's pitch condition to use blitter</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Brian Paul (8):</p>
|
||||||
|
<ul>
|
||||||
|
<li>r200: move driContextSetFlags(ctx) call after ctx var is initialized</li>
|
||||||
|
<li>radeon: move driContextSetFlags(ctx) call after ctx var is initialized</li>
|
||||||
|
<li>gallium/auxiliary/indices: replace free() with FREE()</li>
|
||||||
|
<li>draw: fix incorrect color of flat-shaded clipped lines</li>
|
||||||
|
<li>st/mesa: avoid sw fallback for getting/decompressing textures</li>
|
||||||
|
<li>mesa: update assertion in detach_shader() for geom shaders</li>
|
||||||
|
<li>mesa: do depth/stencil format conversion in glGetTexImage</li>
|
||||||
|
<li>softpipe: use 64-bit arithmetic in softpipe_resource_layout()</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Carl Worth (4):</p>
|
||||||
|
<ul>
|
||||||
|
<li>docs: Add md5sums for 10.0.3 release</li>
|
||||||
|
<li>main: Avoid double-free of shader Label</li>
|
||||||
|
<li>get-pick-list: Update to only find patches nominated for the 10.0 branch</li>
|
||||||
|
<li>Update version to 10.0.4</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Chris Forbes (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: Validate (and resolve) all the bound textures.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Christian König (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>radeon/uvd: fix feedback buffer handling v2</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Daniel Kurtz (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>glsl: Add locking to builtin_builder singleton</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Emil Velikov (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>dri/nouveau: Pass the API into _mesa_initialize_context</li>
|
||||||
|
<li>nv50: correctly calculate the number of vertical blocks during transfer map</li>
|
||||||
|
<li>dri/i9*5: correctly calculate the amount of system memory</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Fredrik Höglund (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: Preserve the NewArrays state when copying a VAO</li>
|
||||||
|
<li>glx: Fix the default values for GLXFBConfig attributes</li>
|
||||||
|
<li>glx: Fix the GLXFBConfig attrib sort priorities</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 (6):</p>
|
||||||
|
<ul>
|
||||||
|
<li>meta: Release resources used by decompress_texture_image</li>
|
||||||
|
<li>meta: Release resources used by _mesa_meta_DrawPixels</li>
|
||||||
|
<li>meta: Fallback to software for GetTexImage of compressed GL_TEXTURE_CUBE_MAP_ARRAY</li>
|
||||||
|
<li>meta: Consistenly use non-Apple VAO functions</li>
|
||||||
|
<li>glcpp: Only warn for macro names containing __</li>
|
||||||
|
<li>glsl: Only warn for macro names containing __</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ilia Mirkin (3):</p>
|
||||||
|
<ul>
|
||||||
|
<li>nv30: report 8 maximum inputs</li>
|
||||||
|
<li>nouveau/video: make sure that firmware is present when checking caps</li>
|
||||||
|
<li>nouveau: fix chipset checks for nv1a by using the oclass instead</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Julien Cristau (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>glx/dri2: fix build failure on HURD</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Kenneth Graunke (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>glsl: Don't lose precision qualifiers when encountering "centroid".</li>
|
||||||
|
<li>i965: Create a hardware context before initializing state module.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Kusanagi Kouichi (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>targets/vdpau: Always use c++ to link</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Marek Olšák (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>st/mesa: fix crash when a shader uses a TBO and it's not bound</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Matt Turner (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>glsl: Initialize ubo_binding_mask flags to zero.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Paul Berry (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>glsl: Make condition_to_hir() callable from outside ast_iteration_statement.</li>
|
||||||
|
<li>glsl: Fix continue statements in do-while loops.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Tom Stellard (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>r600g/compute: PIPE_CAP_COMPUTE should be false for pre-evergreen GPUs</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Topi Pohjolainen (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965/blorp: do not use unnecessary hw-blending support</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
173
docs/relnotes/10.0.5.html
Normal file
173
docs/relnotes/10.0.5.html
Normal file
@@ -0,0 +1,173 @@
|
|||||||
|
<!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.0.5 Release Notes / (April 18, 2014)</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mesa 10.0.5 is a bug fix release which fixes bugs found since the 10.0.4 release.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Mesa 10.0.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 not supported.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>MD5 checksums</h2>
|
||||||
|
<pre>
|
||||||
|
db606aadd0fe321f3664099677d159bc MesaLib-10.0.5.tar.gz
|
||||||
|
e6009ccd8898d7104bb325b6af9ec354 MesaLib-10.0.5.tar.bz2
|
||||||
|
c8ab9e502542bf32299a4df85b0b704d MesaLib-10.0.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=58660">Bug 58660</a> - CAYMAN broken with HyperZ on</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64471">Bug 64471</a> - Radeon HD6570 lockup in Brütal Legend with HyperZ</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66352">Bug 66352</a> - GPU lockup in L4D2 on TURKS with HyperZ</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68799">Bug 68799</a> - [APITRACE] Hyper-Z lockup with Falcon BMS 4.32u6 on CAYMAN</li>
|
||||||
|
|
||||||
|
<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=72685">Bug 72685</a> - [radeonsi hyperz] Artifacts in Unigine Sanctuary</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=73088">Bug 73088</a> - [HyperZ] Juniper (6770): Gone Home / Unigine Heaven 4.0 lock up system after several minutes of use</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74428">Bug 74428</a> - hyperz causes gpu hang in Counter-strike: Source</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74803">Bug 74803</a> - [r600g] HyperZ broken on RV630 (Cogs shadows are broken)</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74863">Bug 74863</a> - [r600g] HyperZ broken on RV770 and CYPRESS (Left 4 Dead 2 trees corruption) bisected!</li>
|
||||||
|
|
||||||
|
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74892">Bug 74892</a> - HyperZ GPU lockup with radeonsi 7970M PITCAIRN and Distance Alpha game</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=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>The full set of changes can be viewed by using the following git command:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
git log mesa-10.0.4..mesa-10.0.5
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Alex Deucher (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>radeon: reverse DBG_NO_HYPERZ logic</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Brian Paul (9):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: add unpacking code for MESA_FORMAT_Z32_FLOAT_S8X24_UINT</li>
|
||||||
|
<li>mesa: fix copy & paste bugs in pack_ubyte_SARGB8()</li>
|
||||||
|
<li>mesa: fix copy & paste bugs in pack_ubyte_SRGB8()</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>docs: Add md5sums for the 10.0.4 release.</li>
|
||||||
|
<li>Ignore patches which don't apply.</li>
|
||||||
|
<li>Update version to 10.0.5</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 (2):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: return v.value_int64 when the requested type is TYPE_INT64</li>
|
||||||
|
<li>glx: drop obsolete _XUnlock_Mutex in __glXInitialize error path</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Eric Anholt (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965: Fix buffer overruns in MSAA MCS buffer clearing.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Ilia Mirkin (6):</p>
|
||||||
|
<ul>
|
||||||
|
<li>nouveau: fix fence waiting logic in screen destroy</li>
|
||||||
|
<li>nv50: adjust blit_3d handling of ms output textures</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>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 (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>gallium: add endian detection for OpenBSD</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>José Fonseca (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>draw: Duplicate TGSI tokens in draw_pipe_pstipple module.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Matt Turner (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>mesa: Wrap SSE4.1 code in #ifdef __SSE4_1__.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Paul Berry (1):</p>
|
||||||
|
<ul>
|
||||||
|
<li>i965/gen7: Prefer vertical alignment of 4 when possible.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -168,6 +168,7 @@ typedef XID GLXDrawable;
|
|||||||
/* GLX 1.3 and later */
|
/* GLX 1.3 and later */
|
||||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
||||||
typedef XID GLXFBConfigID;
|
typedef XID GLXFBConfigID;
|
||||||
|
typedef XID GLXContextID;
|
||||||
typedef XID GLXWindow;
|
typedef XID GLXWindow;
|
||||||
typedef XID GLXPbuffer;
|
typedef XID GLXPbuffer;
|
||||||
|
|
||||||
|
@@ -33,10 +33,10 @@ extern "C" {
|
|||||||
** used to make the header, and the header can be found at
|
** used to make the header, and the header can be found at
|
||||||
** http://www.opengl.org/registry/
|
** http://www.opengl.org/registry/
|
||||||
**
|
**
|
||||||
** Khronos $Revision: 23422 $ on $Date: 2013-10-08 15:40:45 -0700 (Tue, 08 Oct 2013) $
|
** Khronos $Revision: 24777 $ on $Date: 2014-01-14 14:02:32 -0800 (Tue, 14 Jan 2014) $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GLX_GLXEXT_VERSION 20131008
|
#define GLX_GLXEXT_VERSION 20140114
|
||||||
|
|
||||||
/* Generated C header for:
|
/* Generated C header for:
|
||||||
* API: glx
|
* API: glx
|
||||||
@@ -49,6 +49,7 @@ extern "C" {
|
|||||||
|
|
||||||
#ifndef GLX_VERSION_1_3
|
#ifndef GLX_VERSION_1_3
|
||||||
#define GLX_VERSION_1_3 1
|
#define GLX_VERSION_1_3 1
|
||||||
|
typedef XID GLXContextID;
|
||||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
||||||
typedef XID GLXWindow;
|
typedef XID GLXWindow;
|
||||||
typedef XID GLXPbuffer;
|
typedef XID GLXPbuffer;
|
||||||
@@ -272,7 +273,6 @@ __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName);
|
|||||||
|
|
||||||
#ifndef GLX_EXT_import_context
|
#ifndef GLX_EXT_import_context
|
||||||
#define GLX_EXT_import_context 1
|
#define GLX_EXT_import_context 1
|
||||||
typedef XID GLXContextID;
|
|
||||||
#define GLX_SHARE_CONTEXT_EXT 0x800A
|
#define GLX_SHARE_CONTEXT_EXT 0x800A
|
||||||
#define GLX_VISUAL_ID_EXT 0x800B
|
#define GLX_VISUAL_ID_EXT 0x800B
|
||||||
#define GLX_SCREEN_EXT 0x800C
|
#define GLX_SCREEN_EXT 0x800C
|
||||||
@@ -433,6 +433,14 @@ void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLe
|
|||||||
#endif
|
#endif
|
||||||
#endif /* GLX_NV_copy_image */
|
#endif /* GLX_NV_copy_image */
|
||||||
|
|
||||||
|
#ifndef GLX_NV_delay_before_swap
|
||||||
|
#define GLX_NV_delay_before_swap 1
|
||||||
|
typedef Bool ( *PFNGLXDELAYBEFORESWAPNVPROC) (Display *dpy, GLXDrawable drawable, GLfloat seconds);
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
Bool glXDelayBeforeSwapNV (Display *dpy, GLXDrawable drawable, GLfloat seconds);
|
||||||
|
#endif
|
||||||
|
#endif /* GLX_NV_delay_before_swap */
|
||||||
|
|
||||||
#ifndef GLX_NV_float_buffer
|
#ifndef GLX_NV_float_buffer
|
||||||
#define GLX_NV_float_buffer 1
|
#define GLX_NV_float_buffer 1
|
||||||
#define GLX_FLOAT_COMPONENTS_NV 0x20B0
|
#define GLX_FLOAT_COMPONENTS_NV 0x20B0
|
||||||
|
76
include/HaikuGL/GLRenderer.h
Normal file
76
include/HaikuGL/GLRenderer.h
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2006, Philippe Houdoin. All rights reserved.
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
|
||||||
|
* This header defines BGLRenderer, the base class making up
|
||||||
|
* the Haiku GL renderer add-ons (essentially selfcontained C++
|
||||||
|
* shared libraries that do the actual rendering such as
|
||||||
|
* libswpipe.so and libswrast.so)
|
||||||
|
*/
|
||||||
|
#ifndef GLRENDERER_H
|
||||||
|
#define GLRENDERER_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <BeBuild.h>
|
||||||
|
#include <GLView.h>
|
||||||
|
|
||||||
|
|
||||||
|
class BGLDispatcher;
|
||||||
|
class GLRendererRoster;
|
||||||
|
|
||||||
|
typedef unsigned long renderer_id;
|
||||||
|
|
||||||
|
class BGLRenderer
|
||||||
|
{
|
||||||
|
// Private unimplemented copy constructors
|
||||||
|
BGLRenderer(const BGLRenderer &);
|
||||||
|
BGLRenderer & operator=(const BGLRenderer &);
|
||||||
|
|
||||||
|
public:
|
||||||
|
BGLRenderer(BGLView *view, ulong bgl_options,
|
||||||
|
BGLDispatcher *dispatcher);
|
||||||
|
virtual ~BGLRenderer();
|
||||||
|
|
||||||
|
void Acquire();
|
||||||
|
void Release();
|
||||||
|
|
||||||
|
virtual void LockGL();
|
||||||
|
virtual void UnlockGL();
|
||||||
|
|
||||||
|
virtual void SwapBuffers(bool VSync = false);
|
||||||
|
virtual void Draw(BRect updateRect);
|
||||||
|
virtual status_t CopyPixelsOut(BPoint source, BBitmap *dest);
|
||||||
|
virtual status_t CopyPixelsIn(BBitmap *source, BPoint dest);
|
||||||
|
|
||||||
|
virtual void FrameResized(float width, float height);
|
||||||
|
|
||||||
|
virtual void DirectConnected(direct_buffer_info *info);
|
||||||
|
virtual void EnableDirectMode(bool enabled);
|
||||||
|
|
||||||
|
inline int32 ReferenceCount() const { return fRefCount; };
|
||||||
|
inline ulong Options() const { return fOptions; };
|
||||||
|
inline BGLView* GLView() { return fView; };
|
||||||
|
inline BGLDispatcher* GLDispatcher() { return fDispatcher; };
|
||||||
|
|
||||||
|
private:
|
||||||
|
friend class GLRendererRoster;
|
||||||
|
|
||||||
|
virtual status_t _Reserved_Renderer_0(int32, void *);
|
||||||
|
virtual status_t _Reserved_Renderer_1(int32, void *);
|
||||||
|
virtual status_t _Reserved_Renderer_2(int32, void *);
|
||||||
|
virtual status_t _Reserved_Renderer_3(int32, void *);
|
||||||
|
virtual status_t _Reserved_Renderer_4(int32, void *);
|
||||||
|
|
||||||
|
volatile int32 fRefCount; // How much we're still usefull?
|
||||||
|
BGLView* fView; // Never forget who is the boss!
|
||||||
|
ulong fOptions; // Keep that tune in memory
|
||||||
|
BGLDispatcher* fDispatcher;// Our personal GL API call dispatcher
|
||||||
|
|
||||||
|
GLRendererRoster* fOwningRoster;
|
||||||
|
renderer_id fID;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern "C" _EXPORT BGLRenderer* instantiate_gl_renderer(BGLView *view, ulong options, BGLDispatcher *dispatcher);
|
||||||
|
|
||||||
|
|
||||||
|
#endif // GLRENDERER_H
|
193
include/HaikuGL/GLView.h
Normal file
193
include/HaikuGL/GLView.h
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2008-2013, Haiku, Inc. All Rights Reserved.
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*
|
||||||
|
* This header defines BGLView, the base class making up
|
||||||
|
* the Haiku GL Kit.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef BGLVIEW_H
|
||||||
|
#define BGLVIEW_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <GL/gl.h>
|
||||||
|
|
||||||
|
#define BGL_RGB 0
|
||||||
|
#define BGL_INDEX 1
|
||||||
|
#define BGL_SINGLE 0
|
||||||
|
#define BGL_DOUBLE 2
|
||||||
|
#define BGL_DIRECT 0
|
||||||
|
#define BGL_INDIRECT 4
|
||||||
|
#define BGL_ACCUM 8
|
||||||
|
#define BGL_ALPHA 16
|
||||||
|
#define BGL_DEPTH 32
|
||||||
|
#define BGL_OVERLAY 64
|
||||||
|
#define BGL_UNDERLAY 128
|
||||||
|
#define BGL_STENCIL 512
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
|
||||||
|
#include <AppKit.h>
|
||||||
|
#include <Bitmap.h>
|
||||||
|
#include <DirectWindow.h>
|
||||||
|
#include <View.h>
|
||||||
|
#include <Window.h>
|
||||||
|
#include <WindowScreen.h>
|
||||||
|
|
||||||
|
|
||||||
|
struct glview_direct_info;
|
||||||
|
class BGLRenderer;
|
||||||
|
class GLRendererRoster;
|
||||||
|
|
||||||
|
class BGLView : public BView {
|
||||||
|
public:
|
||||||
|
BGLView(BRect rect, const char* name,
|
||||||
|
ulong resizingMode, ulong mode,
|
||||||
|
ulong options);
|
||||||
|
virtual ~BGLView();
|
||||||
|
|
||||||
|
void LockGL();
|
||||||
|
void UnlockGL();
|
||||||
|
void SwapBuffers();
|
||||||
|
void SwapBuffers(bool vSync);
|
||||||
|
|
||||||
|
BView* EmbeddedView(); // deprecated, returns NULL
|
||||||
|
void* GetGLProcAddress(const char* procName);
|
||||||
|
|
||||||
|
status_t CopyPixelsOut(BPoint source, BBitmap *dest);
|
||||||
|
status_t CopyPixelsIn(BBitmap *source, BPoint dest);
|
||||||
|
|
||||||
|
// Mesa's GLenum is uint where Be's ones was ulong!
|
||||||
|
virtual void ErrorCallback(unsigned long errorCode);
|
||||||
|
|
||||||
|
virtual void Draw(BRect updateRect);
|
||||||
|
virtual void AttachedToWindow();
|
||||||
|
virtual void AllAttached();
|
||||||
|
virtual void DetachedFromWindow();
|
||||||
|
virtual void AllDetached();
|
||||||
|
|
||||||
|
virtual void FrameResized(float newWidth, float newHeight);
|
||||||
|
virtual status_t Perform(perform_code d, void *arg);
|
||||||
|
|
||||||
|
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||||
|
|
||||||
|
virtual void MessageReceived(BMessage *message);
|
||||||
|
virtual void SetResizingMode(uint32 mode);
|
||||||
|
|
||||||
|
virtual void Show();
|
||||||
|
virtual void Hide();
|
||||||
|
|
||||||
|
virtual BHandler* ResolveSpecifier(BMessage *msg, int32 index,
|
||||||
|
BMessage *specifier, int32 form,
|
||||||
|
const char *property);
|
||||||
|
virtual status_t GetSupportedSuites(BMessage *data);
|
||||||
|
|
||||||
|
void DirectConnected(direct_buffer_info *info);
|
||||||
|
void EnableDirectMode(bool enabled);
|
||||||
|
|
||||||
|
void* getGC() { return fGc; } // ???
|
||||||
|
|
||||||
|
virtual void GetPreferredSize(float* width, float* height);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
virtual void _ReservedGLView1();
|
||||||
|
virtual void _ReservedGLView2();
|
||||||
|
virtual void _ReservedGLView3();
|
||||||
|
virtual void _ReservedGLView4();
|
||||||
|
virtual void _ReservedGLView5();
|
||||||
|
virtual void _ReservedGLView6();
|
||||||
|
virtual void _ReservedGLView7();
|
||||||
|
virtual void _ReservedGLView8();
|
||||||
|
|
||||||
|
BGLView(const BGLView &);
|
||||||
|
BGLView &operator=(const BGLView &);
|
||||||
|
|
||||||
|
void _DitherFront();
|
||||||
|
bool _ConfirmDither();
|
||||||
|
void _Draw(BRect rect);
|
||||||
|
void _CallDirectConnected();
|
||||||
|
|
||||||
|
void* fGc;
|
||||||
|
uint32 fOptions;
|
||||||
|
uint32 fDitherCount;
|
||||||
|
BLocker fDrawLock;
|
||||||
|
BLocker fDisplayLock;
|
||||||
|
glview_direct_info* fClipInfo;
|
||||||
|
|
||||||
|
BGLRenderer* fRenderer;
|
||||||
|
GLRendererRoster* fRoster;
|
||||||
|
|
||||||
|
BBitmap* fDitherMap;
|
||||||
|
BRect fBounds;
|
||||||
|
int16* fErrorBuffer[2];
|
||||||
|
uint64 _reserved[8];
|
||||||
|
|
||||||
|
void _LockDraw();
|
||||||
|
void _UnlockDraw();
|
||||||
|
|
||||||
|
// BeOS compatibility
|
||||||
|
private:
|
||||||
|
BGLView(BRect rect, char* name,
|
||||||
|
ulong resizingMode, ulong mode,
|
||||||
|
ulong options);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class BGLScreen : public BWindowScreen {
|
||||||
|
public:
|
||||||
|
BGLScreen(char* name,
|
||||||
|
ulong screenMode, ulong options,
|
||||||
|
status_t *error, bool debug=false);
|
||||||
|
~BGLScreen();
|
||||||
|
|
||||||
|
void LockGL();
|
||||||
|
void UnlockGL();
|
||||||
|
void SwapBuffers();
|
||||||
|
// Mesa's GLenum is uint where Be's ones was ulong!
|
||||||
|
virtual void ErrorCallback(unsigned long errorCode);
|
||||||
|
|
||||||
|
virtual void ScreenConnected(bool connected);
|
||||||
|
virtual void FrameResized(float width, float height);
|
||||||
|
virtual status_t Perform(perform_code code, void *arg);
|
||||||
|
|
||||||
|
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||||
|
virtual void MessageReceived(BMessage *message);
|
||||||
|
|
||||||
|
virtual void Show();
|
||||||
|
virtual void Hide();
|
||||||
|
|
||||||
|
virtual BHandler* ResolveSpecifier(BMessage *message,
|
||||||
|
int32 index,
|
||||||
|
BMessage *specifier,
|
||||||
|
int32 form,
|
||||||
|
const char *property);
|
||||||
|
virtual status_t GetSupportedSuites(BMessage *data);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
virtual void _ReservedGLScreen1();
|
||||||
|
virtual void _ReservedGLScreen2();
|
||||||
|
virtual void _ReservedGLScreen3();
|
||||||
|
virtual void _ReservedGLScreen4();
|
||||||
|
virtual void _ReservedGLScreen5();
|
||||||
|
virtual void _ReservedGLScreen6();
|
||||||
|
virtual void _ReservedGLScreen7();
|
||||||
|
virtual void _ReservedGLScreen8();
|
||||||
|
|
||||||
|
BGLScreen(const BGLScreen &);
|
||||||
|
BGLScreen &operator=(const BGLScreen &);
|
||||||
|
|
||||||
|
void* fGc;
|
||||||
|
long fOptions;
|
||||||
|
BLocker fDrawLock;
|
||||||
|
|
||||||
|
int32 fColorSpace;
|
||||||
|
uint32 fScreenMode;
|
||||||
|
|
||||||
|
uint64 _reserved[7];
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __cplusplus
|
||||||
|
|
||||||
|
#endif // BGLVIEW_H
|
10
include/HaikuGL/OpenGLKit.h
Normal file
10
include/HaikuGL/OpenGLKit.h
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
/*
|
||||||
|
* Master include file for the Haiku OpenGL Kit.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <GL/gl.h>
|
||||||
|
#include <GLView.h>
|
||||||
|
|
||||||
|
// Projects needing GL/glu.h and GL/glut.h should now
|
||||||
|
// include these headers independently as glu and glut
|
||||||
|
// are no longe core parts of mesa
|
28
include/HaikuGL/README
Normal file
28
include/HaikuGL/README
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
These headers make up the Haiku Op*nGL kit.
|
||||||
|
|
||||||
|
Headers in this directory preserve some BeOS™ compatibility
|
||||||
|
compatibility, so changes should be mentioned to the Haiku
|
||||||
|
project mailing list.
|
||||||
|
|
||||||
|
http://haiku-os.org
|
||||||
|
|
||||||
|
Normal Haiku Op*enGL layout:
|
||||||
|
|
||||||
|
* headers/os/OpenGLKit.h
|
||||||
|
* headers/os/opengl/GLView.h
|
||||||
|
* headers/os/opengl/GLRenderer.h
|
||||||
|
* headers/os/opengl/GL/gl.h
|
||||||
|
* headers/os/opengl/GL/gl_mangle.h
|
||||||
|
* headers/os/opengl/GL/glext.h
|
||||||
|
* headers/os/opengl/GL/osmesa.h (needed?)
|
||||||
|
|
||||||
|
Extras:
|
||||||
|
|
||||||
|
* headers/os/opengl/GL/glu.h
|
||||||
|
* headers/os/opengl/GL/glut.h
|
||||||
|
|
||||||
|
OpenGL™ is a trademark of SGI. The usage of this trademark
|
||||||
|
in the Haiku GL Kit is not a sign of any certification or
|
||||||
|
endorsement by SGI or its affiliates. Usage is purely to
|
||||||
|
allow legacy compatibility with the BeOS™ and its 3D GL
|
||||||
|
rendering subsystem.
|
@@ -208,7 +208,7 @@ CHIPSET(0x9644, SUMO2_9644, SUMO2)
|
|||||||
CHIPSET(0x9645, SUMO2_9645, SUMO2)
|
CHIPSET(0x9645, SUMO2_9645, SUMO2)
|
||||||
CHIPSET(0x9647, SUMO_9647, SUMO)
|
CHIPSET(0x9647, SUMO_9647, SUMO)
|
||||||
CHIPSET(0x9648, SUMO_9648, SUMO)
|
CHIPSET(0x9648, SUMO_9648, SUMO)
|
||||||
CHIPSET(0x9649, SUMO_9649, SUMO)
|
CHIPSET(0x9649, SUMO2_9649, SUMO2)
|
||||||
CHIPSET(0x964a, SUMO_964A, SUMO)
|
CHIPSET(0x964a, SUMO_964A, SUMO)
|
||||||
CHIPSET(0x964b, SUMO_964B, SUMO)
|
CHIPSET(0x964b, SUMO_964B, SUMO)
|
||||||
CHIPSET(0x964c, SUMO_964C, SUMO)
|
CHIPSET(0x964c, SUMO_964C, SUMO)
|
||||||
|
72
m4/ax_check_compile_flag.m4
Normal file
72
m4/ax_check_compile_flag.m4
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# Check whether the given FLAG works with the current language's compiler
|
||||||
|
# or gives an error. (Warnings, however, are ignored)
|
||||||
|
#
|
||||||
|
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||||
|
# success/failure.
|
||||||
|
#
|
||||||
|
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
||||||
|
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
||||||
|
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
||||||
|
# force the compiler to issue an error when a bad flag is given.
|
||||||
|
#
|
||||||
|
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||||
|
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||||
|
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by the
|
||||||
|
# Free Software Foundation, either version 3 of the License, or (at your
|
||||||
|
# option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
# Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along
|
||||||
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||||
|
# gives unlimited permission to copy, distribute and modify the configure
|
||||||
|
# scripts that are the output of Autoconf when processing the Macro. You
|
||||||
|
# need not follow the terms of the GNU General Public License when using
|
||||||
|
# or distributing such scripts, even though portions of the text of the
|
||||||
|
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||||
|
# all other use of the material that constitutes the Autoconf Macro.
|
||||||
|
#
|
||||||
|
# This special exception to the GPL applies to versions of the Autoconf
|
||||||
|
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||||
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
|
#serial 2
|
||||||
|
|
||||||
|
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||||
|
[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
|
||||||
|
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
||||||
|
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
||||||
|
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||||
|
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||||
|
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||||
|
[AS_VAR_SET(CACHEVAR,[no])])
|
||||||
|
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
||||||
|
AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
|
||||||
|
[m4_default([$2], :)],
|
||||||
|
[m4_default([$3], :)])
|
||||||
|
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||||
|
])dnl AX_CHECK_COMPILE_FLAGS
|
@@ -1182,11 +1182,12 @@ cso_set_sampler_views(struct cso_context *ctx,
|
|||||||
pipe_sampler_view_reference(&info->views[i], NULL);
|
pipe_sampler_view_reference(&info->views[i], NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
info->nr_views = count;
|
|
||||||
|
|
||||||
/* bind the new sampler views */
|
/* 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->views);
|
||||||
|
|
||||||
|
info->nr_views = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -588,7 +588,12 @@ do_clip_line( struct draw_stage *stage,
|
|||||||
|
|
||||||
if (v0->clipmask) {
|
if (v0->clipmask) {
|
||||||
interp( clipper, stage->tmp[0], t0, v0, v1, viewport_index );
|
interp( clipper, stage->tmp[0], t0, v0, v1, viewport_index );
|
||||||
copy_flat(stage, stage->tmp[0], v0);
|
if (stage->draw->rasterizer->flatshade_first) {
|
||||||
|
copy_flat(stage, stage->tmp[0], v0); /* copy v0 color to tmp[0] */
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
copy_flat(stage, stage->tmp[0], v1); /* copy v1 color to tmp[0] */
|
||||||
|
}
|
||||||
newprim.v[0] = stage->tmp[0];
|
newprim.v[0] = stage->tmp[0];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -597,6 +602,12 @@ do_clip_line( struct draw_stage *stage,
|
|||||||
|
|
||||||
if (v1->clipmask) {
|
if (v1->clipmask) {
|
||||||
interp( clipper, stage->tmp[1], t1, v1, v0, viewport_index );
|
interp( clipper, stage->tmp[1], t1, v1, v0, viewport_index );
|
||||||
|
if (stage->draw->rasterizer->flatshade_first) {
|
||||||
|
copy_flat(stage, stage->tmp[1], v0); /* copy v0 color to tmp[1] */
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
copy_flat(stage, stage->tmp[1], v1); /* copy v1 color to tmp[1] */
|
||||||
|
}
|
||||||
newprim.v[1] = stage->tmp[1];
|
newprim.v[1] = stage->tmp[1];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@@ -673,7 +673,7 @@ pstip_create_fs_state(struct pipe_context *pipe,
|
|||||||
struct pstip_fragment_shader *pstipfs = CALLOC_STRUCT(pstip_fragment_shader);
|
struct pstip_fragment_shader *pstipfs = CALLOC_STRUCT(pstip_fragment_shader);
|
||||||
|
|
||||||
if (pstipfs) {
|
if (pstipfs) {
|
||||||
pstipfs->state = *fs;
|
pstipfs->state.tokens = tgsi_dup_tokens(fs->tokens);
|
||||||
|
|
||||||
/* pass-through */
|
/* pass-through */
|
||||||
pstipfs->driver_fs = pstip->driver_create_fs_state(pstip->pipe, fs);
|
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)
|
if (pstipfs->pstip_fs)
|
||||||
pstip->driver_delete_fs_state(pstip->pipe, pstipfs->pstip_fs);
|
pstip->driver_delete_fs_state(pstip->pipe, pstipfs->pstip_fs);
|
||||||
|
|
||||||
|
FREE((void*)pstipfs->state.tokens);
|
||||||
FREE(pstipfs);
|
FREE(pstipfs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -72,8 +72,8 @@ static void fetch_pipeline_prepare( struct draw_pt_middle_end *middle,
|
|||||||
|
|
||||||
const unsigned gs_out_prim = (gs ? gs->output_primitive :
|
const unsigned gs_out_prim = (gs ? gs->output_primitive :
|
||||||
u_assembled_prim(prim));
|
u_assembled_prim(prim));
|
||||||
unsigned nr = MAX2( vs->info.num_inputs,
|
unsigned nr_vs_outputs = draw_total_vs_outputs(draw);
|
||||||
draw_total_vs_outputs(draw) );
|
unsigned nr = MAX2(vs->info.num_inputs, nr_vs_outputs);
|
||||||
|
|
||||||
if (gs) {
|
if (gs) {
|
||||||
nr = MAX2(nr, gs->info.num_outputs + 1);
|
nr = MAX2(nr, gs->info.num_outputs + 1);
|
||||||
@@ -129,6 +129,9 @@ static void fetch_pipeline_prepare( struct draw_pt_middle_end *middle,
|
|||||||
/* No need to prepare the shader.
|
/* No need to prepare the shader.
|
||||||
*/
|
*/
|
||||||
vs->prepare(vs, draw);
|
vs->prepare(vs, draw);
|
||||||
|
|
||||||
|
/* Make sure that the vertex size didn't change at any point above */
|
||||||
|
assert(nr_vs_outputs == draw_total_vs_outputs(draw));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -141,19 +141,11 @@ llvm_middle_end_prepare( struct draw_pt_middle_end *middle,
|
|||||||
struct draw_geometry_shader *gs = draw->gs.geometry_shader;
|
struct draw_geometry_shader *gs = draw->gs.geometry_shader;
|
||||||
const unsigned out_prim = gs ? gs->output_primitive :
|
const unsigned out_prim = gs ? gs->output_primitive :
|
||||||
u_assembled_prim(in_prim);
|
u_assembled_prim(in_prim);
|
||||||
const unsigned nr = MAX2(vs->info.num_inputs,
|
unsigned nr;
|
||||||
draw_total_vs_outputs(draw));
|
|
||||||
|
|
||||||
fpme->input_prim = in_prim;
|
fpme->input_prim = in_prim;
|
||||||
fpme->opt = opt;
|
fpme->opt = opt;
|
||||||
|
|
||||||
/* Always leave room for the vertex header whether we need it or
|
|
||||||
* not. It's hard to get rid of it in particular because of the
|
|
||||||
* viewport code in draw_pt_post_vs.c.
|
|
||||||
*/
|
|
||||||
fpme->vertex_size = sizeof(struct vertex_header) + nr * 4 * sizeof(float);
|
|
||||||
|
|
||||||
|
|
||||||
draw_pt_post_vs_prepare( fpme->post_vs,
|
draw_pt_post_vs_prepare( fpme->post_vs,
|
||||||
draw->clip_xy,
|
draw->clip_xy,
|
||||||
draw->clip_z,
|
draw->clip_z,
|
||||||
@@ -177,6 +169,30 @@ llvm_middle_end_prepare( struct draw_pt_middle_end *middle,
|
|||||||
*max_vertices = 4096;
|
*max_vertices = 4096;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Get the number of float[4] attributes per vertex.
|
||||||
|
* Note: this must be done after draw_pt_emit_prepare() since that
|
||||||
|
* can effect the vertex size.
|
||||||
|
*/
|
||||||
|
nr = MAX2(vs->info.num_inputs, draw_total_vs_outputs(draw));
|
||||||
|
|
||||||
|
/* Always leave room for the vertex header whether we need it or
|
||||||
|
* not. It's hard to get rid of it in particular because of the
|
||||||
|
* viewport code in draw_pt_post_vs.c.
|
||||||
|
*/
|
||||||
|
fpme->vertex_size = sizeof(struct vertex_header) + nr * 4 * sizeof(float);
|
||||||
|
|
||||||
|
/* Get the number of float[4] attributes per vertex.
|
||||||
|
* Note: this must be done after draw_pt_emit_prepare() since that
|
||||||
|
* can effect the vertex size.
|
||||||
|
*/
|
||||||
|
nr = MAX2(vs->info.num_inputs, draw_total_vs_outputs(draw));
|
||||||
|
|
||||||
|
/* Always leave room for the vertex header whether we need it or
|
||||||
|
* not. It's hard to get rid of it in particular because of the
|
||||||
|
* viewport code in draw_pt_post_vs.c.
|
||||||
|
*/
|
||||||
|
fpme->vertex_size = sizeof(struct vertex_header) + nr * 4 * sizeof(float);
|
||||||
|
|
||||||
/* return even number */
|
/* return even number */
|
||||||
*max_vertices = *max_vertices & ~1;
|
*max_vertices = *max_vertices & ~1;
|
||||||
|
|
||||||
|
@@ -74,7 +74,7 @@ void
|
|||||||
util_primconvert_destroy(struct primconvert_context *pc)
|
util_primconvert_destroy(struct primconvert_context *pc)
|
||||||
{
|
{
|
||||||
util_primconvert_save_index_buffer(pc, NULL);
|
util_primconvert_save_index_buffer(pc, NULL);
|
||||||
free(pc);
|
FREE(pc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -95,8 +95,11 @@ pipe_loader_sw_create_screen(struct pipe_loader_device *dev,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
init = (void *)util_dl_get_proc_address(sdev->lib, "swrast_create_screen");
|
init = (void *)util_dl_get_proc_address(sdev->lib, "swrast_create_screen");
|
||||||
if (!init)
|
if (!init){
|
||||||
|
util_dl_close(sdev->lib);
|
||||||
|
sdev->lib = NULL;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return init(sdev->ws);
|
return init(sdev->ws);
|
||||||
}
|
}
|
||||||
|
@@ -69,7 +69,7 @@ static struct mem_block *exec_heap = NULL;
|
|||||||
static unsigned char *exec_mem = NULL;
|
static unsigned char *exec_mem = NULL;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static int
|
||||||
init_heap(void)
|
init_heap(void)
|
||||||
{
|
{
|
||||||
if (!exec_heap)
|
if (!exec_heap)
|
||||||
@@ -79,6 +79,8 @@ init_heap(void)
|
|||||||
exec_mem = (unsigned char *) mmap(0, EXEC_HEAP_SIZE,
|
exec_mem = (unsigned char *) mmap(0, EXEC_HEAP_SIZE,
|
||||||
PROT_EXEC | PROT_READ | PROT_WRITE,
|
PROT_EXEC | PROT_READ | PROT_WRITE,
|
||||||
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
|
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
|
||||||
|
|
||||||
|
return (exec_mem != MAP_FAILED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -90,7 +92,8 @@ rtasm_exec_malloc(size_t size)
|
|||||||
|
|
||||||
pipe_mutex_lock(exec_mutex);
|
pipe_mutex_lock(exec_mutex);
|
||||||
|
|
||||||
init_heap();
|
if (!init_heap())
|
||||||
|
goto bail;
|
||||||
|
|
||||||
if (exec_heap) {
|
if (exec_heap) {
|
||||||
size = (size + 31) & ~31; /* next multiple of 32 bytes */
|
size = (size + 31) & ~31; /* next multiple of 32 bytes */
|
||||||
@@ -101,7 +104,8 @@ rtasm_exec_malloc(size_t size)
|
|||||||
addr = exec_mem + block->ofs;
|
addr = exec_mem + block->ofs;
|
||||||
else
|
else
|
||||||
debug_printf("rtasm_exec_malloc failed\n");
|
debug_printf("rtasm_exec_malloc failed\n");
|
||||||
|
|
||||||
|
bail:
|
||||||
pipe_mutex_unlock(exec_mutex);
|
pipe_mutex_unlock(exec_mutex);
|
||||||
|
|
||||||
return addr;
|
return addr;
|
||||||
|
@@ -872,6 +872,9 @@ util_format_get_component_bits(enum pipe_format format,
|
|||||||
static INLINE enum pipe_format
|
static INLINE enum pipe_format
|
||||||
util_format_srgb(enum pipe_format format)
|
util_format_srgb(enum pipe_format format)
|
||||||
{
|
{
|
||||||
|
if (util_format_is_srgb(format))
|
||||||
|
return format;
|
||||||
|
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case PIPE_FORMAT_L8_UNORM:
|
case PIPE_FORMAT_L8_UNORM:
|
||||||
return PIPE_FORMAT_L8_SRGB;
|
return PIPE_FORMAT_L8_SRGB;
|
||||||
|
@@ -112,10 +112,13 @@ static INLINE float logf( float f )
|
|||||||
#define logf(x) ((float)log((double)(x)))
|
#define logf(x) ((float)log((double)(x)))
|
||||||
#endif /* logf */
|
#endif /* logf */
|
||||||
|
|
||||||
|
#if _MSC_VER < 1800
|
||||||
#define isfinite(x) _finite((double)(x))
|
#define isfinite(x) _finite((double)(x))
|
||||||
#define isnan(x) _isnan((double)(x))
|
#define isnan(x) _isnan((double)(x))
|
||||||
|
#endif /* _MSC_VER < 1800 */
|
||||||
#endif /* _MSC_VER < 1400 && !defined(__cplusplus) */
|
#endif /* _MSC_VER < 1400 && !defined(__cplusplus) */
|
||||||
|
|
||||||
|
#if _MSC_VER < 1800
|
||||||
static INLINE double log2( double x )
|
static INLINE double log2( double x )
|
||||||
{
|
{
|
||||||
const double invln2 = 1.442695041;
|
const double invln2 = 1.442695041;
|
||||||
@@ -133,6 +136,7 @@ roundf(float x)
|
|||||||
{
|
{
|
||||||
return x >= 0.0f ? floorf(x + 0.5f) : ceilf(x - 0.5f);
|
return x >= 0.0f ? floorf(x + 0.5f) : ceilf(x - 0.5f);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#define INFINITY (DBL_MAX + DBL_MAX)
|
#define INFINITY (DBL_MAX + DBL_MAX)
|
||||||
#define NAN (INFINITY - INFINITY)
|
#define NAN (INFINITY - INFINITY)
|
||||||
|
@@ -136,6 +136,12 @@ llvmpipe_set_sampler_views(struct pipe_context *pipe,
|
|||||||
|
|
||||||
/* set the new sampler views */
|
/* set the new sampler views */
|
||||||
for (i = 0; i < num; i++) {
|
for (i = 0; i < num; i++) {
|
||||||
|
/* Note: we're using pipe_sampler_view_release() here to work around
|
||||||
|
* a possible crash when the old view belongs to another context that
|
||||||
|
* was already destroyed.
|
||||||
|
*/
|
||||||
|
pipe_sampler_view_release(pipe,
|
||||||
|
&llvmpipe->sampler_views[shader][start + i]);
|
||||||
pipe_sampler_view_reference(&llvmpipe->sampler_views[shader][start + i],
|
pipe_sampler_view_reference(&llvmpipe->sampler_views[shader][start + i],
|
||||||
views[i]);
|
views[i]);
|
||||||
}
|
}
|
||||||
|
@@ -49,6 +49,11 @@ struct nouveau_screen {
|
|||||||
|
|
||||||
boolean hint_buf_keep_sysmem_copy;
|
boolean hint_buf_keep_sysmem_copy;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
unsigned profiles_checked;
|
||||||
|
unsigned profiles_present;
|
||||||
|
} firmware_info;
|
||||||
|
|
||||||
#ifdef NOUVEAU_ENABLE_DRIVER_STATISTICS
|
#ifdef NOUVEAU_ENABLE_DRIVER_STATISTICS
|
||||||
union {
|
union {
|
||||||
uint64_t v[29];
|
uint64_t v[29];
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
@@ -350,6 +351,77 @@ nouveau_vp3_load_firmware(struct nouveau_vp3_decoder *dec,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
firmware_present(struct pipe_screen *pscreen, enum pipe_video_profile profile)
|
||||||
|
{
|
||||||
|
struct nouveau_screen *screen = nouveau_screen(pscreen);
|
||||||
|
int chipset = screen->device->chipset;
|
||||||
|
int vp3 = chipset < 0xa3 || chipset == 0xaa || chipset == 0xac;
|
||||||
|
int vp5 = chipset >= 0xd0;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/* For all chipsets, try to create a BSP objects. Assume that if firmware
|
||||||
|
* is present for it, firmware is also present for VP/PPP */
|
||||||
|
if (!(screen->firmware_info.profiles_checked & 1)) {
|
||||||
|
struct nouveau_object *channel = NULL, *bsp = NULL;
|
||||||
|
struct nv04_fifo nv04_data = {.vram = 0xbeef0201, .gart = 0xbeef0202};
|
||||||
|
struct nvc0_fifo nvc0_args = {};
|
||||||
|
struct nve0_fifo nve0_args = {.engine = NVE0_FIFO_ENGINE_BSP};
|
||||||
|
void *data = NULL;
|
||||||
|
int size, oclass;
|
||||||
|
if (chipset < 0xc0)
|
||||||
|
oclass = 0x85b1;
|
||||||
|
else if (chipset < 0xe0)
|
||||||
|
oclass = 0x90b1;
|
||||||
|
else
|
||||||
|
oclass = 0x95b1;
|
||||||
|
|
||||||
|
if (chipset < 0xc0) {
|
||||||
|
data = &nv04_data;
|
||||||
|
size = sizeof(nv04_data);
|
||||||
|
} else if (chipset < 0xe0) {
|
||||||
|
data = &nvc0_args;
|
||||||
|
size = sizeof(nvc0_args);
|
||||||
|
} else {
|
||||||
|
data = &nve0_args;
|
||||||
|
size = sizeof(nve0_args);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* kepler must have its own channel, so just do this for everyone */
|
||||||
|
nouveau_object_new(&screen->device->object, 0,
|
||||||
|
NOUVEAU_FIFO_CHANNEL_CLASS,
|
||||||
|
data, size, &channel);
|
||||||
|
|
||||||
|
if (channel) {
|
||||||
|
nouveau_object_new(channel, 0, oclass, NULL, 0, &bsp);
|
||||||
|
if (bsp)
|
||||||
|
screen->firmware_info.profiles_present |= 1;
|
||||||
|
nouveau_object_del(&bsp);
|
||||||
|
nouveau_object_del(&channel);
|
||||||
|
}
|
||||||
|
screen->firmware_info.profiles_checked |= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(screen->firmware_info.profiles_present & 1))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* For vp3/vp4 chipsets, make sure that the relevant firmware is present */
|
||||||
|
if (!vp5 && !(screen->firmware_info.profiles_checked & (1 << profile))) {
|
||||||
|
char path[PATH_MAX];
|
||||||
|
struct stat s;
|
||||||
|
if (vp3)
|
||||||
|
vp3_getpath(profile, path);
|
||||||
|
else
|
||||||
|
vp4_getpath(profile, path);
|
||||||
|
ret = stat(path, &s);
|
||||||
|
if (!ret && s.st_size > 1000)
|
||||||
|
screen->firmware_info.profiles_present |= (1 << profile);
|
||||||
|
screen->firmware_info.profiles_checked |= (1 << profile);
|
||||||
|
}
|
||||||
|
|
||||||
|
return vp5 || (screen->firmware_info.profiles_present & (1 << profile));
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen,
|
nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen,
|
||||||
enum pipe_video_profile profile,
|
enum pipe_video_profile profile,
|
||||||
@@ -363,8 +435,10 @@ nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen,
|
|||||||
switch (param) {
|
switch (param) {
|
||||||
case PIPE_VIDEO_CAP_SUPPORTED:
|
case PIPE_VIDEO_CAP_SUPPORTED:
|
||||||
/* VP3 does not support MPEG4, VP4+ do. */
|
/* VP3 does not support MPEG4, VP4+ do. */
|
||||||
return profile >= PIPE_VIDEO_PROFILE_MPEG1 && (
|
return entrypoint == PIPE_VIDEO_ENTRYPOINT_BITSTREAM &&
|
||||||
!vp3 || codec != PIPE_VIDEO_FORMAT_MPEG4);
|
profile >= PIPE_VIDEO_PROFILE_MPEG1 &&
|
||||||
|
(!vp3 || codec != PIPE_VIDEO_FORMAT_MPEG4) &&
|
||||||
|
firmware_present(pscreen, profile);
|
||||||
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
|
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
|
||||||
return 1;
|
return 1;
|
||||||
case PIPE_VIDEO_CAP_MAX_WIDTH:
|
case PIPE_VIDEO_CAP_MAX_WIDTH:
|
||||||
|
@@ -218,7 +218,7 @@ nv30_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
|
|||||||
case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH:
|
case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH:
|
||||||
return 0;
|
return 0;
|
||||||
case PIPE_SHADER_CAP_MAX_INPUTS:
|
case PIPE_SHADER_CAP_MAX_INPUTS:
|
||||||
return (eng3d->oclass >= NV40_3D_CLASS) ? 12 : 10;
|
return 8; /* should be possible to do 10 with nv4x */
|
||||||
case PIPE_SHADER_CAP_MAX_CONSTS:
|
case PIPE_SHADER_CAP_MAX_CONSTS:
|
||||||
return (eng3d->oclass >= NV40_3D_CLASS) ? 224 : 32;
|
return (eng3d->oclass >= NV40_3D_CLASS) ? 224 : 32;
|
||||||
case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
|
case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
|
||||||
@@ -298,10 +298,16 @@ nv30_screen_destroy(struct pipe_screen *pscreen)
|
|||||||
{
|
{
|
||||||
struct nv30_screen *screen = nv30_screen(pscreen);
|
struct nv30_screen *screen = nv30_screen(pscreen);
|
||||||
|
|
||||||
if (screen->base.fence.current &&
|
if (screen->base.fence.current) {
|
||||||
screen->base.fence.current->state >= NOUVEAU_FENCE_STATE_EMITTED) {
|
struct nouveau_fence *current = NULL;
|
||||||
nouveau_fence_wait(screen->base.fence.current);
|
|
||||||
nouveau_fence_ref (NULL, &screen->base.fence.current);
|
/* 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);
|
nouveau_object_del(&screen->query);
|
||||||
|
@@ -114,6 +114,8 @@ nv50_destroy(struct pipe_context *pipe)
|
|||||||
draw_destroy(nv50->draw);
|
draw_destroy(nv50->draw);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
FREE(nv50->blit);
|
||||||
|
|
||||||
nouveau_context_destroy(&nv50->base);
|
nouveau_context_destroy(&nv50->base);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,7 +165,7 @@ nv50_invalidate_resource_storage(struct nouveau_context *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (res->bind & PIPE_BIND_SAMPLER_VIEW) {
|
if (res->bind & PIPE_BIND_SAMPLER_VIEW) {
|
||||||
for (s = 0; s < 5; ++s) {
|
for (s = 0; s < 3; ++s) {
|
||||||
for (i = 0; i < nv50->num_textures[s]; ++i) {
|
for (i = 0; i < nv50->num_textures[s]; ++i) {
|
||||||
if (nv50->textures[s][i] &&
|
if (nv50->textures[s][i] &&
|
||||||
nv50->textures[s][i]->texture == res) {
|
nv50->textures[s][i]->texture == res) {
|
||||||
@@ -177,7 +179,7 @@ nv50_invalidate_resource_storage(struct nouveau_context *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (res->bind & PIPE_BIND_CONSTANT_BUFFER) {
|
if (res->bind & PIPE_BIND_CONSTANT_BUFFER) {
|
||||||
for (s = 0; s < 5; ++s) {
|
for (s = 0; s < 3; ++s) {
|
||||||
for (i = 0; i < nv50->num_vtxbufs; ++i) {
|
for (i = 0; i < nv50->num_vtxbufs; ++i) {
|
||||||
if (!nv50->constbuf[s][i].user &&
|
if (!nv50->constbuf[s][i].user &&
|
||||||
nv50->constbuf[s][i].u.buf == res) {
|
nv50->constbuf[s][i].u.buf == res) {
|
||||||
|
@@ -283,8 +283,15 @@ nv50_screen_destroy(struct pipe_screen *pscreen)
|
|||||||
struct nv50_screen *screen = nv50_screen(pscreen);
|
struct nv50_screen *screen = nv50_screen(pscreen);
|
||||||
|
|
||||||
if (screen->base.fence.current) {
|
if (screen->base.fence.current) {
|
||||||
nouveau_fence_wait(screen->base.fence.current);
|
struct nouveau_fence *current = NULL;
|
||||||
nouveau_fence_ref (NULL, &screen->base.fence.current);
|
|
||||||
|
/* 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)
|
if (screen->base.pushbuf)
|
||||||
screen->base.pushbuf->user_priv = NULL;
|
screen->base.pushbuf->user_priv = NULL;
|
||||||
|
@@ -935,6 +935,7 @@ nv50_blit_3d(struct nv50_context *nv50, const struct pipe_blit_info *info)
|
|||||||
float x0, x1, y0, y1, z;
|
float x0, x1, y0, y1, z;
|
||||||
float dz;
|
float dz;
|
||||||
float x_range, y_range;
|
float x_range, y_range;
|
||||||
|
float tri_x, tri_y;
|
||||||
|
|
||||||
blit->mode = nv50_blit_select_mode(info);
|
blit->mode = nv50_blit_select_mode(info);
|
||||||
blit->color_mask = nv50_blit_derive_color_mask(info);
|
blit->color_mask = nv50_blit_derive_color_mask(info);
|
||||||
@@ -954,11 +955,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;
|
x_range = (float)info->src.box.width / (float)info->dst.box.width;
|
||||||
y_range = (float)info->src.box.height / (float)info->dst.box.height;
|
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;
|
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;
|
y0 = (float)info->src.box.y - y_range * (float)info->dst.box.y;
|
||||||
|
|
||||||
x1 = x0 + 16384.0f * x_range;
|
x1 = x0 + tri_x * x_range;
|
||||||
y1 = y0 + 16384.0f * y_range;
|
y1 = y0 + tri_y * y_range;
|
||||||
|
|
||||||
x0 *= (float)(1 << nv50_miptree(src)->ms_x);
|
x0 *= (float)(1 << nv50_miptree(src)->ms_x);
|
||||||
x1 *= (float)(1 << nv50_miptree(src)->ms_x);
|
x1 *= (float)(1 << nv50_miptree(src)->ms_x);
|
||||||
@@ -1027,7 +1031,7 @@ nv50_blit_3d(struct nv50_context *nv50, const struct pipe_blit_info *info)
|
|||||||
PUSH_DATAf(push, y0);
|
PUSH_DATAf(push, y0);
|
||||||
PUSH_DATAf(push, z);
|
PUSH_DATAf(push, z);
|
||||||
BEGIN_NV04(push, NV50_3D(VTX_ATTR_2F_X(0)), 2);
|
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);
|
PUSH_DATAf(push, 0.0f);
|
||||||
BEGIN_NV04(push, NV50_3D(VTX_ATTR_3F_X(1)), 3);
|
BEGIN_NV04(push, NV50_3D(VTX_ATTR_3F_X(1)), 3);
|
||||||
PUSH_DATAf(push, x0);
|
PUSH_DATAf(push, x0);
|
||||||
@@ -1035,7 +1039,7 @@ nv50_blit_3d(struct nv50_context *nv50, const struct pipe_blit_info *info)
|
|||||||
PUSH_DATAf(push, z);
|
PUSH_DATAf(push, z);
|
||||||
BEGIN_NV04(push, NV50_3D(VTX_ATTR_2F_X(0)), 2);
|
BEGIN_NV04(push, NV50_3D(VTX_ATTR_2F_X(0)), 2);
|
||||||
PUSH_DATAf(push, 0.0f);
|
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);
|
BEGIN_NV04(push, NV50_3D(VERTEX_END_GL), 1);
|
||||||
PUSH_DATA (push, 0);
|
PUSH_DATA (push, 0);
|
||||||
}
|
}
|
||||||
|
@@ -278,7 +278,7 @@ nv50_miptree_transfer_map(struct pipe_context *pctx,
|
|||||||
|
|
||||||
if (util_format_is_plain(res->format)) {
|
if (util_format_is_plain(res->format)) {
|
||||||
tx->nblocksx = box->width << mt->ms_x;
|
tx->nblocksx = box->width << mt->ms_x;
|
||||||
tx->nblocksy = box->height << mt->ms_x;
|
tx->nblocksy = box->height << mt->ms_y;
|
||||||
} else {
|
} else {
|
||||||
tx->nblocksx = util_format_get_nblocksx(res->format, box->width);
|
tx->nblocksx = util_format_get_nblocksx(res->format, box->width);
|
||||||
tx->nblocksy = util_format_get_nblocksy(res->format, box->height);
|
tx->nblocksy = util_format_get_nblocksy(res->format, box->height);
|
||||||
|
@@ -741,16 +741,80 @@ error:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define FIRMWARE_BSP_KERN 0x01
|
||||||
|
#define FIRMWARE_VP_KERN 0x02
|
||||||
|
#define FIRMWARE_BSP_H264 0x04
|
||||||
|
#define FIRMWARE_VP_MPEG2 0x08
|
||||||
|
#define FIRMWARE_VP_H264_1 0x10
|
||||||
|
#define FIRMWARE_VP_H264_2 0x20
|
||||||
|
#define FIRMWARE_PRESENT(val, fw) (val & FIRMWARE_ ## fw)
|
||||||
|
|
||||||
|
static int
|
||||||
|
firmware_present(struct pipe_screen *pscreen, enum pipe_video_format codec)
|
||||||
|
{
|
||||||
|
struct nouveau_screen *screen = nouveau_screen(pscreen);
|
||||||
|
struct nouveau_object *obj = NULL;
|
||||||
|
struct stat s;
|
||||||
|
int checked = screen->firmware_info.profiles_checked;
|
||||||
|
int present, ret;
|
||||||
|
|
||||||
|
if (!FIRMWARE_PRESENT(checked, VP_KERN)) {
|
||||||
|
nouveau_object_new(screen->channel, 0, 0x7476, NULL, 0, &obj);
|
||||||
|
if (obj)
|
||||||
|
screen->firmware_info.profiles_present |= FIRMWARE_VP_KERN;
|
||||||
|
nouveau_object_del(&obj);
|
||||||
|
screen->firmware_info.profiles_checked |= FIRMWARE_VP_KERN;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC) {
|
||||||
|
if (!FIRMWARE_PRESENT(checked, BSP_KERN)) {
|
||||||
|
nouveau_object_new(screen->channel, 0, 0x74b0, NULL, 0, &obj);
|
||||||
|
if (obj)
|
||||||
|
screen->firmware_info.profiles_present |= FIRMWARE_BSP_KERN;
|
||||||
|
nouveau_object_del(&obj);
|
||||||
|
screen->firmware_info.profiles_checked |= FIRMWARE_BSP_KERN;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!FIRMWARE_PRESENT(checked, VP_H264_1)) {
|
||||||
|
ret = stat("/lib/firmware/nouveau/nv84_vp-h264-1", &s);
|
||||||
|
if (!ret && s.st_size > 1000)
|
||||||
|
screen->firmware_info.profiles_present |= FIRMWARE_VP_H264_1;
|
||||||
|
screen->firmware_info.profiles_checked |= FIRMWARE_VP_H264_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* should probably check the others, but assume that 1 means all */
|
||||||
|
|
||||||
|
present = screen->firmware_info.profiles_present;
|
||||||
|
return FIRMWARE_PRESENT(present, VP_KERN) &&
|
||||||
|
FIRMWARE_PRESENT(present, BSP_KERN) &&
|
||||||
|
FIRMWARE_PRESENT(present, VP_H264_1);
|
||||||
|
} else {
|
||||||
|
if (!FIRMWARE_PRESENT(checked, VP_MPEG2)) {
|
||||||
|
ret = stat("/lib/firmware/nouveau/nv84_vp-mpeg12", &s);
|
||||||
|
if (!ret && s.st_size > 1000)
|
||||||
|
screen->firmware_info.profiles_present |= FIRMWARE_VP_MPEG2;
|
||||||
|
screen->firmware_info.profiles_checked |= FIRMWARE_VP_MPEG2;
|
||||||
|
}
|
||||||
|
present = screen->firmware_info.profiles_present;
|
||||||
|
return FIRMWARE_PRESENT(present, VP_KERN) &&
|
||||||
|
FIRMWARE_PRESENT(present, VP_MPEG2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
nv84_screen_get_video_param(struct pipe_screen *pscreen,
|
nv84_screen_get_video_param(struct pipe_screen *pscreen,
|
||||||
enum pipe_video_profile profile,
|
enum pipe_video_profile profile,
|
||||||
enum pipe_video_entrypoint entrypoint,
|
enum pipe_video_entrypoint entrypoint,
|
||||||
enum pipe_video_cap param)
|
enum pipe_video_cap param)
|
||||||
{
|
{
|
||||||
|
enum pipe_video_format codec;
|
||||||
|
|
||||||
switch (param) {
|
switch (param) {
|
||||||
case PIPE_VIDEO_CAP_SUPPORTED:
|
case PIPE_VIDEO_CAP_SUPPORTED:
|
||||||
return u_reduce_video_profile(profile) == PIPE_VIDEO_FORMAT_MPEG4_AVC ||
|
codec = u_reduce_video_profile(profile);
|
||||||
u_reduce_video_profile(profile) == PIPE_VIDEO_FORMAT_MPEG12;
|
return (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC ||
|
||||||
|
codec == PIPE_VIDEO_FORMAT_MPEG12) &&
|
||||||
|
firmware_present(pscreen, codec);
|
||||||
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
|
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
|
||||||
return 1;
|
return 1;
|
||||||
case PIPE_VIDEO_CAP_MAX_WIDTH:
|
case PIPE_VIDEO_CAP_MAX_WIDTH:
|
||||||
|
@@ -331,7 +331,14 @@ nvc0_screen_destroy(struct pipe_screen *pscreen)
|
|||||||
struct nvc0_screen *screen = nvc0_screen(pscreen);
|
struct nvc0_screen *screen = nvc0_screen(pscreen);
|
||||||
|
|
||||||
if (screen->base.fence.current) {
|
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);
|
nouveau_fence_ref(NULL, &screen->base.fence.current);
|
||||||
}
|
}
|
||||||
if (screen->base.pushbuf)
|
if (screen->base.pushbuf)
|
||||||
|
@@ -204,6 +204,8 @@ void *evergreen_create_compute_state(
|
|||||||
const unsigned char * code;
|
const unsigned char * code;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
|
shader->llvm_ctx = LLVMContextCreate();
|
||||||
|
|
||||||
COMPUTE_DBG(ctx->screen, "*** evergreen_create_compute_state\n");
|
COMPUTE_DBG(ctx->screen, "*** evergreen_create_compute_state\n");
|
||||||
|
|
||||||
header = cso->prog;
|
header = cso->prog;
|
||||||
@@ -216,13 +218,14 @@ void *evergreen_create_compute_state(
|
|||||||
shader->input_size = cso->req_input_mem;
|
shader->input_size = cso->req_input_mem;
|
||||||
|
|
||||||
#ifdef HAVE_OPENCL
|
#ifdef HAVE_OPENCL
|
||||||
shader->num_kernels = radeon_llvm_get_num_kernels(code, header->num_bytes);
|
shader->num_kernels = radeon_llvm_get_num_kernels(shader->llvm_ctx, code,
|
||||||
|
header->num_bytes);
|
||||||
shader->kernels = CALLOC(sizeof(struct r600_kernel), shader->num_kernels);
|
shader->kernels = CALLOC(sizeof(struct r600_kernel), shader->num_kernels);
|
||||||
|
|
||||||
for (i = 0; i < shader->num_kernels; i++) {
|
for (i = 0; i < shader->num_kernels; i++) {
|
||||||
struct r600_kernel *kernel = &shader->kernels[i];
|
struct r600_kernel *kernel = &shader->kernels[i];
|
||||||
kernel->llvm_module = radeon_llvm_get_kernel_module(i, code,
|
kernel->llvm_module = radeon_llvm_get_kernel_module(shader->llvm_ctx, i,
|
||||||
header->num_bytes);
|
code, header->num_bytes);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return shader;
|
return shader;
|
||||||
@@ -232,7 +235,18 @@ void evergreen_delete_compute_state(struct pipe_context *ctx, void* state)
|
|||||||
{
|
{
|
||||||
struct r600_pipe_compute *shader = (struct r600_pipe_compute *)state;
|
struct r600_pipe_compute *shader = (struct r600_pipe_compute *)state;
|
||||||
|
|
||||||
free(shader);
|
if (!shader)
|
||||||
|
return;
|
||||||
|
|
||||||
|
FREE(shader->kernels);
|
||||||
|
|
||||||
|
#ifdef HAVE_OPENCL
|
||||||
|
if (shader->llvm_ctx){
|
||||||
|
LLVMContextDispose(shader->llvm_ctx);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
FREE(shader);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void evergreen_bind_compute_state(struct pipe_context *ctx_, void *state)
|
static void evergreen_bind_compute_state(struct pipe_context *ctx_, void *state)
|
||||||
@@ -475,7 +489,14 @@ static void compute_emit_cs(struct r600_context *ctx, const uint *block_layout,
|
|||||||
ctx->b.flags = 0;
|
ctx->b.flags = 0;
|
||||||
|
|
||||||
if (ctx->b.chip_class >= CAYMAN) {
|
if (ctx->b.chip_class >= CAYMAN) {
|
||||||
ctx->skip_surface_sync_on_next_cs_flush = true;
|
cs->buf[cs->cdw++] = PKT3(PKT3_EVENT_WRITE, 0, 0);
|
||||||
|
cs->buf[cs->cdw++] = EVENT_TYPE(EVENT_TYPE_CS_PARTIAL_FLUSH) | EVENT_INDEX(4);
|
||||||
|
/* DEALLOC_STATE prevents the GPU from hanging when a
|
||||||
|
* SURFACE_SYNC packet is emitted some time after a DISPATCH_DIRECT
|
||||||
|
* with any of the CB*_DEST_BASE_ENA or DB_DEST_BASE_ENA bits set.
|
||||||
|
*/
|
||||||
|
cs->buf[cs->cdw++] = PKT3C(PKT3_DEALLOC_STATE, 0, 0);
|
||||||
|
cs->buf[cs->cdw++] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@@ -47,6 +47,10 @@ struct r600_pipe_compute {
|
|||||||
unsigned private_size;
|
unsigned private_size;
|
||||||
unsigned input_size;
|
unsigned input_size;
|
||||||
struct r600_resource *kernel_param;
|
struct r600_resource *kernel_param;
|
||||||
|
|
||||||
|
#ifdef HAVE_OPENCL
|
||||||
|
LLVMContextRef llvm_ctx;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct r600_resource* r600_compute_buffer_alloc_vram(struct r600_screen *screen, unsigned size);
|
struct r600_resource* r600_compute_buffer_alloc_vram(struct r600_screen *screen, unsigned size);
|
||||||
|
@@ -63,6 +63,7 @@
|
|||||||
#define R600_TEXEL_PITCH_ALIGNMENT_MASK 0x7
|
#define R600_TEXEL_PITCH_ALIGNMENT_MASK 0x7
|
||||||
|
|
||||||
#define PKT3_NOP 0x10
|
#define PKT3_NOP 0x10
|
||||||
|
#define PKT3_DEALLOC_STATE 0x14
|
||||||
#define PKT3_DISPATCH_DIRECT 0x15
|
#define PKT3_DISPATCH_DIRECT 0x15
|
||||||
#define PKT3_DISPATCH_INDIRECT 0x16
|
#define PKT3_DISPATCH_INDIRECT 0x16
|
||||||
#define PKT3_INDIRECT_BUFFER_END 0x17
|
#define PKT3_INDIRECT_BUFFER_END 0x17
|
||||||
|
@@ -293,7 +293,7 @@ void r600_flush_emit(struct r600_context *rctx)
|
|||||||
S_0085F0_SMX_ACTION_ENA(1);
|
S_0085F0_SMX_ACTION_ENA(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cp_coher_cntl && !rctx->skip_surface_sync_on_next_cs_flush) {
|
if (cp_coher_cntl) {
|
||||||
cs->buf[cs->cdw++] = PKT3(PKT3_SURFACE_SYNC, 3, 0);
|
cs->buf[cs->cdw++] = PKT3(PKT3_SURFACE_SYNC, 3, 0);
|
||||||
cs->buf[cs->cdw++] = cp_coher_cntl; /* CP_COHER_CNTL */
|
cs->buf[cs->cdw++] = cp_coher_cntl; /* CP_COHER_CNTL */
|
||||||
cs->buf[cs->cdw++] = 0xffffffff; /* CP_COHER_SIZE */
|
cs->buf[cs->cdw++] = 0xffffffff; /* CP_COHER_SIZE */
|
||||||
@@ -354,8 +354,6 @@ void r600_context_flush(struct r600_context *ctx, unsigned flags)
|
|||||||
|
|
||||||
/* Flush the CS. */
|
/* Flush the CS. */
|
||||||
ctx->b.ws->cs_flush(ctx->b.rings.gfx.cs, flags, ctx->screen->cs_count++);
|
ctx->b.ws->cs_flush(ctx->b.rings.gfx.cs, flags, ctx->screen->cs_count++);
|
||||||
|
|
||||||
ctx->skip_surface_sync_on_next_cs_flush = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void r600_begin_new_cs(struct r600_context *ctx)
|
void r600_begin_new_cs(struct r600_context *ctx)
|
||||||
|
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
static const struct debug_named_value r600_debug_options[] = {
|
static const struct debug_named_value r600_debug_options[] = {
|
||||||
/* features */
|
/* features */
|
||||||
{ "nohyperz", DBG_NO_HYPERZ, "Disable Hyper-Z" },
|
{ "hyperz", DBG_HYPERZ, "Enable Hyper-Z" },
|
||||||
#if defined(R600_USE_LLVM)
|
#if defined(R600_USE_LLVM)
|
||||||
{ "nollvm", DBG_NO_LLVM, "Disable the LLVM shader compiler" },
|
{ "nollvm", DBG_NO_LLVM, "Disable the LLVM shader compiler" },
|
||||||
#endif
|
#endif
|
||||||
@@ -192,12 +192,7 @@ static void r600_destroy_context(struct pipe_context *context)
|
|||||||
|
|
||||||
r600_release_command_buffer(&rctx->start_cs_cmd);
|
r600_release_command_buffer(&rctx->start_cs_cmd);
|
||||||
|
|
||||||
if (rctx->b.rings.gfx.cs) {
|
FREE(rctx->start_compute_cs_cmd.buf);
|
||||||
rctx->b.ws->cs_destroy(rctx->b.rings.gfx.cs);
|
|
||||||
}
|
|
||||||
if (rctx->b.rings.dma.cs) {
|
|
||||||
rctx->b.ws->cs_destroy(rctx->b.rings.dma.cs);
|
|
||||||
}
|
|
||||||
|
|
||||||
r600_common_context_cleanup(&rctx->b);
|
r600_common_context_cleanup(&rctx->b);
|
||||||
FREE(rctx);
|
FREE(rctx);
|
||||||
@@ -418,7 +413,6 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
|
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
|
||||||
case PIPE_CAP_USER_INDEX_BUFFERS:
|
case PIPE_CAP_USER_INDEX_BUFFERS:
|
||||||
case PIPE_CAP_USER_CONSTANT_BUFFERS:
|
case PIPE_CAP_USER_CONSTANT_BUFFERS:
|
||||||
case PIPE_CAP_COMPUTE:
|
|
||||||
case PIPE_CAP_START_INSTANCE:
|
case PIPE_CAP_START_INSTANCE:
|
||||||
case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
|
case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
|
||||||
case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
|
case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
|
||||||
@@ -427,6 +421,9 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_TEXTURE_MULTISAMPLE:
|
case PIPE_CAP_TEXTURE_MULTISAMPLE:
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
case PIPE_CAP_COMPUTE:
|
||||||
|
return rscreen->b.chip_class > R700;
|
||||||
|
|
||||||
case PIPE_CAP_TGSI_TEXCOORD:
|
case PIPE_CAP_TGSI_TEXCOORD:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -897,8 +894,8 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws)
|
|||||||
rscreen->b.debug_flags |= DBG_COMPUTE;
|
rscreen->b.debug_flags |= DBG_COMPUTE;
|
||||||
if (debug_get_bool_option("R600_DUMP_SHADERS", FALSE))
|
if (debug_get_bool_option("R600_DUMP_SHADERS", FALSE))
|
||||||
rscreen->b.debug_flags |= DBG_FS | DBG_VS | DBG_GS | DBG_PS | DBG_CS;
|
rscreen->b.debug_flags |= DBG_FS | DBG_VS | DBG_GS | DBG_PS | DBG_CS;
|
||||||
if (!debug_get_bool_option("R600_HYPERZ", TRUE))
|
if (debug_get_bool_option("R600_HYPERZ", FALSE))
|
||||||
rscreen->b.debug_flags |= DBG_NO_HYPERZ;
|
rscreen->b.debug_flags |= DBG_HYPERZ;
|
||||||
if (!debug_get_bool_option("R600_LLVM", TRUE))
|
if (!debug_get_bool_option("R600_LLVM", TRUE))
|
||||||
rscreen->b.debug_flags |= DBG_NO_LLVM;
|
rscreen->b.debug_flags |= DBG_NO_LLVM;
|
||||||
|
|
||||||
|
@@ -507,16 +507,6 @@ struct r600_context {
|
|||||||
|
|
||||||
void *sb_context;
|
void *sb_context;
|
||||||
struct r600_isa *isa;
|
struct r600_isa *isa;
|
||||||
|
|
||||||
/* Work-around for flushing problems with compute shaders on Cayman:
|
|
||||||
* Emitting a SURFACE_SYNC packet with any of the CB*_DEST_BASE_ENA
|
|
||||||
* or DB_DEST_BASE_ENA bits set after dispatching a compute shader
|
|
||||||
* hangs the GPU.
|
|
||||||
*
|
|
||||||
* Setting this to true will prevent r600_flush_emit() from emitting
|
|
||||||
* a SURFACE_SYNC packet. This field will be cleared by
|
|
||||||
* by r600_context_flush() after flushing the command stream. */
|
|
||||||
boolean skip_surface_sync_on_next_cs_flush;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static INLINE void r600_emit_command_buffer(struct radeon_winsys_cs *cs,
|
static INLINE void r600_emit_command_buffer(struct radeon_winsys_cs *cs,
|
||||||
|
@@ -770,7 +770,6 @@ void bc_finalizer::update_ngpr(unsigned gpr) {
|
|||||||
unsigned bc_finalizer::get_stack_depth(node *n, unsigned &loops,
|
unsigned bc_finalizer::get_stack_depth(node *n, unsigned &loops,
|
||||||
unsigned &ifs, unsigned add) {
|
unsigned &ifs, unsigned add) {
|
||||||
unsigned stack_elements = add;
|
unsigned stack_elements = add;
|
||||||
bool has_non_wqm_push_with_loops_on_stack = false;
|
|
||||||
bool has_non_wqm_push = (add != 0);
|
bool has_non_wqm_push = (add != 0);
|
||||||
region_node *r = n->is_region() ?
|
region_node *r = n->is_region() ?
|
||||||
static_cast<region_node*>(n) : n->get_parent_region();
|
static_cast<region_node*>(n) : n->get_parent_region();
|
||||||
@@ -781,8 +780,6 @@ unsigned bc_finalizer::get_stack_depth(node *n, unsigned &loops,
|
|||||||
while (r) {
|
while (r) {
|
||||||
if (r->is_loop()) {
|
if (r->is_loop()) {
|
||||||
++loops;
|
++loops;
|
||||||
if (has_non_wqm_push)
|
|
||||||
has_non_wqm_push_with_loops_on_stack = true;
|
|
||||||
} else {
|
} else {
|
||||||
++ifs;
|
++ifs;
|
||||||
has_non_wqm_push = true;
|
has_non_wqm_push = true;
|
||||||
@@ -795,15 +792,26 @@ unsigned bc_finalizer::get_stack_depth(node *n, unsigned &loops,
|
|||||||
switch (ctx.hw_class) {
|
switch (ctx.hw_class) {
|
||||||
case HW_CLASS_R600:
|
case HW_CLASS_R600:
|
||||||
case HW_CLASS_R700:
|
case HW_CLASS_R700:
|
||||||
|
// If any non-WQM push is invoked, 2 elements should be reserved.
|
||||||
if (has_non_wqm_push)
|
if (has_non_wqm_push)
|
||||||
stack_elements += 2;
|
stack_elements += 2;
|
||||||
break;
|
break;
|
||||||
case HW_CLASS_CAYMAN:
|
case HW_CLASS_CAYMAN:
|
||||||
|
// If any stack operation is invoked, 2 elements should be reserved
|
||||||
if (stack_elements)
|
if (stack_elements)
|
||||||
stack_elements += 2;
|
stack_elements += 2;
|
||||||
break;
|
break;
|
||||||
case HW_CLASS_EVERGREEN:
|
case HW_CLASS_EVERGREEN:
|
||||||
if (has_non_wqm_push_with_loops_on_stack)
|
// According to the docs we need to reserve 1 element for each of the
|
||||||
|
// following cases:
|
||||||
|
// 1) non-WQM push is used with WQM/LOOP frames on stack
|
||||||
|
// 2) ALU_ELSE_AFTER is used at the point of max stack usage
|
||||||
|
// NOTE:
|
||||||
|
// It was found that the conditions above are not sufficient, there are
|
||||||
|
// other cases where we also need to reserve stack space, that's why
|
||||||
|
// we always reserve 1 stack element if we have non-WQM push on stack.
|
||||||
|
// Condition 2 is ignored for now because we don't use this instruction.
|
||||||
|
if (has_non_wqm_push)
|
||||||
++stack_elements;
|
++stack_elements;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -234,6 +234,13 @@ bool r600_common_context_init(struct r600_common_context *rctx,
|
|||||||
|
|
||||||
void r600_common_context_cleanup(struct r600_common_context *rctx)
|
void r600_common_context_cleanup(struct r600_common_context *rctx)
|
||||||
{
|
{
|
||||||
|
if (rctx->rings.gfx.cs) {
|
||||||
|
rctx->ws->cs_destroy(rctx->rings.gfx.cs);
|
||||||
|
}
|
||||||
|
if (rctx->rings.dma.cs) {
|
||||||
|
rctx->ws->cs_destroy(rctx->rings.dma.cs);
|
||||||
|
}
|
||||||
|
|
||||||
if (rctx->allocator_so_filled_size) {
|
if (rctx->allocator_so_filled_size) {
|
||||||
u_suballocator_destroy(rctx->allocator_so_filled_size);
|
u_suballocator_destroy(rctx->allocator_so_filled_size);
|
||||||
}
|
}
|
||||||
|
@@ -73,7 +73,7 @@
|
|||||||
#define DBG_PS (1 << 11)
|
#define DBG_PS (1 << 11)
|
||||||
#define DBG_CS (1 << 12)
|
#define DBG_CS (1 << 12)
|
||||||
/* features */
|
/* features */
|
||||||
#define DBG_NO_HYPERZ (1 << 13)
|
#define DBG_HYPERZ (1 << 13)
|
||||||
/* The maximum allowed bit is 15. */
|
/* The maximum allowed bit is 15. */
|
||||||
|
|
||||||
struct r600_common_context;
|
struct r600_common_context;
|
||||||
|
@@ -542,7 +542,7 @@ r600_texture_create_object(struct pipe_screen *screen,
|
|||||||
if (rtex->is_depth &&
|
if (rtex->is_depth &&
|
||||||
!(base->flags & (R600_RESOURCE_FLAG_TRANSFER |
|
!(base->flags & (R600_RESOURCE_FLAG_TRANSFER |
|
||||||
R600_RESOURCE_FLAG_FLUSHED_DEPTH)) &&
|
R600_RESOURCE_FLAG_FLUSHED_DEPTH)) &&
|
||||||
!(rscreen->debug_flags & DBG_NO_HYPERZ)) {
|
(rscreen->debug_flags & DBG_HYPERZ)) {
|
||||||
if (rscreen->chip_class >= SI) {
|
if (rscreen->chip_class >= SI) {
|
||||||
/* XXX implement Hyper-Z for SI.
|
/* XXX implement Hyper-Z for SI.
|
||||||
* Reuse the CMASK allocator, which is almost the same as HTILE. */
|
* Reuse the CMASK allocator, which is almost the same as HTILE. */
|
||||||
|
@@ -33,11 +33,10 @@
|
|||||||
#include <llvm-c/Transforms/IPO.h>
|
#include <llvm-c/Transforms/IPO.h>
|
||||||
#include <llvm-c/Transforms/PassManagerBuilder.h>
|
#include <llvm-c/Transforms/PassManagerBuilder.h>
|
||||||
|
|
||||||
LLVMModuleRef radeon_llvm_parse_bitcode(const unsigned char * bitcode,
|
LLVMModuleRef radeon_llvm_parse_bitcode(LLVMContextRef ctx,
|
||||||
unsigned bitcode_len)
|
const unsigned char * bitcode, unsigned bitcode_len)
|
||||||
{
|
{
|
||||||
LLVMMemoryBufferRef buf;
|
LLVMMemoryBufferRef buf;
|
||||||
LLVMContextRef ctx = LLVMContextCreate();
|
|
||||||
LLVMModuleRef module;
|
LLVMModuleRef module;
|
||||||
|
|
||||||
buf = LLVMCreateMemoryBufferWithMemoryRangeCopy((const char*)bitcode,
|
buf = LLVMCreateMemoryBufferWithMemoryRangeCopy((const char*)bitcode,
|
||||||
@@ -47,10 +46,10 @@ LLVMModuleRef radeon_llvm_parse_bitcode(const unsigned char * bitcode,
|
|||||||
return module;
|
return module;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned radeon_llvm_get_num_kernels(const unsigned char *bitcode,
|
unsigned radeon_llvm_get_num_kernels(LLVMContextRef ctx,
|
||||||
unsigned bitcode_len)
|
const unsigned char *bitcode, unsigned bitcode_len)
|
||||||
{
|
{
|
||||||
LLVMModuleRef mod = radeon_llvm_parse_bitcode(bitcode, bitcode_len);
|
LLVMModuleRef mod = radeon_llvm_parse_bitcode(ctx, bitcode, bitcode_len);
|
||||||
return LLVMGetNamedMetadataNumOperands(mod, "opencl.kernels");
|
return LLVMGetNamedMetadataNumOperands(mod, "opencl.kernels");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,9 +84,10 @@ static void radeon_llvm_optimize(LLVMModuleRef mod)
|
|||||||
LLVMRunPassManager(pass_manager, mod);
|
LLVMRunPassManager(pass_manager, mod);
|
||||||
LLVMPassManagerBuilderDispose(builder);
|
LLVMPassManagerBuilderDispose(builder);
|
||||||
LLVMDisposePassManager(pass_manager);
|
LLVMDisposePassManager(pass_manager);
|
||||||
|
LLVMDisposeTargetData(TD);
|
||||||
}
|
}
|
||||||
|
|
||||||
LLVMModuleRef radeon_llvm_get_kernel_module(unsigned index,
|
LLVMModuleRef radeon_llvm_get_kernel_module(LLVMContextRef ctx, unsigned index,
|
||||||
const unsigned char *bitcode, unsigned bitcode_len)
|
const unsigned char *bitcode, unsigned bitcode_len)
|
||||||
{
|
{
|
||||||
LLVMModuleRef mod;
|
LLVMModuleRef mod;
|
||||||
@@ -95,7 +95,7 @@ LLVMModuleRef radeon_llvm_get_kernel_module(unsigned index,
|
|||||||
LLVMValueRef *kernel_metadata;
|
LLVMValueRef *kernel_metadata;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
mod = radeon_llvm_parse_bitcode(bitcode, bitcode_len);
|
mod = radeon_llvm_parse_bitcode(ctx, bitcode, bitcode_len);
|
||||||
num_kernels = LLVMGetNamedMetadataNumOperands(mod, "opencl.kernels");
|
num_kernels = LLVMGetNamedMetadataNumOperands(mod, "opencl.kernels");
|
||||||
kernel_metadata = MALLOC(num_kernels * sizeof(LLVMValueRef));
|
kernel_metadata = MALLOC(num_kernels * sizeof(LLVMValueRef));
|
||||||
LLVMGetNamedMetadataOperands(mod, "opencl.kernels", kernel_metadata);
|
LLVMGetNamedMetadataOperands(mod, "opencl.kernels", kernel_metadata);
|
||||||
|
@@ -29,10 +29,11 @@
|
|||||||
|
|
||||||
#include <llvm-c/Core.h>
|
#include <llvm-c/Core.h>
|
||||||
|
|
||||||
LLVMModuleRef radeon_llvm_parse_bitcode(const unsigned char * bitcode,
|
LLVMModuleRef radeon_llvm_parse_bitcode(LLVMContextRef ctx,
|
||||||
unsigned bitcode_len);
|
const unsigned char * bitcode, unsigned bitcode_len);
|
||||||
unsigned radeon_llvm_get_num_kernels(const unsigned char *bitcode, unsigned bitcode_len);
|
unsigned radeon_llvm_get_num_kernels(LLVMContextRef ctx,
|
||||||
LLVMModuleRef radeon_llvm_get_kernel_module(unsigned index,
|
const unsigned char *bitcode, unsigned bitcode_len);
|
||||||
|
LLVMModuleRef radeon_llvm_get_kernel_module(LLVMContextRef ctx, unsigned index,
|
||||||
const unsigned char *bitcode, unsigned bitcode_len);
|
const unsigned char *bitcode, unsigned bitcode_len);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -58,6 +58,9 @@
|
|||||||
#define NUM_H264_REFS 17
|
#define NUM_H264_REFS 17
|
||||||
#define NUM_VC1_REFS 5
|
#define NUM_VC1_REFS 5
|
||||||
|
|
||||||
|
#define FB_BUFFER_OFFSET 0x1000
|
||||||
|
#define FB_BUFFER_SIZE 2048
|
||||||
|
|
||||||
/* UVD buffer representation */
|
/* UVD buffer representation */
|
||||||
struct ruvd_buffer
|
struct ruvd_buffer
|
||||||
{
|
{
|
||||||
@@ -81,6 +84,7 @@ struct ruvd_decoder {
|
|||||||
|
|
||||||
struct ruvd_buffer msg_fb_buffers[NUM_BUFFERS];
|
struct ruvd_buffer msg_fb_buffers[NUM_BUFFERS];
|
||||||
struct ruvd_msg *msg;
|
struct ruvd_msg *msg;
|
||||||
|
uint32_t *fb;
|
||||||
|
|
||||||
struct ruvd_buffer bs_buffers[NUM_BUFFERS];
|
struct ruvd_buffer bs_buffers[NUM_BUFFERS];
|
||||||
void* bs_ptr;
|
void* bs_ptr;
|
||||||
@@ -131,16 +135,21 @@ static void send_cmd(struct ruvd_decoder *dec, unsigned cmd,
|
|||||||
set_reg(dec, RUVD_GPCOM_VCPU_CMD, cmd << 1);
|
set_reg(dec, RUVD_GPCOM_VCPU_CMD, cmd << 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* map the next available message buffer */
|
/* map the next available message/feedback buffer */
|
||||||
static void map_msg_buf(struct ruvd_decoder *dec)
|
static void map_msg_fb_buf(struct ruvd_decoder *dec)
|
||||||
{
|
{
|
||||||
struct ruvd_buffer* buf;
|
struct ruvd_buffer* buf;
|
||||||
|
uint8_t *ptr;
|
||||||
|
|
||||||
/* grap the current message buffer */
|
/* grab the current message/feedback buffer */
|
||||||
buf = &dec->msg_fb_buffers[dec->cur_buffer];
|
buf = &dec->msg_fb_buffers[dec->cur_buffer];
|
||||||
|
|
||||||
/* copy the message into it */
|
/* and map it for CPU access */
|
||||||
dec->msg = dec->ws->buffer_map(buf->cs_handle, dec->cs, PIPE_TRANSFER_WRITE);
|
ptr = dec->ws->buffer_map(buf->cs_handle, dec->cs, PIPE_TRANSFER_WRITE);
|
||||||
|
|
||||||
|
/* calc buffer offsets */
|
||||||
|
dec->msg = (struct ruvd_msg *)ptr;
|
||||||
|
dec->fb = (uint32_t *)(ptr + FB_BUFFER_OFFSET);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* unmap and send a message command to the VCPU */
|
/* unmap and send a message command to the VCPU */
|
||||||
@@ -148,8 +157,8 @@ static void send_msg_buf(struct ruvd_decoder *dec)
|
|||||||
{
|
{
|
||||||
struct ruvd_buffer* buf;
|
struct ruvd_buffer* buf;
|
||||||
|
|
||||||
/* ignore the request if message buffer isn't mapped */
|
/* ignore the request if message/feedback buffer isn't mapped */
|
||||||
if (!dec->msg)
|
if (!dec->msg || !dec->fb)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* grap the current message buffer */
|
/* grap the current message buffer */
|
||||||
@@ -157,6 +166,8 @@ static void send_msg_buf(struct ruvd_decoder *dec)
|
|||||||
|
|
||||||
/* unmap the buffer */
|
/* unmap the buffer */
|
||||||
dec->ws->buffer_unmap(buf->cs_handle);
|
dec->ws->buffer_unmap(buf->cs_handle);
|
||||||
|
dec->msg = NULL;
|
||||||
|
dec->fb = NULL;
|
||||||
|
|
||||||
/* and send it to the hardware */
|
/* and send it to the hardware */
|
||||||
send_cmd(dec, RUVD_CMD_MSG_BUFFER, buf->cs_handle, 0,
|
send_cmd(dec, RUVD_CMD_MSG_BUFFER, buf->cs_handle, 0,
|
||||||
@@ -644,7 +655,7 @@ static void ruvd_destroy(struct pipe_video_codec *decoder)
|
|||||||
|
|
||||||
assert(decoder);
|
assert(decoder);
|
||||||
|
|
||||||
map_msg_buf(dec);
|
map_msg_fb_buf(dec);
|
||||||
memset(dec->msg, 0, sizeof(*dec->msg));
|
memset(dec->msg, 0, sizeof(*dec->msg));
|
||||||
dec->msg->size = sizeof(*dec->msg);
|
dec->msg->size = sizeof(*dec->msg);
|
||||||
dec->msg->msg_type = RUVD_MSG_DESTROY;
|
dec->msg->msg_type = RUVD_MSG_DESTROY;
|
||||||
@@ -773,7 +784,7 @@ static void ruvd_end_frame(struct pipe_video_codec *decoder,
|
|||||||
memset(dec->bs_ptr, 0, bs_size - dec->bs_size);
|
memset(dec->bs_ptr, 0, bs_size - dec->bs_size);
|
||||||
dec->ws->buffer_unmap(bs_buf->cs_handle);
|
dec->ws->buffer_unmap(bs_buf->cs_handle);
|
||||||
|
|
||||||
map_msg_buf(dec);
|
map_msg_fb_buf(dec);
|
||||||
dec->msg->size = sizeof(*dec->msg);
|
dec->msg->size = sizeof(*dec->msg);
|
||||||
dec->msg->msg_type = RUVD_MSG_DECODE;
|
dec->msg->msg_type = RUVD_MSG_DECODE;
|
||||||
dec->msg->stream_handle = dec->stream_handle;
|
dec->msg->stream_handle = dec->stream_handle;
|
||||||
@@ -813,6 +824,10 @@ static void ruvd_end_frame(struct pipe_video_codec *decoder,
|
|||||||
|
|
||||||
dec->msg->body.decode.db_surf_tile_config = dec->msg->body.decode.dt_surf_tile_config;
|
dec->msg->body.decode.db_surf_tile_config = dec->msg->body.decode.dt_surf_tile_config;
|
||||||
dec->msg->body.decode.extension_support = 0x1;
|
dec->msg->body.decode.extension_support = 0x1;
|
||||||
|
|
||||||
|
/* set at least the feedback buffer size */
|
||||||
|
dec->fb[0] = FB_BUFFER_SIZE;
|
||||||
|
|
||||||
send_msg_buf(dec);
|
send_msg_buf(dec);
|
||||||
|
|
||||||
send_cmd(dec, RUVD_CMD_DPB_BUFFER, dec->dpb.cs_handle, 0,
|
send_cmd(dec, RUVD_CMD_DPB_BUFFER, dec->dpb.cs_handle, 0,
|
||||||
@@ -822,7 +837,7 @@ static void ruvd_end_frame(struct pipe_video_codec *decoder,
|
|||||||
send_cmd(dec, RUVD_CMD_DECODING_TARGET_BUFFER, dt, 0,
|
send_cmd(dec, RUVD_CMD_DECODING_TARGET_BUFFER, dt, 0,
|
||||||
RADEON_USAGE_WRITE, RADEON_DOMAIN_VRAM);
|
RADEON_USAGE_WRITE, RADEON_DOMAIN_VRAM);
|
||||||
send_cmd(dec, RUVD_CMD_FEEDBACK_BUFFER, msg_fb_buf->cs_handle,
|
send_cmd(dec, RUVD_CMD_FEEDBACK_BUFFER, msg_fb_buf->cs_handle,
|
||||||
0x1000, RADEON_USAGE_WRITE, RADEON_DOMAIN_GTT);
|
FB_BUFFER_OFFSET, RADEON_USAGE_WRITE, RADEON_DOMAIN_GTT);
|
||||||
set_reg(dec, RUVD_ENGINE_CNTL, 1);
|
set_reg(dec, RUVD_ENGINE_CNTL, 1);
|
||||||
|
|
||||||
flush(dec);
|
flush(dec);
|
||||||
@@ -898,7 +913,8 @@ struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context,
|
|||||||
|
|
||||||
bs_buf_size = width * height * 512 / (16 * 16);
|
bs_buf_size = width * height * 512 / (16 * 16);
|
||||||
for (i = 0; i < NUM_BUFFERS; ++i) {
|
for (i = 0; i < NUM_BUFFERS; ++i) {
|
||||||
unsigned msg_fb_size = align(sizeof(struct ruvd_msg), 0x1000) + 0x1000;
|
unsigned msg_fb_size = FB_BUFFER_OFFSET + FB_BUFFER_SIZE;
|
||||||
|
STATIC_ASSERT(sizeof(struct ruvd_msg) <= FB_BUFFER_OFFSET);
|
||||||
if (!create_buffer(dec, &dec->msg_fb_buffers[i], msg_fb_size)) {
|
if (!create_buffer(dec, &dec->msg_fb_buffers[i], msg_fb_size)) {
|
||||||
RUVD_ERR("Can't allocated message buffers.\n");
|
RUVD_ERR("Can't allocated message buffers.\n");
|
||||||
goto error;
|
goto error;
|
||||||
@@ -920,7 +936,7 @@ struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context,
|
|||||||
|
|
||||||
clear_buffer(dec, &dec->dpb);
|
clear_buffer(dec, &dec->dpb);
|
||||||
|
|
||||||
map_msg_buf(dec);
|
map_msg_fb_buf(dec);
|
||||||
dec->msg->size = sizeof(*dec->msg);
|
dec->msg->size = sizeof(*dec->msg);
|
||||||
dec->msg->msg_type = RUVD_MSG_CREATE;
|
dec->msg->msg_type = RUVD_MSG_CREATE;
|
||||||
dec->msg->stream_handle = dec->stream_handle;
|
dec->msg->stream_handle = dec->stream_handle;
|
||||||
|
@@ -20,6 +20,7 @@ struct si_pipe_compute {
|
|||||||
|
|
||||||
struct pipe_resource *global_buffers[MAX_GLOBAL_BUFFERS];
|
struct pipe_resource *global_buffers[MAX_GLOBAL_BUFFERS];
|
||||||
|
|
||||||
|
LLVMContextRef llvm_ctx;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void *radeonsi_create_compute_state(
|
static void *radeonsi_create_compute_state(
|
||||||
@@ -33,6 +34,8 @@ static void *radeonsi_create_compute_state(
|
|||||||
const unsigned char *code;
|
const unsigned char *code;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
|
program->llvm_ctx = LLVMContextCreate();
|
||||||
|
|
||||||
header = cso->prog;
|
header = cso->prog;
|
||||||
code = cso->prog + sizeof(struct pipe_llvm_program_header);
|
code = cso->prog + sizeof(struct pipe_llvm_program_header);
|
||||||
|
|
||||||
@@ -41,13 +44,13 @@ static void *radeonsi_create_compute_state(
|
|||||||
program->private_size = cso->req_private_mem;
|
program->private_size = cso->req_private_mem;
|
||||||
program->input_size = cso->req_input_mem;
|
program->input_size = cso->req_input_mem;
|
||||||
|
|
||||||
program->num_kernels = radeon_llvm_get_num_kernels(code,
|
program->num_kernels = radeon_llvm_get_num_kernels(program->llvm_ctx, code,
|
||||||
header->num_bytes);
|
header->num_bytes);
|
||||||
program->kernels = CALLOC(sizeof(struct si_pipe_shader),
|
program->kernels = CALLOC(sizeof(struct si_pipe_shader),
|
||||||
program->num_kernels);
|
program->num_kernels);
|
||||||
for (i = 0; i < program->num_kernels; i++) {
|
for (i = 0; i < program->num_kernels; i++) {
|
||||||
LLVMModuleRef mod = radeon_llvm_get_kernel_module(i, code,
|
LLVMModuleRef mod = radeon_llvm_get_kernel_module(program->llvm_ctx, i,
|
||||||
header->num_bytes);
|
code, header->num_bytes);
|
||||||
si_compile_llvm(rctx, &program->kernels[i], mod);
|
si_compile_llvm(rctx, &program->kernels[i], mod);
|
||||||
LLVMDisposeModule(mod);
|
LLVMDisposeModule(mod);
|
||||||
}
|
}
|
||||||
@@ -272,6 +275,10 @@ static void si_delete_compute_state(struct pipe_context *ctx, void* state){
|
|||||||
FREE(program->kernels);
|
FREE(program->kernels);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (program->llvm_ctx){
|
||||||
|
LLVMContextDispose(program->llvm_ctx);
|
||||||
|
}
|
||||||
|
|
||||||
//And then free the program itself.
|
//And then free the program itself.
|
||||||
FREE(program);
|
FREE(program);
|
||||||
}
|
}
|
||||||
|
@@ -860,8 +860,8 @@ clamp_colors(float (*quadColor)[4])
|
|||||||
{
|
{
|
||||||
unsigned i, j;
|
unsigned i, j;
|
||||||
|
|
||||||
for (j = 0; j < TGSI_QUAD_SIZE; j++) {
|
for (i = 0; i < 4; i++) {
|
||||||
for (i = 0; i < 4; i++) {
|
for (j = 0; j < TGSI_QUAD_SIZE; j++) {
|
||||||
quadColor[i][j] = CLAMP(quadColor[i][j], 0.0F, 1.0F);
|
quadColor[i][j] = CLAMP(quadColor[i][j], 0.0F, 1.0F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -60,7 +60,7 @@ softpipe_resource_layout(struct pipe_screen *screen,
|
|||||||
unsigned width = pt->width0;
|
unsigned width = pt->width0;
|
||||||
unsigned height = pt->height0;
|
unsigned height = pt->height0;
|
||||||
unsigned depth = pt->depth0;
|
unsigned depth = pt->depth0;
|
||||||
unsigned buffer_size = 0;
|
uint64_t buffer_size = 0;
|
||||||
|
|
||||||
for (level = 0; level <= pt->last_level; level++) {
|
for (level = 0; level <= pt->last_level; level++) {
|
||||||
unsigned slices;
|
unsigned slices;
|
||||||
@@ -76,8 +76,8 @@ softpipe_resource_layout(struct pipe_screen *screen,
|
|||||||
|
|
||||||
spr->level_offset[level] = buffer_size;
|
spr->level_offset[level] = buffer_size;
|
||||||
|
|
||||||
buffer_size += (util_format_get_nblocksy(pt->format, height) *
|
buffer_size += (uint64_t) util_format_get_nblocksy(pt->format, height) *
|
||||||
slices * spr->stride[level]);
|
slices * spr->stride[level];
|
||||||
|
|
||||||
width = u_minify(width, 1);
|
width = u_minify(width, 1);
|
||||||
height = u_minify(height, 1);
|
height = u_minify(height, 1);
|
||||||
|
@@ -90,6 +90,8 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
|
|||||||
if (svga == NULL)
|
if (svga == NULL)
|
||||||
goto no_svga;
|
goto no_svga;
|
||||||
|
|
||||||
|
LIST_INITHEAD(&svga->dirty_buffers);
|
||||||
|
|
||||||
svga->pipe.screen = screen;
|
svga->pipe.screen = screen;
|
||||||
svga->pipe.priv = priv;
|
svga->pipe.priv = priv;
|
||||||
svga->pipe.destroy = svga_destroy;
|
svga->pipe.destroy = svga_destroy;
|
||||||
@@ -155,8 +157,6 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
|
|||||||
|
|
||||||
svga->dirty = ~0;
|
svga->dirty = ~0;
|
||||||
|
|
||||||
LIST_INITHEAD(&svga->dirty_buffers);
|
|
||||||
|
|
||||||
return &svga->pipe;
|
return &svga->pipe;
|
||||||
|
|
||||||
no_state:
|
no_state:
|
||||||
|
@@ -199,15 +199,43 @@ make_fs_key(const struct svga_context *svga,
|
|||||||
if (svga->curr.blend->need_white_fragments) {
|
if (svga->curr.blend->need_white_fragments) {
|
||||||
key->white_fragments = 1;
|
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
|
/* XXX: want to limit this to the textures that the shader actually
|
||||||
* refers to.
|
* refers to.
|
||||||
*
|
*
|
||||||
* SVGA_NEW_TEXTURE_BINDING | SVGA_NEW_SAMPLER
|
* SVGA_NEW_TEXTURE_BINDING | SVGA_NEW_SAMPLER
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < svga->curr.num_sampler_views; i++) {
|
for (i = 0; i < svga->curr.num_sampler_views; i++) {
|
||||||
if (svga->curr.sampler_views[i]) {
|
if (svga->curr.sampler_views[i] && svga->curr.sampler[i]) {
|
||||||
assert(svga->curr.sampler[i]);
|
|
||||||
assert(svga->curr.sampler_views[i]->texture);
|
assert(svga->curr.sampler_views[i]->texture);
|
||||||
key->tex[i].texture_target = svga->curr.sampler_views[i]->texture->target;
|
key->tex[i].texture_target = svga->curr.sampler_views[i]->texture->target;
|
||||||
if (!svga->curr.sampler[i]->normalized_coords) {
|
if (!svga->curr.sampler[i]->normalized_coords) {
|
||||||
|
@@ -85,7 +85,7 @@ update_tss_binding(struct svga_context *svga,
|
|||||||
struct pipe_sampler_view *sv = svga->curr.sampler_views[i];
|
struct pipe_sampler_view *sv = svga->curr.sampler_views[i];
|
||||||
|
|
||||||
/* get min max lod */
|
/* get min max lod */
|
||||||
if (sv) {
|
if (sv && s) {
|
||||||
min_lod = MAX2(0, (s->view_min_lod + sv->u.tex.first_level));
|
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,
|
max_lod = MIN2(s->view_max_lod + sv->u.tex.first_level,
|
||||||
sv->texture->last_level);
|
sv->texture->last_level);
|
||||||
|
@@ -157,6 +157,16 @@
|
|||||||
# define PIPE_ARCH_BIG_ENDIAN
|
# define PIPE_ARCH_BIG_ENDIAN
|
||||||
#endif
|
#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
|
#else
|
||||||
|
|
||||||
#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) || defined(PIPE_ARCH_ARM) || defined(PIPE_ARCH_AARCH64)
|
#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) || defined(PIPE_ARCH_ARM) || defined(PIPE_ARCH_AARCH64)
|
||||||
|
@@ -117,7 +117,6 @@ namespace {
|
|||||||
const std::string &opts, clang::LangAS::Map& address_spaces) {
|
const std::string &opts, clang::LangAS::Map& address_spaces) {
|
||||||
|
|
||||||
clang::CompilerInstance c;
|
clang::CompilerInstance c;
|
||||||
clang::CompilerInvocation invocation;
|
|
||||||
clang::EmitLLVMOnlyAction act(&llvm::getGlobalContext());
|
clang::EmitLLVMOnlyAction act(&llvm::getGlobalContext());
|
||||||
std::string log;
|
std::string log;
|
||||||
llvm::raw_string_ostream s_log(log);
|
llvm::raw_string_ostream s_log(log);
|
||||||
|
@@ -360,6 +360,12 @@ dri_destroy_option_cache(struct dri_screen * screen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
free(screen->optionCache.values);
|
free(screen->optionCache.values);
|
||||||
|
|
||||||
|
/* Default values are copied to screen->optionCache->values in
|
||||||
|
* initOptionCache. The info field, however, is a pointer copy, so don't free
|
||||||
|
* that twice.
|
||||||
|
*/
|
||||||
|
free(screen->optionCacheDefaults.values);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -72,6 +72,11 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device,
|
|||||||
goto no_context;
|
goto no_context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!pscreen->get_param(pscreen, PIPE_CAP_NPOT_TEXTURES)) {
|
||||||
|
ret = VDP_STATUS_NO_IMPLEMENTATION;
|
||||||
|
goto no_context;
|
||||||
|
}
|
||||||
|
|
||||||
*device = vlAddDataHTAB(dev);
|
*device = vlAddDataHTAB(dev);
|
||||||
if (*device == 0) {
|
if (*device == 0) {
|
||||||
ret = VDP_STATUS_ERROR;
|
ret = VDP_STATUS_ERROR;
|
||||||
@@ -86,6 +91,7 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device,
|
|||||||
return VDP_STATUS_OK;
|
return VDP_STATUS_OK;
|
||||||
|
|
||||||
no_handle:
|
no_handle:
|
||||||
|
dev->context->destroy(dev->context);
|
||||||
/* Destroy vscreen */
|
/* Destroy vscreen */
|
||||||
no_context:
|
no_context:
|
||||||
vl_screen_destroy(dev->vscreen);
|
vl_screen_destroy(dev->vscreen);
|
||||||
|
@@ -58,17 +58,13 @@ libvdpau_r600_la_LIBADD = \
|
|||||||
$(LIBDRM_LIBS) \
|
$(LIBDRM_LIBS) \
|
||||||
$(RADEON_LIBS)
|
$(RADEON_LIBS)
|
||||||
|
|
||||||
if HAVE_MESA_LLVM
|
|
||||||
libvdpau_r600_la_LINK = $(CXXLINK) $(libvdpau_r600_la_LDFLAGS)
|
libvdpau_r600_la_LINK = $(CXXLINK) $(libvdpau_r600_la_LDFLAGS)
|
||||||
# Mention a dummy pure C++ file to trigger generation of the $(LINK) variable
|
# Mention a dummy pure C++ file to trigger generation of the $(LINK) variable
|
||||||
nodist_EXTRA_libvdpau_r600_la_SOURCES = dummy-cpp.cpp
|
nodist_EXTRA_libvdpau_r600_la_SOURCES = dummy-cpp.cpp
|
||||||
|
|
||||||
|
if HAVE_MESA_LLVM
|
||||||
libvdpau_r600_la_LDFLAGS += $(LLVM_LDFLAGS)
|
libvdpau_r600_la_LDFLAGS += $(LLVM_LDFLAGS)
|
||||||
libvdpau_r600_la_LIBADD += $(LLVM_LIBS)
|
libvdpau_r600_la_LIBADD += $(LLVM_LIBS)
|
||||||
else
|
|
||||||
libvdpau_r600_la_LINK = $(LINK) $(libvdpau_r600_la_LDFLAGS)
|
|
||||||
# Mention a dummy pure C file to trigger generation of the $(LINK) variable
|
|
||||||
nodist_EXTRA_libvdpau_r600_la_SOURCES = dummy-c.c
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Provide compatibility with scripts for the old Mesa build system for
|
# Provide compatibility with scripts for the old Mesa build system for
|
||||||
|
@@ -846,14 +846,13 @@ public:
|
|||||||
|
|
||||||
ast_node *body;
|
ast_node *body;
|
||||||
|
|
||||||
private:
|
|
||||||
/**
|
/**
|
||||||
* Generate IR from the condition of a loop
|
* Generate IR from the condition of a loop
|
||||||
*
|
*
|
||||||
* This is factored out of ::hir because some loops have the condition
|
* This is factored out of ::hir because some loops have the condition
|
||||||
* test at the top (for and while), and others have it at the end (do-while).
|
* test at the top (for and while), and others have it at the end (do-while).
|
||||||
*/
|
*/
|
||||||
void condition_to_hir(class ir_loop *, struct _mesa_glsl_parse_state *);
|
void condition_to_hir(exec_list *, struct _mesa_glsl_parse_state *);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1651,7 +1651,7 @@ ast_function_expression::hir(exec_list *instructions,
|
|||||||
} else {
|
} else {
|
||||||
const ast_expression *id = subexpressions[0];
|
const ast_expression *id = subexpressions[0];
|
||||||
const char *func_name = id->primary_expression.identifier;
|
const char *func_name = id->primary_expression.identifier;
|
||||||
YYLTYPE loc = id->get_location();
|
YYLTYPE loc = get_location();
|
||||||
exec_list actual_parameters;
|
exec_list actual_parameters;
|
||||||
|
|
||||||
process_parameters(instructions, &actual_parameters, &this->expressions,
|
process_parameters(instructions, &actual_parameters, &this->expressions,
|
||||||
|
@@ -734,14 +734,15 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state,
|
|||||||
{
|
{
|
||||||
void *ctx = state;
|
void *ctx = state;
|
||||||
bool error_emitted = (lhs->type->is_error() || rhs->type->is_error());
|
bool error_emitted = (lhs->type->is_error() || rhs->type->is_error());
|
||||||
|
ir_rvalue *extract_channel = NULL;
|
||||||
|
|
||||||
/* If the assignment LHS comes back as an ir_binop_vector_extract
|
/* If the assignment LHS comes back as an ir_binop_vector_extract
|
||||||
* expression, move it to the RHS as an ir_triop_vector_insert.
|
* expression, move it to the RHS as an ir_triop_vector_insert.
|
||||||
*/
|
*/
|
||||||
if (lhs->ir_type == ir_type_expression) {
|
if (lhs->ir_type == ir_type_expression) {
|
||||||
ir_expression *const expr = lhs->as_expression();
|
ir_expression *const lhs_expr = lhs->as_expression();
|
||||||
|
|
||||||
if (unlikely(expr->operation == ir_binop_vector_extract)) {
|
if (unlikely(lhs_expr->operation == ir_binop_vector_extract)) {
|
||||||
ir_rvalue *new_rhs =
|
ir_rvalue *new_rhs =
|
||||||
validate_assignment(state, lhs_loc, lhs->type,
|
validate_assignment(state, lhs_loc, lhs->type,
|
||||||
rhs, is_initializer);
|
rhs, is_initializer);
|
||||||
@@ -749,12 +750,24 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state,
|
|||||||
if (new_rhs == NULL) {
|
if (new_rhs == NULL) {
|
||||||
return lhs;
|
return lhs;
|
||||||
} else {
|
} else {
|
||||||
|
/* This converts:
|
||||||
|
* - LHS: (expression float vector_extract <vec> <channel>)
|
||||||
|
* - RHS: <scalar>
|
||||||
|
* into:
|
||||||
|
* - LHS: <vec>
|
||||||
|
* - RHS: (expression vec2 vector_insert <vec> <channel> <scalar>)
|
||||||
|
*
|
||||||
|
* The LHS type is now a vector instead of a scalar. Since GLSL
|
||||||
|
* allows assignments to be used as rvalues, we need to re-extract
|
||||||
|
* the channel from assignment_temp when returning the rvalue.
|
||||||
|
*/
|
||||||
|
extract_channel = lhs_expr->operands[1];
|
||||||
rhs = new(ctx) ir_expression(ir_triop_vector_insert,
|
rhs = new(ctx) ir_expression(ir_triop_vector_insert,
|
||||||
expr->operands[0]->type,
|
lhs_expr->operands[0]->type,
|
||||||
expr->operands[0],
|
lhs_expr->operands[0],
|
||||||
new_rhs,
|
new_rhs,
|
||||||
expr->operands[1]);
|
extract_channel);
|
||||||
lhs = expr->operands[0]->clone(ctx, NULL);
|
lhs = lhs_expr->operands[0]->clone(ctx, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -848,6 +861,11 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state,
|
|||||||
if (!error_emitted)
|
if (!error_emitted)
|
||||||
instructions->push_tail(new(ctx) ir_assignment(lhs, deref_var));
|
instructions->push_tail(new(ctx) ir_assignment(lhs, deref_var));
|
||||||
|
|
||||||
|
if (extract_channel) {
|
||||||
|
return new(ctx) ir_expression(ir_binop_vector_extract,
|
||||||
|
new(ctx) ir_dereference_variable(var),
|
||||||
|
extract_channel->clone(ctx, NULL));
|
||||||
|
}
|
||||||
return new(ctx) ir_dereference_variable(var);
|
return new(ctx) ir_dereference_variable(var);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2785,10 +2803,17 @@ validate_identifier(const char *identifier, YYLTYPE loc,
|
|||||||
* "In addition, all identifiers containing two
|
* "In addition, all identifiers containing two
|
||||||
* consecutive underscores (__) are reserved as
|
* consecutive underscores (__) are reserved as
|
||||||
* possible future keywords."
|
* possible future keywords."
|
||||||
|
*
|
||||||
|
* The intention is that names containing __ are reserved for internal
|
||||||
|
* use by the implementation, and names prefixed with GL_ are reserved
|
||||||
|
* for use by Khronos. Names simply containing __ are dangerous to use,
|
||||||
|
* but should be allowed.
|
||||||
|
*
|
||||||
|
* A future version of the GLSL specification will clarify this.
|
||||||
*/
|
*/
|
||||||
_mesa_glsl_error(&loc, state,
|
_mesa_glsl_warning(&loc, state,
|
||||||
"identifier `%s' uses reserved `__' string",
|
"identifier `%s' uses reserved `__' string",
|
||||||
identifier);
|
identifier);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3961,17 +3986,22 @@ ast_jump_statement::hir(exec_list *instructions,
|
|||||||
_mesa_glsl_error(& loc, state,
|
_mesa_glsl_error(& loc, state,
|
||||||
"break may only appear in a loop or a switch");
|
"break may only appear in a loop or a switch");
|
||||||
} else {
|
} else {
|
||||||
/* For a loop, inline the for loop expression again,
|
/* For a loop, inline the for loop expression again, since we don't
|
||||||
* since we don't know where near the end of
|
* know where near the end of the loop body the normal copy of it is
|
||||||
* the loop body the normal copy of it
|
* going to be placed. Same goes for the condition for a do-while
|
||||||
* is going to be placed.
|
* loop.
|
||||||
*/
|
*/
|
||||||
if (state->loop_nesting_ast != NULL &&
|
if (state->loop_nesting_ast != NULL &&
|
||||||
mode == ast_continue &&
|
mode == ast_continue) {
|
||||||
state->loop_nesting_ast->rest_expression) {
|
if (state->loop_nesting_ast->rest_expression) {
|
||||||
state->loop_nesting_ast->rest_expression->hir(instructions,
|
state->loop_nesting_ast->rest_expression->hir(instructions,
|
||||||
state);
|
state);
|
||||||
}
|
}
|
||||||
|
if (state->loop_nesting_ast->mode ==
|
||||||
|
ast_iteration_statement::ast_do_while) {
|
||||||
|
state->loop_nesting_ast->condition_to_hir(instructions, state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (state->switch_state.is_switch_innermost &&
|
if (state->switch_state.is_switch_innermost &&
|
||||||
mode == ast_break) {
|
mode == ast_break) {
|
||||||
@@ -4301,14 +4331,14 @@ ast_case_label::hir(exec_list *instructions,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ast_iteration_statement::condition_to_hir(ir_loop *stmt,
|
ast_iteration_statement::condition_to_hir(exec_list *instructions,
|
||||||
struct _mesa_glsl_parse_state *state)
|
struct _mesa_glsl_parse_state *state)
|
||||||
{
|
{
|
||||||
void *ctx = state;
|
void *ctx = state;
|
||||||
|
|
||||||
if (condition != NULL) {
|
if (condition != NULL) {
|
||||||
ir_rvalue *const cond =
|
ir_rvalue *const cond =
|
||||||
condition->hir(& stmt->body_instructions, state);
|
condition->hir(instructions, state);
|
||||||
|
|
||||||
if ((cond == NULL)
|
if ((cond == NULL)
|
||||||
|| !cond->type->is_boolean() || !cond->type->is_scalar()) {
|
|| !cond->type->is_boolean() || !cond->type->is_scalar()) {
|
||||||
@@ -4329,7 +4359,7 @@ ast_iteration_statement::condition_to_hir(ir_loop *stmt,
|
|||||||
new(ctx) ir_loop_jump(ir_loop_jump::jump_break);
|
new(ctx) ir_loop_jump(ir_loop_jump::jump_break);
|
||||||
|
|
||||||
if_stmt->then_instructions.push_tail(break_stmt);
|
if_stmt->then_instructions.push_tail(break_stmt);
|
||||||
stmt->body_instructions.push_tail(if_stmt);
|
instructions->push_tail(if_stmt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4364,7 +4394,7 @@ ast_iteration_statement::hir(exec_list *instructions,
|
|||||||
state->switch_state.is_switch_innermost = false;
|
state->switch_state.is_switch_innermost = false;
|
||||||
|
|
||||||
if (mode != ast_do_while)
|
if (mode != ast_do_while)
|
||||||
condition_to_hir(stmt, state);
|
condition_to_hir(&stmt->body_instructions, state);
|
||||||
|
|
||||||
if (body != NULL)
|
if (body != NULL)
|
||||||
body->hir(& stmt->body_instructions, state);
|
body->hir(& stmt->body_instructions, state);
|
||||||
@@ -4373,7 +4403,7 @@ ast_iteration_statement::hir(exec_list *instructions,
|
|||||||
rest_expression->hir(& stmt->body_instructions, state);
|
rest_expression->hir(& stmt->body_instructions, state);
|
||||||
|
|
||||||
if (mode == ast_do_while)
|
if (mode == ast_do_while)
|
||||||
condition_to_hir(stmt, state);
|
condition_to_hir(&stmt->body_instructions, state);
|
||||||
|
|
||||||
if (mode != ast_do_while)
|
if (mode != ast_do_while)
|
||||||
state->symbols->pop_scope();
|
state->symbols->pop_scope();
|
||||||
|
@@ -123,6 +123,7 @@ ast_type_qualifier::merge_qualifier(YYLTYPE *loc,
|
|||||||
ubo_layout_mask.flags.q.shared = 1;
|
ubo_layout_mask.flags.q.shared = 1;
|
||||||
|
|
||||||
ast_type_qualifier ubo_binding_mask;
|
ast_type_qualifier ubo_binding_mask;
|
||||||
|
ubo_binding_mask.flags.i = 0;
|
||||||
ubo_binding_mask.flags.q.explicit_binding = 1;
|
ubo_binding_mask.flags.q.explicit_binding = 1;
|
||||||
ubo_binding_mask.flags.q.explicit_offset = 1;
|
ubo_binding_mask.flags.q.explicit_offset = 1;
|
||||||
|
|
||||||
|
@@ -3864,7 +3864,7 @@ builtin_builder::_fma(const glsl_type *type)
|
|||||||
ir_variable *c = in_var(type, "c");
|
ir_variable *c = in_var(type, "c");
|
||||||
MAKE_SIG(type, gpu_shader5, 3, a, b, c);
|
MAKE_SIG(type, gpu_shader5, 3, a, b, c);
|
||||||
|
|
||||||
body.emit(ret(fma(a, b, c)));
|
body.emit(ret(ir_builder::fma(a, b, c)));
|
||||||
|
|
||||||
return sig;
|
return sig;
|
||||||
}
|
}
|
||||||
@@ -3997,6 +3997,7 @@ builtin_builder::_atomic_op(const char *intrinsic,
|
|||||||
|
|
||||||
/* The singleton instance of builtin_builder. */
|
/* The singleton instance of builtin_builder. */
|
||||||
static builtin_builder builtins;
|
static builtin_builder builtins;
|
||||||
|
_glthread_DECLARE_STATIC_MUTEX(builtins_lock);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* External API (exposing the built-in module to the rest of the compiler):
|
* External API (exposing the built-in module to the rest of the compiler):
|
||||||
@@ -4005,19 +4006,27 @@ static builtin_builder builtins;
|
|||||||
void
|
void
|
||||||
_mesa_glsl_initialize_builtin_functions()
|
_mesa_glsl_initialize_builtin_functions()
|
||||||
{
|
{
|
||||||
|
_glthread_LOCK_MUTEX(builtins_lock);
|
||||||
builtins.initialize();
|
builtins.initialize();
|
||||||
|
_glthread_UNLOCK_MUTEX(builtins_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_mesa_glsl_release_builtin_functions()
|
_mesa_glsl_release_builtin_functions()
|
||||||
{
|
{
|
||||||
|
_glthread_LOCK_MUTEX(builtins_lock);
|
||||||
builtins.release();
|
builtins.release();
|
||||||
|
_glthread_UNLOCK_MUTEX(builtins_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
ir_function_signature *
|
ir_function_signature *
|
||||||
_mesa_glsl_find_builtin_function(_mesa_glsl_parse_state *state,
|
_mesa_glsl_find_builtin_function(_mesa_glsl_parse_state *state,
|
||||||
const char *name, exec_list *actual_parameters)
|
const char *name, exec_list *actual_parameters)
|
||||||
{
|
{
|
||||||
return builtins.find(state, name, actual_parameters);
|
ir_function_signature * s;
|
||||||
|
_glthread_LOCK_MUTEX(builtins_lock);
|
||||||
|
s = builtins.find(state, name, actual_parameters);
|
||||||
|
_glthread_UNLOCK_MUTEX(builtins_lock);
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
/** @} */
|
/** @} */
|
||||||
|
@@ -310,6 +310,11 @@ control_line:
|
|||||||
_glcpp_parser_expand_and_lex_from (parser,
|
_glcpp_parser_expand_and_lex_from (parser,
|
||||||
ELIF_EXPANDED, $2);
|
ELIF_EXPANDED, $2);
|
||||||
}
|
}
|
||||||
|
else if (parser->skip_stack &&
|
||||||
|
parser->skip_stack->has_else)
|
||||||
|
{
|
||||||
|
glcpp_error(& @1, parser, "#elif after #else");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_glcpp_parser_skip_stack_change_if (parser, & @1,
|
_glcpp_parser_skip_stack_change_if (parser, & @1,
|
||||||
@@ -324,6 +329,11 @@ control_line:
|
|||||||
{
|
{
|
||||||
glcpp_error(& @1, parser, "#elif with no expression");
|
glcpp_error(& @1, parser, "#elif with no expression");
|
||||||
}
|
}
|
||||||
|
else if (parser->skip_stack &&
|
||||||
|
parser->skip_stack->has_else)
|
||||||
|
{
|
||||||
|
glcpp_error(& @1, parser, "#elif after #else");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_glcpp_parser_skip_stack_change_if (parser, & @1,
|
_glcpp_parser_skip_stack_change_if (parser, & @1,
|
||||||
@@ -332,7 +342,17 @@ control_line:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
| HASH_ELSE {
|
| HASH_ELSE {
|
||||||
_glcpp_parser_skip_stack_change_if (parser, & @1, "else", 1);
|
if (parser->skip_stack &&
|
||||||
|
parser->skip_stack->has_else)
|
||||||
|
{
|
||||||
|
glcpp_error(& @1, parser, "multiple #else");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_glcpp_parser_skip_stack_change_if (parser, & @1, "else", 1);
|
||||||
|
if (parser->skip_stack)
|
||||||
|
parser->skip_stack->has_else = true;
|
||||||
|
}
|
||||||
} NEWLINE
|
} NEWLINE
|
||||||
| HASH_ENDIF {
|
| HASH_ENDIF {
|
||||||
_glcpp_parser_skip_stack_pop (parser, & @1);
|
_glcpp_parser_skip_stack_pop (parser, & @1);
|
||||||
@@ -1252,9 +1272,6 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
|
|||||||
if (extensions->ARB_sample_shading)
|
if (extensions->ARB_sample_shading)
|
||||||
add_builtin_define(parser, "GL_ARB_sample_shading", 1);
|
add_builtin_define(parser, "GL_ARB_sample_shading", 1);
|
||||||
|
|
||||||
if (extensions->EXT_shader_integer_mix)
|
|
||||||
add_builtin_define(parser, "GL_EXT_shader_integer_mix", 1);
|
|
||||||
|
|
||||||
if (extensions->ARB_texture_gather)
|
if (extensions->ARB_texture_gather)
|
||||||
add_builtin_define(parser, "GL_ARB_texture_gather", 1);
|
add_builtin_define(parser, "GL_ARB_texture_gather", 1);
|
||||||
|
|
||||||
@@ -1263,6 +1280,11 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (extensions != NULL) {
|
||||||
|
if (extensions->EXT_shader_integer_mix)
|
||||||
|
add_builtin_define(parser, "GL_EXT_shader_integer_mix", 1);
|
||||||
|
}
|
||||||
|
|
||||||
language_version = 110;
|
language_version = 110;
|
||||||
add_builtin_define(parser, "__VERSION__", language_version);
|
add_builtin_define(parser, "__VERSION__", language_version);
|
||||||
|
|
||||||
@@ -1806,11 +1828,27 @@ static void
|
|||||||
_check_for_reserved_macro_name (glcpp_parser_t *parser, YYLTYPE *loc,
|
_check_for_reserved_macro_name (glcpp_parser_t *parser, YYLTYPE *loc,
|
||||||
const char *identifier)
|
const char *identifier)
|
||||||
{
|
{
|
||||||
/* According to the GLSL specification, macro names starting with "__"
|
/* Section 3.3 (Preprocessor) of the GLSL 1.30 spec (and later) and
|
||||||
* or "GL_" are reserved for future use. So, don't allow them.
|
* the GLSL ES spec (all versions) say:
|
||||||
|
*
|
||||||
|
* "All macro names containing two consecutive underscores ( __ )
|
||||||
|
* are reserved for future use as predefined macro names. All
|
||||||
|
* macro names prefixed with "GL_" ("GL" followed by a single
|
||||||
|
* underscore) are also reserved."
|
||||||
|
*
|
||||||
|
* The intention is that names containing __ are reserved for internal
|
||||||
|
* use by the implementation, and names prefixed with GL_ are reserved
|
||||||
|
* for use by Khronos. Since every extension adds a name prefixed
|
||||||
|
* with GL_ (i.e., the name of the extension), that should be an
|
||||||
|
* error. Names simply containing __ are dangerous to use, but should
|
||||||
|
* be allowed.
|
||||||
|
*
|
||||||
|
* A future version of the GLSL specification will clarify this.
|
||||||
*/
|
*/
|
||||||
if (strstr(identifier, "__")) {
|
if (strstr(identifier, "__")) {
|
||||||
glcpp_error (loc, parser, "Macro names containing \"__\" are reserved.\n");
|
glcpp_warning(loc, parser,
|
||||||
|
"Macro names containing \"__\" are reserved "
|
||||||
|
"for use by the implementation.\n");
|
||||||
}
|
}
|
||||||
if (strncmp(identifier, "GL_", 3) == 0) {
|
if (strncmp(identifier, "GL_", 3) == 0) {
|
||||||
glcpp_error (loc, parser, "Macro names starting with \"GL_\" are reserved.\n");
|
glcpp_error (loc, parser, "Macro names starting with \"GL_\" are reserved.\n");
|
||||||
@@ -2024,6 +2062,7 @@ _glcpp_parser_skip_stack_push_if (glcpp_parser_t *parser, YYLTYPE *loc,
|
|||||||
node->type = SKIP_TO_ENDIF;
|
node->type = SKIP_TO_ENDIF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
node->has_else = false;
|
||||||
node->next = parser->skip_stack;
|
node->next = parser->skip_stack;
|
||||||
parser->skip_stack = node;
|
parser->skip_stack = node;
|
||||||
}
|
}
|
||||||
|
@@ -153,6 +153,7 @@ typedef enum skip_type {
|
|||||||
|
|
||||||
typedef struct skip_node {
|
typedef struct skip_node {
|
||||||
skip_type_t type;
|
skip_type_t type;
|
||||||
|
bool has_else;
|
||||||
YYLTYPE loc; /* location of the initial #if/#elif/... */
|
YYLTYPE loc; /* location of the initial #if/#elif/... */
|
||||||
struct skip_node *next;
|
struct skip_node *next;
|
||||||
} skip_node_t;
|
} skip_node_t;
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
0:1(10): preprocessor error: Macro names containing "__" are reserved.
|
0:1(10): preprocessor warning: Macro names containing "__" are reserved for use by the implementation.
|
||||||
|
|
||||||
0:2(9): preprocessor error: Macro names starting with "GL_" are reserved.
|
0:2(9): preprocessor error: Macro names starting with "GL_" are reserved.
|
||||||
|
|
||||||
0:3(9): preprocessor error: Macro names containing "__" are reserved.
|
0:3(9): preprocessor warning: Macro names containing "__" are reserved for use by the implementation.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
6
src/glsl/glcpp/tests/118-multiple-else.c
Normal file
6
src/glsl/glcpp/tests/118-multiple-else.c
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#if 0
|
||||||
|
#else
|
||||||
|
int foo;
|
||||||
|
#else
|
||||||
|
int bar;
|
||||||
|
#endif
|
8
src/glsl/glcpp/tests/118-multiple-else.c.expected
Normal file
8
src/glsl/glcpp/tests/118-multiple-else.c.expected
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
0:4(1): preprocessor error: multiple #else
|
||||||
|
|
||||||
|
|
||||||
|
int foo;
|
||||||
|
|
||||||
|
int bar;
|
||||||
|
|
||||||
|
|
6
src/glsl/glcpp/tests/119-elif-after-else.c
Normal file
6
src/glsl/glcpp/tests/119-elif-after-else.c
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#if 0
|
||||||
|
#else
|
||||||
|
int foo;
|
||||||
|
#elif 0
|
||||||
|
int bar;
|
||||||
|
#endif
|
8
src/glsl/glcpp/tests/119-elif-after-else.c.expected
Normal file
8
src/glsl/glcpp/tests/119-elif-after-else.c.expected
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
0:4(1): preprocessor error: #elif after #else
|
||||||
|
|
||||||
|
|
||||||
|
int foo;
|
||||||
|
|
||||||
|
int bar;
|
||||||
|
|
||||||
|
|
@@ -1530,7 +1530,7 @@ type_qualifier:
|
|||||||
"just before storage qualifiers");
|
"just before storage qualifiers");
|
||||||
}
|
}
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
$$.flags.i |= $2.flags.i;
|
$$.merge_qualifier(&@1, state, $2);
|
||||||
}
|
}
|
||||||
| storage_qualifier type_qualifier
|
| storage_qualifier type_qualifier
|
||||||
{
|
{
|
||||||
|
@@ -292,6 +292,10 @@ _mesa_glsl_parse_state::process_version_directive(YYLTYPE *locp, int version,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this->es_shader) {
|
||||||
|
this->ARB_texture_rectangle_enable = false;
|
||||||
|
}
|
||||||
|
|
||||||
this->language_version = version;
|
this->language_version = version;
|
||||||
|
|
||||||
bool supported = false;
|
bool supported = false;
|
||||||
|
@@ -163,7 +163,8 @@ ir_loop::clone(void *mem_ctx, struct hash_table *ht) const
|
|||||||
new_loop->to = this->to->clone(mem_ctx, ht);
|
new_loop->to = this->to->clone(mem_ctx, ht);
|
||||||
if (this->increment)
|
if (this->increment)
|
||||||
new_loop->increment = this->increment->clone(mem_ctx, ht);
|
new_loop->increment = this->increment->clone(mem_ctx, ht);
|
||||||
new_loop->counter = counter;
|
if (this->counter)
|
||||||
|
new_loop->counter = this->counter->clone(mem_ctx, ht);
|
||||||
|
|
||||||
foreach_iter(exec_list_iterator, iter, this->body_instructions) {
|
foreach_iter(exec_list_iterator, iter, this->body_instructions) {
|
||||||
ir_instruction *ir = (ir_instruction *)iter.get();
|
ir_instruction *ir = (ir_instruction *)iter.get();
|
||||||
|
@@ -1402,7 +1402,7 @@ ir_expression::constant_expression_value(struct hash_table *variable_context)
|
|||||||
data.f[c] = ldexp(op[0]->value.f[c], op[1]->value.i[c]);
|
data.f[c] = ldexp(op[0]->value.f[c], op[1]->value.i[c]);
|
||||||
/* Flush subnormal values to zero. */
|
/* Flush subnormal values to zero. */
|
||||||
if (!isnormal(data.f[c]))
|
if (!isnormal(data.f[c]))
|
||||||
data.f[c] = copysign(0.0, op[0]->value.f[c]);
|
data.f[c] = copysign(0.0f, op[0]->value.f[c]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@@ -87,6 +87,12 @@ ir_loop::accept(ir_hierarchical_visitor *v)
|
|||||||
if (s != visit_continue)
|
if (s != visit_continue)
|
||||||
return (s == visit_continue_with_parent) ? visit_continue : s;
|
return (s == visit_continue_with_parent) ? visit_continue : s;
|
||||||
|
|
||||||
|
if (this->counter) {
|
||||||
|
s = this->counter->accept(v);
|
||||||
|
if (s != visit_continue)
|
||||||
|
return (s == visit_continue_with_parent) ? visit_continue : s;
|
||||||
|
}
|
||||||
|
|
||||||
s = visit_list_elements(v, &this->body_instructions);
|
s = visit_list_elements(v, &this->body_instructions);
|
||||||
if (s == visit_stop)
|
if (s == visit_stop)
|
||||||
return s;
|
return s;
|
||||||
|
@@ -132,3 +132,24 @@ ir_variable_refcount_visitor::visit_leave(ir_assignment *ir)
|
|||||||
|
|
||||||
return visit_continue;
|
return visit_continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ir_visitor_status
|
||||||
|
ir_variable_refcount_visitor::visit_leave(ir_loop *ir)
|
||||||
|
{
|
||||||
|
/* If the loop has a counter variable, it is implicitly referenced and
|
||||||
|
* assigned to. Note that since the LHS of an assignment is counted as a
|
||||||
|
* reference, we actually have to increment referenced_count by 2 so that
|
||||||
|
* later code will know that the variable isn't just assigned to.
|
||||||
|
*/
|
||||||
|
if (ir->counter != NULL) {
|
||||||
|
ir_variable_refcount_entry *entry =
|
||||||
|
this->get_variable_entry(ir->counter);
|
||||||
|
if (entry) {
|
||||||
|
entry->referenced_count += 2;
|
||||||
|
entry->assigned_count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return visit_continue;
|
||||||
|
}
|
||||||
|
@@ -60,6 +60,7 @@ public:
|
|||||||
|
|
||||||
virtual ir_visitor_status visit_enter(ir_function_signature *);
|
virtual ir_visitor_status visit_enter(ir_function_signature *);
|
||||||
virtual ir_visitor_status visit_leave(ir_assignment *);
|
virtual ir_visitor_status visit_leave(ir_assignment *);
|
||||||
|
virtual ir_visitor_status visit_leave(ir_loop *);
|
||||||
|
|
||||||
ir_variable_refcount_entry *get_variable_entry(ir_variable *var);
|
ir_variable_refcount_entry *get_variable_entry(ir_variable *var);
|
||||||
|
|
||||||
|
@@ -2373,11 +2373,12 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
|||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
/* OpenGL ES requires that a vertex shader and a fragment shader both be
|
/* OpenGL ES requires that a vertex shader and a fragment shader both be
|
||||||
* present in a linked program. By checking prog->IsES, we also
|
* present in a linked program. GL_ARB_ES2_compatibility doesn't say
|
||||||
* catch the GL_ARB_ES2_compatibility case.
|
* anything about shader linking when one of the shaders (vertex or
|
||||||
|
* fragment shader) is absent. So, the extension shouldn't change the
|
||||||
|
* behavior specified in GLSL specification.
|
||||||
*/
|
*/
|
||||||
if (!prog->InternalSeparateShader &&
|
if (!prog->InternalSeparateShader && ctx->API == API_OPENGLES2) {
|
||||||
(ctx->API == API_OPENGLES2 || prog->IsES)) {
|
|
||||||
if (prog->_LinkedShaders[MESA_SHADER_VERTEX] == NULL) {
|
if (prog->_LinkedShaders[MESA_SHADER_VERTEX] == NULL) {
|
||||||
linker_error(prog, "program lacks a vertex shader\n");
|
linker_error(prog, "program lacks a vertex shader\n");
|
||||||
} else if (prog->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL) {
|
} else if (prog->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL) {
|
||||||
|
@@ -254,7 +254,7 @@ loop_control_visitor::visit_leave(ir_loop *ir)
|
|||||||
ir->from = init->clone(ir, NULL);
|
ir->from = init->clone(ir, NULL);
|
||||||
ir->to = limit->clone(ir, NULL);
|
ir->to = limit->clone(ir, NULL);
|
||||||
ir->increment = lv->increment->clone(ir, NULL);
|
ir->increment = lv->increment->clone(ir, NULL);
|
||||||
ir->counter = lv->var;
|
ir->counter = lv->var->clone(ir, NULL);
|
||||||
ir->cmp = cmp;
|
ir->cmp = cmp;
|
||||||
|
|
||||||
max_iterations = iterations;
|
max_iterations = iterations;
|
||||||
|
@@ -20,6 +20,9 @@
|
|||||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
|
|
||||||
#include "glxclient.h"
|
#include "glxclient.h"
|
||||||
#include "glx_error.h"
|
#include "glx_error.h"
|
||||||
#include "xf86drm.h"
|
#include "xf86drm.h"
|
||||||
@@ -95,3 +98,5 @@ dri2_query_renderer_string(struct glx_screen *base, int attribute,
|
|||||||
|
|
||||||
return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, value);
|
return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* GLX_DIRECT_RENDERING */
|
||||||
|
@@ -917,13 +917,10 @@ init_fbconfig_for_chooser(struct glx_config * config,
|
|||||||
if (fbconfig_style_tags) {
|
if (fbconfig_style_tags) {
|
||||||
config->rgbMode = GL_TRUE;
|
config->rgbMode = GL_TRUE;
|
||||||
config->doubleBufferMode = GLX_DONT_CARE;
|
config->doubleBufferMode = GLX_DONT_CARE;
|
||||||
/* allow any kind of drawable, including those for off-screen buffers */
|
config->renderType = GLX_RGBA_BIT;
|
||||||
config->drawableType = 0;
|
|
||||||
} else {
|
|
||||||
/* allow configs which support on-screen drawing */
|
|
||||||
config->drawableType = GLX_WINDOW_BIT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config->drawableType = GLX_WINDOW_BIT;
|
||||||
config->visualRating = GLX_DONT_CARE;
|
config->visualRating = GLX_DONT_CARE;
|
||||||
config->transparentPixel = GLX_NONE;
|
config->transparentPixel = GLX_NONE;
|
||||||
config->transparentRed = GLX_DONT_CARE;
|
config->transparentRed = GLX_DONT_CARE;
|
||||||
@@ -932,8 +929,6 @@ init_fbconfig_for_chooser(struct glx_config * config,
|
|||||||
config->transparentAlpha = GLX_DONT_CARE;
|
config->transparentAlpha = GLX_DONT_CARE;
|
||||||
config->transparentIndex = GLX_DONT_CARE;
|
config->transparentIndex = GLX_DONT_CARE;
|
||||||
|
|
||||||
/* Set GLX_RENDER_TYPE property to not expect any flags by default. */
|
|
||||||
config->renderType = 0;
|
|
||||||
config->xRenderable = GLX_DONT_CARE;
|
config->xRenderable = GLX_DONT_CARE;
|
||||||
config->fbconfigID = (GLXFBConfigID) (GLX_DONT_CARE);
|
config->fbconfigID = (GLXFBConfigID) (GLX_DONT_CARE);
|
||||||
|
|
||||||
@@ -1102,7 +1097,7 @@ static int
|
|||||||
fbconfig_compare(struct glx_config **a, struct glx_config **b)
|
fbconfig_compare(struct glx_config **a, struct glx_config **b)
|
||||||
{
|
{
|
||||||
/* The order of these comparisons must NOT change. It is defined by
|
/* The order of these comparisons must NOT change. It is defined by
|
||||||
* the GLX 1.3 spec and ARB_multisample.
|
* the GLX 1.4 specification.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PREFER_SMALLER(visualSelectGroup);
|
PREFER_SMALLER(visualSelectGroup);
|
||||||
@@ -1131,6 +1126,9 @@ fbconfig_compare(struct glx_config **a, struct glx_config **b)
|
|||||||
|
|
||||||
PREFER_SMALLER(numAuxBuffers);
|
PREFER_SMALLER(numAuxBuffers);
|
||||||
|
|
||||||
|
PREFER_SMALLER(sampleBuffers);
|
||||||
|
PREFER_SMALLER(samples);
|
||||||
|
|
||||||
PREFER_LARGER_OR_ZERO(depthBits);
|
PREFER_LARGER_OR_ZERO(depthBits);
|
||||||
PREFER_SMALLER(stencilBits);
|
PREFER_SMALLER(stencilBits);
|
||||||
|
|
||||||
@@ -1144,12 +1142,6 @@ fbconfig_compare(struct glx_config **a, struct glx_config **b)
|
|||||||
|
|
||||||
PREFER_SMALLER(visualType);
|
PREFER_SMALLER(visualType);
|
||||||
|
|
||||||
/* None of the multisample specs say where this comparison should happen,
|
|
||||||
* so I put it near the end.
|
|
||||||
*/
|
|
||||||
PREFER_SMALLER(sampleBuffers);
|
|
||||||
PREFER_SMALLER(samples);
|
|
||||||
|
|
||||||
/* None of the pbuffer or fbconfig specs say that this comparison needs
|
/* None of the pbuffer or fbconfig specs say that this comparison needs
|
||||||
* to happen at all, but it seems like it should.
|
* to happen at all, but it seems like it should.
|
||||||
*/
|
*/
|
||||||
|
@@ -823,7 +823,6 @@ __glXInitialize(Display * dpy)
|
|||||||
dpyPriv->codes = XInitExtension(dpy, __glXExtensionName);
|
dpyPriv->codes = XInitExtension(dpy, __glXExtensionName);
|
||||||
if (!dpyPriv->codes) {
|
if (!dpyPriv->codes) {
|
||||||
free(dpyPriv);
|
free(dpyPriv);
|
||||||
_XUnlockMutex(_Xglobal_lock);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -839,7 +838,6 @@ __glXInitialize(Display * dpy)
|
|||||||
&dpyPriv->majorVersion, &dpyPriv->minorVersion)
|
&dpyPriv->majorVersion, &dpyPriv->minorVersion)
|
||||||
|| (dpyPriv->majorVersion == 1 && dpyPriv->minorVersion < 1)) {
|
|| (dpyPriv->majorVersion == 1 && dpyPriv->minorVersion < 1)) {
|
||||||
free(dpyPriv);
|
free(dpyPriv);
|
||||||
_XUnlockMutex(_Xglobal_lock);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -900,7 +898,7 @@ __glXInitialize(Display * dpy)
|
|||||||
dpyPriv->next = glx_displays;
|
dpyPriv->next = glx_displays;
|
||||||
glx_displays = dpyPriv;
|
glx_displays = dpyPriv;
|
||||||
|
|
||||||
_XUnlockMutex(_Xglobal_lock);
|
_XUnlockMutex(_Xglobal_lock);
|
||||||
|
|
||||||
return dpyPriv;
|
return dpyPriv;
|
||||||
}
|
}
|
||||||
|
@@ -95,6 +95,12 @@ AM_CPPFLAGS = $(DEFINES) $(INCLUDE_DIRS)
|
|||||||
AM_CFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CFLAGS)
|
AM_CFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CFLAGS)
|
||||||
AM_CXXFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CXXFLAGS)
|
AM_CXXFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CXXFLAGS)
|
||||||
|
|
||||||
|
ARCH_LIBS =
|
||||||
|
|
||||||
|
if SSE41_SUPPORTED
|
||||||
|
ARCH_LIBS += libmesa_sse41.la
|
||||||
|
endif
|
||||||
|
|
||||||
MESA_ASM_FILES_FOR_ARCH =
|
MESA_ASM_FILES_FOR_ARCH =
|
||||||
|
|
||||||
if HAVE_X86_ASM
|
if HAVE_X86_ASM
|
||||||
@@ -103,8 +109,6 @@ noinst_PROGRAMS = gen_matypes
|
|||||||
gen_matypes_SOURCES = x86/gen_matypes.c
|
gen_matypes_SOURCES = x86/gen_matypes.c
|
||||||
BUILT_SOURCES += matypes.h
|
BUILT_SOURCES += matypes.h
|
||||||
|
|
||||||
ARCH_LIBS = libmesa_sse41.la
|
|
||||||
|
|
||||||
if HAVE_X86_64_ASM
|
if HAVE_X86_64_ASM
|
||||||
MESA_ASM_FILES_FOR_ARCH += $(X86_64_FILES)
|
MESA_ASM_FILES_FOR_ARCH += $(X86_64_FILES)
|
||||||
AM_CPPFLAGS += -I$(builddir)/x86-64 -I$(srcdir)/x86-64
|
AM_CPPFLAGS += -I$(builddir)/x86-64 -I$(srcdir)/x86-64
|
||||||
|
@@ -355,6 +355,8 @@ static void cleanup_temp_texture(struct gl_context *ctx, struct temp_texture *te
|
|||||||
static void meta_glsl_clear_cleanup(struct gl_context *ctx, struct clear_state *clear);
|
static void meta_glsl_clear_cleanup(struct gl_context *ctx, struct clear_state *clear);
|
||||||
static void meta_glsl_generate_mipmap_cleanup(struct gl_context *ctx,
|
static void meta_glsl_generate_mipmap_cleanup(struct gl_context *ctx,
|
||||||
struct gen_mipmap_state *mipmap);
|
struct gen_mipmap_state *mipmap);
|
||||||
|
static void meta_decompress_cleanup(struct decompress_state *decompress);
|
||||||
|
static void meta_drawpix_cleanup(struct drawpix_state *drawpix);
|
||||||
|
|
||||||
static GLuint
|
static GLuint
|
||||||
compile_shader_with_debug(struct gl_context *ctx, GLenum target, const GLcharARB *source)
|
compile_shader_with_debug(struct gl_context *ctx, GLenum target, const GLcharARB *source)
|
||||||
@@ -449,6 +451,8 @@ _mesa_meta_free(struct gl_context *ctx)
|
|||||||
meta_glsl_clear_cleanup(ctx, &ctx->Meta->Clear);
|
meta_glsl_clear_cleanup(ctx, &ctx->Meta->Clear);
|
||||||
meta_glsl_generate_mipmap_cleanup(ctx, &ctx->Meta->Mipmap);
|
meta_glsl_generate_mipmap_cleanup(ctx, &ctx->Meta->Mipmap);
|
||||||
cleanup_temp_texture(ctx, &ctx->Meta->TempTex);
|
cleanup_temp_texture(ctx, &ctx->Meta->TempTex);
|
||||||
|
meta_decompress_cleanup(&ctx->Meta->Decompress);
|
||||||
|
meta_drawpix_cleanup(&ctx->Meta->DrawPix);
|
||||||
if (old_context)
|
if (old_context)
|
||||||
_mesa_make_current(old_context, old_context->WinSysDrawBuffer, old_context->WinSysReadBuffer);
|
_mesa_make_current(old_context, old_context->WinSysDrawBuffer, old_context->WinSysReadBuffer);
|
||||||
else
|
else
|
||||||
@@ -2489,7 +2493,24 @@ _mesa_meta_CopyPixels(struct gl_context *ctx, GLint srcX, GLint srcY,
|
|||||||
_mesa_meta_end(ctx);
|
_mesa_meta_end(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_drawpix_cleanup(struct drawpix_state *drawpix)
|
||||||
|
{
|
||||||
|
if (drawpix->ArrayObj != 0) {
|
||||||
|
_mesa_DeleteVertexArrays(1, &drawpix->ArrayObj);
|
||||||
|
drawpix->ArrayObj = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (drawpix->StencilFP != 0) {
|
||||||
|
_mesa_DeleteProgramsARB(1, &drawpix->StencilFP);
|
||||||
|
drawpix->StencilFP = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (drawpix->DepthFP != 0) {
|
||||||
|
_mesa_DeleteProgramsARB(1, &drawpix->DepthFP);
|
||||||
|
drawpix->DepthFP = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When the glDrawPixels() image size is greater than the max rectangle
|
* When the glDrawPixels() image size is greater than the max rectangle
|
||||||
@@ -2951,8 +2972,8 @@ _mesa_meta_Bitmap(struct gl_context *ctx,
|
|||||||
/* one-time setup */
|
/* one-time setup */
|
||||||
|
|
||||||
/* create vertex array object */
|
/* create vertex array object */
|
||||||
_mesa_GenVertexArraysAPPLE(1, &bitmap->ArrayObj);
|
_mesa_GenVertexArrays(1, &bitmap->ArrayObj);
|
||||||
_mesa_BindVertexArrayAPPLE(bitmap->ArrayObj);
|
_mesa_BindVertexArray(bitmap->ArrayObj);
|
||||||
|
|
||||||
/* create vertex array buffer */
|
/* create vertex array buffer */
|
||||||
_mesa_GenBuffers(1, &bitmap->VBO);
|
_mesa_GenBuffers(1, &bitmap->VBO);
|
||||||
@@ -3317,8 +3338,8 @@ setup_ff_generate_mipmap(struct gl_context *ctx,
|
|||||||
if (mipmap->ArrayObj == 0) {
|
if (mipmap->ArrayObj == 0) {
|
||||||
/* one-time setup */
|
/* one-time setup */
|
||||||
/* create vertex array object */
|
/* create vertex array object */
|
||||||
_mesa_GenVertexArraysAPPLE(1, &mipmap->ArrayObj);
|
_mesa_GenVertexArrays(1, &mipmap->ArrayObj);
|
||||||
_mesa_BindVertexArrayAPPLE(mipmap->ArrayObj);
|
_mesa_BindVertexArray(mipmap->ArrayObj);
|
||||||
|
|
||||||
/* create vertex array buffer */
|
/* create vertex array buffer */
|
||||||
_mesa_GenBuffers(1, &mipmap->VBO);
|
_mesa_GenBuffers(1, &mipmap->VBO);
|
||||||
@@ -3891,6 +3912,25 @@ _mesa_meta_CopyTexSubImage(struct gl_context *ctx, GLuint dims,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_decompress_cleanup(struct decompress_state *decompress)
|
||||||
|
{
|
||||||
|
if (decompress->FBO != 0) {
|
||||||
|
_mesa_DeleteFramebuffers(1, &decompress->FBO);
|
||||||
|
_mesa_DeleteRenderbuffers(1, &decompress->RBO);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (decompress->ArrayObj != 0) {
|
||||||
|
_mesa_DeleteVertexArrays(1, &decompress->ArrayObj);
|
||||||
|
_mesa_DeleteBuffers(1, &decompress->VBO);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (decompress->Sampler != 0)
|
||||||
|
_mesa_DeleteSamplers(1, &decompress->Sampler);
|
||||||
|
|
||||||
|
memset(decompress, 0, sizeof(*decompress));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decompress a texture image by drawing a quad with the compressed
|
* Decompress a texture image by drawing a quad with the compressed
|
||||||
* texture and reading the pixels out of the color buffer.
|
* texture and reading the pixels out of the color buffer.
|
||||||
@@ -4125,7 +4165,8 @@ _mesa_meta_GetTexImage(struct gl_context *ctx,
|
|||||||
* unsigned, normalized values. We could handle signed and unnormalized
|
* unsigned, normalized values. We could handle signed and unnormalized
|
||||||
* with floating point renderbuffers...
|
* with floating point renderbuffers...
|
||||||
*/
|
*/
|
||||||
if (_mesa_is_format_compressed(texImage->TexFormat) &&
|
if (texImage->TexObject->Target != GL_TEXTURE_CUBE_MAP_ARRAY
|
||||||
|
&& _mesa_is_format_compressed(texImage->TexFormat) &&
|
||||||
_mesa_get_format_datatype(texImage->TexFormat)
|
_mesa_get_format_datatype(texImage->TexFormat)
|
||||||
== GL_UNSIGNED_NORMALIZED) {
|
== GL_UNSIGNED_NORMALIZED) {
|
||||||
struct gl_texture_object *texObj = texImage->TexObject;
|
struct gl_texture_object *texObj = texImage->TexObject;
|
||||||
|
@@ -438,16 +438,19 @@ driCreateContextAttribs(__DRIscreen *screen, int api,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct gl_context *ctx = context->driverPrivate;
|
*error = __DRI_CTX_ERROR_SUCCESS;
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
driContextSetFlags(struct gl_context *ctx, uint32_t flags)
|
||||||
|
{
|
||||||
if ((flags & __DRI_CTX_FLAG_FORWARD_COMPATIBLE) != 0)
|
if ((flags & __DRI_CTX_FLAG_FORWARD_COMPATIBLE) != 0)
|
||||||
ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT;
|
ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT;
|
||||||
if ((flags & __DRI_CTX_FLAG_DEBUG) != 0) {
|
if ((flags & __DRI_CTX_FLAG_DEBUG) != 0) {
|
||||||
ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT;
|
ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT;
|
||||||
ctx->Debug.DebugOutput = GL_TRUE;
|
ctx->Debug.DebugOutput = GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
*error = __DRI_CTX_ERROR_SUCCESS;
|
|
||||||
return context;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static __DRIcontext *
|
static __DRIcontext *
|
||||||
|
@@ -289,6 +289,9 @@ dri2InvalidateDrawable(__DRIdrawable *drawable);
|
|||||||
extern void
|
extern void
|
||||||
driUpdateFramebufferSize(struct gl_context *ctx, const __DRIdrawable *dPriv);
|
driUpdateFramebufferSize(struct gl_context *ctx, const __DRIdrawable *dPriv);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
driContextSetFlags(struct gl_context *ctx, uint32_t flags);
|
||||||
|
|
||||||
extern const __DRIimageDriverExtension driImageDriverExtension;
|
extern const __DRIimageDriverExtension driImageDriverExtension;
|
||||||
|
|
||||||
#endif /* _DRI_UTIL_H_ */
|
#endif /* _DRI_UTIL_H_ */
|
||||||
|
@@ -56,6 +56,7 @@ i830CreateContext(int api,
|
|||||||
__DRIcontext * driContextPriv,
|
__DRIcontext * driContextPriv,
|
||||||
unsigned major_version,
|
unsigned major_version,
|
||||||
unsigned minor_version,
|
unsigned minor_version,
|
||||||
|
uint32_t flags,
|
||||||
unsigned *error,
|
unsigned *error,
|
||||||
void *sharedContextPrivate)
|
void *sharedContextPrivate)
|
||||||
{
|
{
|
||||||
@@ -73,7 +74,7 @@ i830CreateContext(int api,
|
|||||||
i830InitDriverFunctions(&functions);
|
i830InitDriverFunctions(&functions);
|
||||||
|
|
||||||
if (!intelInitContext(intel, __DRI_API_OPENGL,
|
if (!intelInitContext(intel, __DRI_API_OPENGL,
|
||||||
major_version, minor_version,
|
major_version, minor_version, flags,
|
||||||
mesaVis, driContextPriv,
|
mesaVis, driContextPriv,
|
||||||
sharedContextPrivate, &functions,
|
sharedContextPrivate, &functions,
|
||||||
error)) {
|
error)) {
|
||||||
|
@@ -183,6 +183,7 @@ i830CreateContext(int api,
|
|||||||
__DRIcontext * driContextPriv,
|
__DRIcontext * driContextPriv,
|
||||||
unsigned major_version,
|
unsigned major_version,
|
||||||
unsigned minor_version,
|
unsigned minor_version,
|
||||||
|
uint32_t flags,
|
||||||
unsigned *error,
|
unsigned *error,
|
||||||
void *sharedContextPrivate);
|
void *sharedContextPrivate);
|
||||||
|
|
||||||
|
@@ -151,6 +151,7 @@ i915CreateContext(int api,
|
|||||||
__DRIcontext * driContextPriv,
|
__DRIcontext * driContextPriv,
|
||||||
unsigned major_version,
|
unsigned major_version,
|
||||||
unsigned minor_version,
|
unsigned minor_version,
|
||||||
|
uint32_t flags,
|
||||||
unsigned *error,
|
unsigned *error,
|
||||||
void *sharedContextPrivate)
|
void *sharedContextPrivate)
|
||||||
{
|
{
|
||||||
@@ -168,7 +169,7 @@ i915CreateContext(int api,
|
|||||||
|
|
||||||
i915InitDriverFunctions(&functions);
|
i915InitDriverFunctions(&functions);
|
||||||
|
|
||||||
if (!intelInitContext(intel, api, major_version, minor_version,
|
if (!intelInitContext(intel, api, major_version, minor_version, flags,
|
||||||
mesaVis, driContextPriv,
|
mesaVis, driContextPriv,
|
||||||
sharedContextPrivate, &functions,
|
sharedContextPrivate, &functions,
|
||||||
error)) {
|
error)) {
|
||||||
|
@@ -324,6 +324,7 @@ extern bool i915CreateContext(int api,
|
|||||||
__DRIcontext * driContextPriv,
|
__DRIcontext * driContextPriv,
|
||||||
unsigned major_version,
|
unsigned major_version,
|
||||||
unsigned minor_version,
|
unsigned minor_version,
|
||||||
|
uint32_t flags,
|
||||||
unsigned *error,
|
unsigned *error,
|
||||||
void *sharedContextPrivate);
|
void *sharedContextPrivate);
|
||||||
|
|
||||||
|
@@ -146,6 +146,7 @@ src_vector(struct i915_fragment_program *p,
|
|||||||
case PROGRAM_OUTPUT:
|
case PROGRAM_OUTPUT:
|
||||||
switch (source->Index) {
|
switch (source->Index) {
|
||||||
case FRAG_RESULT_COLOR:
|
case FRAG_RESULT_COLOR:
|
||||||
|
case FRAG_RESULT_DATA0:
|
||||||
src = UREG(REG_TYPE_OC, 0);
|
src = UREG(REG_TYPE_OC, 0);
|
||||||
break;
|
break;
|
||||||
case FRAG_RESULT_DEPTH:
|
case FRAG_RESULT_DEPTH:
|
||||||
|
@@ -409,6 +409,7 @@ intelInitContext(struct intel_context *intel,
|
|||||||
int api,
|
int api,
|
||||||
unsigned major_version,
|
unsigned major_version,
|
||||||
unsigned minor_version,
|
unsigned minor_version,
|
||||||
|
uint32_t flags,
|
||||||
const struct gl_config * mesaVis,
|
const struct gl_config * mesaVis,
|
||||||
__DRIcontext * driContextPriv,
|
__DRIcontext * driContextPriv,
|
||||||
void *sharedContextPrivate,
|
void *sharedContextPrivate,
|
||||||
|
@@ -401,6 +401,7 @@ extern bool intelInitContext(struct intel_context *intel,
|
|||||||
int api,
|
int api,
|
||||||
unsigned major_version,
|
unsigned major_version,
|
||||||
unsigned minor_version,
|
unsigned minor_version,
|
||||||
|
uint32_t flags,
|
||||||
const struct gl_config * mesaVis,
|
const struct gl_config * mesaVis,
|
||||||
__DRIcontext * driContextPriv,
|
__DRIcontext * driContextPriv,
|
||||||
void *sharedContextPrivate,
|
void *sharedContextPrivate,
|
||||||
|
@@ -741,7 +741,7 @@ i915_query_renderer_integer(__DRIscreen *psp, int param, unsigned int *value)
|
|||||||
* (uint64_t) system_page_size;
|
* (uint64_t) system_page_size;
|
||||||
|
|
||||||
const unsigned system_memory_megabytes =
|
const unsigned system_memory_megabytes =
|
||||||
(unsigned) (system_memory_bytes / 1024);
|
(unsigned) (system_memory_bytes / (1024 * 1024));
|
||||||
|
|
||||||
value[0] = MIN2(system_memory_megabytes, gpu_mappable_megabytes);
|
value[0] = MIN2(system_memory_megabytes, gpu_mappable_megabytes);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -930,6 +930,7 @@ i830CreateContext(int api,
|
|||||||
__DRIcontext *driContextPriv,
|
__DRIcontext *driContextPriv,
|
||||||
unsigned major_version,
|
unsigned major_version,
|
||||||
unsigned minor_version,
|
unsigned minor_version,
|
||||||
|
uint32_t flags,
|
||||||
unsigned *error,
|
unsigned *error,
|
||||||
void *sharedContextPrivate);
|
void *sharedContextPrivate);
|
||||||
|
|
||||||
@@ -939,6 +940,7 @@ i915CreateContext(int api,
|
|||||||
__DRIcontext *driContextPriv,
|
__DRIcontext *driContextPriv,
|
||||||
unsigned major_version,
|
unsigned major_version,
|
||||||
unsigned minor_version,
|
unsigned minor_version,
|
||||||
|
uint32_t flags,
|
||||||
unsigned *error,
|
unsigned *error,
|
||||||
void *sharedContextPrivate);
|
void *sharedContextPrivate);
|
||||||
|
|
||||||
@@ -970,13 +972,13 @@ intelCreateContext(gl_api api,
|
|||||||
|
|
||||||
if (IS_9XX(intelScreen->deviceID)) {
|
if (IS_9XX(intelScreen->deviceID)) {
|
||||||
success = i915CreateContext(api, mesaVis, driContextPriv,
|
success = i915CreateContext(api, mesaVis, driContextPriv,
|
||||||
major_version, minor_version, error,
|
major_version, minor_version, flags,
|
||||||
sharedContextPrivate);
|
error, sharedContextPrivate);
|
||||||
} else {
|
} else {
|
||||||
intelScreen->no_vbo = true;
|
intelScreen->no_vbo = true;
|
||||||
success = i830CreateContext(api, mesaVis, driContextPriv,
|
success = i830CreateContext(api, mesaVis, driContextPriv,
|
||||||
major_version, minor_version, error,
|
major_version, minor_version, flags,
|
||||||
sharedContextPrivate);
|
error, sharedContextPrivate);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
|
@@ -266,7 +266,6 @@ retry:
|
|||||||
*/
|
*/
|
||||||
brw->state.dirty.brw = ~0;
|
brw->state.dirty.brw = ~0;
|
||||||
brw->state.dirty.cache = ~0;
|
brw->state.dirty.cache = ~0;
|
||||||
brw->batch.need_workaround_flush = true;
|
|
||||||
brw->ib.type = -1;
|
brw->ib.type = -1;
|
||||||
intel_batchbuffer_clear_cache(brw);
|
intel_batchbuffer_clear_cache(brw);
|
||||||
|
|
||||||
|
@@ -662,6 +662,8 @@ brwCreateContext(gl_api api,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
driContextSetFlags(ctx, flags);
|
||||||
|
|
||||||
/* Initialize the software rasterizer and helper modules.
|
/* Initialize the software rasterizer and helper modules.
|
||||||
*
|
*
|
||||||
* As of GL 3.1 core, the gen4+ driver doesn't need the swrast context for
|
* As of GL 3.1 core, the gen4+ driver doesn't need the swrast context for
|
||||||
@@ -697,12 +699,6 @@ brwCreateContext(gl_api api,
|
|||||||
|
|
||||||
intel_batchbuffer_init(brw);
|
intel_batchbuffer_init(brw);
|
||||||
|
|
||||||
brw_init_state(brw);
|
|
||||||
|
|
||||||
intelInitExtensions(ctx);
|
|
||||||
|
|
||||||
intel_fbo_init(brw);
|
|
||||||
|
|
||||||
if (brw->gen >= 6) {
|
if (brw->gen >= 6) {
|
||||||
/* Create a new hardware context. Using a hardware context means that
|
/* Create a new hardware context. Using a hardware context means that
|
||||||
* our GPU state will be saved/restored on context switch, allowing us
|
* our GPU state will be saved/restored on context switch, allowing us
|
||||||
@@ -720,6 +716,12 @@ brwCreateContext(gl_api api,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
brw_init_state(brw);
|
||||||
|
|
||||||
|
intelInitExtensions(ctx);
|
||||||
|
|
||||||
|
intel_fbo_init(brw);
|
||||||
|
|
||||||
brw_init_surface_formats(brw);
|
brw_init_surface_formats(brw);
|
||||||
|
|
||||||
if (brw->is_g4x || brw->gen >= 5) {
|
if (brw->is_g4x || brw->gen >= 5) {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user