Compare commits
208 Commits
mesa-10.4.
...
10.4
Author | SHA1 | Date | |
---|---|---|---|
|
cb154bb221 | ||
|
d26f3c1f86 | ||
|
b7b218f3f6 | ||
|
832c94a55c | ||
|
70832be2f1 | ||
|
ad259df2e0 | ||
|
df2db2a55f | ||
|
0506f69f08 | ||
|
a563045009 | ||
|
b2e243f70c | ||
|
8c25b0f2d1 | ||
|
a91ee1e187 | ||
|
977626f10a | ||
|
b451a2ffbf | ||
|
a561eee82c | ||
|
80ef80d087 | ||
|
fa8bfb3ed1 | ||
|
025cf8cb3f | ||
|
4db4f70546 | ||
|
d4a95ffcda | ||
|
97b0219ed5 | ||
|
93273f16af | ||
|
8e8d215cae | ||
|
1a929baa0b | ||
|
3a625d0b3f | ||
|
944ef59b2f | ||
|
fc9dd495b2 | ||
|
542a754524 | ||
|
e559d126f9 | ||
|
fc5881ad73 | ||
|
9508ca24f1 | ||
|
644bbf88ec | ||
|
a369361f9e | ||
|
f1663a5236 | ||
|
e1b5bc9330 | ||
|
93edf3e7dc | ||
|
66a3f104a5 | ||
|
afa7a851da | ||
|
d880aa573c | ||
|
741aeba26f | ||
|
a598a9bdfe | ||
|
0c46d850d9 | ||
|
da46b1b160 | ||
|
7e723c98ce | ||
|
0a51529a28 | ||
|
2a9e9b5aeb | ||
|
120792fa04 | ||
|
39ae85732d | ||
|
61c1aabb9f | ||
|
6da4e66d4e | ||
|
7e57411b9a | ||
|
1e6735ead1 | ||
|
deea686c71 | ||
|
41bdeda102 | ||
|
a5c608e951 | ||
|
e0276bc297 | ||
|
dc16fb1969 | ||
|
aaa823569b | ||
|
f57b41758d | ||
|
67ac6a3951 | ||
|
5d04b9eeed | ||
|
53041aecef | ||
|
f76bcbb4cd | ||
|
89289934fc | ||
|
dbf82d753b | ||
|
b786e6332b | ||
|
c0ce908a90 | ||
|
c83c5f4b69 | ||
|
f2663112f6 | ||
|
2ad93851ff | ||
|
e35e6773c2 | ||
|
51bdd19c97 | ||
|
5c623ff071 | ||
|
654f197f19 | ||
|
162cee83ba | ||
|
54da987bae | ||
|
62eb27ac8b | ||
|
a824179af5 | ||
|
fecedb6c43 | ||
|
9d1d1f46c7 | ||
|
b51d369690 | ||
|
eab8dc28ed | ||
|
cc580045a8 | ||
|
0d721fa1d6 | ||
|
c96ed76b3d | ||
|
49a5bce780 | ||
|
e92bfa3f95 | ||
|
f70e4d4afd | ||
|
42806f12a9 | ||
|
4c9b64fc44 | ||
|
69c7cf70e7 | ||
|
4d04fd0871 | ||
|
0727ab961c | ||
|
7280ddea9d | ||
|
425bc89720 | ||
|
0b3f8c72f7 | ||
|
63e668eb18 | ||
|
2b4c577730 | ||
|
e3a393b4c3 | ||
|
7ecd0f9528 | ||
|
336887bca1 | ||
|
8e08ba6f96 | ||
|
77e1136f44 | ||
|
22c75f9f5a | ||
|
4b65be8860 | ||
|
9ea8e7f0df | ||
|
d0d09a4eee | ||
|
75f39e45f0 | ||
|
553089093f | ||
|
add30f01ef | ||
|
0dfb9c9e86 | ||
|
7e26cf83ba | ||
|
00d22ce0fa | ||
|
7f700cc35b | ||
|
e6167e749c | ||
|
bce0058333 | ||
|
9a0647ba7f | ||
|
669c5d6d44 | ||
|
87ac37074f | ||
|
e1bcca4f13 | ||
|
50ea1c1f5f | ||
|
3ca8b93476 | ||
|
d06b403377 | ||
|
481af42f28 | ||
|
393fffd07d | ||
|
c159b4095c | ||
|
b80b5b35a3 | ||
|
41ca03a7b4 | ||
|
18ac34825b | ||
|
15ef84ccfb | ||
|
44ee59d300 | ||
|
1e0ab5b826 | ||
|
a3381286d8 | ||
|
882f702441 | ||
|
a25e26f67f | ||
|
021d71b848 | ||
|
14f1659b43 | ||
|
02f2e97c3e | ||
|
5906dd6c99 | ||
|
2d05942b74 | ||
|
099ed78a04 | ||
|
91c5770ba1 | ||
|
3306ed6fd7 | ||
|
81f8006f7d | ||
|
1b498cf5b7 | ||
|
8c77be7ef9 | ||
|
ef43d21bbc | ||
|
ac3ca98a1b | ||
|
af1a690075 | ||
|
fffe533f08 | ||
|
4d5e0f78b7 | ||
|
b9e56ea151 | ||
|
e05c595acd | ||
|
c48d0d8dd2 | ||
|
aafd13027a | ||
|
1f42230fa7 | ||
|
2b85ed72db | ||
|
4cd38a592e | ||
|
60e2e04fe8 | ||
|
1a3df8cc77 | ||
|
45416a255f | ||
|
fb3f7c0bc5 | ||
|
4f570f2fb3 | ||
|
a4c8348597 | ||
|
893583776e | ||
|
2d669f6583 | ||
|
bccfe7ae0f | ||
|
ee241a6889 | ||
|
4b37a18da5 | ||
|
93f6f55983 | ||
|
af0c82099b | ||
|
5fe79b0b12 | ||
|
45f3aa0bc7 | ||
|
90239276ff | ||
|
57868b1ee4 | ||
|
fe2eac2237 | ||
|
db784a09f1 | ||
|
d9f4aaa095 | ||
|
e340a28dba | ||
|
6b908efd58 | ||
|
65f03e6733 | ||
|
ffaf58e7d0 | ||
|
bb9dea8a29 | ||
|
be59440b53 | ||
|
ac8d596498 | ||
|
112d2fdb17 | ||
|
c6353cee0c | ||
|
09e4f1a50f | ||
|
c7b9a2e38a | ||
|
6fcbf9aee3 | ||
|
fd2852fe5b | ||
|
57057c439e | ||
|
b5cc04b6ad | ||
|
d2e9fd5b6d | ||
|
b61192f2ae | ||
|
75c4824d2f | ||
|
f30fbbdbdd | ||
|
b247956c77 | ||
|
72a802a9c2 | ||
|
cfbc474d80 | ||
|
360872a45e | ||
|
42839ea5ba | ||
|
8dc03bd575 | ||
|
41906e9764 | ||
|
56572002fc | ||
|
c0e0de45dc | ||
|
b75a285633 | ||
|
1cf4dbdc81 |
18
bin/.cherry-ignore
Normal file
18
bin/.cherry-ignore
Normal file
@@ -0,0 +1,18 @@
|
||||
# No whitespace commits in stable.
|
||||
a10bf5c10caf27232d4df8da74d5c35c23eb883d
|
||||
|
||||
# The following patches address code which is missing in 10.4
|
||||
# http://lists.freedesktop.org/archives/mesa-dev/2015-March/078515.html
|
||||
06084652fefe49c3d6bf1b476ff74ff602fdc22a common: Correct texture init for meta pbo uploads and downloads.
|
||||
|
||||
# http://lists.freedesktop.org/archives/mesa-dev/2015-March/078547.html
|
||||
ccc5ce6f72c1ec86be4dfcef96c0b51fba0faa6d common: Correct PBO 2D_ARRAY handling.
|
||||
|
||||
# http://lists.freedesktop.org/archives/mesa-dev/2015-March/078549.html
|
||||
546aba143d13ba3f993ead4cc30b2404abfc0202 common: Fix PBOs for 1D_ARRAY.
|
||||
|
||||
# http://lists.freedesktop.org/archives/mesa-dev/2015-March/078501.html
|
||||
2b2fa1865248c6e3b7baec81c4f92774759b201f mesa: Indent break statements and add a missing one.
|
||||
|
||||
# http://lists.freedesktop.org/archives/mesa-dev/2015-March/078502.html
|
||||
87109acbed9c9b52f33d58ca06d9048d0ac7a215 mesa: Free memory allocated for luminance in readpixels.
|
@@ -14,7 +14,7 @@ git log --reverse --grep="cherry picked from commit" origin/master..HEAD |\
|
||||
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
|
||||
|
||||
# Grep for commits that were marked as a candidate for the stable tree.
|
||||
git log --reverse --pretty=%H -i --grep='^\([[:space:]]*NOTE: .*[Cc]andidate\|CC:.*mesa-stable\)' HEAD..origin/master |\
|
||||
git log --reverse --pretty=%H -i --grep='^\([[:space:]]*NOTE: .*[Cc]andidate\|CC:.*10\.4.*mesa-stable\)' HEAD..origin/master |\
|
||||
while read sha
|
||||
do
|
||||
# Check to see whether the patch is on the ignore list.
|
||||
|
13
configure.ac
13
configure.ac
@@ -252,8 +252,16 @@ AC_SUBST([VISIBILITY_CXXFLAGS])
|
||||
dnl
|
||||
dnl Optional flags, check for compiler support
|
||||
dnl
|
||||
SSE41_CFLAGS="-msse4.1"
|
||||
dnl Code compiled by GCC with -msse* assumes a 16 byte aligned
|
||||
dnl stack, but on x86-32 such alignment is not guaranteed.
|
||||
case "$target_cpu" in
|
||||
i?86)
|
||||
SSE41_CFLAGS="$SSE41_CFLAGS -mstackrealign"
|
||||
;;
|
||||
esac
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="-msse4.1 $CFLAGS"
|
||||
CFLAGS="$SSE41_CFLAGS $CFLAGS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <smmintrin.h>
|
||||
int main () {
|
||||
@@ -266,6 +274,7 @@ if test "x$SSE41_SUPPORTED" = x1; then
|
||||
DEFINES="$DEFINES -DUSE_SSE41"
|
||||
fi
|
||||
AM_CONDITIONAL([SSE41_SUPPORTED], [test x$SSE41_SUPPORTED = x1])
|
||||
AC_SUBST([SSE41_CFLAGS], $SSE41_CFLAGS)
|
||||
|
||||
dnl Can't have static and shared libraries, default to static if user
|
||||
dnl explicitly requested. If both disabled, set to static since shared
|
||||
@@ -1707,7 +1716,7 @@ if test "x$enable_gallium_llvm" = xyes; then
|
||||
fi
|
||||
|
||||
if test "x$enable_opencl" = xyes; then
|
||||
LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo linker instrumentation"
|
||||
LLVM_COMPONENTS="${LLVM_COMPONENTS} all-targets ipo linker instrumentation"
|
||||
# LLVM 3.3 >= 177971 requires IRReader
|
||||
if $LLVM_CONFIG --components | grep -qw 'irreader'; then
|
||||
LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader"
|
||||
|
@@ -16,6 +16,13 @@
|
||||
|
||||
<h1>News</h1>
|
||||
|
||||
<h2>December 14, 2014</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.4.html">Mesa 10.4</a> is released. This is a new
|
||||
development release. See the release notes for more information about
|
||||
the release.
|
||||
</p>
|
||||
|
||||
<h2>November 8, 2014</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.3.3.html">Mesa 10.3.3</a> is released.
|
||||
|
@@ -21,6 +21,7 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="relnotes/10.4.html">10.4 release notes</a>
|
||||
<li><a href="relnotes/10.3.3.html">10.3.3 release notes</a>
|
||||
<li><a href="relnotes/10.3.2.html">10.3.2 release notes</a>
|
||||
<li><a href="relnotes/10.3.1.html">10.3.1 release notes</a>
|
||||
|
@@ -88,6 +88,8 @@ following options during configure, if you would like support for svga driver
|
||||
Note: The files are installed in $(libdir)/gallium-pipe/ and the interface
|
||||
between them and libxatracker.so is <strong>not</strong> stable.
|
||||
</p>
|
||||
|
||||
<li>The environment variable GALLIUM_MSAA that forced a multisample GLX visual was removed.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@@ -327,6 +327,7 @@ DRM drivers that don't have a full-fledged GEM (such as qxl or simpledrm)</li>
|
||||
<li>Removed support for the GL_ATI_envmap_bumpmap extension</li>
|
||||
<li>The hacky --enable-32/64-bit is no longer available in configure. To build
|
||||
32/64 bit mesa refer to the default method recommended by your distribution</li>
|
||||
</li>The environment variable GALLIUM_MSAA that forced a multisample GLX visual was removed.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
97
docs/relnotes/10.4.1.html
Normal file
97
docs/relnotes/10.4.1.html
Normal file
@@ -0,0 +1,97 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.4.1 Release Notes / December 29, 2014</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.4.1 is a bug fix release which fixes bugs found since the 10.4.0 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.4.1 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
5311285e791a6bfaa468ad002bd1e1164acb3eaa040b5a1bf958bdb7c27e0a9d MesaLib-10.4.1.tar.gz
|
||||
91e8b71c8aff4cb92022a09a872b1c5d1ae5bfec8c6c84dbc4221333da5bf1ca MesaLib-10.4.1.tar.bz2
|
||||
e09c8135f5a86ecb21182c6f8959aafd39ae2f98858fdf7c0e25df65b5abcdb8 MesaLib-10.4.1.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=82585">Bug 82585</a> - geometry shader with optional out variable segfaults</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82991">Bug 82991</a> - Inverted bumpmap in webgl applications</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83908">Bug 83908</a> - [i965] Incorrect icon colors in Steam Big Picture</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Andres Gomez (1):</p>
|
||||
<ul>
|
||||
<li>i965/brw_reg: struct constructor now needs explicit negate and abs values.</li>
|
||||
</ul>
|
||||
|
||||
<p>Cody Northrop (1):</p>
|
||||
<ul>
|
||||
<li>i965: Require pixel alignment for GPU copy blit</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (3):</p>
|
||||
<ul>
|
||||
<li>docs: Add 10.4 sha256 sums, news item and link release notes</li>
|
||||
<li>Revert "glx/dri3: Request non-vsynced Present for swapinterval zero. (v3)"</li>
|
||||
<li>Update version to 10.4.1</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (2):</p>
|
||||
<ul>
|
||||
<li>linker: Wrap access of producer_var with a NULL check</li>
|
||||
<li>linker: Assign varying locations geometry shader inputs for SSO</li>
|
||||
</ul>
|
||||
|
||||
<p>Mario Kleiner (4):</p>
|
||||
<ul>
|
||||
<li>glx/dri3: Fix glXWaitForSbcOML() to handle targetSBC==0 correctly. (v2)</li>
|
||||
<li>glx/dri3: Track separate (ust, msc) for PresentPixmap vs. PresentNotifyMsc (v2)</li>
|
||||
<li>glx/dri3: Request non-vsynced Present for swapinterval zero. (v3)</li>
|
||||
<li>glx/dri3: Don't fail on glXSwapBuffersMscOML(dpy, window, 0, 0, 0) (v2)</li>
|
||||
</ul>
|
||||
|
||||
<p>Maxence Le Doré (1):</p>
|
||||
<ul>
|
||||
<li>glsl: Add gl_MaxViewports to available builtin constants</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
127
docs/relnotes/10.4.2.html
Normal file
127
docs/relnotes/10.4.2.html
Normal file
@@ -0,0 +1,127 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.4.2 Release Notes / January 12, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.4.2 is a bug fix release which fixes bugs found since the 10.4.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.4.2 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
e303e77dd774df0d051b2870b165f98c97084a55980f884731df89c1b56a6146 MesaLib-10.4.2.tar.gz
|
||||
08a119937d9f2aa2f66dd5de97baffc2a6e675f549e40e699a31f5485d15327f MesaLib-10.4.2.tar.bz2
|
||||
c2c2921a80a3395824f02bee4572a6a17d6a12a928a3e497618eeea04fb06490 MesaLib-10.4.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=85529">Bug 85529</a> - Surfaces not drawn in Unvanquished</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=87619">Bug 87619</a> - Changes to state such as render targets change fragment shader without marking it dirty.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=87658">Bug 87658</a> - [llvmpipe] SEGV in sse2_has_daz on ancient Pentium4-M</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=87913">Bug 87913</a> - CPU cacheline size of 0 can be returned by CPUID leaf 0x80000006 in some virtual machines</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Chad Versace (2):</p>
|
||||
<ul>
|
||||
<li>i965: Use safer pointer arithmetic in intel_texsubimage_tiled_memcpy()</li>
|
||||
<li>i965: Use safer pointer arithmetic in gather_oa_results()</li>
|
||||
</ul>
|
||||
|
||||
<p>Dave Airlie (3):</p>
|
||||
<ul>
|
||||
<li>Revert "r600g/sb: fix issues cause by GLSL switching to loops for switch"</li>
|
||||
<li>r600g: fix regression since UCMP change</li>
|
||||
<li>r600g/sb: implement r600 gpr index workaround. (v3.1)</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (2):</p>
|
||||
<ul>
|
||||
<li>docs: Add sha256 sums for the 10.4.1 release</li>
|
||||
<li>Update version to 10.4.2</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (2):</p>
|
||||
<ul>
|
||||
<li>nv50,nvc0: set vertex id base to index_bias</li>
|
||||
<li>nv50/ir: fix texture offsets in release builds</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (2):</p>
|
||||
<ul>
|
||||
<li>i965: Add missing BRW_NEW_*_PROG_DATA to texture/renderbuffer atoms.</li>
|
||||
<li>i965: Fix start/base_vertex_location for >1 prims but !BRW_NEW_VERTICES.</li>
|
||||
</ul>
|
||||
|
||||
<p>Leonid Shatz (1):</p>
|
||||
<ul>
|
||||
<li>gallium/util: make sure cache line size is not zero</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (4):</p>
|
||||
<ul>
|
||||
<li>glsl_to_tgsi: fix a bug in copy propagation</li>
|
||||
<li>vbo: ignore primitive restart if FixedIndex is enabled in DrawArrays</li>
|
||||
<li>st/mesa: fix GL_PRIMITIVE_RESTART_FIXED_INDEX</li>
|
||||
<li>radeonsi: fix VertexID for OpenGL</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (1):</p>
|
||||
<ul>
|
||||
<li>radeonsi: Don't modify PA_SC_RASTER_CONFIG register value if rb_mask == 0</li>
|
||||
</ul>
|
||||
|
||||
<p>Roland Scheidegger (1):</p>
|
||||
<ul>
|
||||
<li>gallium/util: fix crash with daz detection on x86</li>
|
||||
</ul>
|
||||
|
||||
<p>Tiziano Bacocco (1):</p>
|
||||
<ul>
|
||||
<li>nv50,nvc0: implement half_pixel_center</li>
|
||||
</ul>
|
||||
|
||||
<p>Vadim Girlin (1):</p>
|
||||
<ul>
|
||||
<li>r600g/sb: fix issues with loops created for switch</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
145
docs/relnotes/10.4.3.html
Normal file
145
docs/relnotes/10.4.3.html
Normal file
@@ -0,0 +1,145 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.4.3 Release Notes / January 24, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.4.3 is a bug fix release which fixes bugs found since the 10.4.2 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.4.3 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
c53eaafc83d9c6315f63e0904d9954d929b841b0b2be7a328eeb6e14f1376129 MesaLib-10.4.3.tar.gz
|
||||
ef6ecc9c2f36c9f78d1662382a69ae961f38f03af3a0c3268e53f351aa1978ad MesaLib-10.4.3.tar.bz2
|
||||
179325fc8ec66529d3b0d0c43ef61a33a44d91daa126c3bbdd1efdfd25a7db1d MesaLib-10.4.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=80568">Bug 80568</a> - [gen4] GPU Crash During Google Chrome Operation</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85367">Bug 85367</a> - [gen4] GPU hang in glmark-es2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85696">Bug 85696</a> - r600g+nine: Bioshock shader failure after 7b1c0cbc90d456384b0950ad21faa3c61a6b43ff</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88219">Bug 88219</a> - include/c11/threads_posix.h:197: undefined reference to `pthread_mutex_lock'</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Axel Davy (39):</p>
|
||||
<ul>
|
||||
<li>st/nine: Add new texture format strings</li>
|
||||
<li>st/nine: Correctly advertise D3DPMISCCAPS_CLIPTLVERTS</li>
|
||||
<li>st/nine: NineBaseTexture9: fix setting of last_layer</li>
|
||||
<li>st/nine: CubeTexture: fix GetLevelDesc</li>
|
||||
<li>st/nine: Fix crash when deleting non-implicit swapchain</li>
|
||||
<li>st/nine: Return D3DERR_INVALIDCALL when trying to create a texture of bad format</li>
|
||||
<li>st/nine: NineBaseTexture9: update sampler view creation</li>
|
||||
<li>st/nine: Check if srgb format is supported before trying to use it.</li>
|
||||
<li>st/nine: Add ATI1 and ATI2 support</li>
|
||||
<li>st/nine: Rework of boolean constants</li>
|
||||
<li>st/nine: Convert integer constants to floats before storing them when cards don't support integers</li>
|
||||
<li>st/nine: Remove some shader unused code</li>
|
||||
<li>st/nine: Saturate oFog and oPts vs outputs</li>
|
||||
<li>st/nine: Correctly declare NineTranslateInstruction_Mkxn inputs</li>
|
||||
<li>st/nine: Fix typo for M4x4</li>
|
||||
<li>st/nine: Fix POW implementation</li>
|
||||
<li>st/nine: Handle RSQ special cases</li>
|
||||
<li>st/nine: Handle NRM with input of null norm</li>
|
||||
<li>st/nine: Correct LOG on negative values</li>
|
||||
<li>st/nine: Rewrite LOOP implementation, and a0 aL handling</li>
|
||||
<li>st/nine: Fix CND implementation</li>
|
||||
<li>st/nine: Clamp ps 1.X constants</li>
|
||||
<li>st/nine: Fix some fixed function pipeline operation</li>
|
||||
<li>st/nine: Implement TEXCOORD special behaviours</li>
|
||||
<li>st/nine: Fill missing dst and src number for some instructions.</li>
|
||||
<li>st/nine: Fix TEXM3x3 and implement TEXM3x3VSPEC</li>
|
||||
<li>st/nine: implement TEXM3x2DEPTH</li>
|
||||
<li>st/nine: Implement TEXM3x2TEX</li>
|
||||
<li>st/nine: Implement TEXM3x3SPEC</li>
|
||||
<li>st/nine: Implement TEXDEPTH</li>
|
||||
<li>st/nine: Implement TEXDP3</li>
|
||||
<li>st/nine: Implement TEXDP3TEX</li>
|
||||
<li>st/nine: Implement TEXREG2AR, TEXREG2GB and TEXREG2RGB</li>
|
||||
<li>st/nine: Correct rules for relative adressing and constants.</li>
|
||||
<li>st/nine: Remove unused code for ps</li>
|
||||
<li>st/nine: Fix sm3 relative addressing for non-debug build</li>
|
||||
<li>st/nine: Add variables containing the size of the constant buffers</li>
|
||||
<li>st/nine: Allocate the correct size for the user constant buffer</li>
|
||||
<li>st/nine: Allocate vs constbuf buffer for indirect addressing once.</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (2):</p>
|
||||
<ul>
|
||||
<li>docs: Add sha256 sums for the 10.4.2 release</li>
|
||||
<li>Update version to 10.4.3</li>
|
||||
</ul>
|
||||
|
||||
<p>Jason Ekstrand (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix clamping to -1.0 in snorm_to_float</li>
|
||||
</ul>
|
||||
|
||||
<p>Jonathan Gray (1):</p>
|
||||
<ul>
|
||||
<li>glsl: Link glsl_test with pthreads library.</li>
|
||||
</ul>
|
||||
|
||||
<p>Jose Fonseca (1):</p>
|
||||
<ul>
|
||||
<li>nine: Drop use of TGSI_OPCODE_CND.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (2):</p>
|
||||
<ul>
|
||||
<li>i965: Respect the no_8 flag on Gen6, not just Gen7+.</li>
|
||||
<li>i965: Work around mysterious Gen4 GPU hangs with minimal state changes.</li>
|
||||
</ul>
|
||||
|
||||
<p>Stanislaw Halik (1):</p>
|
||||
<ul>
|
||||
<li>st/nine: Hack to generate resource if it doesn't exist when getting view</li>
|
||||
</ul>
|
||||
|
||||
<p>Xavier Bouchoux (3):</p>
|
||||
<ul>
|
||||
<li>st/nine: Additional defines to d3dtypes.h</li>
|
||||
<li>st/nine: Add missing c++ declaration for IDirect3DVolumeTexture9</li>
|
||||
<li>st/nine: Fix D3DRS_POINTSPRITE support</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
100
docs/relnotes/10.4.4.html
Normal file
100
docs/relnotes/10.4.4.html
Normal file
@@ -0,0 +1,100 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.4.4 Release Notes / February 06, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.4.4 is a bug fix release which fixes bugs found since the 10.4.3 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.4.4 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
5cb427eaf980cb8555953e9928f5797979ed783e277745d5f8cbae8bc5364086 MesaLib-10.4.4.tar.gz
|
||||
f18a967e9c4d80e054b2fdff8c130ce6e6d1f8eecfc42c9f354f8628d8b4df1c MesaLib-10.4.4.tar.bz2
|
||||
86baad73b77920c80fe58402a905e7dd17e3ea10ead6ea7d3afdc0a56c860bd7 MesaLib-10.4.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=88662">Bug 88662</a> - unaligned access to gl_dlist_node</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88930">Bug 88930</a> - [osmesa] osbuffer->textures should be indexed by attachment type</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Brian Paul (1):</p>
|
||||
<ul>
|
||||
<li>mesa: fix display list 8-byte alignment issue</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (2):</p>
|
||||
<ul>
|
||||
<li>docs: Add sha256 sums for the 10.4.3 release</li>
|
||||
<li>Update version to 10.4.4</li>
|
||||
</ul>
|
||||
|
||||
<p>José Fonseca (1):</p>
|
||||
<ul>
|
||||
<li>egl: Pass the correct X visual depth to xcb_put_image().</li>
|
||||
</ul>
|
||||
|
||||
<p>Mario Kleiner (1):</p>
|
||||
<ul>
|
||||
<li>glx/dri3: Request non-vsynced Present for swapinterval zero. (v3)</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (1):</p>
|
||||
<ul>
|
||||
<li>gallium/util: Don't use __builtin_clrsb in util_last_bit().</li>
|
||||
</ul>
|
||||
|
||||
<p>Niels Ole Salscheider (1):</p>
|
||||
<ul>
|
||||
<li>configure: Link against all LLVM targets when building clover</li>
|
||||
</ul>
|
||||
|
||||
<p>Park, Jeongmin (1):</p>
|
||||
<ul>
|
||||
<li>st/osmesa: Fix osbuffer->textures indexing</li>
|
||||
</ul>
|
||||
|
||||
<p>Ville Syrjälä (1):</p>
|
||||
<ul>
|
||||
<li>i965: Fix max_wm_threads for CHV</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
114
docs/relnotes/10.4.5.html
Normal file
114
docs/relnotes/10.4.5.html
Normal file
@@ -0,0 +1,114 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.4.5 Release Notes / February 21, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.4.5 is a bug fix release which fixes bugs found since the 10.4.4 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.4.5 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
e12bbdaee9a758617e8ebd0bb0e987f72addd11db2e4da25ba695e386cd63843 MesaLib-10.4.5.tar.gz
|
||||
bf60000700a9d58e3aca2bfeee7e781053b0d839e61a95b1883e05a2dee247a0 MesaLib-10.4.5.tar.bz2
|
||||
3b926de8eee500bb67cf85332c51292f826cc539b8636382aadbb8e70c76527a MesaLib-10.4.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=82477">Bug 82477</a> - [softpipe] piglit fp-long-alu regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88658">Bug 88658</a> - (bisected) Slow video playback on Kabini</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89069">Bug 89069</a> - Lack of grass in The Talos Principle on radeonsi (native\wine\nine)</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Carl Worth (1):</p>
|
||||
<ul>
|
||||
<li>Revert use of Mesa IR optimizer for ARB_fragment_programs</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (3):</p>
|
||||
<ul>
|
||||
<li>docs: Add sha256 sums for the 10.4.4 release</li>
|
||||
<li>get-pick-list.sh: Require explicit "10.4" for nominating stable patches</li>
|
||||
<li>Update version to 10.4.5</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (3):</p>
|
||||
<ul>
|
||||
<li>nvc0: bail out of 2d blits with non-A8_UNORM alpha formats</li>
|
||||
<li>st/mesa: treat resource-less xfb buffers as if they weren't there</li>
|
||||
<li>nvc0: allow holes in xfb target lists</li>
|
||||
</ul>
|
||||
|
||||
<p>Jeremy Huddleston Sequoia (2):</p>
|
||||
<ul>
|
||||
<li>darwin: build fix</li>
|
||||
<li>darwin: build fix</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (4):</p>
|
||||
<ul>
|
||||
<li>i965: Override swizzles for integer luminance formats.</li>
|
||||
<li>i965: Use a gl_color_union for sampler border color.</li>
|
||||
<li>i965: Fix integer border color on Haswell.</li>
|
||||
<li>glsl: Reduce memory consumption of copy propagation passes.</li>
|
||||
</ul>
|
||||
|
||||
<p>Laura Ekstrand (1):</p>
|
||||
<ul>
|
||||
<li>main: Fixed _mesa_GetCompressedTexImage_sw to copy slices correctly.</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (5):</p>
|
||||
<ul>
|
||||
<li>r600g,radeonsi: don't append to streamout buffers that haven't been used yet</li>
|
||||
<li>radeonsi: fix instanced arrays with non-zero start instance</li>
|
||||
<li>radeonsi: small fix in SPI state</li>
|
||||
<li>mesa: fix AtomicBuffer typo in _mesa_DeleteBuffers</li>
|
||||
<li>radeonsi: fix a crash if a stencil ref state is set before a DSA state</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (2):</p>
|
||||
<ul>
|
||||
<li>st/mesa: Don't use PIPE_USAGE_STREAM for GL_PIXEL_UNPACK_BUFFER_ARB</li>
|
||||
<li>Revert "radeon/llvm: enable unsafe math for graphics shaders"</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
143
docs/relnotes/10.4.6.html
Normal file
143
docs/relnotes/10.4.6.html
Normal file
@@ -0,0 +1,143 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.4.6 Release Notes / March 06, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.4.6 is a bug fix release which fixes bugs found since the 10.4.5 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.4.6 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
46c9082142e811c01e49a2c332a9ac0a1eb98f2908985fb9df216539d7eaeaf4 MesaLib-10.4.6.tar.gz
|
||||
d8baedd20e79ccd98a5a7b05e23d59a30892e68de1fcc057ca6873dafca02735 MesaLib-10.4.6.tar.bz2
|
||||
6aded6eac7f0d4d55117b8b581d8424710bbb4c768fc90f7b881f29311a751aa MesaLib-10.4.6.zip
|
||||
</pre>
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=45348">Bug 45348</a> - [swrast] piglit fbo-drawbuffers-arbfp regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84613">Bug 84613</a> - [G965, bisected] piglit regressions : glslparsertest.glsl2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=87516">Bug 87516</a> - glProgramBinary violates spec</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88885">Bug 88885</a> - Transform feedback uses incorrect interleaving if a previous draw did not write gl_Position</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89180">Bug 89180</a> - [IVB regression] Rendering issues in Mass Effect through VMware Workstation</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Abdiel Janulgue (2):</p>
|
||||
<ul>
|
||||
<li>glsl: Don't optimize min/max into saturate when EmitNoSat is set</li>
|
||||
<li>st/mesa: For vertex shaders, don't emit saturate when SM 3.0 is unsupported</li>
|
||||
</ul>
|
||||
|
||||
<p>Andreas Boll (1):</p>
|
||||
<ul>
|
||||
<li>glx: Fix returned values of GLX_RENDERER_PREFERRED_PROFILE_MESA</li>
|
||||
</ul>
|
||||
|
||||
<p>Brian Paul (2):</p>
|
||||
<ul>
|
||||
<li>swrast: fix multiple color buffer writing</li>
|
||||
<li>st/mesa: fix sampler view reference counting bug in glDraw/CopyPixels</li>
|
||||
</ul>
|
||||
|
||||
<p>Chris Forbes (1):</p>
|
||||
<ul>
|
||||
<li>i965/gs: Check newly-generated GS-out VUE map against correct stage</li>
|
||||
</ul>
|
||||
|
||||
<p>Eduardo Lima Mitev (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix error validating args for TexSubImage3D</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (6):</p>
|
||||
<ul>
|
||||
<li>docs: Add sha256 sums for the 10.4.5 release</li>
|
||||
<li>install-lib-links: remove the .install-lib-links file</li>
|
||||
<li>Revert "mesa: Correct backwards NULL check."</li>
|
||||
<li>mesa: cherry-pick the second half of commit 2aa71e9485a</li>
|
||||
<li>Revert "gallivm: Update for RTDyldMemoryManager becoming an unique_ptr."</li>
|
||||
<li>Update version to 10.4.6</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (3):</p>
|
||||
<ul>
|
||||
<li>mesa: Add missing error checks in _mesa_ProgramBinary</li>
|
||||
<li>mesa: Ensure that length is set to zero in _mesa_GetProgramBinary</li>
|
||||
<li>mesa: Always generate GL_INVALID_OPERATION in _mesa_GetProgramBinary</li>
|
||||
</ul>
|
||||
|
||||
<p>Jonathan Gray (1):</p>
|
||||
<ul>
|
||||
<li>auxilary/os: correct sysctl use in os_get_total_physical_memory()</li>
|
||||
</ul>
|
||||
|
||||
<p>José Fonseca (1):</p>
|
||||
<ul>
|
||||
<li>gallivm: Update for RTDyldMemoryManager becoming an unique_ptr.</li>
|
||||
</ul>
|
||||
|
||||
<p>Leo Liu (1):</p>
|
||||
<ul>
|
||||
<li>st/omx/dec/h264: fix picture out-of-order with poc type 0 v2</li>
|
||||
</ul>
|
||||
|
||||
<p>Lucas Stach (1):</p>
|
||||
<ul>
|
||||
<li>install-lib-links: don't depend on .libs directory</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (2):</p>
|
||||
<ul>
|
||||
<li>vbo: fix an unitialized-variable warning</li>
|
||||
<li>radeonsi: fix point sprites</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (4):</p>
|
||||
<ul>
|
||||
<li>glsl: Rewrite and fix min/max to saturate optimization.</li>
|
||||
<li>mesa: Correct backwards NULL check.</li>
|
||||
<li>i965/fs: Don't use backend_visitor::instructions after creating the CFG.</li>
|
||||
<li>mesa: Correct backwards NULL check.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
134
docs/relnotes/10.4.7.html
Normal file
134
docs/relnotes/10.4.7.html
Normal file
@@ -0,0 +1,134 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.4.7 Release Notes / March 20, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.4.7 is a bug fix release which fixes bugs found since the 10.4.6 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.4.7 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
9e7b59267199658808f8b33e0410b86fbafbdcd52378658b9df65fac9d24947f MesaLib-10.4.7.tar.gz
|
||||
2c351c98671f9a7ab3fd9c601bb7a255801b1580f5dd0992639f99152801b0d2 MesaLib-10.4.7.tar.bz2
|
||||
d14ac578b5ce16560757b53fbd1cb4d6b34652f8e110e4b10a019adc82e67ffd MesaLib-10.4.7.zip
|
||||
</pre>
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79202">Bug 79202</a> - valgrind errors in glsl-fs-uniform-array-loop-unroll.shader_test; random code generation</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89156">Bug 89156</a> - r300g: GL_COMPRESSED_RED_RGTC1 / ATI1N support broken</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89224">Bug 89224</a> - Incorrect rendering of Unigine Valley running in VM on VMware Workstation</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89530">Bug 89530</a> - FTBFS in loader: missing fstat</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Andrey Sudnik (1):</p>
|
||||
<ul>
|
||||
<li>i965/vec4: Don't lose the saturate modifier in copy propagation.</li>
|
||||
</ul>
|
||||
|
||||
<p>Daniel Stone (1):</p>
|
||||
<ul>
|
||||
<li>egl: Take alpha bits into account when selecting GBM formats</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (6):</p>
|
||||
<ul>
|
||||
<li>docs: Add sha256 sums for the 10.4.6 release</li>
|
||||
<li>cherry-ignore: add not applicable/rejected commits</li>
|
||||
<li>mesa: rename format_info.c to format_info.h</li>
|
||||
<li>loader: include <sys/stat.h> for non-sysfs builds</li>
|
||||
<li>auxiliary/os: fix the android build - s/drm_munmap/os_munmap/</li>
|
||||
<li>Update version to 10.4.7</li>
|
||||
</ul>
|
||||
|
||||
<p>Iago Toral Quiroga (1):</p>
|
||||
<ul>
|
||||
<li>i965: Fix out-of-bounds accesses into pull_constant_loc array</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (4):</p>
|
||||
<ul>
|
||||
<li>freedreno: move fb state copy after checking for size change</li>
|
||||
<li>freedreno/ir3: fix array count returned by TXQ</li>
|
||||
<li>freedreno/ir3: get the # of miplevels from getinfo</li>
|
||||
<li>freedreno: fix slice pitch calculations</li>
|
||||
</ul>
|
||||
|
||||
<p>Marc-Andre Lureau (1):</p>
|
||||
<ul>
|
||||
<li>gallium/auxiliary/indices: fix start param</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (4):</p>
|
||||
<ul>
|
||||
<li>r300g: fix RGTC1 and LATC1 SNORM formats</li>
|
||||
<li>r300g: fix a crash when resolving into an sRGB texture</li>
|
||||
<li>r300g: fix sRGB->sRGB blits</li>
|
||||
<li>radeonsi: increase coords array size for radeon_llvm_emit_prepare_cube_coords</li>
|
||||
</ul>
|
||||
|
||||
<p>Mario Kleiner (1):</p>
|
||||
<ul>
|
||||
<li>glx: Handle out-of-sequence swap completion events correctly. (v2)</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (2):</p>
|
||||
<ul>
|
||||
<li>r300g: Use PATH_MAX instead of limiting ourselves to 100 chars.</li>
|
||||
<li>r300g: Check return value of snprintf().</li>
|
||||
</ul>
|
||||
|
||||
<p>Rob Clark (2):</p>
|
||||
<ul>
|
||||
<li>freedreno/ir3: fix silly typo for binning pass shaders</li>
|
||||
<li>freedreno: update generated headers</li>
|
||||
</ul>
|
||||
|
||||
<p>Samuel Iglesias Gonsalvez (1):</p>
|
||||
<ul>
|
||||
<li>glsl: optimize (0 cmp x + y) into (-x cmp y).</li>
|
||||
</ul>
|
||||
|
||||
<p>Stefan Dösinger (1):</p>
|
||||
<ul>
|
||||
<li>r300g: Fix the ATI1N swizzle (RGTC1 and LATC1)</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -14,7 +14,7 @@
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.4 Release Notes / TBD</h1>
|
||||
<h1>Mesa 10.4 Release Notes / December 14, 2014</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.4 is a new development release.
|
||||
@@ -31,9 +31,11 @@ because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
TBD.
|
||||
abfbfd2d91ce81491c5bb6923ae649212ad5f82d0bee277de8704cc948dc221e MesaLib-10.4.0.tar.gz
|
||||
98a7dff3a1a6708c79789de8b9a05d8042e867067f70e8f30387c15026233219 MesaLib-10.4.0.tar.bz2
|
||||
443a6d46d0691b5ac811d8d30091b1716c365689b16d49c57cf273c2b76086fe MesaLib-10.4.0.zip
|
||||
</pre>
|
||||
|
||||
|
||||
@@ -54,11 +56,202 @@ Note: some of the new features are only available with certain drivers.
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
TBD.
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79963">Bug 79963</a> - [ILK Bisected]some piglit and ogles2conform cases fail </li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29661">Bug 29661</a> - MSVC built u_format_test fails on Windows</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=38873">Bug 38873</a> - [855gm] gnome-shell misrendered</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=54372">Bug 54372</a> - GLX_INTEL_swap_event crashes driver when swapping window buffers</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60879">Bug 60879</a> - [radeonsi] X11 can't start with acceleration enabled</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=61415">Bug 61415</a> - Clover ignores --with-opencl-libdir path</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64471">Bug 64471</a> - Radeon HD6570 lockup in Brütal Legend with HyperZ</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66184">Bug 66184</a> - src/mesa/state_tracker/st_glsl_to_tgsi.cpp:3216:simplify_cmp: Assertion `inst->dst.index < 4096' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=67672">Bug 67672</a> - [llvmpipe] lp_test_arit fails on old CPUs</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69200">Bug 69200</a> - [Bisected]Piglit glx/glx-multithread-shader-compile aborted</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70410">Bug 70410</a> - egl-static/Makefile: linking fails with llvm >= 3.4</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72685">Bug 72685</a> - [radeonsi hyperz] Artifacts in Unigine Sanctuary</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72819">Bug 72819</a> - [855GM] Incorrect drop shadow color on windows and strange white rectangle when showing/hiding GLX-dock...</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74563">Bug 74563</a> - Surfaceless contexts are not properly released by DRI drivers</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74863">Bug 74863</a> - [r600g] HyperZ broken on RV770 and CYPRESS (Left 4 Dead 2 trees corruption) bisected!</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75011">Bug 75011</a> - [hyperz] Performance drop since git-01e6371 (disable hyperz by default) with radeonsi</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75112">Bug 75112</a> - Meta Bug for HyperZ issues on r600g and radeonsi</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76252">Bug 76252</a> - Dynamic loading/unloading of opengl32.dll results in a deadlock</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76861">Bug 76861</a> - mid3 generates slow code for constant arguments</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77957">Bug 77957</a> - Variably-indexed constant arrays result in terrible shader code</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=78468">Bug 78468</a> - Compiling of shader gets stuck in infinite loop</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=78770">Bug 78770</a> - [SNB bisected]Webglc conformance/textures/texture-size-limit.html fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79155">Bug 79155</a> - [Tesseract Game] Global Illumination: Medium Causes Color Distortion</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79462">Bug 79462</a> - [NVC0/Codegen] Shader compilation falis in spill logic</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80011">Bug 80011</a> - [softpipe] tgsi/tgsi_exec.c:2023:exec_txf: Assertion `0' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80012">Bug 80012</a> - [softpipe] draw/draw_gs.c:113:tgsi_fetch_gs_outputs: Assertion `!util_is_inf_or_nan(output[slot][0])' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80050">Bug 80050</a> - [855GM] Incorrect drop shadow color under windows in Cinnamon persists with MESA 10.1.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80247">Bug 80247</a> - Khronos conformance test ES3-CTS.gtf.GL3Tests.transform_feedback.transform_feedback_vertex_id fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80561">Bug 80561</a> - Incorrect implementation of some VDPAU APIs.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80615">Bug 80615</a> - Files in bellagio directory [omx tracker] don't respect installation folder</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80848">Bug 80848</a> - [dri3] Building mesa fails with dri3 enabled</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=81680">Bug 81680</a> - [r600g] Firefox crashes with hardware acceleration turned on</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82255">Bug 82255</a> - [VP2] Chroma planes are vertically stretched during VDPAU playback</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82472">Bug 82472</a> - piglit 16385-consecutive-chars regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82537">Bug 82537</a> - Stunt Rally GLSL compiler assertion failure</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82538">Bug 82538</a> - Super Maryo Chronicles fails with st/mesa assertion failure</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82539">Bug 82539</a> - vmw_screen_dri.lo In file included from vmw_screen_dri.c:41: vmwgfx_drm.h:32:17: error: drm.h: No such file or directory</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82796">Bug 82796</a> - [IVB/BYT-M/HSW/BDW Bisected]Synmark2_v6.0_OglTerrainFlyInst/OglTerrainPanInst cannot run as image validation failed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82804">Bug 82804</a> - unreal engine 4 rendering errors</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82828">Bug 82828</a> - Regression: Crash in 3Dmark2001</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82846">Bug 82846</a> - [BDW Bisected] Gpu hang when running Lightsmark v2008/Warsow v1.0/Xonotic v0.7/unigine-demos</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82881">Bug 82881</a> - test_vec4_register_coalesce regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82882">Bug 82882</a> - [swrast] piglit glsl-fs-uniform-bool-1 regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82921">Bug 82921</a> - layout(location=0) emits error >= MAX_UNIFORM_LOCATIONS due to integer underflow</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82929">Bug 82929</a> - [BDW Bisected]glxgears causes X hang</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82932">Bug 82932</a> - [SNB+ Bisected]Ogles3conform ES3-CTS.shaders.indexing.vector_subscript.vec3_static_loop_subscript_write_direct_read_vertex fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83079">Bug 83079</a> - [NVC0] Dota 2 (Linux native and Wine) crash with Nouveau Drivers</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83080">Bug 83080</a> - [SNB+ Bisected]ES3-CTS.shaders.loops.do_while_constant_iterations.mixed_break_continue_fragment fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83081">Bug 83081</a> - [BDW Bisected]Piglit spec_ARB_sample_shading_builtin-gl-sample-mask_2 is core dumped</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83127">Bug 83127</a> - [ILK Bisected]Piglit glean_texCombine fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83148">Bug 83148</a> - Unity invisible under Ubuntu 14.04 and 14.10</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83355">Bug 83355</a> - FTBFS: src/mesa/program/program_lexer.l:122:64: error: unknown type name 'YYSTYPE'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83380">Bug 83380</a> - Linking fails when not writing gl_Position.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83418">Bug 83418</a> - EU IV is incorrectly rendered after git1409011930.d571f2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83432">Bug 83432</a> - r600_query.c:269:r600_emit_query_end: Assertion `ctx->num_pipelinestat_queries > 0' failed [Gallium HUD]</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83463">Bug 83463</a> - [swrast] piglit glsl-vs-clamp-1 regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83468">Bug 83468</a> - [UBO] Using bool from UBO as if-statement condition asserts</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83500">Bug 83500</a> - si_dma_copy_tile causes GPU hangs</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83506">Bug 83506</a> - [UBO] row_major layout ignored inside structures</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83533">Bug 83533</a> - [UBO] nested structures don't get appropriate padding</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83573">Bug 83573</a> - [swrast] piglit fs-op-not-bool-using-if regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83574">Bug 83574</a> - [llvmpipe] [softpipe] piglit arb_explicit_uniform_location-use-of-unused-loc regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83741">Bug 83741</a> - [UBO] row_major layout partially ignored for arrays of structures</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83777">Bug 83777</a> - [regression] ilo fails to build</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83934">Bug 83934</a> - Structures must have same name to be considered same type.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84140">Bug 84140</a> - mplayer crashes playing some files using vdpau output</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84145">Bug 84145</a> - UE4: Realistic Rendering Demo render blue</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84178">Bug 84178</a> - Big glamor regression in Xorg server 1.6.99.1 GIT: x11perf 1.5 Test: PutImage XY 500x500 Square</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84355">Bug 84355</a> - texture2DProjLod and textureCubeLod are not supported when using GLES.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84529">Bug 84529</a> - [IVB bisected] glean fragProg1 CMP test failed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84538">Bug 84538</a> - lp_test_format.c:226:4: error: too few arguments to function ‘gallivm_create’</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84539">Bug 84539</a> - brw_fs_register_coalesce.cpp:183: bool fs_visitor::register_coalesce(): Assertion `src_size <= 11' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84557">Bug 84557</a> - [HSW] "Emit ELSE/ENDIF JIP with type D on Gen 7" causes Atomic Afterlife and GPU hangs</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84651">Bug 84651</a> - Distorted graphics or black window when running Battle.net app on Intel hardware via wine</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84662">Bug 84662</a> - Long pauses with Unreal demo Elemental on R9270X since : Always flush the HDP cache before submitting a CS to the GPU</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84777">Bug 84777</a> - [BSW]Piglit spec_glsl-1.50_execution_geometry-basic fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84807">Bug 84807</a> - Build issue starting between bf4aecfb2acc8d0dc815105d2f36eccbc97c284b and a3e9582f09249ad27716ba82c7dfcee685b65d51</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85189">Bug 85189</a> - llvm/invocation.cpp: In function 'void {anonymous}::optimize(llvm::Module*, unsigned int, const std::vector<llvm::Function*>&)': llvm/invocation.cpp:324:18: error: expected type-specifier</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85267">Bug 85267</a> - vlc crashes with vdpau (Radeon 3850HD) [r600]</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85377">Bug 85377</a> - lp_test_format failure with llvm-3.6</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85425">Bug 85425</a> - [bisected] Compiler error in clip control operations in meta</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85429">Bug 85429</a> - indirect.c:296: multiple definition of `__indirect_glNewList'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85454">Bug 85454</a> - Unigine Sanctuary with Wine crashes on Mesa Git</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85647">Bug 85647</a> - Random radeonsi crashes with mesa 10.3.x</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85683">Bug 85683</a> - [i965 Bisected]Piglit shaders_glsl-vs-raytrace-bug26691 segfault</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85691">Bug 85691</a> - 'glsl: Drop constant 0.0 components from dot products.' broke piglit shaders/glsl-gnome-shell-dim-window and a few others with Gallium</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86025">Bug 86025</a> - src\glsl\list.h(535) : error C2143: syntax error : missing ';' before 'type'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86089">Bug 86089</a> - [r600g][mesa 10.4.0-dev] shader failure - r600_sb::bc_finalizer::cf_peephole() when starting Second Life</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86145">Bug 86145</a> - Pipeline statistic counter values for VF always 0</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86618">Bug 86618</a> - [NV96] neg modifiers not working in MIN and MAX operations</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86760">Bug 86760</a> - mesa doesn't build: recipe for target 'r600_llvm.lo' failed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86764">Bug 86764</a> - [SNB+ Bisected]Piglit glean/pointSprite fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86788">Bug 86788</a> - (bisected) 32bit UrbanTerror 4.1 timedemo sse4.1 segfault...</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<ul>
|
||||
<li>The environment variable GALLIUM_MSAA that forced a multisample GLX visual was removed.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@@ -399,6 +399,16 @@ struct IDirect3DVolume9 : public IUnknown
|
||||
virtual HRESULT WINAPI UnlockBox() = 0;
|
||||
};
|
||||
|
||||
struct IDirect3DVolumeTexture9 : public IDirect3DBaseTexture9
|
||||
{
|
||||
virtual HRESULT WINAPI GetLevelDesc(UINT Level, D3DVOLUME_DESC *pDesc) = 0;
|
||||
virtual HRESULT WINAPI GetVolumeLevel(UINT Level, IDirect3DVolume9 **ppVolumeLevel) = 0;
|
||||
virtual HRESULT WINAPI LockBox(UINT Level, D3DLOCKED_BOX *pLockedVolume, const D3DBOX *pBox, DWORD Flags) = 0;
|
||||
virtual HRESULT WINAPI UnlockBox(UINT Level) = 0;
|
||||
virtual HRESULT WINAPI AddDirtyBox(const D3DBOX *pDirtyBox) = 0;
|
||||
};
|
||||
|
||||
|
||||
#else /* __cplusplus */
|
||||
|
||||
extern const GUID IID_IDirect3D9;
|
||||
|
@@ -224,6 +224,8 @@ typedef struct _RGNDATA {
|
||||
#define D3DERR_INVALIDDEVICE MAKE_D3DHRESULT(2155)
|
||||
#define D3DERR_INVALIDCALL MAKE_D3DHRESULT(2156)
|
||||
#define D3DERR_DRIVERINVALIDCALL MAKE_D3DHRESULT(2157)
|
||||
#define D3DERR_DEVICEREMOVED MAKE_D3DHRESULT(2160)
|
||||
#define D3DERR_DEVICEHUNG MAKE_D3DHRESULT(2164)
|
||||
|
||||
/********************************************************
|
||||
* Bitmasks *
|
||||
@@ -331,6 +333,7 @@ typedef struct _RGNDATA {
|
||||
|
||||
#define D3DPRESENT_DONOTWAIT 0x00000001
|
||||
#define D3DPRESENT_LINEAR_CONTENT 0x00000002
|
||||
#define D3DPRESENT_RATE_DEFAULT 0
|
||||
|
||||
#define D3DCREATE_FPU_PRESERVE 0x00000002
|
||||
#define D3DCREATE_MULTITHREADED 0x00000004
|
||||
@@ -344,6 +347,13 @@ typedef struct _RGNDATA {
|
||||
#define D3DSTREAMSOURCE_INDEXEDDATA (1 << 30)
|
||||
#define D3DSTREAMSOURCE_INSTANCEDATA (2 << 30)
|
||||
|
||||
/* D3DRS_COLORWRITEENABLE */
|
||||
#define D3DCOLORWRITEENABLE_RED (1L << 0)
|
||||
#define D3DCOLORWRITEENABLE_GREEN (1L << 1)
|
||||
#define D3DCOLORWRITEENABLE_BLUE (1L << 2)
|
||||
#define D3DCOLORWRITEENABLE_ALPHA (1L << 3)
|
||||
|
||||
|
||||
/********************************************************
|
||||
* Function macros *
|
||||
*******************************************************/
|
||||
@@ -639,10 +649,13 @@ typedef enum _D3DFORMAT {
|
||||
D3DFMT_A1 = 118,
|
||||
D3DFMT_A2B10G10R10_XR_BIAS = 119,
|
||||
D3DFMT_BINARYBUFFER = 199,
|
||||
D3DFMT_ATI1 = MAKEFOURCC('A', 'T', 'I', '1'),
|
||||
D3DFMT_ATI2 = MAKEFOURCC('A', 'T', 'I', '2'),
|
||||
D3DFMT_DF16 = MAKEFOURCC('D', 'F', '1', '6'),
|
||||
D3DFMT_DF24 = MAKEFOURCC('D', 'F', '2', '4'),
|
||||
D3DFMT_INTZ = MAKEFOURCC('I', 'N', 'T', 'Z'),
|
||||
D3DFMT_NULL = MAKEFOURCC('N', 'U', 'L', 'L'),
|
||||
D3DFMT_NVDB = MAKEFOURCC('N', 'V', 'D', 'B'),
|
||||
D3DFMT_NV11 = MAKEFOURCC('N', 'V', '1', '1'),
|
||||
D3DFMT_NV12 = MAKEFOURCC('N', 'V', '1', '2'),
|
||||
D3DFMT_Y210 = MAKEFOURCC('Y', '2', '1', '0'),
|
||||
|
@@ -3,9 +3,9 @@
|
||||
|
||||
if BUILD_SHARED
|
||||
if HAVE_COMPAT_SYMLINKS
|
||||
all-local : .libs/install-mesa-links
|
||||
all-local : .install-mesa-links
|
||||
|
||||
.libs/install-mesa-links : $(lib_LTLIBRARIES)
|
||||
.install-mesa-links : $(lib_LTLIBRARIES)
|
||||
$(AM_V_GEN)$(MKDIR_P) $(top_builddir)/$(LIB_DIR); \
|
||||
for f in $(join $(addsuffix .libs/,$(dir $(lib_LTLIBRARIES))),$(notdir $(lib_LTLIBRARIES:%.la=%.$(LIB_EXT)*))); do \
|
||||
if test -h .libs/$$f; then \
|
||||
@@ -14,5 +14,9 @@ all-local : .libs/install-mesa-links
|
||||
ln -f $$f $(top_builddir)/$(LIB_DIR); \
|
||||
fi; \
|
||||
done && touch $@
|
||||
|
||||
clean-local:
|
||||
$(RM) .install-mesa-links
|
||||
|
||||
endif
|
||||
endif
|
||||
|
@@ -668,15 +668,21 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
|
||||
for (i = 0; dri2_dpy->driver_configs[i]; i++) {
|
||||
EGLint format, attr_list[3];
|
||||
unsigned int mask;
|
||||
unsigned int red, alpha;
|
||||
|
||||
dri2_dpy->core->getConfigAttrib(dri2_dpy->driver_configs[i],
|
||||
__DRI_ATTRIB_RED_MASK, &mask);
|
||||
if (mask == 0x3ff00000)
|
||||
__DRI_ATTRIB_RED_MASK, &red);
|
||||
dri2_dpy->core->getConfigAttrib(dri2_dpy->driver_configs[i],
|
||||
__DRI_ATTRIB_ALPHA_MASK, &alpha);
|
||||
if (red == 0x3ff00000 && alpha == 0x00000000)
|
||||
format = GBM_FORMAT_XRGB2101010;
|
||||
else if (mask == 0x00ff0000)
|
||||
else if (red == 0x3ff00000 && alpha == 0xc0000000)
|
||||
format = GBM_FORMAT_ARGB2101010;
|
||||
else if (red == 0x00ff0000 && alpha == 0x00000000)
|
||||
format = GBM_FORMAT_XRGB8888;
|
||||
else if (mask == 0xf800)
|
||||
else if (red == 0x00ff0000 && alpha == 0xff000000)
|
||||
format = GBM_FORMAT_ARGB8888;
|
||||
else if (red == 0xf800)
|
||||
format = GBM_FORMAT_RGB565;
|
||||
else
|
||||
continue;
|
||||
|
@@ -49,8 +49,7 @@ dri2_x11_swap_interval(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
|
||||
|
||||
static void
|
||||
swrastCreateDrawable(struct dri2_egl_display * dri2_dpy,
|
||||
struct dri2_egl_surface * dri2_surf,
|
||||
int depth)
|
||||
struct dri2_egl_surface * dri2_surf)
|
||||
{
|
||||
uint32_t mask;
|
||||
const uint32_t function = GXcopy;
|
||||
@@ -66,8 +65,7 @@ swrastCreateDrawable(struct dri2_egl_display * dri2_dpy,
|
||||
valgc[0] = function;
|
||||
valgc[1] = False;
|
||||
xcb_create_gc(dri2_dpy->conn, dri2_surf->swapgc, dri2_surf->drawable, mask, valgc);
|
||||
dri2_surf->depth = depth;
|
||||
switch (depth) {
|
||||
switch (dri2_surf->depth) {
|
||||
case 32:
|
||||
case 24:
|
||||
dri2_surf->bytes_per_pixel = 4;
|
||||
@@ -82,7 +80,7 @@ swrastCreateDrawable(struct dri2_egl_display * dri2_dpy,
|
||||
dri2_surf->bytes_per_pixel = 0;
|
||||
break;
|
||||
default:
|
||||
_eglLog(_EGL_WARNING, "unsupported depth %d", depth);
|
||||
_eglLog(_EGL_WARNING, "unsupported depth %d", dri2_surf->depth);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,12 +255,6 @@ dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
|
||||
_eglError(EGL_BAD_ALLOC, "dri2->createNewDrawable");
|
||||
goto cleanup_pixmap;
|
||||
}
|
||||
|
||||
if (dri2_dpy->dri2) {
|
||||
xcb_dri2_create_drawable (dri2_dpy->conn, dri2_surf->drawable);
|
||||
} else {
|
||||
swrastCreateDrawable(dri2_dpy, dri2_surf, _eglGetConfigKey(conf, EGL_BUFFER_SIZE));
|
||||
}
|
||||
|
||||
if (type != EGL_PBUFFER_BIT) {
|
||||
cookie = xcb_get_geometry (dri2_dpy->conn, dri2_surf->drawable);
|
||||
@@ -275,9 +267,19 @@ dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
|
||||
|
||||
dri2_surf->base.Width = reply->width;
|
||||
dri2_surf->base.Height = reply->height;
|
||||
dri2_surf->depth = reply->depth;
|
||||
free(reply);
|
||||
}
|
||||
|
||||
if (dri2_dpy->dri2) {
|
||||
xcb_dri2_create_drawable (dri2_dpy->conn, dri2_surf->drawable);
|
||||
} else {
|
||||
if (type == EGL_PBUFFER_BIT) {
|
||||
dri2_surf->depth = _eglGetConfigKey(conf, EGL_BUFFER_SIZE);
|
||||
}
|
||||
swrastCreateDrawable(dri2_dpy, dri2_surf);
|
||||
}
|
||||
|
||||
/* we always copy the back buffer to front */
|
||||
dri2_surf->base.PostSubBufferSupportedNV = EGL_TRUE;
|
||||
|
||||
|
@@ -193,7 +193,7 @@ def lineloop(intype, outtype, inpv, outpv):
|
||||
print ' for (i = start, j = 0; j < nr - 2; j+=2, i++) { '
|
||||
do_line( intype, outtype, 'out+j', 'i', 'i+1', inpv, outpv );
|
||||
print ' }'
|
||||
do_line( intype, outtype, 'out+j', 'i', '0', inpv, outpv );
|
||||
do_line( intype, outtype, 'out+j', 'i', 'start', inpv, outpv );
|
||||
postamble()
|
||||
|
||||
def tris(intype, outtype, inpv, outpv):
|
||||
@@ -218,7 +218,7 @@ def tristrip(intype, outtype, inpv, outpv):
|
||||
def trifan(intype, outtype, inpv, outpv):
|
||||
preamble(intype, outtype, inpv, outpv, prim='trifan')
|
||||
print ' for (i = start, j = 0; j < nr; j+=3, i++) { '
|
||||
do_tri( intype, outtype, 'out+j', '0', 'i+1', 'i+2', inpv, outpv );
|
||||
do_tri( intype, outtype, 'out+j', 'start', 'i+1', 'i+2', inpv, outpv );
|
||||
print ' }'
|
||||
postamble()
|
||||
|
||||
@@ -228,9 +228,9 @@ def polygon(intype, outtype, inpv, outpv):
|
||||
preamble(intype, outtype, inpv, outpv, prim='polygon')
|
||||
print ' for (i = start, j = 0; j < nr; j+=3, i++) { '
|
||||
if inpv == FIRST:
|
||||
do_tri( intype, outtype, 'out+j', '0', 'i+1', 'i+2', inpv, outpv );
|
||||
do_tri( intype, outtype, 'out+j', 'start', 'i+1', 'i+2', inpv, outpv );
|
||||
else:
|
||||
do_tri( intype, outtype, 'out+j', 'i+1', 'i+2', '0', inpv, outpv );
|
||||
do_tri( intype, outtype, 'out+j', 'i+1', 'i+2', 'start', inpv, outpv );
|
||||
print ' }'
|
||||
postamble()
|
||||
|
||||
|
@@ -124,6 +124,9 @@ util_primconvert_draw_vbo(struct primconvert_context *pc,
|
||||
new_info.indexed = true;
|
||||
new_info.min_index = info->min_index;
|
||||
new_info.max_index = info->max_index;
|
||||
new_info.index_bias = info->index_bias;
|
||||
new_info.start_instance = info->start_instance;
|
||||
new_info.instance_count = info->instance_count;
|
||||
|
||||
if (info->indexed) {
|
||||
u_index_translator(pc->primtypes_mask,
|
||||
@@ -136,6 +139,7 @@ util_primconvert_draw_vbo(struct primconvert_context *pc,
|
||||
src = pipe_buffer_map(pc->pipe, ib->buffer,
|
||||
PIPE_TRANSFER_READ, &src_transfer);
|
||||
}
|
||||
src = (const uint8_t *)src + ib->offset;
|
||||
}
|
||||
else {
|
||||
u_index_generator(pc->primtypes_mask,
|
||||
|
@@ -118,7 +118,7 @@ os_get_total_physical_memory(uint64_t *size)
|
||||
*size = phys_pages * page_size;
|
||||
return (phys_pages > 0 && page_size > 0);
|
||||
#elif defined(PIPE_OS_APPLE) || defined(PIPE_OS_BSD)
|
||||
size_t len = sizeof(size);
|
||||
size_t len = sizeof(*size);
|
||||
int mib[2];
|
||||
|
||||
mib[0] = CTL_HW;
|
||||
@@ -134,7 +134,7 @@ os_get_total_physical_memory(uint64_t *size)
|
||||
#error Unsupported *BSD
|
||||
#endif
|
||||
|
||||
return (sysctl(mib, 2, &size, &len, NULL, 0) == 0);
|
||||
return (sysctl(mib, 2, size, &len, NULL, 0) == 0);
|
||||
#elif defined(PIPE_OS_HAIKU)
|
||||
system_info info;
|
||||
status_t ret;
|
||||
|
@@ -70,8 +70,8 @@ static INLINE void *os_mmap(void *addr, size_t length, int prot, int flags,
|
||||
return __mmap2(addr, length, prot, flags, fd, (size_t) (offset >> 12));
|
||||
}
|
||||
|
||||
# define drm_munmap(addr, length) \
|
||||
munmap(addr, length)
|
||||
# define os_munmap(addr, length) \
|
||||
munmap(addr, length)
|
||||
|
||||
#else
|
||||
/* assume large file support exists */
|
||||
|
@@ -272,7 +272,7 @@ static INLINE uint64_t xgetbv(void)
|
||||
|
||||
|
||||
#if defined(PIPE_ARCH_X86)
|
||||
static INLINE boolean sse2_has_daz(void)
|
||||
PIPE_ALIGN_STACK static INLINE boolean sse2_has_daz(void)
|
||||
{
|
||||
struct {
|
||||
uint32_t pad1[7];
|
||||
@@ -409,8 +409,12 @@ util_cpu_detect(void)
|
||||
}
|
||||
|
||||
if (regs[0] >= 0x80000006) {
|
||||
/* should we really do this if the clflush size above worked? */
|
||||
unsigned int cacheline;
|
||||
cpuid(0x80000006, regs2);
|
||||
util_cpu_caps.cacheline = regs2[2] & 0xFF;
|
||||
cacheline = regs2[2] & 0xFF;
|
||||
if (cacheline > 0)
|
||||
util_cpu_caps.cacheline = cacheline;
|
||||
}
|
||||
|
||||
if (!util_cpu_caps.has_sse) {
|
||||
|
@@ -561,14 +561,10 @@ util_last_bit(unsigned u)
|
||||
static INLINE unsigned
|
||||
util_last_bit_signed(int i)
|
||||
{
|
||||
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 407) && !defined(__INTEL_COMPILER)
|
||||
return 31 - __builtin_clrsb(i);
|
||||
#else
|
||||
if (i >= 0)
|
||||
return util_last_bit(i);
|
||||
else
|
||||
return util_last_bit(~(unsigned)i);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Destructively loop over all of the bits in a mask as in:
|
||||
|
@@ -13,7 +13,7 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-06-02 15:21:30)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10347 bytes, from 2014-10-01 18:55:57)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14960 bytes, from 2014-07-27 17:22:13)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 60533 bytes, from 2014-10-15 18:32:43)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 64771 bytes, from 2015-03-15 21:55:57)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 41068 bytes, from 2014-08-01 12:22:48)
|
||||
|
||||
Copyright (C) 2013-2014 by the following authors:
|
||||
|
@@ -13,7 +13,7 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-06-02 15:21:30)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10347 bytes, from 2014-10-01 18:55:57)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14960 bytes, from 2014-07-27 17:22:13)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 60533 bytes, from 2014-10-15 18:32:43)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 64771 bytes, from 2015-03-15 21:55:57)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 41068 bytes, from 2014-08-01 12:22:48)
|
||||
|
||||
Copyright (C) 2013-2014 by the following authors:
|
||||
@@ -2572,7 +2572,7 @@ static inline uint32_t A3XX_TEX_CONST_2_SWAP(enum a3xx_color_swap val)
|
||||
}
|
||||
|
||||
#define REG_A3XX_TEX_CONST_3 0x00000003
|
||||
#define A3XX_TEX_CONST_3_LAYERSZ1__MASK 0x0000000f
|
||||
#define A3XX_TEX_CONST_3_LAYERSZ1__MASK 0x00001fff
|
||||
#define A3XX_TEX_CONST_3_LAYERSZ1__SHIFT 0
|
||||
static inline uint32_t A3XX_TEX_CONST_3_LAYERSZ1(uint32_t val)
|
||||
{
|
||||
|
@@ -105,8 +105,7 @@ fd3_blend_state_create(struct pipe_context *pctx,
|
||||
A3XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR(fd_blend_factor(rt->rgb_dst_factor)) |
|
||||
A3XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR(fd_blend_factor(rt->alpha_src_factor)) |
|
||||
A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE(blend_func(rt->alpha_func)) |
|
||||
A3XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR(fd_blend_factor(rt->alpha_dst_factor)) |
|
||||
A3XX_RB_MRT_BLEND_CONTROL_CLAMP_ENABLE;
|
||||
A3XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR(fd_blend_factor(rt->alpha_dst_factor));
|
||||
|
||||
so->rb_mrt[i].control =
|
||||
A3XX_RB_MRT_CONTROL_ROP_CODE(rop) |
|
||||
|
@@ -566,16 +566,20 @@ fd3_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||
}
|
||||
}
|
||||
|
||||
if ((dirty & FD_DIRTY_BLEND) && ctx->blend) {
|
||||
if ((dirty & (FD_DIRTY_BLEND | FD_DIRTY_FRAMEBUFFER)) && ctx->blend) {
|
||||
struct fd3_blend_stateobj *blend = fd3_blend_stateobj(ctx->blend);
|
||||
uint32_t i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(blend->rb_mrt); i++) {
|
||||
bool is_float = util_format_is_float(
|
||||
pipe_surface_format(ctx->framebuffer.cbufs[i]));
|
||||
|
||||
OUT_PKT0(ring, REG_A3XX_RB_MRT_CONTROL(i), 1);
|
||||
OUT_RING(ring, blend->rb_mrt[i].control);
|
||||
|
||||
OUT_PKT0(ring, REG_A3XX_RB_MRT_BLEND_CONTROL(i), 1);
|
||||
OUT_RING(ring, blend->rb_mrt[i].blend_control);
|
||||
OUT_RING(ring, blend->rb_mrt[i].blend_control |
|
||||
COND(!is_float, A3XX_RB_MRT_BLEND_CONTROL_CLAMP_ENABLE));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -13,7 +13,7 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-06-02 15:21:30)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10347 bytes, from 2014-10-01 18:55:57)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14960 bytes, from 2014-07-27 17:22:13)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 60533 bytes, from 2014-10-15 18:32:43)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 64771 bytes, from 2015-03-15 21:55:57)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 41068 bytes, from 2014-08-01 12:22:48)
|
||||
|
||||
Copyright (C) 2013-2014 by the following authors:
|
||||
|
@@ -13,7 +13,7 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-06-02 15:21:30)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10347 bytes, from 2014-10-01 18:55:57)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14960 bytes, from 2014-07-27 17:22:13)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 60533 bytes, from 2014-10-15 18:32:43)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 64771 bytes, from 2015-03-15 21:55:57)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 41068 bytes, from 2014-08-01 12:22:48)
|
||||
|
||||
Copyright (C) 2013-2014 by the following authors:
|
||||
|
@@ -199,7 +199,7 @@ setup_slices(struct fd_resource *rsc)
|
||||
for (level = 0; level <= prsc->last_level; level++) {
|
||||
struct fd_resource_slice *slice = fd_resource_slice(rsc, level);
|
||||
|
||||
slice->pitch = align(width, 32);
|
||||
slice->pitch = width = align(width, 32);
|
||||
slice->offset = size;
|
||||
slice->size0 = slice->pitch * height * rsc->cpp;
|
||||
|
||||
|
@@ -123,12 +123,12 @@ fd_set_framebuffer_state(struct pipe_context *pctx,
|
||||
|
||||
fd_context_render(pctx);
|
||||
|
||||
util_copy_framebuffer_state(cso, framebuffer);
|
||||
|
||||
if ((cso->width != framebuffer->width) ||
|
||||
(cso->height != framebuffer->height))
|
||||
ctx->needs_rb_fbd = true;
|
||||
|
||||
util_copy_framebuffer_state(cso, framebuffer);
|
||||
|
||||
ctx->dirty |= FD_DIRTY_FRAMEBUFFER;
|
||||
|
||||
ctx->disabled_scissor.minx = 0;
|
||||
|
@@ -1421,6 +1421,7 @@ trans_txq(const struct instr_translater *t,
|
||||
struct tgsi_dst_register *dst = &inst->Dst[0].Register;
|
||||
struct tgsi_src_register *level = &inst->Src[0].Register;
|
||||
struct tgsi_src_register *samp = &inst->Src[1].Register;
|
||||
const struct target_info *tgt = &tex_targets[inst->Texture.Texture];
|
||||
struct tex_info tinf;
|
||||
|
||||
memset(&tinf, 0, sizeof(tinf));
|
||||
@@ -1434,8 +1435,67 @@ trans_txq(const struct instr_translater *t,
|
||||
instr->cat5.tex = samp->Index;
|
||||
instr->flags |= tinf.flags;
|
||||
|
||||
add_dst_reg_wrmask(ctx, instr, dst, 0, dst->WriteMask);
|
||||
add_src_reg_wrmask(ctx, instr, level, level->SwizzleX, 0x1);
|
||||
if (tgt->array && (dst->WriteMask & (1 << tgt->dims))) {
|
||||
/* Array size actually ends up in .w rather than .z. This doesn't
|
||||
* matter for miplevel 0, but for higher mips the value in z is
|
||||
* minified whereas w stays. Also, the value in TEX_CONST_3_DEPTH is
|
||||
* returned, which means that we have to add 1 to it for arrays.
|
||||
*/
|
||||
struct tgsi_dst_register tmp_dst;
|
||||
struct tgsi_src_register *tmp_src;
|
||||
type_t type_mov = get_utype(ctx);
|
||||
|
||||
tmp_src = get_internal_temp(ctx, &tmp_dst);
|
||||
add_dst_reg_wrmask(ctx, instr, &tmp_dst, 0,
|
||||
dst->WriteMask | TGSI_WRITEMASK_W);
|
||||
add_src_reg_wrmask(ctx, instr, level, level->SwizzleX, 0x1);
|
||||
|
||||
if (dst->WriteMask & TGSI_WRITEMASK_X) {
|
||||
instr = instr_create(ctx, 1, 0);
|
||||
instr->cat1.src_type = type_mov;
|
||||
instr->cat1.dst_type = type_mov;
|
||||
add_dst_reg(ctx, instr, dst, 0);
|
||||
add_src_reg(ctx, instr, tmp_src, src_swiz(tmp_src, 0));
|
||||
}
|
||||
|
||||
if (tgt->dims == 2) {
|
||||
if (dst->WriteMask & TGSI_WRITEMASK_Y) {
|
||||
instr = instr_create(ctx, 1, 0);
|
||||
instr->cat1.src_type = type_mov;
|
||||
instr->cat1.dst_type = type_mov;
|
||||
add_dst_reg(ctx, instr, dst, 1);
|
||||
add_src_reg(ctx, instr, tmp_src, src_swiz(tmp_src, 1));
|
||||
}
|
||||
}
|
||||
|
||||
instr = instr_create(ctx, 2, OPC_ADD_U);
|
||||
add_dst_reg(ctx, instr, dst, tgt->dims);
|
||||
add_src_reg(ctx, instr, tmp_src, src_swiz(tmp_src, 3));
|
||||
ir3_reg_create(instr, 0, IR3_REG_IMMED)->iim_val = 1;
|
||||
} else {
|
||||
add_dst_reg_wrmask(ctx, instr, dst, 0, dst->WriteMask);
|
||||
add_src_reg_wrmask(ctx, instr, level, level->SwizzleX, 0x1);
|
||||
}
|
||||
|
||||
if (dst->WriteMask & TGSI_WRITEMASK_W) {
|
||||
/* The # of levels comes from getinfo.z. We need to add 1 to it, since
|
||||
* the value in TEX_CONST_0 is zero-based.
|
||||
*/
|
||||
struct tgsi_dst_register tmp_dst;
|
||||
struct tgsi_src_register *tmp_src;
|
||||
|
||||
tmp_src = get_internal_temp(ctx, &tmp_dst);
|
||||
instr = instr_create(ctx, 5, OPC_GETINFO);
|
||||
instr->cat5.type = get_utype(ctx);
|
||||
instr->cat5.samp = samp->Index;
|
||||
instr->cat5.tex = samp->Index;
|
||||
add_dst_reg_wrmask(ctx, instr, &tmp_dst, 0, TGSI_WRITEMASK_Z);
|
||||
|
||||
instr = instr_create(ctx, 2, OPC_ADD_U);
|
||||
add_dst_reg(ctx, instr, dst, 3);
|
||||
add_src_reg(ctx, instr, tmp_src, src_swiz(tmp_src, 2));
|
||||
ir3_reg_create(instr, 0, IR3_REG_IMMED)->iim_val = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* DDX/DDY */
|
||||
@@ -2112,7 +2172,7 @@ trans_cov(const struct instr_translater *t,
|
||||
* madsh.m16 tmp1, a, b, tmp0 (mul-add shift high mix, i.e. ah * bl << 16)
|
||||
* madsh.m16 dst, b, a, tmp1 (i.e. al * bh << 16)
|
||||
*
|
||||
* For UMAD, replace first mull.u with mad.u16.
|
||||
* For UMAD, add in the extra argument after mull.u.
|
||||
*/
|
||||
static void
|
||||
trans_umul(const struct instr_translater *t,
|
||||
@@ -2135,16 +2195,16 @@ trans_umul(const struct instr_translater *t,
|
||||
if (is_rel_or_const(b))
|
||||
b = get_unconst(ctx, b);
|
||||
|
||||
if (t->tgsi_opc == TGSI_OPCODE_UMUL) {
|
||||
/* mull.u tmp0, a, b */
|
||||
instr = instr_create(ctx, 2, OPC_MULL_U);
|
||||
vectorize(ctx, instr, &tmp0_dst, 2, a, 0, b, 0);
|
||||
} else {
|
||||
/* mull.u tmp0, a, b */
|
||||
instr = instr_create(ctx, 2, OPC_MULL_U);
|
||||
vectorize(ctx, instr, &tmp0_dst, 2, a, 0, b, 0);
|
||||
|
||||
if (t->tgsi_opc == TGSI_OPCODE_UMAD) {
|
||||
struct tgsi_src_register *c = &inst->Src[2].Register;
|
||||
|
||||
/* mad.u16 tmp0, a, b, c */
|
||||
instr = instr_create(ctx, 3, OPC_MAD_U16);
|
||||
vectorize(ctx, instr, &tmp0_dst, 3, a, 0, b, 0, c, 0);
|
||||
/* add.u tmp0, tmp0, c */
|
||||
instr = instr_create(ctx, 2, OPC_ADD_U);
|
||||
vectorize(ctx, instr, &tmp0_dst, 2, tmp0_src, 0, c, 0);
|
||||
}
|
||||
|
||||
/* madsh.m16 tmp1, a, b, tmp0 */
|
||||
@@ -3094,7 +3154,7 @@ ir3_compile_shader(struct ir3_shader_variant *so,
|
||||
if (key.binning_pass) {
|
||||
for (i = 0, j = 0; i < so->outputs_count; i++) {
|
||||
unsigned name = sem2name(so->outputs[i].semantic);
|
||||
unsigned idx = sem2name(so->outputs[i].semantic);
|
||||
unsigned idx = sem2idx(so->outputs[i].semantic);
|
||||
|
||||
/* throw away everything but first position/psize */
|
||||
if ((idx == 0) && ((name == TGSI_SEMANTIC_POSITION) ||
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#include "util/u_pointer.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "util/u_math.h"
|
||||
#include "util/u_cpu_detect.h"
|
||||
|
||||
#include "gallivm/lp_bld.h"
|
||||
#include "gallivm/lp_bld_debug.h"
|
||||
@@ -332,6 +333,38 @@ build_unary_test_func(struct gallivm_state *gallivm,
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Flush denorms to zero.
|
||||
*/
|
||||
static float
|
||||
flush_denorm_to_zero(float val)
|
||||
{
|
||||
/*
|
||||
* If we have a denorm manually set it to (+-)0.
|
||||
* This is because the reference may or may not do the right thing
|
||||
* otherwise because we want the result according to treating all
|
||||
* denormals as zero (FTZ/DAZ). Not using fpclassify because
|
||||
* a) some compilers are stuck at c89 (msvc)
|
||||
* b) not sure it reliably works with non-standard ftz/daz mode
|
||||
* And, right now we only disable denorms with jited code on x86/sse
|
||||
* (albeit this should be classified as a bug) so to get results which
|
||||
* match we must only flush them to zero here in that case too.
|
||||
*/
|
||||
union fi fi_val;
|
||||
|
||||
fi_val.f = val;
|
||||
|
||||
#if defined(PIPE_ARCH_SSE)
|
||||
if (util_cpu_caps.has_sse) {
|
||||
if ((fi_val.ui & 0x7f800000) == 0) {
|
||||
fi_val.ui &= 0xff800000;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return fi_val.f;
|
||||
}
|
||||
|
||||
/*
|
||||
* Test one LLVM unary arithmetic builder function.
|
||||
*/
|
||||
@@ -374,10 +407,13 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test)
|
||||
|
||||
test_func_jit(out, in);
|
||||
for (i = 0; i < num_vals; ++i) {
|
||||
float ref = test->ref(in[i]);
|
||||
float testval, ref;
|
||||
double error, precision;
|
||||
bool pass;
|
||||
|
||||
testval = flush_denorm_to_zero(in[i]);
|
||||
ref = flush_denorm_to_zero(test->ref(testval));
|
||||
|
||||
if (util_inf_sign(ref) && util_inf_sign(out[i]) == util_inf_sign(ref)) {
|
||||
error = 0;
|
||||
} else {
|
||||
|
@@ -2343,9 +2343,12 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
|
||||
mkMov(dst0[c], val0);
|
||||
break;
|
||||
case TGSI_OPCODE_ARL:
|
||||
case TGSI_OPCODE_ARR:
|
||||
FOR_EACH_DST_ENABLED_CHANNEL(0, c, tgsi) {
|
||||
const RoundMode rnd =
|
||||
tgsi.getOpcode() == TGSI_OPCODE_ARR ? ROUND_N : ROUND_M;
|
||||
src0 = fetchSrc(0, c);
|
||||
mkCvt(OP_CVT, TYPE_S32, dst0[c], TYPE_F32, src0)->rnd = ROUND_M;
|
||||
mkCvt(OP_CVT, TYPE_S32, dst0[c], TYPE_F32, src0)->rnd = rnd;
|
||||
}
|
||||
break;
|
||||
case TGSI_OPCODE_UARL:
|
||||
|
@@ -772,7 +772,8 @@ NV50LoweringPreSSA::handleTEX(TexInstruction *i)
|
||||
if (i->tex.useOffsets) {
|
||||
for (int c = 0; c < 3; ++c) {
|
||||
ImmediateValue val;
|
||||
assert(i->offset[0][c].getImmediate(val));
|
||||
if (!i->offset[0][c].getImmediate(val))
|
||||
assert(!"non-immediate offset");
|
||||
i->tex.offset[c] = val.reg.data.u32;
|
||||
i->offset[0][c].set(NULL);
|
||||
}
|
||||
|
@@ -754,7 +754,8 @@ NVC0LoweringPass::handleTEX(TexInstruction *i)
|
||||
assert(i->tex.useOffsets == 1);
|
||||
for (c = 0; c < 3; ++c) {
|
||||
ImmediateValue val;
|
||||
assert(i->offset[0][c].getImmediate(val));
|
||||
if (!i->offset[0][c].getImmediate(val))
|
||||
assert(!"non-immediate offset passed to non-TXG");
|
||||
imm |= (val.reg.data.u32 & 0xf) << (c * 4);
|
||||
}
|
||||
if (i->op == OP_TXD && chipset >= NVISA_GK104_CHIPSET) {
|
||||
|
@@ -1708,7 +1708,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#define NV50_3D_CULL_FACE_BACK 0x00000405
|
||||
#define NV50_3D_CULL_FACE_FRONT_AND_BACK 0x00000408
|
||||
|
||||
#define NV50_3D_LINE_LAST_PIXEL 0x00001924
|
||||
#define NV50_3D_PIXEL_CENTER_INTEGER 0x00001924
|
||||
|
||||
#define NVA3_3D_FP_MULTISAMPLE 0x00001928
|
||||
#define NVA3_3D_FP_MULTISAMPLE_EXPORT_SAMPLE_MASK 0x00000001
|
||||
|
@@ -461,8 +461,6 @@ nv50_screen_init_hwctx(struct nv50_screen *screen)
|
||||
PUSH_DATA (push, 0);
|
||||
BEGIN_NV04(push, NV50_3D(PRIM_RESTART_WITH_DRAW_ARRAYS), 1);
|
||||
PUSH_DATA (push, 1);
|
||||
BEGIN_NV04(push, NV50_3D(LINE_LAST_PIXEL), 1);
|
||||
PUSH_DATA (push, 0);
|
||||
BEGIN_NV04(push, NV50_3D(BLEND_SEPARATE_ALPHA), 1);
|
||||
PUSH_DATA (push, 1);
|
||||
|
||||
@@ -609,6 +607,13 @@ nv50_screen_init_hwctx(struct nv50_screen *screen)
|
||||
BEGIN_NV04(push, NV50_3D(EDGEFLAG), 1);
|
||||
PUSH_DATA (push, 1);
|
||||
|
||||
BEGIN_NV04(push, NV50_3D(VB_ELEMENT_BASE), 1);
|
||||
PUSH_DATA (push, 0);
|
||||
if (screen->base.class_3d >= NV84_3D_CLASS) {
|
||||
BEGIN_NV04(push, SUBC_3D(NV84_3D_VERTEX_ID_BASE), 1);
|
||||
PUSH_DATA (push, 0);
|
||||
}
|
||||
|
||||
PUSH_KICK (push);
|
||||
}
|
||||
|
||||
|
@@ -57,10 +57,6 @@
|
||||
* ! pipe_rasterizer_state.flatshade_first also applies to QUADS
|
||||
* (There's a GL query for that, forcing an exception is just ridiculous.)
|
||||
*
|
||||
* ! pipe_rasterizer_state.half_pixel_center is ignored - pixel centers
|
||||
* are always at half integer coordinates and the top-left rule applies
|
||||
* (There does not seem to be a hardware switch for this.)
|
||||
*
|
||||
* ! pipe_rasterizer_state.sprite_coord_enable is masked with 0xff on NVC0
|
||||
* (The hardware only has 8 slots meant for TexCoord and we have to assign
|
||||
* in advance to maintain elegant separate shader objects.)
|
||||
@@ -221,7 +217,7 @@ nv50_blend_state_delete(struct pipe_context *pipe, void *hwcso)
|
||||
FREE(hwcso);
|
||||
}
|
||||
|
||||
/* NOTE: ignoring line_last_pixel, using FALSE (set on screen init) */
|
||||
/* NOTE: ignoring line_last_pixel */
|
||||
static void *
|
||||
nv50_rasterizer_state_create(struct pipe_context *pipe,
|
||||
const struct pipe_rasterizer_state *cso)
|
||||
@@ -336,6 +332,9 @@ nv50_rasterizer_state_create(struct pipe_context *pipe,
|
||||
SB_BEGIN_3D(so, DEPTH_CLIP_NEGATIVE_Z, 1);
|
||||
SB_DATA (so, cso->clip_halfz);
|
||||
|
||||
SB_BEGIN_3D(so, PIXEL_CENTER_INTEGER, 1);
|
||||
SB_DATA (so, !cso->half_pixel_center);
|
||||
|
||||
assert(so->size <= (sizeof(so->state) / sizeof(so->state[0])));
|
||||
return (void *)so;
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ struct nv50_blend_stateobj {
|
||||
struct nv50_rasterizer_stateobj {
|
||||
struct pipe_rasterizer_state pipe;
|
||||
int size;
|
||||
uint32_t state[48];
|
||||
uint32_t state[49];
|
||||
};
|
||||
|
||||
struct nv50_zsa_stateobj {
|
||||
|
@@ -472,6 +472,10 @@ nv50_draw_arrays(struct nv50_context *nv50,
|
||||
if (nv50->state.index_bias) {
|
||||
BEGIN_NV04(push, NV50_3D(VB_ELEMENT_BASE), 1);
|
||||
PUSH_DATA (push, 0);
|
||||
if (nv50->screen->base.class_3d >= NV84_3D_CLASS) {
|
||||
BEGIN_NV04(push, SUBC_3D(NV84_3D_VERTEX_ID_BASE), 1);
|
||||
PUSH_DATA (push, 0);
|
||||
}
|
||||
nv50->state.index_bias = 0;
|
||||
}
|
||||
|
||||
@@ -594,6 +598,10 @@ nv50_draw_elements(struct nv50_context *nv50, boolean shorten,
|
||||
if (index_bias != nv50->state.index_bias) {
|
||||
BEGIN_NV04(push, NV50_3D(VB_ELEMENT_BASE), 1);
|
||||
PUSH_DATA (push, index_bias);
|
||||
if (nv50->screen->base.class_3d >= NV84_3D_CLASS) {
|
||||
BEGIN_NV04(push, SUBC_3D(NV84_3D_VERTEX_ID_BASE), 1);
|
||||
PUSH_DATA (push, index_bias);
|
||||
}
|
||||
nv50->state.index_bias = index_bias;
|
||||
}
|
||||
|
||||
|
@@ -227,6 +227,7 @@ locn_0f_ts:
|
||||
/* NVC0_3D_MACRO_DRAW_ELEMENTS_INDIRECT
|
||||
*
|
||||
* NOTE: Saves and restores VB_ELEMENT,INSTANCE_BASE.
|
||||
* Forcefully sets VERTEX_ID_BASE to the value of VB_ELEMENT_BASE.
|
||||
*
|
||||
* arg = mode
|
||||
* parm[0] = count
|
||||
@@ -247,6 +248,8 @@ locn_0f_ts:
|
||||
maddr 0x150d /* VB_ELEMENT,INSTANCE_BASE */
|
||||
send $r4
|
||||
send $r5
|
||||
maddr 0x446
|
||||
send $r4
|
||||
mov $r4 0x1
|
||||
dei_again:
|
||||
maddr 0x586 /* VERTEX_BEGIN_GL */
|
||||
@@ -258,8 +261,10 @@ dei_again:
|
||||
branz $r2 #dei_again
|
||||
mov $r1 (extrinsrt $r1 $r4 0 1 26) /* set INSTANCE_NEXT */
|
||||
maddr 0x150d /* VB_ELEMENT,INSTANCE_BASE */
|
||||
exit send $r6
|
||||
send $r6
|
||||
send $r7
|
||||
exit maddr 0x446
|
||||
send $r6
|
||||
dei_end:
|
||||
exit
|
||||
nop
|
||||
|
@@ -128,16 +128,18 @@ uint32_t mme9097_draw_elts_indirect[] = {
|
||||
0x00000301,
|
||||
0x00000201,
|
||||
0x017dc451,
|
||||
/* 0x000c: dei_again */
|
||||
/* 0x000e: dei_again */
|
||||
0x00002431,
|
||||
0x0004d007,
|
||||
/* 0x0017: dei_end */
|
||||
0x0005d007,
|
||||
0x00000501,
|
||||
/* 0x001b: dei_end */
|
||||
0x01434615,
|
||||
0x01438715,
|
||||
0x05434021,
|
||||
0x00002041,
|
||||
0x00002841,
|
||||
0x01118021,
|
||||
0x00002041,
|
||||
0x00004411,
|
||||
0x01618021,
|
||||
0x00000841,
|
||||
@@ -148,8 +150,10 @@ uint32_t mme9097_draw_elts_indirect[] = {
|
||||
0xfffe9017,
|
||||
0xd0410912,
|
||||
0x05434021,
|
||||
0x000030c1,
|
||||
0x00003041,
|
||||
0x00003841,
|
||||
0x011180a1,
|
||||
0x00003041,
|
||||
0x00000091,
|
||||
0x00000011,
|
||||
};
|
||||
|
@@ -1041,7 +1041,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#define NVC0_3D_CULL_FACE_BACK 0x00000405
|
||||
#define NVC0_3D_CULL_FACE_FRONT_AND_BACK 0x00000408
|
||||
|
||||
#define NVC0_3D_LINE_LAST_PIXEL 0x00001924
|
||||
#define NVC0_3D_PIXEL_CENTER_INTEGER 0x00001924
|
||||
|
||||
#define NVC0_3D_VIEWPORT_TRANSFORM_EN 0x0000192c
|
||||
|
||||
|
@@ -786,8 +786,6 @@ nvc0_screen_create(struct nouveau_device *dev)
|
||||
PUSH_DATA (push, 0);
|
||||
BEGIN_NVC0(push, NVC0_3D(LINE_WIDTH_SEPARATE), 1);
|
||||
PUSH_DATA (push, 1);
|
||||
BEGIN_NVC0(push, NVC0_3D(LINE_LAST_PIXEL), 1);
|
||||
PUSH_DATA (push, 0);
|
||||
BEGIN_NVC0(push, NVC0_3D(PRIM_RESTART_WITH_DRAW_ARRAYS), 1);
|
||||
PUSH_DATA (push, 1);
|
||||
BEGIN_NVC0(push, NVC0_3D(BLEND_SEPARATE_ALPHA), 1);
|
||||
|
@@ -252,7 +252,12 @@ nvc0_tfb_validate(struct nvc0_context *nvc0)
|
||||
|
||||
for (b = 0; b < nvc0->num_tfbbufs; ++b) {
|
||||
struct nvc0_so_target *targ = nvc0_so_target(nvc0->tfbbuf[b]);
|
||||
struct nv04_resource *buf = nv04_resource(targ->pipe.buffer);
|
||||
struct nv04_resource *buf;
|
||||
|
||||
if (!targ) {
|
||||
IMMED_NVC0(push, NVC0_3D(TFB_BUFFER_ENABLE(b)), 0);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tfb)
|
||||
targ->stride = tfb->stride[b];
|
||||
@@ -260,6 +265,8 @@ nvc0_tfb_validate(struct nvc0_context *nvc0)
|
||||
if (!(nvc0->tfbbuf_dirty & (1 << b)))
|
||||
continue;
|
||||
|
||||
buf = nv04_resource(targ->pipe.buffer);
|
||||
|
||||
if (!targ->clean)
|
||||
nvc0_query_fifo_wait(push, targ->pq);
|
||||
BEGIN_NVC0(push, NVC0_3D(TFB_BUFFER_ENABLE(b)), 5);
|
||||
|
@@ -204,7 +204,7 @@ nvc0_blend_state_delete(struct pipe_context *pipe, void *hwcso)
|
||||
FREE(hwcso);
|
||||
}
|
||||
|
||||
/* NOTE: ignoring line_last_pixel, using FALSE (set on screen init) */
|
||||
/* NOTE: ignoring line_last_pixel */
|
||||
static void *
|
||||
nvc0_rasterizer_state_create(struct pipe_context *pipe,
|
||||
const struct pipe_rasterizer_state *cso)
|
||||
@@ -315,6 +315,8 @@ nvc0_rasterizer_state_create(struct pipe_context *pipe,
|
||||
|
||||
SB_IMMED_3D(so, DEPTH_CLIP_NEGATIVE_Z, cso->clip_halfz);
|
||||
|
||||
SB_IMMED_3D(so, PIXEL_CENTER_INTEGER, !cso->half_pixel_center);
|
||||
|
||||
assert(so->size <= (sizeof(so->state) / sizeof(so->state[0])));
|
||||
return (void *)so;
|
||||
}
|
||||
@@ -1087,9 +1089,11 @@ nvc0_set_transform_feedback_targets(struct pipe_context *pipe,
|
||||
pipe_so_target_reference(&nvc0->tfbbuf[i], targets[i]);
|
||||
}
|
||||
for (; i < nvc0->num_tfbbufs; ++i) {
|
||||
nvc0->tfbbuf_dirty |= 1 << i;
|
||||
nvc0_so_target_save_offset(pipe, nvc0->tfbbuf[i], i, &serialize);
|
||||
pipe_so_target_reference(&nvc0->tfbbuf[i], NULL);
|
||||
if (nvc0->tfbbuf[i]) {
|
||||
nvc0->tfbbuf_dirty |= 1 << i;
|
||||
nvc0_so_target_save_offset(pipe, nvc0->tfbbuf[i], i, &serialize);
|
||||
pipe_so_target_reference(&nvc0->tfbbuf[i], NULL);
|
||||
}
|
||||
}
|
||||
nvc0->num_tfbbufs = num_targets;
|
||||
|
||||
|
@@ -23,7 +23,7 @@ struct nvc0_blend_stateobj {
|
||||
struct nvc0_rasterizer_stateobj {
|
||||
struct pipe_rasterizer_state pipe;
|
||||
int size;
|
||||
uint32_t state[43];
|
||||
uint32_t state[44];
|
||||
};
|
||||
|
||||
struct nvc0_zsa_stateobj {
|
||||
|
@@ -1401,11 +1401,14 @@ nvc0_blit(struct pipe_context *pipe, const struct pipe_blit_info *info)
|
||||
} else
|
||||
if (!nv50_2d_src_format_faithful(info->src.format)) {
|
||||
if (!util_format_is_luminance(info->src.format)) {
|
||||
if (!nv50_2d_dst_format_ops_supported(info->dst.format))
|
||||
eng3d = TRUE;
|
||||
else
|
||||
if (util_format_is_intensity(info->src.format))
|
||||
eng3d = info->src.format != PIPE_FORMAT_I8_UNORM;
|
||||
else
|
||||
if (!nv50_2d_dst_format_ops_supported(info->dst.format))
|
||||
eng3d = TRUE;
|
||||
if (util_format_is_alpha(info->src.format))
|
||||
eng3d = info->src.format != PIPE_FORMAT_A8_UNORM;
|
||||
else
|
||||
eng3d = !nv50_2d_format_supported(info->src.format);
|
||||
}
|
||||
|
@@ -575,8 +575,9 @@ nvc0_draw_arrays(struct nvc0_context *nvc0,
|
||||
if (nvc0->state.index_bias) {
|
||||
/* index_bias is implied 0 if !info->indexed (really ?) */
|
||||
/* TODO: can we deactivate it for the VERTEX_BUFFER_FIRST command ? */
|
||||
PUSH_SPACE(push, 1);
|
||||
PUSH_SPACE(push, 2);
|
||||
IMMED_NVC0(push, NVC0_3D(VB_ELEMENT_BASE), 0);
|
||||
IMMED_NVC0(push, NVC0_3D(VERTEX_ID), 0);
|
||||
nvc0->state.index_bias = 0;
|
||||
}
|
||||
|
||||
@@ -705,9 +706,11 @@ nvc0_draw_elements(struct nvc0_context *nvc0, boolean shorten,
|
||||
prim = nvc0_prim_gl(mode);
|
||||
|
||||
if (index_bias != nvc0->state.index_bias) {
|
||||
PUSH_SPACE(push, 2);
|
||||
PUSH_SPACE(push, 4);
|
||||
BEGIN_NVC0(push, NVC0_3D(VB_ELEMENT_BASE), 1);
|
||||
PUSH_DATA (push, index_bias);
|
||||
BEGIN_NVC0(push, NVC0_3D(VERTEX_ID), 1);
|
||||
PUSH_DATA (push, index_bias);
|
||||
nvc0->state.index_bias = index_bias;
|
||||
}
|
||||
|
||||
@@ -818,6 +821,7 @@ nvc0_draw_indirect(struct nvc0_context *nvc0, const struct pipe_draw_info *info)
|
||||
if (nvc0->state.index_bias) {
|
||||
/* index_bias is implied 0 if !info->indexed (really ?) */
|
||||
IMMED_NVC0(push, NVC0_3D(VB_ELEMENT_BASE), 0);
|
||||
IMMED_NVC0(push, NVC0_3D(VERTEX_ID), 0);
|
||||
nvc0->state.index_bias = 0;
|
||||
}
|
||||
size = 4 * 4;
|
||||
|
@@ -28,6 +28,7 @@
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <regex.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -528,7 +529,6 @@ void init_compiler(
|
||||
}
|
||||
|
||||
#define MAX_LINE_LENGTH 100
|
||||
#define MAX_PATH_LENGTH 100
|
||||
|
||||
unsigned load_program(
|
||||
struct radeon_compiler *c,
|
||||
@@ -536,14 +536,19 @@ unsigned load_program(
|
||||
const char *filename)
|
||||
{
|
||||
char line[MAX_LINE_LENGTH];
|
||||
char path[MAX_PATH_LENGTH];
|
||||
char path[PATH_MAX];
|
||||
FILE *file;
|
||||
unsigned *count;
|
||||
char **string_store;
|
||||
unsigned i = 0;
|
||||
int n;
|
||||
|
||||
memset(line, 0, sizeof(line));
|
||||
snprintf(path, MAX_PATH_LENGTH, TEST_PATH "/%s", filename);
|
||||
n = snprintf(path, PATH_MAX, TEST_PATH "/%s", filename);
|
||||
if (n < 0 || n >= PATH_MAX) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
file = fopen(path, "r");
|
||||
if (!file) {
|
||||
return 0;
|
||||
|
@@ -803,6 +803,15 @@ static void r300_blit(struct pipe_context *pipe,
|
||||
(struct pipe_framebuffer_state*)r300->fb_state.state;
|
||||
struct pipe_blit_info info = *blit;
|
||||
|
||||
/* The driver supports sRGB textures but not framebuffers. Blitting
|
||||
* from sRGB to sRGB should be the same as blitting from linear
|
||||
* to linear, so use that, This avoids incorrect linearization.
|
||||
*/
|
||||
if (util_format_is_srgb(info.src.format)) {
|
||||
info.src.format = util_format_linear(info.src.format);
|
||||
info.dst.format = util_format_linear(info.dst.format);
|
||||
}
|
||||
|
||||
/* MSAA resolve. */
|
||||
if (info.src.resource->nr_samples > 1 &&
|
||||
!util_format_is_depth_or_stencil(info.src.resource->format)) {
|
||||
|
@@ -170,24 +170,10 @@ static void get_external_state(
|
||||
}
|
||||
|
||||
state->unit[i].non_normalized_coords = !s->state.normalized_coords;
|
||||
state->unit[i].convert_unorm_to_snorm =
|
||||
v->base.format == PIPE_FORMAT_RGTC1_SNORM ||
|
||||
v->base.format == PIPE_FORMAT_LATC1_SNORM;
|
||||
state->unit[i].convert_unorm_to_snorm = 0;
|
||||
|
||||
/* Pass texture swizzling to the compiler, some lowering passes need it. */
|
||||
if (v->base.format == PIPE_FORMAT_RGTC1_SNORM ||
|
||||
v->base.format == PIPE_FORMAT_LATC1_SNORM) {
|
||||
unsigned char swizzle[4];
|
||||
|
||||
util_format_compose_swizzles(
|
||||
util_format_description(v->base.format)->swizzle,
|
||||
v->swizzle,
|
||||
swizzle);
|
||||
|
||||
state->unit[i].texture_swizzle =
|
||||
RC_MAKE_SWIZZLE(swizzle[0], swizzle[1],
|
||||
swizzle[2], swizzle[3]);
|
||||
} else if (state->unit[i].compare_mode_enabled) {
|
||||
if (state->unit[i].compare_mode_enabled) {
|
||||
state->unit[i].texture_swizzle =
|
||||
RC_MAKE_SWIZZLE(v->swizzle[0], v->swizzle[1],
|
||||
v->swizzle[2], v->swizzle[3]);
|
||||
|
@@ -169,20 +169,21 @@ uint32_t r300_translate_texformat(enum pipe_format format,
|
||||
|
||||
/* Add swizzling. */
|
||||
/* The RGTC1_SNORM and LATC1_SNORM swizzle is done in the shader. */
|
||||
if (format != PIPE_FORMAT_RGTC1_SNORM &&
|
||||
if (util_format_is_compressed(format) &&
|
||||
dxtc_swizzle &&
|
||||
format != PIPE_FORMAT_RGTC2_UNORM &&
|
||||
format != PIPE_FORMAT_RGTC2_SNORM &&
|
||||
format != PIPE_FORMAT_LATC2_UNORM &&
|
||||
format != PIPE_FORMAT_LATC2_SNORM &&
|
||||
format != PIPE_FORMAT_RGTC1_UNORM &&
|
||||
format != PIPE_FORMAT_RGTC1_SNORM &&
|
||||
format != PIPE_FORMAT_LATC1_UNORM &&
|
||||
format != PIPE_FORMAT_LATC1_SNORM) {
|
||||
if (util_format_is_compressed(format) &&
|
||||
dxtc_swizzle &&
|
||||
format != PIPE_FORMAT_RGTC2_UNORM &&
|
||||
format != PIPE_FORMAT_RGTC2_SNORM &&
|
||||
format != PIPE_FORMAT_LATC2_UNORM &&
|
||||
format != PIPE_FORMAT_LATC2_SNORM) {
|
||||
result |= r300_get_swizzle_combined(desc->swizzle, swizzle_view,
|
||||
TRUE);
|
||||
} else {
|
||||
result |= r300_get_swizzle_combined(desc->swizzle, swizzle_view,
|
||||
FALSE);
|
||||
}
|
||||
result |= r300_get_swizzle_combined(desc->swizzle, swizzle_view,
|
||||
TRUE);
|
||||
} else {
|
||||
result |= r300_get_swizzle_combined(desc->swizzle, swizzle_view,
|
||||
FALSE);
|
||||
}
|
||||
|
||||
/* S3TC formats. */
|
||||
@@ -213,6 +214,7 @@ uint32_t r300_translate_texformat(enum pipe_format format,
|
||||
switch (format) {
|
||||
case PIPE_FORMAT_RGTC1_SNORM:
|
||||
case PIPE_FORMAT_LATC1_SNORM:
|
||||
result |= sign_bit[0];
|
||||
case PIPE_FORMAT_LATC1_UNORM:
|
||||
case PIPE_FORMAT_RGTC1_UNORM:
|
||||
return R500_TX_FORMAT_ATI1N | result;
|
||||
@@ -936,14 +938,16 @@ static void r300_texture_setup_fb_state(struct r300_surface *surf)
|
||||
surf->pitch_zmask = tex->tex.zmask_stride_in_pixels[level];
|
||||
surf->pitch_hiz = tex->tex.hiz_stride_in_pixels[level];
|
||||
} else {
|
||||
enum pipe_format format = util_format_linear(surf->base.format);
|
||||
|
||||
surf->pitch =
|
||||
stride |
|
||||
r300_translate_colorformat(surf->base.format) |
|
||||
r300_translate_colorformat(format) |
|
||||
R300_COLOR_TILE(tex->tex.macrotile[level]) |
|
||||
R300_COLOR_MICROTILE(tex->tex.microtile);
|
||||
surf->format = r300_translate_out_fmt(surf->base.format);
|
||||
surf->format = r300_translate_out_fmt(format);
|
||||
surf->colormask_swizzle =
|
||||
r300_translate_colormask_swizzle(surf->base.format);
|
||||
r300_translate_colormask_swizzle(format);
|
||||
surf->pitch_cmask = tex->tex.cmask_stride_in_pixels;
|
||||
}
|
||||
}
|
||||
|
@@ -6071,7 +6071,7 @@ static int tgsi_ucmp(struct r600_shader_ctx *ctx)
|
||||
continue;
|
||||
|
||||
memset(&alu, 0, sizeof(struct r600_bytecode_alu));
|
||||
alu.op = ALU_OP3_CNDGE_INT;
|
||||
alu.op = ALU_OP3_CNDE_INT;
|
||||
r600_bytecode_src(&alu.src[0], &ctx->src[0], i);
|
||||
r600_bytecode_src(&alu.src[1], &ctx->src[2], i);
|
||||
r600_bytecode_src(&alu.src[2], &ctx->src[1], i);
|
||||
|
@@ -2659,11 +2659,8 @@ void r600_update_gs_state(struct pipe_context *ctx, struct r600_pipe_shader *sha
|
||||
r600_store_context_reg(cb, R_028A6C_VGT_GS_OUT_PRIM_TYPE,
|
||||
r600_conv_prim_to_gs_out(rshader->gs_output_prim));
|
||||
|
||||
r600_store_context_reg_seq(cb, R_0288C8_SQ_GS_VERT_ITEMSIZE, 4);
|
||||
r600_store_value(cb, cp_shader->ring_item_size >> 2);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_context_reg(cb, R_0288C8_SQ_GS_VERT_ITEMSIZE,
|
||||
cp_shader->ring_item_size >> 2);
|
||||
|
||||
r600_store_context_reg(cb, R_0288A8_SQ_ESGS_RING_ITEMSIZE,
|
||||
(rshader->ring_item_size) >> 2);
|
||||
|
@@ -616,6 +616,8 @@ public:
|
||||
unsigned num_slots;
|
||||
bool uses_mova_gpr;
|
||||
|
||||
bool r6xx_gpr_index_workaround;
|
||||
|
||||
bool stack_workaround_8xx;
|
||||
bool stack_workaround_9xx;
|
||||
|
||||
|
@@ -38,6 +38,18 @@
|
||||
|
||||
namespace r600_sb {
|
||||
|
||||
void bc_finalizer::insert_rv6xx_load_ar_workaround(alu_group_node *b4) {
|
||||
|
||||
alu_group_node *g = sh.create_alu_group();
|
||||
alu_node *a = sh.create_alu();
|
||||
|
||||
a->bc.set_op(ALU_OP0_NOP);
|
||||
a->bc.last = 1;
|
||||
|
||||
g->push_back(a);
|
||||
b4->insert_before(g);
|
||||
}
|
||||
|
||||
int bc_finalizer::run() {
|
||||
|
||||
run_on(sh.root);
|
||||
@@ -110,6 +122,8 @@ int bc_finalizer::run() {
|
||||
|
||||
void bc_finalizer::finalize_loop(region_node* r) {
|
||||
|
||||
update_nstack(r);
|
||||
|
||||
cf_node *loop_start = sh.create_cf(CF_OP_LOOP_START_DX10);
|
||||
cf_node *loop_end = sh.create_cf(CF_OP_LOOP_END);
|
||||
|
||||
@@ -209,12 +223,12 @@ void bc_finalizer::finalize_if(region_node* r) {
|
||||
}
|
||||
|
||||
void bc_finalizer::run_on(container_node* c) {
|
||||
|
||||
node *prev_node = NULL;
|
||||
for (node_iterator I = c->begin(), E = c->end(); I != E; ++I) {
|
||||
node *n = *I;
|
||||
|
||||
if (n->is_alu_group()) {
|
||||
finalize_alu_group(static_cast<alu_group_node*>(n));
|
||||
finalize_alu_group(static_cast<alu_group_node*>(n), prev_node);
|
||||
} else {
|
||||
if (n->is_alu_clause()) {
|
||||
cf_node *c = static_cast<cf_node*>(n);
|
||||
@@ -249,17 +263,22 @@ void bc_finalizer::run_on(container_node* c) {
|
||||
if (n->is_container())
|
||||
run_on(static_cast<container_node*>(n));
|
||||
}
|
||||
prev_node = n;
|
||||
}
|
||||
}
|
||||
|
||||
void bc_finalizer::finalize_alu_group(alu_group_node* g) {
|
||||
void bc_finalizer::finalize_alu_group(alu_group_node* g, node *prev_node) {
|
||||
|
||||
alu_node *last = NULL;
|
||||
alu_group_node *prev_g = NULL;
|
||||
bool add_nop = false;
|
||||
if (prev_node && prev_node->is_alu_group()) {
|
||||
prev_g = static_cast<alu_group_node*>(prev_node);
|
||||
}
|
||||
|
||||
for (node_iterator I = g->begin(), E = g->end(); I != E; ++I) {
|
||||
alu_node *n = static_cast<alu_node*>(*I);
|
||||
unsigned slot = n->bc.slot;
|
||||
|
||||
value *d = n->dst.empty() ? NULL : n->dst[0];
|
||||
|
||||
if (d && d->is_special_reg()) {
|
||||
@@ -297,17 +316,22 @@ void bc_finalizer::finalize_alu_group(alu_group_node* g) {
|
||||
|
||||
update_ngpr(n->bc.dst_gpr);
|
||||
|
||||
finalize_alu_src(g, n);
|
||||
add_nop |= finalize_alu_src(g, n, prev_g);
|
||||
|
||||
last = n;
|
||||
}
|
||||
|
||||
if (add_nop) {
|
||||
if (sh.get_ctx().r6xx_gpr_index_workaround) {
|
||||
insert_rv6xx_load_ar_workaround(g);
|
||||
}
|
||||
}
|
||||
last->bc.last = 1;
|
||||
}
|
||||
|
||||
void bc_finalizer::finalize_alu_src(alu_group_node* g, alu_node* a) {
|
||||
bool bc_finalizer::finalize_alu_src(alu_group_node* g, alu_node* a, alu_group_node *prev) {
|
||||
vvec &sv = a->src;
|
||||
|
||||
bool add_nop = false;
|
||||
FBC_DUMP(
|
||||
sblog << "finalize_alu_src: ";
|
||||
dump::dump_op(a);
|
||||
@@ -334,6 +358,15 @@ void bc_finalizer::finalize_alu_src(alu_group_node* g, alu_node* a) {
|
||||
if (!v->rel->is_const()) {
|
||||
src.rel = 1;
|
||||
update_ngpr(v->array->gpr.sel() + v->array->array_size -1);
|
||||
if (prev && !add_nop) {
|
||||
for (node_iterator pI = prev->begin(), pE = prev->end(); pI != pE; ++pI) {
|
||||
alu_node *pn = static_cast<alu_node*>(*pI);
|
||||
if (pn->bc.dst_gpr == src.sel) {
|
||||
add_nop = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
src.rel = 0;
|
||||
|
||||
@@ -391,11 +424,23 @@ void bc_finalizer::finalize_alu_src(alu_group_node* g, alu_node* a) {
|
||||
assert(!"unknown value kind");
|
||||
break;
|
||||
}
|
||||
if (prev && !add_nop) {
|
||||
for (node_iterator pI = prev->begin(), pE = prev->end(); pI != pE; ++pI) {
|
||||
alu_node *pn = static_cast<alu_node*>(*pI);
|
||||
if (pn->bc.dst_rel) {
|
||||
if (pn->bc.dst_gpr == src.sel) {
|
||||
add_nop = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while (si < 3) {
|
||||
a->bc.src[si++].sel = 0;
|
||||
}
|
||||
return add_nop;
|
||||
}
|
||||
|
||||
void bc_finalizer::copy_fetch_src(fetch_node &dst, fetch_node &src, unsigned arg_start)
|
||||
|
@@ -758,6 +758,8 @@ int bc_parser::prepare_loop(cf_node* c) {
|
||||
c->insert_before(reg);
|
||||
rep->move(c, end->next);
|
||||
|
||||
reg->src_loop = true;
|
||||
|
||||
loop_stack.push(reg);
|
||||
return 0;
|
||||
}
|
||||
|
@@ -61,6 +61,8 @@ int sb_context::init(r600_isa *isa, sb_hw_chip chip, sb_hw_class cclass) {
|
||||
|
||||
uses_mova_gpr = is_r600() && chip != HW_CHIP_RV670;
|
||||
|
||||
r6xx_gpr_index_workaround = is_r600() && chip != HW_CHIP_RV670 && chip != HW_CHIP_RS780 && chip != HW_CHIP_RS880;
|
||||
|
||||
switch (chip) {
|
||||
case HW_CHIP_RV610:
|
||||
case HW_CHIP_RS780:
|
||||
|
@@ -115,13 +115,13 @@ void if_conversion::convert_kill_instructions(region_node *r,
|
||||
bool if_conversion::check_and_convert(region_node *r) {
|
||||
|
||||
depart_node *nd1 = static_cast<depart_node*>(r->first);
|
||||
if (!nd1->is_depart())
|
||||
if (!nd1->is_depart() || nd1->target != r)
|
||||
return false;
|
||||
if_node *nif = static_cast<if_node*>(nd1->first);
|
||||
if (!nif->is_if())
|
||||
return false;
|
||||
depart_node *nd2 = static_cast<depart_node*>(nif->first);
|
||||
if (!nd2->is_depart())
|
||||
if (!nd2->is_depart() || nd2->target != r)
|
||||
return false;
|
||||
|
||||
value* &em = nif->cond;
|
||||
|
@@ -1089,7 +1089,8 @@ typedef std::vector<repeat_node*> repeat_vec;
|
||||
class region_node : public container_node {
|
||||
protected:
|
||||
region_node(unsigned id) : container_node(NT_REGION, NST_LIST), region_id(id),
|
||||
loop_phi(), phi(), vars_defined(), departs(), repeats() {}
|
||||
loop_phi(), phi(), vars_defined(), departs(), repeats(), src_loop()
|
||||
{}
|
||||
public:
|
||||
unsigned region_id;
|
||||
|
||||
@@ -1101,12 +1102,16 @@ public:
|
||||
depart_vec departs;
|
||||
repeat_vec repeats;
|
||||
|
||||
// true if region was created for loop in the parser, sometimes repeat_node
|
||||
// may be optimized away so we need to remember this information
|
||||
bool src_loop;
|
||||
|
||||
virtual bool accept(vpass &p, bool enter);
|
||||
|
||||
unsigned dep_count() { return departs.size(); }
|
||||
unsigned rep_count() { return repeats.size() + 1; }
|
||||
|
||||
bool is_loop() { return !repeats.empty(); }
|
||||
bool is_loop() { return src_loop || !repeats.empty(); }
|
||||
|
||||
container_node* get_entry_code_location() {
|
||||
node *p = first;
|
||||
|
@@ -695,8 +695,9 @@ public:
|
||||
|
||||
void run_on(container_node *c);
|
||||
|
||||
void finalize_alu_group(alu_group_node *g);
|
||||
void finalize_alu_src(alu_group_node *g, alu_node *a);
|
||||
void insert_rv6xx_load_ar_workaround(alu_group_node *b4);
|
||||
void finalize_alu_group(alu_group_node *g, node *prev_node);
|
||||
bool finalize_alu_src(alu_group_node *g, alu_node *a, alu_group_node *prev_node);
|
||||
|
||||
void emit_set_grad(fetch_node* f);
|
||||
void finalize_fetch(fetch_node *f);
|
||||
|
@@ -1527,6 +1527,9 @@ bool post_scheduler::check_copy(node *n) {
|
||||
|
||||
if (!s->is_prealloc()) {
|
||||
recolor_local(s);
|
||||
|
||||
if (!s->chunk || s->chunk != d->chunk)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (s->gpr == d->gpr) {
|
||||
|
@@ -294,6 +294,7 @@ struct r600_so_target {
|
||||
/* The buffer where BUFFER_FILLED_SIZE is stored. */
|
||||
struct r600_resource *buf_filled_size;
|
||||
unsigned buf_filled_size_offset;
|
||||
bool buf_filled_size_valid;
|
||||
|
||||
unsigned stride_in_dw;
|
||||
};
|
||||
|
@@ -237,7 +237,7 @@ static void r600_emit_streamout_begin(struct r600_common_context *rctx, struct r
|
||||
}
|
||||
}
|
||||
|
||||
if (rctx->streamout.append_bitmask & (1 << i)) {
|
||||
if (rctx->streamout.append_bitmask & (1 << i) && t[i]->buf_filled_size_valid) {
|
||||
uint64_t va = t[i]->buf_filled_size->gpu_address +
|
||||
t[i]->buf_filled_size_offset;
|
||||
|
||||
@@ -302,6 +302,8 @@ void r600_emit_streamout_end(struct r600_common_context *rctx)
|
||||
* buffer bound. This ensures that the primitives-emitted query
|
||||
* won't increment. */
|
||||
r600_write_context_reg(cs, R_028AD0_VGT_STRMOUT_BUFFER_SIZE_0 + 16*i, 0);
|
||||
|
||||
t[i]->buf_filled_size_valid = true;
|
||||
}
|
||||
|
||||
rctx->streamout.begin_emitted = false;
|
||||
|
@@ -80,10 +80,6 @@ void radeon_llvm_shader_type(LLVMValueRef F, unsigned type)
|
||||
sprintf(Str, "%1d", llvm_type);
|
||||
|
||||
LLVMAddTargetDependentFunctionAttr(F, "ShaderType", Str);
|
||||
|
||||
if (type != TGSI_PROCESSOR_COMPUTE) {
|
||||
LLVMAddTargetDependentFunctionAttr(F, "unsafe-fp-math", "true");
|
||||
}
|
||||
}
|
||||
|
||||
static void init_r600_target()
|
||||
|
@@ -748,7 +748,7 @@ static void txp_fetch_args(
|
||||
const struct tgsi_full_instruction * inst = emit_data->inst;
|
||||
LLVMValueRef src_w;
|
||||
unsigned chan;
|
||||
LLVMValueRef coords[4];
|
||||
LLVMValueRef coords[5];
|
||||
|
||||
emit_data->dst_type = LLVMVectorType(bld_base->base.elem_type, 4);
|
||||
src_w = lp_build_emit_fetch(bld_base, emit_data->inst, 0, TGSI_CHAN_W);
|
||||
|
@@ -228,14 +228,14 @@ static LLVMValueRef get_instance_index_for_fetch(
|
||||
|
||||
LLVMValueRef result = LLVMGetParam(radeon_bld->main_fn,
|
||||
si_shader_ctx->param_instance_id);
|
||||
result = LLVMBuildAdd(gallivm->builder, result, LLVMGetParam(
|
||||
radeon_bld->main_fn, SI_PARAM_START_INSTANCE), "");
|
||||
|
||||
/* The division must be done before START_INSTANCE is added. */
|
||||
if (divisor > 1)
|
||||
result = LLVMBuildUDiv(gallivm->builder, result,
|
||||
lp_build_const_int32(gallivm, divisor), "");
|
||||
|
||||
return result;
|
||||
return LLVMBuildAdd(gallivm->builder, result, LLVMGetParam(
|
||||
radeon_bld->main_fn, SI_PARAM_START_INSTANCE), "");
|
||||
}
|
||||
|
||||
static void declare_input_vs(
|
||||
@@ -590,8 +590,11 @@ static void declare_system_value(
|
||||
break;
|
||||
|
||||
case TGSI_SEMANTIC_VERTEXID:
|
||||
value = LLVMGetParam(radeon_bld->main_fn,
|
||||
si_shader_ctx->param_vertex_id);
|
||||
value = LLVMBuildAdd(gallivm->builder,
|
||||
LLVMGetParam(radeon_bld->main_fn,
|
||||
si_shader_ctx->param_vertex_id),
|
||||
LLVMGetParam(radeon_bld->main_fn,
|
||||
SI_PARAM_BASE_VERTEX), "");
|
||||
break;
|
||||
|
||||
case TGSI_SEMANTIC_SAMPLEID:
|
||||
@@ -1502,7 +1505,7 @@ static void tex_fetch_args(
|
||||
const struct tgsi_full_instruction * inst = emit_data->inst;
|
||||
unsigned opcode = inst->Instruction.Opcode;
|
||||
unsigned target = inst->Texture.Texture;
|
||||
LLVMValueRef coords[4];
|
||||
LLVMValueRef coords[5];
|
||||
LLVMValueRef address[16];
|
||||
int ref_pos;
|
||||
unsigned num_coords = tgsi_util_get_texture_coord_dim(target, &ref_pos);
|
||||
|
@@ -697,12 +697,16 @@ static void si_delete_rs_state(struct pipe_context *ctx, void *state)
|
||||
*/
|
||||
static void si_update_dsa_stencil_ref(struct si_context *sctx)
|
||||
{
|
||||
struct si_pm4_state *pm4 = CALLOC_STRUCT(si_pm4_state);
|
||||
struct si_pm4_state *pm4;
|
||||
struct pipe_stencil_ref *ref = &sctx->stencil_ref;
|
||||
struct si_state_dsa *dsa = sctx->queued.named.dsa;
|
||||
struct si_state_dsa *dsa = sctx->queued.named.dsa;
|
||||
|
||||
if (pm4 == NULL)
|
||||
return;
|
||||
if (!dsa)
|
||||
return;
|
||||
|
||||
pm4 = CALLOC_STRUCT(si_pm4_state);
|
||||
if (pm4 == NULL)
|
||||
return;
|
||||
|
||||
si_pm4_set_reg(pm4, R_028430_DB_STENCILREFMASK,
|
||||
S_028430_STENCILTESTVAL(ref->ref_value[0]) |
|
||||
@@ -3081,6 +3085,110 @@ void si_init_state_functions(struct si_context *sctx)
|
||||
sctx->b.b.draw_vbo = si_draw_vbo;
|
||||
}
|
||||
|
||||
static void
|
||||
si_write_harvested_raster_configs(struct si_context *sctx,
|
||||
struct si_pm4_state *pm4,
|
||||
unsigned raster_config)
|
||||
{
|
||||
unsigned sh_per_se = MAX2(sctx->screen->b.info.max_sh_per_se, 1);
|
||||
unsigned num_se = MAX2(sctx->screen->b.info.max_se, 1);
|
||||
unsigned rb_mask = sctx->screen->b.info.si_backend_enabled_mask;
|
||||
unsigned num_rb = sctx->screen->b.info.r600_num_backends;
|
||||
unsigned rb_per_pkr = num_rb / num_se / sh_per_se;
|
||||
unsigned rb_per_se = num_rb / num_se;
|
||||
unsigned se0_mask = (1 << rb_per_se) - 1;
|
||||
unsigned se1_mask = se0_mask << rb_per_se;
|
||||
unsigned se;
|
||||
|
||||
assert(num_se == 1 || num_se == 2);
|
||||
assert(sh_per_se == 1 || sh_per_se == 2);
|
||||
assert(rb_per_pkr == 1 || rb_per_pkr == 2);
|
||||
|
||||
/* XXX: I can't figure out what the *_XSEL and *_YSEL
|
||||
* fields are for, so I'm leaving them as their default
|
||||
* values. */
|
||||
|
||||
se0_mask &= rb_mask;
|
||||
se1_mask &= rb_mask;
|
||||
if (num_se == 2 && (!se0_mask || !se1_mask)) {
|
||||
raster_config &= C_028350_SE_MAP;
|
||||
|
||||
if (!se0_mask) {
|
||||
raster_config |=
|
||||
S_028350_SE_MAP(V_028350_RASTER_CONFIG_SE_MAP_3);
|
||||
} else {
|
||||
raster_config |=
|
||||
S_028350_SE_MAP(V_028350_RASTER_CONFIG_SE_MAP_0);
|
||||
}
|
||||
}
|
||||
|
||||
for (se = 0; se < num_se; se++) {
|
||||
unsigned raster_config_se = raster_config;
|
||||
unsigned pkr0_mask = ((1 << rb_per_pkr) - 1) << (se * rb_per_se);
|
||||
unsigned pkr1_mask = pkr0_mask << rb_per_pkr;
|
||||
|
||||
pkr0_mask &= rb_mask;
|
||||
pkr1_mask &= rb_mask;
|
||||
if (sh_per_se == 2 && (!pkr0_mask || !pkr1_mask)) {
|
||||
raster_config_se &= C_028350_PKR_MAP;
|
||||
|
||||
if (!pkr0_mask) {
|
||||
raster_config_se |=
|
||||
S_028350_PKR_MAP(V_028350_RASTER_CONFIG_PKR_MAP_3);
|
||||
} else {
|
||||
raster_config_se |=
|
||||
S_028350_PKR_MAP(V_028350_RASTER_CONFIG_PKR_MAP_0);
|
||||
}
|
||||
}
|
||||
|
||||
if (rb_per_pkr == 2) {
|
||||
unsigned rb0_mask = 1 << (se * rb_per_se);
|
||||
unsigned rb1_mask = rb0_mask << 1;
|
||||
|
||||
rb0_mask &= rb_mask;
|
||||
rb1_mask &= rb_mask;
|
||||
if (!rb0_mask || !rb1_mask) {
|
||||
raster_config_se &= C_028350_RB_MAP_PKR0;
|
||||
|
||||
if (!rb0_mask) {
|
||||
raster_config_se |=
|
||||
S_028350_RB_MAP_PKR0(V_028350_RASTER_CONFIG_RB_MAP_3);
|
||||
} else {
|
||||
raster_config_se |=
|
||||
S_028350_RB_MAP_PKR0(V_028350_RASTER_CONFIG_RB_MAP_0);
|
||||
}
|
||||
}
|
||||
|
||||
if (sh_per_se == 2) {
|
||||
rb0_mask = 1 << (se * rb_per_se + rb_per_pkr);
|
||||
rb1_mask = rb0_mask << 1;
|
||||
rb0_mask &= rb_mask;
|
||||
rb1_mask &= rb_mask;
|
||||
if (!rb0_mask || !rb1_mask) {
|
||||
raster_config_se &= C_028350_RB_MAP_PKR1;
|
||||
|
||||
if (!rb0_mask) {
|
||||
raster_config_se |=
|
||||
S_028350_RB_MAP_PKR1(V_028350_RASTER_CONFIG_RB_MAP_3);
|
||||
} else {
|
||||
raster_config_se |=
|
||||
S_028350_RB_MAP_PKR1(V_028350_RASTER_CONFIG_RB_MAP_0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
si_pm4_set_reg(pm4, GRBM_GFX_INDEX,
|
||||
SE_INDEX(se) | SH_BROADCAST_WRITES |
|
||||
INSTANCE_BROADCAST_WRITES);
|
||||
si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, raster_config_se);
|
||||
}
|
||||
|
||||
si_pm4_set_reg(pm4, GRBM_GFX_INDEX,
|
||||
SE_BROADCAST_WRITES | SH_BROADCAST_WRITES |
|
||||
INSTANCE_BROADCAST_WRITES);
|
||||
}
|
||||
|
||||
void si_init_config(struct si_context *sctx)
|
||||
{
|
||||
struct si_pm4_state *pm4 = CALLOC_STRUCT(si_pm4_state);
|
||||
@@ -3152,24 +3260,40 @@ void si_init_config(struct si_context *sctx)
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
unsigned rb_mask = sctx->screen->b.info.si_backend_enabled_mask;
|
||||
unsigned num_rb = sctx->screen->b.info.r600_num_backends;
|
||||
unsigned raster_config;
|
||||
|
||||
switch (sctx->screen->b.family) {
|
||||
case CHIP_TAHITI:
|
||||
case CHIP_PITCAIRN:
|
||||
si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x2a00126a);
|
||||
raster_config = 0x2a00126a;
|
||||
break;
|
||||
case CHIP_VERDE:
|
||||
si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x0000124a);
|
||||
raster_config = 0x0000124a;
|
||||
break;
|
||||
case CHIP_OLAND:
|
||||
si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x00000082);
|
||||
raster_config = 0x00000082;
|
||||
break;
|
||||
case CHIP_HAINAN:
|
||||
si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x00000000);
|
||||
raster_config = 0x00000000;
|
||||
break;
|
||||
default:
|
||||
si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x00000000);
|
||||
fprintf(stderr,
|
||||
"radeonsi: Unknown GPU, using 0 for raster_config\n");
|
||||
raster_config = 0x00000000;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Always use the default config when all backends are enabled
|
||||
* (or when we failed to determine the enabled backends).
|
||||
*/
|
||||
if (!rb_mask || util_bitcount(rb_mask) >= num_rb) {
|
||||
si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG,
|
||||
raster_config);
|
||||
} else {
|
||||
si_write_harvested_raster_configs(sctx, pm4, raster_config);
|
||||
}
|
||||
}
|
||||
|
||||
si_pm4_set_reg(pm4, R_028204_PA_SC_WINDOW_SCISSOR_TL, S_028204_WINDOW_OFFSET_DISABLE(1));
|
||||
|
@@ -544,9 +544,11 @@ bcolor:
|
||||
}
|
||||
}
|
||||
|
||||
if (j == vsinfo->num_outputs) {
|
||||
/* No corresponding output found, load defaults into input */
|
||||
tmp |= S_028644_OFFSET(0x20);
|
||||
if (j == vsinfo->num_outputs && !G_028644_PT_SPRITE_TEX(tmp)) {
|
||||
/* No corresponding output found, load defaults into input.
|
||||
* Don't set any other bits.
|
||||
* (FLAT_SHADE=1 completely changes behavior) */
|
||||
tmp = S_028644_OFFSET(0x20);
|
||||
}
|
||||
|
||||
si_pm4_set_reg(pm4,
|
||||
|
@@ -204,7 +204,13 @@
|
||||
* 6. COMMAND [29:22] | BYTE_COUNT [20:0]
|
||||
*/
|
||||
|
||||
|
||||
#define GRBM_GFX_INDEX 0x802C
|
||||
#define INSTANCE_INDEX(x) ((x) << 0)
|
||||
#define SH_INDEX(x) ((x) << 8)
|
||||
#define SE_INDEX(x) ((x) << 16)
|
||||
#define SH_BROADCAST_WRITES (1 << 29)
|
||||
#define INSTANCE_BROADCAST_WRITES (1 << 30)
|
||||
#define SE_BROADCAST_WRITES (1 << 31)
|
||||
#define R_0084FC_CP_STRMOUT_CNTL 0x0084FC
|
||||
#define S_0084FC_OFFSET_UPDATE_DONE(x) (((x) & 0x1) << 0)
|
||||
#define R_0085F0_CP_COHER_CNTL 0x0085F0
|
||||
|
@@ -302,6 +302,9 @@ NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This,
|
||||
return D3DERR_NOTAVAILABLE;
|
||||
}
|
||||
|
||||
/* we support ATI1 and ATI2 hack only for 2D textures */
|
||||
if (RType != D3DRTYPE_TEXTURE && (CheckFormat == D3DFMT_ATI1 || CheckFormat == D3DFMT_ATI2))
|
||||
return D3DERR_NOTAVAILABLE;
|
||||
/* if (Usage & D3DUSAGE_NONSECURE) { don't know the implications of this } */
|
||||
/* if (Usage & D3DUSAGE_SOFTWAREPROCESSING) { we can always support this } */
|
||||
|
||||
@@ -549,7 +552,7 @@ NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This,
|
||||
D3DPMISCCAPS_CULLCCW |
|
||||
D3DPMISCCAPS_COLORWRITEENABLE |
|
||||
D3DPMISCCAPS_CLIPPLANESCALEDPOINTS |
|
||||
D3DPMISCCAPS_CLIPTLVERTS |
|
||||
/*D3DPMISCCAPS_CLIPTLVERTS |*/
|
||||
D3DPMISCCAPS_TSSARGTEMP |
|
||||
D3DPMISCCAPS_BLENDOP |
|
||||
D3DPIPECAP(INDEP_BLEND_ENABLE, D3DPMISCCAPS_INDEPENDENTWRITEMASKS) |
|
||||
@@ -560,6 +563,8 @@ NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This,
|
||||
D3DPIPECAP(MIXED_COLORBUFFER_FORMATS, D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS) |
|
||||
D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING |
|
||||
/*D3DPMISCCAPS_FOGVERTEXCLAMPED*/0;
|
||||
if (!screen->get_param(screen, PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION))
|
||||
pCaps->PrimitiveMiscCaps |= D3DPMISCCAPS_CLIPTLVERTS;
|
||||
|
||||
pCaps->RasterCaps =
|
||||
D3DPIPECAP(ANISOTROPIC_FILTER, D3DPRASTERCAPS_ANISOTROPY) |
|
||||
@@ -990,7 +995,7 @@ NineAdapter9_CreateDevice( struct NineAdapter9 *This,
|
||||
params.BehaviorFlags = BehaviorFlags;
|
||||
|
||||
hr = NineDevice9_new(screen, ¶ms, &caps, pPresentationParameters,
|
||||
pD3D9, pPresentationGroup, This->ctx,
|
||||
pD3D9, pPresentationGroup, This->ctx, FALSE, NULL,
|
||||
(struct NineDevice9 **)ppReturnedDeviceInterface);
|
||||
if (FAILED(hr)) {
|
||||
DBG("Failed to create device.\n");
|
||||
|
@@ -41,25 +41,31 @@
|
||||
HRESULT
|
||||
NineBaseTexture9_ctor( struct NineBaseTexture9 *This,
|
||||
struct NineUnknownParams *pParams,
|
||||
struct pipe_resource *initResource,
|
||||
D3DRESOURCETYPE Type,
|
||||
D3DPOOL Pool )
|
||||
D3DFORMAT format,
|
||||
D3DPOOL Pool,
|
||||
DWORD Usage)
|
||||
{
|
||||
BOOL alloc = (Pool == D3DPOOL_DEFAULT) && !This->base.resource &&
|
||||
(This->format != D3DFMT_NULL);
|
||||
BOOL alloc = (Pool == D3DPOOL_DEFAULT) && !initResource &&
|
||||
(format != D3DFMT_NULL);
|
||||
HRESULT hr;
|
||||
DWORD usage = This->base.usage;
|
||||
|
||||
user_assert(!(usage & (D3DUSAGE_RENDERTARGET | D3DUSAGE_DEPTHSTENCIL)) ||
|
||||
DBG("This=%p, pParams=%p initResource=%p Type=%d format=%d Pool=%d Usage=%d\n",
|
||||
This, pParams, initResource, Type, format, Pool, Usage);
|
||||
|
||||
user_assert(!(Usage & (D3DUSAGE_RENDERTARGET | D3DUSAGE_DEPTHSTENCIL)) ||
|
||||
Pool == D3DPOOL_DEFAULT, D3DERR_INVALIDCALL);
|
||||
user_assert(!(usage & D3DUSAGE_DYNAMIC) ||
|
||||
user_assert(!(Usage & D3DUSAGE_DYNAMIC) ||
|
||||
Pool != D3DPOOL_MANAGED, D3DERR_INVALIDCALL);
|
||||
|
||||
hr = NineResource9_ctor(&This->base, pParams, alloc, Type, Pool);
|
||||
hr = NineResource9_ctor(&This->base, pParams, initResource, alloc, Type, Pool, Usage);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
This->format = format;
|
||||
This->pipe = pParams->device->pipe;
|
||||
This->mipfilter = (This->base.usage & D3DUSAGE_AUTOGENMIPMAP) ?
|
||||
This->mipfilter = (Usage & D3DUSAGE_AUTOGENMIPMAP) ?
|
||||
D3DTEXF_LINEAR : D3DTEXF_NONE;
|
||||
This->lod = 0;
|
||||
This->lod_resident = -1;
|
||||
@@ -90,6 +96,8 @@ NineBaseTexture9_SetLOD( struct NineBaseTexture9 *This,
|
||||
{
|
||||
DWORD old = This->lod;
|
||||
|
||||
DBG("This=%p LODNew=%d\n", This, LODNew);
|
||||
|
||||
user_assert(This->base.pool == D3DPOOL_MANAGED, 0);
|
||||
|
||||
This->lod = MIN2(LODNew, This->base.info.last_level);
|
||||
@@ -103,12 +111,16 @@ NineBaseTexture9_SetLOD( struct NineBaseTexture9 *This,
|
||||
DWORD WINAPI
|
||||
NineBaseTexture9_GetLOD( struct NineBaseTexture9 *This )
|
||||
{
|
||||
DBG("This=%p\n", This);
|
||||
|
||||
return This->lod;
|
||||
}
|
||||
|
||||
DWORD WINAPI
|
||||
NineBaseTexture9_GetLevelCount( struct NineBaseTexture9 *This )
|
||||
{
|
||||
DBG("This=%p\n", This);
|
||||
|
||||
if (This->base.usage & D3DUSAGE_AUTOGENMIPMAP)
|
||||
return 1;
|
||||
return This->base.info.last_level + 1;
|
||||
@@ -118,6 +130,8 @@ HRESULT WINAPI
|
||||
NineBaseTexture9_SetAutoGenFilterType( struct NineBaseTexture9 *This,
|
||||
D3DTEXTUREFILTERTYPE FilterType )
|
||||
{
|
||||
DBG("This=%p FilterType=%d\n", This, FilterType);
|
||||
|
||||
if (!(This->base.usage & D3DUSAGE_AUTOGENMIPMAP))
|
||||
return D3D_OK;
|
||||
user_assert(FilterType != D3DTEXF_NONE, D3DERR_INVALIDCALL);
|
||||
@@ -130,6 +144,8 @@ NineBaseTexture9_SetAutoGenFilterType( struct NineBaseTexture9 *This,
|
||||
D3DTEXTUREFILTERTYPE WINAPI
|
||||
NineBaseTexture9_GetAutoGenFilterType( struct NineBaseTexture9 *This )
|
||||
{
|
||||
DBG("This=%p\n", This);
|
||||
|
||||
return This->mipfilter;
|
||||
}
|
||||
|
||||
@@ -420,20 +436,32 @@ NineBaseTexture9_CreatePipeResource( struct NineBaseTexture9 *This,
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
#define SWIZZLE_TO_REPLACE(s) (s == UTIL_FORMAT_SWIZZLE_0 || \
|
||||
s == UTIL_FORMAT_SWIZZLE_1 || \
|
||||
s == UTIL_FORMAT_SWIZZLE_NONE)
|
||||
|
||||
HRESULT
|
||||
NineBaseTexture9_UpdateSamplerView( struct NineBaseTexture9 *This,
|
||||
const int sRGB )
|
||||
{
|
||||
const struct util_format_description *desc;
|
||||
struct pipe_context *pipe = This->pipe;
|
||||
struct pipe_screen *screen = pipe->screen;
|
||||
struct pipe_resource *resource = This->base.resource;
|
||||
struct pipe_sampler_view templ;
|
||||
enum pipe_format srgb_format;
|
||||
unsigned i;
|
||||
uint8_t swizzle[4];
|
||||
|
||||
DBG("This=%p sRGB=%d\n", This, sRGB);
|
||||
|
||||
if (unlikely(!resource)) {
|
||||
if (unlikely(This->format == D3DFMT_NULL))
|
||||
return D3D_OK;
|
||||
NineBaseTexture9_Dump(This);
|
||||
/* hack due to incorrect POOL_MANAGED handling */
|
||||
NineBaseTexture9_GenerateMipSubLevels(This);
|
||||
resource = This->base.resource;
|
||||
}
|
||||
assert(resource);
|
||||
|
||||
@@ -445,25 +473,49 @@ NineBaseTexture9_UpdateSamplerView( struct NineBaseTexture9 *This,
|
||||
swizzle[3] = PIPE_SWIZZLE_ALPHA;
|
||||
desc = util_format_description(resource->format);
|
||||
if (desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) {
|
||||
/* ZZZ1 -> 0Z01 (see end of docs/source/tgsi.rst)
|
||||
* XXX: but it's wrong
|
||||
swizzle[0] = PIPE_SWIZZLE_ZERO;
|
||||
swizzle[2] = PIPE_SWIZZLE_ZERO; */
|
||||
} else
|
||||
if (desc->swizzle[0] == UTIL_FORMAT_SWIZZLE_X &&
|
||||
desc->swizzle[3] == UTIL_FORMAT_SWIZZLE_1) {
|
||||
/* R001/RG01 -> R111/RG11 */
|
||||
if (desc->swizzle[1] == UTIL_FORMAT_SWIZZLE_0)
|
||||
swizzle[1] = PIPE_SWIZZLE_ONE;
|
||||
if (desc->swizzle[2] == UTIL_FORMAT_SWIZZLE_0)
|
||||
swizzle[2] = PIPE_SWIZZLE_ONE;
|
||||
/* msdn doc is incomplete here and wrong.
|
||||
* The only formats that can be read directly here
|
||||
* are DF16, DF24 and INTZ.
|
||||
* Tested on win the swizzle is
|
||||
* R = depth, G = B = 0, A = 1 for DF16 and DF24
|
||||
* R = G = B = A = depth for INTZ
|
||||
* For the other ZS formats that can't be read directly
|
||||
* but can be used as shadow map, the result is duplicated on
|
||||
* all channel */
|
||||
if (This->format == D3DFMT_DF16 ||
|
||||
This->format == D3DFMT_DF24) {
|
||||
swizzle[1] = PIPE_SWIZZLE_ZERO;
|
||||
swizzle[2] = PIPE_SWIZZLE_ZERO;
|
||||
swizzle[3] = PIPE_SWIZZLE_ONE;
|
||||
} else {
|
||||
swizzle[1] = PIPE_SWIZZLE_RED;
|
||||
swizzle[2] = PIPE_SWIZZLE_RED;
|
||||
swizzle[3] = PIPE_SWIZZLE_RED;
|
||||
}
|
||||
} else if (resource->format != PIPE_FORMAT_A8_UNORM &&
|
||||
resource->format != PIPE_FORMAT_RGTC1_UNORM) {
|
||||
/* exceptions:
|
||||
* A8 should have 0.0 as default values for RGB.
|
||||
* ATI1/RGTC1 should be r 0 0 1 (tested on windows).
|
||||
* It is already what gallium does. All the other ones
|
||||
* should have 1.0 for non-defined values */
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (SWIZZLE_TO_REPLACE(desc->swizzle[i]))
|
||||
swizzle[i] = PIPE_SWIZZLE_ONE;
|
||||
}
|
||||
}
|
||||
/* but 000A remains unchanged */
|
||||
|
||||
templ.format = sRGB ? util_format_srgb(resource->format) : resource->format;
|
||||
/* if requested and supported, convert to the sRGB format */
|
||||
srgb_format = util_format_srgb(resource->format);
|
||||
if (sRGB && srgb_format != PIPE_FORMAT_NONE &&
|
||||
screen->is_format_supported(screen, srgb_format,
|
||||
resource->target, 0, resource->bind))
|
||||
templ.format = srgb_format;
|
||||
else
|
||||
templ.format = resource->format;
|
||||
templ.u.tex.first_layer = 0;
|
||||
templ.u.tex.last_layer = (resource->target == PIPE_TEXTURE_CUBE) ?
|
||||
5 : (This->base.info.depth0 - 1);
|
||||
templ.u.tex.last_layer = resource->target == PIPE_TEXTURE_3D ?
|
||||
resource->depth0 - 1 : resource->array_size - 1;
|
||||
templ.u.tex.first_level = 0;
|
||||
templ.u.tex.last_level = resource->last_level;
|
||||
templ.swizzle_r = swizzle[0];
|
||||
@@ -482,6 +534,8 @@ NineBaseTexture9_UpdateSamplerView( struct NineBaseTexture9 *This,
|
||||
void WINAPI
|
||||
NineBaseTexture9_PreLoad( struct NineBaseTexture9 *This )
|
||||
{
|
||||
DBG("This=%p\n", This);
|
||||
|
||||
if (This->dirty && This->base.pool == D3DPOOL_MANAGED)
|
||||
NineBaseTexture9_UploadSelf(This);
|
||||
}
|
||||
@@ -490,9 +544,9 @@ NineBaseTexture9_PreLoad( struct NineBaseTexture9 *This )
|
||||
void
|
||||
NineBaseTexture9_Dump( struct NineBaseTexture9 *This )
|
||||
{
|
||||
DBG("\nNineBaseTexture9(%p->%p/%p): Pool=%s Type=%s Usage=%s\n"
|
||||
DBG("\nNineBaseTexture9(%p->NULL/%p): Pool=%s Type=%s Usage=%s\n"
|
||||
"Format=%s Dims=%ux%ux%u/%u LastLevel=%u Lod=%u(%u)\n", This,
|
||||
This->base.resource, This->base.data,
|
||||
This->base.resource,
|
||||
nine_D3DPOOL_to_str(This->base.pool),
|
||||
nine_D3DRTYPE_to_str(This->base.type),
|
||||
nine_D3DUSAGE_to_str(This->base.usage),
|
||||
|
@@ -59,8 +59,11 @@ NineBaseTexture9( void *data )
|
||||
HRESULT
|
||||
NineBaseTexture9_ctor( struct NineBaseTexture9 *This,
|
||||
struct NineUnknownParams *pParams,
|
||||
struct pipe_resource *initResource,
|
||||
D3DRESOURCETYPE Type,
|
||||
D3DPOOL Pool );
|
||||
D3DFORMAT format,
|
||||
D3DPOOL Pool,
|
||||
DWORD Usage);
|
||||
|
||||
void
|
||||
NineBaseTexture9_dtor( struct NineBaseTexture9 *This );
|
||||
|
@@ -38,10 +38,17 @@ NineCubeTexture9_ctor( struct NineCubeTexture9 *This,
|
||||
HANDLE *pSharedHandle )
|
||||
{
|
||||
struct pipe_resource *info = &This->base.base.info;
|
||||
struct pipe_screen *screen = pParams->device->screen;
|
||||
enum pipe_format pf;
|
||||
unsigned i;
|
||||
D3DSURFACE_DESC sfdesc;
|
||||
HRESULT hr;
|
||||
|
||||
DBG("This=%p pParams=%p EdgeLength=%u Levels=%u Usage=%d "
|
||||
"Format=%d Pool=%d pSharedHandle=%p\n",
|
||||
This, pParams, EdgeLength, Levels, Usage,
|
||||
Format, Pool, pSharedHandle);
|
||||
|
||||
user_assert(!(Usage & D3DUSAGE_AUTOGENMIPMAP) ||
|
||||
(Pool != D3DPOOL_SYSTEMMEM && Levels <= 1), D3DERR_INVALIDCALL);
|
||||
|
||||
@@ -50,12 +57,19 @@ NineCubeTexture9_ctor( struct NineCubeTexture9 *This,
|
||||
if (Usage & D3DUSAGE_AUTOGENMIPMAP)
|
||||
Levels = 0;
|
||||
|
||||
This->base.format = Format;
|
||||
This->base.base.usage = Usage;
|
||||
pf = d3d9_to_pipe_format(Format);
|
||||
if (pf == PIPE_FORMAT_NONE ||
|
||||
!screen->is_format_supported(screen, pf, PIPE_TEXTURE_CUBE, 0, PIPE_BIND_SAMPLER_VIEW)) {
|
||||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
/* We support ATI1 and ATI2 hacks only for 2D textures */
|
||||
if (Format == D3DFMT_ATI1 || Format == D3DFMT_ATI2)
|
||||
return D3DERR_INVALIDCALL;
|
||||
|
||||
info->screen = pParams->device->screen;
|
||||
info->target = PIPE_TEXTURE_CUBE;
|
||||
info->format = d3d9_to_pipe_format(Format);
|
||||
info->format = pf;
|
||||
info->width0 = EdgeLength;
|
||||
info->height0 = EdgeLength;
|
||||
info->depth0 = 1;
|
||||
@@ -85,8 +99,8 @@ NineCubeTexture9_ctor( struct NineCubeTexture9 *This,
|
||||
if (!This->surfaces)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
hr = NineBaseTexture9_ctor(&This->base, pParams, D3DRTYPE_CUBETEXTURE,
|
||||
Pool);
|
||||
hr = NineBaseTexture9_ctor(&This->base, pParams, NULL, D3DRTYPE_CUBETEXTURE,
|
||||
Format, Pool, Usage);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
This->base.pstype = 2;
|
||||
@@ -105,7 +119,7 @@ NineCubeTexture9_ctor( struct NineCubeTexture9 *This,
|
||||
sfdesc.Width = sfdesc.Height = u_minify(EdgeLength, i / 6);
|
||||
|
||||
hr = NineSurface9_new(This->base.base.base.device, NineUnknown(This),
|
||||
This->base.base.resource, D3DRTYPE_CUBETEXTURE,
|
||||
This->base.base.resource, NULL, D3DRTYPE_CUBETEXTURE,
|
||||
i / 6, i % 6,
|
||||
&sfdesc, &This->surfaces[i]);
|
||||
if (FAILED(hr))
|
||||
@@ -138,11 +152,13 @@ NineCubeTexture9_GetLevelDesc( struct NineCubeTexture9 *This,
|
||||
UINT Level,
|
||||
D3DSURFACE_DESC *pDesc )
|
||||
{
|
||||
DBG("This=%p Level=%u pDesc=%p\n", This, Level, pDesc);
|
||||
|
||||
user_assert(Level <= This->base.base.info.last_level, D3DERR_INVALIDCALL);
|
||||
user_assert(Level == 0 || !(This->base.base.usage & D3DUSAGE_AUTOGENMIPMAP),
|
||||
D3DERR_INVALIDCALL);
|
||||
|
||||
*pDesc = This->surfaces[Level]->desc;
|
||||
*pDesc = This->surfaces[Level * 6]->desc;
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
@@ -155,6 +171,9 @@ NineCubeTexture9_GetCubeMapSurface( struct NineCubeTexture9 *This,
|
||||
{
|
||||
const unsigned s = Level * 6 + FaceType;
|
||||
|
||||
DBG("This=%p FaceType=%d Level=%u ppCubeMapSurface=%p\n",
|
||||
This, FaceType, Level, ppCubeMapSurface);
|
||||
|
||||
user_assert(Level <= This->base.base.info.last_level, D3DERR_INVALIDCALL);
|
||||
user_assert(Level == 0 || !(This->base.base.usage & D3DUSAGE_AUTOGENMIPMAP),
|
||||
D3DERR_INVALIDCALL);
|
||||
@@ -176,6 +195,9 @@ NineCubeTexture9_LockRect( struct NineCubeTexture9 *This,
|
||||
{
|
||||
const unsigned s = Level * 6 + FaceType;
|
||||
|
||||
DBG("This=%p FaceType=%d Level=%u pLockedRect=%p pRect=%p Flags=%d\n",
|
||||
This, FaceType, Level, pLockedRect, pRect, Flags);
|
||||
|
||||
user_assert(Level <= This->base.base.info.last_level, D3DERR_INVALIDCALL);
|
||||
user_assert(Level == 0 || !(This->base.base.usage & D3DUSAGE_AUTOGENMIPMAP),
|
||||
D3DERR_INVALIDCALL);
|
||||
@@ -191,6 +213,8 @@ NineCubeTexture9_UnlockRect( struct NineCubeTexture9 *This,
|
||||
{
|
||||
const unsigned s = Level * 6 + FaceType;
|
||||
|
||||
DBG("This=%p FaceType=%d Level=%u\n", This, FaceType, Level);
|
||||
|
||||
user_assert(Level <= This->base.base.info.last_level, D3DERR_INVALIDCALL);
|
||||
user_assert(FaceType < 6, D3DERR_INVALIDCALL);
|
||||
|
||||
@@ -202,6 +226,8 @@ NineCubeTexture9_AddDirtyRect( struct NineCubeTexture9 *This,
|
||||
D3DCUBEMAP_FACES FaceType,
|
||||
const RECT *pDirtyRect )
|
||||
{
|
||||
DBG("This=%p FaceType=%d pDirtyRect=%p\n", This, FaceType, pDirtyRect);
|
||||
|
||||
user_assert(FaceType < 6, D3DERR_INVALIDCALL);
|
||||
|
||||
if (This->base.base.pool != D3DPOOL_MANAGED) {
|
||||
|
@@ -58,9 +58,11 @@ NineDevice9_SetDefaultState( struct NineDevice9 *This, boolean is_reset )
|
||||
{
|
||||
struct NineSurface9 *refSurf = NULL;
|
||||
|
||||
DBG("This=%p is_reset=%d\n", This, (int) is_reset);
|
||||
|
||||
assert(!This->is_recording);
|
||||
|
||||
nine_state_set_defaults(&This->state, &This->caps, is_reset);
|
||||
nine_state_set_defaults(This, &This->caps, is_reset);
|
||||
|
||||
This->state.viewport.X = 0;
|
||||
This->state.viewport.Y = 0;
|
||||
@@ -94,6 +96,8 @@ NineDevice9_RestoreNonCSOState( struct NineDevice9 *This, unsigned mask )
|
||||
{
|
||||
struct pipe_context *pipe = This->pipe;
|
||||
|
||||
DBG("This=%p mask=%u\n", This, mask);
|
||||
|
||||
if (mask & 0x1) {
|
||||
struct pipe_constant_buffer cb;
|
||||
cb.buffer_offset = 0;
|
||||
@@ -105,7 +109,7 @@ NineDevice9_RestoreNonCSOState( struct NineDevice9 *This, unsigned mask )
|
||||
cb.buffer = This->constbuf_vs;
|
||||
cb.user_buffer = NULL;
|
||||
}
|
||||
cb.buffer_size = This->constbuf_vs->width0;
|
||||
cb.buffer_size = This->vs_const_size;
|
||||
pipe->set_constant_buffer(pipe, PIPE_SHADER_VERTEX, 0, &cb);
|
||||
|
||||
if (This->prefer_user_constbuf) {
|
||||
@@ -113,7 +117,7 @@ NineDevice9_RestoreNonCSOState( struct NineDevice9 *This, unsigned mask )
|
||||
} else {
|
||||
cb.buffer = This->constbuf_ps;
|
||||
}
|
||||
cb.buffer_size = This->constbuf_ps->width0;
|
||||
cb.buffer_size = This->ps_const_size;
|
||||
pipe->set_constant_buffer(pipe, PIPE_SHADER_FRAGMENT, 0, &cb);
|
||||
}
|
||||
|
||||
@@ -139,10 +143,18 @@ NineDevice9_ctor( struct NineDevice9 *This,
|
||||
D3DPRESENT_PARAMETERS *pPresentationParameters,
|
||||
IDirect3D9 *pD3D9,
|
||||
ID3DPresentGroup *pPresentationGroup,
|
||||
struct d3dadapter9_context *pCTX )
|
||||
struct d3dadapter9_context *pCTX,
|
||||
boolean ex,
|
||||
D3DDISPLAYMODEEX *pFullscreenDisplayMode )
|
||||
{
|
||||
unsigned i;
|
||||
HRESULT hr = NineUnknown_ctor(&This->base, pParams);
|
||||
|
||||
DBG("This=%p pParams=%p pScreen=%p pCreationParameters=%p pCaps=%p pPresentationParameters=%p "
|
||||
"pD3D9=%p pPresentationGroup=%p pCTX=%p ex=%d pFullscreenDisplayMode=%p\n",
|
||||
This, pParams, pScreen, pCreationParameters, pCaps, pPresentationParameters, pD3D9,
|
||||
pPresentationGroup, pCTX, (int) ex, pFullscreenDisplayMode);
|
||||
|
||||
if (FAILED(hr)) { return hr; }
|
||||
|
||||
list_inithead(&This->update_textures);
|
||||
@@ -151,6 +163,7 @@ NineDevice9_ctor( struct NineDevice9 *This,
|
||||
This->caps = *pCaps;
|
||||
This->d3d9 = pD3D9;
|
||||
This->params = *pCreationParameters;
|
||||
This->ex = ex;
|
||||
This->present = pPresentationGroup;
|
||||
IDirect3D9_AddRef(This->d3d9);
|
||||
ID3DPresentGroup_AddRef(This->present);
|
||||
@@ -177,12 +190,12 @@ NineDevice9_ctor( struct NineDevice9 *This,
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
if (This->ex) {
|
||||
if (ex) {
|
||||
D3DDISPLAYMODEEX *mode = NULL;
|
||||
struct NineSwapChain9Ex **ret =
|
||||
(struct NineSwapChain9Ex **)&This->swapchains[i];
|
||||
|
||||
if (This->pFullscreenDisplayMode) mode = &(This->pFullscreenDisplayMode[i]);
|
||||
if (pFullscreenDisplayMode) mode = &(pFullscreenDisplayMode[i]);
|
||||
/* when this is a Device9Ex, it should create SwapChain9Exs */
|
||||
hr = NineSwapChain9Ex_new(This, TRUE, present,
|
||||
&pPresentationParameters[i], pCTX,
|
||||
@@ -249,10 +262,14 @@ NineDevice9_ctor( struct NineDevice9 *This,
|
||||
This->max_ps_const_f = max_const_ps -
|
||||
(NINE_MAX_CONST_I + NINE_MAX_CONST_B / 4);
|
||||
|
||||
This->vs_const_size = max_const_vs * sizeof(float[4]);
|
||||
This->ps_const_size = max_const_ps * sizeof(float[4]);
|
||||
/* Include space for I,B constants for user constbuf. */
|
||||
This->state.vs_const_f = CALLOC(NINE_MAX_CONST_ALL, sizeof(float[4]));
|
||||
This->state.ps_const_f = CALLOC(NINE_MAX_CONST_ALL, sizeof(float[4]));
|
||||
if (!This->state.vs_const_f || !This->state.ps_const_f)
|
||||
This->state.vs_const_f = CALLOC(This->vs_const_size, 1);
|
||||
This->state.ps_const_f = CALLOC(This->ps_const_size, 1);
|
||||
This->state.vs_lconstf_temp = CALLOC(This->vs_const_size,1);
|
||||
if (!This->state.vs_const_f || !This->state.ps_const_f ||
|
||||
!This->state.vs_lconstf_temp)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
if (strstr(pScreen->get_name(pScreen), "AMD") ||
|
||||
@@ -270,23 +287,16 @@ NineDevice9_ctor( struct NineDevice9 *This,
|
||||
tmpl.bind = PIPE_BIND_CONSTANT_BUFFER;
|
||||
tmpl.flags = 0;
|
||||
|
||||
tmpl.width0 = max_const_vs * sizeof(float[4]);
|
||||
tmpl.width0 = This->vs_const_size;
|
||||
This->constbuf_vs = pScreen->resource_create(pScreen, &tmpl);
|
||||
|
||||
tmpl.width0 = max_const_ps * sizeof(float[4]);
|
||||
tmpl.width0 = This->ps_const_size;
|
||||
This->constbuf_ps = pScreen->resource_create(pScreen, &tmpl);
|
||||
|
||||
if (!This->constbuf_vs || !This->constbuf_ps)
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
This->vs_bool_true = pScreen->get_shader_param(pScreen,
|
||||
PIPE_SHADER_VERTEX,
|
||||
PIPE_SHADER_CAP_INTEGERS) ? 0xFFFFFFFF : fui(1.0f);
|
||||
This->ps_bool_true = pScreen->get_shader_param(pScreen,
|
||||
PIPE_SHADER_FRAGMENT,
|
||||
PIPE_SHADER_CAP_INTEGERS) ? 0xFFFFFFFF : fui(1.0f);
|
||||
|
||||
/* Allocate upload helper for drivers that suck (from st pov ;). */
|
||||
{
|
||||
unsigned bind = 0;
|
||||
@@ -301,6 +311,8 @@ NineDevice9_ctor( struct NineDevice9 *This,
|
||||
}
|
||||
|
||||
This->driver_caps.window_space_position_support = GET_PCAP(TGSI_VS_WINDOW_SPACE_POSITION);
|
||||
This->driver_caps.vs_integer = pScreen->get_shader_param(pScreen, PIPE_SHADER_VERTEX, PIPE_SHADER_CAP_INTEGERS);
|
||||
This->driver_caps.ps_integer = pScreen->get_shader_param(pScreen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_INTEGERS);
|
||||
|
||||
nine_ff_init(This); /* initialize fixed function code */
|
||||
|
||||
@@ -310,9 +322,6 @@ NineDevice9_ctor( struct NineDevice9 *This,
|
||||
This->update = &This->state;
|
||||
nine_update_state(This, ~0);
|
||||
|
||||
/* Is just used to pass the parameter from NineDevice9Ex_ctor */
|
||||
This->pFullscreenDisplayMode = NULL;
|
||||
|
||||
ID3DPresentGroup_Release(This->present);
|
||||
|
||||
return D3D_OK;
|
||||
@@ -340,6 +349,7 @@ NineDevice9_dtor( struct NineDevice9 *This )
|
||||
pipe_resource_reference(&This->constbuf_ps, NULL);
|
||||
FREE(This->state.vs_const_f);
|
||||
FREE(This->state.ps_const_f);
|
||||
FREE(This->state.vs_lconstf_temp);
|
||||
|
||||
if (This->swapchains) {
|
||||
for (i = 0; i < This->nswapchains; ++i)
|
||||
@@ -413,7 +423,11 @@ NineDevice9_TestCooperativeLevel( struct NineDevice9 *This )
|
||||
UINT WINAPI
|
||||
NineDevice9_GetAvailableTextureMem( struct NineDevice9 *This )
|
||||
{
|
||||
return This->screen->get_param(This->screen, PIPE_CAP_VIDEO_MEMORY);
|
||||
const unsigned mem = This->screen->get_param(This->screen, PIPE_CAP_VIDEO_MEMORY);
|
||||
if (mem < 4096)
|
||||
return mem << 20;
|
||||
else
|
||||
return UINT_MAX;
|
||||
}
|
||||
|
||||
HRESULT WINAPI
|
||||
@@ -536,6 +550,8 @@ NineDevice9_SetCursorPosition( struct NineDevice9 *This,
|
||||
{
|
||||
struct NineSwapChain9 *swap = This->swapchains[0];
|
||||
|
||||
DBG("This=%p X=%d Y=%d Flags=%d\n", This, X, Y, Flags);
|
||||
|
||||
This->cursor.pos.x = X;
|
||||
This->cursor.pos.y = Y;
|
||||
|
||||
@@ -548,6 +564,9 @@ NineDevice9_ShowCursor( struct NineDevice9 *This,
|
||||
BOOL bShow )
|
||||
{
|
||||
BOOL old = This->cursor.visible;
|
||||
|
||||
DBG("This=%p bShow=%d\n", This, (int) bShow);
|
||||
|
||||
This->cursor.visible = bShow && (This->cursor.hotspot.x != -1);
|
||||
if (!This->cursor.software)
|
||||
ID3DPresent_SetCursor(This->swapchains[0]->present, NULL, NULL, bShow);
|
||||
@@ -564,6 +583,9 @@ NineDevice9_CreateAdditionalSwapChain( struct NineDevice9 *This,
|
||||
ID3DPresent *present;
|
||||
HRESULT hr;
|
||||
|
||||
DBG("This=%p pPresentationParameters=%p pSwapChain=%p\n",
|
||||
This, pPresentationParameters, pSwapChain);
|
||||
|
||||
user_assert(pPresentationParameters, D3DERR_INVALIDCALL);
|
||||
|
||||
hr = ID3DPresentGroup_CreateAdditionalPresent(This->present, pPresentationParameters, &present);
|
||||
@@ -641,6 +663,9 @@ NineDevice9_Present( struct NineDevice9 *This,
|
||||
unsigned i;
|
||||
HRESULT hr;
|
||||
|
||||
DBG("This=%p pSourceRect=%p pDestRect=%p hDestWindowOverride=%p pDirtyRegion=%p\n",
|
||||
This, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
|
||||
|
||||
/* XXX is this right? */
|
||||
for (i = 0; i < This->nswapchains; ++i) {
|
||||
hr = NineSwapChain9_Present(This->swapchains[i], pSourceRect, pDestRect,
|
||||
@@ -974,7 +999,7 @@ create_zs_or_rt_surface(struct NineDevice9 *This,
|
||||
} else {
|
||||
resource = NULL;
|
||||
}
|
||||
hr = NineSurface9_new(This, NULL, resource, 0, 0, 0, &desc, &surface);
|
||||
hr = NineSurface9_new(This, NULL, resource, NULL, 0, 0, 0, &desc, &surface);
|
||||
pipe_resource_reference(&resource, NULL);
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
@@ -1710,6 +1735,9 @@ NineDevice9_SetTransform( struct NineDevice9 *This,
|
||||
{
|
||||
struct nine_state *state = This->update;
|
||||
D3DMATRIX *M = nine_state_access_transform(state, State, TRUE);
|
||||
|
||||
DBG("This=%p State=%d pMatrix=%p\n", This, State, pMatrix);
|
||||
|
||||
user_assert(M, D3DERR_INVALIDCALL);
|
||||
|
||||
*M = *pMatrix;
|
||||
@@ -1738,6 +1766,9 @@ NineDevice9_MultiplyTransform( struct NineDevice9 *This,
|
||||
struct nine_state *state = This->update;
|
||||
D3DMATRIX T;
|
||||
D3DMATRIX *M = nine_state_access_transform(state, State, TRUE);
|
||||
|
||||
DBG("This=%p State=%d pMatrix=%p\n", This, State, pMatrix);
|
||||
|
||||
user_assert(M, D3DERR_INVALIDCALL);
|
||||
|
||||
nine_d3d_matrix_matrix_mul(&T, pMatrix, M);
|
||||
@@ -2172,6 +2203,7 @@ NineDevice9_SetTexture( struct NineDevice9 *This,
|
||||
IDirect3DBaseTexture9 *pTexture )
|
||||
{
|
||||
struct nine_state *state = This->update;
|
||||
struct NineBaseTexture9 *tex = NineBaseTexture9(pTexture);
|
||||
|
||||
DBG("This=%p Stage=%u pTexture=%p\n", This, Stage, pTexture);
|
||||
|
||||
@@ -2179,12 +2211,19 @@ NineDevice9_SetTexture( struct NineDevice9 *This,
|
||||
Stage == D3DDMAPSAMPLER ||
|
||||
(Stage >= D3DVERTEXTEXTURESAMPLER0 &&
|
||||
Stage <= D3DVERTEXTEXTURESAMPLER3), D3DERR_INVALIDCALL);
|
||||
user_assert(!tex || tex->base.pool != D3DPOOL_SCRATCH, D3DERR_INVALIDCALL);
|
||||
|
||||
if (unlikely(tex && tex->base.pool == D3DPOOL_SYSTEMMEM)) {
|
||||
/* TODO: Currently not implemented. Better return error
|
||||
* with message telling what's wrong */
|
||||
ERR("This=%p D3DPOOL_SYSTEMMEM not implemented for SetTexture\n", This);
|
||||
user_assert(tex->base.pool != D3DPOOL_SYSTEMMEM, D3DERR_INVALIDCALL);
|
||||
}
|
||||
|
||||
if (Stage >= D3DDMAPSAMPLER)
|
||||
Stage = Stage - D3DDMAPSAMPLER + NINE_MAX_SAMPLERS_PS;
|
||||
|
||||
if (!This->is_recording) {
|
||||
struct NineBaseTexture9 *tex = NineBaseTexture9(pTexture);
|
||||
struct NineBaseTexture9 *old = state->texture[Stage];
|
||||
if (old == tex)
|
||||
return D3D_OK;
|
||||
@@ -2648,6 +2687,11 @@ NineDevice9_ProcessVertices( struct NineDevice9 *This,
|
||||
HRESULT hr;
|
||||
unsigned buffer_offset, buffer_size;
|
||||
|
||||
DBG("This=%p SrcStartIndex=%u DestIndex=%u VertexCount=%u "
|
||||
"pDestBuffer=%p pVertexDecl=%p Flags=%d\n",
|
||||
This, SrcStartIndex, DestIndex, VertexCount, pDestBuffer,
|
||||
pVertexDecl, Flags);
|
||||
|
||||
if (!screen->get_param(screen, PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS))
|
||||
STUB(D3DERR_INVALIDCALL);
|
||||
|
||||
@@ -2725,6 +2769,9 @@ NineDevice9_CreateVertexDeclaration( struct NineDevice9 *This,
|
||||
{
|
||||
struct NineVertexDeclaration9 *vdecl;
|
||||
|
||||
DBG("This=%p pVertexElements=%p ppDecl=%p\n",
|
||||
This, pVertexElements, ppDecl);
|
||||
|
||||
HRESULT hr = NineVertexDeclaration9_new(This, pVertexElements, &vdecl);
|
||||
if (SUCCEEDED(hr))
|
||||
*ppDecl = (IDirect3DVertexDeclaration9 *)vdecl;
|
||||
@@ -2801,6 +2848,8 @@ NineDevice9_CreateVertexShader( struct NineDevice9 *This,
|
||||
struct NineVertexShader9 *vs;
|
||||
HRESULT hr;
|
||||
|
||||
DBG("This=%p pFunction=%p ppShader=%p\n", This, pFunction, ppShader);
|
||||
|
||||
hr = NineVertexShader9_new(This, &vs, pFunction, NULL);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
@@ -2889,6 +2938,7 @@ NineDevice9_SetVertexShaderConstantI( struct NineDevice9 *This,
|
||||
UINT Vector4iCount )
|
||||
{
|
||||
struct nine_state *state = This->update;
|
||||
int i;
|
||||
|
||||
DBG("This=%p StartRegister=%u pConstantData=%p Vector4iCount=%u\n",
|
||||
This, StartRegister, pConstantData, Vector4iCount);
|
||||
@@ -2897,9 +2947,18 @@ NineDevice9_SetVertexShaderConstantI( struct NineDevice9 *This,
|
||||
user_assert(StartRegister + Vector4iCount <= NINE_MAX_CONST_I, D3DERR_INVALIDCALL);
|
||||
user_assert(pConstantData, D3DERR_INVALIDCALL);
|
||||
|
||||
memcpy(&state->vs_const_i[StartRegister][0],
|
||||
pConstantData,
|
||||
Vector4iCount * sizeof(state->vs_const_i[0]));
|
||||
if (This->driver_caps.vs_integer) {
|
||||
memcpy(&state->vs_const_i[StartRegister][0],
|
||||
pConstantData,
|
||||
Vector4iCount * sizeof(state->vs_const_i[0]));
|
||||
} else {
|
||||
for (i = 0; i < Vector4iCount; i++) {
|
||||
state->vs_const_i[StartRegister+i][0] = fui((float)(pConstantData[4*i]));
|
||||
state->vs_const_i[StartRegister+i][1] = fui((float)(pConstantData[4*i+1]));
|
||||
state->vs_const_i[StartRegister+i][2] = fui((float)(pConstantData[4*i+2]));
|
||||
state->vs_const_i[StartRegister+i][3] = fui((float)(pConstantData[4*i+3]));
|
||||
}
|
||||
}
|
||||
|
||||
state->changed.vs_const_i |= ((1 << Vector4iCount) - 1) << StartRegister;
|
||||
state->changed.group |= NINE_STATE_VS_CONST;
|
||||
@@ -2914,14 +2973,24 @@ NineDevice9_GetVertexShaderConstantI( struct NineDevice9 *This,
|
||||
UINT Vector4iCount )
|
||||
{
|
||||
const struct nine_state *state = &This->state;
|
||||
int i;
|
||||
|
||||
user_assert(StartRegister < NINE_MAX_CONST_I, D3DERR_INVALIDCALL);
|
||||
user_assert(StartRegister + Vector4iCount <= NINE_MAX_CONST_I, D3DERR_INVALIDCALL);
|
||||
user_assert(pConstantData, D3DERR_INVALIDCALL);
|
||||
|
||||
memcpy(pConstantData,
|
||||
&state->vs_const_i[StartRegister][0],
|
||||
Vector4iCount * sizeof(state->vs_const_i[0]));
|
||||
if (This->driver_caps.vs_integer) {
|
||||
memcpy(pConstantData,
|
||||
&state->vs_const_i[StartRegister][0],
|
||||
Vector4iCount * sizeof(state->vs_const_i[0]));
|
||||
} else {
|
||||
for (i = 0; i < Vector4iCount; i++) {
|
||||
pConstantData[4*i] = (int32_t) uif(state->vs_const_i[StartRegister+i][0]);
|
||||
pConstantData[4*i+1] = (int32_t) uif(state->vs_const_i[StartRegister+i][1]);
|
||||
pConstantData[4*i+2] = (int32_t) uif(state->vs_const_i[StartRegister+i][2]);
|
||||
pConstantData[4*i+3] = (int32_t) uif(state->vs_const_i[StartRegister+i][3]);
|
||||
}
|
||||
}
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
@@ -2933,6 +3002,8 @@ NineDevice9_SetVertexShaderConstantB( struct NineDevice9 *This,
|
||||
UINT BoolCount )
|
||||
{
|
||||
struct nine_state *state = This->update;
|
||||
int i;
|
||||
uint32_t bool_true = This->driver_caps.vs_integer ? 0xFFFFFFFF : fui(1.0f);
|
||||
|
||||
DBG("This=%p StartRegister=%u pConstantData=%p BoolCount=%u\n",
|
||||
This, StartRegister, pConstantData, BoolCount);
|
||||
@@ -2941,9 +3012,8 @@ NineDevice9_SetVertexShaderConstantB( struct NineDevice9 *This,
|
||||
user_assert(StartRegister + BoolCount <= NINE_MAX_CONST_B, D3DERR_INVALIDCALL);
|
||||
user_assert(pConstantData, D3DERR_INVALIDCALL);
|
||||
|
||||
memcpy(&state->vs_const_b[StartRegister],
|
||||
pConstantData,
|
||||
BoolCount * sizeof(state->vs_const_b[0]));
|
||||
for (i = 0; i < BoolCount; i++)
|
||||
state->vs_const_b[StartRegister + i] = pConstantData[i] ? bool_true : 0;
|
||||
|
||||
state->changed.vs_const_b |= ((1 << BoolCount) - 1) << StartRegister;
|
||||
state->changed.group |= NINE_STATE_VS_CONST;
|
||||
@@ -2958,14 +3028,14 @@ NineDevice9_GetVertexShaderConstantB( struct NineDevice9 *This,
|
||||
UINT BoolCount )
|
||||
{
|
||||
const struct nine_state *state = &This->state;
|
||||
int i;
|
||||
|
||||
user_assert(StartRegister < NINE_MAX_CONST_B, D3DERR_INVALIDCALL);
|
||||
user_assert(StartRegister + BoolCount <= NINE_MAX_CONST_B, D3DERR_INVALIDCALL);
|
||||
user_assert(pConstantData, D3DERR_INVALIDCALL);
|
||||
|
||||
memcpy(pConstantData,
|
||||
&state->vs_const_b[StartRegister],
|
||||
BoolCount * sizeof(state->vs_const_b[0]));
|
||||
for (i = 0; i < BoolCount; i++)
|
||||
pConstantData[i] = state->vs_const_b[StartRegister + i] != 0 ? TRUE : FALSE;
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
@@ -2981,6 +3051,9 @@ NineDevice9_SetStreamSource( struct NineDevice9 *This,
|
||||
struct NineVertexBuffer9 *pVBuf9 = NineVertexBuffer9(pStreamData);
|
||||
const unsigned i = StreamNumber;
|
||||
|
||||
DBG("This=%p StreamNumber=%u pStreamData=%p OffsetInBytes=%u Stride=%u\n",
|
||||
This, StreamNumber, pStreamData, OffsetInBytes, Stride);
|
||||
|
||||
user_assert(StreamNumber < This->caps.MaxStreams, D3DERR_INVALIDCALL);
|
||||
user_assert(Stride <= This->caps.MaxStreamStride, D3DERR_INVALIDCALL);
|
||||
|
||||
@@ -3068,6 +3141,8 @@ NineDevice9_SetIndices( struct NineDevice9 *This,
|
||||
{
|
||||
struct nine_state *state = This->update;
|
||||
|
||||
DBG("This=%p pIndexData=%p\n", This, pIndexData);
|
||||
|
||||
if (likely(!This->is_recording))
|
||||
if (state->idxbuf == NineIndexBuffer9(pIndexData))
|
||||
return D3D_OK;
|
||||
@@ -3099,6 +3174,8 @@ NineDevice9_CreatePixelShader( struct NineDevice9 *This,
|
||||
struct NinePixelShader9 *ps;
|
||||
HRESULT hr;
|
||||
|
||||
DBG("This=%p pFunction=%p ppShader=%p\n", This, pFunction, ppShader);
|
||||
|
||||
hr = NinePixelShader9_new(This, &ps, pFunction, NULL);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
@@ -3187,6 +3264,7 @@ NineDevice9_SetPixelShaderConstantI( struct NineDevice9 *This,
|
||||
UINT Vector4iCount )
|
||||
{
|
||||
struct nine_state *state = This->update;
|
||||
int i;
|
||||
|
||||
DBG("This=%p StartRegister=%u pConstantData=%p Vector4iCount=%u\n",
|
||||
This, StartRegister, pConstantData, Vector4iCount);
|
||||
@@ -3195,10 +3273,18 @@ NineDevice9_SetPixelShaderConstantI( struct NineDevice9 *This,
|
||||
user_assert(StartRegister + Vector4iCount <= NINE_MAX_CONST_I, D3DERR_INVALIDCALL);
|
||||
user_assert(pConstantData, D3DERR_INVALIDCALL);
|
||||
|
||||
memcpy(&state->ps_const_i[StartRegister][0],
|
||||
pConstantData,
|
||||
Vector4iCount * sizeof(state->ps_const_i[0]));
|
||||
|
||||
if (This->driver_caps.ps_integer) {
|
||||
memcpy(&state->ps_const_i[StartRegister][0],
|
||||
pConstantData,
|
||||
Vector4iCount * sizeof(state->ps_const_i[0]));
|
||||
} else {
|
||||
for (i = 0; i < Vector4iCount; i++) {
|
||||
state->ps_const_i[StartRegister+i][0] = fui((float)(pConstantData[4*i]));
|
||||
state->ps_const_i[StartRegister+i][1] = fui((float)(pConstantData[4*i+1]));
|
||||
state->ps_const_i[StartRegister+i][2] = fui((float)(pConstantData[4*i+2]));
|
||||
state->ps_const_i[StartRegister+i][3] = fui((float)(pConstantData[4*i+3]));
|
||||
}
|
||||
}
|
||||
state->changed.ps_const_i |= ((1 << Vector4iCount) - 1) << StartRegister;
|
||||
state->changed.group |= NINE_STATE_PS_CONST;
|
||||
|
||||
@@ -3212,14 +3298,24 @@ NineDevice9_GetPixelShaderConstantI( struct NineDevice9 *This,
|
||||
UINT Vector4iCount )
|
||||
{
|
||||
const struct nine_state *state = &This->state;
|
||||
int i;
|
||||
|
||||
user_assert(StartRegister < NINE_MAX_CONST_I, D3DERR_INVALIDCALL);
|
||||
user_assert(StartRegister + Vector4iCount <= NINE_MAX_CONST_I, D3DERR_INVALIDCALL);
|
||||
user_assert(pConstantData, D3DERR_INVALIDCALL);
|
||||
|
||||
memcpy(pConstantData,
|
||||
&state->ps_const_i[StartRegister][0],
|
||||
Vector4iCount * sizeof(state->ps_const_i[0]));
|
||||
if (This->driver_caps.ps_integer) {
|
||||
memcpy(pConstantData,
|
||||
&state->ps_const_i[StartRegister][0],
|
||||
Vector4iCount * sizeof(state->ps_const_i[0]));
|
||||
} else {
|
||||
for (i = 0; i < Vector4iCount; i++) {
|
||||
pConstantData[4*i] = (int32_t) uif(state->ps_const_i[StartRegister+i][0]);
|
||||
pConstantData[4*i+1] = (int32_t) uif(state->ps_const_i[StartRegister+i][1]);
|
||||
pConstantData[4*i+2] = (int32_t) uif(state->ps_const_i[StartRegister+i][2]);
|
||||
pConstantData[4*i+3] = (int32_t) uif(state->ps_const_i[StartRegister+i][3]);
|
||||
}
|
||||
}
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
@@ -3231,6 +3327,8 @@ NineDevice9_SetPixelShaderConstantB( struct NineDevice9 *This,
|
||||
UINT BoolCount )
|
||||
{
|
||||
struct nine_state *state = This->update;
|
||||
int i;
|
||||
uint32_t bool_true = This->driver_caps.ps_integer ? 0xFFFFFFFF : fui(1.0f);
|
||||
|
||||
DBG("This=%p StartRegister=%u pConstantData=%p BoolCount=%u\n",
|
||||
This, StartRegister, pConstantData, BoolCount);
|
||||
@@ -3239,9 +3337,8 @@ NineDevice9_SetPixelShaderConstantB( struct NineDevice9 *This,
|
||||
user_assert(StartRegister + BoolCount <= NINE_MAX_CONST_B, D3DERR_INVALIDCALL);
|
||||
user_assert(pConstantData, D3DERR_INVALIDCALL);
|
||||
|
||||
memcpy(&state->ps_const_b[StartRegister],
|
||||
pConstantData,
|
||||
BoolCount * sizeof(state->ps_const_b[0]));
|
||||
for (i = 0; i < BoolCount; i++)
|
||||
state->ps_const_b[StartRegister + i] = pConstantData[i] ? bool_true : 0;
|
||||
|
||||
state->changed.ps_const_b |= ((1 << BoolCount) - 1) << StartRegister;
|
||||
state->changed.group |= NINE_STATE_PS_CONST;
|
||||
@@ -3256,14 +3353,14 @@ NineDevice9_GetPixelShaderConstantB( struct NineDevice9 *This,
|
||||
UINT BoolCount )
|
||||
{
|
||||
const struct nine_state *state = &This->state;
|
||||
int i;
|
||||
|
||||
user_assert(StartRegister < NINE_MAX_CONST_B, D3DERR_INVALIDCALL);
|
||||
user_assert(StartRegister + BoolCount <= NINE_MAX_CONST_B, D3DERR_INVALIDCALL);
|
||||
user_assert(pConstantData, D3DERR_INVALIDCALL);
|
||||
|
||||
memcpy(pConstantData,
|
||||
&state->ps_const_b[StartRegister],
|
||||
BoolCount * sizeof(state->ps_const_b[0]));
|
||||
for (i = 0; i < BoolCount; i++)
|
||||
pConstantData[i] = state->ps_const_b[StartRegister + i] ? TRUE : FALSE;
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
@@ -3301,6 +3398,8 @@ NineDevice9_CreateQuery( struct NineDevice9 *This,
|
||||
struct NineQuery9 *query;
|
||||
HRESULT hr;
|
||||
|
||||
DBG("This=%p Type=%d ppQuery=%p\n", This, Type, ppQuery);
|
||||
|
||||
if (!ppQuery)
|
||||
return nine_is_query_supported(Type);
|
||||
|
||||
@@ -3447,6 +3546,8 @@ NineDevice9_new( struct pipe_screen *pScreen,
|
||||
IDirect3D9 *pD3D9,
|
||||
ID3DPresentGroup *pPresentationGroup,
|
||||
struct d3dadapter9_context *pCTX,
|
||||
boolean ex,
|
||||
D3DDISPLAYMODEEX *pFullscreenDisplayMode,
|
||||
struct NineDevice9 **ppOut )
|
||||
{
|
||||
BOOL lock;
|
||||
@@ -3454,5 +3555,6 @@ NineDevice9_new( struct pipe_screen *pScreen,
|
||||
|
||||
NINE_NEW(Device9, ppOut, lock, /* args */
|
||||
pScreen, pCreationParameters, pCaps,
|
||||
pPresentationParameters, pD3D9, pPresentationGroup, pCTX);
|
||||
pPresentationParameters, pD3D9, pPresentationGroup, pCTX,
|
||||
ex, pFullscreenDisplayMode);
|
||||
}
|
||||
|
@@ -48,7 +48,6 @@ struct NineDevice9
|
||||
{
|
||||
struct NineUnknown base;
|
||||
boolean ex;
|
||||
D3DDISPLAYMODEEX *pFullscreenDisplayMode;
|
||||
|
||||
/* G3D context */
|
||||
struct pipe_screen *screen;
|
||||
@@ -78,10 +77,10 @@ struct NineDevice9
|
||||
|
||||
struct pipe_resource *constbuf_vs;
|
||||
struct pipe_resource *constbuf_ps;
|
||||
uint16_t vs_const_size;
|
||||
uint16_t ps_const_size;
|
||||
uint16_t max_vs_const_f;
|
||||
uint16_t max_ps_const_f;
|
||||
uint32_t vs_bool_true;
|
||||
uint32_t ps_bool_true;
|
||||
|
||||
struct gen_mipmap_state *gen_mipmap;
|
||||
|
||||
@@ -112,6 +111,8 @@ struct NineDevice9
|
||||
boolean user_vbufs;
|
||||
boolean user_ibufs;
|
||||
boolean window_space_position_support;
|
||||
boolean vs_integer;
|
||||
boolean ps_integer;
|
||||
} driver_caps;
|
||||
|
||||
struct u_upload_mgr *upload;
|
||||
@@ -134,6 +135,8 @@ NineDevice9_new( struct pipe_screen *pScreen,
|
||||
IDirect3D9 *pD3D9,
|
||||
ID3DPresentGroup *pPresentationGroup,
|
||||
struct d3dadapter9_context *pCTX,
|
||||
boolean ex,
|
||||
D3DDISPLAYMODEEX *pFullscreenDisplayMode,
|
||||
struct NineDevice9 **ppOut );
|
||||
|
||||
HRESULT
|
||||
@@ -145,7 +148,9 @@ NineDevice9_ctor( struct NineDevice9 *This,
|
||||
D3DPRESENT_PARAMETERS *pPresentationParameters,
|
||||
IDirect3D9 *pD3D9,
|
||||
ID3DPresentGroup *pPresentationGroup,
|
||||
struct d3dadapter9_context *pCTX );
|
||||
struct d3dadapter9_context *pCTX,
|
||||
boolean ex,
|
||||
D3DDISPLAYMODEEX *pFullscreenDisplayMode );
|
||||
|
||||
void
|
||||
NineDevice9_dtor( struct NineDevice9 *This );
|
||||
|
@@ -39,13 +39,18 @@ NineDevice9Ex_ctor( struct NineDevice9Ex *This,
|
||||
ID3DPresentGroup *pPresentationGroup,
|
||||
struct d3dadapter9_context *pCTX )
|
||||
{
|
||||
This->base.ex = TRUE;
|
||||
This->base.pFullscreenDisplayMode = pFullscreenDisplayMode;
|
||||
DBG("This=%p pParams=%p pScreen=%p pCreationParameters=%p pCaps=%p "
|
||||
"pPresentationParameters=%p pFullscreenDisplayMode=%p "
|
||||
"pD3D9Ex=%p pPresentationGroup=%p pCTX=%p\n",
|
||||
This, pParams, pScreen, pCreationParameters, pCaps,
|
||||
pPresentationParameters, pFullscreenDisplayMode,
|
||||
pD3D9Ex, pPresentationGroup, pCTX);
|
||||
|
||||
return NineDevice9_ctor(&This->base, pParams,
|
||||
pScreen, pCreationParameters, pCaps,
|
||||
pPresentationParameters,
|
||||
(IDirect3D9 *)pD3D9Ex, pPresentationGroup, pCTX);
|
||||
(IDirect3D9 *)pD3D9Ex, pPresentationGroup, pCTX,
|
||||
TRUE, pFullscreenDisplayMode);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -89,6 +94,11 @@ NineDevice9Ex_PresentEx( struct NineDevice9Ex *This,
|
||||
unsigned i;
|
||||
HRESULT hr;
|
||||
|
||||
DBG("This=%p pSourceRect=%p pDestRect=%p hDestWindowOverride=%p "
|
||||
"pDirtyRegion=%p dwFlags=%d\n",
|
||||
This, pSourceRect, pDestRect, hDestWindowOverride,
|
||||
pDirtyRegion, dwFlags);
|
||||
|
||||
for (i = 0; i < This->base.nswapchains; i++) {
|
||||
hr = NineSwapChain9_Present(This->base.swapchains[i], pSourceRect, pDestRect,
|
||||
hDestWindowOverride, pDirtyRegion, dwFlags);
|
||||
@@ -229,6 +239,9 @@ NineDevice9Ex_GetDisplayModeEx( struct NineDevice9Ex *This,
|
||||
{
|
||||
struct NineSwapChain9Ex *swapchain;
|
||||
|
||||
DBG("This=%p iSwapChain=%u pMode=%p pRotation=%p\n",
|
||||
This, iSwapChain, pMode, pRotation);
|
||||
|
||||
user_assert(iSwapChain < This->base.nswapchains, D3DERR_INVALIDCALL);
|
||||
|
||||
swapchain = NineSwapChain9Ex(This->base.swapchains[iSwapChain]);
|
||||
|
@@ -76,8 +76,8 @@ NineIndexBuffer9_ctor( struct NineIndexBuffer9 *This,
|
||||
info->last_level = 0;
|
||||
info->nr_samples = 0;
|
||||
|
||||
hr = NineResource9_ctor(&This->base, pParams, TRUE, D3DRTYPE_INDEXBUFFER,
|
||||
pDesc->Pool);
|
||||
hr = NineResource9_ctor(&This->base, pParams, NULL, TRUE, D3DRTYPE_INDEXBUFFER,
|
||||
pDesc->Pool, pDesc->Usage);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
|
@@ -58,6 +58,8 @@ NineUnknown_QueryInterface( struct NineUnknown *This,
|
||||
{
|
||||
unsigned i = 0;
|
||||
|
||||
DBG("This=%p riid=%p ppvObject=%p\n", This, riid, ppvObject);
|
||||
|
||||
if (!ppvObject) return E_POINTER;
|
||||
|
||||
do {
|
||||
|
@@ -30,25 +30,27 @@
|
||||
#define NINE_RESOURCE_FLAG_DUMMY (PIPE_RESOURCE_FLAG_ST_PRIV << 2)
|
||||
|
||||
/* vertexdeclaration9.c */
|
||||
unsigned nine_d3d9_to_nine_declusage(unsigned usage, unsigned index);
|
||||
uint16_t nine_d3d9_to_nine_declusage(unsigned usage, unsigned index);
|
||||
|
||||
#define NINE_DECLUSAGE_POSITION(i) ( 0 + (i))
|
||||
#define NINE_DECLUSAGE_BLENDWEIGHT(i) ( 5 + (i))
|
||||
#define NINE_DECLUSAGE_BLENDINDICES(i) ( 9 + (i))
|
||||
#define NINE_DECLUSAGE_NORMAL(i) (13 + (i))
|
||||
#define NINE_DECLUSAGE_PSIZE 15
|
||||
#define NINE_DECLUSAGE_TEXCOORD(i) (16 + (i))
|
||||
#define NINE_DECLUSAGE_TANGENT(i) (32 + (i))
|
||||
#define NINE_DECLUSAGE_BINORMAL(i) (34 + (i))
|
||||
#define NINE_DECLUSAGE_TESSFACTOR 36
|
||||
#define NINE_DECLUSAGE_POSITIONT 37
|
||||
#define NINE_DECLUSAGE_COLOR(i) (38 + (i))
|
||||
#define NINE_DECLUSAGE_DEPTH 43
|
||||
#define NINE_DECLUSAGE_FOG 44
|
||||
#define NINE_DECLUSAGE_SAMPLE 45
|
||||
#define NINE_DECLUSAGE_NONE 46
|
||||
#define NINE_DECLUSAGE_LAST NINE_DECLUSAGE_NONE
|
||||
#define NINE_DECLUSAGE_COUNT (NINE_DECLUSAGE_LAST + 1)
|
||||
#define NINE_DECLUSAGE_POSITION 0
|
||||
#define NINE_DECLUSAGE_BLENDWEIGHT 1
|
||||
#define NINE_DECLUSAGE_BLENDINDICES 2
|
||||
#define NINE_DECLUSAGE_NORMAL 3
|
||||
#define NINE_DECLUSAGE_TEXCOORD 4
|
||||
#define NINE_DECLUSAGE_TANGENT 5
|
||||
#define NINE_DECLUSAGE_BINORMAL 6
|
||||
#define NINE_DECLUSAGE_COLOR 7
|
||||
#define NINE_DECLUSAGE_POSITIONT 8
|
||||
|
||||
#define NINE_DECLUSAGE_PSIZE 9
|
||||
#define NINE_DECLUSAGE_TESSFACTOR 10
|
||||
#define NINE_DECLUSAGE_DEPTH 11
|
||||
#define NINE_DECLUSAGE_FOG 12
|
||||
#define NINE_DECLUSAGE_SAMPLE 13
|
||||
#define NINE_DECLUSAGE_NONE 14
|
||||
#define NINE_DECLUSAGE_COUNT (NINE_DECLUSAGE_NONE + 1)
|
||||
|
||||
#define NINE_DECLUSAGE_i(declusage, n) NINE_DECLUSAGE_##declusage + n * NINE_DECLUSAGE_COUNT
|
||||
|
||||
#define NINED3DCLEAR_DEPTHSTENCIL (D3DCLEAR_ZBUFFER | D3DCLEAR_STENCIL)
|
||||
|
||||
|
@@ -189,13 +189,10 @@ static void nine_ureg_tgsi_dump(struct ureg_program *ureg, boolean override)
|
||||
|
||||
/* AL should contain base address of lights table. */
|
||||
#define LIGHT_CONST(i) \
|
||||
ureg_src_indirect(ureg_src_register(TGSI_FILE_CONSTANT, (i)), _X(AL))
|
||||
ureg_src_indirect(ureg_DECL_constant(ureg, i), _X(AL))
|
||||
|
||||
#define MATERIAL_CONST(i) \
|
||||
ureg_src_register(TGSI_FILE_CONSTANT, 19 + (i))
|
||||
|
||||
#define MISC_CONST(i) \
|
||||
ureg_src_register(TGSI_FILE_CONSTANT, (i))
|
||||
ureg_DECL_constant(ureg, 19 + (i))
|
||||
|
||||
#define _CONST(n) ureg_DECL_constant(ureg, n)
|
||||
|
||||
@@ -278,7 +275,7 @@ struct vs_build_ctx
|
||||
struct ureg_program *ureg;
|
||||
const struct nine_ff_vs_key *key;
|
||||
|
||||
unsigned input[PIPE_MAX_ATTRIBS];
|
||||
uint16_t input[PIPE_MAX_ATTRIBS];
|
||||
unsigned num_inputs;
|
||||
|
||||
struct ureg_src aVtx;
|
||||
@@ -307,7 +304,7 @@ get_texcoord_sn(struct pipe_screen *screen)
|
||||
}
|
||||
|
||||
static INLINE struct ureg_src
|
||||
build_vs_add_input(struct vs_build_ctx *vs, unsigned ndecl)
|
||||
build_vs_add_input(struct vs_build_ctx *vs, uint16_t ndecl)
|
||||
{
|
||||
const unsigned i = vs->num_inputs++;
|
||||
assert(i < PIPE_MAX_ATTRIBS);
|
||||
@@ -373,10 +370,10 @@ nine_ff_build_vs(struct NineDevice9 *device, struct vs_build_ctx *vs)
|
||||
* (texture coordinates handled later)
|
||||
*/
|
||||
vs->aVtx = build_vs_add_input(vs,
|
||||
key->position_t ? NINE_DECLUSAGE_POSITIONT : NINE_DECLUSAGE_POSITION(0));
|
||||
key->position_t ? NINE_DECLUSAGE_POSITIONT : NINE_DECLUSAGE_POSITION);
|
||||
|
||||
if (need_rNrm)
|
||||
vs->aNrm = build_vs_add_input(vs, NINE_DECLUSAGE_NORMAL(0));
|
||||
vs->aNrm = build_vs_add_input(vs, NINE_DECLUSAGE_NORMAL);
|
||||
|
||||
vs->aCol[0] = ureg_imm1f(ureg, 1.0f);
|
||||
vs->aCol[1] = ureg_imm1f(ureg, 1.0f);
|
||||
@@ -385,9 +382,9 @@ nine_ff_build_vs(struct NineDevice9 *device, struct vs_build_ctx *vs)
|
||||
const unsigned mask = key->mtl_diffuse | key->mtl_specular |
|
||||
key->mtl_ambient | key->mtl_emissive;
|
||||
if ((mask & 0x1) && !key->color0in_one)
|
||||
vs->aCol[0] = build_vs_add_input(vs, NINE_DECLUSAGE_COLOR(0));
|
||||
vs->aCol[0] = build_vs_add_input(vs, NINE_DECLUSAGE_i(COLOR, 0));
|
||||
if ((mask & 0x2) && !key->color1in_one)
|
||||
vs->aCol[1] = build_vs_add_input(vs, NINE_DECLUSAGE_COLOR(1));
|
||||
vs->aCol[1] = build_vs_add_input(vs, NINE_DECLUSAGE_i(COLOR, 1));
|
||||
|
||||
vs->mtlD = MATERIAL_CONST(1);
|
||||
vs->mtlA = MATERIAL_CONST(2);
|
||||
@@ -402,20 +399,20 @@ nine_ff_build_vs(struct NineDevice9 *device, struct vs_build_ctx *vs)
|
||||
if (key->mtl_emissive == 1) vs->mtlE = vs->aCol[0]; else
|
||||
if (key->mtl_emissive == 2) vs->mtlE = vs->aCol[1];
|
||||
} else {
|
||||
if (!key->color0in_one) vs->aCol[0] = build_vs_add_input(vs, NINE_DECLUSAGE_COLOR(0));
|
||||
if (!key->color1in_one) vs->aCol[1] = build_vs_add_input(vs, NINE_DECLUSAGE_COLOR(1));
|
||||
if (!key->color0in_one) vs->aCol[0] = build_vs_add_input(vs, NINE_DECLUSAGE_i(COLOR, 0));
|
||||
if (!key->color1in_one) vs->aCol[1] = build_vs_add_input(vs, NINE_DECLUSAGE_i(COLOR, 1));
|
||||
}
|
||||
|
||||
if (key->vertexpointsize)
|
||||
vs->aPsz = build_vs_add_input(vs, NINE_DECLUSAGE_PSIZE);
|
||||
|
||||
if (key->vertexblend_indexed)
|
||||
vs->aInd = build_vs_add_input(vs, NINE_DECLUSAGE_BLENDINDICES(0));
|
||||
vs->aInd = build_vs_add_input(vs, NINE_DECLUSAGE_BLENDINDICES);
|
||||
if (key->vertexblend)
|
||||
vs->aWgt = build_vs_add_input(vs, NINE_DECLUSAGE_BLENDWEIGHT(0));
|
||||
vs->aWgt = build_vs_add_input(vs, NINE_DECLUSAGE_BLENDWEIGHT);
|
||||
if (key->vertextween) {
|
||||
vs->aVtx1 = build_vs_add_input(vs, NINE_DECLUSAGE_POSITION(1));
|
||||
vs->aNrm1 = build_vs_add_input(vs, NINE_DECLUSAGE_NORMAL(1));
|
||||
vs->aVtx1 = build_vs_add_input(vs, NINE_DECLUSAGE_i(POSITION,1));
|
||||
vs->aNrm1 = build_vs_add_input(vs, NINE_DECLUSAGE_i(NORMAL,1));
|
||||
}
|
||||
|
||||
/* Declare outputs:
|
||||
@@ -599,7 +596,7 @@ nine_ff_build_vs(struct NineDevice9 *device, struct vs_build_ctx *vs)
|
||||
oTex[i] = ureg_DECL_output(ureg, texcoord_sn, i);
|
||||
|
||||
if (tci == NINED3DTSS_TCI_PASSTHRU)
|
||||
vs->aTex[idx] = build_vs_add_input(vs, NINE_DECLUSAGE_TEXCOORD(idx));
|
||||
vs->aTex[idx] = build_vs_add_input(vs, NINE_DECLUSAGE_i(TEXCOORD,idx));
|
||||
|
||||
if (!dim) {
|
||||
dst[c = 4] = oTex[i];
|
||||
@@ -1154,10 +1151,10 @@ ps_do_ts_op(struct ps_build_ctx *ps, unsigned top, struct ureg_dst dst, struct u
|
||||
ureg_MUL(ureg, ureg_saturate(dst), ureg_src(tmp), ureg_imm4f(ureg,4.0,4.0,4.0,4.0));
|
||||
break;
|
||||
case D3DTOP_MULTIPLYADD:
|
||||
ureg_MAD(ureg, dst, arg[2], arg[0], arg[1]);
|
||||
ureg_MAD(ureg, dst, arg[1], arg[2], arg[0]);
|
||||
break;
|
||||
case D3DTOP_LERP:
|
||||
ureg_LRP(ureg, dst, arg[1], arg[2], arg[0]);
|
||||
ureg_LRP(ureg, dst, arg[0], arg[1], arg[2]);
|
||||
break;
|
||||
case D3DTOP_DISABLE:
|
||||
/* no-op ? */
|
||||
@@ -1281,6 +1278,8 @@ nine_ff_build_ps(struct NineDevice9 *device, struct nine_ff_ps_key *key)
|
||||
(key->ts[0].resultarg != 0 /* not current */ ||
|
||||
key->ts[0].colorop == D3DTOP_DISABLE ||
|
||||
key->ts[0].alphaop == D3DTOP_DISABLE ||
|
||||
key->ts[0].colorop == D3DTOP_BLENDCURRENTALPHA ||
|
||||
key->ts[0].alphaop == D3DTOP_BLENDCURRENTALPHA ||
|
||||
key->ts[0].colorarg0 == D3DTA_CURRENT ||
|
||||
key->ts[0].colorarg1 == D3DTA_CURRENT ||
|
||||
key->ts[0].colorarg2 == D3DTA_CURRENT ||
|
||||
@@ -1377,7 +1376,7 @@ nine_ff_get_vs(struct NineDevice9 *device)
|
||||
enum pipe_error err;
|
||||
struct vs_build_ctx bld;
|
||||
struct nine_ff_vs_key key;
|
||||
unsigned s;
|
||||
unsigned s, i;
|
||||
|
||||
assert(sizeof(key) <= sizeof(key.value32));
|
||||
|
||||
@@ -1388,14 +1387,19 @@ nine_ff_get_vs(struct NineDevice9 *device)
|
||||
|
||||
/* FIXME: this shouldn't be NULL, but it is on init */
|
||||
if (state->vdecl) {
|
||||
if (state->vdecl->usage_map[NINE_DECLUSAGE_POSITIONT] != 0xff)
|
||||
key.position_t = 1;
|
||||
if (state->vdecl->usage_map[NINE_DECLUSAGE_COLOR(0)] == 0xff)
|
||||
key.color0in_one = 1;
|
||||
if (state->vdecl->usage_map[NINE_DECLUSAGE_COLOR(1)] == 0xff)
|
||||
key.color1in_one = 1;
|
||||
if (state->vdecl->usage_map[NINE_DECLUSAGE_PSIZE] != 0xff)
|
||||
key.vertexpointsize = 1;
|
||||
key.color0in_one = 1;
|
||||
key.color1in_one = 1;
|
||||
for (i = 0; i < state->vdecl->nelems; i++) {
|
||||
uint16_t usage = state->vdecl->usage_map[i];
|
||||
if (usage == NINE_DECLUSAGE_POSITIONT)
|
||||
key.position_t = 1;
|
||||
else if (usage == NINE_DECLUSAGE_i(COLOR, 0))
|
||||
key.color0in_one = 0;
|
||||
else if (usage == NINE_DECLUSAGE_i(COLOR, 1))
|
||||
key.color1in_one = 0;
|
||||
else if (usage == NINE_DECLUSAGE_PSIZE)
|
||||
key.vertexpointsize = 1;
|
||||
}
|
||||
}
|
||||
if (!key.vertexpointsize)
|
||||
key.pointscale = !!state->rs[D3DRS_POINTSCALEENABLE];
|
||||
|
@@ -185,6 +185,8 @@ d3d9_to_pipe_format(D3DFORMAT format)
|
||||
case D3DFMT_DXT3: return PIPE_FORMAT_DXT3_RGBA;
|
||||
case D3DFMT_DXT4: return PIPE_FORMAT_DXT5_RGBA; /* XXX */
|
||||
case D3DFMT_DXT5: return PIPE_FORMAT_DXT5_RGBA;
|
||||
case D3DFMT_ATI1: return PIPE_FORMAT_RGTC1_UNORM;
|
||||
case D3DFMT_ATI2: return PIPE_FORMAT_RGTC2_UNORM;
|
||||
case D3DFMT_UYVY: return PIPE_FORMAT_UYVY;
|
||||
case D3DFMT_YUY2: return PIPE_FORMAT_YUYV; /* XXX check */
|
||||
case D3DFMT_NV12: return PIPE_FORMAT_NV12;
|
||||
@@ -249,6 +251,8 @@ d3dformat_to_string(D3DFORMAT fmt)
|
||||
case D3DFMT_DXT3: return "D3DFMT_DXT3";
|
||||
case D3DFMT_DXT4: return "D3DFMT_DXT4";
|
||||
case D3DFMT_DXT5: return "D3DFMT_DXT5";
|
||||
case D3DFMT_ATI1: return "D3DFMT_ATI1";
|
||||
case D3DFMT_ATI2: return "D3DFMT_ATI2";
|
||||
case D3DFMT_D16_LOCKABLE: return "D3DFMT_D16_LOCKABLE";
|
||||
case D3DFMT_D32: return "D3DFMT_D32";
|
||||
case D3DFMT_D15S1: return "D3DFMT_D15S1";
|
||||
@@ -279,6 +283,7 @@ d3dformat_to_string(D3DFORMAT fmt)
|
||||
case D3DFMT_DF16: return "D3DFMT_DF16";
|
||||
case D3DFMT_DF24: return "D3DFMT_DF24";
|
||||
case D3DFMT_INTZ: return "D3DFMT_INTZ";
|
||||
case D3DFMT_NVDB: return "D3DFMT_NVDB";
|
||||
case D3DFMT_NULL: return "D3DFMT_NULL";
|
||||
default:
|
||||
break;
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -48,7 +48,7 @@ struct nine_shader_info
|
||||
|
||||
void *cso; /* out, pipe cso for bind_vs,fs_state */
|
||||
|
||||
uint8_t input_map[PIPE_MAX_ATTRIBS]; /* VS input -> NINE_DECLUSAGE_x */
|
||||
uint16_t input_map[PIPE_MAX_ATTRIBS]; /* VS input -> NINE_DECLUSAGE_x */
|
||||
uint8_t num_inputs; /* there may be unused inputs (NINE_DECLUSAGE_NONE) */
|
||||
|
||||
boolean position_t; /* out, true if VP writes pre-transformed position */
|
||||
|
@@ -141,11 +141,9 @@ update_viewport(struct NineDevice9 *device)
|
||||
pvport.scale[0] = (float)vport->Width * 0.5f;
|
||||
pvport.scale[1] = (float)vport->Height * -0.5f;
|
||||
pvport.scale[2] = vport->MaxZ - vport->MinZ;
|
||||
pvport.scale[3] = 1.0f;
|
||||
pvport.translate[0] = (float)vport->Width * 0.5f + (float)vport->X;
|
||||
pvport.translate[1] = (float)vport->Height * 0.5f + (float)vport->Y;
|
||||
pvport.translate[2] = vport->MinZ;
|
||||
pvport.translate[3] = 0.0f;
|
||||
|
||||
pipe->set_viewport_states(pipe, 0, 1, &pvport);
|
||||
}
|
||||
@@ -186,7 +184,8 @@ update_vertex_elements(struct NineDevice9 *device)
|
||||
struct nine_state *state = &device->state;
|
||||
const struct NineVertexDeclaration9 *vdecl = device->state.vdecl;
|
||||
const struct NineVertexShader9 *vs;
|
||||
unsigned n, l, b;
|
||||
unsigned n, b, i;
|
||||
int index;
|
||||
struct pipe_vertex_element ve[PIPE_MAX_ATTRIBS];
|
||||
|
||||
state->stream_usage_mask = 0;
|
||||
@@ -199,11 +198,16 @@ update_vertex_elements(struct NineDevice9 *device)
|
||||
DBG("looking up input %u (usage %u) from vdecl(%p)\n",
|
||||
n, vs->input_map[n].ndecl, vdecl);
|
||||
|
||||
assert(vs->input_map[n].ndecl < Elements(vdecl->usage_map));
|
||||
l = vdecl->usage_map[vs->input_map[n].ndecl];
|
||||
index = -1;
|
||||
for (i = 0; i < vdecl->nelems; i++) {
|
||||
if (vdecl->usage_map[i] == vs->input_map[n].ndecl) {
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (likely(l < vdecl->nelems)) {
|
||||
ve[n] = vdecl->elems[l];
|
||||
if (index >= 0) {
|
||||
ve[n] = vdecl->elems[index];
|
||||
b = ve[n].vertex_buffer_index;
|
||||
state->stream_usage_mask |= 1 << b;
|
||||
/* XXX wine just uses 1 here: */
|
||||
@@ -343,14 +347,13 @@ update_constants(struct NineDevice9 *device, unsigned shader_type)
|
||||
const int *const_i;
|
||||
const BOOL *const_b;
|
||||
uint32_t data_b[NINE_MAX_CONST_B];
|
||||
uint32_t b_true;
|
||||
uint16_t dirty_i;
|
||||
uint16_t dirty_b;
|
||||
const unsigned usage = PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE;
|
||||
unsigned x = 0; /* silence warning */
|
||||
unsigned i, c, n;
|
||||
const struct nine_lconstf *lconstf;
|
||||
struct nine_range *r, *p;
|
||||
unsigned i, c;
|
||||
struct nine_range *r, *p, *lconstf_ranges;
|
||||
float *lconstf_data;
|
||||
|
||||
box.y = 0;
|
||||
box.z = 0;
|
||||
@@ -377,9 +380,10 @@ update_constants(struct NineDevice9 *device, unsigned shader_type)
|
||||
dirty_b = device->state.changed.vs_const_b;
|
||||
device->state.changed.vs_const_b = 0;
|
||||
const_b = device->state.vs_const_b;
|
||||
b_true = device->vs_bool_true;
|
||||
|
||||
lconstf = &device->state.vs->lconstf;
|
||||
lconstf_ranges = device->state.vs->lconstf.ranges;
|
||||
lconstf_data = device->state.vs->lconstf.data;
|
||||
|
||||
device->state.ff.clobber.vs_const = TRUE;
|
||||
device->state.changed.group &= ~NINE_STATE_VS_CONST;
|
||||
} else {
|
||||
@@ -400,11 +404,12 @@ update_constants(struct NineDevice9 *device, unsigned shader_type)
|
||||
const_i = &device->state.ps_const_i[0][0];
|
||||
|
||||
dirty_b = device->state.changed.ps_const_b;
|
||||
device->state.changed.vs_const_b = 0;
|
||||
device->state.changed.ps_const_b = 0;
|
||||
const_b = device->state.ps_const_b;
|
||||
b_true = device->ps_bool_true;
|
||||
|
||||
lconstf = &device->state.ps->lconstf;
|
||||
lconstf_ranges = NULL;
|
||||
lconstf_data = NULL;
|
||||
|
||||
device->state.ff.clobber.ps_const = TRUE;
|
||||
device->state.changed.group &= ~NINE_STATE_PS_CONST;
|
||||
}
|
||||
@@ -416,11 +421,10 @@ update_constants(struct NineDevice9 *device, unsigned shader_type)
|
||||
i = ffs(dirty_b) - 1;
|
||||
x = buf->width0 - (NINE_MAX_CONST_B - i) * 4;
|
||||
c -= i;
|
||||
for (n = 0; n < c; ++n, ++i)
|
||||
data_b[n] = const_b[i] ? b_true : 0;
|
||||
memcpy(data_b, &(const_b[i]), c * sizeof(uint32_t));
|
||||
box.x = x;
|
||||
box.width = n * 4;
|
||||
DBG("upload ConstantB [%u .. %u]\n", x, x + n - 1);
|
||||
box.width = c * 4;
|
||||
DBG("upload ConstantB [%u .. %u]\n", x, x + c - 1);
|
||||
pipe->transfer_inline_write(pipe, buf, 0, usage, &box, data_b, 0, 0);
|
||||
}
|
||||
|
||||
@@ -451,14 +455,14 @@ update_constants(struct NineDevice9 *device, unsigned shader_type)
|
||||
}
|
||||
|
||||
/* TODO: only upload these when shader itself changes */
|
||||
if (lconstf->ranges) {
|
||||
if (lconstf_ranges) {
|
||||
unsigned n = 0;
|
||||
struct nine_range *r = lconstf->ranges;
|
||||
struct nine_range *r = lconstf_ranges;
|
||||
while (r) {
|
||||
box.x = r->bgn * 4 * sizeof(float);
|
||||
n += r->end - r->bgn;
|
||||
box.width = (r->end - r->bgn) * 4 * sizeof(float);
|
||||
data = &lconstf->data[4 * n];
|
||||
data = &lconstf_data[4 * n];
|
||||
pipe->transfer_inline_write(pipe, buf, 0, usage, &box, data, 0, 0);
|
||||
r = r->next;
|
||||
}
|
||||
@@ -487,19 +491,16 @@ update_vs_constants_userbuf(struct NineDevice9 *device)
|
||||
if (state->changed.vs_const_b) {
|
||||
int *idst = (int *)&state->vs_const_f[4 * device->max_vs_const_f];
|
||||
uint32_t *bdst = (uint32_t *)&idst[4 * NINE_MAX_CONST_I];
|
||||
int i;
|
||||
for (i = 0; i < NINE_MAX_CONST_B; ++i)
|
||||
bdst[i] = state->vs_const_b[i] ? device->vs_bool_true : 0;
|
||||
memcpy(bdst, state->vs_const_b, sizeof(state->vs_const_b));
|
||||
state->changed.vs_const_b = 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if (device->state.vs->lconstf.ranges) {
|
||||
/* TODO: Can we make it so that we don't have to copy everything ? */
|
||||
const struct nine_lconstf *lconstf = &device->state.vs->lconstf;
|
||||
const struct nine_range *r = lconstf->ranges;
|
||||
unsigned n = 0;
|
||||
float *dst = (float *)MALLOC(cb.buffer_size);
|
||||
float *dst = device->state.vs_lconstf_temp;
|
||||
float *src = (float *)cb.user_buffer;
|
||||
memcpy(dst, src, cb.buffer_size);
|
||||
while (r) {
|
||||
@@ -511,15 +512,9 @@ update_vs_constants_userbuf(struct NineDevice9 *device)
|
||||
}
|
||||
cb.user_buffer = dst;
|
||||
}
|
||||
#endif
|
||||
|
||||
pipe->set_constant_buffer(pipe, PIPE_SHADER_VERTEX, 0, &cb);
|
||||
|
||||
#ifdef DEBUG
|
||||
if (device->state.vs->lconstf.ranges)
|
||||
FREE((void *)cb.user_buffer);
|
||||
#endif
|
||||
|
||||
if (device->state.changed.vs_const_f) {
|
||||
struct nine_range *r = device->state.changed.vs_const_f;
|
||||
struct nine_range *p = r;
|
||||
@@ -553,39 +548,12 @@ update_ps_constants_userbuf(struct NineDevice9 *device)
|
||||
if (state->changed.ps_const_b) {
|
||||
int *idst = (int *)&state->ps_const_f[4 * device->max_ps_const_f];
|
||||
uint32_t *bdst = (uint32_t *)&idst[4 * NINE_MAX_CONST_I];
|
||||
int i;
|
||||
for (i = 0; i < NINE_MAX_CONST_B; ++i)
|
||||
bdst[i] = state->ps_const_b[i] ? device->ps_bool_true : 0;
|
||||
memcpy(bdst, state->ps_const_b, sizeof(state->ps_const_b));
|
||||
state->changed.ps_const_b = 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if (device->state.ps->lconstf.ranges) {
|
||||
/* TODO: Can we make it so that we don't have to copy everything ? */
|
||||
const struct nine_lconstf *lconstf = &device->state.ps->lconstf;
|
||||
const struct nine_range *r = lconstf->ranges;
|
||||
unsigned n = 0;
|
||||
float *dst = (float *)MALLOC(cb.buffer_size);
|
||||
float *src = (float *)cb.user_buffer;
|
||||
memcpy(dst, src, cb.buffer_size);
|
||||
while (r) {
|
||||
unsigned p = r->bgn;
|
||||
unsigned c = r->end - r->bgn;
|
||||
memcpy(&dst[p * 4], &lconstf->data[n * 4], c * 4 * sizeof(float));
|
||||
n += c;
|
||||
r = r->next;
|
||||
}
|
||||
cb.user_buffer = dst;
|
||||
}
|
||||
#endif
|
||||
|
||||
pipe->set_constant_buffer(pipe, PIPE_SHADER_FRAGMENT, 0, &cb);
|
||||
|
||||
#ifdef DEBUG
|
||||
if (device->state.ps->lconstf.ranges)
|
||||
FREE((void *)cb.user_buffer);
|
||||
#endif
|
||||
|
||||
if (device->state.changed.ps_const_f) {
|
||||
struct nine_range *r = device->state.changed.ps_const_f;
|
||||
struct nine_range *p = r;
|
||||
@@ -1026,9 +994,10 @@ static const DWORD nine_samp_state_defaults[NINED3DSAMP_LAST + 1] =
|
||||
[NINED3DSAMP_SHADOW] = 0
|
||||
};
|
||||
void
|
||||
nine_state_set_defaults(struct nine_state *state, const D3DCAPS9 *caps,
|
||||
nine_state_set_defaults(struct NineDevice9 *device, const D3DCAPS9 *caps,
|
||||
boolean is_reset)
|
||||
{
|
||||
struct nine_state *state = &device->state;
|
||||
unsigned s;
|
||||
|
||||
/* Initialize defaults.
|
||||
@@ -1049,9 +1018,9 @@ nine_state_set_defaults(struct nine_state *state, const D3DCAPS9 *caps,
|
||||
}
|
||||
|
||||
if (state->vs_const_f)
|
||||
memset(state->vs_const_f, 0, NINE_MAX_CONST_F * 4 * sizeof(float));
|
||||
memset(state->vs_const_f, 0, device->vs_const_size);
|
||||
if (state->ps_const_f)
|
||||
memset(state->ps_const_f, 0, NINE_MAX_CONST_F * 4 * sizeof(float));
|
||||
memset(state->ps_const_f, 0, device->ps_const_size);
|
||||
|
||||
/* Cap dependent initial state:
|
||||
*/
|
||||
|
@@ -144,6 +144,7 @@ struct nine_state
|
||||
float *vs_const_f;
|
||||
int vs_const_i[NINE_MAX_CONST_I][4];
|
||||
BOOL vs_const_b[NINE_MAX_CONST_B];
|
||||
float *vs_lconstf_temp;
|
||||
uint32_t vs_key;
|
||||
|
||||
struct NinePixelShader9 *ps;
|
||||
@@ -218,7 +219,7 @@ struct NineDevice9;
|
||||
|
||||
boolean nine_update_state(struct NineDevice9 *, uint32_t group_mask);
|
||||
|
||||
void nine_state_set_defaults(struct nine_state *, const D3DCAPS9 *,
|
||||
void nine_state_set_defaults(struct NineDevice9 *, const D3DCAPS9 *,
|
||||
boolean is_reset);
|
||||
void nine_state_clear(struct nine_state *, const boolean device);
|
||||
|
||||
|
@@ -39,6 +39,8 @@ NinePixelShader9_ctor( struct NinePixelShader9 *This,
|
||||
struct nine_shader_info info;
|
||||
HRESULT hr;
|
||||
|
||||
DBG("This=%p pParams=%p pFunction=%p cso=%p\n", This, pParams, pFunction, cso);
|
||||
|
||||
hr = NineUnknown_ctor(&This->base, pParams);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
@@ -70,9 +72,10 @@ NinePixelShader9_ctor( struct NinePixelShader9 *This,
|
||||
This->sampler_mask = info.sampler_mask;
|
||||
This->rt_mask = info.rt_mask;
|
||||
This->const_used_size = info.const_used_size;
|
||||
if (info.const_used_size == ~0)
|
||||
This->const_used_size = NINE_CONSTBUF_SIZE(device->max_ps_const_f);
|
||||
This->lconstf = info.lconstf;
|
||||
/* no constant relative addressing for ps */
|
||||
assert(info.const_used_size != ~0);
|
||||
assert(info.lconstf.data == NULL);
|
||||
assert(info.lconstf.ranges == NULL);
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
@@ -99,9 +102,6 @@ NinePixelShader9_dtor( struct NinePixelShader9 *This )
|
||||
if (This->byte_code.tokens)
|
||||
FREE((void *)This->byte_code.tokens); /* const_cast */
|
||||
|
||||
FREE(This->lconstf.data);
|
||||
FREE(This->lconstf.ranges);
|
||||
|
||||
NineUnknown_dtor(&This->base);
|
||||
}
|
||||
|
||||
@@ -110,6 +110,8 @@ NinePixelShader9_GetFunction( struct NinePixelShader9 *This,
|
||||
void *pData,
|
||||
UINT *pSizeOfData )
|
||||
{
|
||||
DBG("This=%p pData=%p pSizeOfData=%p\n", This, pData, pSizeOfData);
|
||||
|
||||
user_assert(pSizeOfData, D3DERR_INVALIDCALL);
|
||||
|
||||
if (!pData) {
|
||||
|
@@ -41,8 +41,6 @@ struct NinePixelShader9
|
||||
|
||||
unsigned const_used_size; /* in bytes */
|
||||
|
||||
struct nine_lconstf lconstf;
|
||||
|
||||
uint16_t sampler_mask;
|
||||
uint16_t sampler_mask_shadow;
|
||||
uint8_t rt_mask;
|
||||
|
@@ -107,6 +107,8 @@ NineQuery9_ctor( struct NineQuery9 *This,
|
||||
const unsigned ptype = d3dquerytype_to_pipe_query(Type);
|
||||
HRESULT hr;
|
||||
|
||||
DBG("This=%p pParams=%p Type=%d\n", This, pParams, Type);
|
||||
|
||||
hr = NineUnknown_ctor(&This->base, pParams);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
@@ -170,6 +172,8 @@ NineQuery9_Issue( struct NineQuery9 *This,
|
||||
{
|
||||
struct pipe_context *pipe = This->base.device->pipe;
|
||||
|
||||
DBG("This=%p dwIssueFlags=%d\n", This, dwIssueFlags);
|
||||
|
||||
user_assert((dwIssueFlags == D3DISSUE_BEGIN && !This->instant) ||
|
||||
(dwIssueFlags == 0) ||
|
||||
(dwIssueFlags == D3DISSUE_END), D3DERR_INVALIDCALL);
|
||||
@@ -186,10 +190,12 @@ NineQuery9_Issue( struct NineQuery9 *This,
|
||||
pipe->begin_query(pipe, This->pq);
|
||||
This->state = NINE_QUERY_STATE_RUNNING;
|
||||
} else {
|
||||
if (This->state == NINE_QUERY_STATE_RUNNING) {
|
||||
pipe->end_query(pipe, This->pq);
|
||||
This->state = NINE_QUERY_STATE_ENDED;
|
||||
}
|
||||
if (This->state != NINE_QUERY_STATE_RUNNING &&
|
||||
This->type != D3DQUERYTYPE_EVENT &&
|
||||
This->type != D3DQUERYTYPE_TIMESTAMP)
|
||||
pipe->begin_query(pipe, This->pq);
|
||||
pipe->end_query(pipe, This->pq);
|
||||
This->state = NINE_QUERY_STATE_ENDED;
|
||||
}
|
||||
return D3D_OK;
|
||||
}
|
||||
@@ -221,6 +227,9 @@ NineQuery9_GetData( struct NineQuery9 *This,
|
||||
union pipe_query_result presult;
|
||||
union nine_query_result nresult;
|
||||
|
||||
DBG("This=%p pData=%p dwSize=%d dwGetDataFlags=%d\n",
|
||||
This, pData, dwSize, dwGetDataFlags);
|
||||
|
||||
user_assert(This->state != NINE_QUERY_STATE_RUNNING, D3DERR_INVALIDCALL);
|
||||
user_assert(dwSize == 0 || pData, D3DERR_INVALIDCALL);
|
||||
user_assert(dwGetDataFlags == 0 ||
|
||||
|
@@ -38,29 +38,42 @@
|
||||
HRESULT
|
||||
NineResource9_ctor( struct NineResource9 *This,
|
||||
struct NineUnknownParams *pParams,
|
||||
struct pipe_resource *initResource,
|
||||
BOOL Allocate,
|
||||
D3DRESOURCETYPE Type,
|
||||
D3DPOOL Pool )
|
||||
D3DPOOL Pool,
|
||||
DWORD Usage)
|
||||
{
|
||||
struct pipe_screen *screen;
|
||||
HRESULT hr;
|
||||
|
||||
DBG("This=%p pParams=%p initResource=%p Allocate=%d "
|
||||
"Type=%d Pool=%d Usage=%d\n",
|
||||
This, pParams, initResource, (int) Allocate,
|
||||
Type, Pool, Usage);
|
||||
|
||||
DBG("This=%p pParams=%p initResource=%p Allocate=%d Type=%d Pool=%d usage=%d\n",
|
||||
This, pParams, initResource, Allocate, Type, Pool, Usage);
|
||||
|
||||
hr = NineUnknown_ctor(&This->base, pParams);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
This->info.screen = screen = This->base.device->screen;
|
||||
if (initResource)
|
||||
pipe_resource_reference(&This->resource, initResource);
|
||||
|
||||
if (Allocate) {
|
||||
assert(!initResource);
|
||||
DBG("(%p) Creating pipe_resource.\n", This);
|
||||
This->resource = screen->resource_create(screen, &This->info);
|
||||
if (!This->resource)
|
||||
return D3DERR_OUTOFVIDEOMEMORY;
|
||||
}
|
||||
|
||||
This->data = NULL; /* FIXME remove, rather set it to null in surface9.c*/
|
||||
This->type = Type;
|
||||
This->pool = Pool;
|
||||
This->usage = Usage;
|
||||
This->priority = 0;
|
||||
|
||||
This->pdata = util_hash_table_create(ht_guid_hash, ht_guid_compare);
|
||||
@@ -82,10 +95,6 @@ NineResource9_dtor( struct NineResource9 *This )
|
||||
* still hold a reference. */
|
||||
pipe_resource_reference(&This->resource, NULL);
|
||||
|
||||
/* release allocated system memory for non-D3DPOOL_DEFAULT resources */
|
||||
if (This->data)
|
||||
FREE(This->data);
|
||||
|
||||
NineUnknown_dtor(&This->base);
|
||||
}
|
||||
|
||||
@@ -201,6 +210,9 @@ NineResource9_SetPriority( struct NineResource9 *This,
|
||||
DWORD PriorityNew )
|
||||
{
|
||||
DWORD prev = This->priority;
|
||||
|
||||
DBG("This=%p, PriorityNew=%d\n", This, PriorityNew);
|
||||
|
||||
This->priority = PriorityNew;
|
||||
return prev;
|
||||
}
|
||||
|
@@ -36,8 +36,6 @@ struct NineResource9
|
||||
|
||||
struct pipe_resource *resource; /* device resource */
|
||||
|
||||
uint8_t *data; /* system memory backing */
|
||||
|
||||
D3DRESOURCETYPE type;
|
||||
D3DPOOL pool;
|
||||
DWORD priority;
|
||||
@@ -57,9 +55,11 @@ NineResource9( void *data )
|
||||
HRESULT
|
||||
NineResource9_ctor( struct NineResource9 *This,
|
||||
struct NineUnknownParams *pParams,
|
||||
struct pipe_resource *initResource,
|
||||
BOOL Allocate,
|
||||
D3DRESOURCETYPE Type,
|
||||
D3DPOOL Pool );
|
||||
D3DPOOL Pool,
|
||||
DWORD Usage);
|
||||
|
||||
void
|
||||
NineResource9_dtor( struct NineResource9 *This );
|
||||
|
@@ -35,13 +35,16 @@ NineStateBlock9_ctor( struct NineStateBlock9 *This,
|
||||
enum nine_stateblock_type type )
|
||||
{
|
||||
HRESULT hr = NineUnknown_ctor(&This->base, pParams);
|
||||
|
||||
DBG("This=%p pParams=%p type=%d\n", This, pParams, type);
|
||||
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
This->type = type;
|
||||
|
||||
This->state.vs_const_f = MALLOC(pParams->device->constbuf_vs->width0);
|
||||
This->state.ps_const_f = MALLOC(pParams->device->constbuf_ps->width0);
|
||||
This->state.vs_const_f = MALLOC(This->base.device->vs_const_size);
|
||||
This->state.ps_const_f = MALLOC(This->base.device->ps_const_size);
|
||||
if (!This->state.vs_const_f || !This->state.ps_const_f)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
|
@@ -38,11 +38,14 @@
|
||||
|
||||
#define DBG_CHANNEL DBG_SURFACE
|
||||
|
||||
#define is_ATI1_ATI2(format) (format == PIPE_FORMAT_RGTC1_UNORM || format == PIPE_FORMAT_RGTC2_UNORM)
|
||||
|
||||
HRESULT
|
||||
NineSurface9_ctor( struct NineSurface9 *This,
|
||||
struct NineUnknownParams *pParams,
|
||||
struct NineUnknown *pContainer,
|
||||
struct pipe_resource *pResource,
|
||||
void *user_buffer,
|
||||
uint8_t TextureType,
|
||||
unsigned Level,
|
||||
unsigned Layer,
|
||||
@@ -62,6 +65,8 @@ NineSurface9_ctor( struct NineSurface9 *This,
|
||||
assert(pResource ||
|
||||
pDesc->Pool != D3DPOOL_DEFAULT || pDesc->Format == D3DFMT_NULL);
|
||||
|
||||
assert(!pResource || !user_buffer);
|
||||
|
||||
This->base.info.screen = pParams->device->screen;
|
||||
This->base.info.target = PIPE_TEXTURE_2D;
|
||||
This->base.info.format = d3d9_to_pipe_format(pDesc->Format);
|
||||
@@ -82,20 +87,17 @@ NineSurface9_ctor( struct NineSurface9 *This,
|
||||
|
||||
if (pDesc->Pool == D3DPOOL_SYSTEMMEM) {
|
||||
This->base.info.usage = PIPE_USAGE_STAGING;
|
||||
if (pResource)
|
||||
This->base.data = (uint8_t *)pResource; /* this is *pSharedHandle */
|
||||
pResource = NULL;
|
||||
This->data = (uint8_t *)user_buffer; /* this is *pSharedHandle */
|
||||
assert(!pResource);
|
||||
} else {
|
||||
if (pResource && (pDesc->Usage & D3DUSAGE_DYNAMIC))
|
||||
pResource->flags |= NINE_RESOURCE_FLAG_LOCKABLE;
|
||||
pipe_resource_reference(&This->base.resource, pResource);
|
||||
}
|
||||
|
||||
hr = NineResource9_ctor(&This->base, pParams, FALSE, D3DRTYPE_SURFACE,
|
||||
pDesc->Pool);
|
||||
hr = NineResource9_ctor(&This->base, pParams, pResource, FALSE, D3DRTYPE_SURFACE,
|
||||
pDesc->Pool, pDesc->Usage);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
This->base.usage = pDesc->Usage;
|
||||
|
||||
This->pipe = This->base.base.device->pipe;
|
||||
This->transfer = NULL;
|
||||
@@ -109,13 +111,20 @@ NineSurface9_ctor( struct NineSurface9 *This,
|
||||
This->stride = util_format_get_stride(This->base.info.format, pDesc->Width);
|
||||
This->stride = align(This->stride, 4);
|
||||
|
||||
if (!pResource && !This->base.data) {
|
||||
hr = NineSurface9_AllocateData(This);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
if (!pResource && !This->data) {
|
||||
const unsigned size = This->stride *
|
||||
util_format_get_nblocksy(This->base.info.format, This->desc.Height);
|
||||
|
||||
DBG("(%p(This=%p),level=%u) Allocating 0x%x bytes of system memory.\n",
|
||||
This->base.base.container, This, This->level, size);
|
||||
|
||||
This->data = (uint8_t *)MALLOC(size);
|
||||
if (!This->data)
|
||||
return E_OUTOFMEMORY;
|
||||
This->manage_data = TRUE;
|
||||
} else {
|
||||
if (pResource && NineSurface9_IsOffscreenPlain(This))
|
||||
pResource->flags |= NINE_RESOURCE_FLAG_LOCKABLE;
|
||||
pResource->flags |= NINE_RESOURCE_FLAG_LOCKABLE; /* why setting this flag there ? too late ? should be before NineResource9_ctor call perhaps ? */
|
||||
}
|
||||
|
||||
NineSurface9_Dump(This);
|
||||
@@ -133,6 +142,9 @@ NineSurface9_dtor( struct NineSurface9 *This )
|
||||
pipe_surface_reference(&This->surface[0], NULL);
|
||||
pipe_surface_reference(&This->surface[1], NULL);
|
||||
|
||||
/* release allocated system memory for non-D3DPOOL_DEFAULT resources */
|
||||
if (This->manage_data && This->data)
|
||||
FREE(This->data);
|
||||
NineResource9_dtor(&This->base);
|
||||
}
|
||||
|
||||
@@ -140,14 +152,22 @@ struct pipe_surface *
|
||||
NineSurface9_CreatePipeSurface( struct NineSurface9 *This, const int sRGB )
|
||||
{
|
||||
struct pipe_context *pipe = This->pipe;
|
||||
struct pipe_screen *screen = pipe->screen;
|
||||
struct pipe_resource *resource = This->base.resource;
|
||||
struct pipe_surface templ;
|
||||
enum pipe_format srgb_format;
|
||||
|
||||
assert(This->desc.Pool == D3DPOOL_DEFAULT ||
|
||||
This->desc.Pool == D3DPOOL_MANAGED);
|
||||
assert(resource);
|
||||
|
||||
templ.format = sRGB ? util_format_srgb(resource->format) : resource->format;
|
||||
srgb_format = util_format_srgb(resource->format);
|
||||
if (sRGB && srgb_format != PIPE_FORMAT_NONE &&
|
||||
screen->is_format_supported(screen, srgb_format,
|
||||
resource->target, 0, resource->bind))
|
||||
templ.format = srgb_format;
|
||||
else
|
||||
templ.format = resource->format;
|
||||
templ.u.tex.level = This->level;
|
||||
templ.u.tex.first_layer = This->layer;
|
||||
templ.u.tex.last_layer = This->layer;
|
||||
@@ -167,7 +187,7 @@ NineSurface9_Dump( struct NineSurface9 *This )
|
||||
|
||||
DBG("\nNineSurface9(%p->%p/%p): Pool=%s Type=%s Usage=%s\n"
|
||||
"Dims=%ux%u Format=%s Stride=%u Lockable=%i\n"
|
||||
"Level=%u(%u), Layer=%u\n", This, This->base.resource, This->base.data,
|
||||
"Level=%u(%u), Layer=%u\n", This, This->base.resource, This->data,
|
||||
nine_D3DPOOL_to_str(This->desc.Pool),
|
||||
nine_D3DRTYPE_to_str(This->desc.Type),
|
||||
nine_D3DUSAGE_to_str(This->desc.Usage),
|
||||
@@ -240,6 +260,8 @@ NineSurface9_AddDirtyRect( struct NineSurface9 *This,
|
||||
float area[2];
|
||||
struct u_rect rect, cover_a, cover_b;
|
||||
|
||||
DBG("This=%p box=%p\n", This, box);
|
||||
|
||||
if (!box) {
|
||||
This->dirty_rects[0].x0 = 0;
|
||||
This->dirty_rects[0].y0 = 0;
|
||||
@@ -286,8 +308,8 @@ NineSurface9_GetSystemMemPointer(struct NineSurface9 *This, int x, int y)
|
||||
|
||||
y = util_format_get_nblocksy(This->base.info.format, y);
|
||||
|
||||
assert(This->base.data);
|
||||
return This->base.data + (y * This->stride + x_offset);
|
||||
assert(This->data);
|
||||
return This->data + (y * This->stride + x_offset);
|
||||
}
|
||||
|
||||
HRESULT WINAPI
|
||||
@@ -360,12 +382,21 @@ NineSurface9_LockRect( struct NineSurface9 *This,
|
||||
|
||||
user_warn(This->desc.Format == D3DFMT_NULL);
|
||||
|
||||
if (This->base.data) {
|
||||
if (This->data) {
|
||||
DBG("returning system memory\n");
|
||||
|
||||
pLockedRect->Pitch = This->stride;
|
||||
pLockedRect->pBits = NineSurface9_GetSystemMemPointer(This,
|
||||
box.x, box.y);
|
||||
/* ATI1 and ATI2 need special handling, because of d3d9 bug.
|
||||
* We must advertise to the application as if it is uncompressed
|
||||
* and bpp 8, and the app has a workaround to work with the fact
|
||||
* that it is actually compressed. */
|
||||
if (is_ATI1_ATI2(This->base.info.format)) {
|
||||
pLockedRect->Pitch = This->desc.Height;
|
||||
pLockedRect->pBits = This->data + box.y * This->desc.Height + box.x;
|
||||
} else {
|
||||
pLockedRect->Pitch = This->stride;
|
||||
pLockedRect->pBits = NineSurface9_GetSystemMemPointer(This,
|
||||
box.x,
|
||||
box.y);
|
||||
}
|
||||
} else {
|
||||
DBG("mapping pipe_resource %p (level=%u usage=%x)\n",
|
||||
resource, This->level, usage);
|
||||
@@ -419,73 +450,6 @@ NineSurface9_ReleaseDC( struct NineSurface9 *This,
|
||||
STUB(D3DERR_INVALIDCALL);
|
||||
}
|
||||
|
||||
/* nine private */
|
||||
|
||||
HRESULT
|
||||
NineSurface9_AllocateData( struct NineSurface9 *This )
|
||||
{
|
||||
#if 0
|
||||
struct pipe_screen *screen = This->base.info.screen;
|
||||
/* XXX: Can't use staging resource because apparently apps expect
|
||||
* memory offsets to be the same across locks.
|
||||
* NV50 doesn't support direct mapping yet so only enable this if
|
||||
* everything else works.
|
||||
*/
|
||||
if (This->base.pool == D3DPOOL_SYSTEMMEM) {
|
||||
/* Allocate a staging resource to save a copy:
|
||||
* user -> staging resource
|
||||
* staging resource -> (blit) -> video memory
|
||||
*
|
||||
* Instead of:
|
||||
* user -> system memory
|
||||
* system memory -> transfer staging area
|
||||
* transfer -> video memory
|
||||
*
|
||||
* Does this work if we "lose" the device ?
|
||||
*/
|
||||
struct pipe_resource *resource;
|
||||
struct pipe_resource templ;
|
||||
|
||||
templ.target = PIPE_TEXTURE_2D;
|
||||
templ.format = This->base.info.format;
|
||||
templ.width0 = This->desc.Width;
|
||||
templ.height0 = This->desc.Height;
|
||||
templ.depth0 = 1;
|
||||
templ.array_size = 1;
|
||||
templ.last_level = 0;
|
||||
templ.nr_samples = 0;
|
||||
templ.usage = PIPE_USAGE_STAGING;
|
||||
templ.bind =
|
||||
PIPE_BIND_SAMPLER_VIEW |
|
||||
PIPE_BIND_TRANSFER_WRITE |
|
||||
PIPE_BIND_TRANSFER_READ;
|
||||
templ.flags = 0;
|
||||
|
||||
DBG("(%p(This=%p),level=%u) Allocating staging resource.\n",
|
||||
This->base.base.container, This, This->level);
|
||||
|
||||
resource = screen->resource_create(screen, &templ);
|
||||
if (!resource)
|
||||
DBG("Failed to allocate staging resource.\n");
|
||||
|
||||
/* Also deallocate old staging resource. */
|
||||
pipe_resource_reference(&This->base.resource, resource);
|
||||
}
|
||||
#endif
|
||||
if (!This->base.resource) {
|
||||
const unsigned size = This->stride *
|
||||
util_format_get_nblocksy(This->base.info.format, This->desc.Height);
|
||||
|
||||
DBG("(%p(This=%p),level=%u) Allocating 0x%x bytes of system memory.\n",
|
||||
This->base.base.container, This, This->level, size);
|
||||
|
||||
This->base.data = (uint8_t *)MALLOC(size);
|
||||
if (!This->base.data)
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
IDirect3DSurface9Vtbl NineSurface9_vtable = {
|
||||
(void *)NineUnknown_QueryInterface,
|
||||
(void *)NineUnknown_AddRef,
|
||||
@@ -528,6 +492,9 @@ NineSurface9_CopySurface( struct NineSurface9 *This,
|
||||
uint8_t *p_dst;
|
||||
const uint8_t *p_src;
|
||||
|
||||
DBG("This=%p From=%p pDestPoint=%p pSourceRect=%p\n",
|
||||
This, From, pDestPoint, pSourceRect);
|
||||
|
||||
user_assert(This->desc.Format == From->desc.Format, D3DERR_INVALIDCALL);
|
||||
|
||||
dst_box.x = pDestPoint ? pDestPoint->x : 0;
|
||||
@@ -643,6 +610,8 @@ NineSurface9_UploadSelf( struct NineSurface9 *This )
|
||||
uint8_t *ptr;
|
||||
unsigned i;
|
||||
|
||||
DBG("This=%p\n", This);
|
||||
|
||||
assert(This->base.pool == D3DPOOL_MANAGED);
|
||||
|
||||
if (!NineSurface9_IsDirty(This))
|
||||
@@ -699,6 +668,7 @@ HRESULT
|
||||
NineSurface9_new( struct NineDevice9 *pDevice,
|
||||
struct NineUnknown *pContainer,
|
||||
struct pipe_resource *pResource,
|
||||
void *user_buffer,
|
||||
uint8_t TextureType,
|
||||
unsigned Level,
|
||||
unsigned Layer,
|
||||
@@ -706,6 +676,6 @@ NineSurface9_new( struct NineDevice9 *pDevice,
|
||||
struct NineSurface9 **ppOut )
|
||||
{
|
||||
NINE_DEVICE_CHILD_NEW(Surface9, ppOut, pDevice, /* args */
|
||||
pContainer, pResource,
|
||||
pContainer, pResource, user_buffer,
|
||||
TextureType, Level, Layer, pDesc);
|
||||
}
|
||||
|
@@ -47,6 +47,8 @@ struct NineSurface9
|
||||
unsigned layer;
|
||||
D3DSURFACE_DESC desc;
|
||||
|
||||
uint8_t *data; /* system memory backing */
|
||||
boolean manage_data;
|
||||
unsigned stride; /* for system memory backing */
|
||||
|
||||
/* wine doesn't even use these, 2 will be enough */
|
||||
@@ -62,6 +64,7 @@ HRESULT
|
||||
NineSurface9_new( struct NineDevice9 *pDevice,
|
||||
struct NineUnknown *pContainer,
|
||||
struct pipe_resource *pResource,
|
||||
void *user_buffer,
|
||||
uint8_t TextureType, /* 0 if pContainer isn't BaseTexure9 */
|
||||
unsigned Level,
|
||||
unsigned Layer,
|
||||
@@ -73,6 +76,7 @@ NineSurface9_ctor( struct NineSurface9 *This,
|
||||
struct NineUnknownParams *pParams,
|
||||
struct NineUnknown *pContainer,
|
||||
struct pipe_resource *pResource,
|
||||
void *user_buffer,
|
||||
uint8_t TextureType,
|
||||
unsigned Level,
|
||||
unsigned Layer,
|
||||
@@ -124,9 +128,6 @@ NineSurface9_ClearDirtyRects( struct NineSurface9 *This )
|
||||
memset(&This->dirty_rects, 0, sizeof(This->dirty_rects));
|
||||
}
|
||||
|
||||
HRESULT
|
||||
NineSurface9_AllocateData( struct NineSurface9 *This );
|
||||
|
||||
HRESULT
|
||||
NineSurface9_UploadSelf( struct NineSurface9 *This );
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user