Compare commits
168 Commits
mesa-11.0.
...
vulkan-pro
Author | SHA1 | Date | |
---|---|---|---|
|
76f17266ec | ||
|
01024ded1e | ||
|
3063913f77 | ||
|
a4ba41638d | ||
|
d2e3638ef9 | ||
|
78027c965a | ||
|
aee73f2942 | ||
|
46968c1140 | ||
|
03b7ec8778 | ||
|
c8bc8d7235 | ||
|
0d19dc302f | ||
|
3eed81a97b | ||
|
b4dee1b636 | ||
|
7b6369eb69 | ||
|
7dc8a3497f | ||
|
379e3382e8 | ||
|
437cb1e3f4 | ||
|
e321596e9f | ||
|
a5a96118ed | ||
|
58e24b4761 | ||
|
c8a61ea4fb | ||
|
21bdb4d8f3 | ||
|
ebca85423c | ||
|
981f46aa95 | ||
|
0eac599001 | ||
|
6941883175 | ||
|
c149d84d45 | ||
|
8d6d0cc17d | ||
|
275c5810ca | ||
|
889a946a45 | ||
|
c676c432f3 | ||
|
64e312d7fa | ||
|
a2ff1e95a4 | ||
|
f2f8c43af9 | ||
|
f3d0a894af | ||
|
8765f1d7dd | ||
|
2581fe931a | ||
|
0516159613 | ||
|
5aaaaebf22 | ||
|
2dbc6a0ad9 | ||
|
b319fd7c14 | ||
|
2ef5a4f830 | ||
|
86c57ebe0e | ||
|
559b8842fa | ||
|
4a6a47ed05 | ||
|
608c7b4a63 | ||
|
a830225adb | ||
|
36f1999a87 | ||
|
52f7487923 | ||
|
2259b11100 | ||
|
0a913a9d85 | ||
|
3e3cb77901 | ||
|
f90c6b1ce0 | ||
|
c44d507752 | ||
|
bcae4640c8 | ||
|
42c7be5877 | ||
|
3c256f572b | ||
|
fee0c5af11 | ||
|
f2e667172a | ||
|
885a9b058c | ||
|
16ad1d2a8d | ||
|
c2c64fd269 | ||
|
b9101b1443 | ||
|
f4280b740d | ||
|
9a759a6ee0 | ||
|
42ee16176d | ||
|
43d5b4db96 | ||
|
a687734135 | ||
|
1a9ceed4ba | ||
|
10ff64fd3d | ||
|
54d2aa4258 | ||
|
97f4efd573 | ||
|
8b1f008e9a | ||
|
cd49b97a8a | ||
|
12b519b457 | ||
|
23c9cd5a96 | ||
|
692578ed13 | ||
|
4143511b15 | ||
|
582ce1ea97 | ||
|
e9fd8e154f | ||
|
8ae37365f3 | ||
|
c4cbaca327 | ||
|
6924ecac77 | ||
|
16e5d8ad38 | ||
|
2c14a6d3b1 | ||
|
189953ee13 | ||
|
df6a5666b6 | ||
|
61df4f0cd3 | ||
|
be6dc87776 | ||
|
a6a6c68955 | ||
|
d15b71b4bd | ||
|
c59ad265df | ||
|
110873ed11 | ||
|
93d97db349 | ||
|
525921ed51 | ||
|
0fc21ecfc0 | ||
|
7b5c92391f | ||
|
a3b617a258 | ||
|
332fb341dd | ||
|
f432ae899f | ||
|
f8b01ae47c | ||
|
e0c2ea0337 | ||
|
ae8d0e7abe | ||
|
c2a766880d | ||
|
73e5adc4b2 | ||
|
48e6404c04 | ||
|
941346a803 | ||
|
c1452983b4 | ||
|
1d2a844e7d | ||
|
26c549e69d | ||
|
8e581747d2 | ||
|
1bec29d04d | ||
|
78856194c1 | ||
|
5f14c417c8 | ||
|
d4d5b430a5 | ||
|
dfacae3a56 | ||
|
c999a58f50 | ||
|
259f7291de | ||
|
cfa056c6a5 | ||
|
ce5e9139aa | ||
|
0db8e87b4a | ||
|
6c33d6bbf9 | ||
|
a23f82053d | ||
|
640c472fd0 | ||
|
c56899f41a | ||
|
8d8b8f5854 | ||
|
0ab29751b6 | ||
|
8b2d0bb844 | ||
|
529acab22a | ||
|
e089ca26e1 | ||
|
8f378d1083 | ||
|
4f2cdd8497 | ||
|
d7971b41ce | ||
|
fc7f2d2364 | ||
|
476eb5e4a1 | ||
|
d356f84d4c | ||
|
58a360c6b8 | ||
|
6e47a34b29 | ||
|
6f5c81f86f | ||
|
6d028749ac | ||
|
211c79515d | ||
|
633cbbc068 | ||
|
940873bf22 | ||
|
f596e4021c | ||
|
788d45cb47 | ||
|
747ddc3cdd | ||
|
13482111d0 | ||
|
f41e108d8b | ||
|
762ae436ea | ||
|
b49371b8ed | ||
|
1c53f89696 | ||
|
9d5944053c | ||
|
c7df141c71 | ||
|
8e0d4ef341 | ||
|
9f00af672b | ||
|
000e225360 | ||
|
afb6c24a20 | ||
|
4e5752e2b7 | ||
|
a83c36b5c0 | ||
|
e18c29b031 | ||
|
a6ad49cbbd | ||
|
45971fd0df | ||
|
abbf05cfc2 | ||
|
3a1ab23480 | ||
|
fb02b4ec48 | ||
|
50932268aa | ||
|
5abbd1cacc | ||
|
a8c5c62359 |
@@ -42,7 +42,6 @@ LOCAL_CFLAGS += \
|
||||
-DANDROID_VERSION=0x0$(MESA_ANDROID_MAJOR_VERSION)0$(MESA_ANDROID_MINOR_VERSION)
|
||||
|
||||
LOCAL_CFLAGS += \
|
||||
-D__STDC_LIMIT_MACROS \
|
||||
-DHAVE___BUILTIN_EXPECT \
|
||||
-DHAVE___BUILTIN_FFS \
|
||||
-DHAVE___BUILTIN_FFSLL \
|
||||
@@ -71,7 +70,7 @@ endif
|
||||
|
||||
ifeq ($(MESA_ENABLE_LLVM),true)
|
||||
LOCAL_CFLAGS += \
|
||||
-DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2 \
|
||||
-DHAVE_LLVM=0x0305 -DLLVM_VERSION_PATCH=2 \
|
||||
-D__STDC_CONSTANT_MACROS \
|
||||
-D__STDC_FORMAT_MACROS \
|
||||
-D__STDC_LIMIT_MACROS
|
||||
|
@@ -1,2 +0,0 @@
|
||||
# The commit base differs greatly between 11.0 and master
|
||||
2832ca95ecce064c7d841a3a374c2179f56161be glsl: fix stream qualifier for blocks with an instance name
|
158
configure.ac
158
configure.ac
@@ -9,6 +9,7 @@ dnl Copyright © 2009-2014 Jon TURNEY
|
||||
dnl Copyright © 2011-2012 Benjamin Franzke
|
||||
dnl Copyright © 2008-2014 David Airlie
|
||||
dnl Copyright © 2009-2013 Brian Paul
|
||||
dnl Copyright © 2003-2007 Keith Packard, Daniel Stone
|
||||
dnl
|
||||
dnl Permission is hereby granted, free of charge, to any person obtaining a
|
||||
dnl copy of this software and associated documentation files (the "Software"),
|
||||
@@ -106,8 +107,6 @@ AC_SYS_LARGEFILE
|
||||
LT_PREREQ([2.2])
|
||||
LT_INIT([disable-static])
|
||||
|
||||
AC_CHECK_PROG(RM, rm, [rm -f])
|
||||
|
||||
AX_PROG_BISON([],
|
||||
AS_IF([test ! -f "$srcdir/src/glsl/glcpp/glcpp-parse.c"],
|
||||
[AC_MSG_ERROR([bison not found - unable to compile glcpp-parse.y])]))
|
||||
@@ -989,6 +988,144 @@ fi
|
||||
|
||||
AC_SUBST([MESA_LLVM])
|
||||
|
||||
# SHA1 hashing
|
||||
AC_ARG_WITH([sha1],
|
||||
[AS_HELP_STRING([--with-sha1=libc|libmd|libnettle|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI],
|
||||
[choose SHA1 implementation])])
|
||||
case "x$with_sha1" in
|
||||
x | xlibc | xlibmd | xlibnettle | xlibgcrypt | xlibcrypto | xlibsha1 | xCommonCrypto | xCryptoAPI)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Illegal value for --with-sha1: $with_sha1])
|
||||
esac
|
||||
|
||||
AC_CHECK_FUNC([SHA1Init], [HAVE_SHA1_IN_LIBC=yes])
|
||||
if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_LIBC" = xyes; then
|
||||
with_sha1=libc
|
||||
fi
|
||||
if test "x$with_sha1" = xlibc && test "x$HAVE_SHA1_IN_LIBC" != xyes; then
|
||||
AC_MSG_ERROR([sha1 in libc requested but not found])
|
||||
fi
|
||||
if test "x$with_sha1" = xlibc; then
|
||||
AC_DEFINE([HAVE_SHA1_IN_LIBC], [1],
|
||||
[Use libc SHA1 functions])
|
||||
SHA1_LIBS=""
|
||||
fi
|
||||
AC_CHECK_FUNC([CC_SHA1_Init], [HAVE_SHA1_IN_COMMONCRYPTO=yes])
|
||||
if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_COMMONCRYPTO" = xyes; then
|
||||
with_sha1=CommonCrypto
|
||||
fi
|
||||
if test "x$with_sha1" = xCommonCrypto && test "x$HAVE_SHA1_IN_COMMONCRYPTO" != xyes; then
|
||||
AC_MSG_ERROR([CommonCrypto requested but not found])
|
||||
fi
|
||||
if test "x$with_sha1" = xCommonCrypto; then
|
||||
AC_DEFINE([HAVE_SHA1_IN_COMMONCRYPTO], [1],
|
||||
[Use CommonCrypto SHA1 functions])
|
||||
SHA1_LIBS=""
|
||||
fi
|
||||
dnl stdcall functions cannot be tested with AC_CHECK_LIB
|
||||
AC_CHECK_HEADER([wincrypt.h], [HAVE_SHA1_IN_CRYPTOAPI=yes], [], [#include <windows.h>])
|
||||
if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_CRYPTOAPI" = xyes; then
|
||||
with_sha1=CryptoAPI
|
||||
fi
|
||||
if test "x$with_sha1" = xCryptoAPI && test "x$HAVE_SHA1_IN_CRYPTOAPI" != xyes; then
|
||||
AC_MSG_ERROR([CryptoAPI requested but not found])
|
||||
fi
|
||||
if test "x$with_sha1" = xCryptoAPI; then
|
||||
AC_DEFINE([HAVE_SHA1_IN_CRYPTOAPI], [1],
|
||||
[Use CryptoAPI SHA1 functions])
|
||||
SHA1_LIBS=""
|
||||
fi
|
||||
AC_CHECK_LIB([md], [SHA1Init], [HAVE_LIBMD=yes])
|
||||
if test "x$with_sha1" = x && test "x$HAVE_LIBMD" = xyes; then
|
||||
with_sha1=libmd
|
||||
fi
|
||||
if test "x$with_sha1" = xlibmd && test "x$HAVE_LIBMD" != xyes; then
|
||||
AC_MSG_ERROR([libmd requested but not found])
|
||||
fi
|
||||
if test "x$with_sha1" = xlibmd; then
|
||||
AC_DEFINE([HAVE_SHA1_IN_LIBMD], [1],
|
||||
[Use libmd SHA1 functions])
|
||||
SHA1_LIBS=-lmd
|
||||
fi
|
||||
PKG_CHECK_MODULES([LIBSHA1], [libsha1], [HAVE_LIBSHA1=yes], [HAVE_LIBSHA1=no])
|
||||
if test "x$with_sha1" = x && test "x$HAVE_LIBSHA1" = xyes; then
|
||||
with_sha1=libsha1
|
||||
fi
|
||||
if test "x$with_sha1" = xlibsha1 && test "x$HAVE_LIBSHA1" != xyes; then
|
||||
AC_MSG_ERROR([libsha1 requested but not found])
|
||||
fi
|
||||
if test "x$with_sha1" = xlibsha1; then
|
||||
AC_DEFINE([HAVE_SHA1_IN_LIBSHA1], [1],
|
||||
[Use libsha1 for SHA1])
|
||||
SHA1_LIBS=-lsha1
|
||||
fi
|
||||
AC_CHECK_LIB([nettle], [nettle_sha1_init], [HAVE_LIBNETTLE=yes])
|
||||
if test "x$with_sha1" = x && test "x$HAVE_LIBNETTLE" = xyes; then
|
||||
with_sha1=libnettle
|
||||
fi
|
||||
if test "x$with_sha1" = xlibnettle && test "x$HAVE_LIBNETTLE" != xyes; then
|
||||
AC_MSG_ERROR([libnettle requested but not found])
|
||||
fi
|
||||
if test "x$with_sha1" = xlibnettle; then
|
||||
AC_DEFINE([HAVE_SHA1_IN_LIBNETTLE], [1],
|
||||
[Use libnettle SHA1 functions])
|
||||
SHA1_LIBS=-lnettle
|
||||
fi
|
||||
AC_CHECK_LIB([gcrypt], [gcry_md_open], [HAVE_LIBGCRYPT=yes])
|
||||
if test "x$with_sha1" = x && test "x$HAVE_LIBGCRYPT" = xyes; then
|
||||
with_sha1=libgcrypt
|
||||
fi
|
||||
if test "x$with_sha1" = xlibgcrypt && test "x$HAVE_LIBGCRYPT" != xyes; then
|
||||
AC_MSG_ERROR([libgcrypt requested but not found])
|
||||
fi
|
||||
if test "x$with_sha1" = xlibgcrypt; then
|
||||
AC_DEFINE([HAVE_SHA1_IN_LIBGCRYPT], [1],
|
||||
[Use libgcrypt SHA1 functions])
|
||||
SHA1_LIBS=-lgcrypt
|
||||
fi
|
||||
# We don't need all of the OpenSSL libraries, just libcrypto
|
||||
AC_CHECK_LIB([crypto], [SHA1_Init], [HAVE_LIBCRYPTO=yes])
|
||||
PKG_CHECK_MODULES([OPENSSL], [openssl], [HAVE_OPENSSL_PKC=yes],
|
||||
[HAVE_OPENSSL_PKC=no])
|
||||
if test "x$HAVE_LIBCRYPTO" = xyes || test "x$HAVE_OPENSSL_PKC" = xyes; then
|
||||
if test "x$with_sha1" = x; then
|
||||
with_sha1=libcrypto
|
||||
fi
|
||||
else
|
||||
if test "x$with_sha1" = xlibcrypto; then
|
||||
AC_MSG_ERROR([OpenSSL libcrypto requested but not found])
|
||||
fi
|
||||
fi
|
||||
if test "x$with_sha1" = xlibcrypto; then
|
||||
if test "x$HAVE_LIBCRYPTO" = xyes; then
|
||||
SHA1_LIBS=-lcrypto
|
||||
else
|
||||
SHA1_LIBS="$OPENSSL_LIBS"
|
||||
SHA1_CFLAGS="$OPENSSL_CFLAGS"
|
||||
fi
|
||||
fi
|
||||
AC_MSG_CHECKING([for SHA1 implementation])
|
||||
AC_MSG_RESULT([$with_sha1])
|
||||
AC_SUBST(SHA1_LIBS)
|
||||
AC_SUBST(SHA1_CFLAGS)
|
||||
|
||||
# Allow user to configure out the shader-cache feature
|
||||
AC_ARG_ENABLE([shader-cache],
|
||||
AS_HELP_STRING([--disable-shader-cache], [Disable binary shader cache]),
|
||||
[enable_shader_cache="$enableval"],
|
||||
[if test "x$with_sha1" != "x"; then
|
||||
enable_shader_cache=yes
|
||||
else
|
||||
enable_shader_cache=no
|
||||
fi])
|
||||
if test "x$with_sha1" = "x"; then
|
||||
if test "x$enable_shader_cache" = "xyes"; then
|
||||
AC_MSG_ERROR([Cannot enable shader cache (no SHA-1 implementation found)])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL([ENABLE_SHADER_CACHE], [test x$enable_shader_cache = xyes])
|
||||
|
||||
case "$host_os" in
|
||||
linux*)
|
||||
need_pci_id=yes ;;
|
||||
@@ -1152,16 +1289,6 @@ AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
|
||||
AS_IF([test "x$GLX_USE_TLS" = xyes -a "x$ax_pthread_ok" = xyes],
|
||||
[DEFINES="${DEFINES} -DGLX_USE_TLS"])
|
||||
|
||||
dnl Read-only text section on x86 hardened platforms
|
||||
AC_ARG_ENABLE([glx-read-only-text],
|
||||
[AS_HELP_STRING([--enable-glx-read-only-text],
|
||||
[Disable writable .text section on x86 (decreases performance) @<:@default=disabled@:>@])],
|
||||
[enable_glx_read_only_text="$enableval"],
|
||||
[enable_glx_read_only_text=no])
|
||||
if test "x$enable_glx_read_only_text" = xyes; then
|
||||
DEFINES="$DEFINES -DGLX_X86_READONLY_TEXT"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl More DRI setup
|
||||
dnl
|
||||
@@ -2190,6 +2317,7 @@ AC_CONFIG_FILES([Makefile
|
||||
src/gallium/auxiliary/Makefile
|
||||
src/gallium/auxiliary/pipe-loader/Makefile
|
||||
src/gallium/drivers/freedreno/Makefile
|
||||
src/gallium/drivers/ddebug/Makefile
|
||||
src/gallium/drivers/i915/Makefile
|
||||
src/gallium/drivers/ilo/Makefile
|
||||
src/gallium/drivers/llvmpipe/Makefile
|
||||
@@ -2357,6 +2485,12 @@ else
|
||||
echo " Gallium: no"
|
||||
fi
|
||||
|
||||
dnl Shader cache
|
||||
echo ""
|
||||
echo " Shader cache: $enable_shader_cache"
|
||||
if test "x$enable_shader_cache" = "xyes"; then
|
||||
echo " With SHA1 from: $with_sha1"
|
||||
fi
|
||||
|
||||
dnl Libraries
|
||||
echo ""
|
||||
|
@@ -196,7 +196,7 @@ GL 4.5, GLSL 4.50:
|
||||
GL_ARB_get_texture_sub_image DONE (all drivers)
|
||||
GL_ARB_shader_texture_image_samples not started
|
||||
GL_ARB_texture_barrier DONE (nv50, nvc0, r600, radeonsi)
|
||||
GL_KHR_context_flush_control DONE (all - but needs GLX/EXT extension to be useful)
|
||||
GL_KHR_context_flush_control DONE (all - but needs GLX/EGL extension to be useful)
|
||||
GL_KHR_robust_buffer_access_behavior not started
|
||||
GL_KHR_robustness 90% done (the ARB variant)
|
||||
GL_EXT_shader_integer_mix DONE (all drivers that support GLSL)
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 11.0.0 Release Notes / September 12, 2015</h1>
|
||||
<h1>Mesa 11.0.0 Release Notes / TBD</h1>
|
||||
|
||||
<p>
|
||||
Mesa 11.0.0 is a new development release.
|
||||
@@ -33,8 +33,7 @@ because compatibility contexts are not supported.
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
7d7e4ddffa3b162506efa01e2cc41e329caa4995336b92e5cc21f2e1fb36c1b3 mesa-11.0.0.tar.gz
|
||||
e095a3eb2eca9dfde7efca8946527c8ae20a0cc938a8c78debc7f158ad44af32 mesa-11.0.0.tar.xz
|
||||
TBD.
|
||||
</pre>
|
||||
|
||||
|
||||
@@ -84,175 +83,13 @@ Note: some of the new features are only available with certain drivers.
|
||||
<li>EGL 1.5 on r600, radeonsi, nv50, nvc0</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=51658">Bug 51658</a> - r200 (& possibly radeon) DRI fixes for gnome shell on Mesa 8.0.3</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=65525">Bug 65525</a> - [llvmpipe] lp_scene.h:210:lp_scene_alloc: Assertion `size <= (64 * 1024)' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66346">Bug 66346</a> - shader_query.cpp:49: error: invalid conversion from 'void*' to 'GLuint'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=73512">Bug 73512</a> - [clover] mesa.icd. should contain full path</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=73528">Bug 73528</a> - Deferred lighting in Second Life causes system hiccups and screen flickering</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74329">Bug 74329</a> - Please expose OES_texture_float and OES_texture_half_float on the ES3 context</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80500">Bug 80500</a> - Flickering shadows in unreleased title trace</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82186">Bug 82186</a> - [r600g] BARTS GPU lockup with minecraft shaders</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84225">Bug 84225</a> - Allow constant-index-expression sampler array indexing with GLSL-ES < 300</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84677">Bug 84677</a> - Triangle disappears with glPolygonMode GL_LINE</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85252">Bug 85252</a> - Segfault in compiler while processing ternary operator with void arguments</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89131">Bug 89131</a> - [Bisected] Graphical corruption in Weston, shows old framebuffer pieces</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90000">Bug 90000</a> - [i965 Bisected NIR] Piglit/gglean_fragprog1-z-write_test fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90073">Bug 90073</a> - Leaks in xcb_dri3_open_reply_fds() and get_render_node_from_id_path_tag</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90249">Bug 90249</a> - Fails to build egl_dri2 on osx</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90310">Bug 90310</a> - Fails to build gallium_dri.so at linking stage with clang because of multiple redefinitions</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90347">Bug 90347</a> - [NVE0+] Failure to insert texbar under some circumstances (causing bad colors in Terasology)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90466">Bug 90466</a> - arm: linker error ndefined reference to `nir_metadata_preserve'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90520">Bug 90520</a> - Register spilling clobbers registers used elsewhere in the shader</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90537">Bug 90537</a> - radeonsi bo/va conflict on RADEON_GEM_VA (rscreen->ws->buffer_from_handle returns NULL)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90547">Bug 90547</a> - [BDW/BSW/SKL Bisected]Piglit/glean@vertprog1-rsq_test_2_(reciprocal_square_root_of_negative_value) fais</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90580">Bug 90580</a> - [HSW bisected] integer multiplication bug</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90600">Bug 90600</a> - IOError: [Errno 2] No such file or directory: 'gl_API.xml'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90621">Bug 90621</a> - Mesa fail to build from git</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90629">Bug 90629</a> - [i965] SIMD16 dual_source_blend assertion `src[i].file != GRF || src[i].width == dst.width' failed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90691">Bug 90691</a> - [BSW]Piglit/spec/nv_conditional_render/dlist fails intermittently</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90728">Bug 90728</a> - dvd playback with vlc and vdpau causes segmentation fault</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90734">Bug 90734</a> - glBufferSubData is corrupting data when buffer is > 32k</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90748">Bug 90748</a> - [BDW Bisected]dEQP-GLES3.functional.fbo.completeness.renderable.texture.depth.rg_half_float_oes fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90749">Bug 90749</a> - [BDW Bisected]dEQP-GLES3.functional.rasterization.fbo.rbo_multisample_max.primitives.lines_wide fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90751">Bug 90751</a> - [BDW Bisected]dEQP-GLES3.functional.fbo.completeness.renderable.texture.stencil.stencil_index8 fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90797">Bug 90797</a> - [ALL bisected] Mesa change cause performance case manhattan fail.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90817">Bug 90817</a> - swrast fails to load with certain remote X servers</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90830">Bug 90830</a> - [bsw bisected regression] GPU hang for spec.arb_gpu_shader5.execution.sampler_array_indexing.vs-nonzero-base</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90839">Bug 90839</a> - [10.5.5/10.6 regression, bisected] PBO glDrawPixels no longer using blit fastpath</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90873">Bug 90873</a> - Kernel hang, TearFree On, Mate desktop environment</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90887">Bug 90887</a> - PhiMovesPass in register allocator broken</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90895">Bug 90895</a> - [IVB/HSW/BDW/BSW Bisected] GLB2.7 Egypt, GfxBench3.0 T-Rex & ALU and many SynMark cases performance reduced by 10-23%</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90902">Bug 90902</a> - [bsw][regression] dEQP: "Found invalid pixel values"</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90903">Bug 90903</a> - egl_dri2.c:dri2_load fails to load libglapi on osx</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90904">Bug 90904</a> - OSX: EXC_BAD_ACCESS when using translate_sse + gallium + softpipe/llvmpipe</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90905">Bug 90905</a> - mesa: Finish subdir-objects transition</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90925">Bug 90925</a> - "high fidelity": Segfault in _mesa_program_resource_find_name</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91022">Bug 91022</a> - [g45 g965 bisected] assertions generated from textureGrad cube samplers fix</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91047">Bug 91047</a> - [SNB Bisected] Messed up Fog in Super Smash Bros. Melee in Dolphin</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91056">Bug 91056</a> - The Bard's Tale (2005, native) has rendering issues</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91077">Bug 91077</a> - dri2_glx.c:1186: undefined reference to `loader_open_device'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91099">Bug 91099</a> - [llvmpipe] piglit glsl-max-varyings >max_varying_components regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91101">Bug 91101</a> - [softpipe] piglit glsl-1.50@execution@geometry@max-input-components regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91117">Bug 91117</a> - Nimbus (running in wine) has rendering issues, objects are semi-transparent</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91124">Bug 91124</a> - Civilization V (in Wine) has rendering issues: text missing, menu bar corrupted</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91173">Bug 91173</a> - Oddworld: Stranger's Wrath HD: disfigured models in wrong colors</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91193">Bug 91193</a> - [290x] Dota2 reborn ingame rendering breaks with git-af4b9c7</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91222">Bug 91222</a> - lp_test_format regression on CentOS 7</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91226">Bug 91226</a> - Crash in glLinkProgram (NEW)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91231">Bug 91231</a> - [NV92] Psychonauts (native) segfaults on start when DRI3 enabled</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91254">Bug 91254</a> - (regresion) video using VA-API on Intel slow and freeze system with mesa 10.6 or 10.6.1</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91290">Bug 91290</a> - SIGSEGV glcpp/glcpp-parse.y:1077</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91292">Bug 91292</a> - [BDW+] glVertexAttribDivisor not working in combination with glPolygonMode</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91337">Bug 91337</a> - OSMesaGetProcAdress("OSMesaPixelStore") returns nil</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91418">Bug 91418</a> - Visual Studio 2015 vsnprintf build error</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91425">Bug 91425</a> - [regression, bisected] Piglit spec/ext_packed_float/ getteximage-invalid-format-for-packed-type fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91441">Bug 91441</a> - make check DispatchSanity_test.GL30 regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91444">Bug 91444</a> - regression bisected radeonsi: don't change pipe_resource in resource_copy_region</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91461">Bug 91461</a> - gl_TessLevel* writes have no effect for all but the last TCS invocation</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91513">Bug 91513</a> - [IVB/HSW/BDW/SKL Bisected] Lightsmark performance reduced by 7%-10%</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91526">Bug 91526</a> - World of Warcraft (on Wine) has UI corruption with nouveau</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91544">Bug 91544</a> - [i965, regression, bisected] regression of several tests in 93977d3a151675946c03e</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91551">Bug 91551</a> - DXTn compressed normal maps produce severe artifacts on all NV5x and NVDx chipsets</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91570">Bug 91570</a> - Upgrading mesa to 10.6 causes segfault in OpenGL applications with GeForce4 MX 440 / AGP 8X</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91591">Bug 91591</a> - rounding.h:102:2: error: #error "Unsupported or undefined LONG_BIT"</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91610">Bug 91610</a> - [BSW] GPU hang for spec.shaders.point-vertex-id gl_instanceid divisor</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91673">Bug 91673</a> - Segfault when calling glTexSubImage2D on storage texture to bound FBO</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91726">Bug 91726</a> - R600 asserts in tgsi_cmp/make_src_for_op3</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91847">Bug 91847</a> - glGenerateTextureMipmap not working (no errors) unless glActiveTexture(GL_TEXTURE1) is called before</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91857">Bug 91857</a> - Mesa 10.6.3 linker is slow</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91881">Bug 91881</a> - regression: GPU lockups since mesa-11.0.0_rc1 on RV620 (r600) driver</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91890">Bug 91890</a> - [nve7] witcher2: blurry image & DATA_ERRORs (class 0xa097 mthd 0x2380/0x238c)</li>
|
||||
|
||||
</ul>
|
||||
|
||||
TBD.
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<li>Removed the EGL loader from the Linux SCons build.</li>
|
||||
TBD.
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
@@ -1,134 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 11.0.1 Release Notes / September 26, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 11.0.1 is a bug fix release which fixes bugs found since the 11.0.0 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 11.0.1 implements the OpenGL 4.1 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 4.1. OpenGL
|
||||
4.1 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
6dab262877e12c0546a0e2970c6835a0f217e6d4026ccecb3cd5dd733d1ce867 mesa-11.0.1.tar.gz
|
||||
43d0dfcd1f1e36f07f8228cd76d90175d3fc74c1ed25d7071794a100a98ef2a6 mesa-11.0.1.tar.xz
|
||||
</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=38109">Bug 38109</a> - i915 driver crashes if too few vertices are submitted (Mesa 7.10.2)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91114">Bug 91114</a> - ES3-CTS.gtf.GL3Tests.shadow.shadow_execution_vert fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91716">Bug 91716</a> - [bisected] piglit.shaders.glsl-vs-int-attrib regresses on 32 bit BYT, HSW, IVB, SNB</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91719">Bug 91719</a> - [SNB,HSW,BYT] dEQP regressions associated with using NIR for vertex shaders</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92009">Bug 92009</a> - ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels fails</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Antia Puentes (2):</p>
|
||||
<ul>
|
||||
<li>i965/vec4: Fix saturation errors when coalescing registers</li>
|
||||
<li>i965/vec4_nir: Load constants as integers</li>
|
||||
</ul>
|
||||
|
||||
<p>Anuj Phogat (1):</p>
|
||||
<ul>
|
||||
<li>meta: Abort meta pbo path if TexSubImage need signed unsigned conversion</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (2):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 11.0.0</li>
|
||||
<li>Update version to 11.0.1</li>
|
||||
</ul>
|
||||
|
||||
<p>Iago Toral Quiroga (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE for default framebuffer.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (5):</p>
|
||||
<ul>
|
||||
<li>t_dd_dmatmp: Make "count" actually be the count</li>
|
||||
<li>t_dd_dmatmp: Clean up improper code formatting from previous patch</li>
|
||||
<li>t_dd_dmatmp: Use '& 3' instead of '% 4' everywhere</li>
|
||||
<li>t_dd_dmatmp: Pull out common 'count -= count & 3' code</li>
|
||||
<li>t_dd_dmatmp: Use addition instead of subtraction in loop bounds</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (6):</p>
|
||||
<ul>
|
||||
<li>st/mesa: avoid integer overflows with buffers >= 512MB</li>
|
||||
<li>nv50, nvc0: fix max texture buffer size to 128M elements</li>
|
||||
<li>freedreno/a3xx: fix blending of L8 format</li>
|
||||
<li>nv50,nvc0: detect underlying resource changes and update tic</li>
|
||||
<li>nv50,nvc0: flush texture cache in presence of coherent bufs</li>
|
||||
<li>radeonsi: load fmask ptr relative to the resources array</li>
|
||||
</ul>
|
||||
|
||||
<p>Jason Ekstrand (2):</p>
|
||||
<ul>
|
||||
<li>nir: Fix a bunch of ralloc parenting errors</li>
|
||||
<li>i965/vec4: Don't reswizzle hardware registers</li>
|
||||
</ul>
|
||||
|
||||
<p>Jeremy Huddleston (1):</p>
|
||||
<ul>
|
||||
<li>configure.ac: Add support to enable read-only text segment on x86.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ray Strode (1):</p>
|
||||
<ul>
|
||||
<li>gbm: convert gbm bo format to fourcc format on dma-buf import</li>
|
||||
</ul>
|
||||
|
||||
<p>Tapani Pälli (2):</p>
|
||||
<ul>
|
||||
<li>mesa: fix errors when reading depth with glReadPixels</li>
|
||||
<li>i965: fix textureGrad for cubemaps</li>
|
||||
</ul>
|
||||
|
||||
<p>Ulrich Weigand (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix texture compression on big-endian systems</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,85 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 11.0.2 Release Notes / September 28, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 11.0.2 is a bug fix release which fixes bugs found since the 11.0.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 11.0.2 implements the OpenGL 4.1 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 4.1. OpenGL
|
||||
4.1 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
45170773500d6ae2f9eb93fc85efee69f7c97084411ada4eddf92f78bca56d20 mesa-11.0.2.tar.gz
|
||||
fce11fb27eb87adf1e620a76455d635c6136dfa49ae58c53b34ef8d0c7b7eae4 mesa-11.0.2.tar.xz
|
||||
</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=91582">Bug 91582</a> - [bisected] Regression in DEQP gles2.functional.negative_api.texture.texsubimage2d_neg_offset</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91970">Bug 91970</a> - [BSW regression] dEQP-GLES3.functional.shaders.precision.int.highp_mul_vertex</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92095">Bug 92095</a> - [Regression, bisected] arb_shader_atomic_counters.compiler.builtins.frag</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Eduardo Lima Mitev (3):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix order of format+type and internal format checks for glTexImageXD ops</li>
|
||||
<li>mesa: Move _mesa_base_tex_format() from teximage to glformats files</li>
|
||||
<li>mesa: Use the effective internal format instead for validation</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (2):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 11.0.1</li>
|
||||
<li>Update version to 11.0.2</li>
|
||||
</ul>
|
||||
|
||||
<p>Kristian Høgsberg Kristensen (1):</p>
|
||||
<ul>
|
||||
<li>i965: Respect stride and subreg_offset for ATTR registers</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (1):</p>
|
||||
<ul>
|
||||
<li>glsl: Expose gl_MaxTess{Control,Evaluation}AtomicCounters.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,185 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 11.0.3 Release Notes / October 10, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 11.0.3 is a bug fix release which fixes bugs found since the 11.0.2 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 11.0.3 implements the OpenGL 4.1 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 4.1. OpenGL
|
||||
4.1 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
c2210e3daecc10ed9fdcea500327652ed6effc2f47c4b9cee63fb08f560d7117 mesa-11.0.3.tar.gz
|
||||
ab2992eece21adc23c398720ef8c6933cb69ea42e1b2611dc09d031e17e033d6 mesa-11.0.3.tar.xz
|
||||
</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=55552">Bug 55552</a> - Compile errors with --enable-mangling</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71789">Bug 71789</a> - [r300g] Visuals not found in (default) depth = 24</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91044">Bug 91044</a> - piglit spec/egl_khr_create_context/valid debug flag gles* fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91342">Bug 91342</a> - Very dark textures on some objects in indoors environments in Postal 2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91596">Bug 91596</a> - EGL_KHR_gl_colorspace (v2) causes problem with Android-x86 GUI</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91718">Bug 91718</a> - piglit.spec.arb_shader_image_load_store.invalid causes intermittent GPU HANG</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92072">Bug 92072</a> - Wine breakage since d082c5324 (st/mesa: don't call st_validate_state in BlitFramebuffer)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92265">Bug 92265</a> - Black windows in weston after update mesa to 11.0.2-1</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Brian Paul (1):</p>
|
||||
<ul>
|
||||
<li>st/mesa: try PIPE_BIND_RENDER_TARGET when choosing float texture formats</li>
|
||||
</ul>
|
||||
|
||||
<p>Daniel Scharrer (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Add abs input modifier to base for POW in ffvertex_prog</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (3):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 11.0.2</li>
|
||||
<li>Revert "nouveau: make sure there's always room to emit a fence"</li>
|
||||
<li>Update version to 11.0.3</li>
|
||||
</ul>
|
||||
|
||||
<p>Francisco Jerez (1):</p>
|
||||
<ul>
|
||||
<li>i965/fs: Fix hang on IVB and VLV with image format mismatch.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (1):</p>
|
||||
<ul>
|
||||
<li>meta: Handle array textures in scaled MSAA blits</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (6):</p>
|
||||
<ul>
|
||||
<li>nouveau: be more careful about freeing temporary transfer buffers</li>
|
||||
<li>nouveau: delay deleting buffer with unflushed fence</li>
|
||||
<li>nouveau: wait to unref the transfer's bo until it's no longer used</li>
|
||||
<li>nv30: pretend to have packed texture/surface formats</li>
|
||||
<li>nv30: always go through translate module on big-endian</li>
|
||||
<li>nouveau: make sure there's always room to emit a fence</li>
|
||||
</ul>
|
||||
|
||||
<p>Jason Ekstrand (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Correctly handle GL_BGRA_EXT in ES3 format_and_type checks</li>
|
||||
</ul>
|
||||
|
||||
<p>Kyle Brenneman (3):</p>
|
||||
<ul>
|
||||
<li>glx: Fix build errors with --enable-mangling (v2)</li>
|
||||
<li>mapi: Make _glapi_get_stub work with "gl" or "mgl" prefix.</li>
|
||||
<li>glx: Don't hard-code the name "libGL.so.1" in driOpenDriver (v3)</li>
|
||||
</ul>
|
||||
|
||||
<p>Leo Liu (1):</p>
|
||||
<ul>
|
||||
<li>radeon/vce: fix vui time_scale zero error</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (21):</p>
|
||||
<ul>
|
||||
<li>st/mesa: fix front buffer regression after dropping st_validate_state in Blit</li>
|
||||
<li>radeonsi: handle index buffer alloc failures</li>
|
||||
<li>radeonsi: handle constant buffer alloc failures</li>
|
||||
<li>gallium/radeon: handle buffer_map staging buffer failures better</li>
|
||||
<li>gallium/radeon: handle buffer alloc failures in r600_draw_rectangle</li>
|
||||
<li>gallium/radeon: add a fail path for depth MSAA texture readback</li>
|
||||
<li>radeonsi: report alloc failure from si_shader_binary_read</li>
|
||||
<li>radeonsi: add malloc fail paths to si_create_shader_state</li>
|
||||
<li>radeonsi: skip drawing if the tess factor ring allocation fails</li>
|
||||
<li>radeonsi: skip drawing if GS ring allocations fail</li>
|
||||
<li>radeonsi: handle shader precompile failures</li>
|
||||
<li>radeonsi: handle fixed-func TCS shader create failure</li>
|
||||
<li>radeonsi: skip drawing if VS, TCS, TES, GS fail to compile or upload</li>
|
||||
<li>radeonsi: skip drawing if PS fails to compile or upload</li>
|
||||
<li>radeonsi: skip drawing if updating the scratch buffer fails</li>
|
||||
<li>radeonsi: don't forget to update scratch relocations for LS, HS, ES shaders</li>
|
||||
<li>radeonsi: handle dummy constant buffer allocation failure</li>
|
||||
<li>gallium/u_blitter: handle allocation failures</li>
|
||||
<li>radeonsi: add scratch buffer to the buffer list when it's re-allocated</li>
|
||||
<li>st/dri: don't use _ctx in client_wait_sync</li>
|
||||
<li>egl/dri2: don't require a context for ClientWaitSync (v2)</li>
|
||||
</ul>
|
||||
|
||||
<p>Matthew Waters (1):</p>
|
||||
<ul>
|
||||
<li>egl: rework handling EGL_CONTEXT_FLAGS</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (1):</p>
|
||||
<ul>
|
||||
<li>st/dri: Use packed RGB formats</li>
|
||||
</ul>
|
||||
|
||||
<p>Roland Scheidegger (1):</p>
|
||||
<ul>
|
||||
<li>mesa: fix mipmap generation for immutable, compressed textures</li>
|
||||
</ul>
|
||||
|
||||
<p>Tom Stellard (3):</p>
|
||||
<ul>
|
||||
<li>gallium/radeon: Use call_once() when initailizing LLVM targets</li>
|
||||
<li>gallivm: Allow drivers and state trackers to initialize gallivm LLVM targets v2</li>
|
||||
<li>radeon/llvm: Initialize gallivm targets when initializing the AMDGPU target v2</li>
|
||||
</ul>
|
||||
|
||||
<p>Varad Gautam (1):</p>
|
||||
<ul>
|
||||
<li>egl: restore surface type before linking config to its display</li>
|
||||
</ul>
|
||||
|
||||
<p>Ville Syrjälä (3):</p>
|
||||
<ul>
|
||||
<li>i830: Fix collision between I830_UPLOAD_RASTER_RULES and I830_UPLOAD_TEX(0)</li>
|
||||
<li>i915: Fix texcoord vs. varying collision in fragment programs</li>
|
||||
<li>i915: Remember to call intel_prepare_render() before blitting</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,168 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 11.0.4 Release Notes / October 24, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 11.0.4 is a bug fix release which fixes bugs found since the 11.0.3 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 11.0.4 implements the OpenGL 4.1 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 4.1. OpenGL
|
||||
4.1 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
ed412ca6a46d1bd055120e5c12806c15419ae8c4dd6d3f6ea20a83091d5c78bf mesa-11.0.4.tar.gz
|
||||
40201bf7fc6fa12a6d9edfe870b41eb4dd6669154e3c42c48a96f70805f5483d mesa-11.0.4.tar.xz
|
||||
</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=86281">Bug 86281</a> - brw_meta_fast_clear (brw=brw@entry=0x7fffd4097a08, fb=fb@entry=0x7fffd40fa900, buffers=buffers@entry=2, partial_clear=partial_clear@entry=false)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86720">Bug 86720</a> - [radeon] Europa Universalis 4 freezing during game start (10.3.3+, still broken on 11.0.2)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91788">Bug 91788</a> - [HSW Regression] Synmark2_v6 Multithread performance case FPS reduced by 36%</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92304">Bug 92304</a> - [cts] cts.shaders.negative conformance tests fail</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Alejandro Piñeiro (2):</p>
|
||||
<ul>
|
||||
<li>i965/vec4: check writemask when bailing out at register coalesce</li>
|
||||
<li>i965/vec4: fill src_reg type using the constructor type parameter</li>
|
||||
</ul>
|
||||
|
||||
<p>Brian Paul (2):</p>
|
||||
<ul>
|
||||
<li>vbo: fix incorrect switch statement in init_mat_currval()</li>
|
||||
<li>mesa: fix incorrect opcode in save_BlendFunci()</li>
|
||||
</ul>
|
||||
|
||||
<p>Chih-Wei Huang (3):</p>
|
||||
<ul>
|
||||
<li>mesa: android: Fix the incorrect path of sse_minmax.c</li>
|
||||
<li>nv50/ir: use C++11 standard std::unordered_map if possible</li>
|
||||
<li>nv30: include the header of ffs prototype</li>
|
||||
</ul>
|
||||
|
||||
<p>Chris Wilson (1):</p>
|
||||
<ul>
|
||||
<li>i965: Remove early release of DRI2 miptree</li>
|
||||
</ul>
|
||||
|
||||
<p>Dave Airlie (1):</p>
|
||||
<ul>
|
||||
<li>mesa/uniforms: fix get_uniform for doubles (v2)</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (1):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 11.0.3</li>
|
||||
</ul>
|
||||
|
||||
<p>Francisco Jerez (5):</p>
|
||||
<ul>
|
||||
<li>i965: Don't tell the hardware about our UAV access.</li>
|
||||
<li>mesa: Expose function to calculate whether a shader image unit is valid.</li>
|
||||
<li>mesa: Skip redundant texture completeness checking during image validation.</li>
|
||||
<li>i965: Use _mesa_is_image_unit_valid() instead of gl_image_unit::_Valid.</li>
|
||||
<li>mesa: Get rid of texture-dependent image unit derived state.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (8):</p>
|
||||
<ul>
|
||||
<li>glsl: Allow built-in functions as constant expressions in OpenGL ES 1.00</li>
|
||||
<li>ff_fragment_shader: Use binding to set the sampler unit</li>
|
||||
<li>glsl/linker: Use constant_initializer instead of constant_value to initialize uniforms</li>
|
||||
<li>glsl: Use constant_initializer instead of constant_value to determine whether to keep an unused uniform</li>
|
||||
<li>glsl: Only set ir_variable::constant_value for const-decorated variables</li>
|
||||
<li>glsl: Restrict initializers for global variables to constant expression in ES</li>
|
||||
<li>glsl: Add method to determine whether an expression contains the sequence operator</li>
|
||||
<li>glsl: In later GLSL versions, sequence operator is cannot be a constant expression</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (1):</p>
|
||||
<ul>
|
||||
<li>nouveau: make sure there's always room to emit a fence</li>
|
||||
</ul>
|
||||
|
||||
<p>Indrajit Das (1):</p>
|
||||
<ul>
|
||||
<li>st/va: Used correct parameter to derive the value of the "h" variable in vlVaCreateImage</li>
|
||||
</ul>
|
||||
|
||||
<p>Jonathan Gray (1):</p>
|
||||
<ul>
|
||||
<li>configure.ac: ensure RM is set</li>
|
||||
</ul>
|
||||
|
||||
<p>Krzysztof Sobiecki (1):</p>
|
||||
<ul>
|
||||
<li>st/fbo: use pipe_surface_release instead of pipe_surface_reference</li>
|
||||
</ul>
|
||||
|
||||
<p>Leo Liu (1):</p>
|
||||
<ul>
|
||||
<li>st/omx/dec/h264: fix field picture type 0 poc disorder</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (3):</p>
|
||||
<ul>
|
||||
<li>st/mesa: fix clip state dependencies</li>
|
||||
<li>radeonsi: fix a GS copy shader leak</li>
|
||||
<li>gallium: add PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT</li>
|
||||
</ul>
|
||||
|
||||
<p>Nicolai Hähnle (1):</p>
|
||||
<ul>
|
||||
<li>u_vbuf: fix vb slot assignment for translated buffers</li>
|
||||
</ul>
|
||||
|
||||
<p>Rob Clark (1):</p>
|
||||
<ul>
|
||||
<li>freedreno/a3xx: cache-flush is needed after MEM_WRITE</li>
|
||||
</ul>
|
||||
|
||||
<p>Tapani Pälli (3):</p>
|
||||
<ul>
|
||||
<li>mesa: add GL_UNSIGNED_INT_24_8 to _mesa_pack_depth_span</li>
|
||||
<li>mesa: Set api prefix to version string when overriding version</li>
|
||||
<li>mesa: fix ARRAY_SIZE query for GetProgramResourceiv</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,173 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 11.0.5 Release Notes / November 11, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 11.0.5 is a bug fix release which fixes bugs found since the 11.0.4 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 11.0.5 implements the OpenGL 4.1 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 4.1. OpenGL
|
||||
4.1 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
TBD
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91993">Bug 91993</a> - Graphical glitch in Astromenace (open-source game).</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92214">Bug 92214</a> - Flightgear crashes during splashboot with R600 driver, LLVM 3.7.0 and mesa 11.0.2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92437">Bug 92437</a> - osmesa: Expose GL entry points for Windows build, via .def file</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92476">Bug 92476</a> - [cts] ES2-CTS.gtf.GL2ExtensionTests.egl_image.egl_image fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92623">Bug 92623</a> - Differences in prog_data ignored when caching fragment programs (causes hangs)</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Alex Deucher (1):</p>
|
||||
<ul>
|
||||
<li>radeon/uvd: don't expose HEVC on old UVD hw (v3)</li>
|
||||
</ul>
|
||||
|
||||
<p>Ben Widawsky (1):</p>
|
||||
<ul>
|
||||
<li>i965/skl: Add GT4 PCI IDs</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (4):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 11.0.4</li>
|
||||
<li>cherry-ignore: ignore a possible wrong nomination</li>
|
||||
<li>Revert "mesa/glformats: Undo code changes from _mesa_base_tex_format() move"</li>
|
||||
<li>Update version to 11.0.5</li>
|
||||
</ul>
|
||||
|
||||
<p>Emmanuel Gil Peyrot (1):</p>
|
||||
<ul>
|
||||
<li>gbm.h: Add a missing stddef.h include for size_t.</li>
|
||||
</ul>
|
||||
|
||||
<p>Eric Anholt (1):</p>
|
||||
<ul>
|
||||
<li>vc4: When the create ioctl fails, free our cache and try again.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (1):</p>
|
||||
<ul>
|
||||
<li>i965: Fix is-renderable check in intel_image_target_renderbuffer_storage</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (3):</p>
|
||||
<ul>
|
||||
<li>nvc0: respect edgeflag attribute width</li>
|
||||
<li>nouveau: set MaxDrawBuffers to the same value as MaxColorAttachments</li>
|
||||
<li>nouveau: relax fence emit space assert</li>
|
||||
</ul>
|
||||
|
||||
<p>Ivan Kalvachev (1):</p>
|
||||
<ul>
|
||||
<li>r600g: Fix special negative immediate constants when using ABS modifier.</li>
|
||||
</ul>
|
||||
|
||||
<p>Jason Ekstrand (2):</p>
|
||||
<ul>
|
||||
<li>nir/lower_vec_to_movs: Pass the shader around directly</li>
|
||||
<li>nir: Report progress from lower_vec_to_movs().</li>
|
||||
</ul>
|
||||
|
||||
<p>Jose Fonseca (2):</p>
|
||||
<ul>
|
||||
<li>gallivm: Translate all util_cpu_caps bits to LLVM attributes.</li>
|
||||
<li>gallivm: Explicitly disable unsupported CPU features.</li>
|
||||
</ul>
|
||||
|
||||
<p>Julien Isorce (4):</p>
|
||||
<ul>
|
||||
<li>st/va: pass picture desc to begin and decode</li>
|
||||
<li>nvc0: fix crash when nv50_miptree_from_handle fails</li>
|
||||
<li>st/va: do not destroy old buffer when new one failed</li>
|
||||
<li>st/va: add more errors checks in vlVaBufferSetNumElements and vlVaMapBuffer</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (6):</p>
|
||||
<ul>
|
||||
<li>i965: Fix missing BRW_NEW_*_PROG_DATA flagging caused by cache reuse.</li>
|
||||
<li>nir: Report progress from nir_split_var_copies().</li>
|
||||
<li>nir: Properly invalidate metadata in nir_split_var_copies().</li>
|
||||
<li>nir: Properly invalidate metadata in nir_opt_copy_prop().</li>
|
||||
<li>nir: Properly invalidate metadata in nir_lower_vec_to_movs().</li>
|
||||
<li>nir: Properly invalidate metadata in nir_opt_remove_phis().</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (1):</p>
|
||||
<ul>
|
||||
<li>radeonsi: add register definitions for Stoney</li>
|
||||
</ul>
|
||||
|
||||
<p>Nanley Chery (1):</p>
|
||||
<ul>
|
||||
<li>mesa/glformats: Undo code changes from _mesa_base_tex_format() move</li>
|
||||
</ul>
|
||||
|
||||
<p>Nicolai Hähnle (1):</p>
|
||||
<ul>
|
||||
<li>st/mesa: fix mipmap generation for immutable textures with incomplete pyramids</li>
|
||||
</ul>
|
||||
|
||||
<p>Nigel Stewart (1):</p>
|
||||
<ul>
|
||||
<li>osmesa: Expose GL entry points for Windows build via DEF file.</li>
|
||||
</ul>
|
||||
|
||||
<p>Roland Scheidegger (1):</p>
|
||||
<ul>
|
||||
<li>gallivm: disable f16c when not using AVX</li>
|
||||
</ul>
|
||||
|
||||
<p>Samuel Li (2):</p>
|
||||
<ul>
|
||||
<li>radeonsi: add support for Stoney asics (v3)</li>
|
||||
<li>radeonsi: add Stoney pci ids</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
60
docs/relnotes/11.1.0.html
Normal file
60
docs/relnotes/11.1.0.html
Normal file
@@ -0,0 +1,60 @@
|
||||
<!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 11.1.0 Release Notes / TBD</h1>
|
||||
|
||||
<p>
|
||||
Mesa 11.1.0 is a new development release.
|
||||
People who are concerned with stability and reliability should stick
|
||||
with a previous release or wait for Mesa 11.1.1.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 11.1.0 implements the OpenGL 4.1 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 4.1. OpenGL
|
||||
4.1 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
TBD.
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
|
||||
<p>
|
||||
Note: some of the new features are only available with certain drivers.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
TBD.
|
||||
</ul>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
TBD.
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
TBD.
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -124,10 +124,6 @@ CHIPSET(0x1921, skl_gt2, "Intel(R) Skylake ULT GT2F")
|
||||
CHIPSET(0x1926, skl_gt3, "Intel(R) Skylake ULT GT3")
|
||||
CHIPSET(0x192A, skl_gt3, "Intel(R) Skylake SRV GT3")
|
||||
CHIPSET(0x192B, skl_gt3, "Intel(R) Skylake Halo GT3")
|
||||
CHIPSET(0x1932, skl_gt4, "Intel(R) Skylake GT4")
|
||||
CHIPSET(0x193A, skl_gt4, "Intel(R) Skylake GT4")
|
||||
CHIPSET(0x193B, skl_gt4, "Intel(R) Skylake GT4")
|
||||
CHIPSET(0x193D, skl_gt4, "Intel(R) Skylake GT4")
|
||||
CHIPSET(0x22B0, chv, "Intel(R) HD Graphics (Cherryview)")
|
||||
CHIPSET(0x22B1, chv, "Intel(R) HD Graphics (Cherryview)")
|
||||
CHIPSET(0x22B2, chv, "Intel(R) HD Graphics (Cherryview)")
|
||||
|
@@ -181,5 +181,3 @@ CHIPSET(0x9876, CARRIZO_, CARRIZO)
|
||||
CHIPSET(0x9877, CARRIZO_, CARRIZO)
|
||||
|
||||
CHIPSET(0x7300, FIJI_, FIJI)
|
||||
|
||||
CHIPSET(0x98E4, STONEY_, STONEY)
|
||||
|
@@ -312,8 +312,6 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
|
||||
else
|
||||
conf->dri_single_config = dri_config;
|
||||
}
|
||||
|
||||
conf->base.SurfaceType = 0;
|
||||
conf->base.ConfigID = config_id;
|
||||
|
||||
_eglLinkConfig(&conf->base);
|
||||
@@ -2386,18 +2384,13 @@ dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
|
||||
unsigned wait_flags = 0;
|
||||
EGLint ret = EGL_CONDITION_SATISFIED_KHR;
|
||||
|
||||
/* The EGL_KHR_fence_sync spec states:
|
||||
*
|
||||
* "If no context is current for the bound API,
|
||||
* the EGL_SYNC_FLUSH_COMMANDS_BIT_KHR bit is ignored.
|
||||
*/
|
||||
if (dri2_ctx && flags & EGL_SYNC_FLUSH_COMMANDS_BIT_KHR)
|
||||
if (flags & EGL_SYNC_FLUSH_COMMANDS_BIT_KHR)
|
||||
wait_flags |= __DRI2_FENCE_FLAG_FLUSH_COMMANDS;
|
||||
|
||||
/* the sync object should take a reference while waiting */
|
||||
dri2_egl_ref_sync(dri2_sync);
|
||||
|
||||
if (dri2_dpy->fence->client_wait_sync(dri2_ctx ? dri2_ctx->dri_context : NULL,
|
||||
if (dri2_dpy->fence->client_wait_sync(dri2_ctx->dri_context,
|
||||
dri2_sync->fence, wait_flags,
|
||||
timeout))
|
||||
dri2_sync->base.SyncStatus = EGL_SIGNALED_KHR;
|
||||
|
@@ -152,51 +152,12 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
|
||||
|
||||
/* The EGL_KHR_create_context spec says:
|
||||
*
|
||||
* "If the EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR flag bit is set in
|
||||
* EGL_CONTEXT_FLAGS_KHR, then a <debug context> will be created.
|
||||
* [...]
|
||||
* In some cases a debug context may be identical to a non-debug
|
||||
* context. This bit is supported for OpenGL and OpenGL ES
|
||||
* contexts."
|
||||
* "Flags are only defined for OpenGL context creation, and
|
||||
* specifying a flags value other than zero for other types of
|
||||
* contexts, including OpenGL ES contexts, will generate an
|
||||
* error."
|
||||
*/
|
||||
if ((val & EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR) &&
|
||||
(api != EGL_OPENGL_API && api != EGL_OPENGL_ES_API)) {
|
||||
err = EGL_BAD_ATTRIBUTE;
|
||||
break;
|
||||
}
|
||||
|
||||
/* The EGL_KHR_create_context spec says:
|
||||
*
|
||||
* "If the EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR flag bit
|
||||
* is set in EGL_CONTEXT_FLAGS_KHR, then a <forward-compatible>
|
||||
* context will be created. Forward-compatible contexts are
|
||||
* defined only for OpenGL versions 3.0 and later. They must not
|
||||
* support functionality marked as <deprecated> by that version of
|
||||
* the API, while a non-forward-compatible context must support
|
||||
* all functionality in that version, deprecated or not. This bit
|
||||
* is supported for OpenGL contexts, and requesting a
|
||||
* forward-compatible context for OpenGL versions less than 3.0
|
||||
* will generate an error."
|
||||
*/
|
||||
if ((val & EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR) &&
|
||||
(api != EGL_OPENGL_API || ctx->ClientMajorVersion < 3)) {
|
||||
err = EGL_BAD_ATTRIBUTE;
|
||||
break;
|
||||
}
|
||||
|
||||
/* The EGL_KHR_create_context_spec says:
|
||||
*
|
||||
* "If the EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR bit is set in
|
||||
* EGL_CONTEXT_FLAGS_KHR, then a context supporting <robust buffer
|
||||
* access> will be created. Robust buffer access is defined in the
|
||||
* GL_ARB_robustness extension specification, and the resulting
|
||||
* context must also support either the GL_ARB_robustness
|
||||
* extension, or a version of OpenGL incorporating equivalent
|
||||
* functionality. This bit is supported for OpenGL contexts.
|
||||
*/
|
||||
if ((val & EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR) &&
|
||||
(api != EGL_OPENGL_API ||
|
||||
!dpy->Extensions.EXT_create_context_robustness)) {
|
||||
if (api != EGL_OPENGL_API && val != 0) {
|
||||
err = EGL_BAD_ATTRIBUTE;
|
||||
break;
|
||||
}
|
||||
|
@@ -11,6 +11,7 @@ SUBDIRS += auxiliary
|
||||
##
|
||||
|
||||
SUBDIRS += \
|
||||
drivers/ddebug \
|
||||
drivers/noop \
|
||||
drivers/trace \
|
||||
drivers/rbug
|
||||
|
@@ -38,23 +38,18 @@ libgallium_la_SOURCES += \
|
||||
|
||||
endif
|
||||
|
||||
MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
|
||||
PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
|
||||
indices/u_indices_gen.c: $(srcdir)/indices/u_indices_gen.py
|
||||
$(AM_V_at)$(MKDIR_P) indices
|
||||
$(AM_V_GEN) $(PYTHON2) $< > $@
|
||||
|
||||
indices/u_indices_gen.c: indices/u_indices_gen.py
|
||||
$(MKDIR_GEN)
|
||||
$(PYTHON_GEN) $(srcdir)/indices/u_indices_gen.py > $@
|
||||
indices/u_unfilled_gen.c: $(srcdir)/indices/u_unfilled_gen.py
|
||||
$(AM_V_at)$(MKDIR_P) indices
|
||||
$(AM_V_GEN) $(PYTHON2) $< > $@
|
||||
|
||||
indices/u_unfilled_gen.c: indices/u_unfilled_gen.py
|
||||
$(MKDIR_GEN)
|
||||
$(PYTHON_GEN) $(srcdir)/indices/u_unfilled_gen.py > $@
|
||||
util/u_format_table.c: $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format_pack.py $(srcdir)/util/u_format_parse.py $(srcdir)/util/u_format.csv
|
||||
$(AM_V_at)$(MKDIR_P) util
|
||||
$(AM_V_GEN) $(PYTHON2) $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format.csv > $@
|
||||
|
||||
util/u_format_table.c: util/u_format_table.py \
|
||||
util/u_format_pack.py \
|
||||
util/u_format_parse.py \
|
||||
util/u_format.csv
|
||||
$(MKDIR_GEN)
|
||||
$(PYTHON_GEN) $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format.csv > $@
|
||||
|
||||
noinst_LTLIBRARIES += libgalliumvl_stub.la
|
||||
libgalliumvl_stub_la_SOURCES = \
|
||||
|
@@ -311,7 +311,7 @@ lp_build_const_elem(struct gallivm_state *gallivm,
|
||||
else {
|
||||
double dscale = lp_const_scale(type);
|
||||
|
||||
elem = LLVMConstInt(elem_type, (long long) round(val*dscale), 0);
|
||||
elem = LLVMConstInt(elem_type, round(val*dscale), 0);
|
||||
}
|
||||
|
||||
return elem;
|
||||
|
@@ -427,7 +427,6 @@ lp_build_init(void)
|
||||
*/
|
||||
util_cpu_caps.has_avx = 0;
|
||||
util_cpu_caps.has_avx2 = 0;
|
||||
util_cpu_caps.has_f16c = 0;
|
||||
}
|
||||
|
||||
#ifdef PIPE_ARCH_PPC_64
|
||||
@@ -459,9 +458,7 @@ lp_build_init(void)
|
||||
util_cpu_caps.has_sse3 = 0;
|
||||
util_cpu_caps.has_ssse3 = 0;
|
||||
util_cpu_caps.has_sse4_1 = 0;
|
||||
util_cpu_caps.has_sse4_2 = 0;
|
||||
util_cpu_caps.has_avx = 0;
|
||||
util_cpu_caps.has_avx2 = 0;
|
||||
util_cpu_caps.has_f16c = 0;
|
||||
#endif
|
||||
|
||||
|
@@ -137,8 +137,6 @@ gallivm_get_shader_param(enum pipe_shader_cap param)
|
||||
case PIPE_SHADER_CAP_TGSI_DFRACEXP_DLDEXP_SUPPORTED:
|
||||
case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED:
|
||||
return 0;
|
||||
case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
|
||||
return 32;
|
||||
}
|
||||
/* if we get here, we missed a shader cap above (and should have seen
|
||||
* a compiler warning.)
|
||||
|
@@ -81,8 +81,6 @@
|
||||
# pragma pop_macro("DEBUG")
|
||||
#endif
|
||||
|
||||
#include "c11/threads.h"
|
||||
#include "os/os_thread.h"
|
||||
#include "pipe/p_config.h"
|
||||
#include "util/u_debug.h"
|
||||
#include "util/u_cpu_detect.h"
|
||||
@@ -105,33 +103,6 @@ static LLVMEnsureMultithreaded lLVMEnsureMultithreaded;
|
||||
|
||||
}
|
||||
|
||||
static once_flag init_native_targets_once_flag;
|
||||
|
||||
static void init_native_targets()
|
||||
{
|
||||
// If we have a native target, initialize it to ensure it is linked in and
|
||||
// usable by the JIT.
|
||||
llvm::InitializeNativeTarget();
|
||||
|
||||
llvm::InitializeNativeTargetAsmPrinter();
|
||||
|
||||
llvm::InitializeNativeTargetDisassembler();
|
||||
}
|
||||
|
||||
/**
|
||||
* The llvm target registry is not thread-safe, so drivers and state-trackers
|
||||
* that want to initialize targets should use the gallivm_init_llvm_targets()
|
||||
* function to safely initialize targets.
|
||||
*
|
||||
* LLVM targets should be initialized before the driver or state-tracker tries
|
||||
* to access the registry.
|
||||
*/
|
||||
extern "C" void
|
||||
gallivm_init_llvm_targets(void)
|
||||
{
|
||||
call_once(&init_native_targets_once_flag, init_native_targets);
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
lp_set_target_options(void)
|
||||
{
|
||||
@@ -144,7 +115,13 @@ lp_set_target_options(void)
|
||||
llvm::DisablePrettyStackTrace = true;
|
||||
#endif
|
||||
|
||||
gallivm_init_llvm_targets();
|
||||
// If we have a native target, initialize it to ensure it is linked in and
|
||||
// usable by the JIT.
|
||||
llvm::InitializeNativeTarget();
|
||||
|
||||
llvm::InitializeNativeTargetAsmPrinter();
|
||||
|
||||
llvm::InitializeNativeTargetDisassembler();
|
||||
}
|
||||
|
||||
|
||||
@@ -497,48 +474,20 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
||||
#endif
|
||||
}
|
||||
|
||||
llvm::SmallVector<std::string, 16> MAttrs;
|
||||
|
||||
#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
|
||||
/*
|
||||
* We need to unset attributes because sometimes LLVM mistakenly assumes
|
||||
* certain features are present given the processor name.
|
||||
*
|
||||
* https://bugs.freedesktop.org/show_bug.cgi?id=92214
|
||||
* http://llvm.org/PR25021
|
||||
* http://llvm.org/PR19429
|
||||
* http://llvm.org/PR16721
|
||||
*/
|
||||
MAttrs.push_back(util_cpu_caps.has_sse ? "+sse" : "-sse" );
|
||||
MAttrs.push_back(util_cpu_caps.has_sse2 ? "+sse2" : "-sse2" );
|
||||
MAttrs.push_back(util_cpu_caps.has_sse3 ? "+sse3" : "-sse3" );
|
||||
MAttrs.push_back(util_cpu_caps.has_ssse3 ? "+ssse3" : "-ssse3" );
|
||||
#if HAVE_LLVM >= 0x0304
|
||||
MAttrs.push_back(util_cpu_caps.has_sse4_1 ? "+sse4.1" : "-sse4.1");
|
||||
#else
|
||||
MAttrs.push_back(util_cpu_caps.has_sse4_1 ? "+sse41" : "-sse41" );
|
||||
#endif
|
||||
#if HAVE_LLVM >= 0x0304
|
||||
MAttrs.push_back(util_cpu_caps.has_sse4_2 ? "+sse4.2" : "-sse4.2");
|
||||
#else
|
||||
MAttrs.push_back(util_cpu_caps.has_sse4_2 ? "+sse42" : "-sse42" );
|
||||
#endif
|
||||
/*
|
||||
* AVX feature is not automatically detected from CPUID by the X86 target
|
||||
* yet, because the old (yet default) JIT engine is not capable of
|
||||
* emitting the opcodes. On newer llvm versions it is and at least some
|
||||
* versions (tested with 3.3) will emit avx opcodes without this anyway.
|
||||
*/
|
||||
MAttrs.push_back(util_cpu_caps.has_avx ? "+avx" : "-avx");
|
||||
MAttrs.push_back(util_cpu_caps.has_f16c ? "+f16c" : "-f16c");
|
||||
MAttrs.push_back(util_cpu_caps.has_avx2 ? "+avx2" : "-avx2");
|
||||
#endif
|
||||
|
||||
#if defined(PIPE_ARCH_PPC)
|
||||
MAttrs.push_back(util_cpu_caps.has_altivec ? "+altivec" : "-altivec");
|
||||
#endif
|
||||
|
||||
builder.setMAttrs(MAttrs);
|
||||
llvm::SmallVector<std::string, 1> MAttrs;
|
||||
if (util_cpu_caps.has_avx) {
|
||||
/*
|
||||
* AVX feature is not automatically detected from CPUID by the X86 target
|
||||
* yet, because the old (yet default) JIT engine is not capable of
|
||||
* emitting the opcodes. On newer llvm versions it is and at least some
|
||||
* versions (tested with 3.3) will emit avx opcodes without this anyway.
|
||||
*/
|
||||
MAttrs.push_back("+avx");
|
||||
if (util_cpu_caps.has_f16c) {
|
||||
MAttrs.push_back("+f16c");
|
||||
}
|
||||
builder.setMAttrs(MAttrs);
|
||||
}
|
||||
|
||||
#if HAVE_LLVM >= 0x0305
|
||||
StringRef MCPU = llvm::sys::getHostCPUName();
|
||||
|
@@ -41,8 +41,6 @@ extern "C" {
|
||||
|
||||
struct lp_generated_code;
|
||||
|
||||
extern void
|
||||
gallivm_init_llvm_targets(void);
|
||||
|
||||
extern void
|
||||
lp_set_target_options(void);
|
||||
|
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "util/ralloc.h"
|
||||
#include "glsl/nir/nir.h"
|
||||
#include "glsl/nir/nir_control_flow.h"
|
||||
#include "glsl/nir/nir_builder.h"
|
||||
#include "glsl/list.h"
|
||||
#include "glsl/shader_enums.h"
|
||||
@@ -64,24 +65,24 @@ struct ttn_compile {
|
||||
nir_register *addr_reg;
|
||||
|
||||
/**
|
||||
* Stack of cf_node_lists where instructions should be pushed as we pop
|
||||
* Stack of nir_cursors where instructions should be pushed as we pop
|
||||
* back out of the control flow stack.
|
||||
*
|
||||
* For each IF/ELSE/ENDIF block, if_stack[if_stack_pos] has where the else
|
||||
* instructions should be placed, and if_stack[if_stack_pos - 1] has where
|
||||
* the next instructions outside of the if/then/else block go.
|
||||
*/
|
||||
struct exec_list **if_stack;
|
||||
nir_cursor *if_stack;
|
||||
unsigned if_stack_pos;
|
||||
|
||||
/**
|
||||
* Stack of cf_node_lists where instructions should be pushed as we pop
|
||||
* Stack of nir_cursors where instructions should be pushed as we pop
|
||||
* back out of the control flow stack.
|
||||
*
|
||||
* loop_stack[loop_stack_pos - 1] contains the cf_node_list for the outside
|
||||
* of the loop.
|
||||
*/
|
||||
struct exec_list **loop_stack;
|
||||
nir_cursor *loop_stack;
|
||||
unsigned loop_stack_pos;
|
||||
|
||||
/* How many TGSI_FILE_IMMEDIATE vec4s have been parsed so far. */
|
||||
@@ -307,7 +308,7 @@ ttn_emit_immediate(struct ttn_compile *c)
|
||||
for (i = 0; i < 4; i++)
|
||||
load_const->value.u[i] = tgsi_imm->u[i].Uint;
|
||||
|
||||
nir_instr_insert_after_cf_list(b->cf_node_list, &load_const->instr);
|
||||
nir_builder_instr_insert(b, &load_const->instr);
|
||||
}
|
||||
|
||||
static nir_src
|
||||
@@ -363,7 +364,7 @@ ttn_src_for_file_and_index(struct ttn_compile *c, unsigned file, unsigned index,
|
||||
load->variables[0] = ttn_array_deref(c, load, var, offset, indirect);
|
||||
|
||||
nir_ssa_dest_init(&load->instr, &load->dest, 4, NULL);
|
||||
nir_instr_insert_after_cf_list(b->cf_node_list, &load->instr);
|
||||
nir_builder_instr_insert(b, &load->instr);
|
||||
|
||||
src = nir_src_for_ssa(&load->dest.ssa);
|
||||
|
||||
@@ -414,7 +415,7 @@ ttn_src_for_file_and_index(struct ttn_compile *c, unsigned file, unsigned index,
|
||||
load->num_components = ncomp;
|
||||
|
||||
nir_ssa_dest_init(&load->instr, &load->dest, ncomp, NULL);
|
||||
nir_instr_insert_after_cf_list(b->cf_node_list, &load->instr);
|
||||
nir_builder_instr_insert(b, &load->instr);
|
||||
|
||||
src = nir_src_for_ssa(&load->dest.ssa);
|
||||
break;
|
||||
@@ -476,7 +477,7 @@ ttn_src_for_file_and_index(struct ttn_compile *c, unsigned file, unsigned index,
|
||||
srcn++;
|
||||
}
|
||||
nir_ssa_dest_init(&load->instr, &load->dest, 4, NULL);
|
||||
nir_instr_insert_after_cf_list(b->cf_node_list, &load->instr);
|
||||
nir_builder_instr_insert(b, &load->instr);
|
||||
|
||||
src = nir_src_for_ssa(&load->dest.ssa);
|
||||
break;
|
||||
@@ -552,7 +553,7 @@ ttn_get_dest(struct ttn_compile *c, struct tgsi_full_dst_register *tgsi_fdst)
|
||||
|
||||
load->dest = nir_dest_for_reg(reg);
|
||||
|
||||
nir_instr_insert_after_cf_list(b->cf_node_list, &load->instr);
|
||||
nir_builder_instr_insert(b, &load->instr);
|
||||
} else {
|
||||
assert(!tgsi_dst->Indirect);
|
||||
dest.dest.reg.reg = c->temp_regs[index].reg;
|
||||
@@ -667,7 +668,7 @@ ttn_alu(nir_builder *b, nir_op op, nir_alu_dest dest, nir_ssa_def **src)
|
||||
instr->src[i].src = nir_src_for_ssa(src[i]);
|
||||
|
||||
instr->dest = dest;
|
||||
nir_instr_insert_after_cf_list(b->cf_node_list, &instr->instr);
|
||||
nir_builder_instr_insert(b, &instr->instr);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -683,7 +684,7 @@ ttn_move_dest_masked(nir_builder *b, nir_alu_dest dest,
|
||||
mov->src[0].src = nir_src_for_ssa(def);
|
||||
for (unsigned i = def->num_components; i < 4; i++)
|
||||
mov->src[0].swizzle[i] = def->num_components - 1;
|
||||
nir_instr_insert_after_cf_list(b->cf_node_list, &mov->instr);
|
||||
nir_builder_instr_insert(b, &mov->instr);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -902,7 +903,7 @@ ttn_kill(nir_builder *b, nir_op op, nir_alu_dest dest, nir_ssa_def **src)
|
||||
{
|
||||
nir_intrinsic_instr *discard =
|
||||
nir_intrinsic_instr_create(b->shader, nir_intrinsic_discard);
|
||||
nir_instr_insert_after_cf_list(b->cf_node_list, &discard->instr);
|
||||
nir_builder_instr_insert(b, &discard->instr);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -912,7 +913,7 @@ ttn_kill_if(nir_builder *b, nir_op op, nir_alu_dest dest, nir_ssa_def **src)
|
||||
nir_intrinsic_instr *discard =
|
||||
nir_intrinsic_instr_create(b->shader, nir_intrinsic_discard_if);
|
||||
discard->src[0] = nir_src_for_ssa(cmp);
|
||||
nir_instr_insert_after_cf_list(b->cf_node_list, &discard->instr);
|
||||
nir_builder_instr_insert(b, &discard->instr);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -921,7 +922,7 @@ ttn_if(struct ttn_compile *c, nir_ssa_def *src, bool is_uint)
|
||||
nir_builder *b = &c->build;
|
||||
|
||||
/* Save the outside-of-the-if-statement node list. */
|
||||
c->if_stack[c->if_stack_pos] = b->cf_node_list;
|
||||
c->if_stack[c->if_stack_pos] = b->cursor;
|
||||
c->if_stack_pos++;
|
||||
|
||||
src = ttn_channel(b, src, X);
|
||||
@@ -932,11 +933,11 @@ ttn_if(struct ttn_compile *c, nir_ssa_def *src, bool is_uint)
|
||||
} else {
|
||||
if_stmt->condition = nir_src_for_ssa(nir_fne(b, src, nir_imm_int(b, 0)));
|
||||
}
|
||||
nir_cf_node_insert_end(b->cf_node_list, &if_stmt->cf_node);
|
||||
nir_builder_cf_insert(b, &if_stmt->cf_node);
|
||||
|
||||
nir_builder_insert_after_cf_list(b, &if_stmt->then_list);
|
||||
b->cursor = nir_after_cf_list(&if_stmt->then_list);
|
||||
|
||||
c->if_stack[c->if_stack_pos] = &if_stmt->else_list;
|
||||
c->if_stack[c->if_stack_pos] = nir_after_cf_list(&if_stmt->else_list);
|
||||
c->if_stack_pos++;
|
||||
}
|
||||
|
||||
@@ -945,7 +946,7 @@ ttn_else(struct ttn_compile *c)
|
||||
{
|
||||
nir_builder *b = &c->build;
|
||||
|
||||
nir_builder_insert_after_cf_list(b, c->if_stack[c->if_stack_pos - 1]);
|
||||
b->cursor = c->if_stack[c->if_stack_pos - 1];
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -954,7 +955,7 @@ ttn_endif(struct ttn_compile *c)
|
||||
nir_builder *b = &c->build;
|
||||
|
||||
c->if_stack_pos -= 2;
|
||||
nir_builder_insert_after_cf_list(b, c->if_stack[c->if_stack_pos]);
|
||||
b->cursor = c->if_stack[c->if_stack_pos];
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -963,27 +964,27 @@ ttn_bgnloop(struct ttn_compile *c)
|
||||
nir_builder *b = &c->build;
|
||||
|
||||
/* Save the outside-of-the-loop node list. */
|
||||
c->loop_stack[c->loop_stack_pos] = b->cf_node_list;
|
||||
c->loop_stack[c->loop_stack_pos] = b->cursor;
|
||||
c->loop_stack_pos++;
|
||||
|
||||
nir_loop *loop = nir_loop_create(b->shader);
|
||||
nir_cf_node_insert_end(b->cf_node_list, &loop->cf_node);
|
||||
nir_builder_cf_insert(b, &loop->cf_node);
|
||||
|
||||
nir_builder_insert_after_cf_list(b, &loop->body);
|
||||
b->cursor = nir_after_cf_list(&loop->body);
|
||||
}
|
||||
|
||||
static void
|
||||
ttn_cont(nir_builder *b)
|
||||
{
|
||||
nir_jump_instr *instr = nir_jump_instr_create(b->shader, nir_jump_continue);
|
||||
nir_instr_insert_after_cf_list(b->cf_node_list, &instr->instr);
|
||||
nir_builder_instr_insert(b, &instr->instr);
|
||||
}
|
||||
|
||||
static void
|
||||
ttn_brk(nir_builder *b)
|
||||
{
|
||||
nir_jump_instr *instr = nir_jump_instr_create(b->shader, nir_jump_break);
|
||||
nir_instr_insert_after_cf_list(b->cf_node_list, &instr->instr);
|
||||
nir_builder_instr_insert(b, &instr->instr);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -992,7 +993,7 @@ ttn_endloop(struct ttn_compile *c)
|
||||
nir_builder *b = &c->build;
|
||||
|
||||
c->loop_stack_pos--;
|
||||
nir_builder_insert_after_cf_list(b, c->loop_stack[c->loop_stack_pos]);
|
||||
b->cursor = c->loop_stack[c->loop_stack_pos];
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1279,7 +1280,7 @@ ttn_tex(struct ttn_compile *c, nir_alu_dest dest, nir_ssa_def **src)
|
||||
assert(src_number == num_srcs);
|
||||
|
||||
nir_ssa_dest_init(&instr->instr, &instr->dest, 4, NULL);
|
||||
nir_instr_insert_after_cf_list(b->cf_node_list, &instr->instr);
|
||||
nir_builder_instr_insert(b, &instr->instr);
|
||||
|
||||
/* Resolve the writemask on the texture op. */
|
||||
ttn_move_dest(b, dest, &instr->dest.ssa);
|
||||
@@ -1318,10 +1319,10 @@ ttn_txq(struct ttn_compile *c, nir_alu_dest dest, nir_ssa_def **src)
|
||||
txs->src[0].src_type = nir_tex_src_lod;
|
||||
|
||||
nir_ssa_dest_init(&txs->instr, &txs->dest, 3, NULL);
|
||||
nir_instr_insert_after_cf_list(b->cf_node_list, &txs->instr);
|
||||
nir_builder_instr_insert(b, &txs->instr);
|
||||
|
||||
nir_ssa_dest_init(&qlv->instr, &qlv->dest, 1, NULL);
|
||||
nir_instr_insert_after_cf_list(b->cf_node_list, &qlv->instr);
|
||||
nir_builder_instr_insert(b, &qlv->instr);
|
||||
|
||||
ttn_move_dest_masked(b, dest, &txs->dest.ssa, TGSI_WRITEMASK_XYZ);
|
||||
ttn_move_dest_masked(b, dest, &qlv->dest.ssa, TGSI_WRITEMASK_W);
|
||||
@@ -1730,7 +1731,7 @@ ttn_emit_instruction(struct ttn_compile *c)
|
||||
store->variables[0] = ttn_array_deref(c, store, var, offset, indirect);
|
||||
store->src[0] = nir_src_for_reg(dest.dest.reg.reg);
|
||||
|
||||
nir_instr_insert_after_cf_list(b->cf_node_list, &store->instr);
|
||||
nir_builder_instr_insert(b, &store->instr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1759,11 +1760,26 @@ ttn_add_output_stores(struct ttn_compile *c)
|
||||
store->const_index[0] = loc;
|
||||
store->src[0].reg.reg = c->output_regs[loc].reg;
|
||||
store->src[0].reg.base_offset = c->output_regs[loc].offset;
|
||||
nir_instr_insert_after_cf_list(b->cf_node_list, &store->instr);
|
||||
nir_builder_instr_insert(b, &store->instr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static gl_shader_stage
|
||||
tgsi_processor_to_shader_stage(unsigned processor)
|
||||
{
|
||||
switch (processor) {
|
||||
case TGSI_PROCESSOR_FRAGMENT: return MESA_SHADER_FRAGMENT;
|
||||
case TGSI_PROCESSOR_VERTEX: return MESA_SHADER_VERTEX;
|
||||
case TGSI_PROCESSOR_GEOMETRY: return MESA_SHADER_GEOMETRY;
|
||||
case TGSI_PROCESSOR_TESS_CTRL: return MESA_SHADER_TESS_CTRL;
|
||||
case TGSI_PROCESSOR_TESS_EVAL: return MESA_SHADER_TESS_EVAL;
|
||||
case TGSI_PROCESSOR_COMPUTE: return MESA_SHADER_COMPUTE;
|
||||
default:
|
||||
unreachable("invalid TGSI processor");
|
||||
};
|
||||
}
|
||||
|
||||
struct nir_shader *
|
||||
tgsi_to_nir(const void *tgsi_tokens,
|
||||
const nir_shader_compiler_options *options)
|
||||
@@ -1775,17 +1791,19 @@ tgsi_to_nir(const void *tgsi_tokens,
|
||||
int ret;
|
||||
|
||||
c = rzalloc(NULL, struct ttn_compile);
|
||||
s = nir_shader_create(NULL, options);
|
||||
|
||||
tgsi_scan_shader(tgsi_tokens, &scan);
|
||||
c->scan = &scan;
|
||||
|
||||
s = nir_shader_create(NULL, tgsi_processor_to_shader_stage(scan.processor),
|
||||
options);
|
||||
|
||||
nir_function *func = nir_function_create(s, "main");
|
||||
nir_function_overload *overload = nir_function_overload_create(func);
|
||||
nir_function_impl *impl = nir_function_impl_create(overload);
|
||||
|
||||
nir_builder_init(&c->build, impl);
|
||||
nir_builder_insert_after_cf_list(&c->build, &impl->body);
|
||||
|
||||
tgsi_scan_shader(tgsi_tokens, &scan);
|
||||
c->scan = &scan;
|
||||
c->build.cursor = nir_after_cf_list(&impl->body);
|
||||
|
||||
s->num_inputs = scan.file_max[TGSI_FILE_INPUT] + 1;
|
||||
s->num_uniforms = scan.const_file_max[0] + 1;
|
||||
@@ -1801,10 +1819,10 @@ tgsi_to_nir(const void *tgsi_tokens,
|
||||
c->num_samp_types = scan.file_max[TGSI_FILE_SAMPLER_VIEW] + 1;
|
||||
c->samp_types = rzalloc_array(c, nir_alu_type, c->num_samp_types);
|
||||
|
||||
c->if_stack = rzalloc_array(c, struct exec_list *,
|
||||
c->if_stack = rzalloc_array(c, nir_cursor,
|
||||
(scan.opcode_count[TGSI_OPCODE_IF] +
|
||||
scan.opcode_count[TGSI_OPCODE_UIF]) * 2);
|
||||
c->loop_stack = rzalloc_array(c, struct exec_list *,
|
||||
c->loop_stack = rzalloc_array(c, nir_cursor,
|
||||
scan.opcode_count[TGSI_OPCODE_BGNLOOP]);
|
||||
|
||||
ret = tgsi_parse_init(&parser, tgsi_tokens);
|
||||
|
@@ -166,11 +166,6 @@ pb_cache_manager_create(struct pb_manager *provider,
|
||||
unsigned bypass_usage,
|
||||
uint64_t maximum_cache_size);
|
||||
|
||||
/**
|
||||
* Remove a buffer from the cache, but keep it alive.
|
||||
*/
|
||||
void
|
||||
pb_cache_manager_remove_buffer(struct pb_buffer *buf);
|
||||
|
||||
struct pb_fence_ops;
|
||||
|
||||
|
@@ -104,42 +104,18 @@ pb_cache_manager(struct pb_manager *mgr)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_pb_cache_manager_remove_buffer_locked(struct pb_cache_buffer *buf)
|
||||
{
|
||||
struct pb_cache_manager *mgr = buf->mgr;
|
||||
|
||||
if (buf->head.next) {
|
||||
LIST_DEL(&buf->head);
|
||||
assert(mgr->numDelayed);
|
||||
--mgr->numDelayed;
|
||||
mgr->cache_size -= buf->base.size;
|
||||
}
|
||||
buf->mgr = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
pb_cache_manager_remove_buffer(struct pb_buffer *pb_buf)
|
||||
{
|
||||
struct pb_cache_buffer *buf = (struct pb_cache_buffer*)pb_buf;
|
||||
struct pb_cache_manager *mgr = buf->mgr;
|
||||
|
||||
if (!mgr)
|
||||
return;
|
||||
|
||||
pipe_mutex_lock(mgr->mutex);
|
||||
_pb_cache_manager_remove_buffer_locked(buf);
|
||||
pipe_mutex_unlock(mgr->mutex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually destroy the buffer.
|
||||
*/
|
||||
static inline void
|
||||
_pb_cache_buffer_destroy(struct pb_cache_buffer *buf)
|
||||
{
|
||||
if (buf->mgr)
|
||||
_pb_cache_manager_remove_buffer_locked(buf);
|
||||
struct pb_cache_manager *mgr = buf->mgr;
|
||||
|
||||
LIST_DEL(&buf->head);
|
||||
assert(mgr->numDelayed);
|
||||
--mgr->numDelayed;
|
||||
mgr->cache_size -= buf->base.size;
|
||||
assert(!pipe_is_referenced(&buf->base.reference));
|
||||
pb_reference(&buf->buffer, NULL);
|
||||
FREE(buf);
|
||||
@@ -180,12 +156,6 @@ pb_cache_buffer_destroy(struct pb_buffer *_buf)
|
||||
struct pb_cache_buffer *buf = pb_cache_buffer(_buf);
|
||||
struct pb_cache_manager *mgr = buf->mgr;
|
||||
|
||||
if (!mgr) {
|
||||
pb_reference(&buf->buffer, NULL);
|
||||
FREE(buf);
|
||||
return;
|
||||
}
|
||||
|
||||
pipe_mutex_lock(mgr->mutex);
|
||||
assert(!pipe_is_referenced(&buf->base.reference));
|
||||
|
||||
|
@@ -11,6 +11,10 @@
|
||||
* one or more debug driver: rbug, trace.
|
||||
*/
|
||||
|
||||
#ifdef GALLIUM_DDEBUG
|
||||
#include "ddebug/dd_public.h"
|
||||
#endif
|
||||
|
||||
#ifdef GALLIUM_TRACE
|
||||
#include "trace/tr_public.h"
|
||||
#endif
|
||||
@@ -30,6 +34,10 @@
|
||||
static inline struct pipe_screen *
|
||||
debug_screen_wrap(struct pipe_screen *screen)
|
||||
{
|
||||
#if defined(GALLIUM_DDEBUG)
|
||||
screen = ddebug_screen_create(screen);
|
||||
#endif
|
||||
|
||||
#if defined(GALLIUM_RBUG)
|
||||
screen = rbug_screen_create(screen);
|
||||
#endif
|
||||
|
@@ -463,8 +463,6 @@ tgsi_exec_get_shader_param(enum pipe_shader_cap param)
|
||||
case PIPE_SHADER_CAP_TGSI_DROUND_SUPPORTED:
|
||||
case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED:
|
||||
return 0;
|
||||
case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
|
||||
return 32;
|
||||
}
|
||||
/* if we get here, we missed a shader cap above (and should have seen
|
||||
* a compiler warning.)
|
||||
|
@@ -1190,8 +1190,6 @@ static void blitter_draw(struct blitter_context_priv *ctx,
|
||||
|
||||
u_upload_data(ctx->upload, 0, sizeof(ctx->vertices), ctx->vertices,
|
||||
&vb.buffer_offset, &vb.buffer);
|
||||
if (!vb.buffer)
|
||||
return;
|
||||
u_upload_unmap(ctx->upload);
|
||||
|
||||
pipe->set_vertex_buffers(pipe, ctx->base.vb_slot, 1, &vb);
|
||||
@@ -2091,9 +2089,6 @@ void util_blitter_clear_buffer(struct blitter_context *blitter,
|
||||
|
||||
u_upload_data(ctx->upload, 0, num_channels*4, clear_value,
|
||||
&vb.buffer_offset, &vb.buffer);
|
||||
if (!vb.buffer)
|
||||
goto out;
|
||||
|
||||
vb.stride = 0;
|
||||
|
||||
blitter_set_running_flag(ctx);
|
||||
@@ -2117,7 +2112,6 @@ void util_blitter_clear_buffer(struct blitter_context *blitter,
|
||||
|
||||
util_draw_arrays(pipe, PIPE_PRIM_POINTS, 0, size / 4);
|
||||
|
||||
out:
|
||||
blitter_restore_vertex_states(ctx);
|
||||
blitter_restore_render_cond(ctx);
|
||||
blitter_unset_running_flag(ctx);
|
||||
|
@@ -372,30 +372,28 @@ void util_blitter_custom_resolve_color(struct blitter_context *blitter,
|
||||
*
|
||||
* States not listed here are not affected by util_blitter. */
|
||||
|
||||
static inline
|
||||
void util_blitter_save_blend(struct blitter_context *blitter,
|
||||
void *state)
|
||||
static inline void
|
||||
util_blitter_save_blend(struct blitter_context *blitter, void *state)
|
||||
{
|
||||
blitter->saved_blend_state = state;
|
||||
}
|
||||
|
||||
static inline
|
||||
void util_blitter_save_depth_stencil_alpha(struct blitter_context *blitter,
|
||||
void *state)
|
||||
static inline void
|
||||
util_blitter_save_depth_stencil_alpha(struct blitter_context *blitter,
|
||||
void *state)
|
||||
{
|
||||
blitter->saved_dsa_state = state;
|
||||
}
|
||||
|
||||
static inline
|
||||
void util_blitter_save_vertex_elements(struct blitter_context *blitter,
|
||||
void *state)
|
||||
static inline void
|
||||
util_blitter_save_vertex_elements(struct blitter_context *blitter, void *state)
|
||||
{
|
||||
blitter->saved_velem_state = state;
|
||||
}
|
||||
|
||||
static inline
|
||||
void util_blitter_save_stencil_ref(struct blitter_context *blitter,
|
||||
const struct pipe_stencil_ref *state)
|
||||
static inline void
|
||||
util_blitter_save_stencil_ref(struct blitter_context *blitter,
|
||||
const struct pipe_stencil_ref *state)
|
||||
{
|
||||
blitter->saved_stencil_ref = *state;
|
||||
}
|
||||
@@ -407,23 +405,20 @@ void util_blitter_save_rasterizer(struct blitter_context *blitter,
|
||||
blitter->saved_rs_state = state;
|
||||
}
|
||||
|
||||
static inline
|
||||
void util_blitter_save_fragment_shader(struct blitter_context *blitter,
|
||||
void *fs)
|
||||
static inline void
|
||||
util_blitter_save_fragment_shader(struct blitter_context *blitter, void *fs)
|
||||
{
|
||||
blitter->saved_fs = fs;
|
||||
}
|
||||
|
||||
static inline
|
||||
void util_blitter_save_vertex_shader(struct blitter_context *blitter,
|
||||
void *vs)
|
||||
static inline void
|
||||
util_blitter_save_vertex_shader(struct blitter_context *blitter, void *vs)
|
||||
{
|
||||
blitter->saved_vs = vs;
|
||||
}
|
||||
|
||||
static inline
|
||||
void util_blitter_save_geometry_shader(struct blitter_context *blitter,
|
||||
void *gs)
|
||||
static inline void
|
||||
util_blitter_save_geometry_shader(struct blitter_context *blitter, void *gs)
|
||||
{
|
||||
blitter->saved_gs = gs;
|
||||
}
|
||||
@@ -442,24 +437,24 @@ util_blitter_save_tesseval_shader(struct blitter_context *blitter,
|
||||
blitter->saved_tes = sh;
|
||||
}
|
||||
|
||||
static inline
|
||||
void util_blitter_save_framebuffer(struct blitter_context *blitter,
|
||||
const struct pipe_framebuffer_state *state)
|
||||
static inline void
|
||||
util_blitter_save_framebuffer(struct blitter_context *blitter,
|
||||
const struct pipe_framebuffer_state *state)
|
||||
{
|
||||
blitter->saved_fb_state.nr_cbufs = 0; /* It's ~0 now, meaning it's unsaved. */
|
||||
util_copy_framebuffer_state(&blitter->saved_fb_state, state);
|
||||
}
|
||||
|
||||
static inline
|
||||
void util_blitter_save_viewport(struct blitter_context *blitter,
|
||||
struct pipe_viewport_state *state)
|
||||
static inline void
|
||||
util_blitter_save_viewport(struct blitter_context *blitter,
|
||||
struct pipe_viewport_state *state)
|
||||
{
|
||||
blitter->saved_viewport = *state;
|
||||
}
|
||||
|
||||
static inline
|
||||
void util_blitter_save_scissor(struct blitter_context *blitter,
|
||||
struct pipe_scissor_state *state)
|
||||
static inline void
|
||||
util_blitter_save_scissor(struct blitter_context *blitter,
|
||||
struct pipe_scissor_state *state)
|
||||
{
|
||||
blitter->saved_scissor = *state;
|
||||
}
|
||||
|
@@ -21,7 +21,8 @@
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Copied from EXT_texture_shared_exponent and edited. */
|
||||
/* Copied from EXT_texture_shared_exponent and edited, getting rid of
|
||||
* expensive float math bits too. */
|
||||
|
||||
#ifndef RGB9E5_H
|
||||
#define RGB9E5_H
|
||||
@@ -39,7 +40,6 @@
|
||||
#define RGB9E5_MANTISSA_VALUES (1<<RGB9E5_MANTISSA_BITS)
|
||||
#define MAX_RGB9E5_MANTISSA (RGB9E5_MANTISSA_VALUES-1)
|
||||
#define MAX_RGB9E5 (((float)MAX_RGB9E5_MANTISSA)/RGB9E5_MANTISSA_VALUES * (1<<MAX_RGB9E5_EXP))
|
||||
#define EPSILON_RGB9E5 ((1.0/RGB9E5_MANTISSA_VALUES) / (1<<RGB9E5_EXP_BIAS))
|
||||
|
||||
typedef union {
|
||||
unsigned int raw;
|
||||
@@ -74,63 +74,59 @@ typedef union {
|
||||
} field;
|
||||
} rgb9e5;
|
||||
|
||||
static inline float rgb9e5_ClampRange(float x)
|
||||
{
|
||||
if (x > 0.0f) {
|
||||
if (x >= MAX_RGB9E5) {
|
||||
return MAX_RGB9E5;
|
||||
} else {
|
||||
return x;
|
||||
}
|
||||
} else {
|
||||
/* NaN gets here too since comparisons with NaN always fail! */
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Ok, FloorLog2 is not correct for the denorm and zero values, but we
|
||||
are going to do a max of this value with the minimum rgb9e5 exponent
|
||||
that will hide these problem cases. */
|
||||
static inline int rgb9e5_FloorLog2(float x)
|
||||
static inline int rgb9e5_ClampRange(float x)
|
||||
{
|
||||
float754 f;
|
||||
|
||||
float754 max;
|
||||
f.value = x;
|
||||
return (f.field.biasedexponent - 127);
|
||||
max.value = MAX_RGB9E5;
|
||||
|
||||
if (f.raw > 0x7f800000)
|
||||
/* catches neg, NaNs */
|
||||
return 0;
|
||||
else if (f.raw >= max.raw)
|
||||
return max.raw;
|
||||
else
|
||||
return f.raw;
|
||||
}
|
||||
|
||||
static inline unsigned float3_to_rgb9e5(const float rgb[3])
|
||||
{
|
||||
rgb9e5 retval;
|
||||
float maxrgb;
|
||||
int rm, gm, bm;
|
||||
float rc, gc, bc;
|
||||
int exp_shared, maxm;
|
||||
double denom;
|
||||
int rm, gm, bm, exp_shared;
|
||||
float754 revdenom = {0};
|
||||
float754 rc, bc, gc, maxrgb;
|
||||
|
||||
rc = rgb9e5_ClampRange(rgb[0]);
|
||||
gc = rgb9e5_ClampRange(rgb[1]);
|
||||
bc = rgb9e5_ClampRange(rgb[2]);
|
||||
rc.raw = rgb9e5_ClampRange(rgb[0]);
|
||||
gc.raw = rgb9e5_ClampRange(rgb[1]);
|
||||
bc.raw = rgb9e5_ClampRange(rgb[2]);
|
||||
maxrgb.raw = MAX3(rc.raw, gc.raw, bc.raw);
|
||||
|
||||
maxrgb = MAX3(rc, gc, bc);
|
||||
exp_shared = MAX2(-RGB9E5_EXP_BIAS-1, rgb9e5_FloorLog2(maxrgb)) + 1 + RGB9E5_EXP_BIAS;
|
||||
/*
|
||||
* Compared to what the spec suggests, instead of conditionally adjusting
|
||||
* the exponent after the fact do it here by doing the equivalent of +0.5 -
|
||||
* the int add will spill over into the exponent in this case.
|
||||
*/
|
||||
maxrgb.raw += maxrgb.raw & (1 << (23-9));
|
||||
exp_shared = MAX2((maxrgb.raw >> 23), -RGB9E5_EXP_BIAS - 1 + 127) +
|
||||
1 + RGB9E5_EXP_BIAS - 127;
|
||||
revdenom.field.biasedexponent = 127 - (exp_shared - RGB9E5_EXP_BIAS -
|
||||
RGB9E5_MANTISSA_BITS) + 1;
|
||||
assert(exp_shared <= RGB9E5_MAX_VALID_BIASED_EXP);
|
||||
assert(exp_shared >= 0);
|
||||
/* This exp2 function could be replaced by a table. */
|
||||
denom = exp2(exp_shared - RGB9E5_EXP_BIAS - RGB9E5_MANTISSA_BITS);
|
||||
|
||||
maxm = (int) floor(maxrgb / denom + 0.5);
|
||||
if (maxm == MAX_RGB9E5_MANTISSA+1) {
|
||||
denom *= 2;
|
||||
exp_shared += 1;
|
||||
assert(exp_shared <= RGB9E5_MAX_VALID_BIASED_EXP);
|
||||
} else {
|
||||
assert(maxm <= MAX_RGB9E5_MANTISSA);
|
||||
}
|
||||
|
||||
rm = (int) floor(rc / denom + 0.5);
|
||||
gm = (int) floor(gc / denom + 0.5);
|
||||
bm = (int) floor(bc / denom + 0.5);
|
||||
/*
|
||||
* The spec uses strict round-up behavior (d3d10 disagrees, but in any case
|
||||
* must match what is done above for figuring out exponent).
|
||||
* We avoid the doubles ((int) rc * revdenom + 0.5) by doing the rounding
|
||||
* ourselves (revdenom was adjusted by +1, above).
|
||||
*/
|
||||
rm = (int) (rc.value * revdenom.value);
|
||||
gm = (int) (gc.value * revdenom.value);
|
||||
bm = (int) (bc.value * revdenom.value);
|
||||
rm = (rm & 1) + (rm >> 1);
|
||||
gm = (gm & 1) + (gm >> 1);
|
||||
bm = (bm & 1) + (bm >> 1);
|
||||
|
||||
assert(rm <= MAX_RGB9E5_MANTISSA);
|
||||
assert(gm <= MAX_RGB9E5_MANTISSA);
|
||||
@@ -151,15 +147,15 @@ static inline void rgb9e5_to_float3(unsigned rgb, float retval[3])
|
||||
{
|
||||
rgb9e5 v;
|
||||
int exponent;
|
||||
float scale;
|
||||
float754 scale = {0};
|
||||
|
||||
v.raw = rgb;
|
||||
exponent = v.field.biasedexponent - RGB9E5_EXP_BIAS - RGB9E5_MANTISSA_BITS;
|
||||
scale = exp2f(exponent);
|
||||
scale.field.biasedexponent = exponent + 127;
|
||||
|
||||
retval[0] = v.field.r * scale;
|
||||
retval[1] = v.field.g * scale;
|
||||
retval[2] = v.field.b * scale;
|
||||
retval[0] = v.field.r * scale.value;
|
||||
retval[1] = v.field.g * scale.value;
|
||||
retval[2] = v.field.b * scale.value;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -457,7 +457,7 @@ null_constant_buffer(struct pipe_context *ctx)
|
||||
void
|
||||
util_run_tests(struct pipe_screen *screen)
|
||||
{
|
||||
struct pipe_context *ctx = screen->context_create(screen, NULL);
|
||||
struct pipe_context *ctx = screen->context_create(screen, NULL, 0);
|
||||
|
||||
tgsi_vs_window_space_position(ctx);
|
||||
null_sampler_view(ctx, TGSI_TEXTURE_2D);
|
||||
|
@@ -545,7 +545,6 @@ u_vbuf_translate_find_free_vb_slots(struct u_vbuf *mgr,
|
||||
|
||||
index = ffs(unused_vb_mask) - 1;
|
||||
fallback_vbs[type] = index;
|
||||
unused_vb_mask &= ~(1 << index);
|
||||
/*printf("found slot=%i for type=%i\n", index, type);*/
|
||||
}
|
||||
}
|
||||
|
@@ -1120,7 +1120,7 @@ vl_create_mpeg12_decoder(struct pipe_context *context,
|
||||
|
||||
dec->base = *templat;
|
||||
dec->base.context = context;
|
||||
dec->context = context->screen->context_create(context->screen, NULL);
|
||||
dec->context = context->screen->context_create(context->screen, NULL, 0);
|
||||
|
||||
dec->base.destroy = vl_mpeg12_destroy;
|
||||
dec->base.begin_frame = vl_mpeg12_begin_frame;
|
||||
|
@@ -355,10 +355,6 @@ to be 0.
|
||||
are supported.
|
||||
* ``PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE``: Whether the driver doesn't
|
||||
ignore tgsi_declaration_range::Last for shader inputs and outputs.
|
||||
* ``PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT``: This is the maximum number
|
||||
of iterations that loops are allowed to have to be unrolled. It is only
|
||||
a hint to state trackers. Whether any loops will be unrolled is not
|
||||
guaranteed.
|
||||
|
||||
|
||||
.. _pipe_compute_cap:
|
||||
|
9
src/gallium/drivers/ddebug/Makefile.am
Normal file
9
src/gallium/drivers/ddebug/Makefile.am
Normal file
@@ -0,0 +1,9 @@
|
||||
include Makefile.sources
|
||||
include $(top_srcdir)/src/gallium/Automake.inc
|
||||
|
||||
AM_CFLAGS = \
|
||||
$(GALLIUM_DRIVER_CFLAGS)
|
||||
|
||||
noinst_LTLIBRARIES = libddebug.la
|
||||
|
||||
libddebug_la_SOURCES = $(C_SOURCES)
|
6
src/gallium/drivers/ddebug/Makefile.sources
Normal file
6
src/gallium/drivers/ddebug/Makefile.sources
Normal file
@@ -0,0 +1,6 @@
|
||||
C_SOURCES := \
|
||||
dd_pipe.h \
|
||||
dd_public.h \
|
||||
dd_context.c \
|
||||
dd_draw.c \
|
||||
dd_screen.c
|
771
src/gallium/drivers/ddebug/dd_context.c
Normal file
771
src/gallium/drivers/ddebug/dd_context.c
Normal file
@@ -0,0 +1,771 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2015 Advanced Micro Devices, Inc.
|
||||
* Copyright 2008 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* on the rights to use, copy, modify, merge, publish, distribute, sub
|
||||
* license, and/or sell copies of the Software, and to permit persons to whom
|
||||
* the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#include "dd_pipe.h"
|
||||
#include "tgsi/tgsi_parse.h"
|
||||
#include "util/u_memory.h"
|
||||
|
||||
|
||||
static void
|
||||
safe_memcpy(void *dst, const void *src, size_t size)
|
||||
{
|
||||
if (src)
|
||||
memcpy(dst, src, size);
|
||||
else
|
||||
memset(dst, 0, size);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* queries
|
||||
*/
|
||||
|
||||
static struct dd_query *
|
||||
dd_query(struct pipe_query *query)
|
||||
{
|
||||
return (struct dd_query *)query;
|
||||
}
|
||||
|
||||
static struct pipe_query *
|
||||
dd_query_unwrap(struct pipe_query *query)
|
||||
{
|
||||
if (query) {
|
||||
return dd_query(query)->query;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static struct pipe_query *
|
||||
dd_context_create_query(struct pipe_context *_pipe, unsigned query_type,
|
||||
unsigned index)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
struct pipe_query *query;
|
||||
|
||||
query = pipe->create_query(pipe, query_type, index);
|
||||
|
||||
/* Wrap query object. */
|
||||
if (query) {
|
||||
struct dd_query *dd_query = CALLOC_STRUCT(dd_query);
|
||||
if (dd_query) {
|
||||
dd_query->type = query_type;
|
||||
dd_query->query = query;
|
||||
query = (struct pipe_query *)dd_query;
|
||||
} else {
|
||||
pipe->destroy_query(pipe, query);
|
||||
query = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_destroy_query(struct pipe_context *_pipe,
|
||||
struct pipe_query *query)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
|
||||
pipe->destroy_query(pipe, dd_query_unwrap(query));
|
||||
FREE(query);
|
||||
}
|
||||
|
||||
static boolean
|
||||
dd_context_begin_query(struct pipe_context *_pipe, struct pipe_query *query)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
|
||||
return pipe->begin_query(pipe, dd_query_unwrap(query));
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_end_query(struct pipe_context *_pipe, struct pipe_query *query)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
|
||||
pipe->end_query(pipe, dd_query_unwrap(query));
|
||||
}
|
||||
|
||||
static boolean
|
||||
dd_context_get_query_result(struct pipe_context *_pipe,
|
||||
struct pipe_query *query, boolean wait,
|
||||
union pipe_query_result *result)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
|
||||
return pipe->get_query_result(pipe, dd_query_unwrap(query), wait, result);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_render_condition(struct pipe_context *_pipe,
|
||||
struct pipe_query *query, boolean condition,
|
||||
uint mode)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
|
||||
pipe->render_condition(pipe, dd_query_unwrap(query), condition, mode);
|
||||
dctx->render_cond.query = dd_query(query);
|
||||
dctx->render_cond.condition = condition;
|
||||
dctx->render_cond.mode = mode;
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* constant (immutable) non-shader states
|
||||
*/
|
||||
|
||||
#define DD_CSO_CREATE(name, shortname) \
|
||||
static void * \
|
||||
dd_context_create_##name##_state(struct pipe_context *_pipe, \
|
||||
const struct pipe_##name##_state *state) \
|
||||
{ \
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe; \
|
||||
struct dd_state *hstate = CALLOC_STRUCT(dd_state); \
|
||||
\
|
||||
if (!hstate) \
|
||||
return NULL; \
|
||||
hstate->cso = pipe->create_##name##_state(pipe, state); \
|
||||
hstate->state.shortname = *state; \
|
||||
return hstate; \
|
||||
}
|
||||
|
||||
#define DD_CSO_BIND(name, shortname) \
|
||||
static void \
|
||||
dd_context_bind_##name##_state(struct pipe_context *_pipe, void *state) \
|
||||
{ \
|
||||
struct dd_context *dctx = dd_context(_pipe); \
|
||||
struct pipe_context *pipe = dctx->pipe; \
|
||||
struct dd_state *hstate = state; \
|
||||
\
|
||||
dctx->shortname = hstate; \
|
||||
pipe->bind_##name##_state(pipe, hstate ? hstate->cso : NULL); \
|
||||
}
|
||||
|
||||
#define DD_CSO_DELETE(name) \
|
||||
static void \
|
||||
dd_context_delete_##name##_state(struct pipe_context *_pipe, void *state) \
|
||||
{ \
|
||||
struct dd_context *dctx = dd_context(_pipe); \
|
||||
struct pipe_context *pipe = dctx->pipe; \
|
||||
struct dd_state *hstate = state; \
|
||||
\
|
||||
pipe->delete_##name##_state(pipe, hstate->cso); \
|
||||
FREE(hstate); \
|
||||
}
|
||||
|
||||
#define DD_CSO_WHOLE(name, shortname) \
|
||||
DD_CSO_CREATE(name, shortname) \
|
||||
DD_CSO_BIND(name, shortname) \
|
||||
DD_CSO_DELETE(name)
|
||||
|
||||
DD_CSO_WHOLE(blend, blend)
|
||||
DD_CSO_WHOLE(rasterizer, rs)
|
||||
DD_CSO_WHOLE(depth_stencil_alpha, dsa)
|
||||
|
||||
DD_CSO_CREATE(sampler, sampler)
|
||||
DD_CSO_DELETE(sampler)
|
||||
|
||||
static void
|
||||
dd_context_bind_sampler_states(struct pipe_context *_pipe, unsigned shader,
|
||||
unsigned start, unsigned count, void **states)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
|
||||
memcpy(&dctx->sampler_states[shader][start], states,
|
||||
sizeof(void*) * count);
|
||||
|
||||
if (states) {
|
||||
void *samp[PIPE_MAX_SAMPLERS];
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
struct dd_state *s = states[i];
|
||||
samp[i] = s ? s->cso : NULL;
|
||||
}
|
||||
|
||||
pipe->bind_sampler_states(pipe, shader, start, count, samp);
|
||||
}
|
||||
else
|
||||
pipe->bind_sampler_states(pipe, shader, start, count, NULL);
|
||||
}
|
||||
|
||||
static void *
|
||||
dd_context_create_vertex_elements_state(struct pipe_context *_pipe,
|
||||
unsigned num_elems,
|
||||
const struct pipe_vertex_element *elems)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
struct dd_state *hstate = CALLOC_STRUCT(dd_state);
|
||||
|
||||
if (!hstate)
|
||||
return NULL;
|
||||
hstate->cso = pipe->create_vertex_elements_state(pipe, num_elems, elems);
|
||||
memcpy(hstate->state.velems.velems, elems, sizeof(elems[0]) * num_elems);
|
||||
hstate->state.velems.count = num_elems;
|
||||
return hstate;
|
||||
}
|
||||
|
||||
DD_CSO_BIND(vertex_elements, velems)
|
||||
DD_CSO_DELETE(vertex_elements)
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* shaders
|
||||
*/
|
||||
|
||||
#define DD_SHADER(NAME, name) \
|
||||
static void * \
|
||||
dd_context_create_##name##_state(struct pipe_context *_pipe, \
|
||||
const struct pipe_shader_state *state) \
|
||||
{ \
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe; \
|
||||
struct dd_state *hstate = CALLOC_STRUCT(dd_state); \
|
||||
\
|
||||
if (!hstate) \
|
||||
return NULL; \
|
||||
hstate->cso = pipe->create_##name##_state(pipe, state); \
|
||||
hstate->state.shader = *state; \
|
||||
hstate->state.shader.tokens = tgsi_dup_tokens(state->tokens); \
|
||||
return hstate; \
|
||||
} \
|
||||
\
|
||||
static void \
|
||||
dd_context_bind_##name##_state(struct pipe_context *_pipe, void *state) \
|
||||
{ \
|
||||
struct dd_context *dctx = dd_context(_pipe); \
|
||||
struct pipe_context *pipe = dctx->pipe; \
|
||||
struct dd_state *hstate = state; \
|
||||
\
|
||||
dctx->shaders[PIPE_SHADER_##NAME] = hstate; \
|
||||
pipe->bind_##name##_state(pipe, hstate ? hstate->cso : NULL); \
|
||||
} \
|
||||
\
|
||||
static void \
|
||||
dd_context_delete_##name##_state(struct pipe_context *_pipe, void *state) \
|
||||
{ \
|
||||
struct dd_context *dctx = dd_context(_pipe); \
|
||||
struct pipe_context *pipe = dctx->pipe; \
|
||||
struct dd_state *hstate = state; \
|
||||
\
|
||||
pipe->delete_##name##_state(pipe, hstate->cso); \
|
||||
tgsi_free_tokens(hstate->state.shader.tokens); \
|
||||
FREE(hstate); \
|
||||
}
|
||||
|
||||
DD_SHADER(FRAGMENT, fs)
|
||||
DD_SHADER(VERTEX, vs)
|
||||
DD_SHADER(GEOMETRY, gs)
|
||||
DD_SHADER(TESS_CTRL, tcs)
|
||||
DD_SHADER(TESS_EVAL, tes)
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* immediate states
|
||||
*/
|
||||
|
||||
#define DD_IMM_STATE(name, type, deref, ref) \
|
||||
static void \
|
||||
dd_context_set_##name(struct pipe_context *_pipe, type deref) \
|
||||
{ \
|
||||
struct dd_context *dctx = dd_context(_pipe); \
|
||||
struct pipe_context *pipe = dctx->pipe; \
|
||||
\
|
||||
dctx->name = deref; \
|
||||
pipe->set_##name(pipe, ref); \
|
||||
}
|
||||
|
||||
DD_IMM_STATE(blend_color, const struct pipe_blend_color, *state, state)
|
||||
DD_IMM_STATE(stencil_ref, const struct pipe_stencil_ref, *state, state)
|
||||
DD_IMM_STATE(clip_state, const struct pipe_clip_state, *state, state)
|
||||
DD_IMM_STATE(sample_mask, unsigned, sample_mask, sample_mask)
|
||||
DD_IMM_STATE(min_samples, unsigned, min_samples, min_samples)
|
||||
DD_IMM_STATE(framebuffer_state, const struct pipe_framebuffer_state, *state, state)
|
||||
DD_IMM_STATE(polygon_stipple, const struct pipe_poly_stipple, *state, state)
|
||||
|
||||
static void
|
||||
dd_context_set_constant_buffer(struct pipe_context *_pipe,
|
||||
uint shader, uint index,
|
||||
struct pipe_constant_buffer *constant_buffer)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
|
||||
safe_memcpy(&dctx->constant_buffers[shader][index], constant_buffer,
|
||||
sizeof(*constant_buffer));
|
||||
pipe->set_constant_buffer(pipe, shader, index, constant_buffer);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_set_scissor_states(struct pipe_context *_pipe,
|
||||
unsigned start_slot, unsigned num_scissors,
|
||||
const struct pipe_scissor_state *states)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
|
||||
safe_memcpy(&dctx->scissors[start_slot], states,
|
||||
sizeof(*states) * num_scissors);
|
||||
pipe->set_scissor_states(pipe, start_slot, num_scissors, states);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_set_viewport_states(struct pipe_context *_pipe,
|
||||
unsigned start_slot, unsigned num_viewports,
|
||||
const struct pipe_viewport_state *states)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
|
||||
safe_memcpy(&dctx->viewports[start_slot], states,
|
||||
sizeof(*states) * num_viewports);
|
||||
pipe->set_viewport_states(pipe, start_slot, num_viewports, states);
|
||||
}
|
||||
|
||||
static void dd_context_set_tess_state(struct pipe_context *_pipe,
|
||||
const float default_outer_level[4],
|
||||
const float default_inner_level[2])
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
|
||||
memcpy(dctx->tess_default_levels, default_outer_level, sizeof(float) * 4);
|
||||
memcpy(dctx->tess_default_levels+4, default_inner_level, sizeof(float) * 2);
|
||||
pipe->set_tess_state(pipe, default_outer_level, default_inner_level);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* views
|
||||
*/
|
||||
|
||||
static struct pipe_surface *
|
||||
dd_context_create_surface(struct pipe_context *_pipe,
|
||||
struct pipe_resource *resource,
|
||||
const struct pipe_surface *surf_tmpl)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
struct pipe_surface *view =
|
||||
pipe->create_surface(pipe, resource, surf_tmpl);
|
||||
|
||||
if (!view)
|
||||
return NULL;
|
||||
view->context = _pipe;
|
||||
return view;
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_surface_destroy(struct pipe_context *_pipe,
|
||||
struct pipe_surface *surf)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
|
||||
pipe->surface_destroy(pipe, surf);
|
||||
}
|
||||
|
||||
static struct pipe_sampler_view *
|
||||
dd_context_create_sampler_view(struct pipe_context *_pipe,
|
||||
struct pipe_resource *resource,
|
||||
const struct pipe_sampler_view *templ)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
struct pipe_sampler_view *view =
|
||||
pipe->create_sampler_view(pipe, resource, templ);
|
||||
|
||||
if (!view)
|
||||
return NULL;
|
||||
view->context = _pipe;
|
||||
return view;
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_sampler_view_destroy(struct pipe_context *_pipe,
|
||||
struct pipe_sampler_view *view)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
|
||||
pipe->sampler_view_destroy(pipe, view);
|
||||
}
|
||||
|
||||
static struct pipe_image_view *
|
||||
dd_context_create_image_view(struct pipe_context *_pipe,
|
||||
struct pipe_resource *resource,
|
||||
const struct pipe_image_view *templ)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
struct pipe_image_view *view =
|
||||
pipe->create_image_view(pipe, resource, templ);
|
||||
|
||||
if (!view)
|
||||
return NULL;
|
||||
view->context = _pipe;
|
||||
return view;
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_image_view_destroy(struct pipe_context *_pipe,
|
||||
struct pipe_image_view *view)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
|
||||
pipe->image_view_destroy(pipe, view);
|
||||
}
|
||||
|
||||
static struct pipe_stream_output_target *
|
||||
dd_context_create_stream_output_target(struct pipe_context *_pipe,
|
||||
struct pipe_resource *res,
|
||||
unsigned buffer_offset,
|
||||
unsigned buffer_size)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
struct pipe_stream_output_target *view =
|
||||
pipe->create_stream_output_target(pipe, res, buffer_offset,
|
||||
buffer_size);
|
||||
|
||||
if (!view)
|
||||
return NULL;
|
||||
view->context = _pipe;
|
||||
return view;
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_stream_output_target_destroy(struct pipe_context *_pipe,
|
||||
struct pipe_stream_output_target *target)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
|
||||
pipe->stream_output_target_destroy(pipe, target);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* set states
|
||||
*/
|
||||
|
||||
static void
|
||||
dd_context_set_sampler_views(struct pipe_context *_pipe, unsigned shader,
|
||||
unsigned start, unsigned num,
|
||||
struct pipe_sampler_view **views)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
|
||||
safe_memcpy(&dctx->sampler_views[shader][start], views,
|
||||
sizeof(views[0]) * num);
|
||||
pipe->set_sampler_views(pipe, shader, start, num, views);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_set_shader_images(struct pipe_context *_pipe, unsigned shader,
|
||||
unsigned start, unsigned num,
|
||||
struct pipe_image_view **views)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
|
||||
safe_memcpy(&dctx->shader_images[shader][start], views,
|
||||
sizeof(views[0]) * num);
|
||||
pipe->set_shader_images(pipe, shader, start, num, views);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_set_shader_buffers(struct pipe_context *_pipe, unsigned shader,
|
||||
unsigned start, unsigned num_buffers,
|
||||
struct pipe_shader_buffer *buffers)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
|
||||
safe_memcpy(&dctx->shader_buffers[shader][start], buffers,
|
||||
sizeof(buffers[0]) * num_buffers);
|
||||
pipe->set_shader_buffers(pipe, shader, start, num_buffers, buffers);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_set_vertex_buffers(struct pipe_context *_pipe,
|
||||
unsigned start, unsigned num_buffers,
|
||||
const struct pipe_vertex_buffer *buffers)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
|
||||
safe_memcpy(&dctx->vertex_buffers[start], buffers,
|
||||
sizeof(buffers[0]) * num_buffers);
|
||||
pipe->set_vertex_buffers(pipe, start, num_buffers, buffers);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_set_index_buffer(struct pipe_context *_pipe,
|
||||
const struct pipe_index_buffer *ib)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
|
||||
safe_memcpy(&dctx->index_buffer, ib, sizeof(*ib));
|
||||
pipe->set_index_buffer(pipe, ib);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_set_stream_output_targets(struct pipe_context *_pipe,
|
||||
unsigned num_targets,
|
||||
struct pipe_stream_output_target **tgs,
|
||||
const unsigned *offsets)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
|
||||
dctx->num_so_targets = num_targets;
|
||||
safe_memcpy(dctx->so_targets, tgs, sizeof(*tgs) * num_targets);
|
||||
safe_memcpy(dctx->so_offsets, offsets, sizeof(*offsets) * num_targets);
|
||||
pipe->set_stream_output_targets(pipe, num_targets, tgs, offsets);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_destroy(struct pipe_context *_pipe)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
|
||||
pipe->destroy(pipe);
|
||||
FREE(dctx);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* transfer
|
||||
*/
|
||||
|
||||
static void *
|
||||
dd_context_transfer_map(struct pipe_context *_pipe,
|
||||
struct pipe_resource *resource, unsigned level,
|
||||
unsigned usage, const struct pipe_box *box,
|
||||
struct pipe_transfer **transfer)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
|
||||
return pipe->transfer_map(pipe, resource, level, usage, box, transfer);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_transfer_flush_region(struct pipe_context *_pipe,
|
||||
struct pipe_transfer *transfer,
|
||||
const struct pipe_box *box)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
|
||||
pipe->transfer_flush_region(pipe, transfer, box);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_transfer_unmap(struct pipe_context *_pipe,
|
||||
struct pipe_transfer *transfer)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
|
||||
pipe->transfer_unmap(pipe, transfer);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_transfer_inline_write(struct pipe_context *_pipe,
|
||||
struct pipe_resource *resource,
|
||||
unsigned level, unsigned usage,
|
||||
const struct pipe_box *box,
|
||||
const void *data, unsigned stride,
|
||||
unsigned layer_stride)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
|
||||
pipe->transfer_inline_write(pipe, resource, level, usage, box, data,
|
||||
stride, layer_stride);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* miscellaneous
|
||||
*/
|
||||
|
||||
static void
|
||||
dd_context_texture_barrier(struct pipe_context *_pipe)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
|
||||
pipe->texture_barrier(pipe);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_memory_barrier(struct pipe_context *_pipe, unsigned flags)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
|
||||
pipe->memory_barrier(pipe, flags);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_get_sample_position(struct pipe_context *_pipe,
|
||||
unsigned sample_count, unsigned sample_index,
|
||||
float *out_value)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
|
||||
return pipe->get_sample_position(pipe, sample_count, sample_index,
|
||||
out_value);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_invalidate_resource(struct pipe_context *_pipe,
|
||||
struct pipe_resource *resource)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
|
||||
pipe->invalidate_resource(pipe, resource);
|
||||
}
|
||||
|
||||
static enum pipe_reset_status
|
||||
dd_context_get_device_reset_status(struct pipe_context *_pipe)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
|
||||
return pipe->get_device_reset_status(pipe);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_dump_debug_state(struct pipe_context *_pipe, FILE *stream,
|
||||
unsigned flags)
|
||||
{
|
||||
struct pipe_context *pipe = dd_context(_pipe)->pipe;
|
||||
|
||||
return pipe->dump_debug_state(pipe, stream, flags);
|
||||
}
|
||||
|
||||
struct pipe_context *
|
||||
dd_context_create(struct dd_screen *dscreen, struct pipe_context *pipe)
|
||||
{
|
||||
struct dd_context *dctx;
|
||||
|
||||
if (!pipe)
|
||||
return NULL;
|
||||
|
||||
dctx = CALLOC_STRUCT(dd_context);
|
||||
if (!dctx) {
|
||||
pipe->destroy(pipe);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dctx->pipe = pipe;
|
||||
dctx->base.priv = pipe->priv; /* expose wrapped priv data */
|
||||
dctx->base.screen = &dscreen->base;
|
||||
|
||||
dctx->base.destroy = dd_context_destroy;
|
||||
|
||||
CTX_INIT(render_condition);
|
||||
CTX_INIT(create_query);
|
||||
CTX_INIT(destroy_query);
|
||||
CTX_INIT(begin_query);
|
||||
CTX_INIT(end_query);
|
||||
CTX_INIT(get_query_result);
|
||||
CTX_INIT(create_blend_state);
|
||||
CTX_INIT(bind_blend_state);
|
||||
CTX_INIT(delete_blend_state);
|
||||
CTX_INIT(create_sampler_state);
|
||||
CTX_INIT(bind_sampler_states);
|
||||
CTX_INIT(delete_sampler_state);
|
||||
CTX_INIT(create_rasterizer_state);
|
||||
CTX_INIT(bind_rasterizer_state);
|
||||
CTX_INIT(delete_rasterizer_state);
|
||||
CTX_INIT(create_depth_stencil_alpha_state);
|
||||
CTX_INIT(bind_depth_stencil_alpha_state);
|
||||
CTX_INIT(delete_depth_stencil_alpha_state);
|
||||
CTX_INIT(create_fs_state);
|
||||
CTX_INIT(bind_fs_state);
|
||||
CTX_INIT(delete_fs_state);
|
||||
CTX_INIT(create_vs_state);
|
||||
CTX_INIT(bind_vs_state);
|
||||
CTX_INIT(delete_vs_state);
|
||||
CTX_INIT(create_gs_state);
|
||||
CTX_INIT(bind_gs_state);
|
||||
CTX_INIT(delete_gs_state);
|
||||
CTX_INIT(create_tcs_state);
|
||||
CTX_INIT(bind_tcs_state);
|
||||
CTX_INIT(delete_tcs_state);
|
||||
CTX_INIT(create_tes_state);
|
||||
CTX_INIT(bind_tes_state);
|
||||
CTX_INIT(delete_tes_state);
|
||||
CTX_INIT(create_vertex_elements_state);
|
||||
CTX_INIT(bind_vertex_elements_state);
|
||||
CTX_INIT(delete_vertex_elements_state);
|
||||
CTX_INIT(set_blend_color);
|
||||
CTX_INIT(set_stencil_ref);
|
||||
CTX_INIT(set_sample_mask);
|
||||
CTX_INIT(set_min_samples);
|
||||
CTX_INIT(set_clip_state);
|
||||
CTX_INIT(set_constant_buffer);
|
||||
CTX_INIT(set_framebuffer_state);
|
||||
CTX_INIT(set_polygon_stipple);
|
||||
CTX_INIT(set_scissor_states);
|
||||
CTX_INIT(set_viewport_states);
|
||||
CTX_INIT(set_sampler_views);
|
||||
CTX_INIT(set_tess_state);
|
||||
CTX_INIT(set_shader_buffers);
|
||||
CTX_INIT(set_shader_images);
|
||||
CTX_INIT(set_vertex_buffers);
|
||||
CTX_INIT(set_index_buffer);
|
||||
CTX_INIT(create_stream_output_target);
|
||||
CTX_INIT(stream_output_target_destroy);
|
||||
CTX_INIT(set_stream_output_targets);
|
||||
CTX_INIT(create_sampler_view);
|
||||
CTX_INIT(sampler_view_destroy);
|
||||
CTX_INIT(create_surface);
|
||||
CTX_INIT(surface_destroy);
|
||||
CTX_INIT(create_image_view);
|
||||
CTX_INIT(image_view_destroy);
|
||||
CTX_INIT(transfer_map);
|
||||
CTX_INIT(transfer_flush_region);
|
||||
CTX_INIT(transfer_unmap);
|
||||
CTX_INIT(transfer_inline_write);
|
||||
CTX_INIT(texture_barrier);
|
||||
CTX_INIT(memory_barrier);
|
||||
/* create_video_codec */
|
||||
/* create_video_buffer */
|
||||
/* create_compute_state */
|
||||
/* bind_compute_state */
|
||||
/* delete_compute_state */
|
||||
/* set_compute_resources */
|
||||
/* set_global_binding */
|
||||
CTX_INIT(get_sample_position);
|
||||
CTX_INIT(invalidate_resource);
|
||||
CTX_INIT(get_device_reset_status);
|
||||
CTX_INIT(dump_debug_state);
|
||||
|
||||
dd_init_draw_functions(dctx);
|
||||
|
||||
dctx->sample_mask = ~0;
|
||||
return &dctx->base;
|
||||
}
|
807
src/gallium/drivers/ddebug/dd_draw.c
Normal file
807
src/gallium/drivers/ddebug/dd_draw.c
Normal file
@@ -0,0 +1,807 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2015 Advanced Micro Devices, Inc.
|
||||
* Copyright 2008 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* on the rights to use, copy, modify, merge, publish, distribute, sub
|
||||
* license, and/or sell copies of the Software, and to permit persons to whom
|
||||
* the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#include "dd_pipe.h"
|
||||
|
||||
#include "util/u_dump.h"
|
||||
#include "util/u_format.h"
|
||||
#include "tgsi/tgsi_scan.h"
|
||||
#include "os/os_process.h"
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
||||
enum call_type
|
||||
{
|
||||
CALL_DRAW_VBO,
|
||||
CALL_RESOURCE_COPY_REGION,
|
||||
CALL_BLIT,
|
||||
CALL_FLUSH_RESOURCE,
|
||||
CALL_CLEAR,
|
||||
CALL_CLEAR_BUFFER,
|
||||
CALL_CLEAR_RENDER_TARGET,
|
||||
CALL_CLEAR_DEPTH_STENCIL,
|
||||
};
|
||||
|
||||
struct call_resource_copy_region
|
||||
{
|
||||
struct pipe_resource *dst;
|
||||
unsigned dst_level;
|
||||
unsigned dstx, dsty, dstz;
|
||||
struct pipe_resource *src;
|
||||
unsigned src_level;
|
||||
const struct pipe_box *src_box;
|
||||
};
|
||||
|
||||
struct call_clear
|
||||
{
|
||||
unsigned buffers;
|
||||
const union pipe_color_union *color;
|
||||
double depth;
|
||||
unsigned stencil;
|
||||
};
|
||||
|
||||
struct call_clear_buffer
|
||||
{
|
||||
struct pipe_resource *res;
|
||||
unsigned offset;
|
||||
unsigned size;
|
||||
const void *clear_value;
|
||||
int clear_value_size;
|
||||
};
|
||||
|
||||
struct dd_call
|
||||
{
|
||||
enum call_type type;
|
||||
|
||||
union {
|
||||
struct pipe_draw_info draw_vbo;
|
||||
struct call_resource_copy_region resource_copy_region;
|
||||
struct pipe_blit_info blit;
|
||||
struct pipe_resource *flush_resource;
|
||||
struct call_clear clear;
|
||||
struct call_clear_buffer clear_buffer;
|
||||
} info;
|
||||
};
|
||||
|
||||
|
||||
static FILE *
|
||||
dd_get_file_stream(struct dd_context *dctx)
|
||||
{
|
||||
struct pipe_screen *screen = dctx->pipe->screen;
|
||||
static unsigned index;
|
||||
char proc_name[128], dir[256], name[512];
|
||||
FILE *f;
|
||||
|
||||
if (!os_get_process_name(proc_name, sizeof(proc_name))) {
|
||||
fprintf(stderr, "dd: can't get the process name\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
snprintf(dir, sizeof(dir), "%s/"DD_DIR, debug_get_option("HOME", "."));
|
||||
|
||||
if (mkdir(dir, 0774) && errno != EEXIST) {
|
||||
fprintf(stderr, "dd: can't create a directory (%i)\n", errno);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
snprintf(name, sizeof(name), "%s/%s_%u_%08u", dir, proc_name, getpid(), index++);
|
||||
f = fopen(name, "w");
|
||||
if (!f) {
|
||||
fprintf(stderr, "dd: can't open file %s\n", name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fprintf(f, "Driver vendor: %s\n", screen->get_vendor(screen));
|
||||
fprintf(f, "Device vendor: %s\n", screen->get_device_vendor(screen));
|
||||
fprintf(f, "Device name: %s\n\n", screen->get_name(screen));
|
||||
return f;
|
||||
}
|
||||
|
||||
static void
|
||||
dd_close_file_stream(FILE *f)
|
||||
{
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
static unsigned
|
||||
dd_num_active_viewports(struct dd_context *dctx)
|
||||
{
|
||||
struct tgsi_shader_info info;
|
||||
const struct tgsi_token *tokens;
|
||||
|
||||
if (dctx->shaders[PIPE_SHADER_GEOMETRY])
|
||||
tokens = dctx->shaders[PIPE_SHADER_GEOMETRY]->state.shader.tokens;
|
||||
else if (dctx->shaders[PIPE_SHADER_TESS_EVAL])
|
||||
tokens = dctx->shaders[PIPE_SHADER_TESS_EVAL]->state.shader.tokens;
|
||||
else if (dctx->shaders[PIPE_SHADER_VERTEX])
|
||||
tokens = dctx->shaders[PIPE_SHADER_VERTEX]->state.shader.tokens;
|
||||
else
|
||||
return 1;
|
||||
|
||||
tgsi_scan_shader(tokens, &info);
|
||||
return info.writes_viewport_index ? PIPE_MAX_VIEWPORTS : 1;
|
||||
}
|
||||
|
||||
#define COLOR_RESET "\033[0m"
|
||||
#define COLOR_SHADER "\033[1;32m"
|
||||
#define COLOR_STATE "\033[1;33m"
|
||||
|
||||
#define DUMP(name, var) do { \
|
||||
fprintf(f, COLOR_STATE #name ": " COLOR_RESET); \
|
||||
util_dump_##name(f, var); \
|
||||
fprintf(f, "\n"); \
|
||||
} while(0)
|
||||
|
||||
#define DUMP_I(name, var, i) do { \
|
||||
fprintf(f, COLOR_STATE #name " %i: " COLOR_RESET, i); \
|
||||
util_dump_##name(f, var); \
|
||||
fprintf(f, "\n"); \
|
||||
} while(0)
|
||||
|
||||
#define DUMP_M(name, var, member) do { \
|
||||
fprintf(f, " " #member ": "); \
|
||||
util_dump_##name(f, (var)->member); \
|
||||
fprintf(f, "\n"); \
|
||||
} while(0)
|
||||
|
||||
#define DUMP_M_ADDR(name, var, member) do { \
|
||||
fprintf(f, " " #member ": "); \
|
||||
util_dump_##name(f, &(var)->member); \
|
||||
fprintf(f, "\n"); \
|
||||
} while(0)
|
||||
|
||||
static void
|
||||
print_named_value(FILE *f, const char *name, int value)
|
||||
{
|
||||
fprintf(f, COLOR_STATE "%s" COLOR_RESET " = %i\n", name, value);
|
||||
}
|
||||
|
||||
static void
|
||||
print_named_xvalue(FILE *f, const char *name, int value)
|
||||
{
|
||||
fprintf(f, COLOR_STATE "%s" COLOR_RESET " = 0x%08x\n", name, value);
|
||||
}
|
||||
|
||||
static void
|
||||
util_dump_uint(FILE *f, unsigned i)
|
||||
{
|
||||
fprintf(f, "%u", i);
|
||||
}
|
||||
|
||||
static void
|
||||
util_dump_hex(FILE *f, unsigned i)
|
||||
{
|
||||
fprintf(f, "0x%x", i);
|
||||
}
|
||||
|
||||
static void
|
||||
util_dump_double(FILE *f, double d)
|
||||
{
|
||||
fprintf(f, "%f", d);
|
||||
}
|
||||
|
||||
static void
|
||||
util_dump_format(FILE *f, enum pipe_format format)
|
||||
{
|
||||
fprintf(f, "%s", util_format_name(format));
|
||||
}
|
||||
|
||||
static void
|
||||
util_dump_color_union(FILE *f, const union pipe_color_union *color)
|
||||
{
|
||||
fprintf(f, "{f = {%f, %f, %f, %f}, ui = {%u, %u, %u, %u}",
|
||||
color->f[0], color->f[1], color->f[2], color->f[3],
|
||||
color->ui[0], color->ui[1], color->ui[2], color->ui[3]);
|
||||
}
|
||||
|
||||
static void
|
||||
util_dump_query(FILE *f, struct dd_query *query)
|
||||
{
|
||||
if (query->type >= PIPE_QUERY_DRIVER_SPECIFIC)
|
||||
fprintf(f, "PIPE_QUERY_DRIVER_SPECIFIC + %i",
|
||||
query->type - PIPE_QUERY_DRIVER_SPECIFIC);
|
||||
else
|
||||
fprintf(f, "%s", util_dump_query_type(query->type, false));
|
||||
}
|
||||
|
||||
static void
|
||||
dd_dump_render_condition(struct dd_context *dctx, FILE *f)
|
||||
{
|
||||
if (dctx->render_cond.query) {
|
||||
fprintf(f, "render condition:\n");
|
||||
DUMP_M(query, &dctx->render_cond, query);
|
||||
DUMP_M(uint, &dctx->render_cond, condition);
|
||||
DUMP_M(uint, &dctx->render_cond, mode);
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dd_dump_draw_vbo(struct dd_context *dctx, struct pipe_draw_info *info, FILE *f)
|
||||
{
|
||||
int sh, i;
|
||||
const char *shader_str[PIPE_SHADER_TYPES];
|
||||
|
||||
shader_str[PIPE_SHADER_VERTEX] = "VERTEX";
|
||||
shader_str[PIPE_SHADER_TESS_CTRL] = "TESS_CTRL";
|
||||
shader_str[PIPE_SHADER_TESS_EVAL] = "TESS_EVAL";
|
||||
shader_str[PIPE_SHADER_GEOMETRY] = "GEOMETRY";
|
||||
shader_str[PIPE_SHADER_FRAGMENT] = "FRAGMENT";
|
||||
shader_str[PIPE_SHADER_COMPUTE] = "COMPUTE";
|
||||
|
||||
DUMP(draw_info, info);
|
||||
if (info->indexed) {
|
||||
DUMP(index_buffer, &dctx->index_buffer);
|
||||
if (dctx->index_buffer.buffer)
|
||||
DUMP_M(resource, &dctx->index_buffer, buffer);
|
||||
}
|
||||
if (info->count_from_stream_output)
|
||||
DUMP_M(stream_output_target, info,
|
||||
count_from_stream_output);
|
||||
if (info->indirect)
|
||||
DUMP_M(resource, info, indirect);
|
||||
fprintf(f, "\n");
|
||||
|
||||
/* TODO: dump active queries */
|
||||
|
||||
dd_dump_render_condition(dctx, f);
|
||||
|
||||
for (i = 0; i < PIPE_MAX_ATTRIBS; i++)
|
||||
if (dctx->vertex_buffers[i].buffer ||
|
||||
dctx->vertex_buffers[i].user_buffer) {
|
||||
DUMP_I(vertex_buffer, &dctx->vertex_buffers[i], i);
|
||||
if (dctx->vertex_buffers[i].buffer)
|
||||
DUMP_M(resource, &dctx->vertex_buffers[i], buffer);
|
||||
}
|
||||
|
||||
if (dctx->velems) {
|
||||
print_named_value(f, "num vertex elements",
|
||||
dctx->velems->state.velems.count);
|
||||
for (i = 0; i < dctx->velems->state.velems.count; i++) {
|
||||
fprintf(f, " ");
|
||||
DUMP_I(vertex_element, &dctx->velems->state.velems.velems[i], i);
|
||||
}
|
||||
}
|
||||
|
||||
print_named_value(f, "num stream output targets", dctx->num_so_targets);
|
||||
for (i = 0; i < dctx->num_so_targets; i++)
|
||||
if (dctx->so_targets[i]) {
|
||||
DUMP_I(stream_output_target, dctx->so_targets[i], i);
|
||||
DUMP_M(resource, dctx->so_targets[i], buffer);
|
||||
fprintf(f, " offset = %i\n", dctx->so_offsets[i]);
|
||||
}
|
||||
|
||||
fprintf(f, "\n");
|
||||
for (sh = 0; sh < PIPE_SHADER_TYPES; sh++) {
|
||||
if (sh == PIPE_SHADER_COMPUTE)
|
||||
continue;
|
||||
|
||||
if (sh == PIPE_SHADER_TESS_CTRL &&
|
||||
!dctx->shaders[PIPE_SHADER_TESS_CTRL] &&
|
||||
dctx->shaders[PIPE_SHADER_TESS_EVAL])
|
||||
fprintf(f, "tess_state: {default_outer_level = {%f, %f, %f, %f}, "
|
||||
"default_inner_level = {%f, %f}}\n",
|
||||
dctx->tess_default_levels[0],
|
||||
dctx->tess_default_levels[1],
|
||||
dctx->tess_default_levels[2],
|
||||
dctx->tess_default_levels[3],
|
||||
dctx->tess_default_levels[4],
|
||||
dctx->tess_default_levels[5]);
|
||||
|
||||
if (sh == PIPE_SHADER_FRAGMENT)
|
||||
if (dctx->rs) {
|
||||
unsigned num_viewports = dd_num_active_viewports(dctx);
|
||||
|
||||
if (dctx->rs->state.rs.clip_plane_enable)
|
||||
DUMP(clip_state, &dctx->clip_state);
|
||||
|
||||
for (i = 0; i < num_viewports; i++)
|
||||
DUMP_I(viewport_state, &dctx->viewports[i], i);
|
||||
|
||||
if (dctx->rs->state.rs.scissor)
|
||||
for (i = 0; i < num_viewports; i++)
|
||||
DUMP_I(scissor_state, &dctx->scissors[i], i);
|
||||
|
||||
DUMP(rasterizer_state, &dctx->rs->state.rs);
|
||||
|
||||
if (dctx->rs->state.rs.poly_stipple_enable)
|
||||
DUMP(poly_stipple, &dctx->polygon_stipple);
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
|
||||
if (!dctx->shaders[sh])
|
||||
continue;
|
||||
|
||||
fprintf(f, COLOR_SHADER "begin shader: %s" COLOR_RESET "\n", shader_str[sh]);
|
||||
DUMP(shader_state, &dctx->shaders[sh]->state.shader);
|
||||
|
||||
for (i = 0; i < PIPE_MAX_CONSTANT_BUFFERS; i++)
|
||||
if (dctx->constant_buffers[sh][i].buffer ||
|
||||
dctx->constant_buffers[sh][i].user_buffer) {
|
||||
DUMP_I(constant_buffer, &dctx->constant_buffers[sh][i], i);
|
||||
if (dctx->constant_buffers[sh][i].buffer)
|
||||
DUMP_M(resource, &dctx->constant_buffers[sh][i], buffer);
|
||||
}
|
||||
|
||||
for (i = 0; i < PIPE_MAX_SAMPLERS; i++)
|
||||
if (dctx->sampler_states[sh][i])
|
||||
DUMP_I(sampler_state, &dctx->sampler_states[sh][i]->state.sampler, i);
|
||||
|
||||
for (i = 0; i < PIPE_MAX_SAMPLERS; i++)
|
||||
if (dctx->sampler_views[sh][i]) {
|
||||
DUMP_I(sampler_view, dctx->sampler_views[sh][i], i);
|
||||
DUMP_M(resource, dctx->sampler_views[sh][i], texture);
|
||||
}
|
||||
|
||||
/* TODO: print shader images */
|
||||
/* TODO: print shader buffers */
|
||||
|
||||
fprintf(f, COLOR_SHADER "end shader: %s" COLOR_RESET "\n\n", shader_str[sh]);
|
||||
}
|
||||
|
||||
if (dctx->dsa)
|
||||
DUMP(depth_stencil_alpha_state, &dctx->dsa->state.dsa);
|
||||
DUMP(stencil_ref, &dctx->stencil_ref);
|
||||
|
||||
if (dctx->blend)
|
||||
DUMP(blend_state, &dctx->blend->state.blend);
|
||||
DUMP(blend_color, &dctx->blend_color);
|
||||
|
||||
print_named_value(f, "min_samples", dctx->min_samples);
|
||||
print_named_xvalue(f, "sample_mask", dctx->sample_mask);
|
||||
fprintf(f, "\n");
|
||||
|
||||
DUMP(framebuffer_state, &dctx->framebuffer_state);
|
||||
for (i = 0; i < dctx->framebuffer_state.nr_cbufs; i++)
|
||||
if (dctx->framebuffer_state.cbufs[i]) {
|
||||
fprintf(f, " " COLOR_STATE "cbufs[%i]:" COLOR_RESET "\n ", i);
|
||||
DUMP(surface, dctx->framebuffer_state.cbufs[i]);
|
||||
fprintf(f, " ");
|
||||
DUMP(resource, dctx->framebuffer_state.cbufs[i]->texture);
|
||||
}
|
||||
if (dctx->framebuffer_state.zsbuf) {
|
||||
fprintf(f, " " COLOR_STATE "zsbuf:" COLOR_RESET "\n ");
|
||||
DUMP(surface, dctx->framebuffer_state.zsbuf);
|
||||
fprintf(f, " ");
|
||||
DUMP(resource, dctx->framebuffer_state.zsbuf->texture);
|
||||
}
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
|
||||
static void
|
||||
dd_dump_resource_copy_region(struct dd_context *dctx,
|
||||
struct call_resource_copy_region *info,
|
||||
FILE *f)
|
||||
{
|
||||
fprintf(f, "%s:\n", __func__+8);
|
||||
DUMP_M(resource, info, dst);
|
||||
DUMP_M(uint, info, dst_level);
|
||||
DUMP_M(uint, info, dstx);
|
||||
DUMP_M(uint, info, dsty);
|
||||
DUMP_M(uint, info, dstz);
|
||||
DUMP_M(resource, info, src);
|
||||
DUMP_M(uint, info, src_level);
|
||||
DUMP_M(box, info, src_box);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_dump_blit(struct dd_context *dctx, struct pipe_blit_info *info, FILE *f)
|
||||
{
|
||||
fprintf(f, "%s:\n", __func__+8);
|
||||
DUMP_M(resource, info, dst.resource);
|
||||
DUMP_M(uint, info, dst.level);
|
||||
DUMP_M_ADDR(box, info, dst.box);
|
||||
DUMP_M(format, info, dst.format);
|
||||
|
||||
DUMP_M(resource, info, src.resource);
|
||||
DUMP_M(uint, info, src.level);
|
||||
DUMP_M_ADDR(box, info, src.box);
|
||||
DUMP_M(format, info, src.format);
|
||||
|
||||
DUMP_M(hex, info, mask);
|
||||
DUMP_M(uint, info, filter);
|
||||
DUMP_M(uint, info, scissor_enable);
|
||||
DUMP_M_ADDR(scissor_state, info, scissor);
|
||||
DUMP_M(uint, info, render_condition_enable);
|
||||
|
||||
if (info->render_condition_enable)
|
||||
dd_dump_render_condition(dctx, f);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_dump_flush_resource(struct dd_context *dctx, struct pipe_resource *res,
|
||||
FILE *f)
|
||||
{
|
||||
fprintf(f, "%s:\n", __func__+8);
|
||||
DUMP(resource, res);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_dump_clear(struct dd_context *dctx, struct call_clear *info, FILE *f)
|
||||
{
|
||||
fprintf(f, "%s:\n", __func__+8);
|
||||
DUMP_M(uint, info, buffers);
|
||||
DUMP_M(color_union, info, color);
|
||||
DUMP_M(double, info, depth);
|
||||
DUMP_M(hex, info, stencil);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_dump_clear_buffer(struct dd_context *dctx, struct call_clear_buffer *info,
|
||||
FILE *f)
|
||||
{
|
||||
int i;
|
||||
const char *value = (const char*)info->clear_value;
|
||||
|
||||
fprintf(f, "%s:\n", __func__+8);
|
||||
DUMP_M(resource, info, res);
|
||||
DUMP_M(uint, info, offset);
|
||||
DUMP_M(uint, info, size);
|
||||
DUMP_M(uint, info, clear_value_size);
|
||||
|
||||
fprintf(f, " clear_value:");
|
||||
for (i = 0; i < info->clear_value_size; i++)
|
||||
fprintf(f, " %02x", value[i]);
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
|
||||
static void
|
||||
dd_dump_clear_render_target(struct dd_context *dctx, FILE *f)
|
||||
{
|
||||
fprintf(f, "%s:\n", __func__+8);
|
||||
/* TODO */
|
||||
}
|
||||
|
||||
static void
|
||||
dd_dump_clear_depth_stencil(struct dd_context *dctx, FILE *f)
|
||||
{
|
||||
fprintf(f, "%s:\n", __func__+8);
|
||||
/* TODO */
|
||||
}
|
||||
|
||||
static void
|
||||
dd_dump_driver_state(struct dd_context *dctx, FILE *f, unsigned flags)
|
||||
{
|
||||
if (dctx->pipe->dump_debug_state) {
|
||||
fprintf(f,"\n\n**************************************************"
|
||||
"***************************\n");
|
||||
fprintf(f, "Driver-specific state:\n\n");
|
||||
dctx->pipe->dump_debug_state(dctx->pipe, f, flags);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dd_dump_call(struct dd_context *dctx, struct dd_call *call, unsigned flags)
|
||||
{
|
||||
FILE *f = dd_get_file_stream(dctx);
|
||||
|
||||
if (!f)
|
||||
return;
|
||||
|
||||
switch (call->type) {
|
||||
case CALL_DRAW_VBO:
|
||||
dd_dump_draw_vbo(dctx, &call->info.draw_vbo, f);
|
||||
break;
|
||||
case CALL_RESOURCE_COPY_REGION:
|
||||
dd_dump_resource_copy_region(dctx, &call->info.resource_copy_region, f);
|
||||
break;
|
||||
case CALL_BLIT:
|
||||
dd_dump_blit(dctx, &call->info.blit, f);
|
||||
break;
|
||||
case CALL_FLUSH_RESOURCE:
|
||||
dd_dump_flush_resource(dctx, call->info.flush_resource, f);
|
||||
break;
|
||||
case CALL_CLEAR:
|
||||
dd_dump_clear(dctx, &call->info.clear, f);
|
||||
break;
|
||||
case CALL_CLEAR_BUFFER:
|
||||
dd_dump_clear_buffer(dctx, &call->info.clear_buffer, f);
|
||||
break;
|
||||
case CALL_CLEAR_RENDER_TARGET:
|
||||
dd_dump_clear_render_target(dctx, f);
|
||||
break;
|
||||
case CALL_CLEAR_DEPTH_STENCIL:
|
||||
dd_dump_clear_depth_stencil(dctx, f);
|
||||
}
|
||||
|
||||
dd_dump_driver_state(dctx, f, flags);
|
||||
dd_close_file_stream(f);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_kill_process(void)
|
||||
{
|
||||
sync();
|
||||
fprintf(stderr, "dd: Aborting the process...\n");
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
abort();
|
||||
}
|
||||
|
||||
static bool
|
||||
dd_flush_and_check_hang(struct dd_context *dctx,
|
||||
struct pipe_fence_handle **flush_fence,
|
||||
unsigned flush_flags)
|
||||
{
|
||||
struct pipe_fence_handle *fence = NULL;
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
struct pipe_screen *screen = pipe->screen;
|
||||
uint64_t timeout_ms = dd_screen(dctx->base.screen)->timeout_ms;
|
||||
bool idle;
|
||||
|
||||
assert(timeout_ms > 0);
|
||||
|
||||
pipe->flush(pipe, &fence, flush_flags);
|
||||
if (flush_fence)
|
||||
screen->fence_reference(screen, flush_fence, fence);
|
||||
if (!fence)
|
||||
return false;
|
||||
|
||||
idle = screen->fence_finish(screen, fence, timeout_ms * 1000000);
|
||||
screen->fence_reference(screen, &fence, NULL);
|
||||
if (!idle)
|
||||
fprintf(stderr, "dd: GPU hang detected!\n");
|
||||
return !idle;
|
||||
}
|
||||
|
||||
static void
|
||||
dd_flush_and_handle_hang(struct dd_context *dctx,
|
||||
struct pipe_fence_handle **fence, unsigned flags,
|
||||
const char *cause)
|
||||
{
|
||||
if (dd_flush_and_check_hang(dctx, fence, flags)) {
|
||||
FILE *f = dd_get_file_stream(dctx);
|
||||
|
||||
if (f) {
|
||||
fprintf(f, "dd: %s.\n", cause);
|
||||
dd_dump_driver_state(dctx, f, PIPE_DEBUG_DEVICE_IS_HUNG);
|
||||
dd_close_file_stream(f);
|
||||
}
|
||||
|
||||
/* Terminate the process to prevent future hangs. */
|
||||
dd_kill_process();
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_flush(struct pipe_context *_pipe,
|
||||
struct pipe_fence_handle **fence, unsigned flags)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
|
||||
switch (dd_screen(dctx->base.screen)->mode) {
|
||||
case DD_DETECT_HANGS:
|
||||
dd_flush_and_handle_hang(dctx, fence, flags,
|
||||
"GPU hang detected in pipe->flush()");
|
||||
break;
|
||||
case DD_DUMP_ALL_CALLS:
|
||||
pipe->flush(pipe, fence, flags);
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dd_before_draw(struct dd_context *dctx)
|
||||
{
|
||||
if (dd_screen(dctx->base.screen)->mode == DD_DETECT_HANGS &&
|
||||
!dd_screen(dctx->base.screen)->no_flush)
|
||||
dd_flush_and_handle_hang(dctx, NULL, 0,
|
||||
"GPU hang most likely caused by internal "
|
||||
"driver commands");
|
||||
}
|
||||
|
||||
static void
|
||||
dd_after_draw(struct dd_context *dctx, struct dd_call *call)
|
||||
{
|
||||
switch (dd_screen(dctx->base.screen)->mode) {
|
||||
case DD_DETECT_HANGS:
|
||||
if (!dd_screen(dctx->base.screen)->no_flush &&
|
||||
dd_flush_and_check_hang(dctx, NULL, 0)) {
|
||||
dd_dump_call(dctx, call, PIPE_DEBUG_DEVICE_IS_HUNG);
|
||||
|
||||
/* Terminate the process to prevent future hangs. */
|
||||
dd_kill_process();
|
||||
}
|
||||
break;
|
||||
case DD_DUMP_ALL_CALLS:
|
||||
dd_dump_call(dctx, call, 0);
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_draw_vbo(struct pipe_context *_pipe,
|
||||
const struct pipe_draw_info *info)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
struct dd_call call;
|
||||
|
||||
call.type = CALL_DRAW_VBO;
|
||||
call.info.draw_vbo = *info;
|
||||
|
||||
dd_before_draw(dctx);
|
||||
pipe->draw_vbo(pipe, info);
|
||||
dd_after_draw(dctx, &call);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_resource_copy_region(struct pipe_context *_pipe,
|
||||
struct pipe_resource *dst, unsigned dst_level,
|
||||
unsigned dstx, unsigned dsty, unsigned dstz,
|
||||
struct pipe_resource *src, unsigned src_level,
|
||||
const struct pipe_box *src_box)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
struct dd_call call;
|
||||
|
||||
call.type = CALL_RESOURCE_COPY_REGION;
|
||||
call.info.resource_copy_region.dst = dst;
|
||||
call.info.resource_copy_region.dst_level = dst_level;
|
||||
call.info.resource_copy_region.dstx = dstx;
|
||||
call.info.resource_copy_region.dsty = dsty;
|
||||
call.info.resource_copy_region.dstz = dstz;
|
||||
call.info.resource_copy_region.src = src;
|
||||
call.info.resource_copy_region.src_level = src_level;
|
||||
call.info.resource_copy_region.src_box = src_box;
|
||||
|
||||
dd_before_draw(dctx);
|
||||
pipe->resource_copy_region(pipe,
|
||||
dst, dst_level, dstx, dsty, dstz,
|
||||
src, src_level, src_box);
|
||||
dd_after_draw(dctx, &call);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_blit(struct pipe_context *_pipe, const struct pipe_blit_info *info)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
struct dd_call call;
|
||||
|
||||
call.type = CALL_BLIT;
|
||||
call.info.blit = *info;
|
||||
|
||||
dd_before_draw(dctx);
|
||||
pipe->blit(pipe, info);
|
||||
dd_after_draw(dctx, &call);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_flush_resource(struct pipe_context *_pipe,
|
||||
struct pipe_resource *resource)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
struct dd_call call;
|
||||
|
||||
call.type = CALL_FLUSH_RESOURCE;
|
||||
call.info.flush_resource = resource;
|
||||
|
||||
dd_before_draw(dctx);
|
||||
pipe->flush_resource(pipe, resource);
|
||||
dd_after_draw(dctx, &call);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_clear(struct pipe_context *_pipe, unsigned buffers,
|
||||
const union pipe_color_union *color, double depth,
|
||||
unsigned stencil)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
struct dd_call call;
|
||||
|
||||
call.type = CALL_CLEAR;
|
||||
call.info.clear.buffers = buffers;
|
||||
call.info.clear.color = color;
|
||||
call.info.clear.depth = depth;
|
||||
call.info.clear.stencil = stencil;
|
||||
|
||||
dd_before_draw(dctx);
|
||||
pipe->clear(pipe, buffers, color, depth, stencil);
|
||||
dd_after_draw(dctx, &call);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_clear_render_target(struct pipe_context *_pipe,
|
||||
struct pipe_surface *dst,
|
||||
const union pipe_color_union *color,
|
||||
unsigned dstx, unsigned dsty,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
struct dd_call call;
|
||||
|
||||
call.type = CALL_CLEAR_RENDER_TARGET;
|
||||
|
||||
dd_before_draw(dctx);
|
||||
pipe->clear_render_target(pipe, dst, color, dstx, dsty, width, height);
|
||||
dd_after_draw(dctx, &call);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_clear_depth_stencil(struct pipe_context *_pipe,
|
||||
struct pipe_surface *dst, unsigned clear_flags,
|
||||
double depth, unsigned stencil, unsigned dstx,
|
||||
unsigned dsty, unsigned width, unsigned height)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
struct dd_call call;
|
||||
|
||||
call.type = CALL_CLEAR_DEPTH_STENCIL;
|
||||
|
||||
dd_before_draw(dctx);
|
||||
pipe->clear_depth_stencil(pipe, dst, clear_flags, depth, stencil,
|
||||
dstx, dsty, width, height);
|
||||
dd_after_draw(dctx, &call);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_context_clear_buffer(struct pipe_context *_pipe, struct pipe_resource *res,
|
||||
unsigned offset, unsigned size,
|
||||
const void *clear_value, int clear_value_size)
|
||||
{
|
||||
struct dd_context *dctx = dd_context(_pipe);
|
||||
struct pipe_context *pipe = dctx->pipe;
|
||||
struct dd_call call;
|
||||
|
||||
call.type = CALL_CLEAR_BUFFER;
|
||||
call.info.clear_buffer.res = res;
|
||||
call.info.clear_buffer.offset = offset;
|
||||
call.info.clear_buffer.size = size;
|
||||
call.info.clear_buffer.clear_value = clear_value;
|
||||
call.info.clear_buffer.clear_value_size = clear_value_size;
|
||||
|
||||
dd_before_draw(dctx);
|
||||
pipe->clear_buffer(pipe, res, offset, size, clear_value, clear_value_size);
|
||||
dd_after_draw(dctx, &call);
|
||||
}
|
||||
|
||||
void
|
||||
dd_init_draw_functions(struct dd_context *dctx)
|
||||
{
|
||||
CTX_INIT(flush);
|
||||
CTX_INIT(draw_vbo);
|
||||
CTX_INIT(resource_copy_region);
|
||||
CTX_INIT(blit);
|
||||
CTX_INIT(clear);
|
||||
CTX_INIT(clear_render_target);
|
||||
CTX_INIT(clear_depth_stencil);
|
||||
CTX_INIT(clear_buffer);
|
||||
CTX_INIT(flush_resource);
|
||||
/* launch_grid */
|
||||
}
|
141
src/gallium/drivers/ddebug/dd_pipe.h
Normal file
141
src/gallium/drivers/ddebug/dd_pipe.h
Normal file
@@ -0,0 +1,141 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2015 Advanced Micro Devices, Inc.
|
||||
* Copyright 2008 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* on the rights to use, copy, modify, merge, publish, distribute, sub
|
||||
* license, and/or sell copies of the Software, and to permit persons to whom
|
||||
* the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef DD_H_
|
||||
#define DD_H_
|
||||
|
||||
#include "pipe/p_context.h"
|
||||
#include "pipe/p_state.h"
|
||||
#include "pipe/p_screen.h"
|
||||
|
||||
/* name of the directory in home */
|
||||
#define DD_DIR "ddebug_dumps"
|
||||
|
||||
enum dd_mode {
|
||||
DD_DETECT_HANGS,
|
||||
DD_DUMP_ALL_CALLS
|
||||
};
|
||||
|
||||
struct dd_screen
|
||||
{
|
||||
struct pipe_screen base;
|
||||
struct pipe_screen *screen;
|
||||
unsigned timeout_ms;
|
||||
enum dd_mode mode;
|
||||
bool no_flush;
|
||||
};
|
||||
|
||||
struct dd_query
|
||||
{
|
||||
unsigned type;
|
||||
struct pipe_query *query;
|
||||
};
|
||||
|
||||
struct dd_state
|
||||
{
|
||||
void *cso;
|
||||
|
||||
union {
|
||||
struct pipe_blend_state blend;
|
||||
struct pipe_depth_stencil_alpha_state dsa;
|
||||
struct pipe_rasterizer_state rs;
|
||||
struct pipe_sampler_state sampler;
|
||||
struct {
|
||||
struct pipe_vertex_element velems[PIPE_MAX_ATTRIBS];
|
||||
unsigned count;
|
||||
} velems;
|
||||
struct pipe_shader_state shader;
|
||||
} state;
|
||||
};
|
||||
|
||||
struct dd_context
|
||||
{
|
||||
struct pipe_context base;
|
||||
struct pipe_context *pipe;
|
||||
|
||||
struct {
|
||||
struct dd_query *query;
|
||||
bool condition;
|
||||
unsigned mode;
|
||||
} render_cond;
|
||||
|
||||
struct pipe_index_buffer index_buffer;
|
||||
struct pipe_vertex_buffer vertex_buffers[PIPE_MAX_ATTRIBS];
|
||||
|
||||
unsigned num_so_targets;
|
||||
struct pipe_stream_output_target *so_targets[PIPE_MAX_SO_BUFFERS];
|
||||
unsigned so_offsets[PIPE_MAX_SO_BUFFERS];
|
||||
|
||||
struct dd_state *shaders[PIPE_SHADER_TYPES];
|
||||
struct pipe_constant_buffer constant_buffers[PIPE_SHADER_TYPES][PIPE_MAX_CONSTANT_BUFFERS];
|
||||
struct pipe_sampler_view *sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
|
||||
struct dd_state *sampler_states[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
|
||||
struct pipe_image_view *shader_images[PIPE_SHADER_TYPES][PIPE_MAX_SHADER_IMAGES];
|
||||
struct pipe_shader_buffer shader_buffers[PIPE_SHADER_TYPES][PIPE_MAX_SHADER_BUFFERS];
|
||||
|
||||
struct dd_state *velems;
|
||||
struct dd_state *rs;
|
||||
struct dd_state *dsa;
|
||||
struct dd_state *blend;
|
||||
|
||||
struct pipe_blend_color blend_color;
|
||||
struct pipe_stencil_ref stencil_ref;
|
||||
unsigned sample_mask;
|
||||
unsigned min_samples;
|
||||
struct pipe_clip_state clip_state;
|
||||
struct pipe_framebuffer_state framebuffer_state;
|
||||
struct pipe_poly_stipple polygon_stipple;
|
||||
struct pipe_scissor_state scissors[PIPE_MAX_VIEWPORTS];
|
||||
struct pipe_viewport_state viewports[PIPE_MAX_VIEWPORTS];
|
||||
float tess_default_levels[6];
|
||||
};
|
||||
|
||||
|
||||
struct pipe_context *
|
||||
dd_context_create(struct dd_screen *dscreen, struct pipe_context *pipe);
|
||||
|
||||
void
|
||||
dd_init_draw_functions(struct dd_context *dctx);
|
||||
|
||||
|
||||
static inline struct dd_context *
|
||||
dd_context(struct pipe_context *pipe)
|
||||
{
|
||||
return (struct dd_context *)pipe;
|
||||
}
|
||||
|
||||
static inline struct dd_screen *
|
||||
dd_screen(struct pipe_screen *screen)
|
||||
{
|
||||
return (struct dd_screen*)screen;
|
||||
}
|
||||
|
||||
|
||||
#define CTX_INIT(_member) \
|
||||
dctx->base._member = dctx->pipe->_member ? dd_context_##_member : NULL
|
||||
|
||||
#endif /* DD_H_ */
|
36
src/gallium/drivers/ddebug/dd_public.h
Normal file
36
src/gallium/drivers/ddebug/dd_public.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2015 Advanced Micro Devices, Inc.
|
||||
* Copyright 2010 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* on the rights to use, copy, modify, merge, publish, distribute, sub
|
||||
* license, and/or sell copies of the Software, and to permit persons to whom
|
||||
* the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef DD_PUBLIC_H_
|
||||
#define DD_PUBLIC_H_
|
||||
|
||||
struct pipe_screen;
|
||||
|
||||
struct pipe_screen *
|
||||
ddebug_screen_create(struct pipe_screen *screen);
|
||||
|
||||
#endif /* DD_PUBLIC_H_ */
|
353
src/gallium/drivers/ddebug/dd_screen.c
Normal file
353
src/gallium/drivers/ddebug/dd_screen.c
Normal file
@@ -0,0 +1,353 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2015 Advanced Micro Devices, Inc.
|
||||
* Copyright 2008 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* on the rights to use, copy, modify, merge, publish, distribute, sub
|
||||
* license, and/or sell copies of the Software, and to permit persons to whom
|
||||
* the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#include "dd_pipe.h"
|
||||
#include "dd_public.h"
|
||||
#include "util/u_memory.h"
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
static const char *
|
||||
dd_screen_get_name(struct pipe_screen *_screen)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
|
||||
return screen->get_name(screen);
|
||||
}
|
||||
|
||||
static const char *
|
||||
dd_screen_get_vendor(struct pipe_screen *_screen)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
|
||||
return screen->get_vendor(screen);
|
||||
}
|
||||
|
||||
static const char *
|
||||
dd_screen_get_device_vendor(struct pipe_screen *_screen)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
|
||||
return screen->get_device_vendor(screen);
|
||||
}
|
||||
|
||||
static int
|
||||
dd_screen_get_param(struct pipe_screen *_screen,
|
||||
enum pipe_cap param)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
|
||||
return screen->get_param(screen, param);
|
||||
}
|
||||
|
||||
static float
|
||||
dd_screen_get_paramf(struct pipe_screen *_screen,
|
||||
enum pipe_capf param)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
|
||||
return screen->get_paramf(screen, param);
|
||||
}
|
||||
|
||||
static int
|
||||
dd_screen_get_shader_param(struct pipe_screen *_screen, unsigned shader,
|
||||
enum pipe_shader_cap param)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
|
||||
return screen->get_shader_param(screen, shader, param);
|
||||
}
|
||||
|
||||
static uint64_t
|
||||
dd_screen_get_timestamp(struct pipe_screen *_screen)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
|
||||
return screen->get_timestamp(screen);
|
||||
}
|
||||
|
||||
static struct pipe_context *
|
||||
dd_screen_context_create(struct pipe_screen *_screen, void *priv,
|
||||
unsigned flags)
|
||||
{
|
||||
struct dd_screen *dscreen = dd_screen(_screen);
|
||||
struct pipe_screen *screen = dscreen->screen;
|
||||
|
||||
flags |= PIPE_CONTEXT_DEBUG;
|
||||
|
||||
return dd_context_create(dscreen,
|
||||
screen->context_create(screen, priv, flags));
|
||||
}
|
||||
|
||||
static boolean
|
||||
dd_screen_is_format_supported(struct pipe_screen *_screen,
|
||||
enum pipe_format format,
|
||||
enum pipe_texture_target target,
|
||||
unsigned sample_count,
|
||||
unsigned tex_usage)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
|
||||
return screen->is_format_supported(screen, format, target, sample_count,
|
||||
tex_usage);
|
||||
}
|
||||
|
||||
static boolean
|
||||
dd_screen_can_create_resource(struct pipe_screen *_screen,
|
||||
const struct pipe_resource *templat)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
|
||||
return screen->can_create_resource(screen, templat);
|
||||
}
|
||||
|
||||
static void
|
||||
dd_screen_flush_frontbuffer(struct pipe_screen *_screen,
|
||||
struct pipe_resource *resource,
|
||||
unsigned level, unsigned layer,
|
||||
void *context_private,
|
||||
struct pipe_box *sub_box)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
|
||||
screen->flush_frontbuffer(screen, resource, level, layer, context_private,
|
||||
sub_box);
|
||||
}
|
||||
|
||||
static int
|
||||
dd_screen_get_driver_query_info(struct pipe_screen *_screen,
|
||||
unsigned index,
|
||||
struct pipe_driver_query_info *info)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
|
||||
return screen->get_driver_query_info(screen, index, info);
|
||||
}
|
||||
|
||||
static int
|
||||
dd_screen_get_driver_query_group_info(struct pipe_screen *_screen,
|
||||
unsigned index,
|
||||
struct pipe_driver_query_group_info *info)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
|
||||
return screen->get_driver_query_group_info(screen, index, info);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* resource
|
||||
*/
|
||||
|
||||
static struct pipe_resource *
|
||||
dd_screen_resource_create(struct pipe_screen *_screen,
|
||||
const struct pipe_resource *templat)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
struct pipe_resource *res = screen->resource_create(screen, templat);
|
||||
|
||||
if (!res)
|
||||
return NULL;
|
||||
res->screen = _screen;
|
||||
return res;
|
||||
}
|
||||
|
||||
static struct pipe_resource *
|
||||
dd_screen_resource_from_handle(struct pipe_screen *_screen,
|
||||
const struct pipe_resource *templ,
|
||||
struct winsys_handle *handle)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
struct pipe_resource *res =
|
||||
screen->resource_from_handle(screen, templ, handle);
|
||||
|
||||
if (!res)
|
||||
return NULL;
|
||||
res->screen = _screen;
|
||||
return res;
|
||||
}
|
||||
|
||||
static struct pipe_resource *
|
||||
dd_screen_resource_from_user_memory(struct pipe_screen *_screen,
|
||||
const struct pipe_resource *templ,
|
||||
void *user_memory)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
struct pipe_resource *res =
|
||||
screen->resource_from_user_memory(screen, templ, user_memory);
|
||||
|
||||
if (!res)
|
||||
return NULL;
|
||||
res->screen = _screen;
|
||||
return res;
|
||||
}
|
||||
|
||||
static void
|
||||
dd_screen_resource_destroy(struct pipe_screen *_screen,
|
||||
struct pipe_resource *res)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
|
||||
screen->resource_destroy(screen, res);
|
||||
}
|
||||
|
||||
static boolean
|
||||
dd_screen_resource_get_handle(struct pipe_screen *_screen,
|
||||
struct pipe_resource *resource,
|
||||
struct winsys_handle *handle)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
|
||||
return screen->resource_get_handle(screen, resource, handle);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* fence
|
||||
*/
|
||||
|
||||
static void
|
||||
dd_screen_fence_reference(struct pipe_screen *_screen,
|
||||
struct pipe_fence_handle **pdst,
|
||||
struct pipe_fence_handle *src)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
|
||||
screen->fence_reference(screen, pdst, src);
|
||||
}
|
||||
|
||||
static boolean
|
||||
dd_screen_fence_finish(struct pipe_screen *_screen,
|
||||
struct pipe_fence_handle *fence,
|
||||
uint64_t timeout)
|
||||
{
|
||||
struct pipe_screen *screen = dd_screen(_screen)->screen;
|
||||
|
||||
return screen->fence_finish(screen, fence, timeout);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* screen
|
||||
*/
|
||||
|
||||
static void
|
||||
dd_screen_destroy(struct pipe_screen *_screen)
|
||||
{
|
||||
struct dd_screen *dscreen = dd_screen(_screen);
|
||||
struct pipe_screen *screen = dscreen->screen;
|
||||
|
||||
screen->destroy(screen);
|
||||
FREE(dscreen);
|
||||
}
|
||||
|
||||
struct pipe_screen *
|
||||
ddebug_screen_create(struct pipe_screen *screen)
|
||||
{
|
||||
struct dd_screen *dscreen;
|
||||
const char *option = debug_get_option("GALLIUM_DDEBUG", NULL);
|
||||
bool dump_always = option && !strcmp(option, "always");
|
||||
bool no_flush = option && strstr(option, "noflush");
|
||||
bool help = option && !strcmp(option, "help");
|
||||
unsigned timeout = 0;
|
||||
|
||||
if (help) {
|
||||
puts("Gallium driver debugger");
|
||||
puts("");
|
||||
puts("Usage:");
|
||||
puts("");
|
||||
puts(" GALLIUM_DDEBUG=always");
|
||||
puts(" Dump context and driver information after every draw call into");
|
||||
puts(" $HOME/"DD_DIR"/.");
|
||||
puts("");
|
||||
puts(" GALLIUM_DDEBUG=[timeout in ms] noflush");
|
||||
puts(" Flush and detect a device hang after every draw call based on the given");
|
||||
puts(" fence timeout and dump context and driver information into");
|
||||
puts(" $HOME/"DD_DIR"/ when a hang is detected.");
|
||||
puts(" If 'noflush' is specified, only detect hangs in pipe->flush.");
|
||||
puts("");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (!option)
|
||||
return screen;
|
||||
if (!dump_always && sscanf(option, "%u", &timeout) != 1)
|
||||
return screen;
|
||||
|
||||
dscreen = CALLOC_STRUCT(dd_screen);
|
||||
if (!dscreen)
|
||||
return NULL;
|
||||
|
||||
#define SCR_INIT(_member) \
|
||||
dscreen->base._member = screen->_member ? dd_screen_##_member : NULL
|
||||
|
||||
dscreen->base.destroy = dd_screen_destroy;
|
||||
dscreen->base.get_name = dd_screen_get_name;
|
||||
dscreen->base.get_vendor = dd_screen_get_vendor;
|
||||
dscreen->base.get_device_vendor = dd_screen_get_device_vendor;
|
||||
dscreen->base.get_param = dd_screen_get_param;
|
||||
dscreen->base.get_paramf = dd_screen_get_paramf;
|
||||
dscreen->base.get_shader_param = dd_screen_get_shader_param;
|
||||
/* get_video_param */
|
||||
/* get_compute_param */
|
||||
SCR_INIT(get_timestamp);
|
||||
dscreen->base.context_create = dd_screen_context_create;
|
||||
dscreen->base.is_format_supported = dd_screen_is_format_supported;
|
||||
/* is_video_format_supported */
|
||||
SCR_INIT(can_create_resource);
|
||||
dscreen->base.resource_create = dd_screen_resource_create;
|
||||
dscreen->base.resource_from_handle = dd_screen_resource_from_handle;
|
||||
SCR_INIT(resource_from_user_memory);
|
||||
dscreen->base.resource_get_handle = dd_screen_resource_get_handle;
|
||||
dscreen->base.resource_destroy = dd_screen_resource_destroy;
|
||||
SCR_INIT(flush_frontbuffer);
|
||||
SCR_INIT(fence_reference);
|
||||
SCR_INIT(fence_finish);
|
||||
SCR_INIT(get_driver_query_info);
|
||||
SCR_INIT(get_driver_query_group_info);
|
||||
|
||||
#undef SCR_INIT
|
||||
|
||||
dscreen->screen = screen;
|
||||
dscreen->timeout_ms = timeout;
|
||||
dscreen->mode = dump_always ? DD_DUMP_ALL_CALLS : DD_DETECT_HANGS;
|
||||
dscreen->no_flush = no_flush;
|
||||
|
||||
switch (dscreen->mode) {
|
||||
case DD_DUMP_ALL_CALLS:
|
||||
fprintf(stderr, "Gallium debugger active. Logging all calls.\n");
|
||||
break;
|
||||
case DD_DETECT_HANGS:
|
||||
fprintf(stderr, "Gallium debugger active. "
|
||||
"The hang detection timout is %i ms.\n", timeout);
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
||||
return &dscreen->base;
|
||||
}
|
@@ -86,7 +86,7 @@ static const uint8_t a20x_primtypes[PIPE_PRIM_MAX] = {
|
||||
};
|
||||
|
||||
struct pipe_context *
|
||||
fd2_context_create(struct pipe_screen *pscreen, void *priv)
|
||||
fd2_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
|
||||
{
|
||||
struct fd_screen *screen = fd_screen(pscreen);
|
||||
struct fd2_context *fd2_ctx = CALLOC_STRUCT(fd2_context);
|
||||
|
@@ -47,6 +47,6 @@ fd2_context(struct fd_context *ctx)
|
||||
}
|
||||
|
||||
struct pipe_context *
|
||||
fd2_context_create(struct pipe_screen *pscreen, void *priv);
|
||||
fd2_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags);
|
||||
|
||||
#endif /* FD2_CONTEXT_H_ */
|
||||
|
@@ -680,6 +680,7 @@ static inline uint32_t REG_A3XX_CP_PROTECT_REG(uint32_t i0) { return 0x00000460
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_VP_CLIP_CODE_IGNORE 0x00080000
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_VP_XFORM_DISABLE 0x00100000
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_PERSP_DIVISION_DISABLE 0x00200000
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_ZERO_GB_SCALE_Z 0x00400000
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_ZCOORD 0x00800000
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_WCOORD 0x01000000
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_ZCLIP_DISABLE 0x02000000
|
||||
|
@@ -98,7 +98,7 @@ static const uint8_t primtypes[PIPE_PRIM_MAX] = {
|
||||
};
|
||||
|
||||
struct pipe_context *
|
||||
fd3_context_create(struct pipe_screen *pscreen, void *priv)
|
||||
fd3_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
|
||||
{
|
||||
struct fd_screen *screen = fd_screen(pscreen);
|
||||
struct fd3_context *fd3_ctx = CALLOC_STRUCT(fd3_context);
|
||||
|
@@ -119,6 +119,6 @@ fd3_context(struct fd_context *ctx)
|
||||
}
|
||||
|
||||
struct pipe_context *
|
||||
fd3_context_create(struct pipe_screen *pscreen, void *priv);
|
||||
fd3_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags);
|
||||
|
||||
#endif /* FD3_CONTEXT_H_ */
|
||||
|
@@ -828,7 +828,11 @@ fd3_emit_restore(struct fd_context *ctx)
|
||||
OUT_RING(ring, A3XX_HLSQ_CONST_FSPRESV_RANGE_REG_STARTENTRY(0) |
|
||||
A3XX_HLSQ_CONST_FSPRESV_RANGE_REG_ENDENTRY(0));
|
||||
|
||||
fd3_emit_cache_flush(ctx, ring);
|
||||
OUT_PKT0(ring, REG_A3XX_UCHE_CACHE_INVALIDATE0_REG, 2);
|
||||
OUT_RING(ring, A3XX_UCHE_CACHE_INVALIDATE0_REG_ADDR(0));
|
||||
OUT_RING(ring, A3XX_UCHE_CACHE_INVALIDATE1_REG_ADDR(0) |
|
||||
A3XX_UCHE_CACHE_INVALIDATE1_REG_OPCODE(INVALIDATE) |
|
||||
A3XX_UCHE_CACHE_INVALIDATE1_REG_ENTIRE_CACHE);
|
||||
|
||||
OUT_PKT0(ring, REG_A3XX_GRAS_CL_CLIP_CNTL, 1);
|
||||
OUT_RING(ring, 0x00000000); /* GRAS_CL_CLIP_CNTL */
|
||||
|
@@ -90,15 +90,4 @@ void fd3_emit_restore(struct fd_context *ctx);
|
||||
|
||||
void fd3_emit_init(struct pipe_context *pctx);
|
||||
|
||||
static inline void
|
||||
fd3_emit_cache_flush(struct fd_context *ctx, struct fd_ringbuffer *ring)
|
||||
{
|
||||
fd_wfi(ctx, ring);
|
||||
OUT_PKT0(ring, REG_A3XX_UCHE_CACHE_INVALIDATE0_REG, 2);
|
||||
OUT_RING(ring, A3XX_UCHE_CACHE_INVALIDATE0_REG_ADDR(0));
|
||||
OUT_RING(ring, A3XX_UCHE_CACHE_INVALIDATE1_REG_ADDR(0) |
|
||||
A3XX_UCHE_CACHE_INVALIDATE1_REG_OPCODE(INVALIDATE) |
|
||||
A3XX_UCHE_CACHE_INVALIDATE1_REG_ENTIRE_CACHE);
|
||||
}
|
||||
|
||||
#endif /* FD3_EMIT_H */
|
||||
|
@@ -355,8 +355,6 @@ fd3_fs_output_format(enum pipe_format format)
|
||||
case PIPE_FORMAT_R16G16_FLOAT:
|
||||
case PIPE_FORMAT_R11G11B10_FLOAT:
|
||||
return RB_R16G16B16A16_FLOAT;
|
||||
case PIPE_FORMAT_L8_UNORM:
|
||||
return RB_R8G8B8A8_UNORM;
|
||||
default:
|
||||
return fd3_pipe2color(format);
|
||||
}
|
||||
|
@@ -558,8 +558,6 @@ fd3_emit_tile_mem2gmem(struct fd_context *ctx, struct fd_tile *tile)
|
||||
OUT_RING(ring, fui(x1));
|
||||
OUT_RING(ring, fui(y1));
|
||||
|
||||
fd3_emit_cache_flush(ctx, ring);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
OUT_PKT0(ring, REG_A3XX_RB_MRT_CONTROL(i), 1);
|
||||
OUT_RING(ring, A3XX_RB_MRT_CONTROL_ROP_CODE(ROP_COPY) |
|
||||
|
@@ -65,7 +65,8 @@ fd3_rasterizer_state_create(struct pipe_context *pctx,
|
||||
if (cso->multisample)
|
||||
TODO
|
||||
*/
|
||||
so->gras_cl_clip_cntl = A3XX_GRAS_CL_CLIP_CNTL_IJ_PERSP_CENTER; /* ??? */
|
||||
so->gras_cl_clip_cntl = A3XX_GRAS_CL_CLIP_CNTL_IJ_PERSP_CENTER /* ??? */ |
|
||||
COND(cso->clip_halfz, A3XX_GRAS_CL_CLIP_CNTL_ZERO_GB_SCALE_Z);
|
||||
so->gras_su_point_minmax =
|
||||
A3XX_GRAS_SU_POINT_MINMAX_MIN(psize_min) |
|
||||
A3XX_GRAS_SU_POINT_MINMAX_MAX(psize_max);
|
||||
|
@@ -96,7 +96,7 @@ static const uint8_t primtypes[PIPE_PRIM_MAX] = {
|
||||
};
|
||||
|
||||
struct pipe_context *
|
||||
fd4_context_create(struct pipe_screen *pscreen, void *priv)
|
||||
fd4_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
|
||||
{
|
||||
struct fd_screen *screen = fd_screen(pscreen);
|
||||
struct fd4_context *fd4_ctx = CALLOC_STRUCT(fd4_context);
|
||||
|
@@ -97,6 +97,6 @@ fd4_context(struct fd_context *ctx)
|
||||
}
|
||||
|
||||
struct pipe_context *
|
||||
fd4_context_create(struct pipe_screen *pscreen, void *priv);
|
||||
fd4_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags);
|
||||
|
||||
#endif /* FD4_CONTEXT_H_ */
|
||||
|
@@ -191,6 +191,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
||||
return 16383;
|
||||
|
||||
case PIPE_CAP_DEPTH_CLIP_DISABLE:
|
||||
case PIPE_CAP_CLIP_HALFZ:
|
||||
case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
|
||||
return is_a3xx(screen);
|
||||
|
||||
@@ -228,7 +229,6 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
||||
case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE:
|
||||
case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
|
||||
case PIPE_CAP_SAMPLER_VIEW_TARGET:
|
||||
case PIPE_CAP_CLIP_HALFZ:
|
||||
case PIPE_CAP_POLYGON_OFFSET_CLAMP:
|
||||
case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:
|
||||
case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
|
||||
@@ -407,8 +407,6 @@ fd_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
|
||||
return 16;
|
||||
case PIPE_SHADER_CAP_PREFERRED_IR:
|
||||
return PIPE_SHADER_IR_TGSI;
|
||||
case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
|
||||
return 32;
|
||||
}
|
||||
debug_printf("unknown shader param %d\n", param);
|
||||
return 0;
|
||||
|
@@ -2312,7 +2312,7 @@ emit_instructions(struct ir3_compile *ctx)
|
||||
ctx->ir = ir3_create(ctx->compiler, ninputs, noutputs);
|
||||
|
||||
/* Create inputs in first block: */
|
||||
ctx->block = get_block(ctx, fxn->start_block);
|
||||
ctx->block = get_block(ctx, nir_start_block(fxn));
|
||||
ctx->in_block = ctx->block;
|
||||
list_addtail(&ctx->block->node, &ctx->ir->block_list);
|
||||
|
||||
|
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "ir3_nir.h"
|
||||
#include "glsl/nir/nir_builder.h"
|
||||
#include "glsl/nir/nir_control_flow.h"
|
||||
|
||||
/* Based on nir_opt_peephole_select, and hacked up to more aggressively
|
||||
* flatten anything that can be flattened
|
||||
@@ -171,7 +172,7 @@ flatten_block(nir_builder *bld, nir_block *if_block, nir_block *prev_block,
|
||||
(intr->intrinsic == nir_intrinsic_discard_if)) {
|
||||
nir_ssa_def *discard_cond;
|
||||
|
||||
nir_builder_insert_after_instr(bld,
|
||||
bld->cursor = nir_after_instr(
|
||||
nir_block_last_instr(prev_block));
|
||||
|
||||
if (invert) {
|
||||
|
@@ -155,7 +155,7 @@ static void i915_destroy(struct pipe_context *pipe)
|
||||
}
|
||||
|
||||
struct pipe_context *
|
||||
i915_create_context(struct pipe_screen *screen, void *priv)
|
||||
i915_create_context(struct pipe_screen *screen, void *priv, unsigned flags)
|
||||
{
|
||||
struct i915_context *i915;
|
||||
|
||||
|
@@ -401,7 +401,7 @@ void i915_init_string_functions( struct i915_context *i915 );
|
||||
* i915_context.c
|
||||
*/
|
||||
struct pipe_context *i915_create_context(struct pipe_screen *screen,
|
||||
void *priv);
|
||||
void *priv, unsigned flags);
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
@@ -167,8 +167,6 @@ i915_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_sha
|
||||
case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED:
|
||||
case PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE:
|
||||
return 0;
|
||||
case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
|
||||
return 32;
|
||||
default:
|
||||
debug_printf("%s: Unknown cap %u.\n", __FUNCTION__, cap);
|
||||
return 0;
|
||||
|
@@ -135,7 +135,7 @@ ilo_context_destroy(struct pipe_context *pipe)
|
||||
}
|
||||
|
||||
static struct pipe_context *
|
||||
ilo_context_create(struct pipe_screen *screen, void *priv)
|
||||
ilo_context_create(struct pipe_screen *screen, void *priv, unsigned flags)
|
||||
{
|
||||
struct ilo_screen *is = ilo_screen(screen);
|
||||
struct ilo_context *ilo;
|
||||
|
@@ -138,8 +138,6 @@ ilo_get_shader_param(struct pipe_screen *screen, unsigned shader,
|
||||
return PIPE_SHADER_IR_TGSI;
|
||||
case PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED:
|
||||
return 1;
|
||||
case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
|
||||
return 32;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
|
@@ -128,7 +128,8 @@ llvmpipe_render_condition ( struct pipe_context *pipe,
|
||||
}
|
||||
|
||||
struct pipe_context *
|
||||
llvmpipe_create_context( struct pipe_screen *screen, void *priv )
|
||||
llvmpipe_create_context(struct pipe_screen *screen, void *priv,
|
||||
unsigned flags)
|
||||
{
|
||||
struct llvmpipe_context *llvmpipe;
|
||||
|
||||
|
@@ -160,7 +160,8 @@ struct llvmpipe_context {
|
||||
|
||||
|
||||
struct pipe_context *
|
||||
llvmpipe_create_context( struct pipe_screen *screen, void *priv );
|
||||
llvmpipe_create_context(struct pipe_screen *screen, void *priv,
|
||||
unsigned flags);
|
||||
|
||||
struct pipe_resource *
|
||||
llvmpipe_user_buffer_create(struct pipe_screen *screen,
|
||||
|
@@ -260,7 +260,8 @@ static void noop_destroy_context(struct pipe_context *ctx)
|
||||
FREE(ctx);
|
||||
}
|
||||
|
||||
static struct pipe_context *noop_create_context(struct pipe_screen *screen, void *priv)
|
||||
static struct pipe_context *noop_create_context(struct pipe_screen *screen,
|
||||
void *priv, unsigned flags)
|
||||
{
|
||||
struct pipe_context *ctx = CALLOC_STRUCT(pipe_context);
|
||||
|
||||
|
@@ -884,7 +884,7 @@ CodeEmitterNV50::emitINTERP(const Instruction *i)
|
||||
defId(i->def(0), 2);
|
||||
srcAddr8(i->src(0), 16);
|
||||
|
||||
if (i->encSize != 8 && i->getInterpMode() == NV50_IR_INTERP_FLAT) {
|
||||
if (i->getInterpMode() == NV50_IR_INTERP_FLAT) {
|
||||
code[0] |= 1 << 8;
|
||||
} else {
|
||||
if (i->op == OP_PINTERP) {
|
||||
@@ -896,11 +896,10 @@ CodeEmitterNV50::emitINTERP(const Instruction *i)
|
||||
}
|
||||
|
||||
if (i->encSize == 8) {
|
||||
if (i->getInterpMode() == NV50_IR_INTERP_FLAT)
|
||||
code[1] = 4 << 16;
|
||||
else
|
||||
code[1] = (code[0] & (3 << 24)) >> (24 - 16);
|
||||
code[0] &= ~0x03000000;
|
||||
code[1] =
|
||||
(code[0] & (3 << 24)) >> (24 - 16) |
|
||||
(code[0] & (1 << 8)) << (18 - 8);
|
||||
code[0] &= ~0x03000100;
|
||||
code[0] |= 1;
|
||||
emitFlagsRd(i);
|
||||
}
|
||||
|
@@ -202,10 +202,7 @@ NV50LegalizePostRA::visit(Function *fn)
|
||||
Program *prog = fn->getProgram();
|
||||
|
||||
r63 = new_LValue(fn, FILE_GPR);
|
||||
if (prog->maxGPR < 63)
|
||||
r63->reg.data.id = 63;
|
||||
else
|
||||
r63->reg.data.id = 127;
|
||||
r63->reg.data.id = 63;
|
||||
|
||||
// this is actually per-program, but we can do it all on visiting main()
|
||||
std::list<Instruction *> *outWrites =
|
||||
|
@@ -2602,10 +2602,6 @@ NV50PostRaConstantFolding::visit(BasicBlock *bb)
|
||||
!isFloatType(i->dType))
|
||||
break;
|
||||
|
||||
if (i->getDef(0)->reg.data.id >= 64 ||
|
||||
i->getSrc(0)->reg.data.id >= 64)
|
||||
break;
|
||||
|
||||
def = i->getSrc(1)->getInsn();
|
||||
if (def->op == OP_MOV && def->src(0).getFile() == FILE_IMMEDIATE) {
|
||||
vtmp = i->getSrc(1);
|
||||
|
@@ -411,7 +411,7 @@ int ImmediateValue::print(char *buf, size_t size, DataType ty) const
|
||||
case TYPE_U64:
|
||||
case TYPE_S64:
|
||||
default:
|
||||
PRINT("0x%016" PRIx64, reg.data.u64);
|
||||
PRINT("0x%016"PRIx64, reg.data.u64);
|
||||
break;
|
||||
}
|
||||
return pos;
|
||||
|
@@ -25,24 +25,9 @@
|
||||
|
||||
#include <stack>
|
||||
#include <limits>
|
||||
#if __cplusplus >= 201103L
|
||||
#include <unordered_map>
|
||||
#else
|
||||
#include <tr1/unordered_map>
|
||||
#endif
|
||||
|
||||
namespace nv50_ir {
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
using std::hash;
|
||||
using std::unordered_map;
|
||||
#elif !defined(ANDROID)
|
||||
using std::tr1::hash;
|
||||
using std::tr1::unordered_map;
|
||||
#else
|
||||
#error Android release before Lollipop is not supported!
|
||||
#endif
|
||||
|
||||
#define MAX_REGISTER_FILE_SIZE 256
|
||||
|
||||
class RegisterSet
|
||||
@@ -237,7 +222,6 @@ private:
|
||||
private:
|
||||
virtual bool visit(BasicBlock *);
|
||||
inline bool needNewElseBlock(BasicBlock *b, BasicBlock *p);
|
||||
inline void splitEdges(BasicBlock *b);
|
||||
};
|
||||
|
||||
class ArgumentMovesPass : public Pass {
|
||||
@@ -361,89 +345,6 @@ RegAlloc::PhiMovesPass::needNewElseBlock(BasicBlock *b, BasicBlock *p)
|
||||
return (n == 2);
|
||||
}
|
||||
|
||||
struct PhiMapHash {
|
||||
size_t operator()(const std::pair<Instruction *, BasicBlock *>& val) const {
|
||||
return hash<Instruction*>()(val.first) * 31 +
|
||||
hash<BasicBlock*>()(val.second);
|
||||
}
|
||||
};
|
||||
|
||||
typedef unordered_map<
|
||||
std::pair<Instruction *, BasicBlock *>, Value *, PhiMapHash> PhiMap;
|
||||
|
||||
// Critical edges need to be split up so that work can be inserted along
|
||||
// specific edge transitions. Unfortunately manipulating incident edges into a
|
||||
// BB invalidates all the PHI nodes since their sources are implicitly ordered
|
||||
// by incident edge order.
|
||||
//
|
||||
// TODO: Make it so that that is not the case, and PHI nodes store pointers to
|
||||
// the original BBs.
|
||||
void
|
||||
RegAlloc::PhiMovesPass::splitEdges(BasicBlock *bb)
|
||||
{
|
||||
BasicBlock *pb, *pn;
|
||||
Instruction *phi;
|
||||
Graph::EdgeIterator ei;
|
||||
std::stack<BasicBlock *> stack;
|
||||
int j = 0;
|
||||
|
||||
for (ei = bb->cfg.incident(); !ei.end(); ei.next()) {
|
||||
pb = BasicBlock::get(ei.getNode());
|
||||
assert(pb);
|
||||
if (needNewElseBlock(bb, pb))
|
||||
stack.push(pb);
|
||||
}
|
||||
|
||||
// No critical edges were found, no need to perform any work.
|
||||
if (stack.empty())
|
||||
return;
|
||||
|
||||
// We're about to, potentially, reorder the inbound edges. This means that
|
||||
// we need to hold on to the (phi, bb) -> src mapping, and fix up the phi
|
||||
// nodes after the graph has been modified.
|
||||
PhiMap phis;
|
||||
|
||||
j = 0;
|
||||
for (ei = bb->cfg.incident(); !ei.end(); ei.next(), j++) {
|
||||
pb = BasicBlock::get(ei.getNode());
|
||||
for (phi = bb->getPhi(); phi && phi->op == OP_PHI; phi = phi->next)
|
||||
phis.insert(std::make_pair(std::make_pair(phi, pb), phi->getSrc(j)));
|
||||
}
|
||||
|
||||
while (!stack.empty()) {
|
||||
pb = stack.top();
|
||||
pn = new BasicBlock(func);
|
||||
stack.pop();
|
||||
|
||||
pb->cfg.detach(&bb->cfg);
|
||||
pb->cfg.attach(&pn->cfg, Graph::Edge::TREE);
|
||||
pn->cfg.attach(&bb->cfg, Graph::Edge::FORWARD);
|
||||
|
||||
assert(pb->getExit()->op != OP_CALL);
|
||||
if (pb->getExit()->asFlow()->target.bb == bb)
|
||||
pb->getExit()->asFlow()->target.bb = pn;
|
||||
|
||||
for (phi = bb->getPhi(); phi && phi->op == OP_PHI; phi = phi->next) {
|
||||
PhiMap::iterator it = phis.find(std::make_pair(phi, pb));
|
||||
assert(it != phis.end());
|
||||
phis.insert(std::make_pair(std::make_pair(phi, pn), it->second));
|
||||
phis.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
// Now go through and fix up all of the phi node sources.
|
||||
j = 0;
|
||||
for (ei = bb->cfg.incident(); !ei.end(); ei.next(), j++) {
|
||||
pb = BasicBlock::get(ei.getNode());
|
||||
for (phi = bb->getPhi(); phi && phi->op == OP_PHI; phi = phi->next) {
|
||||
PhiMap::const_iterator it = phis.find(std::make_pair(phi, pb));
|
||||
assert(it != phis.end());
|
||||
|
||||
phi->setSrc(j, it->second);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// For each operand of each PHI in b, generate a new value by inserting a MOV
|
||||
// at the end of the block it is coming from and replace the operand with its
|
||||
// result. This eliminates liveness conflicts and enables us to let values be
|
||||
@@ -456,13 +357,34 @@ bool
|
||||
RegAlloc::PhiMovesPass::visit(BasicBlock *bb)
|
||||
{
|
||||
Instruction *phi, *mov;
|
||||
BasicBlock *pb, *pn;
|
||||
|
||||
splitEdges(bb);
|
||||
std::stack<BasicBlock *> stack;
|
||||
|
||||
for (Graph::EdgeIterator ei = bb->cfg.incident(); !ei.end(); ei.next()) {
|
||||
pb = BasicBlock::get(ei.getNode());
|
||||
assert(pb);
|
||||
if (needNewElseBlock(bb, pb))
|
||||
stack.push(pb);
|
||||
}
|
||||
while (!stack.empty()) {
|
||||
pb = stack.top();
|
||||
pn = new BasicBlock(func);
|
||||
stack.pop();
|
||||
|
||||
pb->cfg.detach(&bb->cfg);
|
||||
pb->cfg.attach(&pn->cfg, Graph::Edge::TREE);
|
||||
pn->cfg.attach(&bb->cfg, Graph::Edge::FORWARD);
|
||||
|
||||
assert(pb->getExit()->op != OP_CALL);
|
||||
if (pb->getExit()->asFlow()->target.bb == bb)
|
||||
pb->getExit()->asFlow()->target.bb = pn;
|
||||
}
|
||||
|
||||
// insert MOVs (phi->src(j) should stem from j-th in-BB)
|
||||
int j = 0;
|
||||
for (Graph::EdgeIterator ei = bb->cfg.incident(); !ei.end(); ei.next()) {
|
||||
BasicBlock *pb = BasicBlock::get(ei.getNode());
|
||||
pb = BasicBlock::get(ei.getNode());
|
||||
if (!pb->isTerminated())
|
||||
pb->insertTail(new_FlowInstruction(func, OP_BRA, bb));
|
||||
|
||||
|
@@ -80,12 +80,7 @@ release_allocation(struct nouveau_mm_allocation **mm,
|
||||
inline void
|
||||
nouveau_buffer_release_gpu_storage(struct nv04_resource *buf)
|
||||
{
|
||||
if (buf->fence && buf->fence->state < NOUVEAU_FENCE_STATE_FLUSHED) {
|
||||
nouveau_fence_work(buf->fence, nouveau_fence_unref_bo, buf->bo);
|
||||
buf->bo = NULL;
|
||||
} else {
|
||||
nouveau_bo_ref(NULL, &buf->bo);
|
||||
}
|
||||
nouveau_bo_ref(NULL, &buf->bo);
|
||||
|
||||
if (buf->mm)
|
||||
release_allocation(&buf->mm, buf->fence);
|
||||
@@ -211,8 +206,8 @@ nouveau_transfer_write(struct nouveau_context *nv, struct nouveau_transfer *tx,
|
||||
nv->copy_data(nv, buf->bo, buf->offset + base, buf->domain,
|
||||
tx->bo, tx->offset + offset, NOUVEAU_BO_GART, size);
|
||||
else
|
||||
if (nv->push_cb && can_cb)
|
||||
nv->push_cb(nv, buf,
|
||||
if ((buf->base.bind & PIPE_BIND_CONSTANT_BUFFER) && nv->push_cb && can_cb)
|
||||
nv->push_cb(nv, buf->bo, buf->domain, buf->offset, buf->base.width0,
|
||||
base, size / 4, (const uint32_t *)data);
|
||||
else
|
||||
nv->push_data(nv, buf->bo, buf->offset + base, buf->domain, size, data);
|
||||
@@ -286,8 +281,7 @@ nouveau_buffer_transfer_del(struct nouveau_context *nv,
|
||||
{
|
||||
if (tx->map) {
|
||||
if (likely(tx->bo)) {
|
||||
nouveau_fence_work(nv->screen->fence.current,
|
||||
nouveau_fence_unref_bo, tx->bo);
|
||||
nouveau_bo_ref(NULL, &tx->bo);
|
||||
if (tx->mm)
|
||||
release_allocation(&tx->mm, nv->screen->fence.current);
|
||||
} else {
|
||||
@@ -538,13 +532,8 @@ nouveau_buffer_transfer_unmap(struct pipe_context *pipe,
|
||||
struct nv04_resource *buf = nv04_resource(transfer->resource);
|
||||
|
||||
if (tx->base.usage & PIPE_TRANSFER_WRITE) {
|
||||
if (!(tx->base.usage & PIPE_TRANSFER_FLUSH_EXPLICIT)) {
|
||||
if (tx->map)
|
||||
nouveau_transfer_write(nv, tx, 0, tx->base.box.width);
|
||||
|
||||
util_range_add(&buf->valid_buffer_range,
|
||||
tx->base.box.x, tx->base.box.x + tx->base.box.width);
|
||||
}
|
||||
if (!(tx->base.usage & PIPE_TRANSFER_FLUSH_EXPLICIT) && tx->map)
|
||||
nouveau_transfer_write(nv, tx, 0, tx->base.box.width);
|
||||
|
||||
if (likely(buf->domain)) {
|
||||
const uint8_t bind = buf->base.bind;
|
||||
@@ -552,6 +541,9 @@ nouveau_buffer_transfer_unmap(struct pipe_context *pipe,
|
||||
if (bind & (PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER))
|
||||
nv->vbo_dirty = true;
|
||||
}
|
||||
|
||||
util_range_add(&buf->valid_buffer_range,
|
||||
tx->base.box.x, tx->base.box.x + tx->base.box.width);
|
||||
}
|
||||
|
||||
if (!tx->bo && (tx->base.usage & PIPE_TRANSFER_WRITE))
|
||||
@@ -788,7 +780,7 @@ nouveau_buffer_migrate(struct nouveau_context *nv,
|
||||
nv->copy_data(nv, buf->bo, buf->offset, new_domain,
|
||||
bo, offset, old_domain, buf->base.width0);
|
||||
|
||||
nouveau_fence_work(screen->fence.current, nouveau_fence_unref_bo, bo);
|
||||
nouveau_bo_ref(NULL, &bo);
|
||||
if (mm)
|
||||
release_allocation(&mm, screen->fence.current);
|
||||
} else
|
||||
|
@@ -41,8 +41,6 @@ struct nv04_resource {
|
||||
uint8_t status;
|
||||
uint8_t domain;
|
||||
|
||||
uint16_t cb_bindings[6]; /* per-shader per-slot bindings */
|
||||
|
||||
struct nouveau_fence *fence;
|
||||
struct nouveau_fence *fence_wr;
|
||||
|
||||
|
@@ -6,8 +6,6 @@
|
||||
|
||||
#define NOUVEAU_MAX_SCRATCH_BUFS 4
|
||||
|
||||
struct nv04_resource;
|
||||
|
||||
struct nouveau_context {
|
||||
struct pipe_context pipe;
|
||||
struct nouveau_screen *screen;
|
||||
@@ -25,7 +23,8 @@ struct nouveau_context {
|
||||
unsigned, const void *);
|
||||
/* base, size refer to the whole constant buffer */
|
||||
void (*push_cb)(struct nouveau_context *,
|
||||
struct nv04_resource *,
|
||||
struct nouveau_bo *, unsigned domain,
|
||||
unsigned base, unsigned size,
|
||||
unsigned offset, unsigned words, const uint32_t *);
|
||||
|
||||
/* @return: @ref reduced by nr of references found in context */
|
||||
|
@@ -190,14 +190,8 @@ nouveau_fence_wait(struct nouveau_fence *fence)
|
||||
/* wtf, someone is waiting on a fence in flush_notify handler? */
|
||||
assert(fence->state != NOUVEAU_FENCE_STATE_EMITTING);
|
||||
|
||||
if (fence->state < NOUVEAU_FENCE_STATE_EMITTED) {
|
||||
PUSH_SPACE(screen->pushbuf, 8);
|
||||
/* The space allocation might trigger a flush, which could emit the
|
||||
* current fence. So check again.
|
||||
*/
|
||||
if (fence->state < NOUVEAU_FENCE_STATE_EMITTED)
|
||||
nouveau_fence_emit(fence);
|
||||
}
|
||||
if (fence->state < NOUVEAU_FENCE_STATE_EMITTED)
|
||||
nouveau_fence_emit(fence);
|
||||
|
||||
if (fence->state < NOUVEAU_FENCE_STATE_FLUSHED)
|
||||
if (nouveau_pushbuf_kick(screen->pushbuf, screen->pushbuf->channel))
|
||||
@@ -230,22 +224,10 @@ nouveau_fence_wait(struct nouveau_fence *fence)
|
||||
void
|
||||
nouveau_fence_next(struct nouveau_screen *screen)
|
||||
{
|
||||
if (screen->fence.current->state < NOUVEAU_FENCE_STATE_EMITTING) {
|
||||
if (screen->fence.current->ref > 1)
|
||||
nouveau_fence_emit(screen->fence.current);
|
||||
else
|
||||
return;
|
||||
}
|
||||
if (screen->fence.current->state < NOUVEAU_FENCE_STATE_EMITTING)
|
||||
nouveau_fence_emit(screen->fence.current);
|
||||
|
||||
nouveau_fence_ref(NULL, &screen->fence.current);
|
||||
|
||||
nouveau_fence_new(screen, &screen->fence.current, false);
|
||||
}
|
||||
|
||||
void
|
||||
nouveau_fence_unref_bo(void *data)
|
||||
{
|
||||
struct nouveau_bo *bo = data;
|
||||
|
||||
nouveau_bo_ref(NULL, &bo);
|
||||
}
|
||||
|
@@ -37,9 +37,6 @@ void nouveau_fence_next(struct nouveau_screen *);
|
||||
bool nouveau_fence_wait(struct nouveau_fence *);
|
||||
bool nouveau_fence_signalled(struct nouveau_fence *);
|
||||
|
||||
void nouveau_fence_unref_bo(void *data); /* generic unref bo callback */
|
||||
|
||||
|
||||
static inline void
|
||||
nouveau_fence_ref(struct nouveau_fence *fence, struct nouveau_fence **ref)
|
||||
{
|
||||
|
@@ -24,8 +24,6 @@ PUSH_AVAIL(struct nouveau_pushbuf *push)
|
||||
static inline bool
|
||||
PUSH_SPACE(struct nouveau_pushbuf *push, uint32_t size)
|
||||
{
|
||||
/* Provide a buffer so that fences always have room to be emitted */
|
||||
size += 8;
|
||||
if (PUSH_AVAIL(push) < size)
|
||||
return nouveau_pushbuf_space(push, size, 0, 0) == 0;
|
||||
return true;
|
||||
|
@@ -190,7 +190,7 @@ nv30_context_destroy(struct pipe_context *pipe)
|
||||
} while(0)
|
||||
|
||||
struct pipe_context *
|
||||
nv30_context_create(struct pipe_screen *pscreen, void *priv)
|
||||
nv30_context_create(struct pipe_screen *pscreen, void *priv, unsigned ctxflags)
|
||||
{
|
||||
struct nv30_screen *screen = nv30_screen(pscreen);
|
||||
struct nv30_context *nv30 = CALLOC_STRUCT(nv30_context);
|
||||
|
@@ -132,7 +132,7 @@ nv30_context(struct pipe_context *pipe)
|
||||
}
|
||||
|
||||
struct pipe_context *
|
||||
nv30_context_create(struct pipe_screen *pscreen, void *priv);
|
||||
nv30_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags);
|
||||
|
||||
void
|
||||
nv30_vbo_init(struct pipe_context *pipe);
|
||||
|
@@ -78,12 +78,12 @@ nv30_format_info_table[PIPE_FORMAT_COUNT] = {
|
||||
_(B4G4R4X4_UNORM , S___),
|
||||
_(B4G4R4A4_UNORM , S___),
|
||||
_(B5G6R5_UNORM , SB__),
|
||||
_(BGRX8888_UNORM , SB__),
|
||||
_(BGRX8888_SRGB , S___),
|
||||
_(BGRA8888_UNORM , SB__),
|
||||
_(BGRA8888_SRGB , S___),
|
||||
_(B8G8R8X8_UNORM , SB__),
|
||||
_(B8G8R8X8_SRGB , S___),
|
||||
_(B8G8R8A8_UNORM , SB__),
|
||||
_(B8G8R8A8_SRGB , S___),
|
||||
_(R8G8B8A8_UNORM , __V_),
|
||||
_(RGBA8888_SNORM , S___),
|
||||
_(R8G8B8A8_SNORM , S___),
|
||||
_(DXT1_RGB , S___),
|
||||
_(DXT1_SRGB , S___),
|
||||
_(DXT1_RGBA , S___),
|
||||
@@ -138,8 +138,8 @@ const struct nv30_format
|
||||
nv30_format_table[PIPE_FORMAT_COUNT] = {
|
||||
R_(B5G5R5X1_UNORM , X1R5G5B5 ),
|
||||
R_(B5G6R5_UNORM , R5G6B5 ),
|
||||
R_(BGRX8888_UNORM , X8R8G8B8 ),
|
||||
R_(BGRA8888_UNORM , A8R8G8B8 ),
|
||||
R_(B8G8R8X8_UNORM , X8R8G8B8 ),
|
||||
R_(B8G8R8A8_UNORM , A8R8G8B8 ),
|
||||
Z_(Z16_UNORM , Z16 ),
|
||||
Z_(X8Z24_UNORM , Z24S8 ),
|
||||
Z_(S8_UINT_Z24_UNORM , Z24S8 ),
|
||||
@@ -223,11 +223,11 @@ nv30_texfmt_table[PIPE_FORMAT_COUNT] = {
|
||||
_(B4G4R4X4_UNORM , A4R4G4B4, 0, C, C, C, 1, 2, 1, 0, x, NONE, ____),
|
||||
_(B4G4R4A4_UNORM , A4R4G4B4, 0, C, C, C, C, 2, 1, 0, 3, NONE, ____),
|
||||
_(B5G6R5_UNORM , R5G6B5 , 0, C, C, C, 1, 2, 1, 0, x, NONE, ____),
|
||||
_(BGRX8888_UNORM , A8R8G8B8, 0, C, C, C, 1, 2, 1, 0, x, NONE, ____),
|
||||
_(BGRX8888_SRGB , A8R8G8B8, 0, C, C, C, 1, 2, 1, 0, x, SRGB, ____),
|
||||
_(BGRA8888_UNORM , A8R8G8B8, 0, C, C, C, C, 2, 1, 0, 3, NONE, ____),
|
||||
_(BGRA8888_SRGB , A8R8G8B8, 0, C, C, C, C, 2, 1, 0, 3, SRGB, ____),
|
||||
_(RGBA8888_SNORM , A8R8G8B8, 0, C, C, C, C, 0, 1, 2, 3, NONE, SSSS),
|
||||
_(B8G8R8X8_UNORM , A8R8G8B8, 0, C, C, C, 1, 2, 1, 0, x, NONE, ____),
|
||||
_(B8G8R8X8_SRGB , A8R8G8B8, 0, C, C, C, 1, 2, 1, 0, x, SRGB, ____),
|
||||
_(B8G8R8A8_UNORM , A8R8G8B8, 0, C, C, C, C, 2, 1, 0, 3, NONE, ____),
|
||||
_(B8G8R8A8_SRGB , A8R8G8B8, 0, C, C, C, C, 2, 1, 0, 3, SRGB, ____),
|
||||
_(R8G8B8A8_SNORM , A8R8G8B8, 0, C, C, C, C, 0, 1, 2, 3, NONE, SSSS),
|
||||
_(DXT1_RGB , DXT1 , 0, C, C, C, 1, 2, 1, 0, x, NONE, ____),
|
||||
_(DXT1_SRGB , DXT1 , 0, C, C, C, 1, 2, 1, 0, x, SRGB, ____),
|
||||
_(DXT1_RGBA , DXT1 , 0, C, C, C, C, 2, 1, 0, 3, NONE, ____),
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#include "util/u_surface.h"
|
||||
|
||||
#include "nv_m2mf.xml.h"
|
||||
#include "nv_object.xml.h"
|
||||
#include "nv30/nv30_screen.h"
|
||||
#include "nv30/nv30_context.h"
|
||||
#include "nv30/nv30_resource.h"
|
||||
@@ -145,54 +144,21 @@ nv30_resource_copy_region(struct pipe_context *pipe,
|
||||
nv30_transfer_rect(nv30, NEAREST, &src, &dst);
|
||||
}
|
||||
|
||||
static void
|
||||
nv30_resource_resolve(struct nv30_context *nv30,
|
||||
const struct pipe_blit_info *info)
|
||||
void
|
||||
nv30_resource_resolve(struct pipe_context *pipe,
|
||||
const struct pipe_resolve_info *info)
|
||||
{
|
||||
struct nv30_miptree *src_mt = nv30_miptree(info->src.resource);
|
||||
#if 0
|
||||
struct nv30_context *nv30 = nv30_context(pipe);
|
||||
struct nv30_rect src, dst;
|
||||
unsigned x, x0, x1, y, y1, w, h;
|
||||
|
||||
define_rect(info->src.resource, 0, info->src.box.z, info->src.box.x,
|
||||
info->src.box.y, info->src.box.width, info->src.box.height, &src);
|
||||
define_rect(info->dst.resource, 0, info->dst.box.z, info->dst.box.x,
|
||||
info->dst.box.y, info->dst.box.width, info->dst.box.height, &dst);
|
||||
define_rect(info->src.res, 0, 0, info->src.x0, info->src.y0,
|
||||
info->src.x1 - info->src.x0, info->src.y1 - info->src.y0, &src);
|
||||
define_rect(info->dst.res, info->dst.level, 0, info->dst.x0, info->dst.y0,
|
||||
info->dst.x1 - info->dst.x0, info->dst.y1 - info->dst.y0, &dst);
|
||||
|
||||
x0 = src.x0;
|
||||
x1 = src.x1;
|
||||
y1 = src.y1;
|
||||
|
||||
/* On nv3x we must use sifm which is restricted to 1024x1024 tiles */
|
||||
for (y = src.y0; y < y1; y += h) {
|
||||
h = y1 - y;
|
||||
if (h > 1024)
|
||||
h = 1024;
|
||||
|
||||
src.y0 = 0;
|
||||
src.y1 = h;
|
||||
src.h = h;
|
||||
|
||||
dst.y1 = dst.y0 + (h >> src_mt->ms_y);
|
||||
dst.h = h >> src_mt->ms_y;
|
||||
|
||||
for (x = x0; x < x1; x += w) {
|
||||
w = x1 - x;
|
||||
if (w > 1024)
|
||||
w = 1024;
|
||||
|
||||
src.offset = y * src.pitch + x * src.cpp;
|
||||
src.x0 = 0;
|
||||
src.x1 = w;
|
||||
src.w = w;
|
||||
|
||||
dst.offset = (y >> src_mt->ms_y) * dst.pitch +
|
||||
(x >> src_mt->ms_x) * dst.cpp;
|
||||
dst.x1 = dst.x0 + (w >> src_mt->ms_x);
|
||||
dst.w = w >> src_mt->ms_x;
|
||||
|
||||
nv30_transfer_rect(nv30, BILINEAR, &src, &dst);
|
||||
}
|
||||
}
|
||||
nv30_transfer_rect(nv30, BILINEAR, &src, &dst);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -206,7 +172,7 @@ nv30_blit(struct pipe_context *pipe,
|
||||
info.dst.resource->nr_samples <= 1 &&
|
||||
!util_format_is_depth_or_stencil(info.src.resource->format) &&
|
||||
!util_format_is_pure_integer(info.src.resource->format)) {
|
||||
nv30_resource_resolve(nv30, blit_info);
|
||||
debug_printf("nv30: color resolve unimplemented\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -339,15 +305,10 @@ nv30_miptree_transfer_unmap(struct pipe_context *pipe,
|
||||
struct nv30_context *nv30 = nv30_context(pipe);
|
||||
struct nv30_transfer *tx = nv30_transfer(ptx);
|
||||
|
||||
if (ptx->usage & PIPE_TRANSFER_WRITE) {
|
||||
if (ptx->usage & PIPE_TRANSFER_WRITE)
|
||||
nv30_transfer_rect(nv30, NEAREST, &tx->tmp, &tx->img);
|
||||
|
||||
/* Allow the copies above to finish executing before freeing the source */
|
||||
nouveau_fence_work(nv30->screen->base.fence.current,
|
||||
nouveau_fence_unref_bo, tx->tmp.bo);
|
||||
} else {
|
||||
nouveau_bo_ref(NULL, &tx->tmp.bo);
|
||||
}
|
||||
nouveau_bo_ref(NULL, &tx->tmp.bo);
|
||||
pipe_resource_reference(&ptx->resource, NULL);
|
||||
FREE(tx);
|
||||
}
|
||||
@@ -401,7 +362,6 @@ nv30_miptree_create(struct pipe_screen *pscreen,
|
||||
blocksz = util_format_get_blocksize(pt->format);
|
||||
|
||||
if ((pt->target == PIPE_TEXTURE_RECT) ||
|
||||
(pt->bind & PIPE_BIND_SCANOUT) ||
|
||||
!util_is_power_of_two(pt->width0) ||
|
||||
!util_is_power_of_two(pt->height0) ||
|
||||
!util_is_power_of_two(pt->depth0) ||
|
||||
@@ -409,14 +369,6 @@ nv30_miptree_create(struct pipe_screen *pscreen,
|
||||
util_format_is_float(pt->format) || mt->ms_mode) {
|
||||
mt->uniform_pitch = util_format_get_nblocksx(pt->format, w) * blocksz;
|
||||
mt->uniform_pitch = align(mt->uniform_pitch, 64);
|
||||
if (pt->bind & PIPE_BIND_SCANOUT) {
|
||||
struct nv30_screen *screen = nv30_screen(pscreen);
|
||||
int pitch_align = MAX2(
|
||||
screen->eng3d->oclass >= NV40_3D_CLASS ? 1024 : 256,
|
||||
/* round_down_pow2(mt->uniform_pitch / 4) */
|
||||
1 << (util_last_bit(mt->uniform_pitch / 4) - 1));
|
||||
mt->uniform_pitch = align(mt->uniform_pitch, pitch_align);
|
||||
}
|
||||
}
|
||||
|
||||
if (!mt->uniform_pitch)
|
||||
|
@@ -65,6 +65,9 @@ nv30_resource_copy_region(struct pipe_context *pipe,
|
||||
struct pipe_resource *src, unsigned src_level,
|
||||
const struct pipe_box *src_box);
|
||||
|
||||
void
|
||||
nv30_resource_resolve(struct pipe_context *, const struct pipe_resolve_info *);
|
||||
|
||||
void
|
||||
nv30_blit(struct pipe_context *pipe,
|
||||
const struct pipe_blit_info *blit_info);
|
||||
|
@@ -261,8 +261,6 @@ nv30_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
|
||||
case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED:
|
||||
case PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE:
|
||||
return 0;
|
||||
case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
|
||||
return 32;
|
||||
default:
|
||||
debug_printf("unknown vertex shader param %d\n", param);
|
||||
return 0;
|
||||
@@ -304,8 +302,6 @@ nv30_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
|
||||
case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED:
|
||||
case PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE:
|
||||
return 0;
|
||||
case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
|
||||
return 32;
|
||||
default:
|
||||
debug_printf("unknown fragment shader param %d\n", param);
|
||||
return 0;
|
||||
@@ -323,9 +319,8 @@ nv30_screen_is_format_supported(struct pipe_screen *pscreen,
|
||||
unsigned sample_count,
|
||||
unsigned bindings)
|
||||
{
|
||||
if (sample_count > nv30_screen(pscreen)->max_sample_count)
|
||||
if (sample_count > 4)
|
||||
return false;
|
||||
|
||||
if (!(0x00000017 & (1 << sample_count)))
|
||||
return false;
|
||||
|
||||
@@ -349,9 +344,7 @@ nv30_screen_fence_emit(struct pipe_screen *pscreen, uint32_t *sequence)
|
||||
|
||||
*sequence = ++screen->base.fence.sequence;
|
||||
|
||||
assert(PUSH_AVAIL(push) + push->rsvd_kick >= 3);
|
||||
PUSH_DATA (push, NV30_3D_FENCE_OFFSET |
|
||||
(2 /* size */ << 18) | (7 /* subchan */ << 13));
|
||||
BEGIN_NV04(push, NV30_3D(FENCE_OFFSET), 2);
|
||||
PUSH_DATA (push, 0);
|
||||
PUSH_DATA (push, *sequence);
|
||||
}
|
||||
@@ -457,23 +450,6 @@ nv30_screen_create(struct nouveau_device *dev)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Some modern apps try to use msaa without keeping in mind the
|
||||
* restrictions on videomem of older cards. Resulting in dmesg saying:
|
||||
* [ 1197.850642] nouveau E[soffice.bin[3785]] fail ttm_validate
|
||||
* [ 1197.850648] nouveau E[soffice.bin[3785]] validating bo list
|
||||
* [ 1197.850654] nouveau E[soffice.bin[3785]] validate: -12
|
||||
*
|
||||
* Because we are running out of video memory, after which the program
|
||||
* using the msaa visual freezes, and eventually the entire system freezes.
|
||||
*
|
||||
* To work around this we do not allow msaa visauls by default and allow
|
||||
* the user to override this via NV30_MAX_MSAA.
|
||||
*/
|
||||
screen->max_sample_count = debug_get_num_option("NV30_MAX_MSAA", 0);
|
||||
if (screen->max_sample_count > 4)
|
||||
screen->max_sample_count = 4;
|
||||
|
||||
pscreen = &screen->base.base;
|
||||
pscreen->destroy = nv30_screen_destroy;
|
||||
pscreen->get_param = nv30_screen_get_param;
|
||||
|
@@ -38,8 +38,6 @@ struct nv30_screen {
|
||||
/*XXX: nvfx state */
|
||||
struct nouveau_heap *vp_exec_heap;
|
||||
struct nouveau_heap *vp_data_heap;
|
||||
|
||||
unsigned max_sample_count;
|
||||
};
|
||||
|
||||
static inline struct nv30_screen *
|
||||
|
@@ -371,7 +371,7 @@ nv30_transfer_rect_blit(XFER_ARGS)
|
||||
static bool
|
||||
nv30_transfer_sifm(XFER_ARGS)
|
||||
{
|
||||
if (!src->pitch || src->w > 1024 || src->h > 1024 || src->w < 2 || src->h < 2)
|
||||
if (!src->pitch || (src->w | src->h) > 1024 || src->w < 2 || src->h < 2)
|
||||
return false;
|
||||
|
||||
if (src->d > 1 || dst->d > 1)
|
||||
@@ -381,7 +381,7 @@ nv30_transfer_sifm(XFER_ARGS)
|
||||
return false;
|
||||
|
||||
if (!dst->pitch) {
|
||||
if (dst->w > 2048 || dst->h > 2048 || dst->w < 2 || dst->h < 2)
|
||||
if ((dst->w | dst->h) > 2048 || dst->w < 2 || dst->h < 2)
|
||||
return false;
|
||||
} else {
|
||||
if (dst->domain != NOUVEAU_BO_VRAM)
|
||||
|
@@ -191,11 +191,7 @@ nv30_vbo_validate(struct nv30_context *nv30)
|
||||
if (!nv30->vertex || nv30->draw_flags)
|
||||
return;
|
||||
|
||||
#ifdef PIPE_ARCH_BIG_ENDIAN
|
||||
if (1) { /* Figure out where the buffers are getting messed up */
|
||||
#else
|
||||
if (unlikely(vertex->need_conversion)) {
|
||||
#endif
|
||||
nv30->vbo_fifo = ~0;
|
||||
nv30->vbo_user = 0;
|
||||
} else {
|
||||
|
@@ -1,4 +1,3 @@
|
||||
#include <strings.h>
|
||||
#include "pipe/p_context.h"
|
||||
#include "pipe/p_defines.h"
|
||||
#include "pipe/p_state.h"
|
||||
|
@@ -199,13 +199,9 @@ nv50_invalidate_resource_storage(struct nouveau_context *ctx,
|
||||
}
|
||||
}
|
||||
|
||||
if (nv50->idxbuf.buffer == res) {
|
||||
/* Just rebind to the bufctx as there is no separate dirty bit */
|
||||
nouveau_bufctx_reset(nv50->bufctx_3d, NV50_BIND_INDEX);
|
||||
BCTX_REFN(nv50->bufctx_3d, INDEX, nv04_resource(res), RD);
|
||||
if (nv50->idxbuf.buffer == res)
|
||||
if (!--ref)
|
||||
return ref;
|
||||
}
|
||||
|
||||
for (s = 0; s < 3; ++s) {
|
||||
assert(nv50->num_textures[s] <= PIPE_MAX_SAMPLERS);
|
||||
@@ -244,7 +240,7 @@ nv50_context_get_sample_position(struct pipe_context *, unsigned, unsigned,
|
||||
float *);
|
||||
|
||||
struct pipe_context *
|
||||
nv50_create(struct pipe_screen *pscreen, void *priv)
|
||||
nv50_create(struct pipe_screen *pscreen, void *priv, unsigned ctxflags)
|
||||
{
|
||||
struct nv50_screen *screen = nv50_screen(pscreen);
|
||||
struct nv50_context *nv50;
|
||||
|
@@ -186,7 +186,7 @@ nv50_context_shader_stage(unsigned pipe)
|
||||
}
|
||||
|
||||
/* nv50_context.c */
|
||||
struct pipe_context *nv50_create(struct pipe_screen *, void *);
|
||||
struct pipe_context *nv50_create(struct pipe_screen *, void *, unsigned flags);
|
||||
|
||||
void nv50_bufctx_fence(struct nouveau_bufctx *, bool on_flush);
|
||||
|
||||
@@ -197,7 +197,7 @@ extern struct draw_stage *nv50_draw_render_stage(struct nv50_context *);
|
||||
|
||||
/* nv50_query.c */
|
||||
void nv50_init_query_functions(struct nv50_context *);
|
||||
void nv50_query_pushbuf_submit(struct nouveau_pushbuf *, uint16_t method,
|
||||
void nv50_query_pushbuf_submit(struct nouveau_pushbuf *,
|
||||
struct pipe_query *, unsigned result_offset);
|
||||
void nv84_query_fifo_wait(struct nouveau_pushbuf *, struct pipe_query *);
|
||||
void nva0_so_target_save_offset(struct pipe_context *,
|
||||
|
@@ -203,10 +203,8 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
|
||||
F3B(B5G6R5_UNORM, B5G6R5_UNORM, C2, C1, C0, xx, UNORM, 5_6_5, TD),
|
||||
C4B(B5G5R5A1_UNORM, BGR5_A1_UNORM, C2, C1, C0, C3, UNORM, 5_5_5_1, TD),
|
||||
F3B(B5G5R5X1_UNORM, BGR5_X1_UNORM, C2, C1, C0, xx, UNORM, 5_5_5_1, TD),
|
||||
#if NOUVEAU_DRIVER != 0xc0
|
||||
C4B(B4G4R4A4_UNORM, NONE, C2, C1, C0, C3, UNORM, 4_4_4_4, T),
|
||||
F3B(B4G4R4X4_UNORM, NONE, C2, C1, C0, xx, UNORM, 4_4_4_4, T),
|
||||
#endif
|
||||
F3B(R9G9B9E5_FLOAT, NONE, C0, C1, C2, xx, FLOAT, 9_9_9_E5, T),
|
||||
|
||||
C4A(R10G10B10A2_UNORM, RGB10_A2_UNORM, C0, C1, C2, C3, UNORM, 10_10_10_2,
|
||||
|
@@ -163,10 +163,7 @@ nv50_miptree_destroy(struct pipe_screen *pscreen, struct pipe_resource *pt)
|
||||
{
|
||||
struct nv50_miptree *mt = nv50_miptree(pt);
|
||||
|
||||
if (mt->base.fence && mt->base.fence->state < NOUVEAU_FENCE_STATE_FLUSHED)
|
||||
nouveau_fence_work(mt->base.fence, nouveau_fence_unref_bo, mt->base.bo);
|
||||
else
|
||||
nouveau_bo_ref(NULL, &mt->base.bo);
|
||||
nouveau_bo_ref(NULL, &mt->base.bo);
|
||||
|
||||
nouveau_fence_ref(NULL, &mt->base.fence);
|
||||
nouveau_fence_ref(NULL, &mt->base.fence_wr);
|
||||
|
@@ -66,7 +66,6 @@ nv50_vertprog_assign_slots(struct nv50_ir_prog_info *info)
|
||||
case TGSI_SEMANTIC_VERTEXID:
|
||||
prog->vp.attrs[2] |= NV50_3D_VP_GP_BUILTIN_ATTR_EN_VERTEX_ID;
|
||||
prog->vp.attrs[2] |= NV50_3D_VP_GP_BUILTIN_ATTR_EN_VERTEX_ID_DRAW_ARRAYS_ADD_START;
|
||||
prog->vp.vertexid = 1;
|
||||
continue;
|
||||
default:
|
||||
break;
|
||||
|
@@ -76,7 +76,6 @@ struct nv50_program {
|
||||
ubyte psiz; /* output slot of point size */
|
||||
ubyte bfc[2]; /* indices into varying for FFC (FP) or BFC (VP) */
|
||||
ubyte edgeflag;
|
||||
ubyte vertexid;
|
||||
ubyte clpd[2]; /* output slot of clip distance[i]'s 1st component */
|
||||
ubyte clpd_nr;
|
||||
} vp;
|
||||
|
@@ -266,7 +266,6 @@ nv50_query_end(struct pipe_context *pipe, struct pipe_query *pq)
|
||||
nv50_query_get(push, q, 0, 0x1000f010);
|
||||
break;
|
||||
case NVA0_QUERY_STREAM_OUTPUT_BUFFER_OFFSET:
|
||||
q->sequence++;
|
||||
nv50_query_get(push, q, 0, 0x0d005002 | (q->index << 5));
|
||||
break;
|
||||
case PIPE_QUERY_TIMESTAMP_DISJOINT:
|
||||
@@ -452,18 +451,18 @@ nv50_render_condition(struct pipe_context *pipe,
|
||||
}
|
||||
|
||||
void
|
||||
nv50_query_pushbuf_submit(struct nouveau_pushbuf *push, uint16_t method,
|
||||
nv50_query_pushbuf_submit(struct nouveau_pushbuf *push,
|
||||
struct pipe_query *pq, unsigned result_offset)
|
||||
{
|
||||
struct nv50_query *q = nv50_query(pq);
|
||||
|
||||
nv50_query_update(q);
|
||||
if (q->state != NV50_QUERY_STATE_READY)
|
||||
nouveau_bo_wait(q->bo, NOUVEAU_BO_RD, push->client);
|
||||
q->state = NV50_QUERY_STATE_READY;
|
||||
/* XXX: does this exist ? */
|
||||
#define NV50_IB_ENTRY_1_NO_PREFETCH (0 << (31 - 8))
|
||||
|
||||
BEGIN_NV04(push, SUBC_3D(method), 1);
|
||||
PUSH_DATA (push, q->data[result_offset / 4]);
|
||||
PUSH_REFN(push, q->bo, NOUVEAU_BO_RD | NOUVEAU_BO_GART);
|
||||
nouveau_pushbuf_space(push, 0, 0, 1);
|
||||
nouveau_pushbuf_data(push, q->bo, q->offset + result_offset, 4 |
|
||||
NV50_IB_ENTRY_1_NO_PREFETCH);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -100,7 +100,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
||||
case PIPE_CAP_MAX_TEXEL_OFFSET:
|
||||
return 7;
|
||||
case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE:
|
||||
return 128 * 1024 * 1024;
|
||||
return 65536;
|
||||
case PIPE_CAP_GLSL_FEATURE_LEVEL:
|
||||
return 330;
|
||||
case PIPE_CAP_MAX_RENDER_TARGETS:
|
||||
@@ -297,8 +297,6 @@ nv50_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
|
||||
case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED:
|
||||
case PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE:
|
||||
return 0;
|
||||
case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
|
||||
return 32;
|
||||
default:
|
||||
NOUVEAU_ERR("unknown PIPE_SHADER_CAP %d\n", param);
|
||||
return 0;
|
||||
@@ -388,7 +386,6 @@ nv50_screen_fence_emit(struct pipe_screen *pscreen, u32 *sequence)
|
||||
/* we need to do it after possible flush in MARK_RING */
|
||||
*sequence = ++screen->base.fence.sequence;
|
||||
|
||||
assert(PUSH_AVAIL(push) + push->rsvd_kick >= 5);
|
||||
PUSH_DATA (push, NV50_FIFO_PKHDR(NV50_3D(QUERY_ADDRESS_HIGH), 4));
|
||||
PUSH_DATAh(push, screen->fence.bo->offset);
|
||||
PUSH_DATA (push, screen->fence.bo->offset);
|
||||
|
@@ -65,9 +65,14 @@ nv50_constbufs_validate(struct nv50_context *nv50)
|
||||
PUSH_DATA (push, (b << 12) | (i << 8) | p | 1);
|
||||
}
|
||||
while (words) {
|
||||
unsigned nr = MIN2(words, NV04_PFIFO_MAX_PACKET_LEN);
|
||||
unsigned nr;
|
||||
|
||||
if (!PUSH_SPACE(push, 16))
|
||||
break;
|
||||
nr = PUSH_AVAIL(push);
|
||||
assert(nr >= 16);
|
||||
nr = MIN2(MIN2(nr - 3, words), NV04_PFIFO_MAX_PACKET_LEN);
|
||||
|
||||
PUSH_SPACE(push, nr + 3);
|
||||
BEGIN_NV04(push, NV50_3D(CB_ADDR), 1);
|
||||
PUSH_DATA (push, (start << 8) | b);
|
||||
BEGIN_NI04(push, NV50_3D(CB_DATA(0)), nr);
|
||||
@@ -636,12 +641,12 @@ nv50_stream_output_validate(struct nv50_context *nv50)
|
||||
PUSH_DATA (push, so->num_attribs[i]);
|
||||
if (n == 4) {
|
||||
PUSH_DATA(push, targ->pipe.buffer_size);
|
||||
|
||||
BEGIN_NV04(push, NVA0_3D(STRMOUT_OFFSET(i)), 1);
|
||||
if (!targ->clean) {
|
||||
assert(targ->pq);
|
||||
nv50_query_pushbuf_submit(push, NVA0_3D_STRMOUT_OFFSET(i),
|
||||
targ->pq, 0x4);
|
||||
nv50_query_pushbuf_submit(push, targ->pq, 0x4);
|
||||
} else {
|
||||
BEGIN_NV04(push, NVA0_3D(STRMOUT_OFFSET(i)), 1);
|
||||
PUSH_DATA(push, 0);
|
||||
targ->clean = false;
|
||||
}
|
||||
@@ -650,7 +655,6 @@ nv50_stream_output_validate(struct nv50_context *nv50)
|
||||
(so->stride[i] * nv50->state.prim_size);
|
||||
prims = MIN2(prims, limit);
|
||||
}
|
||||
targ->stride = so->stride[i];
|
||||
BCTX_REFN(nv50->bufctx_3d, SO, buf, WR);
|
||||
}
|
||||
if (prims != ~0) {
|
||||
|
@@ -503,8 +503,7 @@ static struct state_validate {
|
||||
{ nv50_validate_samplers, NV50_NEW_SAMPLERS },
|
||||
{ nv50_stream_output_validate, NV50_NEW_STRMOUT |
|
||||
NV50_NEW_VERTPROG | NV50_NEW_GMTYPROG },
|
||||
{ nv50_vertex_arrays_validate, NV50_NEW_VERTEX | NV50_NEW_ARRAYS |
|
||||
NV50_NEW_VERTPROG },
|
||||
{ nv50_vertex_arrays_validate, NV50_NEW_VERTEX | NV50_NEW_ARRAYS },
|
||||
{ nv50_validate_min_samples, NV50_NEW_MIN_SAMPLES },
|
||||
};
|
||||
#define validate_list_len (sizeof(validate_list) / sizeof(validate_list[0]))
|
||||
|
@@ -221,26 +221,6 @@ nv50_create_texture_view(struct pipe_context *pipe,
|
||||
return &view->pipe;
|
||||
}
|
||||
|
||||
static void
|
||||
nv50_update_tic(struct nv50_context *nv50, struct nv50_tic_entry *tic,
|
||||
struct nv04_resource *res)
|
||||
{
|
||||
uint64_t address = res->address;
|
||||
if (res->base.target != PIPE_BUFFER)
|
||||
return;
|
||||
address += tic->pipe.u.buf.first_element *
|
||||
util_format_get_blocksize(tic->pipe.format);
|
||||
if (tic->tic[1] == (uint32_t)address &&
|
||||
(tic->tic[2] & 0xff) == address >> 32)
|
||||
return;
|
||||
|
||||
nv50_screen_tic_unlock(nv50->screen, tic);
|
||||
tic->id = -1;
|
||||
tic->tic[1] = address;
|
||||
tic->tic[2] &= 0xffffff00;
|
||||
tic->tic[2] |= address >> 32;
|
||||
}
|
||||
|
||||
static bool
|
||||
nv50_validate_tic(struct nv50_context *nv50, int s)
|
||||
{
|
||||
@@ -260,7 +240,6 @@ nv50_validate_tic(struct nv50_context *nv50, int s)
|
||||
continue;
|
||||
}
|
||||
res = &nv50_miptree(tic->pipe.texture)->base;
|
||||
nv50_update_tic(nv50, tic, res);
|
||||
|
||||
if (tic->id < 0) {
|
||||
tic->id = nv50_screen_tic_alloc(nv50->screen, tic);
|
||||
|
@@ -187,7 +187,14 @@ nv50_sifc_linear_u8(struct nouveau_context *nv,
|
||||
PUSH_DATA (push, 0);
|
||||
|
||||
while (count) {
|
||||
unsigned nr = MIN2(count, NV04_PFIFO_MAX_PACKET_LEN);
|
||||
unsigned nr;
|
||||
|
||||
if (!PUSH_SPACE(push, 16))
|
||||
break;
|
||||
nr = PUSH_AVAIL(push);
|
||||
assert(nr >= 16);
|
||||
nr = MIN2(count, nr - 1);
|
||||
nr = MIN2(nr, NV04_PFIFO_MAX_PACKET_LEN);
|
||||
|
||||
BEGIN_NI04(push, NV50_2D(SIFC_DATA), nr);
|
||||
PUSH_DATAp(push, src, nr);
|
||||
@@ -358,14 +365,9 @@ nv50_miptree_transfer_unmap(struct pipe_context *pctx,
|
||||
tx->rect[0].base += mt->layer_stride;
|
||||
tx->rect[1].base += tx->nblocksy * tx->base.stride;
|
||||
}
|
||||
|
||||
/* Allow the copies above to finish executing before freeing the source */
|
||||
nouveau_fence_work(nv50->screen->base.fence.current,
|
||||
nouveau_fence_unref_bo, tx->rect[1].bo);
|
||||
} else {
|
||||
nouveau_bo_ref(NULL, &tx->rect[1].bo);
|
||||
}
|
||||
|
||||
nouveau_bo_ref(NULL, &tx->rect[1].bo);
|
||||
pipe_resource_reference(&transfer->resource, NULL);
|
||||
|
||||
FREE(tx);
|
||||
@@ -388,9 +390,12 @@ nv50_cb_push(struct nouveau_context *nv,
|
||||
nouveau_pushbuf_validate(push);
|
||||
|
||||
while (words) {
|
||||
unsigned nr = MIN2(words, NV04_PFIFO_MAX_PACKET_LEN);
|
||||
unsigned nr;
|
||||
|
||||
nr = PUSH_AVAIL(push);
|
||||
nr = MIN2(nr - 7, words);
|
||||
nr = MIN2(nr, NV04_PFIFO_MAX_PACKET_LEN - 1);
|
||||
|
||||
PUSH_SPACE(push, nr + 7);
|
||||
BEGIN_NV04(push, NV50_3D(CB_DEF_ADDRESS_HIGH), 3);
|
||||
PUSH_DATAh(push, bo->offset + base);
|
||||
PUSH_DATA (push, bo->offset + base);
|
||||
|
@@ -293,8 +293,7 @@ nv50_vertex_arrays_validate(struct nv50_context *nv50)
|
||||
uint64_t addrs[PIPE_MAX_ATTRIBS];
|
||||
uint32_t limits[PIPE_MAX_ATTRIBS];
|
||||
struct nouveau_pushbuf *push = nv50->base.pushbuf;
|
||||
struct nv50_vertex_stateobj dummy = {};
|
||||
struct nv50_vertex_stateobj *vertex = nv50->vertex ? nv50->vertex : &dummy;
|
||||
struct nv50_vertex_stateobj *vertex = nv50->vertex;
|
||||
struct pipe_vertex_buffer *vb;
|
||||
struct nv50_vertex_element *ve;
|
||||
uint32_t mask;
|
||||
@@ -302,14 +301,6 @@ nv50_vertex_arrays_validate(struct nv50_context *nv50)
|
||||
unsigned i;
|
||||
const unsigned n = MAX2(vertex->num_elements, nv50->state.num_vtxelts);
|
||||
|
||||
/* A vertexid is not generated for inline data uploads. Have to use a
|
||||
* VBO. This check must come after the vertprog has been validated,
|
||||
* otherwise vertexid may be unset.
|
||||
*/
|
||||
assert(nv50->vertprog->translated);
|
||||
if (nv50->vertprog->vp.vertexid)
|
||||
nv50->vbo_push_hint = 0;
|
||||
|
||||
if (unlikely(vertex->need_conversion))
|
||||
nv50->vbo_fifo = ~0;
|
||||
else
|
||||
@@ -326,6 +317,7 @@ nv50_vertex_arrays_validate(struct nv50_context *nv50)
|
||||
if (buf && buf->status & NOUVEAU_BUFFER_STATUS_GPU_WRITING) {
|
||||
buf->status &= ~NOUVEAU_BUFFER_STATUS_GPU_WRITING;
|
||||
nv50->base.vbo_dirty = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -744,8 +736,9 @@ nva0_draw_stream_output(struct nv50_context *nv50,
|
||||
BEGIN_NV04(push, NVA0_3D(DRAW_TFB_BASE), 1);
|
||||
PUSH_DATA (push, 0);
|
||||
BEGIN_NV04(push, NVA0_3D(DRAW_TFB_STRIDE), 1);
|
||||
PUSH_DATA (push, so->stride);
|
||||
nv50_query_pushbuf_submit(push, NVA0_3D_DRAW_TFB_BYTES, so->pq, 0x4);
|
||||
PUSH_DATA (push, 0);
|
||||
BEGIN_NV04(push, NVA0_3D(DRAW_TFB_BYTES), 1);
|
||||
nv50_query_pushbuf_submit(push, so->pq, 0x4);
|
||||
BEGIN_NV04(push, NV50_3D(VERTEX_END_GL), 1);
|
||||
PUSH_DATA (push, 0);
|
||||
|
||||
@@ -768,7 +761,6 @@ nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
||||
{
|
||||
struct nv50_context *nv50 = nv50_context(pipe);
|
||||
struct nouveau_pushbuf *push = nv50->base.pushbuf;
|
||||
bool tex_dirty = false;
|
||||
int i, s;
|
||||
|
||||
/* NOTE: caller must ensure that (min_index + index_bias) is >= 0 */
|
||||
@@ -798,9 +790,6 @@ nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
||||
|
||||
push->kick_notify = nv50_draw_vbo_kick_notify;
|
||||
|
||||
/* TODO: Instead of iterating over all the buffer resources looking for
|
||||
* coherent buffers, keep track of a context-wide count.
|
||||
*/
|
||||
for (s = 0; s < 3 && !nv50->cb_dirty; ++s) {
|
||||
uint32_t valid = nv50->constbuf_valid[s];
|
||||
|
||||
@@ -828,21 +817,6 @@ nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
||||
nv50->cb_dirty = false;
|
||||
}
|
||||
|
||||
for (s = 0; s < 3 && !tex_dirty; ++s) {
|
||||
for (i = 0; i < nv50->num_textures[s] && !tex_dirty; ++i) {
|
||||
if (!nv50->textures[s][i] ||
|
||||
nv50->textures[s][i]->texture->target != PIPE_BUFFER)
|
||||
continue;
|
||||
if (nv50->textures[s][i]->texture->flags &
|
||||
PIPE_RESOURCE_FLAG_MAP_COHERENT)
|
||||
tex_dirty = true;
|
||||
}
|
||||
}
|
||||
if (tex_dirty) {
|
||||
BEGIN_NV04(push, NV50_3D(TEX_CACHE_CTL), 1);
|
||||
PUSH_DATA (push, 0x20);
|
||||
}
|
||||
|
||||
if (nv50->vbo_fifo) {
|
||||
nv50_push_vbo(nv50, info);
|
||||
push->kick_notify = nv50_default_kick_notify;
|
||||
@@ -864,6 +838,10 @@ nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
||||
nv50->base.vbo_dirty = true;
|
||||
}
|
||||
|
||||
if (!nv50->base.vbo_dirty && nv50->idxbuf.buffer &&
|
||||
nv50->idxbuf.buffer->flags & PIPE_RESOURCE_FLAG_MAP_COHERENT)
|
||||
nv50->base.vbo_dirty = true;
|
||||
|
||||
if (nv50->base.vbo_dirty) {
|
||||
BEGIN_NV04(push, NV50_3D(VERTEX_ARRAY_FLUSH), 1);
|
||||
PUSH_DATA (push, 0);
|
||||
|
@@ -262,7 +262,7 @@ nvc0_context_get_sample_position(struct pipe_context *, unsigned, unsigned,
|
||||
float *);
|
||||
|
||||
struct pipe_context *
|
||||
nvc0_create(struct pipe_screen *pscreen, void *priv)
|
||||
nvc0_create(struct pipe_screen *pscreen, void *priv, unsigned ctxflags)
|
||||
{
|
||||
struct nvc0_screen *screen = nvc0_screen(pscreen);
|
||||
struct nvc0_context *nvc0;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user