Compare commits
133 Commits
mesa-7.5-1
...
mesa-7.5.1
Author | SHA1 | Date | |
---|---|---|---|
|
70fd9421ac | ||
|
1810757c29 | ||
|
4c79e26a9d | ||
|
1783d52ace | ||
|
c5bf7f94c0 | ||
|
8222bfc1d1 | ||
|
7d3af894d6 | ||
|
32156f3a11 | ||
|
1c32caf075 | ||
|
67c286d20e | ||
|
0b4e835b13 | ||
|
08575509e4 | ||
|
ccb081414b | ||
|
47df7900fd | ||
|
c3a0624ef0 | ||
|
e79054cc40 | ||
|
de343680a3 | ||
|
1d7a989b10 | ||
|
d9b7d7875b | ||
|
3f785080db | ||
|
fcf0804c05 | ||
|
9f36473a8e | ||
|
2241665dc6 | ||
|
6bf86681f5 | ||
|
f7654faf16 | ||
|
a48ee529a2 | ||
|
edb1178798 | ||
|
9399b9a0e2 | ||
|
0d7bed9f89 | ||
|
8f4d66c5f8 | ||
|
43a064e06d | ||
|
32f95f8c17 | ||
|
f8ae968d28 | ||
|
babb5ba9a9 | ||
|
d09d03aa42 | ||
|
488b3c4d1b | ||
|
f6d34c2058 | ||
|
04d170794a | ||
|
bf7e4b10cb | ||
|
96f7b42242 | ||
|
b5ecbbe636 | ||
|
b9b04872d5 | ||
|
f785b35b47 | ||
|
3f970a6d4e | ||
|
1aba1baa62 | ||
|
ce723d8d8b | ||
|
4c7c294fff | ||
|
5e6d21afa4 | ||
|
3097d7dbf8 | ||
|
fab17c1216 | ||
|
ee0984e299 | ||
|
e8957f4800 | ||
|
e3bc1fb6bc | ||
|
10430f47a4 | ||
|
cdf56eb68d | ||
|
1574b05189 | ||
|
a7ca80ff6a | ||
|
467b3d9a6f | ||
|
e691b0e533 | ||
|
3ffaa11f88 | ||
|
1e0f621b50 | ||
|
6d55fd705d | ||
|
ecb177eaea | ||
|
36df6a6e91 | ||
|
ad8a6937ae | ||
|
f418d18ea6 | ||
|
a531a5cf94 | ||
|
1ce3f5a806 | ||
|
d80b36f64f | ||
|
9676ed27fe | ||
|
98f00e8eb9 | ||
|
24fdf8aadb | ||
|
ffb1f9bded | ||
|
8c223e8eb6 | ||
|
5b3428d745 | ||
|
a59579c983 | ||
|
dcebe220f4 | ||
|
f792137593 | ||
|
2cd33afa00 | ||
|
727b2d747e | ||
|
4f36164024 | ||
|
05d393f59f | ||
|
854ea483d4 | ||
|
3a221a9018 | ||
|
61673aebb0 | ||
|
f5f8be8bb2 | ||
|
2bec909c69 | ||
|
f0df08abbe | ||
|
9d3929b60c | ||
|
9185a61c8a | ||
|
0ce73f84e9 | ||
|
fb7cf731f9 | ||
|
b59eb3b8b1 | ||
|
ed6125fe9b | ||
|
35e3449ad7 | ||
|
7d93f817c9 | ||
|
6842829539 | ||
|
2420b283b7 | ||
|
4d99e14535 | ||
|
45f4e8842e | ||
|
d090ba9e00 | ||
|
82f4dc21cc | ||
|
e32b601e7d | ||
|
ce0ad53281 | ||
|
bc60b88411 | ||
|
3dbaf68bdc | ||
|
722d136f7b | ||
|
a7427b0f7b | ||
|
0ad9eba333 | ||
|
7e2f26cbbf | ||
|
d2f56fe687 | ||
|
09ef339b69 | ||
|
25e371fb7b | ||
|
a151efc6cc | ||
|
05c0e10a9e | ||
|
5276b049b4 | ||
|
c57d81ddc9 | ||
|
3c4727a4e9 | ||
|
40f217aea7 | ||
|
d3403389cd | ||
|
a70d1eb1ee | ||
|
d7aa5d5ca0 | ||
|
b4ba6a66b7 | ||
|
9c4b877519 | ||
|
b9e2e32daf | ||
|
04493de67b | ||
|
e06e2b001f | ||
|
d740456ee5 | ||
|
45c5ed4bb8 | ||
|
19a8ce6f70 | ||
|
a6b314150c | ||
|
1b445f9673 | ||
|
5ed4404005 |
12
Makefile
12
Makefile
@@ -182,7 +182,7 @@ ultrix-gcc:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
VERSION=7.5
|
||||
VERSION=7.5.1
|
||||
DIRECTORY = Mesa-$(VERSION)
|
||||
LIB_NAME = MesaLib-$(VERSION)
|
||||
DEMO_NAME = MesaDemos-$(VERSION)
|
||||
@@ -388,7 +388,17 @@ GLW_FILES = \
|
||||
$(DIRECTORY)/src/glw/glw.pc.in \
|
||||
$(DIRECTORY)/src/glw/depend
|
||||
|
||||
GLEW_FILES = \
|
||||
$(DIRECTORY)/include/GL/glew.h \
|
||||
$(DIRECTORY)/include/GL/glxew.h \
|
||||
$(DIRECTORY)/include/GL/wglew.h \
|
||||
$(DIRECTORY)/src/glew/*.c \
|
||||
$(DIRECTORY)/src/glew/Makefile \
|
||||
$(DIRECTORY)/src/glew/SConscript \
|
||||
$(DIRECTORY)/src/glew/LICENSE.txt
|
||||
|
||||
DEMO_FILES = \
|
||||
$(GLEW_FILES) \
|
||||
$(DIRECTORY)/progs/beos/*.cpp \
|
||||
$(DIRECTORY)/progs/beos/Makefile \
|
||||
$(DIRECTORY)/progs/images/*.rgb \
|
||||
|
@@ -971,5 +971,6 @@ esac
|
||||
#
|
||||
if [ ${INSTALLDIR} != "." ] ; then
|
||||
echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR}
|
||||
test -d ${INSTALLDIR} || mkdir -p ${INSTALLDIR}
|
||||
mv ${FINAL_LIBS} ${INSTALLDIR}/
|
||||
fi
|
||||
|
@@ -10,7 +10,7 @@ CONFIG_NAME = default
|
||||
# Version info
|
||||
MESA_MAJOR=7
|
||||
MESA_MINOR=5
|
||||
MESA_TINY=0
|
||||
MESA_TINY=1
|
||||
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
|
||||
|
||||
# external projects. This should be useless now that we use libdrm.
|
||||
|
16
configure.ac
16
configure.ac
@@ -121,6 +121,7 @@ AC_ARG_ENABLE([32-bit],
|
||||
if test "x$enable_32bit" = xyes; then
|
||||
if test "x$GCC" = xyes; then
|
||||
CFLAGS="$CFLAGS -m32"
|
||||
ARCH_FLAGS="$ARCH_FLAGS -m32"
|
||||
fi
|
||||
if test "x$GXX" = xyes; then
|
||||
CXXFLAGS="$CXXFLAGS -m32"
|
||||
@@ -1145,6 +1146,21 @@ AC_ARG_WITH([xorg-driver-dir],
|
||||
[XORG_DRIVER_INSTALL_DIR="${libdir}/xorg/modules/drivers"])
|
||||
AC_SUBST([XORG_DRIVER_INSTALL_DIR])
|
||||
|
||||
AC_ARG_WITH([max-width],
|
||||
[AS_HELP_STRING([--with-max-width=N],
|
||||
[Maximum framebuffer width (4096)])],
|
||||
[DEFINES="${DEFINES} -DMAX_WIDTH=${withval}";
|
||||
AS_IF([test "${withval}" -gt "4096"],
|
||||
[AC_MSG_WARN([Large framebuffer: see s_tritemp.h comments.])])]
|
||||
)
|
||||
AC_ARG_WITH([max-height],
|
||||
[AS_HELP_STRING([--with-max-height=N],
|
||||
[Maximum framebuffer height (4096)])],
|
||||
[DEFINES="${DEFINES} -DMAX_HEIGHT=${withval}";
|
||||
AS_IF([test "${withval}" -gt "4096"],
|
||||
[AC_MSG_WARN([Large framebuffer: see s_tritemp.h comments.])])]
|
||||
)
|
||||
|
||||
dnl
|
||||
dnl Gallium Intel configuration
|
||||
dnl
|
||||
|
39
debian/README.source
vendored
Normal file
39
debian/README.source
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
------------------------------------------------------
|
||||
Quick Guide To Patching This Package For The Impatient
|
||||
------------------------------------------------------
|
||||
|
||||
1. Make sure you have quilt installed
|
||||
2. Unpack the package as usual with "dpkg-source -x"
|
||||
3. Run the "patch" target in debian/rules
|
||||
4. Create a new patch with "quilt new" (see quilt(1))
|
||||
5. Edit all the files you want to include in the patch with "quilt edit"
|
||||
(see quilt(1)).
|
||||
6. Write the patch with "quilt refresh" (see quilt(1))
|
||||
7. Run the "clean" target in debian/rules
|
||||
|
||||
Alternatively, instead of using quilt directly, you can drop the patch in to
|
||||
debian/patches and add the name of the patch to debian/patches/series.
|
||||
|
||||
|
||||
The X Strike Force team maintains X packages in git repositories on
|
||||
git.debian.org in the pkg-xorg subdirectory. Most upstream packages
|
||||
are actually maintained in git repositories as well, so they often
|
||||
just need to be pulled into git.debian.org in a "upstream-*" branch.
|
||||
|
||||
The .orig.tar.gz upstream source file could be generated this
|
||||
"upstream-*" branch in the Debian git repository but it is actually
|
||||
generated from upstream tarballs directly.
|
||||
Upstream ships Mesa as 3 different tarballs (MesaLib, MesaGLUT and
|
||||
MesaDemos) which are re-bundled together into a single .orig.tar.gz.
|
||||
|
||||
The Debian packaging is added by creating the "debian-*" git branch
|
||||
which contains the aforementioned "upstream-*" branch plus the debian/
|
||||
repository files.
|
||||
When a patch has to be applied to the Debian package, two solutions
|
||||
are involved:
|
||||
* If the patch is available in one of the upstream branches, it
|
||||
may be git'cherry-picked into the Debian repository. In this
|
||||
case, it appears directly in the .diff.gz.
|
||||
* Otherwise, the patch is added to debian/patches/ which is managed
|
||||
with quilt as documented in /usr/share/doc/quilt/README.source.
|
||||
Thus, the patching system requires a build dependency on quilt.
|
33
debian/changelog
vendored
33
debian/changelog
vendored
@@ -1,3 +1,36 @@
|
||||
mesa (7.5.1-1) unstable; urgency=low
|
||||
|
||||
[ Brice Goglin ]
|
||||
* New upstream release.
|
||||
* Add README.source.
|
||||
* Bump Standards-Version to 3.8.3.
|
||||
|
||||
[ Julien Cristau ]
|
||||
* Override 'package-name-doesnt-match-sonames' lintian warnings for libGLU,
|
||||
libGLw and both libGLs.
|
||||
* Use dh_lintian and bump debhelper build-dep accordingly.
|
||||
|
||||
-- Brice Goglin <bgoglin@debian.org> Fri, 04 Sep 2009 11:38:46 +0200
|
||||
|
||||
mesa (7.5-3) unstable; urgency=low
|
||||
|
||||
* Pull from upstream mesa_7_5_branch up to commit b4ba6a66
|
||||
(early 7.5.1 release snapshot).
|
||||
* Only install the huge upstream changelog in mesa-common-dev,
|
||||
closes: #538094.
|
||||
* Enable i686 optimized libraries on hurd-i386.
|
||||
|
||||
-- Brice Goglin <bgoglin@debian.org> Fri, 24 Jul 2009 00:29:28 +0200
|
||||
|
||||
mesa (7.5-2) unstable; urgency=low
|
||||
|
||||
* Pull from upstream mesa_7_5_branch up to commit a6b31415
|
||||
+ radeon/DRI1: if we have HW stencil, only expose fbconfigs with stencil,
|
||||
closes: #537732.
|
||||
* Install the upstream changelog.
|
||||
|
||||
-- Brice Goglin <bgoglin@debian.org> Tue, 21 Jul 2009 22:21:50 +0200
|
||||
|
||||
mesa (7.5-1) unstable; urgency=low
|
||||
|
||||
[ Timo Aaltonen ]
|
||||
|
10
debian/control
vendored
10
debian/control
vendored
@@ -3,8 +3,8 @@ Section: graphics
|
||||
Priority: optional
|
||||
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
|
||||
Uploaders: Thierry Reding <thierry@gilfi.de>, Julien Cristau <jcristau@debian.org>, David Nusinow <dnusinow@debian.org>, Brice Goglin <bgoglin@debian.org>
|
||||
Standards-Version: 3.7.3
|
||||
Build-Depends: debhelper (>= 5), quilt (>= 0.40), pkg-config,
|
||||
Standards-Version: 3.8.3
|
||||
Build-Depends: debhelper (>= 6.0.7), quilt (>= 0.40), pkg-config,
|
||||
libdrm-dev (>= 2.4.3) [!hurd-i386], libx11-dev, xutils-dev,
|
||||
x11proto-gl-dev (>= 1.4.8), libxxf86vm-dev,
|
||||
libexpat1-dev, lesstif2-dev, dpkg-dev (>= 1.13.19), libxfixes-dev,
|
||||
@@ -64,7 +64,7 @@ Description: A free implementation of the OpenGL API -- debugging symbols
|
||||
Package: libgl1-mesa-swx11-i686
|
||||
Section: libs
|
||||
Priority: extra
|
||||
Architecture: i386 kfreebsd-i386
|
||||
Architecture: i386 kfreebsd-i386 hurd-i386
|
||||
Depends: libgl1-mesa-swx11 (= ${binary:Version}), ${shlibs:Depends}
|
||||
Description: Mesa OpenGL runtime [i686 optimized]
|
||||
Mesa is a 3-D graphics library with an API which is very similar to
|
||||
@@ -143,7 +143,7 @@ Description: Debugging symbols for the Mesa GLX runtime
|
||||
#Package: libgl1-mesa-glx-i686
|
||||
#Section: libs
|
||||
#Priority: extra
|
||||
#Architecture: i386 kfreebsd-i386
|
||||
#Architecture: i386 kfreebsd-i386 hurd-i386
|
||||
#Pre-Depends: libgl1-mesa-glx
|
||||
#Description: A free implementation of the OpenGL API -- GLX runtime [i686 optimized]
|
||||
# This version of Mesa provides GLX and DRI capabilities: it is capable of
|
||||
@@ -204,7 +204,7 @@ Description: Debugging symbols for the Mesa DRI modules
|
||||
#Package: libgl1-mesa-dri-i686
|
||||
#Section: libs
|
||||
#Priority: extra
|
||||
#Architecture: i386 kfreebsd-i386
|
||||
#Architecture: i386 kfreebsd-i386 hurd-i386
|
||||
#Pre-Depends: libgl1-mesa-dri
|
||||
#Description: A free implementation of the OpenGL API -- DRI modules [i686 optimized]
|
||||
# This version of Mesa provides GLX and DRI capabilities: it is capable of
|
||||
|
1
debian/libgl1-mesa-glx.lintian-overrides
vendored
Normal file
1
debian/libgl1-mesa-glx.lintian-overrides
vendored
Normal file
@@ -0,0 +1 @@
|
||||
package-name-doesnt-match-sonames libGL1
|
1
debian/libgl1-mesa-swx11.lintian-overrides
vendored
Normal file
1
debian/libgl1-mesa-swx11.lintian-overrides
vendored
Normal file
@@ -0,0 +1 @@
|
||||
package-name-doesnt-match-sonames libGL1
|
1
debian/libglu1-mesa.lintian-overrides
vendored
Normal file
1
debian/libglu1-mesa.lintian-overrides
vendored
Normal file
@@ -0,0 +1 @@
|
||||
package-name-doesnt-match-sonames libGLU1
|
1
debian/libglw1-mesa.lintian-overrides
vendored
Normal file
1
debian/libglw1-mesa.lintian-overrides
vendored
Normal file
@@ -0,0 +1 @@
|
||||
package-name-doesnt-match-sonames libGLw1
|
2
debian/rules
vendored
2
debian/rules
vendored
@@ -223,10 +223,12 @@ binary-arch: install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs -s
|
||||
dh_installchangelogs -pmesa-common-dev ChangeLog
|
||||
dh_installdocs -s
|
||||
dh_installexamples -s
|
||||
dh_install -s --sourcedir=debian/tmp --list-missing
|
||||
dh_installman -s
|
||||
dh_lintian -s
|
||||
dh_link -s
|
||||
dh_strip -plibgl1-mesa-swx11 --dbg-package=libgl1-mesa-swx11-dbg
|
||||
dh_strip -plibgl1-mesa-glx --dbg-package=libgl1-mesa-glx-dbg
|
||||
|
2
debian/scripts/choose-configs
vendored
2
debian/scripts/choose-configs
vendored
@@ -37,7 +37,7 @@ endif
|
||||
##############################################################################
|
||||
## CPU-optimized configurations ##############################################
|
||||
|
||||
ifneq (,$(filter $(DEB_BUILD_ARCH), i386 kfreebsd-i386))
|
||||
ifneq (,$(filter $(DEB_BUILD_ARCH), i386 kfreebsd-i386 hurd-i386))
|
||||
SWX11_GLU_CONFIGS += swx11+glu-i386-i686
|
||||
# DRI_CONFIGS += debian-dri-i386-i686
|
||||
endif
|
||||
|
@@ -39,7 +39,6 @@ a:visited {
|
||||
<ul>
|
||||
<li><a href="download.html" target="MainFrame">Downloading / Unpacking</a>
|
||||
<li><a href="install.html" target="MainFrame">Compiling / Installing</a>
|
||||
<li><a href="glu.html" target="MainFrame">SGI's GLU</a>
|
||||
<li><a href="precompiled.html" target="MainFrame">Precompiled Libraries</a>
|
||||
</ul>
|
||||
|
||||
@@ -68,6 +67,7 @@ a:visited {
|
||||
<li><a href="repository.html" target="MainFrame">Source Code Repository</a>
|
||||
<li><a href="memory.html" target="MainFrame">DRI Memory Management</a>
|
||||
<li><a href="shading.html" target="MainFrame">Shading Language</a>
|
||||
<li><a href="glu.html" target="MainFrame">SGI's GLU</a>
|
||||
<li><a href="utilities.html" target="MainFrame">Utilities</a>
|
||||
<li><a href="helpwanted.html" target="MainFrame">Help Wanted</a>
|
||||
<li><a href="devinfo.html" target="MainFrame">Development Notes</a>
|
||||
|
@@ -9,14 +9,14 @@
|
||||
<H1>Downloading</H1>
|
||||
|
||||
<p>
|
||||
Primary download site:
|
||||
<a href="http://sourceforge.net/project/showfiles.php?group_id=3"
|
||||
target="_parent">SourceForge</a>
|
||||
Primary Mesa download site:
|
||||
<a href="ftp://ftp.freedesktop.org/pub/mesa/"
|
||||
target="_parent">freedesktop.org</a> (FTP)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
When a new release is coming, release candidates (betas) can be found
|
||||
<a href="http://www.mesa3d.org/beta/">here</a>.
|
||||
When a new release is coming, release candidates (betas) may be found
|
||||
<a href="ftp://ftp.freedesktop.org/pub/mesa/beta/" target="_parent">here</a>.
|
||||
</p>
|
||||
|
||||
|
||||
|
@@ -316,6 +316,19 @@ Basically, applying a translation of (0.375, 0.375, 0.0) to your coordinates
|
||||
will fix the problem.
|
||||
</p>
|
||||
|
||||
<h2>3.6 How can I change the maximum framebuffer size in Mesa's
|
||||
<tt>swrast</tt> backend?</h2>
|
||||
<p>
|
||||
These can be overridden by using the <tt>--with-max-width</tt> and
|
||||
<tt>--with-max-height</tt> options. The two need not be equal.
|
||||
</p><p>
|
||||
Do note that Mesa uses these values to size some internal buffers,
|
||||
so increasing these sizes will cause Mesa to require additional
|
||||
memory. Furthermore, increasing these limits beyond <tt>4096</tt>
|
||||
may introduce rasterization artifacts; see the leading comments in
|
||||
<tt>src/mesa/swrast/s_tritemp.h</tt>.
|
||||
</p>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
@@ -11,6 +11,13 @@
|
||||
<H1>News</H1>
|
||||
|
||||
|
||||
<h2>September 3, 2009</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.5.1.html">Mesa 7.5.1</a> is released.
|
||||
This is a bug-fix release which fixes bugs found in version 7.5.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>July 17, 2009</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.5.html">Mesa 7.5</a> is released.
|
||||
|
@@ -9,17 +9,11 @@
|
||||
<H1>Precompiled Libraries</H1>
|
||||
|
||||
<p>
|
||||
In general, precompiled libraries are not available.
|
||||
However, people occasionally prepare packages of precompiled libraries
|
||||
for some systems.
|
||||
In general, precompiled Mesa libraries are not available.
|
||||
</p>
|
||||
|
||||
<H2>Mesa-6.0 for Solaris</H2>
|
||||
|
||||
<p>
|
||||
Steve Christensen has submitted precompiled Mesa-6.0 libraries for
|
||||
Solaris at <a href="http://sunfreeware.com/" target="_parent">
|
||||
sunfreeware.com</a>.
|
||||
However, some Linux distros (such as Ubuntu) seem to closely track
|
||||
Mesa and often have the latest Mesa release available as an update.
|
||||
</p>
|
||||
|
||||
</BODY>
|
||||
|
64
docs/relnotes-7.5.1.html
Normal file
64
docs/relnotes-7.5.1.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.5.1 Release Notes, 3 September 2009</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.5.1 is a bug-fix release fixing issues found since the 7.5 release.
|
||||
</p>
|
||||
<p>
|
||||
The main new feature of Mesa 7.5.x is the
|
||||
<a href="http://wiki.freedesktop.org/wiki/Software/gallium"
|
||||
target="_parent">Gallium3D</a> infrastructure.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.5.1 implements the OpenGL 2.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 2.1.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
tbd
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
<li>Added configure --with-max-width=W, --with-max-height=H options to specify
|
||||
max framebuffer, viewport size.
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Added missing GLEW library to MesaDemos tarballs.
|
||||
<li>Fixed swapbuffers jerkiness in Doom3/etc in Intel drivers.
|
||||
<li>Fixed front buffer rendering bug in Intel drivers.
|
||||
<li>Fixed minor GLX memory leaks.
|
||||
<li>Fixed some texture env / fragment program state bugs.
|
||||
<li>Fixed some Gallium glBlitFramebuffer() bugs
|
||||
<li>Empty glBegin/glEnd() pair could cause divide by zero (bug 23489)
|
||||
<li>Fixed Gallium glBitmap() Z position bug
|
||||
<li>Setting arrays of sampler uniforms did not work
|
||||
<li>Selection/Feedback mode didn't handle polygon culling correctly (bug 16866)
|
||||
<li>Fixed 32/64-bit cross compilation issue in gen_matypes.c
|
||||
<li>Fixed glXCreateGLXPixmap() for direct rendering.
|
||||
<li>Fixed Gallium glCopyPixels(GL_STENCIL_INDEX) mispositioned image bug.
|
||||
</ul>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -40,7 +40,15 @@ If you're especially concerned with stability you should probably look for
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
tbd
|
||||
553fd956e544727f30fbe249619b6286 MesaLib-7.5.tar.gz
|
||||
459f332551f6ebb86f384d21dd15e1f0 MesaLib-7.5.tar.bz2
|
||||
8c02c0e17a9025250d20424ae32f5163 MesaLib-7.5.zip
|
||||
a188da2886fa5496ea0c2cda602b2eeb MesaDemos-7.5.tar.gz
|
||||
398ee8801814a00e47f6c2314e3dfddc MesaDemos-7.5.tar.bz2
|
||||
15a0c8ae013c54335a26335e1a98d609 MesaDemos-7.5.zip
|
||||
81010147def5a644ba14f9bbb7a49a2a MesaGLUT-7.5.tar.gz
|
||||
baa7a1e850b6e39bae58868fd0684004 MesaGLUT-7.5.tar.bz2
|
||||
265228418e4423fa328f2f5b7970cf08 MesaGLUT-7.5.zip
|
||||
</pre>
|
||||
|
||||
|
||||
|
@@ -13,6 +13,7 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="relnotes-7.5.1.html">7.5.1 release notes</A>
|
||||
<LI><A HREF="relnotes-7.5.html">7.5 release notes</A>
|
||||
<LI><A HREF="relnotes-7.4.4.html">7.4.4 release notes</A>
|
||||
<LI><A HREF="relnotes-7.4.3.html">7.4.3 release notes</A>
|
||||
|
@@ -498,7 +498,7 @@ SetupFunctionPointers(void)
|
||||
* Make FBO to render into given texture.
|
||||
*/
|
||||
static GLuint
|
||||
MakeFBO_RenderTexture(GLuint TexObj)
|
||||
MakeFBO_RenderTexture(GLuint texObj)
|
||||
{
|
||||
GLuint fb;
|
||||
GLint sizeFudge = 0;
|
||||
@@ -507,7 +507,7 @@ MakeFBO_RenderTexture(GLuint TexObj)
|
||||
glBindFramebuffer_func(GL_FRAMEBUFFER_EXT, fb);
|
||||
/* Render color to texture */
|
||||
glFramebufferTexture2D_func(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
|
||||
TexTarget, TexObj, TextureLevel);
|
||||
TexTarget, texObj, TextureLevel);
|
||||
|
||||
if (Use_ARB_fbo) {
|
||||
/* use a smaller depth buffer to see what happens */
|
||||
@@ -541,7 +541,7 @@ MakeFBO_RenderTexture(GLuint TexObj)
|
||||
|
||||
/* queries */
|
||||
{
|
||||
GLint bits, w, h;
|
||||
GLint bits, w, h, name;
|
||||
|
||||
glBindRenderbuffer_func(GL_RENDERBUFFER_EXT, DepthRB);
|
||||
glGetRenderbufferParameteriv_func(GL_RENDERBUFFER_EXT,
|
||||
@@ -559,8 +559,28 @@ MakeFBO_RenderTexture(GLuint TexObj)
|
||||
glGetRenderbufferParameteriv_func(GL_RENDERBUFFER_EXT,
|
||||
GL_RENDERBUFFER_STENCIL_SIZE_EXT, &bits);
|
||||
printf("Stencil renderbuffer size = %d bits\n", bits);
|
||||
}
|
||||
|
||||
glGetFramebufferAttachmentParameteriv_func(GL_FRAMEBUFFER_EXT,
|
||||
GL_COLOR_ATTACHMENT0,
|
||||
GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT,
|
||||
&name);
|
||||
printf("Render to texture name: %d\n", texObj);
|
||||
printf("Color attachment[0] name: %d\n", name);
|
||||
assert(texObj == name);
|
||||
|
||||
glGetFramebufferAttachmentParameteriv_func(GL_FRAMEBUFFER_EXT,
|
||||
GL_STENCIL_ATTACHMENT,
|
||||
GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT,
|
||||
&name);
|
||||
printf("Stencil attachment name: %d\n", name);
|
||||
|
||||
glGetFramebufferAttachmentParameteriv_func(GL_FRAMEBUFFER_EXT,
|
||||
GL_DEPTH_ATTACHMENT,
|
||||
GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT,
|
||||
&name);
|
||||
printf("Depth attachment name: %d\n", name);
|
||||
|
||||
}
|
||||
/* bind the regular framebuffer */
|
||||
glBindFramebuffer_func(GL_FRAMEBUFFER_EXT, 0);
|
||||
|
||||
|
@@ -32,6 +32,7 @@ DEMO_SOURCES = \
|
||||
pointcoord.c \
|
||||
points.c \
|
||||
samplers.c \
|
||||
samplers_array.c \
|
||||
shadow_sampler.c \
|
||||
skinning.c \
|
||||
texaaline.c \
|
||||
@@ -188,7 +189,8 @@ samplers.o: $(UTIL_HEADERS)
|
||||
samplers: samplers.o $(UTIL_OBJS)
|
||||
|
||||
|
||||
samplers_array.o: $(UTIL_HEADERS)
|
||||
samplers_array.o: samplers.c $(UTIL_HEADERS)
|
||||
$(APP_CC) $(CFLAGS) -DSAMPLERS_ARRAY $< -c -o $@
|
||||
|
||||
samplers_array: samplers_array.o $(UTIL_OBJS)
|
||||
|
||||
|
@@ -211,10 +211,18 @@ InitTextures(void)
|
||||
for (y = 0; y < stripeSize; y++) {
|
||||
for (x = 0; x < size; x++) {
|
||||
GLint k = 4 * ((ypos + y) * size + x);
|
||||
texImage[k + 0] = intensity;
|
||||
texImage[k + 1] = intensity;
|
||||
texImage[k + 2] = 0;
|
||||
texImage[k + 3] = 255;
|
||||
if (x < size / 2) {
|
||||
texImage[k + 0] = intensity;
|
||||
texImage[k + 1] = intensity;
|
||||
texImage[k + 2] = 0;
|
||||
texImage[k + 3] = 255;
|
||||
}
|
||||
else {
|
||||
texImage[k + 0] = 255 - intensity;
|
||||
texImage[k + 1] = 0;
|
||||
texImage[k + 2] = 0;
|
||||
texImage[k + 3] = 255;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -378,6 +378,9 @@ make_window( Display *dpy, const char *name,
|
||||
scrnum = DefaultScreen( dpy );
|
||||
root = RootWindow( dpy, scrnum );
|
||||
|
||||
if (visinfo)
|
||||
XFree(visinfo);
|
||||
|
||||
visinfo = glXChooseVisual( dpy, scrnum, attribs );
|
||||
if (!visinfo) {
|
||||
printf("Error: couldn't get an RGB, Double-buffered visual\n");
|
||||
|
@@ -587,6 +587,9 @@ event_loop(Display *dpy, Window win)
|
||||
angle += 2.0;
|
||||
|
||||
draw();
|
||||
|
||||
glXSwapBuffers(dpy, win);
|
||||
|
||||
if ( get_frame_usage != NULL ) {
|
||||
GLfloat temp;
|
||||
|
||||
@@ -594,8 +597,6 @@ event_loop(Display *dpy, Window win)
|
||||
frame_usage += temp;
|
||||
}
|
||||
|
||||
glXSwapBuffers(dpy, win);
|
||||
|
||||
/* calc framerate */
|
||||
{
|
||||
static int t0 = -1;
|
||||
|
@@ -4,7 +4,7 @@ TOP = ../../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
|
||||
INCLUDE_DIRS = -I$(TOP)/include -I$(TOP)/src/egl/main
|
||||
INCLUDE_DIRS = -I$(TOP)/include -I$(TOP)/src/egl/main $(X11_INCLUDES)
|
||||
|
||||
|
||||
SOURCES = demo.c
|
||||
|
@@ -4,7 +4,7 @@ TOP = ../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
|
||||
INCLUDE_DIRS = -I$(TOP)/include -I$(TOP)/src/mesa/glapi
|
||||
INCLUDE_DIRS = -I$(TOP)/include -I$(TOP)/src/mesa/glapi $(X11_INCLUDES)
|
||||
|
||||
HEADERS = \
|
||||
eglconfig.h \
|
||||
|
@@ -158,6 +158,60 @@ static void do_triangle( struct draw_context *draw,
|
||||
|
||||
|
||||
|
||||
#define QUAD(i0,i1,i2,i3) \
|
||||
do_triangle( draw, \
|
||||
( DRAW_PIPE_RESET_STIPPLE | \
|
||||
DRAW_PIPE_EDGE_FLAG_0 | \
|
||||
DRAW_PIPE_EDGE_FLAG_2 ), \
|
||||
verts + stride * elts[i0], \
|
||||
verts + stride * elts[i1], \
|
||||
verts + stride * elts[i3]); \
|
||||
do_triangle( draw, \
|
||||
( DRAW_PIPE_EDGE_FLAG_0 | \
|
||||
DRAW_PIPE_EDGE_FLAG_1 ), \
|
||||
verts + stride * elts[i1], \
|
||||
verts + stride * elts[i2], \
|
||||
verts + stride * elts[i3])
|
||||
|
||||
#define TRIANGLE(flags,i0,i1,i2) \
|
||||
do_triangle( draw, \
|
||||
elts[i0], /* flags */ \
|
||||
verts + stride * (elts[i0] & ~DRAW_PIPE_FLAG_MASK), \
|
||||
verts + stride * elts[i1], \
|
||||
verts + stride * elts[i2])
|
||||
|
||||
#define LINE(flags,i0,i1) \
|
||||
do_line( draw, \
|
||||
elts[i0], \
|
||||
verts + stride * (elts[i0] & ~DRAW_PIPE_FLAG_MASK), \
|
||||
verts + stride * elts[i1])
|
||||
|
||||
#define POINT(i0) \
|
||||
do_point( draw, \
|
||||
verts + stride * elts[i0] )
|
||||
|
||||
#define FUNC pipe_run
|
||||
#define ARGS \
|
||||
struct draw_context *draw, \
|
||||
unsigned prim, \
|
||||
struct vertex_header *vertices, \
|
||||
unsigned stride, \
|
||||
const ushort *elts
|
||||
|
||||
#define LOCAL_VARS \
|
||||
char *verts = (char *)vertices; \
|
||||
boolean flatfirst = (draw->rasterizer->flatshade && \
|
||||
draw->rasterizer->flatshade_first); \
|
||||
unsigned i; \
|
||||
ushort flags
|
||||
|
||||
#define FLUSH
|
||||
|
||||
#include "draw_pt_decompose.h"
|
||||
#undef ARGS
|
||||
#undef LOCAL_VARS
|
||||
|
||||
|
||||
|
||||
/* Code to run the pipeline on a fairly arbitary collection of vertices.
|
||||
*
|
||||
@@ -178,34 +232,12 @@ void draw_pipeline_run( struct draw_context *draw,
|
||||
unsigned count )
|
||||
{
|
||||
char *verts = (char *)vertices;
|
||||
unsigned i;
|
||||
|
||||
draw->pipeline.verts = verts;
|
||||
draw->pipeline.vertex_stride = stride;
|
||||
draw->pipeline.vertex_count = vertex_count;
|
||||
|
||||
switch (prim) {
|
||||
case PIPE_PRIM_POINTS:
|
||||
for (i = 0; i < count; i++)
|
||||
do_point( draw,
|
||||
verts + stride * elts[i] );
|
||||
break;
|
||||
case PIPE_PRIM_LINES:
|
||||
for (i = 0; i+1 < count; i += 2)
|
||||
do_line( draw,
|
||||
elts[i+0], /* flags */
|
||||
verts + stride * (elts[i+0] & ~DRAW_PIPE_FLAG_MASK),
|
||||
verts + stride * elts[i+1]);
|
||||
break;
|
||||
case PIPE_PRIM_TRIANGLES:
|
||||
for (i = 0; i+2 < count; i += 3)
|
||||
do_triangle( draw,
|
||||
elts[i+0], /* flags */
|
||||
verts + stride * (elts[i+0] & ~DRAW_PIPE_FLAG_MASK),
|
||||
verts + stride * elts[i+1],
|
||||
verts + stride * elts[i+2]);
|
||||
break;
|
||||
}
|
||||
pipe_run(draw, prim, vertices, stride, elts, count);
|
||||
|
||||
draw->pipeline.verts = NULL;
|
||||
draw->pipeline.vertex_count = 0;
|
||||
|
@@ -477,6 +477,8 @@ tgsi_default_full_instruction( void )
|
||||
full_instruction.FullSrcRegisters[i] = tgsi_default_full_src_register();
|
||||
}
|
||||
|
||||
full_instruction.Flags = 0x0;
|
||||
|
||||
return full_instruction;
|
||||
}
|
||||
|
||||
|
@@ -62,6 +62,9 @@
|
||||
|
||||
#define FAST_MATH 1
|
||||
|
||||
/** for tgsi_full_instruction::Flags */
|
||||
#define SOA_DEPENDENCY_FLAG 0x1
|
||||
|
||||
#define TILE_TOP_LEFT 0
|
||||
#define TILE_TOP_RIGHT 1
|
||||
#define TILE_BOTTOM_LEFT 2
|
||||
@@ -182,7 +185,7 @@ print_temp(const struct tgsi_exec_machine *mach, uint index)
|
||||
* MOV t3, t2;
|
||||
* The second instruction will have the wrong value for t0 if executed as-is.
|
||||
*/
|
||||
static boolean
|
||||
boolean
|
||||
tgsi_check_soa_dependencies(const struct tgsi_full_instruction *inst)
|
||||
{
|
||||
uint i, chan;
|
||||
@@ -328,20 +331,25 @@ tgsi_exec_machine_bind_shader(
|
||||
* sizeof(struct tgsi_full_instruction));
|
||||
maxInstructions += 10;
|
||||
}
|
||||
|
||||
if (tgsi_check_soa_dependencies(&parse.FullToken.FullInstruction)) {
|
||||
uint opcode = parse.FullToken.FullInstruction.Instruction.Opcode;
|
||||
parse.FullToken.FullInstruction.Flags = SOA_DEPENDENCY_FLAG;
|
||||
/* XXX we only handle SOA dependencies properly for MOV/SWZ
|
||||
* at this time!
|
||||
*/
|
||||
if (opcode != TGSI_OPCODE_MOV && opcode != TGSI_OPCODE_SWZ) {
|
||||
debug_printf("Warning: SOA dependency in instruction"
|
||||
" is not handled:\n");
|
||||
tgsi_dump_instruction(&parse.FullToken.FullInstruction,
|
||||
numInstructions);
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(instructions + numInstructions,
|
||||
&parse.FullToken.FullInstruction,
|
||||
sizeof(instructions[0]));
|
||||
|
||||
#if 0
|
||||
if (tgsi_check_soa_dependencies(&parse.FullToken.FullInstruction)) {
|
||||
debug_printf("SOA dependency in instruction:\n");
|
||||
tgsi_dump_instruction(&parse.FullToken.FullInstruction,
|
||||
numInstructions);
|
||||
}
|
||||
#else
|
||||
(void) tgsi_check_soa_dependencies;
|
||||
#endif
|
||||
|
||||
numInstructions++;
|
||||
break;
|
||||
|
||||
@@ -2018,9 +2026,23 @@ exec_instruction(
|
||||
|
||||
case TGSI_OPCODE_MOV:
|
||||
case TGSI_OPCODE_SWZ:
|
||||
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index ) {
|
||||
FETCH( &r[0], 0, chan_index );
|
||||
STORE( &r[0], 0, chan_index );
|
||||
if (inst->Flags & SOA_DEPENDENCY_FLAG) {
|
||||
/* Do all fetches into temp regs, then do all stores to avoid
|
||||
* intermediate/accidental clobbering. This could be done all the
|
||||
* time for MOV but for other instructions we'll need more temps...
|
||||
*/
|
||||
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index ) {
|
||||
FETCH( &r[chan_index], 0, chan_index );
|
||||
}
|
||||
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index ) {
|
||||
STORE( &r[chan_index], 0, chan_index );
|
||||
}
|
||||
}
|
||||
else {
|
||||
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index ) {
|
||||
FETCH( &r[0], 0, chan_index );
|
||||
STORE( &r[0], 0, chan_index );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@@ -272,6 +272,10 @@ void
|
||||
tgsi_exec_machine_free_data(struct tgsi_exec_machine *mach);
|
||||
|
||||
|
||||
boolean
|
||||
tgsi_check_soa_dependencies(const struct tgsi_full_instruction *inst);
|
||||
|
||||
|
||||
static INLINE void
|
||||
tgsi_set_kill_mask(struct tgsi_exec_machine *mach, unsigned mask)
|
||||
{
|
||||
|
@@ -91,6 +91,7 @@ struct tgsi_full_instruction
|
||||
struct tgsi_instruction_ext_texture InstructionExtTexture;
|
||||
struct tgsi_full_dst_register FullDstRegisters[TGSI_FULL_MAX_DST_REGISTERS];
|
||||
struct tgsi_full_src_register FullSrcRegisters[TGSI_FULL_MAX_SRC_REGISTERS];
|
||||
uint Flags; /**< user-defined usage */
|
||||
};
|
||||
|
||||
union tgsi_full_token
|
||||
|
@@ -1107,6 +1107,15 @@ static int
|
||||
emit_instruction(struct gen_context *gen,
|
||||
struct tgsi_full_instruction *inst)
|
||||
{
|
||||
|
||||
/* we don't handle saturation/clamping yet */
|
||||
if (inst->Instruction.Saturate != TGSI_SAT_NONE)
|
||||
return 0;
|
||||
|
||||
/* need to use extra temps to fix SOA dependencies : */
|
||||
if (tgsi_check_soa_dependencies(inst))
|
||||
return FALSE;
|
||||
|
||||
switch (inst->Instruction.Opcode) {
|
||||
case TGSI_OPCODE_MOV:
|
||||
case TGSI_OPCODE_SWZ:
|
||||
|
@@ -1502,6 +1502,14 @@ emit_instruction(
|
||||
if (indirect_temp_reference(inst))
|
||||
return FALSE;
|
||||
|
||||
/* we don't handle saturation/clamping yet */
|
||||
if (inst->Instruction.Saturate != TGSI_SAT_NONE)
|
||||
return FALSE;
|
||||
|
||||
/* need to use extra temps to fix SOA dependencies : */
|
||||
if (tgsi_check_soa_dependencies(inst))
|
||||
return FALSE;
|
||||
|
||||
switch (inst->Instruction.Opcode) {
|
||||
case TGSI_OPCODE_ARL:
|
||||
FOR_EACH_DST0_ENABLED_CHANNEL( *inst, chan_index ) {
|
||||
|
@@ -45,6 +45,7 @@
|
||||
#include "util/u_math.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "util/u_simple_shaders.h"
|
||||
#include "util/u_surface.h"
|
||||
|
||||
#include "cso_cache/cso_context.h"
|
||||
|
||||
@@ -61,7 +62,7 @@ struct blit_state
|
||||
struct pipe_viewport_state viewport;
|
||||
|
||||
void *vs;
|
||||
void *fs;
|
||||
void *fs[TGSI_WRITEMASK_XYZW + 1];
|
||||
|
||||
struct pipe_buffer *vbuf; /**< quad vertices */
|
||||
unsigned vbuf_slot;
|
||||
@@ -124,7 +125,7 @@ util_create_blit(struct pipe_context *pipe, struct cso_context *cso)
|
||||
}
|
||||
|
||||
/* fragment shader */
|
||||
ctx->fs = util_make_fragment_tex_shader(pipe);
|
||||
ctx->fs[TGSI_WRITEMASK_XYZW] = util_make_fragment_tex_shader(pipe);
|
||||
ctx->vbuf = NULL;
|
||||
|
||||
/* init vertex data that doesn't change */
|
||||
@@ -145,9 +146,13 @@ void
|
||||
util_destroy_blit(struct blit_state *ctx)
|
||||
{
|
||||
struct pipe_context *pipe = ctx->pipe;
|
||||
unsigned i;
|
||||
|
||||
pipe->delete_vs_state(pipe, ctx->vs);
|
||||
pipe->delete_fs_state(pipe, ctx->fs);
|
||||
|
||||
for (i = 0; i < Elements(ctx->fs); i++)
|
||||
if (ctx->fs[i])
|
||||
pipe->delete_fs_state(pipe, ctx->fs[i]);
|
||||
|
||||
pipe_buffer_reference(&ctx->vbuf, NULL);
|
||||
|
||||
@@ -155,7 +160,11 @@ util_destroy_blit(struct blit_state *ctx)
|
||||
}
|
||||
|
||||
|
||||
static unsigned get_next_slot( struct blit_state *ctx )
|
||||
/**
|
||||
* Get offset of next free slot in vertex buffer for quad vertices.
|
||||
*/
|
||||
static unsigned
|
||||
get_next_slot( struct blit_state *ctx )
|
||||
{
|
||||
const unsigned max_slots = 4096 / sizeof ctx->vertices;
|
||||
|
||||
@@ -173,7 +182,6 @@ static unsigned get_next_slot( struct blit_state *ctx )
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Setup vertex data for the textured quad we'll draw.
|
||||
* Note: y=0=top
|
||||
@@ -260,20 +268,50 @@ setup_vertex_data_tex(struct blit_state *ctx,
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \return TRUE if two regions overlap, FALSE otherwise
|
||||
*/
|
||||
static boolean
|
||||
regions_overlap(int srcX0, int srcY0,
|
||||
int srcX1, int srcY1,
|
||||
int dstX0, int dstY0,
|
||||
int dstX1, int dstY1)
|
||||
{
|
||||
if (MAX2(srcX0, srcX1) < MIN2(dstX0, dstX1))
|
||||
return FALSE; /* src completely left of dst */
|
||||
|
||||
if (MAX2(dstX0, dstX1) < MIN2(srcX0, srcX1))
|
||||
return FALSE; /* dst completely left of src */
|
||||
|
||||
if (MAX2(srcY0, srcY1) < MIN2(dstY0, dstY1))
|
||||
return FALSE; /* src completely above dst */
|
||||
|
||||
if (MAX2(dstY0, dstY1) < MIN2(srcY0, srcY1))
|
||||
return FALSE; /* dst completely above src */
|
||||
|
||||
return TRUE; /* some overlap */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Copy pixel block from src surface to dst surface.
|
||||
* Overlapping regions are acceptable.
|
||||
* Flipping and stretching are supported.
|
||||
* XXX what about clipping???
|
||||
* XXX need some control over blitting Z and/or stencil.
|
||||
*/
|
||||
void
|
||||
util_blit_pixels(struct blit_state *ctx,
|
||||
struct pipe_surface *src,
|
||||
int srcX0, int srcY0,
|
||||
int srcX1, int srcY1,
|
||||
struct pipe_surface *dst,
|
||||
int dstX0, int dstY0,
|
||||
int dstX1, int dstY1,
|
||||
float z, uint filter)
|
||||
util_blit_pixels_writemask(struct blit_state *ctx,
|
||||
struct pipe_surface *src,
|
||||
int srcX0, int srcY0,
|
||||
int srcX1, int srcY1,
|
||||
struct pipe_surface *dst,
|
||||
int dstX0, int dstY0,
|
||||
int dstX1, int dstY1,
|
||||
float z, uint filter,
|
||||
uint writemask)
|
||||
{
|
||||
struct pipe_context *pipe = ctx->pipe;
|
||||
struct pipe_screen *screen = pipe->screen;
|
||||
@@ -285,10 +323,41 @@ util_blit_pixels(struct blit_state *ctx,
|
||||
const int srcLeft = MIN2(srcX0, srcX1);
|
||||
const int srcTop = MIN2(srcY0, srcY1);
|
||||
unsigned offset;
|
||||
boolean overlap;
|
||||
|
||||
assert(filter == PIPE_TEX_MIPFILTER_NEAREST ||
|
||||
filter == PIPE_TEX_MIPFILTER_LINEAR);
|
||||
|
||||
assert(screen->is_format_supported(screen, src->format, PIPE_TEXTURE_2D,
|
||||
PIPE_TEXTURE_USAGE_SAMPLER, 0));
|
||||
assert(screen->is_format_supported(screen, dst->format, PIPE_TEXTURE_2D,
|
||||
PIPE_TEXTURE_USAGE_RENDER_TARGET, 0));
|
||||
|
||||
/* do the regions overlap? */
|
||||
overlap = util_same_surface(src, dst) &&
|
||||
regions_overlap(srcX0, srcY0, srcX1, srcY1,
|
||||
dstX0, dstY0, dstX1, dstY1);
|
||||
|
||||
/*
|
||||
* Check for simple case: no format conversion, no flipping, no stretching,
|
||||
* no overlapping.
|
||||
* Filter mode should not matter since there's no stretching.
|
||||
*/
|
||||
if (dst->format == src->format &&
|
||||
srcX0 < srcX1 &&
|
||||
dstX0 < dstX1 &&
|
||||
srcY0 < srcY1 &&
|
||||
dstY0 < dstY1 &&
|
||||
(dstX1 - dstX0) == (srcX1 - srcX0) &&
|
||||
(dstY1 - dstY0) == (srcY1 - srcY0) &&
|
||||
!overlap) {
|
||||
pipe->surface_copy(pipe,
|
||||
dst, dstX0, dstY0, /* dest */
|
||||
src, srcX0, srcY0, /* src */
|
||||
srcW, srcH); /* size */
|
||||
return;
|
||||
}
|
||||
|
||||
if (srcLeft != srcX0) {
|
||||
/* left-right flip */
|
||||
int tmp = dstX0;
|
||||
@@ -303,20 +372,6 @@ util_blit_pixels(struct blit_state *ctx,
|
||||
dstY1 = tmp;
|
||||
}
|
||||
|
||||
assert(screen->is_format_supported(screen, src->format, PIPE_TEXTURE_2D,
|
||||
PIPE_TEXTURE_USAGE_SAMPLER, 0));
|
||||
assert(screen->is_format_supported(screen, dst->format, PIPE_TEXTURE_2D,
|
||||
PIPE_TEXTURE_USAGE_SAMPLER, 0));
|
||||
|
||||
if(dst->format == src->format && (dstX1 - dstX0) == srcW && (dstY1 - dstY0) == srcH) {
|
||||
/* FIXME: this will most surely fail for overlapping rectangles */
|
||||
pipe->surface_copy(pipe,
|
||||
dst, dstX0, dstY0, /* dest */
|
||||
src, srcX0, srcY0, /* src */
|
||||
srcW, srcH); /* size */
|
||||
return;
|
||||
}
|
||||
|
||||
assert(screen->is_format_supported(screen, dst->format, PIPE_TEXTURE_2D,
|
||||
PIPE_TEXTURE_USAGE_RENDER_TARGET, 0));
|
||||
|
||||
@@ -376,8 +431,11 @@ util_blit_pixels(struct blit_state *ctx,
|
||||
/* texture */
|
||||
cso_set_sampler_textures(ctx->cso, 1, &tex);
|
||||
|
||||
if (ctx->fs[writemask] == NULL)
|
||||
ctx->fs[writemask] = util_make_fragment_tex_shader_writemask(pipe, writemask);
|
||||
|
||||
/* shaders */
|
||||
cso_set_fragment_shader_handle(ctx->cso, ctx->fs);
|
||||
cso_set_fragment_shader_handle(ctx->cso, ctx->fs[writemask]);
|
||||
cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
|
||||
|
||||
/* drawing dest */
|
||||
@@ -412,6 +470,27 @@ util_blit_pixels(struct blit_state *ctx,
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
util_blit_pixels(struct blit_state *ctx,
|
||||
struct pipe_surface *src,
|
||||
int srcX0, int srcY0,
|
||||
int srcX1, int srcY1,
|
||||
struct pipe_surface *dst,
|
||||
int dstX0, int dstY0,
|
||||
int dstX1, int dstY1,
|
||||
float z, uint filter )
|
||||
{
|
||||
util_blit_pixels_writemask( ctx, src,
|
||||
srcX0, srcY0,
|
||||
srcX1, srcY1,
|
||||
dst,
|
||||
dstX0, dstY0,
|
||||
dstX1, dstY1,
|
||||
z, filter,
|
||||
TGSI_WRITEMASK_XYZW );
|
||||
}
|
||||
|
||||
|
||||
/* Release vertex buffer at end of frame to avoid synchronous
|
||||
* rendering.
|
||||
*/
|
||||
@@ -485,7 +564,7 @@ util_blit_pixels_tex(struct blit_state *ctx,
|
||||
cso_set_sampler_textures(ctx->cso, 1, &tex);
|
||||
|
||||
/* shaders */
|
||||
cso_set_fragment_shader_handle(ctx->cso, ctx->fs);
|
||||
cso_set_fragment_shader_handle(ctx->cso, ctx->fs[TGSI_WRITEMASK_XYZW]);
|
||||
cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
|
||||
|
||||
/* drawing dest */
|
||||
|
@@ -60,6 +60,17 @@ util_blit_pixels(struct blit_state *ctx,
|
||||
int dstX1, int dstY1,
|
||||
float z, uint filter);
|
||||
|
||||
void
|
||||
util_blit_pixels_writemask(struct blit_state *ctx,
|
||||
struct pipe_surface *src,
|
||||
int srcX0, int srcY0,
|
||||
int srcX1, int srcY1,
|
||||
struct pipe_surface *dst,
|
||||
int dstX0, int dstY0,
|
||||
int dstX1, int dstY1,
|
||||
float z, uint filter,
|
||||
uint writemask);
|
||||
|
||||
extern void
|
||||
util_blit_pixels_tex(struct blit_state *ctx,
|
||||
struct pipe_texture *tex,
|
||||
|
@@ -143,11 +143,9 @@ void _debug_vprintf(const char *format, va_list ap)
|
||||
#elif defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT)
|
||||
/* TODO */
|
||||
#else /* !PIPE_SUBSYSTEM_WINDOWS */
|
||||
#ifdef DEBUG
|
||||
fflush(stdout);
|
||||
vfprintf(stderr, format, ap);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@@ -921,11 +921,19 @@ static void
|
||||
format_to_type_comps(enum pipe_format pformat,
|
||||
enum dtype *datatype, uint *comps)
|
||||
{
|
||||
/* XXX I think this could be implemented in terms of the pf_*() functions */
|
||||
switch (pformat) {
|
||||
case PIPE_FORMAT_A8R8G8B8_UNORM:
|
||||
case PIPE_FORMAT_X8R8G8B8_UNORM:
|
||||
case PIPE_FORMAT_B8G8R8A8_UNORM:
|
||||
case PIPE_FORMAT_B8G8R8X8_UNORM:
|
||||
case PIPE_FORMAT_R8G8B8A8_SRGB:
|
||||
case PIPE_FORMAT_R8G8B8X8_SRGB:
|
||||
case PIPE_FORMAT_A8R8G8B8_SRGB:
|
||||
case PIPE_FORMAT_X8R8G8B8_SRGB:
|
||||
case PIPE_FORMAT_B8G8R8A8_SRGB:
|
||||
case PIPE_FORMAT_B8G8R8X8_SRGB:
|
||||
case PIPE_FORMAT_R8G8B8_SRGB:
|
||||
*datatype = DTYPE_UBYTE;
|
||||
*comps = 4;
|
||||
return;
|
||||
@@ -942,12 +950,14 @@ format_to_type_comps(enum pipe_format pformat,
|
||||
*comps = 3;
|
||||
return;
|
||||
case PIPE_FORMAT_L8_UNORM:
|
||||
case PIPE_FORMAT_L8_SRGB:
|
||||
case PIPE_FORMAT_A8_UNORM:
|
||||
case PIPE_FORMAT_I8_UNORM:
|
||||
*datatype = DTYPE_UBYTE;
|
||||
*comps = 1;
|
||||
return;
|
||||
case PIPE_FORMAT_A8L8_UNORM:
|
||||
case PIPE_FORMAT_A8L8_SRGB:
|
||||
*datatype = DTYPE_UBYTE;
|
||||
*comps = 2;
|
||||
return;
|
||||
|
@@ -152,11 +152,14 @@ util_make_vertex_passthrough_shader(struct pipe_context *pipe,
|
||||
|
||||
/**
|
||||
* Make simple fragment texture shader:
|
||||
* TEX OUT[0], IN[0], SAMP[0], 2D;
|
||||
* IMM {0,0,0,1} // (if writemask != 0xf)
|
||||
* MOV OUT[0], IMM[0] // (if writemask != 0xf)
|
||||
* TEX OUT[0].writemask, IN[0], SAMP[0], 2D;
|
||||
* END;
|
||||
*/
|
||||
void *
|
||||
util_make_fragment_tex_shader(struct pipe_context *pipe)
|
||||
util_make_fragment_tex_shader_writemask(struct pipe_context *pipe,
|
||||
unsigned writemask )
|
||||
{
|
||||
struct pipe_shader_state shader;
|
||||
struct tgsi_token tokens[100];
|
||||
@@ -217,12 +220,43 @@ util_make_fragment_tex_shader(struct pipe_context *pipe)
|
||||
header,
|
||||
Elements(tokens) - ti);
|
||||
|
||||
|
||||
if (writemask != TGSI_WRITEMASK_XYZW) {
|
||||
struct tgsi_full_immediate imm;
|
||||
static const float value[4] = { 0, 0, 0, 1 };
|
||||
|
||||
imm = tgsi_default_full_immediate();
|
||||
imm.Immediate.NrTokens += 4;
|
||||
imm.Immediate.DataType = TGSI_IMM_FLOAT32;
|
||||
imm.u.Pointer = value;
|
||||
|
||||
ti += tgsi_build_full_immediate(&imm,
|
||||
&tokens[ti],
|
||||
header,
|
||||
Elements(tokens) - ti );
|
||||
|
||||
/* MOV instruction */
|
||||
inst = tgsi_default_full_instruction();
|
||||
inst.Instruction.Opcode = TGSI_OPCODE_MOV;
|
||||
inst.Instruction.NumDstRegs = 1;
|
||||
inst.FullDstRegisters[0].DstRegister.File = TGSI_FILE_OUTPUT;
|
||||
inst.FullDstRegisters[0].DstRegister.Index = 0;
|
||||
inst.Instruction.NumSrcRegs = 1;
|
||||
inst.FullSrcRegisters[0].SrcRegister.File = TGSI_FILE_IMMEDIATE;
|
||||
inst.FullSrcRegisters[0].SrcRegister.Index = 0;
|
||||
ti += tgsi_build_full_instruction(&inst,
|
||||
&tokens[ti],
|
||||
header,
|
||||
Elements(tokens) - ti );
|
||||
}
|
||||
|
||||
/* TEX instruction */
|
||||
inst = tgsi_default_full_instruction();
|
||||
inst.Instruction.Opcode = TGSI_OPCODE_TEX;
|
||||
inst.Instruction.NumDstRegs = 1;
|
||||
inst.FullDstRegisters[0].DstRegister.File = TGSI_FILE_OUTPUT;
|
||||
inst.FullDstRegisters[0].DstRegister.Index = 0;
|
||||
inst.FullDstRegisters[0].DstRegister.WriteMask = writemask;
|
||||
inst.Instruction.NumSrcRegs = 2;
|
||||
inst.InstructionExtTexture.Texture = TGSI_TEXTURE_2D;
|
||||
inst.FullSrcRegisters[0].SrcRegister.File = TGSI_FILE_INPUT;
|
||||
@@ -253,6 +287,13 @@ util_make_fragment_tex_shader(struct pipe_context *pipe)
|
||||
return pipe->create_fs_state(pipe, &shader);
|
||||
}
|
||||
|
||||
void *
|
||||
util_make_fragment_tex_shader(struct pipe_context *pipe )
|
||||
{
|
||||
return util_make_fragment_tex_shader_writemask( pipe,
|
||||
TGSI_WRITEMASK_XYZW );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -49,6 +49,10 @@ util_make_vertex_passthrough_shader(struct pipe_context *pipe,
|
||||
const uint *semantic_indexes);
|
||||
|
||||
|
||||
extern void *
|
||||
util_make_fragment_tex_shader_writemask(struct pipe_context *pipe,
|
||||
unsigned writemask );
|
||||
|
||||
extern void *
|
||||
util_make_fragment_tex_shader(struct pipe_context *pipe);
|
||||
|
||||
|
@@ -37,6 +37,23 @@ struct pipe_texture;
|
||||
struct pipe_surface;
|
||||
|
||||
|
||||
/**
|
||||
* Are s1 and s2 the same surface?
|
||||
* Surfaces are basically views into textures so check if the two surfaces
|
||||
* name the same part of the same texture.
|
||||
*/
|
||||
static INLINE boolean
|
||||
util_same_surface(const struct pipe_surface *s1, const struct pipe_surface *s2)
|
||||
{
|
||||
return (s1->texture == s2->texture &&
|
||||
s1->face == s2->face &&
|
||||
s1->level == s2->level &&
|
||||
s1->zslice == s2->zslice);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
extern boolean
|
||||
util_create_rgba_surface(struct pipe_screen *screen,
|
||||
uint width, uint height,
|
||||
|
@@ -153,7 +153,7 @@ a8r8g8b8_put_tile_rgba(unsigned *dst,
|
||||
}
|
||||
|
||||
|
||||
/*** PIPE_FORMAT_A8R8G8B8_UNORM ***/
|
||||
/*** PIPE_FORMAT_X8R8G8B8_UNORM ***/
|
||||
|
||||
static void
|
||||
x8r8g8b8_get_tile_rgba(const unsigned *src,
|
||||
@@ -596,6 +596,184 @@ r16g16b16a16_put_tile_rgba(short *dst,
|
||||
}
|
||||
|
||||
|
||||
/*** PIPE_FORMAT_R8G8B8A8_SRGB ***/
|
||||
|
||||
/**
|
||||
* Convert an 8-bit sRGB value from non-linear space to a
|
||||
* linear RGB value in [0, 1].
|
||||
* Implemented with a 256-entry lookup table.
|
||||
*/
|
||||
static INLINE float
|
||||
srgb_to_linear(ubyte cs8)
|
||||
{
|
||||
static float table[256];
|
||||
static boolean tableReady = FALSE;
|
||||
if (!tableReady) {
|
||||
/* compute lookup table now */
|
||||
uint i;
|
||||
for (i = 0; i < 256; i++) {
|
||||
const float cs = ubyte_to_float(i);
|
||||
if (cs <= 0.04045) {
|
||||
table[i] = cs / 12.92f;
|
||||
}
|
||||
else {
|
||||
table[i] = (float) powf((cs + 0.055) / 1.055, 2.4);
|
||||
}
|
||||
}
|
||||
tableReady = TRUE;
|
||||
}
|
||||
return table[cs8];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Convert linear float in [0,1] to an srgb ubyte value in [0,255].
|
||||
* XXX this hasn't been tested (render to srgb surface).
|
||||
* XXX this needs optimization.
|
||||
*/
|
||||
static INLINE ubyte
|
||||
linear_to_srgb(float cl)
|
||||
{
|
||||
if (cl >= 1.0F)
|
||||
return 255;
|
||||
else if (cl >= 0.0031308F)
|
||||
return float_to_ubyte(1.055F * powf(cl, 0.41666F) - 0.055F);
|
||||
else if (cl > 0.0F)
|
||||
return float_to_ubyte(12.92F * cl);
|
||||
else
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
a8r8g8b8_srgb_get_tile_rgba(const unsigned *src,
|
||||
unsigned w, unsigned h,
|
||||
float *p,
|
||||
unsigned dst_stride)
|
||||
{
|
||||
unsigned i, j;
|
||||
|
||||
for (i = 0; i < h; i++) {
|
||||
float *pRow = p;
|
||||
for (j = 0; j < w; j++, pRow += 4) {
|
||||
const unsigned pixel = *src++;
|
||||
pRow[0] = srgb_to_linear((pixel >> 16) & 0xff);
|
||||
pRow[1] = srgb_to_linear((pixel >> 8) & 0xff);
|
||||
pRow[2] = srgb_to_linear((pixel >> 0) & 0xff);
|
||||
pRow[3] = ubyte_to_float((pixel >> 24) & 0xff);
|
||||
}
|
||||
p += dst_stride;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
a8r8g8b8_srgb_put_tile_rgba(unsigned *dst,
|
||||
unsigned w, unsigned h,
|
||||
const float *p,
|
||||
unsigned src_stride)
|
||||
{
|
||||
unsigned i, j;
|
||||
|
||||
for (i = 0; i < h; i++) {
|
||||
const float *pRow = p;
|
||||
for (j = 0; j < w; j++, pRow += 4) {
|
||||
unsigned r, g, b, a;
|
||||
r = linear_to_srgb(pRow[0]);
|
||||
g = linear_to_srgb(pRow[1]);
|
||||
b = linear_to_srgb(pRow[2]);
|
||||
a = float_to_ubyte(pRow[3]);
|
||||
*dst++ = (a << 24) | (r << 16) | (g << 8) | b;
|
||||
}
|
||||
p += src_stride;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*** PIPE_FORMAT_A8L8_SRGB ***/
|
||||
|
||||
static void
|
||||
a8l8_srgb_get_tile_rgba(const ushort *src,
|
||||
unsigned w, unsigned h,
|
||||
float *p,
|
||||
unsigned dst_stride)
|
||||
{
|
||||
unsigned i, j;
|
||||
|
||||
for (i = 0; i < h; i++) {
|
||||
float *pRow = p;
|
||||
for (j = 0; j < w; j++, pRow += 4) {
|
||||
ushort p = *src++;
|
||||
pRow[0] =
|
||||
pRow[1] =
|
||||
pRow[2] = srgb_to_linear(p & 0xff);
|
||||
pRow[3] = ubyte_to_float(p >> 8);
|
||||
}
|
||||
p += dst_stride;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
a8l8_srgb_put_tile_rgba(ushort *dst,
|
||||
unsigned w, unsigned h,
|
||||
const float *p,
|
||||
unsigned src_stride)
|
||||
{
|
||||
unsigned i, j;
|
||||
|
||||
for (i = 0; i < h; i++) {
|
||||
const float *pRow = p;
|
||||
for (j = 0; j < w; j++, pRow += 4) {
|
||||
unsigned r, a;
|
||||
r = linear_to_srgb(pRow[0]);
|
||||
a = float_to_ubyte(pRow[3]);
|
||||
*dst++ = (a << 8) | r;
|
||||
}
|
||||
p += src_stride;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*** PIPE_FORMAT_L8_SRGB ***/
|
||||
|
||||
static void
|
||||
l8_srgb_get_tile_rgba(const ubyte *src,
|
||||
unsigned w, unsigned h,
|
||||
float *p,
|
||||
unsigned dst_stride)
|
||||
{
|
||||
unsigned i, j;
|
||||
|
||||
for (i = 0; i < h; i++) {
|
||||
float *pRow = p;
|
||||
for (j = 0; j < w; j++, src++, pRow += 4) {
|
||||
pRow[0] =
|
||||
pRow[1] =
|
||||
pRow[2] = srgb_to_linear(*src);
|
||||
pRow[3] = 1.0;
|
||||
}
|
||||
p += dst_stride;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
l8_srgb_put_tile_rgba(ubyte *dst,
|
||||
unsigned w, unsigned h,
|
||||
const float *p,
|
||||
unsigned src_stride)
|
||||
{
|
||||
unsigned i, j;
|
||||
|
||||
for (i = 0; i < h; i++) {
|
||||
const float *pRow = p;
|
||||
for (j = 0; j < w; j++, pRow += 4) {
|
||||
unsigned r;
|
||||
r = linear_to_srgb(pRow[0]);
|
||||
*dst++ = (ubyte) r;
|
||||
}
|
||||
p += src_stride;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*** PIPE_FORMAT_I8_UNORM ***/
|
||||
|
||||
@@ -946,6 +1124,15 @@ pipe_tile_raw_to_rgba(enum pipe_format format,
|
||||
case PIPE_FORMAT_R16G16B16A16_SNORM:
|
||||
r16g16b16a16_get_tile_rgba((short *) src, w, h, dst, dst_stride);
|
||||
break;
|
||||
case PIPE_FORMAT_A8R8G8B8_SRGB:
|
||||
a8r8g8b8_srgb_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
|
||||
break;
|
||||
case PIPE_FORMAT_A8L8_SRGB:
|
||||
a8l8_srgb_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
|
||||
break;
|
||||
case PIPE_FORMAT_L8_SRGB:
|
||||
l8_srgb_get_tile_rgba((ubyte *) src, w, h, dst, dst_stride);
|
||||
break;
|
||||
case PIPE_FORMAT_Z16_UNORM:
|
||||
z16_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
|
||||
break;
|
||||
@@ -1059,6 +1246,15 @@ pipe_put_tile_rgba(struct pipe_transfer *pt,
|
||||
case PIPE_FORMAT_R16G16B16A16_SNORM:
|
||||
r16g16b16a16_put_tile_rgba((short *) packed, w, h, p, src_stride);
|
||||
break;
|
||||
case PIPE_FORMAT_A8R8G8B8_SRGB:
|
||||
a8r8g8b8_srgb_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);
|
||||
break;
|
||||
case PIPE_FORMAT_A8L8_SRGB:
|
||||
a8l8_srgb_put_tile_rgba((ushort *) packed, w, h, p, src_stride);
|
||||
break;
|
||||
case PIPE_FORMAT_L8_SRGB:
|
||||
l8_srgb_put_tile_rgba((ubyte *) packed, w, h, p, src_stride);
|
||||
break;
|
||||
case PIPE_FORMAT_Z16_UNORM:
|
||||
/*z16_put_tile_rgba((ushort *) packed, w, h, p, src_stride);*/
|
||||
break;
|
||||
|
@@ -123,21 +123,25 @@ static enum pipe_error
|
||||
u_upload_alloc_buffer( struct u_upload_mgr *upload,
|
||||
unsigned min_size )
|
||||
{
|
||||
unsigned size;
|
||||
|
||||
/* Release old buffer, if present:
|
||||
*/
|
||||
u_upload_flush( upload );
|
||||
|
||||
/* Allocate a new one:
|
||||
*/
|
||||
upload->size = align(MAX2(upload->default_size, min_size), 4096);
|
||||
size = align(MAX2(upload->default_size, min_size), 4096);
|
||||
|
||||
upload->buffer = pipe_buffer_create( upload->screen,
|
||||
upload->alignment,
|
||||
upload->usage | PIPE_BUFFER_USAGE_CPU_WRITE,
|
||||
upload->size );
|
||||
size );
|
||||
if (upload->buffer == NULL)
|
||||
goto fail;
|
||||
|
||||
upload->size = size;
|
||||
|
||||
upload->offset = 0;
|
||||
return 0;
|
||||
|
||||
|
@@ -42,6 +42,7 @@
|
||||
#include "sp_texture.h"
|
||||
#include "sp_tile_cache.h"
|
||||
#include "sp_screen.h"
|
||||
#include "sp_winsys.h"
|
||||
|
||||
|
||||
/* Simple, maximally packed layout.
|
||||
|
@@ -351,7 +351,7 @@ void trace_dump_call_begin_locked(const char *klass, const char *method)
|
||||
trace_dump_indent(1);
|
||||
trace_dump_writes("<call no=\'");
|
||||
trace_dump_writef("%lu", call_no);
|
||||
trace_dump_writes("\' class =\'");
|
||||
trace_dump_writes("\' class=\'");
|
||||
trace_dump_escape(klass);
|
||||
trace_dump_writes("\' method=\'");
|
||||
trace_dump_escape(method);
|
||||
|
@@ -63,6 +63,13 @@ pipe_buffer_map(struct pipe_screen *screen,
|
||||
if(screen->buffer_map_range) {
|
||||
unsigned offset = 0;
|
||||
unsigned length = buf->size;
|
||||
|
||||
/* XXX: Actually we should be using/detecting DISCARD
|
||||
* instead of assuming that WRITE implies discard */
|
||||
if((usage & PIPE_BUFFER_USAGE_CPU_WRITE) &&
|
||||
!(usage & PIPE_BUFFER_USAGE_DISCARD))
|
||||
usage |= PIPE_BUFFER_USAGE_CPU_READ;
|
||||
|
||||
return screen->buffer_map_range(screen, buf, offset, length, usage);
|
||||
}
|
||||
else
|
||||
|
@@ -743,7 +743,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
|
||||
{
|
||||
static GLboolean firstTime = GL_TRUE;
|
||||
struct pipe_screen *screen;
|
||||
struct pipe_context *pipe;
|
||||
struct pipe_context *pipe = NULL;
|
||||
XMesaContext c;
|
||||
GLcontext *mesaCtx;
|
||||
uint pf;
|
||||
|
@@ -371,7 +371,7 @@ class Main:
|
||||
stream = GzipFile(arg, 'rt')
|
||||
elif arg.endswith('.bz2'):
|
||||
from bz2 import BZ2File
|
||||
stream = BZ2File(arg, 'rt')
|
||||
stream = BZ2File(arg, 'rU')
|
||||
else:
|
||||
stream = open(arg, 'rt')
|
||||
self.process_arg(stream, options)
|
||||
|
@@ -364,7 +364,7 @@ void xlib_brw_buffer_subdata_typed( struct pipe_winsys *pws,
|
||||
unsigned data_type )
|
||||
{
|
||||
unsigned aub_type = DW_GENERAL_STATE;
|
||||
unsigned aub_sub_type;
|
||||
unsigned aub_sub_type = 0;
|
||||
|
||||
switch (data_type) {
|
||||
case BRW_CC_VP:
|
||||
|
@@ -303,6 +303,7 @@ xm_flush_frontbuffer(struct pipe_winsys *pws,
|
||||
*/
|
||||
XMesaContext xmctx = (XMesaContext) context_private;
|
||||
xlib_softpipe_display_surface(xmctx->xm_buffer, surf);
|
||||
xmesa_check_and_update_buffer_size(xmctx, xmctx->xm_buffer);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -481,6 +481,8 @@ static __GLXDRIscreen *dri2CreateScreen(__GLXscreenConfigs *psc, int screen,
|
||||
psc->configs = driConvertConfigs(psc->core, psc->configs, driver_configs);
|
||||
psc->visuals = driConvertConfigs(psc->core, psc->visuals, driver_configs);
|
||||
|
||||
psc->driver_configs = driver_configs;
|
||||
|
||||
psp->destroyScreen = dri2DestroyScreen;
|
||||
psp->createContext = dri2CreateContext;
|
||||
psp->createDrawable = dri2CreateDrawable;
|
||||
|
@@ -418,6 +418,8 @@ CallCreateNewScreen(Display *dpy, int scrn, __GLXscreenConfigs *psc,
|
||||
psc->configs = driConvertConfigs(psc->core, psc->configs, driver_configs);
|
||||
psc->visuals = driConvertConfigs(psc->core, psc->visuals, driver_configs);
|
||||
|
||||
psc->driver_configs = driver_configs;
|
||||
|
||||
/* Visuals with depth != screen depth are subject to automatic compositing
|
||||
* in the X server, so DRI1 can't render to them properly. Mark them as
|
||||
* non-conformant to prevent apps from picking them up accidentally.
|
||||
|
@@ -401,7 +401,7 @@ driCreateScreen(__GLXscreenConfigs * psc, int screen,
|
||||
psc->configs = driConvertConfigs(psc->core, psc->configs, driver_configs);
|
||||
psc->visuals = driConvertConfigs(psc->core, psc->visuals, driver_configs);
|
||||
|
||||
free(driver_configs);
|
||||
psc->driver_configs = driver_configs;
|
||||
|
||||
psp->destroyScreen = driDestroyScreen;
|
||||
psp->createContext = driCreateContext;
|
||||
|
@@ -501,6 +501,8 @@ struct __GLXscreenConfigsRec {
|
||||
|
||||
__GLXDRIscreen *driScreen;
|
||||
|
||||
const __DRIconfig** driver_configs;
|
||||
|
||||
#ifdef __DRI_COPY_SUB_BUFFER
|
||||
const __DRIcopySubBufferExtension *driCopySubBuffer;
|
||||
#endif
|
||||
|
@@ -845,6 +845,34 @@ PUBLIC GLXPixmap glXCreateGLXPixmap(Display *dpy, XVisualInfo *vis,
|
||||
req->glxpixmap = xid = XAllocID(dpy);
|
||||
UnlockDisplay(dpy);
|
||||
SyncHandle();
|
||||
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
do {
|
||||
/* FIXME: Maybe delay __DRIdrawable creation until the drawable
|
||||
* is actually bound to a context... */
|
||||
|
||||
__GLXdisplayPrivate *const priv = __glXInitialize(dpy);
|
||||
__GLXDRIdrawable *pdraw;
|
||||
__GLXscreenConfigs *psc;
|
||||
__GLcontextModes *modes;
|
||||
|
||||
psc = &priv->screenConfigs[vis->screen];
|
||||
if (psc->driScreen == NULL)
|
||||
break;
|
||||
modes = _gl_context_modes_find_visual(psc->visuals, vis->visualid);
|
||||
pdraw = psc->driScreen->createDrawable(psc, pixmap, req->glxpixmap, modes);
|
||||
if (pdraw == NULL) {
|
||||
fprintf(stderr, "failed to create pixmap\n");
|
||||
break;
|
||||
}
|
||||
|
||||
if (__glxHashInsert(psc->drawHash, req->glxpixmap, pdraw)) {
|
||||
(*pdraw->destroyDrawable) (pdraw);
|
||||
return None; /* FIXME: Check what we're supposed to do here... */
|
||||
}
|
||||
} while (0);
|
||||
#endif
|
||||
|
||||
return xid;
|
||||
}
|
||||
|
||||
|
@@ -149,6 +149,12 @@ FreeScreenConfigs(__GLXdisplayPrivate * priv)
|
||||
Xfree((char *) psc->serverGLXexts);
|
||||
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
if (psc->driver_configs) {
|
||||
for(unsigned int i = 0; psc->driver_configs[i]; i++)
|
||||
free((__DRIconfig*)psc->driver_configs[i]);
|
||||
free(psc->driver_configs);
|
||||
psc->driver_configs = NULL;
|
||||
}
|
||||
if (psc->driScreen) {
|
||||
psc->driScreen->destroyScreen(psc);
|
||||
__glxHashDestroy(psc->drawHash);
|
||||
|
@@ -763,7 +763,7 @@ dri2CreateNewScreen(int scrn, int fd,
|
||||
if (driDriverAPI.InitScreen2 == NULL)
|
||||
return NULL;
|
||||
|
||||
psp = _mesa_malloc(sizeof(*psp));
|
||||
psp = _mesa_calloc(sizeof(*psp));
|
||||
if (!psp)
|
||||
return NULL;
|
||||
|
||||
|
@@ -152,7 +152,8 @@ static void upload_clip_prog(struct brw_context *brw)
|
||||
|
||||
/* _NEW_POLYGON */
|
||||
if (key.primitive == GL_TRIANGLES) {
|
||||
if (ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK)
|
||||
if (ctx->Polygon.CullFlag &&
|
||||
ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK)
|
||||
key.clip_mode = BRW_CLIPMODE_REJECT_ALL;
|
||||
else {
|
||||
GLuint fill_front = CLIP_CULL;
|
||||
|
@@ -197,6 +197,11 @@ _intel_batchbuffer_flush(struct intel_batchbuffer *batch, const char *file,
|
||||
GLuint used = batch->ptr - batch->map;
|
||||
GLboolean was_locked = intel->locked;
|
||||
|
||||
if (intel->first_post_swapbuffers_batch == NULL) {
|
||||
intel->first_post_swapbuffers_batch = intel->batch->buf;
|
||||
drm_intel_bo_reference(intel->first_post_swapbuffers_batch);
|
||||
}
|
||||
|
||||
if (used == 0) {
|
||||
batch->cliprect_mode = IGNORE_CLIPRECTS;
|
||||
return;
|
||||
|
@@ -505,7 +505,7 @@ intel_flush(GLcontext *ctx, GLboolean needs_mi_flush)
|
||||
* each of N places that do rendering. This has worse performances,
|
||||
* but it is much easier to get correct.
|
||||
*/
|
||||
if (intel->is_front_buffer_rendering) {
|
||||
if (!intel->is_front_buffer_rendering) {
|
||||
intel->front_buffer_dirty = GL_FALSE;
|
||||
}
|
||||
}
|
||||
@@ -521,7 +521,27 @@ intelFlush(GLcontext * ctx)
|
||||
static void
|
||||
intel_glFlush(GLcontext *ctx)
|
||||
{
|
||||
struct intel_context *intel = intel_context(ctx);
|
||||
|
||||
intel_flush(ctx, GL_TRUE);
|
||||
|
||||
/* We're using glFlush as an indicator that a frame is done, which is
|
||||
* what DRI2 does before calling SwapBuffers (and means we should catch
|
||||
* people doing front-buffer rendering, as well)..
|
||||
*
|
||||
* Wait for the swapbuffers before the one we just emitted, so we don't
|
||||
* get too many swaps outstanding for apps that are GPU-heavy but not
|
||||
* CPU-heavy.
|
||||
*
|
||||
* Unfortunately, we don't have a handle to the batch containing the swap,
|
||||
* and getting our hands on that doesn't seem worth it, so we just us the
|
||||
* first batch we emitted after the last swap.
|
||||
*/
|
||||
if (intel->first_post_swapbuffers_batch != NULL) {
|
||||
drm_intel_bo_wait_rendering(intel->first_post_swapbuffers_batch);
|
||||
drm_intel_bo_unreference(intel->first_post_swapbuffers_batch);
|
||||
intel->first_post_swapbuffers_batch = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -787,6 +807,8 @@ intelDestroyContext(__DRIcontextPrivate * driContextPriv)
|
||||
intel->prim.vb = NULL;
|
||||
dri_bo_unreference(intel->prim.vb_bo);
|
||||
intel->prim.vb_bo = NULL;
|
||||
dri_bo_unreference(intel->first_post_swapbuffers_batch);
|
||||
intel->first_post_swapbuffers_batch = NULL;
|
||||
|
||||
if (release_texture_heaps) {
|
||||
/* This share group is about to go away, free our private
|
||||
@@ -804,6 +826,9 @@ intelDestroyContext(__DRIcontextPrivate * driContextPriv)
|
||||
|
||||
/* free the Mesa context */
|
||||
_mesa_free_context_data(&intel->ctx);
|
||||
|
||||
FREE(intel);
|
||||
driContextPriv->driverPrivate = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -191,6 +191,7 @@ struct intel_context
|
||||
GLboolean ttm;
|
||||
|
||||
struct intel_batchbuffer *batch;
|
||||
drm_intel_bo *first_post_swapbuffers_batch;
|
||||
GLboolean no_batch_wrap;
|
||||
unsigned batch_id;
|
||||
|
||||
|
@@ -409,6 +409,12 @@ intel_texture_bitmap(GLcontext * ctx,
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
if (ctx->Fog.Enabled) {
|
||||
if (INTEL_DEBUG & DEBUG_FALLBACKS)
|
||||
fprintf(stderr, "glBitmap() fallback: fog\n");
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
/* Check that we can load in a texture this big. */
|
||||
if (width > (1 << (ctx->Const.MaxTextureLevels - 1)) ||
|
||||
height > (1 << (ctx->Const.MaxTextureLevels - 1))) {
|
||||
|
@@ -305,7 +305,7 @@ intelDestroyScreen(__DRIscreenPrivate * sPriv)
|
||||
|
||||
dri_bufmgr_destroy(intelScreen->bufmgr);
|
||||
intelUnmapScreenRegions(intelScreen);
|
||||
driDestroyOptionCache(&intelScreen->optionCache);
|
||||
driDestroyOptionInfo(&intelScreen->optionCache);
|
||||
|
||||
FREE(intelScreen);
|
||||
sPriv->private = NULL;
|
||||
@@ -617,10 +617,10 @@ intel_init_bufmgr(intelScreenPrivate *intelScreen)
|
||||
/* Otherwise, use the classic buffer manager. */
|
||||
if (intelScreen->bufmgr == NULL) {
|
||||
if (gem_disable) {
|
||||
fprintf(stderr, "GEM disabled. Using classic.\n");
|
||||
_mesa_warning(NULL, "GEM disabled. Using classic.");
|
||||
} else {
|
||||
fprintf(stderr, "Failed to initialize GEM. "
|
||||
"Falling back to classic.\n");
|
||||
_mesa_warning(NULL,
|
||||
"Failed to initialize GEM. Falling back to classic.");
|
||||
}
|
||||
|
||||
if (intelScreen->tex.size == 0) {
|
||||
|
@@ -283,12 +283,12 @@ radeonFillInModes( __DRIscreenPrivate *psp,
|
||||
* with a stencil buffer. It will be a sw fallback, but some apps won't
|
||||
* care about that.
|
||||
*/
|
||||
stencil_bits_array[0] = 0;
|
||||
stencil_bits_array[0] = stencil_bits;
|
||||
stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits;
|
||||
|
||||
msaa_samples_array[0] = 0;
|
||||
|
||||
depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1;
|
||||
depth_buffer_factor = (stencil_bits == 0) ? 2 : 1;
|
||||
back_buffer_factor = (have_back_buffer) ? 2 : 1;
|
||||
|
||||
if (pixel_bits == 16) {
|
||||
|
@@ -902,7 +902,6 @@ EXPORTS
|
||||
_mesa_generate_mipmap
|
||||
_mesa_get_compressed_teximage
|
||||
_mesa_get_current_context
|
||||
_mesa_get_program_register
|
||||
_mesa_get_teximage
|
||||
_mesa_init_driver_functions
|
||||
_mesa_init_glsl_driver_functions
|
||||
|
@@ -110,10 +110,8 @@ extern "C" {
|
||||
#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP)
|
||||
# define __WIN32__
|
||||
# define finite _finite
|
||||
#endif
|
||||
#if defined(__WATCOMC__)
|
||||
#elif defined(__WATCOMC__)
|
||||
# define finite _finite
|
||||
# pragma disable_message(201) /* Disable unreachable code warnings */
|
||||
#endif
|
||||
|
||||
|
||||
@@ -135,6 +133,10 @@ extern "C" {
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#if defined(__WATCOMC__)
|
||||
# pragma disable_message(201) /* Disable unreachable code warnings */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -138,9 +138,14 @@
|
||||
/**
|
||||
* Maximum viewport/image width. Must accomodate all texture sizes too.
|
||||
*/
|
||||
#define MAX_WIDTH 4096
|
||||
|
||||
#ifndef MAX_WIDTH
|
||||
# define MAX_WIDTH 4096
|
||||
#endif
|
||||
/** Maximum viewport/image height */
|
||||
#define MAX_HEIGHT 4096
|
||||
#ifndef MAX_HEIGHT
|
||||
# define MAX_HEIGHT 4096
|
||||
#endif
|
||||
|
||||
/** Maxmimum size for CVA. May be overridden by the drivers. */
|
||||
#define MAX_ARRAY_LOCK_SIZE 3000
|
||||
|
@@ -680,24 +680,48 @@ translate_id(GLsizei n, GLenum type, const GLvoid * list)
|
||||
|
||||
/**
|
||||
* Wrapper for _mesa_unpack_image() that handles pixel buffer objects.
|
||||
* \todo This won't suffice when the PBO is really in VRAM/GPU memory.
|
||||
* If we run out of memory, GL_OUT_OF_MEMORY will be recorded.
|
||||
*/
|
||||
static GLvoid *
|
||||
unpack_image(GLuint dimensions, GLsizei width, GLsizei height, GLsizei depth,
|
||||
unpack_image(GLcontext *ctx, GLuint dimensions,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLenum format, GLenum type, const GLvoid * pixels,
|
||||
const struct gl_pixelstore_attrib *unpack)
|
||||
{
|
||||
if (unpack->BufferObj->Name == 0) {
|
||||
/* no PBO */
|
||||
return _mesa_unpack_image(dimensions, width, height, depth, format,
|
||||
type, pixels, unpack);
|
||||
GLvoid *image = _mesa_unpack_image(dimensions, width, height, depth,
|
||||
format, type, pixels, unpack);
|
||||
if (pixels && !image) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "display list construction");
|
||||
}
|
||||
return image;
|
||||
}
|
||||
else
|
||||
if (_mesa_validate_pbo_access
|
||||
(dimensions, unpack, width, height, depth, format, type, pixels)) {
|
||||
const GLubyte *src = ADD_POINTERS(unpack->BufferObj->Data, pixels);
|
||||
return _mesa_unpack_image(dimensions, width, height, depth, format,
|
||||
type, src, unpack);
|
||||
else if (_mesa_validate_pbo_access(dimensions, unpack, width, height, depth,
|
||||
format, type, pixels)) {
|
||||
const GLubyte *map, *src;
|
||||
GLvoid *image;
|
||||
|
||||
map = (GLubyte *)
|
||||
ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
|
||||
GL_READ_ONLY_ARB, unpack->BufferObj);
|
||||
if (!map) {
|
||||
/* unable to map src buffer! */
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "unable to map PBO");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
src = ADD_POINTERS(map, pixels);
|
||||
image = _mesa_unpack_image(dimensions, width, height, depth,
|
||||
format, type, src, unpack);
|
||||
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
|
||||
unpack->BufferObj);
|
||||
|
||||
if (!image) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "display list construction");
|
||||
}
|
||||
return image;
|
||||
}
|
||||
/* bad access! */
|
||||
return NULL;
|
||||
@@ -855,7 +879,6 @@ save_Bitmap(GLsizei width, GLsizei height,
|
||||
GLfloat xmove, GLfloat ymove, const GLubyte * pixels)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
GLvoid *image = _mesa_unpack_bitmap(width, height, pixels, &ctx->Unpack);
|
||||
Node *n;
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_BITMAP, 7);
|
||||
@@ -866,10 +889,7 @@ save_Bitmap(GLsizei width, GLsizei height,
|
||||
n[4].f = yorig;
|
||||
n[5].f = xmove;
|
||||
n[6].f = ymove;
|
||||
n[7].data = image;
|
||||
}
|
||||
else if (image) {
|
||||
_mesa_free(image);
|
||||
n[7].data = _mesa_unpack_bitmap(width, height, pixels, &ctx->Unpack);
|
||||
}
|
||||
if (ctx->ExecuteFlag) {
|
||||
CALL_Bitmap(ctx->Exec, (width, height,
|
||||
@@ -996,7 +1016,7 @@ _mesa_save_CallList(GLuint list)
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_save_CallLists(GLsizei n, GLenum type, const GLvoid * lists)
|
||||
_mesa_save_CallLists(GLsizei num, GLenum type, const GLvoid * lists)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
GLint i;
|
||||
@@ -1021,7 +1041,7 @@ _mesa_save_CallLists(GLsizei n, GLenum type, const GLvoid * lists)
|
||||
typeErrorFlag = GL_TRUE;
|
||||
}
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
for (i = 0; i < num; i++) {
|
||||
GLint list = translate_id(i, type, lists);
|
||||
Node *n = ALLOC_INSTRUCTION(ctx, OPCODE_CALL_LIST_OFFSET, 2);
|
||||
if (n) {
|
||||
@@ -1036,7 +1056,7 @@ _mesa_save_CallLists(GLsizei n, GLenum type, const GLvoid * lists)
|
||||
invalidate_saved_current_state( ctx );
|
||||
|
||||
if (ctx->ExecuteFlag) {
|
||||
CALL_CallLists(ctx->Exec, (n, type, lists));
|
||||
CALL_CallLists(ctx->Exec, (num, type, lists));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1214,8 +1234,6 @@ save_ColorTable(GLenum target, GLenum internalFormat,
|
||||
format, type, table));
|
||||
}
|
||||
else {
|
||||
GLvoid *image = unpack_image(1, width, 1, 1, format, type, table,
|
||||
&ctx->Unpack);
|
||||
Node *n;
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_TABLE, 6);
|
||||
@@ -1225,10 +1243,8 @@ save_ColorTable(GLenum target, GLenum internalFormat,
|
||||
n[3].i = width;
|
||||
n[4].e = format;
|
||||
n[5].e = type;
|
||||
n[6].data = image;
|
||||
}
|
||||
else if (image) {
|
||||
_mesa_free(image);
|
||||
n[6].data = unpack_image(ctx, 1, width, 1, 1, format, type, table,
|
||||
&ctx->Unpack);
|
||||
}
|
||||
if (ctx->ExecuteFlag) {
|
||||
CALL_ColorTable(ctx->Exec, (target, internalFormat, width,
|
||||
@@ -1304,8 +1320,6 @@ save_ColorSubTable(GLenum target, GLsizei start, GLsizei count,
|
||||
GLenum format, GLenum type, const GLvoid * table)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
GLvoid *image = unpack_image(1, count, 1, 1, format, type, table,
|
||||
&ctx->Unpack);
|
||||
Node *n;
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_SUB_TABLE, 6);
|
||||
@@ -1315,10 +1329,8 @@ save_ColorSubTable(GLenum target, GLsizei start, GLsizei count,
|
||||
n[3].i = count;
|
||||
n[4].e = format;
|
||||
n[5].e = type;
|
||||
n[6].data = image;
|
||||
}
|
||||
else if (image) {
|
||||
_mesa_free(image);
|
||||
n[6].data = unpack_image(ctx, 1, count, 1, 1, format, type, table,
|
||||
&ctx->Unpack);
|
||||
}
|
||||
if (ctx->ExecuteFlag) {
|
||||
CALL_ColorSubTable(ctx->Exec,
|
||||
@@ -1376,10 +1388,10 @@ save_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width,
|
||||
GLenum format, GLenum type, const GLvoid * filter)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
GLvoid *image = unpack_image(1, width, 1, 1, format, type, filter,
|
||||
&ctx->Unpack);
|
||||
Node *n;
|
||||
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_FILTER_1D, 6);
|
||||
if (n) {
|
||||
n[1].e = target;
|
||||
@@ -1387,10 +1399,8 @@ save_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width,
|
||||
n[3].i = width;
|
||||
n[4].e = format;
|
||||
n[5].e = type;
|
||||
n[6].data = image;
|
||||
}
|
||||
else if (image) {
|
||||
_mesa_free(image);
|
||||
n[6].data = unpack_image(ctx, 1, width, 1, 1, format, type, filter,
|
||||
&ctx->Unpack);
|
||||
}
|
||||
if (ctx->ExecuteFlag) {
|
||||
CALL_ConvolutionFilter1D(ctx->Exec, (target, internalFormat, width,
|
||||
@@ -1405,10 +1415,10 @@ save_ConvolutionFilter2D(GLenum target, GLenum internalFormat,
|
||||
GLenum type, const GLvoid * filter)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
GLvoid *image = unpack_image(2, width, height, 1, format, type, filter,
|
||||
&ctx->Unpack);
|
||||
Node *n;
|
||||
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_FILTER_2D, 7);
|
||||
if (n) {
|
||||
n[1].e = target;
|
||||
@@ -1417,10 +1427,8 @@ save_ConvolutionFilter2D(GLenum target, GLenum internalFormat,
|
||||
n[4].i = height;
|
||||
n[5].e = format;
|
||||
n[6].e = type;
|
||||
n[7].data = image;
|
||||
}
|
||||
else if (image) {
|
||||
_mesa_free(image);
|
||||
n[7].data = unpack_image(ctx, 2, width, height, 1, format, type, filter,
|
||||
&ctx->Unpack);
|
||||
}
|
||||
if (ctx->ExecuteFlag) {
|
||||
CALL_ConvolutionFilter2D(ctx->Exec,
|
||||
@@ -1775,20 +1783,18 @@ save_DrawPixels(GLsizei width, GLsizei height,
|
||||
GLenum format, GLenum type, const GLvoid * pixels)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
GLvoid *image = unpack_image(2, width, height, 1, format, type,
|
||||
pixels, &ctx->Unpack);
|
||||
Node *n;
|
||||
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_DRAW_PIXELS, 5);
|
||||
if (n) {
|
||||
n[1].i = width;
|
||||
n[2].i = height;
|
||||
n[3].e = format;
|
||||
n[4].e = type;
|
||||
n[5].data = image;
|
||||
}
|
||||
else if (image) {
|
||||
_mesa_free(image);
|
||||
n[5].data = unpack_image(ctx, 2, width, height, 1, format, type,
|
||||
pixels, &ctx->Unpack);
|
||||
}
|
||||
if (ctx->ExecuteFlag) {
|
||||
CALL_DrawPixels(ctx->Exec, (width, height, format, type, pixels));
|
||||
@@ -1877,7 +1883,10 @@ save_Fogfv(GLenum pname, const GLfloat *params)
|
||||
static void GLAPIENTRY
|
||||
save_Fogf(GLenum pname, GLfloat param)
|
||||
{
|
||||
save_Fogfv(pname, ¶m);
|
||||
GLfloat parray[4];
|
||||
parray[0] = param;
|
||||
parray[1] = parray[2] = parray[3] = 0.0F;
|
||||
save_Fogfv(pname, parray);
|
||||
}
|
||||
|
||||
|
||||
@@ -1901,7 +1910,7 @@ save_Fogiv(GLenum pname, const GLint *params)
|
||||
break;
|
||||
default:
|
||||
/* Error will be caught later in gl_Fogfv */
|
||||
;
|
||||
ASSIGN_4V(p, 0.0F, 0.0F, 0.0F, 0.0F);
|
||||
}
|
||||
save_Fogfv(pname, p);
|
||||
}
|
||||
@@ -1910,7 +1919,10 @@ save_Fogiv(GLenum pname, const GLint *params)
|
||||
static void GLAPIENTRY
|
||||
save_Fogi(GLenum pname, GLint param)
|
||||
{
|
||||
save_Fogiv(pname, ¶m);
|
||||
GLint parray[4];
|
||||
parray[0] = param;
|
||||
parray[1] = parray[2] = parray[3] = 0;
|
||||
save_Fogiv(pname, parray);
|
||||
}
|
||||
|
||||
|
||||
@@ -2074,9 +2086,12 @@ save_Lightfv(GLenum light, GLenum pname, const GLfloat *params)
|
||||
|
||||
|
||||
static void GLAPIENTRY
|
||||
save_Lightf(GLenum light, GLenum pname, GLfloat params)
|
||||
save_Lightf(GLenum light, GLenum pname, GLfloat param)
|
||||
{
|
||||
save_Lightfv(light, pname, ¶ms);
|
||||
GLfloat parray[4];
|
||||
parray[0] = param;
|
||||
parray[1] = parray[2] = parray[3] = 0.0F;
|
||||
save_Lightfv(light, pname, parray);
|
||||
}
|
||||
|
||||
|
||||
@@ -2122,7 +2137,10 @@ save_Lightiv(GLenum light, GLenum pname, const GLint *params)
|
||||
static void GLAPIENTRY
|
||||
save_Lighti(GLenum light, GLenum pname, GLint param)
|
||||
{
|
||||
save_Lightiv(light, pname, ¶m);
|
||||
GLint parray[4];
|
||||
parray[0] = param;
|
||||
parray[1] = parray[2] = parray[3] = 0;
|
||||
save_Lightiv(light, pname, parray);
|
||||
}
|
||||
|
||||
|
||||
@@ -2149,7 +2167,10 @@ save_LightModelfv(GLenum pname, const GLfloat *params)
|
||||
static void GLAPIENTRY
|
||||
save_LightModelf(GLenum pname, GLfloat param)
|
||||
{
|
||||
save_LightModelfv(pname, ¶m);
|
||||
GLfloat parray[4];
|
||||
parray[0] = param;
|
||||
parray[1] = parray[2] = parray[3] = 0.0F;
|
||||
save_LightModelfv(pname, parray);
|
||||
}
|
||||
|
||||
|
||||
@@ -2171,7 +2192,7 @@ save_LightModeliv(GLenum pname, const GLint *params)
|
||||
break;
|
||||
default:
|
||||
/* Error will be caught later in gl_LightModelfv */
|
||||
;
|
||||
ASSIGN_4V(fparam, 0.0F, 0.0F, 0.0F, 0.0F);
|
||||
}
|
||||
save_LightModelfv(pname, fparam);
|
||||
}
|
||||
@@ -2180,7 +2201,10 @@ save_LightModeliv(GLenum pname, const GLint *params)
|
||||
static void GLAPIENTRY
|
||||
save_LightModeli(GLenum pname, GLint param)
|
||||
{
|
||||
save_LightModeliv(pname, ¶m);
|
||||
GLint parray[4];
|
||||
parray[0] = param;
|
||||
parray[1] = parray[2] = parray[3] = 0;
|
||||
save_LightModeliv(pname, parray);
|
||||
}
|
||||
|
||||
|
||||
@@ -2695,21 +2719,28 @@ save_PointParameterfvEXT(GLenum pname, const GLfloat *params)
|
||||
static void GLAPIENTRY
|
||||
save_PointParameterfEXT(GLenum pname, GLfloat param)
|
||||
{
|
||||
save_PointParameterfvEXT(pname, ¶m);
|
||||
GLfloat parray[3];
|
||||
parray[0] = param;
|
||||
parray[1] = parray[2] = 0.0F;
|
||||
save_PointParameterfvEXT(pname, parray);
|
||||
}
|
||||
|
||||
static void GLAPIENTRY
|
||||
save_PointParameteriNV(GLenum pname, GLint param)
|
||||
{
|
||||
GLfloat p = (GLfloat) param;
|
||||
save_PointParameterfvEXT(pname, &p);
|
||||
GLfloat parray[3];
|
||||
parray[0] = (GLfloat) param;
|
||||
parray[1] = parray[2] = 0.0F;
|
||||
save_PointParameterfvEXT(pname, parray);
|
||||
}
|
||||
|
||||
static void GLAPIENTRY
|
||||
save_PointParameterivNV(GLenum pname, const GLint * param)
|
||||
{
|
||||
GLfloat p = (GLfloat) param[0];
|
||||
save_PointParameterfvEXT(pname, &p);
|
||||
GLfloat parray[3];
|
||||
parray[0] = (GLfloat) param[0];
|
||||
parray[1] = parray[2] = 0.0F;
|
||||
save_PointParameterfvEXT(pname, parray);
|
||||
}
|
||||
|
||||
|
||||
@@ -2750,16 +2781,14 @@ static void GLAPIENTRY
|
||||
save_PolygonStipple(const GLubyte * pattern)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
GLvoid *image = unpack_image(2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
|
||||
pattern, &ctx->Unpack);
|
||||
Node *n;
|
||||
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_POLYGON_STIPPLE, 1);
|
||||
if (n) {
|
||||
n[1].data = image;
|
||||
}
|
||||
else if (image) {
|
||||
_mesa_free(image);
|
||||
n[1].data = unpack_image(ctx, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
|
||||
pattern, &ctx->Unpack);
|
||||
}
|
||||
if (ctx->ExecuteFlag) {
|
||||
CALL_PolygonStipple(ctx->Exec, ((GLubyte *) pattern));
|
||||
@@ -3383,7 +3412,10 @@ save_TexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
|
||||
static void GLAPIENTRY
|
||||
save_TexEnvf(GLenum target, GLenum pname, GLfloat param)
|
||||
{
|
||||
save_TexEnvfv(target, pname, ¶m);
|
||||
GLfloat parray[4];
|
||||
parray[0] = (GLfloat) param;
|
||||
parray[1] = parray[2] = parray[3] = 0.0F;
|
||||
save_TexEnvfv(target, pname, parray);
|
||||
}
|
||||
|
||||
|
||||
@@ -3451,8 +3483,10 @@ save_TexGeniv(GLenum coord, GLenum pname, const GLint *params)
|
||||
static void GLAPIENTRY
|
||||
save_TexGend(GLenum coord, GLenum pname, GLdouble param)
|
||||
{
|
||||
GLfloat p = (GLfloat) param;
|
||||
save_TexGenfv(coord, pname, &p);
|
||||
GLfloat parray[4];
|
||||
parray[0] = (GLfloat) param;
|
||||
parray[1] = parray[2] = parray[3] = 0.0F;
|
||||
save_TexGenfv(coord, pname, parray);
|
||||
}
|
||||
|
||||
|
||||
@@ -3471,14 +3505,20 @@ save_TexGendv(GLenum coord, GLenum pname, const GLdouble *params)
|
||||
static void GLAPIENTRY
|
||||
save_TexGenf(GLenum coord, GLenum pname, GLfloat param)
|
||||
{
|
||||
save_TexGenfv(coord, pname, ¶m);
|
||||
GLfloat parray[4];
|
||||
parray[0] = param;
|
||||
parray[1] = parray[2] = parray[3] = 0.0F;
|
||||
save_TexGenfv(coord, pname, parray);
|
||||
}
|
||||
|
||||
|
||||
static void GLAPIENTRY
|
||||
save_TexGeni(GLenum coord, GLenum pname, GLint param)
|
||||
{
|
||||
save_TexGeniv(coord, pname, ¶m);
|
||||
GLint parray[4];
|
||||
parray[0] = param;
|
||||
parray[1] = parray[2] = parray[3] = 0;
|
||||
save_TexGeniv(coord, pname, parray);
|
||||
}
|
||||
|
||||
|
||||
@@ -3506,7 +3546,10 @@ save_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
|
||||
static void GLAPIENTRY
|
||||
save_TexParameterf(GLenum target, GLenum pname, GLfloat param)
|
||||
{
|
||||
save_TexParameterfv(target, pname, ¶m);
|
||||
GLfloat parray[4];
|
||||
parray[0] = param;
|
||||
parray[1] = parray[2] = parray[3] = 0.0F;
|
||||
save_TexParameterfv(target, pname, parray);
|
||||
}
|
||||
|
||||
|
||||
@@ -3543,8 +3586,6 @@ save_TexImage1D(GLenum target,
|
||||
border, format, type, pixels));
|
||||
}
|
||||
else {
|
||||
GLvoid *image = unpack_image(1, width, 1, 1, format, type,
|
||||
pixels, &ctx->Unpack);
|
||||
Node *n;
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_IMAGE1D, 8);
|
||||
@@ -3556,10 +3597,8 @@ save_TexImage1D(GLenum target,
|
||||
n[5].i = border;
|
||||
n[6].e = format;
|
||||
n[7].e = type;
|
||||
n[8].data = image;
|
||||
}
|
||||
else if (image) {
|
||||
_mesa_free(image);
|
||||
n[8].data = unpack_image(ctx, 1, width, 1, 1, format, type,
|
||||
pixels, &ctx->Unpack);
|
||||
}
|
||||
if (ctx->ExecuteFlag) {
|
||||
CALL_TexImage1D(ctx->Exec, (target, level, components, width,
|
||||
@@ -3582,8 +3621,6 @@ save_TexImage2D(GLenum target,
|
||||
height, border, format, type, pixels));
|
||||
}
|
||||
else {
|
||||
GLvoid *image = unpack_image(2, width, height, 1, format, type,
|
||||
pixels, &ctx->Unpack);
|
||||
Node *n;
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_IMAGE2D, 9);
|
||||
@@ -3596,10 +3633,8 @@ save_TexImage2D(GLenum target,
|
||||
n[6].i = border;
|
||||
n[7].e = format;
|
||||
n[8].e = type;
|
||||
n[9].data = image;
|
||||
}
|
||||
else if (image) {
|
||||
_mesa_free(image);
|
||||
n[9].data = unpack_image(ctx, 2, width, height, 1, format, type,
|
||||
pixels, &ctx->Unpack);
|
||||
}
|
||||
if (ctx->ExecuteFlag) {
|
||||
CALL_TexImage2D(ctx->Exec, (target, level, components, width,
|
||||
@@ -3625,8 +3660,6 @@ save_TexImage3D(GLenum target,
|
||||
}
|
||||
else {
|
||||
Node *n;
|
||||
GLvoid *image = unpack_image(3, width, height, depth, format, type,
|
||||
pixels, &ctx->Unpack);
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_IMAGE3D, 10);
|
||||
if (n) {
|
||||
@@ -3639,10 +3672,8 @@ save_TexImage3D(GLenum target,
|
||||
n[7].i = border;
|
||||
n[8].e = format;
|
||||
n[9].e = type;
|
||||
n[10].data = image;
|
||||
}
|
||||
else if (image) {
|
||||
_mesa_free(image);
|
||||
n[10].data = unpack_image(ctx, 3, width, height, depth, format, type,
|
||||
pixels, &ctx->Unpack);
|
||||
}
|
||||
if (ctx->ExecuteFlag) {
|
||||
CALL_TexImage3D(ctx->Exec, (target, level, internalFormat, width,
|
||||
@@ -3660,9 +3691,9 @@ save_TexSubImage1D(GLenum target, GLint level, GLint xoffset,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
Node *n;
|
||||
GLvoid *image = unpack_image(1, width, 1, 1, format, type,
|
||||
pixels, &ctx->Unpack);
|
||||
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_SUB_IMAGE1D, 7);
|
||||
if (n) {
|
||||
n[1].e = target;
|
||||
@@ -3671,10 +3702,8 @@ save_TexSubImage1D(GLenum target, GLint level, GLint xoffset,
|
||||
n[4].i = (GLint) width;
|
||||
n[5].e = format;
|
||||
n[6].e = type;
|
||||
n[7].data = image;
|
||||
}
|
||||
else if (image) {
|
||||
_mesa_free(image);
|
||||
n[7].data = unpack_image(ctx, 1, width, 1, 1, format, type,
|
||||
pixels, &ctx->Unpack);
|
||||
}
|
||||
if (ctx->ExecuteFlag) {
|
||||
CALL_TexSubImage1D(ctx->Exec, (target, level, xoffset, width,
|
||||
@@ -3691,9 +3720,9 @@ save_TexSubImage2D(GLenum target, GLint level,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
Node *n;
|
||||
GLvoid *image = unpack_image(2, width, height, 1, format, type,
|
||||
pixels, &ctx->Unpack);
|
||||
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_SUB_IMAGE2D, 9);
|
||||
if (n) {
|
||||
n[1].e = target;
|
||||
@@ -3704,10 +3733,8 @@ save_TexSubImage2D(GLenum target, GLint level,
|
||||
n[6].i = (GLint) height;
|
||||
n[7].e = format;
|
||||
n[8].e = type;
|
||||
n[9].data = image;
|
||||
}
|
||||
else if (image) {
|
||||
_mesa_free(image);
|
||||
n[9].data = unpack_image(ctx, 2, width, height, 1, format, type,
|
||||
pixels, &ctx->Unpack);
|
||||
}
|
||||
if (ctx->ExecuteFlag) {
|
||||
CALL_TexSubImage2D(ctx->Exec, (target, level, xoffset, yoffset,
|
||||
@@ -3724,9 +3751,9 @@ save_TexSubImage3D(GLenum target, GLint level,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
Node *n;
|
||||
GLvoid *image = unpack_image(3, width, height, depth, format, type,
|
||||
pixels, &ctx->Unpack);
|
||||
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_SUB_IMAGE3D, 11);
|
||||
if (n) {
|
||||
n[1].e = target;
|
||||
@@ -3739,10 +3766,8 @@ save_TexSubImage3D(GLenum target, GLint level,
|
||||
n[8].i = (GLint) depth;
|
||||
n[9].e = format;
|
||||
n[10].e = type;
|
||||
n[11].data = image;
|
||||
}
|
||||
else if (image) {
|
||||
_mesa_free(image);
|
||||
n[11].data = unpack_image(ctx, 3, width, height, depth, format, type,
|
||||
pixels, &ctx->Unpack);
|
||||
}
|
||||
if (ctx->ExecuteFlag) {
|
||||
CALL_TexSubImage3D(ctx->Exec, (target, level,
|
||||
@@ -4455,18 +4480,17 @@ save_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
Node *n;
|
||||
GLubyte *programCopy;
|
||||
|
||||
programCopy = (GLubyte *) _mesa_malloc(len);
|
||||
if (!programCopy) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV");
|
||||
return;
|
||||
}
|
||||
_mesa_memcpy(programCopy, program, len);
|
||||
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_LOAD_PROGRAM_NV, 4);
|
||||
if (n) {
|
||||
GLubyte *programCopy = (GLubyte *) _mesa_malloc(len);
|
||||
if (!programCopy) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV");
|
||||
return;
|
||||
}
|
||||
_mesa_memcpy(programCopy, program, len);
|
||||
n[1].e = target;
|
||||
n[2].ui = id;
|
||||
n[3].i = len;
|
||||
@@ -4483,15 +4507,17 @@ save_RequestResidentProgramsNV(GLsizei num, const GLuint * ids)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
Node *n;
|
||||
GLuint *idCopy = (GLuint *) _mesa_malloc(num * sizeof(GLuint));
|
||||
if (!idCopy) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glRequestResidentProgramsNV");
|
||||
return;
|
||||
}
|
||||
_mesa_memcpy(idCopy, ids, num * sizeof(GLuint));
|
||||
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_TRACK_MATRIX_NV, 2);
|
||||
if (n) {
|
||||
GLuint *idCopy = (GLuint *) _mesa_malloc(num * sizeof(GLuint));
|
||||
if (!idCopy) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glRequestResidentProgramsNV");
|
||||
return;
|
||||
}
|
||||
_mesa_memcpy(idCopy, ids, num * sizeof(GLuint));
|
||||
n[1].i = num;
|
||||
n[2].data = idCopy;
|
||||
}
|
||||
@@ -4652,16 +4678,17 @@ save_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
Node *n;
|
||||
GLubyte *nameCopy = (GLubyte *) _mesa_malloc(len);
|
||||
if (!nameCopy) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramNamedParameter4fNV");
|
||||
return;
|
||||
}
|
||||
_mesa_memcpy(nameCopy, name, len);
|
||||
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_NAMED_PARAMETER_NV, 6);
|
||||
if (n) {
|
||||
GLubyte *nameCopy = (GLubyte *) _mesa_malloc(len);
|
||||
if (!nameCopy) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramNamedParameter4fNV");
|
||||
return;
|
||||
}
|
||||
_mesa_memcpy(nameCopy, name, len);
|
||||
n[1].ui = id;
|
||||
n[2].i = len;
|
||||
n[3].data = nameCopy;
|
||||
@@ -4750,18 +4777,17 @@ save_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
Node *n;
|
||||
GLubyte *programCopy;
|
||||
|
||||
programCopy = (GLubyte *) _mesa_malloc(len);
|
||||
if (!programCopy) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramStringARB");
|
||||
return;
|
||||
}
|
||||
_mesa_memcpy(programCopy, string, len);
|
||||
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_STRING_ARB, 4);
|
||||
if (n) {
|
||||
GLubyte *programCopy = (GLubyte *) _mesa_malloc(len);
|
||||
if (!programCopy) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramStringARB");
|
||||
return;
|
||||
}
|
||||
_mesa_memcpy(programCopy, string, len);
|
||||
n[1].e = target;
|
||||
n[2].e = format;
|
||||
n[3].i = len;
|
||||
|
@@ -404,6 +404,7 @@ _mesa_enable_2_0_extensions(GLcontext *ctx)
|
||||
ctx->Extensions.ARB_fragment_shader = GL_TRUE;
|
||||
#endif
|
||||
ctx->Extensions.ARB_point_sprite = GL_TRUE;
|
||||
ctx->Extensions.EXT_blend_equation_separate = GL_TRUE;
|
||||
ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE;
|
||||
#if FEATURE_ARB_shader_objects
|
||||
ctx->Extensions.ARB_shader_objects = GL_TRUE;
|
||||
|
@@ -417,21 +417,22 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
|
||||
if (format == GL_COLOR) {
|
||||
if (att->Renderbuffer->_BaseFormat != GL_RGB &&
|
||||
att->Renderbuffer->_BaseFormat != GL_RGBA) {
|
||||
ASSERT(att->Renderbuffer->RedBits);
|
||||
ASSERT(att->Renderbuffer->GreenBits);
|
||||
ASSERT(att->Renderbuffer->BlueBits);
|
||||
att_incomplete("bad renderbuffer color format");
|
||||
att->Complete = GL_FALSE;
|
||||
return;
|
||||
}
|
||||
ASSERT(att->Renderbuffer->RedBits);
|
||||
ASSERT(att->Renderbuffer->GreenBits);
|
||||
ASSERT(att->Renderbuffer->BlueBits);
|
||||
}
|
||||
else if (format == GL_DEPTH) {
|
||||
ASSERT(att->Renderbuffer->DepthBits);
|
||||
if (att->Renderbuffer->_BaseFormat == GL_DEPTH_COMPONENT) {
|
||||
ASSERT(att->Renderbuffer->DepthBits);
|
||||
/* OK */
|
||||
}
|
||||
else if (ctx->Extensions.EXT_packed_depth_stencil &&
|
||||
att->Renderbuffer->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
|
||||
ASSERT(att->Renderbuffer->DepthBits);
|
||||
/* OK */
|
||||
}
|
||||
else {
|
||||
@@ -442,12 +443,13 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
|
||||
}
|
||||
else {
|
||||
assert(format == GL_STENCIL);
|
||||
ASSERT(att->Renderbuffer->StencilBits);
|
||||
if (att->Renderbuffer->_BaseFormat == GL_STENCIL_INDEX) {
|
||||
ASSERT(att->Renderbuffer->StencilBits);
|
||||
/* OK */
|
||||
}
|
||||
else if (ctx->Extensions.EXT_packed_depth_stencil &&
|
||||
att->Renderbuffer->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
|
||||
ASSERT(att->Renderbuffer->StencilBits);
|
||||
/* OK */
|
||||
}
|
||||
else {
|
||||
@@ -2038,7 +2040,9 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
|
||||
if (mask & GL_STENCIL_BUFFER_BIT) {
|
||||
struct gl_renderbuffer *readRb = readFb->_StencilBuffer;
|
||||
struct gl_renderbuffer *drawRb = drawFb->_StencilBuffer;
|
||||
if (readRb->StencilBits != drawRb->StencilBits) {
|
||||
if (!readRb ||
|
||||
!drawRb ||
|
||||
readRb->StencilBits != drawRb->StencilBits) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glBlitFramebufferEXT(stencil buffer size mismatch");
|
||||
return;
|
||||
@@ -2048,7 +2052,9 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
|
||||
if (mask & GL_DEPTH_BUFFER_BIT) {
|
||||
struct gl_renderbuffer *readRb = readFb->_DepthBuffer;
|
||||
struct gl_renderbuffer *drawRb = drawFb->_DepthBuffer;
|
||||
if (readRb->DepthBits != drawRb->DepthBits) {
|
||||
if (!readRb ||
|
||||
!drawRb ||
|
||||
readRb->DepthBits != drawRb->DepthBits) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glBlitFramebufferEXT(depth buffer size mismatch");
|
||||
return;
|
||||
|
@@ -1306,7 +1306,9 @@ static void build_fog( struct tnl_program *p )
|
||||
input = swizzle1(register_input(p, VERT_ATTRIB_FOG), X);
|
||||
}
|
||||
|
||||
/* result.fog = {abs(f),0,0,1}; */
|
||||
emit_op1(p, OPCODE_ABS, fog, WRITEMASK_X, input);
|
||||
emit_op1(p, OPCODE_MOV, fog, WRITEMASK_YZW, get_identity_param(p));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -67,7 +67,7 @@ _mesa_Fogiv(GLenum pname, const GLint *params )
|
||||
break;
|
||||
default:
|
||||
/* Error will be caught later in _mesa_Fogfv */
|
||||
;
|
||||
ASSIGN_4V(p, 0.0F, 0.0F, 0.0F, 0.0F);
|
||||
}
|
||||
_mesa_Fogfv(pname, p);
|
||||
}
|
||||
|
@@ -5333,3 +5333,181 @@ _mesa_clip_to_region(GLint xmin, GLint ymin,
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Clip dst coords against Xmax (or Ymax).
|
||||
*/
|
||||
static INLINE void
|
||||
clip_right_or_top(GLint *srcX0, GLint *srcX1,
|
||||
GLint *dstX0, GLint *dstX1,
|
||||
GLint maxValue)
|
||||
{
|
||||
GLfloat t, bias;
|
||||
|
||||
if (*dstX1 > maxValue) {
|
||||
/* X1 outside right edge */
|
||||
ASSERT(*dstX0 < maxValue); /* X0 should be inside right edge */
|
||||
t = (GLfloat) (maxValue - *dstX0) / (GLfloat) (*dstX1 - *dstX0);
|
||||
/* chop off [t, 1] part */
|
||||
ASSERT(t >= 0.0 && t <= 1.0);
|
||||
*dstX1 = maxValue;
|
||||
bias = (*srcX0 < *srcX1) ? 0.5 : -0.5;
|
||||
*srcX1 = *srcX0 + (GLint) (t * (*srcX1 - *srcX0) + bias);
|
||||
}
|
||||
else if (*dstX0 > maxValue) {
|
||||
/* X0 outside right edge */
|
||||
ASSERT(*dstX1 < maxValue); /* X1 should be inside right edge */
|
||||
t = (GLfloat) (maxValue - *dstX1) / (GLfloat) (*dstX0 - *dstX1);
|
||||
/* chop off [t, 1] part */
|
||||
ASSERT(t >= 0.0 && t <= 1.0);
|
||||
*dstX0 = maxValue;
|
||||
bias = (*srcX0 < *srcX1) ? -0.5 : 0.5;
|
||||
*srcX0 = *srcX1 + (GLint) (t * (*srcX0 - *srcX1) + bias);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Clip dst coords against Xmin (or Ymin).
|
||||
*/
|
||||
static INLINE void
|
||||
clip_left_or_bottom(GLint *srcX0, GLint *srcX1,
|
||||
GLint *dstX0, GLint *dstX1,
|
||||
GLint minValue)
|
||||
{
|
||||
GLfloat t, bias;
|
||||
|
||||
if (*dstX0 < minValue) {
|
||||
/* X0 outside left edge */
|
||||
ASSERT(*dstX1 > minValue); /* X1 should be inside left edge */
|
||||
t = (GLfloat) (minValue - *dstX0) / (GLfloat) (*dstX1 - *dstX0);
|
||||
/* chop off [0, t] part */
|
||||
ASSERT(t >= 0.0 && t <= 1.0);
|
||||
*dstX0 = minValue;
|
||||
bias = (*srcX0 < *srcX1) ? 0.5 : -0.5; /* flipped??? */
|
||||
*srcX0 = *srcX0 + (GLint) (t * (*srcX1 - *srcX0) + bias);
|
||||
}
|
||||
else if (*dstX1 < minValue) {
|
||||
/* X1 outside left edge */
|
||||
ASSERT(*dstX0 > minValue); /* X0 should be inside left edge */
|
||||
t = (GLfloat) (minValue - *dstX1) / (GLfloat) (*dstX0 - *dstX1);
|
||||
/* chop off [0, t] part */
|
||||
ASSERT(t >= 0.0 && t <= 1.0);
|
||||
*dstX1 = minValue;
|
||||
bias = (*srcX0 < *srcX1) ? 0.5 : -0.5;
|
||||
*srcX1 = *srcX1 + (GLint) (t * (*srcX0 - *srcX1) + bias);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Do clipping of blit src/dest rectangles.
|
||||
* The dest rect is clipped against both the buffer bounds and scissor bounds.
|
||||
* The src rect is just clipped against the buffer bounds.
|
||||
*
|
||||
* When either the src or dest rect is clipped, the other is also clipped
|
||||
* proportionately!
|
||||
*
|
||||
* Note that X0 need not be less than X1 (same for Y) for either the source
|
||||
* and dest rects. That makes the clipping a little trickier.
|
||||
*
|
||||
* \return GL_TRUE if anything is left to draw, GL_FALSE if totally clipped
|
||||
*/
|
||||
GLboolean
|
||||
_mesa_clip_blit(GLcontext *ctx,
|
||||
GLint *srcX0, GLint *srcY0, GLint *srcX1, GLint *srcY1,
|
||||
GLint *dstX0, GLint *dstY0, GLint *dstX1, GLint *dstY1)
|
||||
{
|
||||
const GLint srcXmin = 0;
|
||||
const GLint srcXmax = ctx->ReadBuffer->Width;
|
||||
const GLint srcYmin = 0;
|
||||
const GLint srcYmax = ctx->ReadBuffer->Height;
|
||||
|
||||
/* these include scissor bounds */
|
||||
const GLint dstXmin = ctx->DrawBuffer->_Xmin;
|
||||
const GLint dstXmax = ctx->DrawBuffer->_Xmax;
|
||||
const GLint dstYmin = ctx->DrawBuffer->_Ymin;
|
||||
const GLint dstYmax = ctx->DrawBuffer->_Ymax;
|
||||
|
||||
/*
|
||||
printf("PreClipX: src: %d .. %d dst: %d .. %d\n",
|
||||
*srcX0, *srcX1, *dstX0, *dstX1);
|
||||
printf("PreClipY: src: %d .. %d dst: %d .. %d\n",
|
||||
*srcY0, *srcY1, *dstY0, *dstY1);
|
||||
*/
|
||||
|
||||
/* trivial rejection tests */
|
||||
if (*dstX0 == *dstX1)
|
||||
return GL_FALSE; /* no width */
|
||||
if (*dstX0 <= dstXmin && *dstX1 <= dstXmin)
|
||||
return GL_FALSE; /* totally out (left) of bounds */
|
||||
if (*dstX0 >= dstXmax && *dstX1 >= dstXmax)
|
||||
return GL_FALSE; /* totally out (right) of bounds */
|
||||
|
||||
if (*dstY0 == *dstY1)
|
||||
return GL_FALSE;
|
||||
if (*dstY0 <= dstYmin && *dstY1 <= dstYmin)
|
||||
return GL_FALSE;
|
||||
if (*dstY0 >= dstYmax && *dstY1 >= dstYmax)
|
||||
return GL_FALSE;
|
||||
|
||||
if (*srcX0 == *srcX1)
|
||||
return GL_FALSE;
|
||||
if (*srcX0 <= srcXmin && *srcX1 <= srcXmin)
|
||||
return GL_FALSE;
|
||||
if (*srcX0 >= srcXmax && *srcX1 >= srcXmax)
|
||||
return GL_FALSE;
|
||||
|
||||
if (*srcY0 == *srcY1)
|
||||
return GL_FALSE;
|
||||
if (*srcY0 <= srcYmin && *srcY1 <= srcYmin)
|
||||
return GL_FALSE;
|
||||
if (*srcY0 >= srcYmax && *srcY1 >= srcYmax)
|
||||
return GL_FALSE;
|
||||
|
||||
/*
|
||||
* dest clip
|
||||
*/
|
||||
clip_right_or_top(srcX0, srcX1, dstX0, dstX1, dstXmax);
|
||||
clip_right_or_top(srcY0, srcY1, dstY0, dstY1, dstYmax);
|
||||
clip_left_or_bottom(srcX0, srcX1, dstX0, dstX1, dstXmin);
|
||||
clip_left_or_bottom(srcY0, srcY1, dstY0, dstY1, dstYmin);
|
||||
|
||||
/*
|
||||
* src clip (just swap src/dst values from above)
|
||||
*/
|
||||
clip_right_or_top(dstX0, dstX1, srcX0, srcX1, srcXmax);
|
||||
clip_right_or_top(dstY0, dstY1, srcY0, srcY1, srcYmax);
|
||||
clip_left_or_bottom(dstX0, dstX1, srcX0, srcX1, srcXmin);
|
||||
clip_left_or_bottom(dstY0, dstY1, srcY0, srcY1, srcYmin);
|
||||
|
||||
/*
|
||||
printf("PostClipX: src: %d .. %d dst: %d .. %d\n",
|
||||
*srcX0, *srcX1, *dstX0, *dstX1);
|
||||
printf("PostClipY: src: %d .. %d dst: %d .. %d\n",
|
||||
*srcY0, *srcY1, *dstY0, *dstY1);
|
||||
*/
|
||||
|
||||
ASSERT(*dstX0 >= dstXmin);
|
||||
ASSERT(*dstX0 <= dstXmax);
|
||||
ASSERT(*dstX1 >= dstXmin);
|
||||
ASSERT(*dstX1 <= dstXmax);
|
||||
|
||||
ASSERT(*dstY0 >= dstYmin);
|
||||
ASSERT(*dstY0 <= dstYmax);
|
||||
ASSERT(*dstY1 >= dstYmin);
|
||||
ASSERT(*dstY1 <= dstYmax);
|
||||
|
||||
ASSERT(*srcX0 >= srcXmin);
|
||||
ASSERT(*srcX0 <= srcXmax);
|
||||
ASSERT(*srcX1 >= srcXmin);
|
||||
ASSERT(*srcX1 <= srcXmax);
|
||||
|
||||
ASSERT(*srcY0 >= srcYmin);
|
||||
ASSERT(*srcY0 <= srcYmax);
|
||||
ASSERT(*srcY1 >= srcYmin);
|
||||
ASSERT(*srcY1 <= srcYmax);
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
@@ -291,4 +291,10 @@ _mesa_clip_to_region(GLint xmin, GLint ymin,
|
||||
GLint *x, GLint *y,
|
||||
GLsizei *width, GLsizei *height );
|
||||
|
||||
extern GLboolean
|
||||
_mesa_clip_blit(GLcontext *ctx,
|
||||
GLint *srcX0, GLint *srcY0, GLint *srcX1, GLint *srcY1,
|
||||
GLint *dstX0, GLint *dstY0, GLint *dstX1, GLint *dstY1);
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -496,7 +496,7 @@ _mesa_LightModeliv( GLenum pname, const GLint *params )
|
||||
break;
|
||||
default:
|
||||
/* Error will be caught later in gl_LightModelfv */
|
||||
;
|
||||
ASSIGN_4V(fparam, 0.0F, 0.0F, 0.0F, 0.0F);
|
||||
}
|
||||
_mesa_LightModelfv( pname, fparam );
|
||||
}
|
||||
@@ -1224,15 +1224,15 @@ _mesa_update_tnl_spaces( GLcontext *ctx, GLuint new_state )
|
||||
ctx->Driver.LightingSpaceChange( ctx );
|
||||
}
|
||||
else {
|
||||
GLuint new_state = ctx->NewState;
|
||||
GLuint new_state2 = ctx->NewState;
|
||||
|
||||
/* Recalculate that same state only if it has been invalidated
|
||||
* by other statechanges.
|
||||
*/
|
||||
if (new_state & _NEW_MODELVIEW)
|
||||
if (new_state2 & _NEW_MODELVIEW)
|
||||
update_modelview_scale(ctx);
|
||||
|
||||
if (new_state & (_NEW_LIGHT|_NEW_MODELVIEW))
|
||||
if (new_state2 & (_NEW_LIGHT|_NEW_MODELVIEW))
|
||||
compute_light_positions( ctx );
|
||||
}
|
||||
}
|
||||
|
@@ -502,7 +502,8 @@ _mesa_update_state_locked( GLcontext *ctx )
|
||||
/* Determine which state flags effect vertex/fragment program state */
|
||||
if (ctx->FragmentProgram._MaintainTexEnvProgram) {
|
||||
prog_flags |= (_NEW_TEXTURE | _NEW_FOG | _DD_NEW_SEPARATE_SPECULAR |
|
||||
_NEW_ARRAY | _NEW_LIGHT | _NEW_POINT | _NEW_RENDERMODE);
|
||||
_NEW_ARRAY | _NEW_LIGHT | _NEW_POINT | _NEW_RENDERMODE |
|
||||
_NEW_PROGRAM);
|
||||
}
|
||||
if (ctx->VertexProgram._MaintainTnlProgram) {
|
||||
prog_flags |= (_NEW_ARRAY | _NEW_TEXTURE | _NEW_TEXTURE_MATRIX |
|
||||
|
@@ -263,6 +263,7 @@ static GLbitfield get_fp_input_mask( GLcontext *ctx )
|
||||
{
|
||||
/* _NEW_PROGRAM */
|
||||
const GLboolean vertexShader = (ctx->Shader.CurrentProgram &&
|
||||
ctx->Shader.CurrentProgram->LinkStatus &&
|
||||
ctx->Shader.CurrentProgram->VertexProgram);
|
||||
const GLboolean vertexProgram = ctx->VertexProgram._Enabled;
|
||||
GLbitfield fp_inputs = 0x0;
|
||||
@@ -328,7 +329,7 @@ static GLbitfield get_fp_input_mask( GLcontext *ctx )
|
||||
if (vertexShader)
|
||||
vprog = ctx->Shader.CurrentProgram->VertexProgram;
|
||||
else
|
||||
vprog = ctx->VertexProgram._Current;
|
||||
vprog = ctx->VertexProgram.Current;
|
||||
|
||||
vp_outputs = vprog->Base.OutputsWritten;
|
||||
|
||||
@@ -935,7 +936,7 @@ static struct ureg emit_combine_source( struct texenv_fragment_program *p,
|
||||
}
|
||||
}
|
||||
|
||||
static GLboolean args_match( struct state_key *key, GLuint unit )
|
||||
static GLboolean args_match( const struct state_key *key, GLuint unit )
|
||||
{
|
||||
GLuint i, nr = key->unit[unit].NumArgsRGB;
|
||||
|
||||
@@ -1095,11 +1096,10 @@ static struct ureg emit_combine( struct texenv_fragment_program *p,
|
||||
static struct ureg
|
||||
emit_texenv(struct texenv_fragment_program *p, GLuint unit)
|
||||
{
|
||||
struct state_key *key = p->state;
|
||||
GLboolean saturate = (unit < p->last_tex_stage);
|
||||
const struct state_key *key = p->state;
|
||||
GLboolean saturate;
|
||||
GLuint rgb_shift, alpha_shift;
|
||||
struct ureg out, shift;
|
||||
struct ureg dest;
|
||||
struct ureg out, dest;
|
||||
|
||||
if (!key->unit[unit].enabled) {
|
||||
return get_source(p, SRC_PREVIOUS, 0);
|
||||
@@ -1124,6 +1124,11 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
|
||||
break;
|
||||
}
|
||||
|
||||
/* If we'll do rgb/alpha shifting don't saturate in emit_combine().
|
||||
* We don't want to clamp twice.
|
||||
*/
|
||||
saturate = !(rgb_shift || alpha_shift);
|
||||
|
||||
/* If this is the very last calculation, emit direct to output reg:
|
||||
*/
|
||||
if (key->separate_specular ||
|
||||
@@ -1146,7 +1151,6 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
|
||||
}
|
||||
else if (key->unit[unit].ModeRGB == MODE_DOT3_RGBA_EXT ||
|
||||
key->unit[unit].ModeRGB == MODE_DOT3_RGBA) {
|
||||
|
||||
out = emit_combine( p, dest, WRITEMASK_XYZW, saturate,
|
||||
unit,
|
||||
key->unit[unit].NumArgsRGB,
|
||||
@@ -1172,6 +1176,10 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
|
||||
/* Deal with the final shift:
|
||||
*/
|
||||
if (alpha_shift || rgb_shift) {
|
||||
struct ureg shift;
|
||||
|
||||
saturate = GL_TRUE; /* always saturate at this point */
|
||||
|
||||
if (rgb_shift == alpha_shift) {
|
||||
shift = register_scalar_const(p, (GLfloat)(1<<rgb_shift));
|
||||
}
|
||||
@@ -1271,7 +1279,7 @@ static GLboolean load_texenv_source( struct texenv_fragment_program *p,
|
||||
static GLboolean
|
||||
load_texunit_sources( struct texenv_fragment_program *p, int unit )
|
||||
{
|
||||
struct state_key *key = p->state;
|
||||
const struct state_key *key = p->state;
|
||||
GLuint i;
|
||||
|
||||
for (i = 0; i < key->unit[unit].NumArgsRGB; i++) {
|
||||
@@ -1291,7 +1299,7 @@ load_texunit_sources( struct texenv_fragment_program *p, int unit )
|
||||
static GLboolean
|
||||
load_texunit_bumpmap( struct texenv_fragment_program *p, int unit )
|
||||
{
|
||||
struct state_key *key = p->state;
|
||||
const struct state_key *key = p->state;
|
||||
GLuint bumpedUnitNr = key->unit[unit].OptRGB[1].Source - SRC_TEXTURE0;
|
||||
struct ureg texcDst, bumpMapRes;
|
||||
struct ureg constdudvcolor = register_const4f(p, 0.0, 0.0, 0.0, 1.0);
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 7.5
|
||||
* Version: 7.5.1
|
||||
*
|
||||
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2009 Brian Paul 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"),
|
||||
@@ -30,8 +30,8 @@
|
||||
/* Mesa version */
|
||||
#define MESA_MAJOR 7
|
||||
#define MESA_MINOR 5
|
||||
#define MESA_PATCH 0
|
||||
#define MESA_VERSION_STRING "7.5"
|
||||
#define MESA_PATCH 1
|
||||
#define MESA_VERSION_STRING "7.5.1"
|
||||
|
||||
/* To make version comparison easy */
|
||||
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
|
@@ -2007,6 +2007,7 @@ parse_param (GLcontext * ctx, const GLubyte ** inst, struct var_cache **vc_head,
|
||||
if (specified_length != (int)param_var->param_binding_length) {
|
||||
program_error(ctx, Program->Position,
|
||||
"Declared parameter array length does not match parameter list");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -985,6 +985,9 @@ _mesa_GetProgramivARB(GLenum target, GLenum pname, GLint *params)
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramivARB(pname)");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramivARB(pname)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -529,7 +529,7 @@ void
|
||||
_mesa_print_alu_instruction(const struct prog_instruction *inst,
|
||||
const char *opcode_string, GLuint numRegs)
|
||||
{
|
||||
fprint_alu_instruction(stdout, inst, opcode_string,
|
||||
fprint_alu_instruction(stderr, inst, opcode_string,
|
||||
numRegs, PROG_PRINT_DEBUG, NULL);
|
||||
}
|
||||
|
||||
@@ -750,7 +750,7 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst,
|
||||
gl_prog_print_mode mode,
|
||||
const struct gl_program *prog)
|
||||
{
|
||||
return _mesa_fprint_instruction_opt(stdout, inst, indent, mode, prog);
|
||||
return _mesa_fprint_instruction_opt(stderr, inst, indent, mode, prog);
|
||||
}
|
||||
|
||||
|
||||
@@ -758,7 +758,7 @@ void
|
||||
_mesa_print_instruction(const struct prog_instruction *inst)
|
||||
{
|
||||
/* note: 4th param should be ignored for PROG_PRINT_DEBUG */
|
||||
_mesa_fprint_instruction_opt(stdout, inst, 0, PROG_PRINT_DEBUG, NULL);
|
||||
_mesa_fprint_instruction_opt(stderr, inst, 0, PROG_PRINT_DEBUG, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -804,12 +804,12 @@ _mesa_fprint_program_opt(FILE *f,
|
||||
|
||||
|
||||
/**
|
||||
* Print program to stdout, default options.
|
||||
* Print program to stderr, default options.
|
||||
*/
|
||||
void
|
||||
_mesa_print_program(const struct gl_program *prog)
|
||||
{
|
||||
_mesa_fprint_program_opt(stdout, prog, PROG_PRINT_DEBUG, GL_TRUE);
|
||||
_mesa_fprint_program_opt(stderr, prog, PROG_PRINT_DEBUG, GL_TRUE);
|
||||
}
|
||||
|
||||
|
||||
@@ -850,12 +850,12 @@ _mesa_fprint_program_parameters(FILE *f,
|
||||
|
||||
|
||||
/**
|
||||
* Print all of a program's parameters/fields to stdout.
|
||||
* Print all of a program's parameters/fields to stderr.
|
||||
*/
|
||||
void
|
||||
_mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog)
|
||||
{
|
||||
_mesa_fprint_program_parameters(stdout, ctx, prog);
|
||||
_mesa_fprint_program_parameters(stderr, ctx, prog);
|
||||
}
|
||||
|
||||
|
||||
@@ -895,12 +895,12 @@ _mesa_fprint_parameter_list(FILE *f,
|
||||
|
||||
|
||||
/**
|
||||
* Print a program parameter list to stdout.
|
||||
* Print a program parameter list to stderr.
|
||||
*/
|
||||
void
|
||||
_mesa_print_parameter_list(const struct gl_program_parameter_list *list)
|
||||
{
|
||||
_mesa_fprint_parameter_list(stdout, list);
|
||||
_mesa_fprint_parameter_list(stderr, list);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -885,7 +885,7 @@ _mesa_get_active_attrib(GLcontext *ctx, GLuint program, GLuint index,
|
||||
static struct gl_program_parameter *
|
||||
get_uniform_parameter(const struct gl_shader_program *shProg, GLuint index)
|
||||
{
|
||||
const struct gl_program *prog;
|
||||
const struct gl_program *prog = NULL;
|
||||
GLint progPos;
|
||||
|
||||
progPos = shProg->Uniforms->Uniforms[index].VertPos;
|
||||
@@ -915,7 +915,7 @@ _mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index,
|
||||
GLenum *type, GLchar *nameOut)
|
||||
{
|
||||
const struct gl_shader_program *shProg;
|
||||
const struct gl_program *prog;
|
||||
const struct gl_program *prog = NULL;
|
||||
const struct gl_program_parameter *param;
|
||||
GLint progPos;
|
||||
|
||||
@@ -1624,7 +1624,7 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program,
|
||||
|
||||
if (param->Type == PROGRAM_SAMPLER) {
|
||||
/* This controls which texture unit which is used by a sampler */
|
||||
GLuint texUnit, sampler;
|
||||
GLboolean changed = GL_FALSE;
|
||||
GLint i;
|
||||
|
||||
/* data type for setting samplers must be int */
|
||||
@@ -1639,8 +1639,9 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program,
|
||||
* common thing...
|
||||
*/
|
||||
for (i = 0; i < count; i++) {
|
||||
sampler = (GLuint) program->Parameters->ParameterValues[index + i][0];
|
||||
texUnit = ((GLuint *) values)[i];
|
||||
GLuint sampler =
|
||||
(GLuint) program->Parameters->ParameterValues[index + offset + i][0];
|
||||
GLuint texUnit = ((GLuint *) values)[i];
|
||||
|
||||
/* check that the sampler (tex unit index) is legal */
|
||||
if (texUnit >= ctx->Const.MaxTextureImageUnits) {
|
||||
@@ -1651,13 +1652,27 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program,
|
||||
|
||||
/* This maps a sampler to a texture unit: */
|
||||
if (sampler < MAX_SAMPLERS) {
|
||||
program->SamplerUnits[sampler] = texUnit;
|
||||
#if 0
|
||||
_mesa_printf("Set program %p sampler %d '%s' to unit %u\n",
|
||||
program, sampler, param->Name, texUnit);
|
||||
#endif
|
||||
if (program->SamplerUnits[sampler] != texUnit) {
|
||||
program->SamplerUnits[sampler] = texUnit;
|
||||
changed = GL_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_mesa_update_shader_textures_used(program);
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
if (changed) {
|
||||
/* When a sampler's value changes it usually requires rewriting
|
||||
* a GPU program's TEX instructions since there may not be a
|
||||
* sampler->texture lookup table. We signal this with the
|
||||
* ProgramStringNotify() callback.
|
||||
*/
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE | _NEW_PROGRAM);
|
||||
_mesa_update_shader_textures_used(program);
|
||||
ctx->Driver.ProgramStringNotify(ctx, program->Target, program);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* ordinary uniform variable */
|
||||
|
@@ -436,7 +436,7 @@ emit_statevars(const char *name, int array_len,
|
||||
struct gl_program_parameter_list *paramList)
|
||||
{
|
||||
if (type->type == SLANG_SPEC_ARRAY) {
|
||||
GLint i, pos;
|
||||
GLint i, pos = -1;
|
||||
assert(array_len > 0);
|
||||
if (strcmp(name, "gl_ClipPlane") == 0) {
|
||||
tokens[0] = STATE_CLIPPLANE;
|
||||
|
@@ -94,6 +94,9 @@ struct bitmap_cache
|
||||
|
||||
GLfloat color[4];
|
||||
|
||||
/** Bitmap's Z position */
|
||||
GLfloat zpos;
|
||||
|
||||
struct pipe_texture *texture;
|
||||
struct pipe_transfer *trans;
|
||||
|
||||
@@ -104,6 +107,8 @@ struct bitmap_cache
|
||||
};
|
||||
|
||||
|
||||
/** Epsilon for Z comparisons */
|
||||
#define Z_EPSILON 1e-06
|
||||
|
||||
|
||||
/**
|
||||
@@ -538,9 +543,7 @@ draw_bitmap_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
|
||||
}
|
||||
|
||||
/* draw textured quad */
|
||||
offset = setup_bitmap_vertex_data(st, x, y, width, height,
|
||||
ctx->Current.RasterPos[2],
|
||||
color);
|
||||
offset = setup_bitmap_vertex_data(st, x, y, width, height, z, color);
|
||||
|
||||
util_draw_vertex_buffer(pipe, st->bitmap.vbuf, offset,
|
||||
PIPE_PRIM_TRIANGLE_FAN,
|
||||
@@ -647,7 +650,7 @@ st_flush_bitmap_cache(struct st_context *st)
|
||||
draw_bitmap_quad(st->ctx,
|
||||
cache->xpos,
|
||||
cache->ypos,
|
||||
st->ctx->Current.RasterPos[2],
|
||||
cache->zpos,
|
||||
BITMAP_CACHE_WIDTH, BITMAP_CACHE_HEIGHT,
|
||||
cache->texture,
|
||||
cache->color);
|
||||
@@ -687,6 +690,7 @@ accum_bitmap(struct st_context *st,
|
||||
{
|
||||
struct bitmap_cache *cache = st->bitmap.cache;
|
||||
int px = -999, py;
|
||||
const GLfloat z = st->ctx->Current.RasterPos[2];
|
||||
|
||||
if (width > BITMAP_CACHE_WIDTH ||
|
||||
height > BITMAP_CACHE_HEIGHT)
|
||||
@@ -697,7 +701,8 @@ accum_bitmap(struct st_context *st,
|
||||
py = y - cache->ypos;
|
||||
if (px < 0 || px + width > BITMAP_CACHE_WIDTH ||
|
||||
py < 0 || py + height > BITMAP_CACHE_HEIGHT ||
|
||||
!TEST_EQ_4V(st->ctx->Current.RasterColor, cache->color)) {
|
||||
!TEST_EQ_4V(st->ctx->Current.RasterColor, cache->color) ||
|
||||
((fabs(z - cache->zpos) > Z_EPSILON))) {
|
||||
/* This bitmap would extend beyond cache bounds, or the bitmap
|
||||
* color is changing
|
||||
* so flush and continue.
|
||||
@@ -712,6 +717,7 @@ accum_bitmap(struct st_context *st,
|
||||
py = (BITMAP_CACHE_HEIGHT - height) / 2;
|
||||
cache->xpos = x;
|
||||
cache->ypos = y - py;
|
||||
cache->zpos = z;
|
||||
cache->empty = GL_FALSE;
|
||||
COPY_4FV(cache->color, st->ctx->Current.RasterColor);
|
||||
}
|
||||
|
@@ -69,34 +69,107 @@ st_BlitFramebuffer(GLcontext *ctx,
|
||||
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
|
||||
GLbitfield mask, GLenum filter)
|
||||
{
|
||||
const GLbitfield depthStencil = (GL_DEPTH_BUFFER_BIT |
|
||||
GL_STENCIL_BUFFER_BIT);
|
||||
struct st_context *st = ctx->st;
|
||||
|
||||
const uint pFilter = ((filter == GL_NEAREST)
|
||||
? PIPE_TEX_MIPFILTER_NEAREST
|
||||
: PIPE_TEX_MIPFILTER_LINEAR);
|
||||
struct gl_framebuffer *readFB = ctx->ReadBuffer;
|
||||
struct gl_framebuffer *drawFB = ctx->DrawBuffer;
|
||||
|
||||
if (!_mesa_clip_blit(ctx, &srcX0, &srcY0, &srcX1, &srcY1,
|
||||
&dstX0, &dstY0, &dstX1, &dstY1)) {
|
||||
return; /* nothing to draw/blit */
|
||||
}
|
||||
|
||||
if (st_fb_orientation(drawFB) == Y_0_TOP) {
|
||||
/* invert Y for dest */
|
||||
dstY0 = drawFB->Height - dstY0;
|
||||
dstY1 = drawFB->Height - dstY1;
|
||||
}
|
||||
|
||||
if (st_fb_orientation(readFB) == Y_0_TOP) {
|
||||
/* invert Y for src */
|
||||
srcY0 = readFB->Height - srcY0;
|
||||
srcY1 = readFB->Height - srcY1;
|
||||
}
|
||||
|
||||
if (srcY0 > srcY1 && dstY0 > dstY1) {
|
||||
/* Both src and dst are upside down. Swap Y to make it
|
||||
* right-side up to increase odds of using a fast path.
|
||||
* Recall that all Gallium raster coords have Y=0=top.
|
||||
*/
|
||||
GLint tmp;
|
||||
tmp = srcY0;
|
||||
srcY0 = srcY1;
|
||||
srcY1 = tmp;
|
||||
tmp = dstY0;
|
||||
dstY0 = dstY1;
|
||||
dstY1 = tmp;
|
||||
}
|
||||
|
||||
if (mask & GL_COLOR_BUFFER_BIT) {
|
||||
struct st_renderbuffer *srcRb =
|
||||
st_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer);
|
||||
st_renderbuffer(readFB->_ColorReadBuffer);
|
||||
struct st_renderbuffer *dstRb =
|
||||
st_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]);
|
||||
st_renderbuffer(drawFB->_ColorDrawBuffers[0]);
|
||||
struct pipe_surface *srcSurf = srcRb->surface;
|
||||
struct pipe_surface *dstSurf = dstRb->surface;
|
||||
|
||||
if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) {
|
||||
/* invert Y */
|
||||
srcY0 = srcRb->Base.Height - srcY0;
|
||||
srcY1 = srcRb->Base.Height - srcY1;
|
||||
|
||||
dstY0 = dstRb->Base.Height - dstY0;
|
||||
dstY1 = dstRb->Base.Height - dstY1;
|
||||
}
|
||||
|
||||
util_blit_pixels(st->blit,
|
||||
srcSurf, srcX0, srcY0, srcX1, srcY1,
|
||||
dstSurf, dstX0, dstY0, dstX1, dstY1,
|
||||
0.0, pFilter);
|
||||
}
|
||||
|
||||
if (mask & depthStencil) {
|
||||
/* depth and/or stencil blit */
|
||||
|
||||
/* get src/dst depth surfaces */
|
||||
struct st_renderbuffer *srcDepthRb =
|
||||
st_renderbuffer(readFB->Attachment[BUFFER_DEPTH].Renderbuffer);
|
||||
struct st_renderbuffer *dstDepthRb =
|
||||
st_renderbuffer(drawFB->Attachment[BUFFER_DEPTH].Renderbuffer);
|
||||
struct pipe_surface *srcDepthSurf =
|
||||
srcDepthRb ? srcDepthRb->surface : NULL;
|
||||
struct pipe_surface *dstDepthSurf =
|
||||
dstDepthRb ? dstDepthRb->surface : NULL;
|
||||
|
||||
/* get src/dst stencil surfaces */
|
||||
struct st_renderbuffer *srcStencilRb =
|
||||
st_renderbuffer(readFB->Attachment[BUFFER_STENCIL].Renderbuffer);
|
||||
struct st_renderbuffer *dstStencilRb =
|
||||
st_renderbuffer(drawFB->Attachment[BUFFER_STENCIL].Renderbuffer);
|
||||
struct pipe_surface *srcStencilSurf =
|
||||
srcStencilRb ? srcStencilRb->surface : NULL;
|
||||
struct pipe_surface *dstStencilSurf =
|
||||
dstStencilRb ? dstStencilRb->surface : NULL;
|
||||
|
||||
if ((mask & depthStencil) == depthStencil &&
|
||||
srcDepthSurf == srcStencilSurf &&
|
||||
dstDepthSurf == dstStencilSurf) {
|
||||
/* Blitting depth and stencil values between combined
|
||||
* depth/stencil buffers. This is the ideal case for such buffers.
|
||||
*/
|
||||
util_blit_pixels(st->blit,
|
||||
srcDepthSurf, srcX0, srcY0, srcX1, srcY1,
|
||||
dstDepthSurf, dstX0, dstY0, dstX1, dstY1,
|
||||
0.0, pFilter);
|
||||
}
|
||||
else {
|
||||
/* blitting depth and stencil separately */
|
||||
|
||||
if (mask & GL_DEPTH_BUFFER_BIT) {
|
||||
/* blit Z only */
|
||||
_mesa_problem(ctx, "st_BlitFramebuffer(DEPTH) not completed");
|
||||
}
|
||||
|
||||
if (mask & GL_STENCIL_BUFFER_BIT) {
|
||||
/* blit stencil only */
|
||||
_mesa_problem(ctx, "st_BlitFramebuffer(STENCIL) not completed");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -280,7 +280,11 @@ clear_with_quad(GLcontext *ctx,
|
||||
static INLINE GLboolean
|
||||
check_clear_color_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
|
||||
{
|
||||
if (ctx->Scissor.Enabled)
|
||||
if (ctx->Scissor.Enabled &&
|
||||
(ctx->Scissor.X != 0 ||
|
||||
ctx->Scissor.Y != 0 ||
|
||||
ctx->Scissor.Width < rb->Width ||
|
||||
ctx->Scissor.Height < rb->Height))
|
||||
return TRUE;
|
||||
|
||||
if (!ctx->Color.ColorMask[0] ||
|
||||
@@ -300,7 +304,11 @@ check_clear_depth_stencil_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
|
||||
GLboolean maskStencil
|
||||
= (ctx->Stencil.WriteMask[0] & stencilMax) != stencilMax;
|
||||
|
||||
if (ctx->Scissor.Enabled)
|
||||
if (ctx->Scissor.Enabled &&
|
||||
(ctx->Scissor.X != 0 ||
|
||||
ctx->Scissor.Y != 0 ||
|
||||
ctx->Scissor.Width < rb->Width ||
|
||||
ctx->Scissor.Height < rb->Height))
|
||||
return TRUE;
|
||||
|
||||
if (maskStencil)
|
||||
@@ -319,7 +327,11 @@ check_clear_depth_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
|
||||
const struct st_renderbuffer *strb = st_renderbuffer(rb);
|
||||
const GLboolean isDS = pf_is_depth_and_stencil(strb->surface->format);
|
||||
|
||||
if (ctx->Scissor.Enabled)
|
||||
if (ctx->Scissor.Enabled &&
|
||||
(ctx->Scissor.X != 0 ||
|
||||
ctx->Scissor.Y != 0 ||
|
||||
ctx->Scissor.Width < rb->Width ||
|
||||
ctx->Scissor.Height < rb->Height))
|
||||
return TRUE;
|
||||
|
||||
if (isDS &&
|
||||
@@ -345,7 +357,11 @@ check_clear_stencil_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
|
||||
if (maskStencil)
|
||||
return TRUE;
|
||||
|
||||
if (ctx->Scissor.Enabled)
|
||||
if (ctx->Scissor.Enabled &&
|
||||
(ctx->Scissor.X != 0 ||
|
||||
ctx->Scissor.Y != 0 ||
|
||||
ctx->Scissor.Width < rb->Width ||
|
||||
ctx->Scissor.Height < rb->Height))
|
||||
return TRUE;
|
||||
|
||||
/* This is correct, but it is necessary to look at the depth clear
|
||||
|
@@ -842,6 +842,10 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
|
||||
else
|
||||
usage = PIPE_TRANSFER_WRITE;
|
||||
|
||||
if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) {
|
||||
dsty = rbDraw->Base.Height - dsty - height;
|
||||
}
|
||||
|
||||
ptDraw = st_cond_flush_get_tex_transfer(st_context(ctx),
|
||||
rbDraw->texture, 0, 0, 0,
|
||||
usage, dstx, dsty,
|
||||
|
@@ -152,4 +152,16 @@ void st_init_flush_functions(struct dd_function_table *functions)
|
||||
{
|
||||
functions->Flush = st_glFlush;
|
||||
functions->Finish = st_glFinish;
|
||||
|
||||
/* Windows opengl32.dll calls glFinish prior to every swapbuffers.
|
||||
* This is unnecessary and degrades performance. Luckily we have some
|
||||
* scope to work around this, as the externally-visible behaviour of
|
||||
* Finish() is identical to Flush() in all cases - no differences in
|
||||
* rendering or ReadPixels are visible if we opt not to wait here.
|
||||
*
|
||||
* Only set this up on windows to avoid suprise elsewhere.
|
||||
*/
|
||||
#ifdef PIPE_OS_WINDOWS
|
||||
functions->Finish = st_glFlush;
|
||||
#endif
|
||||
}
|
||||
|
@@ -56,6 +56,7 @@
|
||||
#include "pipe/p_context.h"
|
||||
#include "pipe/p_defines.h"
|
||||
#include "pipe/p_inlines.h"
|
||||
#include "pipe/p_shader_tokens.h"
|
||||
#include "util/u_tile.h"
|
||||
#include "util/u_blit.h"
|
||||
#include "util/u_surface.h"
|
||||
@@ -525,9 +526,9 @@ st_TexImage(GLcontext * ctx,
|
||||
struct st_texture_image *stImage = st_texture_image(texImage);
|
||||
GLint postConvWidth, postConvHeight;
|
||||
GLint texelBytes, sizeInBytes;
|
||||
GLuint dstRowStride;
|
||||
GLuint dstRowStride = 0;
|
||||
struct gl_pixelstore_attrib unpackNB;
|
||||
enum pipe_transfer_usage transfer_usage;
|
||||
enum pipe_transfer_usage transfer_usage = 0;
|
||||
|
||||
DBG("%s target %s level %d %dx%dx%d border %d\n", __FUNCTION__,
|
||||
_mesa_lookup_enum_by_nr(target), level, width, height, depth, border);
|
||||
@@ -1047,7 +1048,8 @@ st_TexSubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level,
|
||||
_mesa_image_image_stride(packing, width, height, format, type);
|
||||
GLint i;
|
||||
const GLubyte *src;
|
||||
enum pipe_transfer_usage transfer_usage;
|
||||
/* init to silence warning only: */
|
||||
enum pipe_transfer_usage transfer_usage = PIPE_TRANSFER_WRITE;
|
||||
|
||||
DBG("%s target %s level %d offset %d,%d %dx%d\n", __FUNCTION__,
|
||||
_mesa_lookup_enum_by_nr(target),
|
||||
@@ -1395,6 +1397,36 @@ fallback_copy_texsubimage(GLcontext *ctx, GLenum target, GLint level,
|
||||
}
|
||||
|
||||
|
||||
static unsigned
|
||||
compatible_src_dst_formats(const struct gl_renderbuffer *src,
|
||||
const struct gl_texture_image *dst)
|
||||
{
|
||||
const GLenum srcFormat = src->_BaseFormat;
|
||||
const GLenum dstLogicalFormat = dst->_BaseFormat;
|
||||
|
||||
if (srcFormat == dstLogicalFormat) {
|
||||
/* This is the same as matching_base_formats, which should
|
||||
* always pass, as it did previously.
|
||||
*/
|
||||
return TGSI_WRITEMASK_XYZW;
|
||||
}
|
||||
else if (srcFormat == GL_RGBA &&
|
||||
dstLogicalFormat == GL_RGB) {
|
||||
/* Add a single special case to cope with RGBA->RGB transfers,
|
||||
* setting A to 1.0 to cope with situations where the RGB
|
||||
* destination is actually stored as RGBA.
|
||||
*/
|
||||
return TGSI_WRITEMASK_XYZ; /* A ==> 1.0 */
|
||||
}
|
||||
else {
|
||||
/* Otherwise fail.
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Do a CopyTex[Sub]Image1/2/3D() using a hardware (blit) path if possible.
|
||||
* Note that the region to copy has already been clipped so we know we
|
||||
@@ -1424,6 +1456,9 @@ st_copy_texsubimage(GLcontext *ctx,
|
||||
enum pipe_format dest_format, src_format;
|
||||
GLboolean use_fallback = GL_TRUE;
|
||||
GLboolean matching_base_formats;
|
||||
GLuint format_writemask;
|
||||
struct pipe_surface *dest_surface = NULL;
|
||||
GLboolean do_flip = (st_fb_orientation(ctx->ReadBuffer) == Y_0_TOP);
|
||||
|
||||
/* any rendering in progress must flushed before we grab the fb image */
|
||||
st_flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL);
|
||||
@@ -1494,13 +1529,14 @@ st_copy_texsubimage(GLcontext *ctx,
|
||||
* textured-quad paths.
|
||||
*/
|
||||
matching_base_formats = (strb->Base._BaseFormat == texImage->_BaseFormat);
|
||||
format_writemask = compatible_src_dst_formats(&strb->Base, texImage);
|
||||
|
||||
if (matching_base_formats && ctx->_ImageTransferState == 0x0) {
|
||||
/* try potential hardware path */
|
||||
struct pipe_surface *dest_surface = NULL;
|
||||
boolean do_flip = (st_fb_orientation(ctx->ReadBuffer) == Y_0_TOP);
|
||||
if (ctx->_ImageTransferState == 0x0) {
|
||||
|
||||
if (src_format == dest_format && !do_flip) {
|
||||
if (matching_base_formats &&
|
||||
src_format == dest_format &&
|
||||
!do_flip)
|
||||
{
|
||||
/* use surface_copy() / blit */
|
||||
|
||||
dest_surface = screen->get_tex_surface(screen, stImage->pt,
|
||||
@@ -1520,7 +1556,8 @@ st_copy_texsubimage(GLcontext *ctx,
|
||||
width, height);
|
||||
use_fallback = GL_FALSE;
|
||||
}
|
||||
else if (screen->is_format_supported(screen, src_format,
|
||||
else if (format_writemask &&
|
||||
screen->is_format_supported(screen, src_format,
|
||||
PIPE_TEXTURE_2D,
|
||||
PIPE_TEXTURE_USAGE_SAMPLER,
|
||||
0) &&
|
||||
@@ -1544,14 +1581,15 @@ st_copy_texsubimage(GLcontext *ctx,
|
||||
srcY0 = srcY;
|
||||
srcY1 = srcY0 + height;
|
||||
}
|
||||
util_blit_pixels(ctx->st->blit,
|
||||
strb->surface,
|
||||
srcX, srcY0,
|
||||
srcX + width, srcY1,
|
||||
dest_surface,
|
||||
destX, destY,
|
||||
destX + width, destY + height,
|
||||
0.0, PIPE_TEX_MIPFILTER_NEAREST);
|
||||
util_blit_pixels_writemask(ctx->st->blit,
|
||||
strb->surface,
|
||||
srcX, srcY0,
|
||||
srcX + width, srcY1,
|
||||
dest_surface,
|
||||
destX, destY,
|
||||
destX + width, destY + height,
|
||||
0.0, PIPE_TEX_MIPFILTER_NEAREST,
|
||||
format_writemask);
|
||||
use_fallback = GL_FALSE;
|
||||
}
|
||||
|
||||
|
@@ -222,7 +222,9 @@ void st_init_extensions(struct st_context *st)
|
||||
|
||||
if (screen->get_param(screen, PIPE_CAP_POINT_SPRITE)) {
|
||||
ctx->Extensions.ARB_point_sprite = GL_TRUE;
|
||||
ctx->Extensions.NV_point_sprite = GL_TRUE;
|
||||
/* GL_NV_point_sprite is not supported by gallium because we don't
|
||||
* support the GL_POINT_SPRITE_R_MODE_NV option.
|
||||
*/
|
||||
}
|
||||
|
||||
if (screen->get_param(screen, PIPE_CAP_OCCLUSION_QUERY)) {
|
||||
|
@@ -24,6 +24,7 @@
|
||||
|
||||
|
||||
#include "main/glheader.h"
|
||||
#include "main/image.h"
|
||||
#include "main/macros.h"
|
||||
#include "s_context.h"
|
||||
|
||||
@@ -550,184 +551,6 @@ simple_blit(GLcontext *ctx,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Clip dst coords against Xmax (or Ymax).
|
||||
*/
|
||||
static INLINE void
|
||||
clip_right_or_top(GLint *srcX0, GLint *srcX1,
|
||||
GLint *dstX0, GLint *dstX1,
|
||||
GLint maxValue)
|
||||
{
|
||||
GLfloat t, bias;
|
||||
|
||||
if (*dstX1 > maxValue) {
|
||||
/* X1 outside right edge */
|
||||
ASSERT(*dstX0 < maxValue); /* X0 should be inside right edge */
|
||||
t = (GLfloat) (maxValue - *dstX0) / (GLfloat) (*dstX1 - *dstX0);
|
||||
/* chop off [t, 1] part */
|
||||
ASSERT(t >= 0.0 && t <= 1.0);
|
||||
*dstX1 = maxValue;
|
||||
bias = (*srcX0 < *srcX1) ? 0.5 : -0.5;
|
||||
*srcX1 = *srcX0 + (GLint) (t * (*srcX1 - *srcX0) + bias);
|
||||
}
|
||||
else if (*dstX0 > maxValue) {
|
||||
/* X0 outside right edge */
|
||||
ASSERT(*dstX1 < maxValue); /* X1 should be inside right edge */
|
||||
t = (GLfloat) (maxValue - *dstX1) / (GLfloat) (*dstX0 - *dstX1);
|
||||
/* chop off [t, 1] part */
|
||||
ASSERT(t >= 0.0 && t <= 1.0);
|
||||
*dstX0 = maxValue;
|
||||
bias = (*srcX0 < *srcX1) ? -0.5 : 0.5;
|
||||
*srcX0 = *srcX1 + (GLint) (t * (*srcX0 - *srcX1) + bias);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Clip dst coords against Xmin (or Ymin).
|
||||
*/
|
||||
static INLINE void
|
||||
clip_left_or_bottom(GLint *srcX0, GLint *srcX1,
|
||||
GLint *dstX0, GLint *dstX1,
|
||||
GLint minValue)
|
||||
{
|
||||
GLfloat t, bias;
|
||||
|
||||
if (*dstX0 < minValue) {
|
||||
/* X0 outside left edge */
|
||||
ASSERT(*dstX1 > minValue); /* X1 should be inside left edge */
|
||||
t = (GLfloat) (minValue - *dstX0) / (GLfloat) (*dstX1 - *dstX0);
|
||||
/* chop off [0, t] part */
|
||||
ASSERT(t >= 0.0 && t <= 1.0);
|
||||
*dstX0 = minValue;
|
||||
bias = (*srcX0 < *srcX1) ? 0.5 : -0.5; /* flipped??? */
|
||||
*srcX0 = *srcX0 + (GLint) (t * (*srcX1 - *srcX0) + bias);
|
||||
}
|
||||
else if (*dstX1 < minValue) {
|
||||
/* X1 outside left edge */
|
||||
ASSERT(*dstX0 > minValue); /* X0 should be inside left edge */
|
||||
t = (GLfloat) (minValue - *dstX1) / (GLfloat) (*dstX0 - *dstX1);
|
||||
/* chop off [0, t] part */
|
||||
ASSERT(t >= 0.0 && t <= 1.0);
|
||||
*dstX1 = minValue;
|
||||
bias = (*srcX0 < *srcX1) ? 0.5 : -0.5;
|
||||
*srcX1 = *srcX1 + (GLint) (t * (*srcX0 - *srcX1) + bias);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Do clipping of blit src/dest rectangles.
|
||||
* The dest rect is clipped against both the buffer bounds and scissor bounds.
|
||||
* The src rect is just clipped against the buffer bounds.
|
||||
*
|
||||
* When either the src or dest rect is clipped, the other is also clipped
|
||||
* proportionately!
|
||||
*
|
||||
* Note that X0 need not be less than X1 (same for Y) for either the source
|
||||
* and dest rects. That makes the clipping a little trickier.
|
||||
*
|
||||
* \return GL_TRUE if anything is left to draw, GL_FALSE if totally clipped
|
||||
*/
|
||||
static GLboolean
|
||||
clip_blit(GLcontext *ctx,
|
||||
GLint *srcX0, GLint *srcY0, GLint *srcX1, GLint *srcY1,
|
||||
GLint *dstX0, GLint *dstY0, GLint *dstX1, GLint *dstY1)
|
||||
{
|
||||
const GLint srcXmin = 0;
|
||||
const GLint srcXmax = ctx->ReadBuffer->Width;
|
||||
const GLint srcYmin = 0;
|
||||
const GLint srcYmax = ctx->ReadBuffer->Height;
|
||||
|
||||
/* these include scissor bounds */
|
||||
const GLint dstXmin = ctx->DrawBuffer->_Xmin;
|
||||
const GLint dstXmax = ctx->DrawBuffer->_Xmax;
|
||||
const GLint dstYmin = ctx->DrawBuffer->_Ymin;
|
||||
const GLint dstYmax = ctx->DrawBuffer->_Ymax;
|
||||
|
||||
/*
|
||||
printf("PreClipX: src: %d .. %d dst: %d .. %d\n",
|
||||
*srcX0, *srcX1, *dstX0, *dstX1);
|
||||
printf("PreClipY: src: %d .. %d dst: %d .. %d\n",
|
||||
*srcY0, *srcY1, *dstY0, *dstY1);
|
||||
*/
|
||||
|
||||
/* trivial rejection tests */
|
||||
if (*dstX0 == *dstX1)
|
||||
return GL_FALSE; /* no width */
|
||||
if (*dstX0 <= dstXmin && *dstX1 <= dstXmin)
|
||||
return GL_FALSE; /* totally out (left) of bounds */
|
||||
if (*dstX0 >= dstXmax && *dstX1 >= dstXmax)
|
||||
return GL_FALSE; /* totally out (right) of bounds */
|
||||
|
||||
if (*dstY0 == *dstY1)
|
||||
return GL_FALSE;
|
||||
if (*dstY0 <= dstYmin && *dstY1 <= dstYmin)
|
||||
return GL_FALSE;
|
||||
if (*dstY0 >= dstYmax && *dstY1 >= dstYmax)
|
||||
return GL_FALSE;
|
||||
|
||||
if (*srcX0 == *srcX1)
|
||||
return GL_FALSE;
|
||||
if (*srcX0 <= srcXmin && *srcX1 <= srcXmin)
|
||||
return GL_FALSE;
|
||||
if (*srcX0 >= srcXmax && *srcX1 >= srcXmax)
|
||||
return GL_FALSE;
|
||||
|
||||
if (*srcY0 == *srcY1)
|
||||
return GL_FALSE;
|
||||
if (*srcY0 <= srcYmin && *srcY1 <= srcYmin)
|
||||
return GL_FALSE;
|
||||
if (*srcY0 >= srcYmax && *srcY1 >= srcYmax)
|
||||
return GL_FALSE;
|
||||
|
||||
/*
|
||||
* dest clip
|
||||
*/
|
||||
clip_right_or_top(srcX0, srcX1, dstX0, dstX1, dstXmax);
|
||||
clip_right_or_top(srcY0, srcY1, dstY0, dstY1, dstYmax);
|
||||
clip_left_or_bottom(srcX0, srcX1, dstX0, dstX1, dstXmin);
|
||||
clip_left_or_bottom(srcY0, srcY1, dstY0, dstY1, dstYmin);
|
||||
|
||||
/*
|
||||
* src clip (just swap src/dst values from above)
|
||||
*/
|
||||
clip_right_or_top(dstX0, dstX1, srcX0, srcX1, srcXmax);
|
||||
clip_right_or_top(dstY0, dstY1, srcY0, srcY1, srcYmax);
|
||||
clip_left_or_bottom(dstX0, dstX1, srcX0, srcX1, srcXmin);
|
||||
clip_left_or_bottom(dstY0, dstY1, srcY0, srcY1, srcYmin);
|
||||
|
||||
/*
|
||||
printf("PostClipX: src: %d .. %d dst: %d .. %d\n",
|
||||
*srcX0, *srcX1, *dstX0, *dstX1);
|
||||
printf("PostClipY: src: %d .. %d dst: %d .. %d\n",
|
||||
*srcY0, *srcY1, *dstY0, *dstY1);
|
||||
*/
|
||||
|
||||
ASSERT(*dstX0 >= dstXmin);
|
||||
ASSERT(*dstX0 <= dstXmax);
|
||||
ASSERT(*dstX1 >= dstXmin);
|
||||
ASSERT(*dstX1 <= dstXmax);
|
||||
|
||||
ASSERT(*dstY0 >= dstYmin);
|
||||
ASSERT(*dstY0 <= dstYmax);
|
||||
ASSERT(*dstY1 >= dstYmin);
|
||||
ASSERT(*dstY1 <= dstYmax);
|
||||
|
||||
ASSERT(*srcX0 >= srcXmin);
|
||||
ASSERT(*srcX0 <= srcXmax);
|
||||
ASSERT(*srcX1 >= srcXmin);
|
||||
ASSERT(*srcX1 <= srcXmax);
|
||||
|
||||
ASSERT(*srcY0 >= srcYmin);
|
||||
ASSERT(*srcY0 <= srcYmax);
|
||||
ASSERT(*srcY1 >= srcYmin);
|
||||
ASSERT(*srcY1 <= srcYmax);
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Software fallback for glBlitFramebufferEXT().
|
||||
*/
|
||||
@@ -747,8 +570,8 @@ _swrast_BlitFramebuffer(GLcontext *ctx,
|
||||
if (!ctx->DrawBuffer->_NumColorDrawBuffers)
|
||||
return;
|
||||
|
||||
if (!clip_blit(ctx, &srcX0, &srcY0, &srcX1, &srcY1,
|
||||
&dstX0, &dstY0, &dstX1, &dstY1)) {
|
||||
if (!_mesa_clip_blit(ctx, &srcX0, &srcY0, &srcX1, &srcY1,
|
||||
&dstX0, &dstY0, &dstX1, &dstY1)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -220,6 +220,9 @@ _swrast_update_deferred_texture(GLcontext *ctx)
|
||||
/* Z comes from fragment program/shader */
|
||||
swrast->_DeferredTexture = GL_FALSE;
|
||||
}
|
||||
else if (fprog && fprog->UsesKill) {
|
||||
swrast->_DeferredTexture = GL_FALSE;
|
||||
}
|
||||
else if (ctx->Query.CurrentOcclusionObject) {
|
||||
/* occlusion query depends on shader discard/kill results */
|
||||
swrast->_DeferredTexture = GL_FALSE;
|
||||
|
@@ -58,7 +58,7 @@ void
|
||||
_swrast_feedback_triangle(GLcontext *ctx, const SWvertex *v0,
|
||||
const SWvertex *v1, const SWvertex *v2)
|
||||
{
|
||||
if (_swrast_culltriangle(ctx, v0, v1, v2)) {
|
||||
if (!_swrast_culltriangle(ctx, v0, v1, v2)) {
|
||||
_mesa_feedback_token(ctx, (GLfloat) (GLint) GL_POLYGON_TOKEN);
|
||||
_mesa_feedback_token(ctx, (GLfloat) 3); /* three vertices */
|
||||
|
||||
@@ -113,7 +113,7 @@ void
|
||||
_swrast_select_triangle(GLcontext *ctx, const SWvertex *v0,
|
||||
const SWvertex *v1, const SWvertex *v2)
|
||||
{
|
||||
if (_swrast_culltriangle(ctx, v0, v1, v2)) {
|
||||
if (!_swrast_culltriangle(ctx, v0, v1, v2)) {
|
||||
const GLfloat zs = 1.0F / ctx->DrawBuffer->_DepthMaxF;
|
||||
|
||||
_mesa_update_hitflag( ctx, v0->attrib[FRAG_ATTRIB_WPOS][2] * zs );
|
||||
|
@@ -44,8 +44,9 @@
|
||||
#include "s_triangle.h"
|
||||
|
||||
|
||||
/*
|
||||
* Just used for feedback mode.
|
||||
/**
|
||||
* Test if a triangle should be culled. Used for feedback and selection mode.
|
||||
* \return GL_TRUE if the triangle is to be culled, GL_FALSE otherwise.
|
||||
*/
|
||||
GLboolean
|
||||
_swrast_culltriangle( GLcontext *ctx,
|
||||
@@ -53,16 +54,17 @@ _swrast_culltriangle( GLcontext *ctx,
|
||||
const SWvertex *v1,
|
||||
const SWvertex *v2 )
|
||||
{
|
||||
SWcontext *swrast = SWRAST_CONTEXT(ctx);
|
||||
GLfloat ex = v1->attrib[FRAG_ATTRIB_WPOS][0] - v0->attrib[FRAG_ATTRIB_WPOS][0];
|
||||
GLfloat ey = v1->attrib[FRAG_ATTRIB_WPOS][1] - v0->attrib[FRAG_ATTRIB_WPOS][1];
|
||||
GLfloat fx = v2->attrib[FRAG_ATTRIB_WPOS][0] - v0->attrib[FRAG_ATTRIB_WPOS][0];
|
||||
GLfloat fy = v2->attrib[FRAG_ATTRIB_WPOS][1] - v0->attrib[FRAG_ATTRIB_WPOS][1];
|
||||
GLfloat c = ex*fy-ey*fx;
|
||||
|
||||
if (c * SWRAST_CONTEXT(ctx)->_BackfaceCullSign > 0)
|
||||
return 0;
|
||||
if (c * swrast->_BackfaceSign * swrast->_BackfaceCullSign <= 0.0F)
|
||||
return GL_FALSE;
|
||||
|
||||
return 1;
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -383,7 +383,7 @@ void vbo_exec_vtx_flush( struct vbo_exec_context *exec,
|
||||
}
|
||||
|
||||
|
||||
if (unmap)
|
||||
if (unmap || exec->vtx.vertex_size == 0)
|
||||
exec->vtx.max_vert = 0;
|
||||
else
|
||||
exec->vtx.max_vert = ((VBO_VERT_BUFFER_SIZE - exec->vtx.buffer_used) /
|
||||
|
@@ -21,7 +21,7 @@ clean:
|
||||
|
||||
|
||||
gen_matypes: gen_matypes.c
|
||||
$(HOST_CC) $(INCLUDE_DIRS) $(HOST_CFLAGS) gen_matypes.c -o gen_matypes
|
||||
$(HOST_CC) $(ARCH_FLAGS) $(INCLUDE_DIRS) $(HOST_CFLAGS) gen_matypes.c -o gen_matypes
|
||||
|
||||
# need some special rules here, unfortunately
|
||||
matypes.h: ../main/mtypes.h ../tnl/t_context.h gen_matypes
|
||||
|
@@ -52,6 +52,7 @@
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
CompileAs="0"
|
||||
ForcedIncludeFiles="../../../../src/mesa/main/compiler.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -122,6 +123,7 @@
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
ForcedIncludeFiles="../../../../src/mesa/main/compiler.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -192,6 +194,7 @@
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
ForcedIncludeFiles="../../../../src/mesa/main/compiler.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -262,6 +265,7 @@
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
CompileAs="0"
|
||||
ForcedIncludeFiles="../../../../src/mesa/main/compiler.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -378,6 +382,10 @@
|
||||
RelativePath="..\..\..\..\src\mesa\main\convolve.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\main\cpuinfo.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\main\debug.c"
|
||||
>
|
||||
@@ -650,10 +658,6 @@
|
||||
RelativePath="..\..\..\..\src\mesa\shader\prog_cache.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\shader\prog_debug.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\shader\prog_execute.c"
|
||||
>
|
||||
@@ -666,6 +670,10 @@
|
||||
RelativePath="..\..\..\..\src\mesa\shader\prog_noise.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\shader\prog_optimize.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\shader\prog_parameter.c"
|
||||
>
|
||||
@@ -1034,6 +1042,10 @@
|
||||
RelativePath="..\..\..\..\src\mesa\main\texgen.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\main\texgetimage.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\main\teximage.c"
|
||||
>
|
||||
@@ -1062,10 +1074,6 @@
|
||||
RelativePath="..\..\..\..\src\mesa\main\varray.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\main\viewport.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\vbo\vbo_context.c"
|
||||
>
|
||||
@@ -1122,6 +1130,10 @@
|
||||
RelativePath="..\..\..\..\src\mesa\vbo\vbo_split_inplace.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\main\viewport.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\main\vsnprintf.c"
|
||||
>
|
||||
@@ -1263,6 +1275,10 @@
|
||||
RelativePath="..\..\..\..\src\mesa\main\convolve.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\main\cpuinfo.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\main\dd.h"
|
||||
>
|
||||
@@ -1519,10 +1535,6 @@
|
||||
RelativePath="..\..\..\..\src\mesa\main\polygon.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\shader\prog_debug.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\shader\prog_execute.h"
|
||||
>
|
||||
@@ -1535,6 +1547,10 @@
|
||||
RelativePath="..\..\..\..\src\mesa\shader\prog_noise.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\shader\prog_optimize.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\shader\prog_parameter.h"
|
||||
>
|
||||
@@ -1879,6 +1895,10 @@
|
||||
RelativePath="..\..\..\..\src\mesa\main\texgen.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\main\texgetimage.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\main\teximage.h"
|
||||
>
|
||||
@@ -1911,10 +1931,6 @@
|
||||
RelativePath="..\..\..\..\src\mesa\main\varray.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\main\viewport.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\vbo\vbo.h"
|
||||
>
|
||||
@@ -1947,6 +1963,10 @@
|
||||
RelativePath="..\..\..\..\src\mesa\main\version.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\main\viewport.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\mesa\main\vtxfmt.h"
|
||||
>
|
||||
|
@@ -55,6 +55,7 @@
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
CompileAs="0"
|
||||
ForcedIncludeFiles="../../../../src/mesa/main/compiler.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -145,6 +146,7 @@
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
ForcedIncludeFiles="../../../../src/mesa/main/compiler.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -236,6 +238,7 @@
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
ForcedIncludeFiles="../../../../src/mesa/main/compiler.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -327,6 +330,7 @@
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
CompileAs="0"
|
||||
ForcedIncludeFiles="../../../../src/mesa/main/compiler.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
|
Reference in New Issue
Block a user