Compare commits
111 Commits
mesa-7.5-2
...
mesa_7_5_1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
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 | ||
|
|
5276b049b4 | ||
|
|
c57d81ddc9 | ||
|
|
b4ba6a66b7 | ||
|
|
9c4b877519 | ||
|
|
b9e2e32daf |
12
Makefile
12
Makefile
@@ -182,7 +182,7 @@ ultrix-gcc:
|
|||||||
|
|
||||||
# Rules for making release tarballs
|
# Rules for making release tarballs
|
||||||
|
|
||||||
VERSION=7.5
|
VERSION=7.5.1
|
||||||
DIRECTORY = Mesa-$(VERSION)
|
DIRECTORY = Mesa-$(VERSION)
|
||||||
LIB_NAME = MesaLib-$(VERSION)
|
LIB_NAME = MesaLib-$(VERSION)
|
||||||
DEMO_NAME = MesaDemos-$(VERSION)
|
DEMO_NAME = MesaDemos-$(VERSION)
|
||||||
@@ -388,7 +388,17 @@ GLW_FILES = \
|
|||||||
$(DIRECTORY)/src/glw/glw.pc.in \
|
$(DIRECTORY)/src/glw/glw.pc.in \
|
||||||
$(DIRECTORY)/src/glw/depend
|
$(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 = \
|
DEMO_FILES = \
|
||||||
|
$(GLEW_FILES) \
|
||||||
$(DIRECTORY)/progs/beos/*.cpp \
|
$(DIRECTORY)/progs/beos/*.cpp \
|
||||||
$(DIRECTORY)/progs/beos/Makefile \
|
$(DIRECTORY)/progs/beos/Makefile \
|
||||||
$(DIRECTORY)/progs/images/*.rgb \
|
$(DIRECTORY)/progs/images/*.rgb \
|
||||||
|
|||||||
@@ -971,5 +971,6 @@ esac
|
|||||||
#
|
#
|
||||||
if [ ${INSTALLDIR} != "." ] ; then
|
if [ ${INSTALLDIR} != "." ] ; then
|
||||||
echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR}
|
echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR}
|
||||||
|
test -d ${INSTALLDIR} || mkdir -p ${INSTALLDIR}
|
||||||
mv ${FINAL_LIBS} ${INSTALLDIR}/
|
mv ${FINAL_LIBS} ${INSTALLDIR}/
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ CONFIG_NAME = default
|
|||||||
# Version info
|
# Version info
|
||||||
MESA_MAJOR=7
|
MESA_MAJOR=7
|
||||||
MESA_MINOR=5
|
MESA_MINOR=5
|
||||||
MESA_TINY=0
|
MESA_TINY=1
|
||||||
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
|
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
|
||||||
|
|
||||||
# external projects. This should be useless now that we use libdrm.
|
# 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$enable_32bit" = xyes; then
|
||||||
if test "x$GCC" = xyes; then
|
if test "x$GCC" = xyes; then
|
||||||
CFLAGS="$CFLAGS -m32"
|
CFLAGS="$CFLAGS -m32"
|
||||||
|
ARCH_FLAGS="$ARCH_FLAGS -m32"
|
||||||
fi
|
fi
|
||||||
if test "x$GXX" = xyes; then
|
if test "x$GXX" = xyes; then
|
||||||
CXXFLAGS="$CXXFLAGS -m32"
|
CXXFLAGS="$CXXFLAGS -m32"
|
||||||
@@ -1145,6 +1146,21 @@ AC_ARG_WITH([xorg-driver-dir],
|
|||||||
[XORG_DRIVER_INSTALL_DIR="${libdir}/xorg/modules/drivers"])
|
[XORG_DRIVER_INSTALL_DIR="${libdir}/xorg/modules/drivers"])
|
||||||
AC_SUBST([XORG_DRIVER_INSTALL_DIR])
|
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
|
||||||
dnl Gallium Intel configuration
|
dnl Gallium Intel configuration
|
||||||
dnl
|
dnl
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ a:visited {
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="download.html" target="MainFrame">Downloading / Unpacking</a>
|
<li><a href="download.html" target="MainFrame">Downloading / Unpacking</a>
|
||||||
<li><a href="install.html" target="MainFrame">Compiling / Installing</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>
|
<li><a href="precompiled.html" target="MainFrame">Precompiled Libraries</a>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@@ -68,6 +67,7 @@ a:visited {
|
|||||||
<li><a href="repository.html" target="MainFrame">Source Code Repository</a>
|
<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="memory.html" target="MainFrame">DRI Memory Management</a>
|
||||||
<li><a href="shading.html" target="MainFrame">Shading Language</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="utilities.html" target="MainFrame">Utilities</a>
|
||||||
<li><a href="helpwanted.html" target="MainFrame">Help Wanted</a>
|
<li><a href="helpwanted.html" target="MainFrame">Help Wanted</a>
|
||||||
<li><a href="devinfo.html" target="MainFrame">Development Notes</a>
|
<li><a href="devinfo.html" target="MainFrame">Development Notes</a>
|
||||||
|
|||||||
@@ -9,14 +9,14 @@
|
|||||||
<H1>Downloading</H1>
|
<H1>Downloading</H1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Primary download site:
|
Primary Mesa download site:
|
||||||
<a href="http://sourceforge.net/project/showfiles.php?group_id=3"
|
<a href="ftp://ftp.freedesktop.org/pub/mesa/"
|
||||||
target="_parent">SourceForge</a>
|
target="_parent">freedesktop.org</a> (FTP)
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
When a new release is coming, release candidates (betas) can be found
|
When a new release is coming, release candidates (betas) may be found
|
||||||
<a href="http://www.mesa3d.org/beta/">here</a>.
|
<a href="ftp://ftp.freedesktop.org/pub/mesa/beta/" target="_parent">here</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -316,6 +316,19 @@ Basically, applying a translation of (0.375, 0.375, 0.0) to your coordinates
|
|||||||
will fix the problem.
|
will fix the problem.
|
||||||
</p>
|
</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>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,13 @@
|
|||||||
<H1>News</H1>
|
<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>
|
<h2>July 17, 2009</h2>
|
||||||
<p>
|
<p>
|
||||||
<a href="relnotes-7.5.html">Mesa 7.5</a> is released.
|
<a href="relnotes-7.5.html">Mesa 7.5</a> is released.
|
||||||
|
|||||||
@@ -9,17 +9,11 @@
|
|||||||
<H1>Precompiled Libraries</H1>
|
<H1>Precompiled Libraries</H1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
In general, precompiled libraries are not available.
|
In general, precompiled Mesa libraries are not available.
|
||||||
However, people occasionally prepare packages of precompiled libraries
|
|
||||||
for some systems.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<H2>Mesa-6.0 for Solaris</H2>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Steve Christensen has submitted precompiled Mesa-6.0 libraries for
|
However, some Linux distros (such as Ubuntu) seem to closely track
|
||||||
Solaris at <a href="http://sunfreeware.com/" target="_parent">
|
Mesa and often have the latest Mesa release available as an update.
|
||||||
sunfreeware.com</a>.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</BODY>
|
</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>
|
<h2>MD5 checksums</h2>
|
||||||
<pre>
|
<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>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ The release notes summarize what's new or changed in each Mesa release.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<UL>
|
<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.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.4.html">7.4.4 release notes</A>
|
||||||
<LI><A HREF="relnotes-7.4.3.html">7.4.3 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.
|
* Make FBO to render into given texture.
|
||||||
*/
|
*/
|
||||||
static GLuint
|
static GLuint
|
||||||
MakeFBO_RenderTexture(GLuint TexObj)
|
MakeFBO_RenderTexture(GLuint texObj)
|
||||||
{
|
{
|
||||||
GLuint fb;
|
GLuint fb;
|
||||||
GLint sizeFudge = 0;
|
GLint sizeFudge = 0;
|
||||||
@@ -507,7 +507,7 @@ MakeFBO_RenderTexture(GLuint TexObj)
|
|||||||
glBindFramebuffer_func(GL_FRAMEBUFFER_EXT, fb);
|
glBindFramebuffer_func(GL_FRAMEBUFFER_EXT, fb);
|
||||||
/* Render color to texture */
|
/* Render color to texture */
|
||||||
glFramebufferTexture2D_func(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
|
glFramebufferTexture2D_func(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
|
||||||
TexTarget, TexObj, TextureLevel);
|
TexTarget, texObj, TextureLevel);
|
||||||
|
|
||||||
if (Use_ARB_fbo) {
|
if (Use_ARB_fbo) {
|
||||||
/* use a smaller depth buffer to see what happens */
|
/* use a smaller depth buffer to see what happens */
|
||||||
@@ -541,7 +541,7 @@ MakeFBO_RenderTexture(GLuint TexObj)
|
|||||||
|
|
||||||
/* queries */
|
/* queries */
|
||||||
{
|
{
|
||||||
GLint bits, w, h;
|
GLint bits, w, h, name;
|
||||||
|
|
||||||
glBindRenderbuffer_func(GL_RENDERBUFFER_EXT, DepthRB);
|
glBindRenderbuffer_func(GL_RENDERBUFFER_EXT, DepthRB);
|
||||||
glGetRenderbufferParameteriv_func(GL_RENDERBUFFER_EXT,
|
glGetRenderbufferParameteriv_func(GL_RENDERBUFFER_EXT,
|
||||||
@@ -559,8 +559,28 @@ MakeFBO_RenderTexture(GLuint TexObj)
|
|||||||
glGetRenderbufferParameteriv_func(GL_RENDERBUFFER_EXT,
|
glGetRenderbufferParameteriv_func(GL_RENDERBUFFER_EXT,
|
||||||
GL_RENDERBUFFER_STENCIL_SIZE_EXT, &bits);
|
GL_RENDERBUFFER_STENCIL_SIZE_EXT, &bits);
|
||||||
printf("Stencil renderbuffer size = %d bits\n", 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 */
|
/* bind the regular framebuffer */
|
||||||
glBindFramebuffer_func(GL_FRAMEBUFFER_EXT, 0);
|
glBindFramebuffer_func(GL_FRAMEBUFFER_EXT, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ DEMO_SOURCES = \
|
|||||||
pointcoord.c \
|
pointcoord.c \
|
||||||
points.c \
|
points.c \
|
||||||
samplers.c \
|
samplers.c \
|
||||||
|
samplers_array.c \
|
||||||
shadow_sampler.c \
|
shadow_sampler.c \
|
||||||
skinning.c \
|
skinning.c \
|
||||||
texaaline.c \
|
texaaline.c \
|
||||||
@@ -188,7 +189,8 @@ samplers.o: $(UTIL_HEADERS)
|
|||||||
samplers: samplers.o $(UTIL_OBJS)
|
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)
|
samplers_array: samplers_array.o $(UTIL_OBJS)
|
||||||
|
|
||||||
|
|||||||
@@ -211,10 +211,18 @@ InitTextures(void)
|
|||||||
for (y = 0; y < stripeSize; y++) {
|
for (y = 0; y < stripeSize; y++) {
|
||||||
for (x = 0; x < size; x++) {
|
for (x = 0; x < size; x++) {
|
||||||
GLint k = 4 * ((ypos + y) * size + x);
|
GLint k = 4 * ((ypos + y) * size + x);
|
||||||
texImage[k + 0] = intensity;
|
if (x < size / 2) {
|
||||||
texImage[k + 1] = intensity;
|
texImage[k + 0] = intensity;
|
||||||
texImage[k + 2] = 0;
|
texImage[k + 1] = intensity;
|
||||||
texImage[k + 3] = 255;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ Init( void )
|
|||||||
|
|
||||||
if (!glutExtensionSupported("GL_EXT_framebuffer_object")) {
|
if (!glutExtensionSupported("GL_EXT_framebuffer_object")) {
|
||||||
printf("GL_EXT_framebuffer_object not found!\n");
|
printf("GL_EXT_framebuffer_object not found!\n");
|
||||||
/*exit(0);*/
|
exit(0);
|
||||||
}
|
}
|
||||||
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||||
|
|
||||||
|
|||||||
@@ -258,8 +258,26 @@ static void Init( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
glBindTexture(GL_TEXTURE_2D, BORDER_TEXTURE);
|
glBindTexture(GL_TEXTURE_2D, BORDER_TEXTURE);
|
||||||
|
#ifdef TEST_PBO_DLIST
|
||||||
|
/* test fetching teximage from PBO in display list */
|
||||||
|
{
|
||||||
|
GLuint b = 42, l = 10;
|
||||||
|
|
||||||
|
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER, b);
|
||||||
|
glBufferDataARB(GL_PIXEL_UNPACK_BUFFER, sizeof(BorderImage),
|
||||||
|
BorderImage, GL_STREAM_DRAW);
|
||||||
|
|
||||||
|
glNewList(l, GL_COMPILE);
|
||||||
|
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, SIZE+2, SIZE+2, 1,
|
||||||
|
GL_RGBA, GL_UNSIGNED_BYTE, (void *) 0/* BorderImage*/);
|
||||||
|
glEndList();
|
||||||
|
glCallList(l);
|
||||||
|
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER, 0);
|
||||||
|
}
|
||||||
|
#else
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, SIZE+2, SIZE+2, 1,
|
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, SIZE+2, SIZE+2, 1,
|
||||||
GL_RGBA, GL_UNSIGNED_BYTE, (void *) BorderImage);
|
GL_RGBA, GL_UNSIGNED_BYTE, (void *) BorderImage);
|
||||||
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < SIZE; i++) {
|
for (i = 0; i < SIZE; i++) {
|
||||||
for (j = 0; j < SIZE; j++) {
|
for (j = 0; j < SIZE; j++) {
|
||||||
|
|||||||
15
progs/trivial/.gitignore
vendored
15
progs/trivial/.gitignore
vendored
@@ -5,10 +5,17 @@ clear-random
|
|||||||
clear-repeat
|
clear-repeat
|
||||||
clear-scissor
|
clear-scissor
|
||||||
clear-undefined
|
clear-undefined
|
||||||
|
createwin
|
||||||
|
dlist-begin-call-end
|
||||||
dlist-dangling
|
dlist-dangling
|
||||||
dlist-degenerate
|
dlist-degenerate
|
||||||
dlist-edgeflag
|
dlist-edgeflag
|
||||||
dlist-edgeflag-dangling
|
dlist-edgeflag-dangling
|
||||||
|
dlist-flat-tri
|
||||||
|
dlist-mat-tri
|
||||||
|
dlist-recursive-call
|
||||||
|
dlist-tri-flat-tri
|
||||||
|
dlist-tri-mat-tri
|
||||||
draw2arrays
|
draw2arrays
|
||||||
drawarrays
|
drawarrays
|
||||||
drawelements
|
drawelements
|
||||||
@@ -30,6 +37,7 @@ lineloop
|
|||||||
lineloop-clip
|
lineloop-clip
|
||||||
lineloop-elts
|
lineloop-elts
|
||||||
linestrip
|
linestrip
|
||||||
|
linestrip-clip
|
||||||
linestrip-flat-stipple
|
linestrip-flat-stipple
|
||||||
linestrip-stipple
|
linestrip-stipple
|
||||||
linestrip-stipple-wide
|
linestrip-stipple-wide
|
||||||
@@ -70,8 +78,10 @@ quadstrip-cont
|
|||||||
quadstrip-flat
|
quadstrip-flat
|
||||||
readtex.c
|
readtex.c
|
||||||
readtex.h
|
readtex.h
|
||||||
|
readpixels
|
||||||
tri
|
tri
|
||||||
tri-alpha
|
tri-alpha
|
||||||
|
tri-alpha-tex
|
||||||
tri-array-interleaved
|
tri-array-interleaved
|
||||||
tri-blend
|
tri-blend
|
||||||
tri-blend-color
|
tri-blend-color
|
||||||
@@ -79,6 +89,7 @@ tri-blend-max
|
|||||||
tri-blend-min
|
tri-blend-min
|
||||||
tri-blend-revsub
|
tri-blend-revsub
|
||||||
tri-blend-sub
|
tri-blend-sub
|
||||||
|
tri-clear
|
||||||
tri-clip
|
tri-clip
|
||||||
tri-cull
|
tri-cull
|
||||||
tri-cull-both
|
tri-cull-both
|
||||||
@@ -93,6 +104,7 @@ tri-fog
|
|||||||
tri-fp
|
tri-fp
|
||||||
tri-fp-const-imm
|
tri-fp-const-imm
|
||||||
tri-lit
|
tri-lit
|
||||||
|
tri-lit-material
|
||||||
tri-logicop-none
|
tri-logicop-none
|
||||||
tri-logicop-xor
|
tri-logicop-xor
|
||||||
tri-mask-tri
|
tri-mask-tri
|
||||||
@@ -101,6 +113,7 @@ tri-orig
|
|||||||
tri-query
|
tri-query
|
||||||
tri-repeat
|
tri-repeat
|
||||||
tri-scissor-tri
|
tri-scissor-tri
|
||||||
|
tri-square
|
||||||
tri-stencil
|
tri-stencil
|
||||||
tri-stipple
|
tri-stipple
|
||||||
tri-tex
|
tri-tex
|
||||||
@@ -110,6 +123,7 @@ tri-unfilled
|
|||||||
tri-unfilled-clip
|
tri-unfilled-clip
|
||||||
tri-unfilled-edgeflag
|
tri-unfilled-edgeflag
|
||||||
tri-unfilled-fog
|
tri-unfilled-fog
|
||||||
|
tri-unfilled-point
|
||||||
tri-unfilled-smooth
|
tri-unfilled-smooth
|
||||||
tri-unfilled-tri
|
tri-unfilled-tri
|
||||||
tri-unfilled-tri-lit
|
tri-unfilled-tri-lit
|
||||||
@@ -118,6 +132,7 @@ tri-unfilled-userclip-stip
|
|||||||
tri-userclip
|
tri-userclip
|
||||||
tri-viewport
|
tri-viewport
|
||||||
tri-z
|
tri-z
|
||||||
|
tri-z-9
|
||||||
tri-z-eq
|
tri-z-eq
|
||||||
trifan
|
trifan
|
||||||
trifan-flat
|
trifan-flat
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ SOURCES = \
|
|||||||
clear-repeat.c \
|
clear-repeat.c \
|
||||||
clear-random.c \
|
clear-random.c \
|
||||||
clear.c \
|
clear.c \
|
||||||
|
createwin.c \
|
||||||
dlist-dangling.c \
|
dlist-dangling.c \
|
||||||
dlist-flat-tri.c \
|
dlist-flat-tri.c \
|
||||||
dlist-mat-tri.c \
|
dlist-mat-tri.c \
|
||||||
@@ -48,6 +49,7 @@ SOURCES = \
|
|||||||
lineloop-clip.c \
|
lineloop-clip.c \
|
||||||
lineloop-elts.c \
|
lineloop-elts.c \
|
||||||
lineloop.c \
|
lineloop.c \
|
||||||
|
linestrip-clip.c \
|
||||||
linestrip-flat-stipple.c \
|
linestrip-flat-stipple.c \
|
||||||
linestrip-stipple-wide.c \
|
linestrip-stipple-wide.c \
|
||||||
linestrip-stipple.c \
|
linestrip-stipple.c \
|
||||||
@@ -87,7 +89,9 @@ SOURCES = \
|
|||||||
quadstrip-cont.c \
|
quadstrip-cont.c \
|
||||||
quadstrip-flat.c \
|
quadstrip-flat.c \
|
||||||
quadstrip.c \
|
quadstrip.c \
|
||||||
|
readpixels.c \
|
||||||
tri-alpha.c \
|
tri-alpha.c \
|
||||||
|
tri-alpha-tex.c \
|
||||||
tri-array-interleaved.c \
|
tri-array-interleaved.c \
|
||||||
tri-blend-color.c \
|
tri-blend-color.c \
|
||||||
tri-blend-max.c \
|
tri-blend-max.c \
|
||||||
@@ -95,6 +99,7 @@ SOURCES = \
|
|||||||
tri-blend-revsub.c \
|
tri-blend-revsub.c \
|
||||||
tri-blend-sub.c \
|
tri-blend-sub.c \
|
||||||
tri-blend.c \
|
tri-blend.c \
|
||||||
|
tri-clear.c \
|
||||||
tri-clip.c \
|
tri-clip.c \
|
||||||
tri-cull-both.c \
|
tri-cull-both.c \
|
||||||
tri-cull.c \
|
tri-cull.c \
|
||||||
@@ -117,6 +122,7 @@ SOURCES = \
|
|||||||
tri-query.c \
|
tri-query.c \
|
||||||
tri-repeat.c \
|
tri-repeat.c \
|
||||||
tri-scissor-tri.c \
|
tri-scissor-tri.c \
|
||||||
|
tri-square.c \
|
||||||
tri-stencil.c \
|
tri-stencil.c \
|
||||||
tri-stipple.c \
|
tri-stipple.c \
|
||||||
tri-multitex-vbo.c \
|
tri-multitex-vbo.c \
|
||||||
@@ -126,6 +132,7 @@ SOURCES = \
|
|||||||
tri-unfilled-fog.c \
|
tri-unfilled-fog.c \
|
||||||
tri-unfilled-edgeflag.c \
|
tri-unfilled-edgeflag.c \
|
||||||
tri-unfilled-clip.c \
|
tri-unfilled-clip.c \
|
||||||
|
tri-unfilled-point.c \
|
||||||
tri-unfilled-smooth.c \
|
tri-unfilled-smooth.c \
|
||||||
tri-unfilled-tri.c \
|
tri-unfilled-tri.c \
|
||||||
tri-unfilled-tri-lit.c \
|
tri-unfilled-tri-lit.c \
|
||||||
@@ -134,6 +141,7 @@ SOURCES = \
|
|||||||
tri-unfilled.c \
|
tri-unfilled.c \
|
||||||
tri-userclip.c \
|
tri-userclip.c \
|
||||||
tri-viewport.c \
|
tri-viewport.c \
|
||||||
|
tri-z-9.c \
|
||||||
tri-z-eq.c \
|
tri-z-eq.c \
|
||||||
tri-z.c \
|
tri-z.c \
|
||||||
tri.c \
|
tri.c \
|
||||||
|
|||||||
@@ -378,6 +378,9 @@ make_window( Display *dpy, const char *name,
|
|||||||
scrnum = DefaultScreen( dpy );
|
scrnum = DefaultScreen( dpy );
|
||||||
root = RootWindow( dpy, scrnum );
|
root = RootWindow( dpy, scrnum );
|
||||||
|
|
||||||
|
if (visinfo)
|
||||||
|
XFree(visinfo);
|
||||||
|
|
||||||
visinfo = glXChooseVisual( dpy, scrnum, attribs );
|
visinfo = glXChooseVisual( dpy, scrnum, attribs );
|
||||||
if (!visinfo) {
|
if (!visinfo) {
|
||||||
printf("Error: couldn't get an RGB, Double-buffered visual\n");
|
printf("Error: couldn't get an RGB, Double-buffered visual\n");
|
||||||
|
|||||||
@@ -587,6 +587,9 @@ event_loop(Display *dpy, Window win)
|
|||||||
angle += 2.0;
|
angle += 2.0;
|
||||||
|
|
||||||
draw();
|
draw();
|
||||||
|
|
||||||
|
glXSwapBuffers(dpy, win);
|
||||||
|
|
||||||
if ( get_frame_usage != NULL ) {
|
if ( get_frame_usage != NULL ) {
|
||||||
GLfloat temp;
|
GLfloat temp;
|
||||||
|
|
||||||
@@ -594,8 +597,6 @@ event_loop(Display *dpy, Window win)
|
|||||||
frame_usage += temp;
|
frame_usage += temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
glXSwapBuffers(dpy, win);
|
|
||||||
|
|
||||||
/* calc framerate */
|
/* calc framerate */
|
||||||
{
|
{
|
||||||
static int t0 = -1;
|
static int t0 = -1;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ TOP = ../../../..
|
|||||||
include $(TOP)/configs/current
|
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
|
SOURCES = demo.c
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ TOP = ../../..
|
|||||||
include $(TOP)/configs/current
|
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 = \
|
HEADERS = \
|
||||||
eglconfig.h \
|
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.
|
/* 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 )
|
unsigned count )
|
||||||
{
|
{
|
||||||
char *verts = (char *)vertices;
|
char *verts = (char *)vertices;
|
||||||
unsigned i;
|
|
||||||
|
|
||||||
draw->pipeline.verts = verts;
|
draw->pipeline.verts = verts;
|
||||||
draw->pipeline.vertex_stride = stride;
|
draw->pipeline.vertex_stride = stride;
|
||||||
draw->pipeline.vertex_count = vertex_count;
|
draw->pipeline.vertex_count = vertex_count;
|
||||||
|
|
||||||
switch (prim) {
|
pipe_run(draw, prim, vertices, stride, elts, count);
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
draw->pipeline.verts = NULL;
|
draw->pipeline.verts = NULL;
|
||||||
draw->pipeline.vertex_count = 0;
|
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.FullSrcRegisters[i] = tgsi_default_full_src_register();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
full_instruction.Flags = 0x0;
|
||||||
|
|
||||||
return full_instruction;
|
return full_instruction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,9 @@
|
|||||||
|
|
||||||
#define FAST_MATH 1
|
#define FAST_MATH 1
|
||||||
|
|
||||||
|
/** for tgsi_full_instruction::Flags */
|
||||||
|
#define SOA_DEPENDENCY_FLAG 0x1
|
||||||
|
|
||||||
#define TILE_TOP_LEFT 0
|
#define TILE_TOP_LEFT 0
|
||||||
#define TILE_TOP_RIGHT 1
|
#define TILE_TOP_RIGHT 1
|
||||||
#define TILE_BOTTOM_LEFT 2
|
#define TILE_BOTTOM_LEFT 2
|
||||||
@@ -182,7 +185,7 @@ print_temp(const struct tgsi_exec_machine *mach, uint index)
|
|||||||
* MOV t3, t2;
|
* MOV t3, t2;
|
||||||
* The second instruction will have the wrong value for t0 if executed as-is.
|
* 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)
|
tgsi_check_soa_dependencies(const struct tgsi_full_instruction *inst)
|
||||||
{
|
{
|
||||||
uint i, chan;
|
uint i, chan;
|
||||||
@@ -328,20 +331,25 @@ tgsi_exec_machine_bind_shader(
|
|||||||
* sizeof(struct tgsi_full_instruction));
|
* sizeof(struct tgsi_full_instruction));
|
||||||
maxInstructions += 10;
|
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,
|
memcpy(instructions + numInstructions,
|
||||||
&parse.FullToken.FullInstruction,
|
&parse.FullToken.FullInstruction,
|
||||||
sizeof(instructions[0]));
|
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++;
|
numInstructions++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -2018,9 +2026,23 @@ exec_instruction(
|
|||||||
|
|
||||||
case TGSI_OPCODE_MOV:
|
case TGSI_OPCODE_MOV:
|
||||||
case TGSI_OPCODE_SWZ:
|
case TGSI_OPCODE_SWZ:
|
||||||
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index ) {
|
if (inst->Flags & SOA_DEPENDENCY_FLAG) {
|
||||||
FETCH( &r[0], 0, chan_index );
|
/* Do all fetches into temp regs, then do all stores to avoid
|
||||||
STORE( &r[0], 0, chan_index );
|
* 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;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -272,6 +272,10 @@ void
|
|||||||
tgsi_exec_machine_free_data(struct tgsi_exec_machine *mach);
|
tgsi_exec_machine_free_data(struct tgsi_exec_machine *mach);
|
||||||
|
|
||||||
|
|
||||||
|
boolean
|
||||||
|
tgsi_check_soa_dependencies(const struct tgsi_full_instruction *inst);
|
||||||
|
|
||||||
|
|
||||||
static INLINE void
|
static INLINE void
|
||||||
tgsi_set_kill_mask(struct tgsi_exec_machine *mach, unsigned mask)
|
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_instruction_ext_texture InstructionExtTexture;
|
||||||
struct tgsi_full_dst_register FullDstRegisters[TGSI_FULL_MAX_DST_REGISTERS];
|
struct tgsi_full_dst_register FullDstRegisters[TGSI_FULL_MAX_DST_REGISTERS];
|
||||||
struct tgsi_full_src_register FullSrcRegisters[TGSI_FULL_MAX_SRC_REGISTERS];
|
struct tgsi_full_src_register FullSrcRegisters[TGSI_FULL_MAX_SRC_REGISTERS];
|
||||||
|
uint Flags; /**< user-defined usage */
|
||||||
};
|
};
|
||||||
|
|
||||||
union tgsi_full_token
|
union tgsi_full_token
|
||||||
|
|||||||
@@ -1107,6 +1107,15 @@ static int
|
|||||||
emit_instruction(struct gen_context *gen,
|
emit_instruction(struct gen_context *gen,
|
||||||
struct tgsi_full_instruction *inst)
|
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) {
|
switch (inst->Instruction.Opcode) {
|
||||||
case TGSI_OPCODE_MOV:
|
case TGSI_OPCODE_MOV:
|
||||||
case TGSI_OPCODE_SWZ:
|
case TGSI_OPCODE_SWZ:
|
||||||
|
|||||||
@@ -1502,6 +1502,14 @@ emit_instruction(
|
|||||||
if (indirect_temp_reference(inst))
|
if (indirect_temp_reference(inst))
|
||||||
return FALSE;
|
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) {
|
switch (inst->Instruction.Opcode) {
|
||||||
case TGSI_OPCODE_ARL:
|
case TGSI_OPCODE_ARL:
|
||||||
FOR_EACH_DST0_ENABLED_CHANNEL( *inst, chan_index ) {
|
FOR_EACH_DST0_ENABLED_CHANNEL( *inst, chan_index ) {
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
#include "util/u_math.h"
|
#include "util/u_math.h"
|
||||||
#include "util/u_memory.h"
|
#include "util/u_memory.h"
|
||||||
#include "util/u_simple_shaders.h"
|
#include "util/u_simple_shaders.h"
|
||||||
|
#include "util/u_surface.h"
|
||||||
|
|
||||||
#include "cso_cache/cso_context.h"
|
#include "cso_cache/cso_context.h"
|
||||||
|
|
||||||
@@ -61,7 +62,7 @@ struct blit_state
|
|||||||
struct pipe_viewport_state viewport;
|
struct pipe_viewport_state viewport;
|
||||||
|
|
||||||
void *vs;
|
void *vs;
|
||||||
void *fs;
|
void *fs[TGSI_WRITEMASK_XYZW + 1];
|
||||||
|
|
||||||
struct pipe_buffer *vbuf; /**< quad vertices */
|
struct pipe_buffer *vbuf; /**< quad vertices */
|
||||||
unsigned vbuf_slot;
|
unsigned vbuf_slot;
|
||||||
@@ -124,7 +125,7 @@ util_create_blit(struct pipe_context *pipe, struct cso_context *cso)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* fragment shader */
|
/* fragment shader */
|
||||||
ctx->fs = util_make_fragment_tex_shader(pipe);
|
ctx->fs[TGSI_WRITEMASK_XYZW] = util_make_fragment_tex_shader(pipe);
|
||||||
ctx->vbuf = NULL;
|
ctx->vbuf = NULL;
|
||||||
|
|
||||||
/* init vertex data that doesn't change */
|
/* init vertex data that doesn't change */
|
||||||
@@ -145,9 +146,13 @@ void
|
|||||||
util_destroy_blit(struct blit_state *ctx)
|
util_destroy_blit(struct blit_state *ctx)
|
||||||
{
|
{
|
||||||
struct pipe_context *pipe = ctx->pipe;
|
struct pipe_context *pipe = ctx->pipe;
|
||||||
|
unsigned i;
|
||||||
|
|
||||||
pipe->delete_vs_state(pipe, ctx->vs);
|
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);
|
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;
|
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.
|
* Setup vertex data for the textured quad we'll draw.
|
||||||
* Note: y=0=top
|
* Note: y=0=top
|
||||||
@@ -260,20 +268,50 @@ setup_vertex_data_tex(struct blit_state *ctx,
|
|||||||
|
|
||||||
return offset;
|
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.
|
* Copy pixel block from src surface to dst surface.
|
||||||
* Overlapping regions are acceptable.
|
* Overlapping regions are acceptable.
|
||||||
|
* Flipping and stretching are supported.
|
||||||
|
* XXX what about clipping???
|
||||||
* XXX need some control over blitting Z and/or stencil.
|
* XXX need some control over blitting Z and/or stencil.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
util_blit_pixels(struct blit_state *ctx,
|
util_blit_pixels_writemask(struct blit_state *ctx,
|
||||||
struct pipe_surface *src,
|
struct pipe_surface *src,
|
||||||
int srcX0, int srcY0,
|
int srcX0, int srcY0,
|
||||||
int srcX1, int srcY1,
|
int srcX1, int srcY1,
|
||||||
struct pipe_surface *dst,
|
struct pipe_surface *dst,
|
||||||
int dstX0, int dstY0,
|
int dstX0, int dstY0,
|
||||||
int dstX1, int dstY1,
|
int dstX1, int dstY1,
|
||||||
float z, uint filter)
|
float z, uint filter,
|
||||||
|
uint writemask)
|
||||||
{
|
{
|
||||||
struct pipe_context *pipe = ctx->pipe;
|
struct pipe_context *pipe = ctx->pipe;
|
||||||
struct pipe_screen *screen = pipe->screen;
|
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 srcLeft = MIN2(srcX0, srcX1);
|
||||||
const int srcTop = MIN2(srcY0, srcY1);
|
const int srcTop = MIN2(srcY0, srcY1);
|
||||||
unsigned offset;
|
unsigned offset;
|
||||||
|
boolean overlap;
|
||||||
|
|
||||||
assert(filter == PIPE_TEX_MIPFILTER_NEAREST ||
|
assert(filter == PIPE_TEX_MIPFILTER_NEAREST ||
|
||||||
filter == PIPE_TEX_MIPFILTER_LINEAR);
|
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) {
|
if (srcLeft != srcX0) {
|
||||||
/* left-right flip */
|
/* left-right flip */
|
||||||
int tmp = dstX0;
|
int tmp = dstX0;
|
||||||
@@ -303,20 +372,6 @@ util_blit_pixels(struct blit_state *ctx,
|
|||||||
dstY1 = tmp;
|
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,
|
assert(screen->is_format_supported(screen, dst->format, PIPE_TEXTURE_2D,
|
||||||
PIPE_TEXTURE_USAGE_RENDER_TARGET, 0));
|
PIPE_TEXTURE_USAGE_RENDER_TARGET, 0));
|
||||||
|
|
||||||
@@ -376,8 +431,11 @@ util_blit_pixels(struct blit_state *ctx,
|
|||||||
/* texture */
|
/* texture */
|
||||||
cso_set_sampler_textures(ctx->cso, 1, &tex);
|
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 */
|
/* 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);
|
cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
|
||||||
|
|
||||||
/* drawing dest */
|
/* 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
|
/* Release vertex buffer at end of frame to avoid synchronous
|
||||||
* rendering.
|
* rendering.
|
||||||
*/
|
*/
|
||||||
@@ -485,7 +564,7 @@ util_blit_pixels_tex(struct blit_state *ctx,
|
|||||||
cso_set_sampler_textures(ctx->cso, 1, &tex);
|
cso_set_sampler_textures(ctx->cso, 1, &tex);
|
||||||
|
|
||||||
/* shaders */
|
/* 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);
|
cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
|
||||||
|
|
||||||
/* drawing dest */
|
/* drawing dest */
|
||||||
|
|||||||
@@ -60,6 +60,17 @@ util_blit_pixels(struct blit_state *ctx,
|
|||||||
int dstX1, int dstY1,
|
int dstX1, int dstY1,
|
||||||
float z, uint filter);
|
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
|
extern void
|
||||||
util_blit_pixels_tex(struct blit_state *ctx,
|
util_blit_pixels_tex(struct blit_state *ctx,
|
||||||
struct pipe_texture *tex,
|
struct pipe_texture *tex,
|
||||||
|
|||||||
@@ -143,11 +143,9 @@ void _debug_vprintf(const char *format, va_list ap)
|
|||||||
#elif defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT)
|
#elif defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT)
|
||||||
/* TODO */
|
/* TODO */
|
||||||
#else /* !PIPE_SUBSYSTEM_WINDOWS */
|
#else /* !PIPE_SUBSYSTEM_WINDOWS */
|
||||||
#ifdef DEBUG
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
vfprintf(stderr, format, ap);
|
vfprintf(stderr, format, ap);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -921,11 +921,19 @@ static void
|
|||||||
format_to_type_comps(enum pipe_format pformat,
|
format_to_type_comps(enum pipe_format pformat,
|
||||||
enum dtype *datatype, uint *comps)
|
enum dtype *datatype, uint *comps)
|
||||||
{
|
{
|
||||||
|
/* XXX I think this could be implemented in terms of the pf_*() functions */
|
||||||
switch (pformat) {
|
switch (pformat) {
|
||||||
case PIPE_FORMAT_A8R8G8B8_UNORM:
|
case PIPE_FORMAT_A8R8G8B8_UNORM:
|
||||||
case PIPE_FORMAT_X8R8G8B8_UNORM:
|
case PIPE_FORMAT_X8R8G8B8_UNORM:
|
||||||
case PIPE_FORMAT_B8G8R8A8_UNORM:
|
case PIPE_FORMAT_B8G8R8A8_UNORM:
|
||||||
case PIPE_FORMAT_B8G8R8X8_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;
|
*datatype = DTYPE_UBYTE;
|
||||||
*comps = 4;
|
*comps = 4;
|
||||||
return;
|
return;
|
||||||
@@ -942,12 +950,14 @@ format_to_type_comps(enum pipe_format pformat,
|
|||||||
*comps = 3;
|
*comps = 3;
|
||||||
return;
|
return;
|
||||||
case PIPE_FORMAT_L8_UNORM:
|
case PIPE_FORMAT_L8_UNORM:
|
||||||
|
case PIPE_FORMAT_L8_SRGB:
|
||||||
case PIPE_FORMAT_A8_UNORM:
|
case PIPE_FORMAT_A8_UNORM:
|
||||||
case PIPE_FORMAT_I8_UNORM:
|
case PIPE_FORMAT_I8_UNORM:
|
||||||
*datatype = DTYPE_UBYTE;
|
*datatype = DTYPE_UBYTE;
|
||||||
*comps = 1;
|
*comps = 1;
|
||||||
return;
|
return;
|
||||||
case PIPE_FORMAT_A8L8_UNORM:
|
case PIPE_FORMAT_A8L8_UNORM:
|
||||||
|
case PIPE_FORMAT_A8L8_SRGB:
|
||||||
*datatype = DTYPE_UBYTE;
|
*datatype = DTYPE_UBYTE;
|
||||||
*comps = 2;
|
*comps = 2;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -152,11 +152,14 @@ util_make_vertex_passthrough_shader(struct pipe_context *pipe,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Make simple fragment texture shader:
|
* 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;
|
* END;
|
||||||
*/
|
*/
|
||||||
void *
|
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 pipe_shader_state shader;
|
||||||
struct tgsi_token tokens[100];
|
struct tgsi_token tokens[100];
|
||||||
@@ -217,12 +220,43 @@ util_make_fragment_tex_shader(struct pipe_context *pipe)
|
|||||||
header,
|
header,
|
||||||
Elements(tokens) - ti);
|
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 */
|
/* TEX instruction */
|
||||||
inst = tgsi_default_full_instruction();
|
inst = tgsi_default_full_instruction();
|
||||||
inst.Instruction.Opcode = TGSI_OPCODE_TEX;
|
inst.Instruction.Opcode = TGSI_OPCODE_TEX;
|
||||||
inst.Instruction.NumDstRegs = 1;
|
inst.Instruction.NumDstRegs = 1;
|
||||||
inst.FullDstRegisters[0].DstRegister.File = TGSI_FILE_OUTPUT;
|
inst.FullDstRegisters[0].DstRegister.File = TGSI_FILE_OUTPUT;
|
||||||
inst.FullDstRegisters[0].DstRegister.Index = 0;
|
inst.FullDstRegisters[0].DstRegister.Index = 0;
|
||||||
|
inst.FullDstRegisters[0].DstRegister.WriteMask = writemask;
|
||||||
inst.Instruction.NumSrcRegs = 2;
|
inst.Instruction.NumSrcRegs = 2;
|
||||||
inst.InstructionExtTexture.Texture = TGSI_TEXTURE_2D;
|
inst.InstructionExtTexture.Texture = TGSI_TEXTURE_2D;
|
||||||
inst.FullSrcRegisters[0].SrcRegister.File = TGSI_FILE_INPUT;
|
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);
|
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);
|
const uint *semantic_indexes);
|
||||||
|
|
||||||
|
|
||||||
|
extern void *
|
||||||
|
util_make_fragment_tex_shader_writemask(struct pipe_context *pipe,
|
||||||
|
unsigned writemask );
|
||||||
|
|
||||||
extern void *
|
extern void *
|
||||||
util_make_fragment_tex_shader(struct pipe_context *pipe);
|
util_make_fragment_tex_shader(struct pipe_context *pipe);
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,23 @@ struct pipe_texture;
|
|||||||
struct pipe_surface;
|
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
|
extern boolean
|
||||||
util_create_rgba_surface(struct pipe_screen *screen,
|
util_create_rgba_surface(struct pipe_screen *screen,
|
||||||
uint width, uint height,
|
uint width, uint height,
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ a8r8g8b8_put_tile_rgba(unsigned *dst,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*** PIPE_FORMAT_A8R8G8B8_UNORM ***/
|
/*** PIPE_FORMAT_X8R8G8B8_UNORM ***/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
x8r8g8b8_get_tile_rgba(const unsigned *src,
|
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 ***/
|
/*** PIPE_FORMAT_I8_UNORM ***/
|
||||||
|
|
||||||
@@ -946,6 +1124,15 @@ pipe_tile_raw_to_rgba(enum pipe_format format,
|
|||||||
case PIPE_FORMAT_R16G16B16A16_SNORM:
|
case PIPE_FORMAT_R16G16B16A16_SNORM:
|
||||||
r16g16b16a16_get_tile_rgba((short *) src, w, h, dst, dst_stride);
|
r16g16b16a16_get_tile_rgba((short *) src, w, h, dst, dst_stride);
|
||||||
break;
|
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:
|
case PIPE_FORMAT_Z16_UNORM:
|
||||||
z16_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
|
z16_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
|
||||||
break;
|
break;
|
||||||
@@ -1059,6 +1246,15 @@ pipe_put_tile_rgba(struct pipe_transfer *pt,
|
|||||||
case PIPE_FORMAT_R16G16B16A16_SNORM:
|
case PIPE_FORMAT_R16G16B16A16_SNORM:
|
||||||
r16g16b16a16_put_tile_rgba((short *) packed, w, h, p, src_stride);
|
r16g16b16a16_put_tile_rgba((short *) packed, w, h, p, src_stride);
|
||||||
break;
|
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:
|
case PIPE_FORMAT_Z16_UNORM:
|
||||||
/*z16_put_tile_rgba((ushort *) packed, w, h, p, src_stride);*/
|
/*z16_put_tile_rgba((ushort *) packed, w, h, p, src_stride);*/
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -123,21 +123,25 @@ static enum pipe_error
|
|||||||
u_upload_alloc_buffer( struct u_upload_mgr *upload,
|
u_upload_alloc_buffer( struct u_upload_mgr *upload,
|
||||||
unsigned min_size )
|
unsigned min_size )
|
||||||
{
|
{
|
||||||
|
unsigned size;
|
||||||
|
|
||||||
/* Release old buffer, if present:
|
/* Release old buffer, if present:
|
||||||
*/
|
*/
|
||||||
u_upload_flush( upload );
|
u_upload_flush( upload );
|
||||||
|
|
||||||
/* Allocate a new one:
|
/* 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->buffer = pipe_buffer_create( upload->screen,
|
||||||
upload->alignment,
|
upload->alignment,
|
||||||
upload->usage | PIPE_BUFFER_USAGE_CPU_WRITE,
|
upload->usage | PIPE_BUFFER_USAGE_CPU_WRITE,
|
||||||
upload->size );
|
size );
|
||||||
if (upload->buffer == NULL)
|
if (upload->buffer == NULL)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
upload->size = size;
|
||||||
|
|
||||||
upload->offset = 0;
|
upload->offset = 0;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
#include "sp_texture.h"
|
#include "sp_texture.h"
|
||||||
#include "sp_tile_cache.h"
|
#include "sp_tile_cache.h"
|
||||||
#include "sp_screen.h"
|
#include "sp_screen.h"
|
||||||
|
#include "sp_winsys.h"
|
||||||
|
|
||||||
|
|
||||||
/* Simple, maximally packed layout.
|
/* 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_indent(1);
|
||||||
trace_dump_writes("<call no=\'");
|
trace_dump_writes("<call no=\'");
|
||||||
trace_dump_writef("%lu", call_no);
|
trace_dump_writef("%lu", call_no);
|
||||||
trace_dump_writes("\' class =\'");
|
trace_dump_writes("\' class=\'");
|
||||||
trace_dump_escape(klass);
|
trace_dump_escape(klass);
|
||||||
trace_dump_writes("\' method=\'");
|
trace_dump_writes("\' method=\'");
|
||||||
trace_dump_escape(method);
|
trace_dump_escape(method);
|
||||||
|
|||||||
@@ -63,6 +63,13 @@ pipe_buffer_map(struct pipe_screen *screen,
|
|||||||
if(screen->buffer_map_range) {
|
if(screen->buffer_map_range) {
|
||||||
unsigned offset = 0;
|
unsigned offset = 0;
|
||||||
unsigned length = buf->size;
|
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);
|
return screen->buffer_map_range(screen, buf, offset, length, usage);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -743,7 +743,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
|
|||||||
{
|
{
|
||||||
static GLboolean firstTime = GL_TRUE;
|
static GLboolean firstTime = GL_TRUE;
|
||||||
struct pipe_screen *screen;
|
struct pipe_screen *screen;
|
||||||
struct pipe_context *pipe;
|
struct pipe_context *pipe = NULL;
|
||||||
XMesaContext c;
|
XMesaContext c;
|
||||||
GLcontext *mesaCtx;
|
GLcontext *mesaCtx;
|
||||||
uint pf;
|
uint pf;
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ class Main:
|
|||||||
stream = GzipFile(arg, 'rt')
|
stream = GzipFile(arg, 'rt')
|
||||||
elif arg.endswith('.bz2'):
|
elif arg.endswith('.bz2'):
|
||||||
from bz2 import BZ2File
|
from bz2 import BZ2File
|
||||||
stream = BZ2File(arg, 'rt')
|
stream = BZ2File(arg, 'rU')
|
||||||
else:
|
else:
|
||||||
stream = open(arg, 'rt')
|
stream = open(arg, 'rt')
|
||||||
self.process_arg(stream, options)
|
self.process_arg(stream, options)
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ void xlib_brw_buffer_subdata_typed( struct pipe_winsys *pws,
|
|||||||
unsigned data_type )
|
unsigned data_type )
|
||||||
{
|
{
|
||||||
unsigned aub_type = DW_GENERAL_STATE;
|
unsigned aub_type = DW_GENERAL_STATE;
|
||||||
unsigned aub_sub_type;
|
unsigned aub_sub_type = 0;
|
||||||
|
|
||||||
switch (data_type) {
|
switch (data_type) {
|
||||||
case BRW_CC_VP:
|
case BRW_CC_VP:
|
||||||
|
|||||||
@@ -303,6 +303,7 @@ xm_flush_frontbuffer(struct pipe_winsys *pws,
|
|||||||
*/
|
*/
|
||||||
XMesaContext xmctx = (XMesaContext) context_private;
|
XMesaContext xmctx = (XMesaContext) context_private;
|
||||||
xlib_softpipe_display_surface(xmctx->xm_buffer, surf);
|
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->configs = driConvertConfigs(psc->core, psc->configs, driver_configs);
|
||||||
psc->visuals = driConvertConfigs(psc->core, psc->visuals, driver_configs);
|
psc->visuals = driConvertConfigs(psc->core, psc->visuals, driver_configs);
|
||||||
|
|
||||||
|
psc->driver_configs = driver_configs;
|
||||||
|
|
||||||
psp->destroyScreen = dri2DestroyScreen;
|
psp->destroyScreen = dri2DestroyScreen;
|
||||||
psp->createContext = dri2CreateContext;
|
psp->createContext = dri2CreateContext;
|
||||||
psp->createDrawable = dri2CreateDrawable;
|
psp->createDrawable = dri2CreateDrawable;
|
||||||
|
|||||||
@@ -418,6 +418,8 @@ CallCreateNewScreen(Display *dpy, int scrn, __GLXscreenConfigs *psc,
|
|||||||
psc->configs = driConvertConfigs(psc->core, psc->configs, driver_configs);
|
psc->configs = driConvertConfigs(psc->core, psc->configs, driver_configs);
|
||||||
psc->visuals = driConvertConfigs(psc->core, psc->visuals, 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
|
/* 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
|
* 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.
|
* 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->configs = driConvertConfigs(psc->core, psc->configs, driver_configs);
|
||||||
psc->visuals = driConvertConfigs(psc->core, psc->visuals, driver_configs);
|
psc->visuals = driConvertConfigs(psc->core, psc->visuals, driver_configs);
|
||||||
|
|
||||||
free(driver_configs);
|
psc->driver_configs = driver_configs;
|
||||||
|
|
||||||
psp->destroyScreen = driDestroyScreen;
|
psp->destroyScreen = driDestroyScreen;
|
||||||
psp->createContext = driCreateContext;
|
psp->createContext = driCreateContext;
|
||||||
|
|||||||
@@ -501,6 +501,8 @@ struct __GLXscreenConfigsRec {
|
|||||||
|
|
||||||
__GLXDRIscreen *driScreen;
|
__GLXDRIscreen *driScreen;
|
||||||
|
|
||||||
|
const __DRIconfig** driver_configs;
|
||||||
|
|
||||||
#ifdef __DRI_COPY_SUB_BUFFER
|
#ifdef __DRI_COPY_SUB_BUFFER
|
||||||
const __DRIcopySubBufferExtension *driCopySubBuffer;
|
const __DRIcopySubBufferExtension *driCopySubBuffer;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -845,6 +845,34 @@ PUBLIC GLXPixmap glXCreateGLXPixmap(Display *dpy, XVisualInfo *vis,
|
|||||||
req->glxpixmap = xid = XAllocID(dpy);
|
req->glxpixmap = xid = XAllocID(dpy);
|
||||||
UnlockDisplay(dpy);
|
UnlockDisplay(dpy);
|
||||||
SyncHandle();
|
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;
|
return xid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -149,6 +149,12 @@ FreeScreenConfigs(__GLXdisplayPrivate * priv)
|
|||||||
Xfree((char *) psc->serverGLXexts);
|
Xfree((char *) psc->serverGLXexts);
|
||||||
|
|
||||||
#ifdef GLX_DIRECT_RENDERING
|
#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) {
|
if (psc->driScreen) {
|
||||||
psc->driScreen->destroyScreen(psc);
|
psc->driScreen->destroyScreen(psc);
|
||||||
__glxHashDestroy(psc->drawHash);
|
__glxHashDestroy(psc->drawHash);
|
||||||
|
|||||||
@@ -763,7 +763,7 @@ dri2CreateNewScreen(int scrn, int fd,
|
|||||||
if (driDriverAPI.InitScreen2 == NULL)
|
if (driDriverAPI.InitScreen2 == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
psp = _mesa_malloc(sizeof(*psp));
|
psp = _mesa_calloc(sizeof(*psp));
|
||||||
if (!psp)
|
if (!psp)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|||||||
@@ -197,6 +197,11 @@ _intel_batchbuffer_flush(struct intel_batchbuffer *batch, const char *file,
|
|||||||
GLuint used = batch->ptr - batch->map;
|
GLuint used = batch->ptr - batch->map;
|
||||||
GLboolean was_locked = intel->locked;
|
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) {
|
if (used == 0) {
|
||||||
batch->cliprect_mode = IGNORE_CLIPRECTS;
|
batch->cliprect_mode = IGNORE_CLIPRECTS;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ intel_flush(GLcontext *ctx, GLboolean needs_mi_flush)
|
|||||||
* each of N places that do rendering. This has worse performances,
|
* each of N places that do rendering. This has worse performances,
|
||||||
* but it is much easier to get correct.
|
* 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;
|
intel->front_buffer_dirty = GL_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -521,7 +521,27 @@ intelFlush(GLcontext * ctx)
|
|||||||
static void
|
static void
|
||||||
intel_glFlush(GLcontext *ctx)
|
intel_glFlush(GLcontext *ctx)
|
||||||
{
|
{
|
||||||
|
struct intel_context *intel = intel_context(ctx);
|
||||||
|
|
||||||
intel_flush(ctx, GL_TRUE);
|
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
|
void
|
||||||
@@ -787,6 +807,8 @@ intelDestroyContext(__DRIcontextPrivate * driContextPriv)
|
|||||||
intel->prim.vb = NULL;
|
intel->prim.vb = NULL;
|
||||||
dri_bo_unreference(intel->prim.vb_bo);
|
dri_bo_unreference(intel->prim.vb_bo);
|
||||||
intel->prim.vb_bo = NULL;
|
intel->prim.vb_bo = NULL;
|
||||||
|
dri_bo_unreference(intel->first_post_swapbuffers_batch);
|
||||||
|
intel->first_post_swapbuffers_batch = NULL;
|
||||||
|
|
||||||
if (release_texture_heaps) {
|
if (release_texture_heaps) {
|
||||||
/* This share group is about to go away, free our private
|
/* This share group is about to go away, free our private
|
||||||
@@ -804,6 +826,9 @@ intelDestroyContext(__DRIcontextPrivate * driContextPriv)
|
|||||||
|
|
||||||
/* free the Mesa context */
|
/* free the Mesa context */
|
||||||
_mesa_free_context_data(&intel->ctx);
|
_mesa_free_context_data(&intel->ctx);
|
||||||
|
|
||||||
|
FREE(intel);
|
||||||
|
driContextPriv->driverPrivate = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -191,6 +191,7 @@ struct intel_context
|
|||||||
GLboolean ttm;
|
GLboolean ttm;
|
||||||
|
|
||||||
struct intel_batchbuffer *batch;
|
struct intel_batchbuffer *batch;
|
||||||
|
drm_intel_bo *first_post_swapbuffers_batch;
|
||||||
GLboolean no_batch_wrap;
|
GLboolean no_batch_wrap;
|
||||||
unsigned batch_id;
|
unsigned batch_id;
|
||||||
|
|
||||||
|
|||||||
@@ -305,7 +305,7 @@ intelDestroyScreen(__DRIscreenPrivate * sPriv)
|
|||||||
|
|
||||||
dri_bufmgr_destroy(intelScreen->bufmgr);
|
dri_bufmgr_destroy(intelScreen->bufmgr);
|
||||||
intelUnmapScreenRegions(intelScreen);
|
intelUnmapScreenRegions(intelScreen);
|
||||||
driDestroyOptionCache(&intelScreen->optionCache);
|
driDestroyOptionInfo(&intelScreen->optionCache);
|
||||||
|
|
||||||
FREE(intelScreen);
|
FREE(intelScreen);
|
||||||
sPriv->private = NULL;
|
sPriv->private = NULL;
|
||||||
@@ -617,10 +617,10 @@ intel_init_bufmgr(intelScreenPrivate *intelScreen)
|
|||||||
/* Otherwise, use the classic buffer manager. */
|
/* Otherwise, use the classic buffer manager. */
|
||||||
if (intelScreen->bufmgr == NULL) {
|
if (intelScreen->bufmgr == NULL) {
|
||||||
if (gem_disable) {
|
if (gem_disable) {
|
||||||
fprintf(stderr, "GEM disabled. Using classic.\n");
|
_mesa_warning(NULL, "GEM disabled. Using classic.");
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Failed to initialize GEM. "
|
_mesa_warning(NULL,
|
||||||
"Falling back to classic.\n");
|
"Failed to initialize GEM. Falling back to classic.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intelScreen->tex.size == 0) {
|
if (intelScreen->tex.size == 0) {
|
||||||
|
|||||||
@@ -902,7 +902,6 @@ EXPORTS
|
|||||||
_mesa_generate_mipmap
|
_mesa_generate_mipmap
|
||||||
_mesa_get_compressed_teximage
|
_mesa_get_compressed_teximage
|
||||||
_mesa_get_current_context
|
_mesa_get_current_context
|
||||||
_mesa_get_program_register
|
|
||||||
_mesa_get_teximage
|
_mesa_get_teximage
|
||||||
_mesa_init_driver_functions
|
_mesa_init_driver_functions
|
||||||
_mesa_init_glsl_driver_functions
|
_mesa_init_glsl_driver_functions
|
||||||
|
|||||||
@@ -110,10 +110,8 @@ extern "C" {
|
|||||||
#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP)
|
#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP)
|
||||||
# define __WIN32__
|
# define __WIN32__
|
||||||
# define finite _finite
|
# define finite _finite
|
||||||
#endif
|
#elif defined(__WATCOMC__)
|
||||||
#if defined(__WATCOMC__)
|
|
||||||
# define finite _finite
|
# define finite _finite
|
||||||
# pragma disable_message(201) /* Disable unreachable code warnings */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -135,6 +133,10 @@ extern "C" {
|
|||||||
# endif
|
# endif
|
||||||
# endif
|
# 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.
|
* 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 */
|
/** 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. */
|
/** Maxmimum size for CVA. May be overridden by the drivers. */
|
||||||
#define MAX_ARRAY_LOCK_SIZE 3000
|
#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.
|
* 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 *
|
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,
|
GLenum format, GLenum type, const GLvoid * pixels,
|
||||||
const struct gl_pixelstore_attrib *unpack)
|
const struct gl_pixelstore_attrib *unpack)
|
||||||
{
|
{
|
||||||
if (unpack->BufferObj->Name == 0) {
|
if (unpack->BufferObj->Name == 0) {
|
||||||
/* no PBO */
|
/* no PBO */
|
||||||
return _mesa_unpack_image(dimensions, width, height, depth, format,
|
GLvoid *image = _mesa_unpack_image(dimensions, width, height, depth,
|
||||||
type, pixels, unpack);
|
format, type, pixels, unpack);
|
||||||
|
if (pixels && !image) {
|
||||||
|
_mesa_error(ctx, GL_OUT_OF_MEMORY, "display list construction");
|
||||||
|
}
|
||||||
|
return image;
|
||||||
}
|
}
|
||||||
else
|
else if (_mesa_validate_pbo_access(dimensions, unpack, width, height, depth,
|
||||||
if (_mesa_validate_pbo_access
|
format, type, pixels)) {
|
||||||
(dimensions, unpack, width, height, depth, format, type, pixels)) {
|
const GLubyte *map, *src;
|
||||||
const GLubyte *src = ADD_POINTERS(unpack->BufferObj->Data, pixels);
|
GLvoid *image;
|
||||||
return _mesa_unpack_image(dimensions, width, height, depth, format,
|
|
||||||
type, src, unpack);
|
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! */
|
/* bad access! */
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -855,7 +879,6 @@ save_Bitmap(GLsizei width, GLsizei height,
|
|||||||
GLfloat xmove, GLfloat ymove, const GLubyte * pixels)
|
GLfloat xmove, GLfloat ymove, const GLubyte * pixels)
|
||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
GLvoid *image = _mesa_unpack_bitmap(width, height, pixels, &ctx->Unpack);
|
|
||||||
Node *n;
|
Node *n;
|
||||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_BITMAP, 7);
|
n = ALLOC_INSTRUCTION(ctx, OPCODE_BITMAP, 7);
|
||||||
@@ -866,10 +889,7 @@ save_Bitmap(GLsizei width, GLsizei height,
|
|||||||
n[4].f = yorig;
|
n[4].f = yorig;
|
||||||
n[5].f = xmove;
|
n[5].f = xmove;
|
||||||
n[6].f = ymove;
|
n[6].f = ymove;
|
||||||
n[7].data = image;
|
n[7].data = _mesa_unpack_bitmap(width, height, pixels, &ctx->Unpack);
|
||||||
}
|
|
||||||
else if (image) {
|
|
||||||
_mesa_free(image);
|
|
||||||
}
|
}
|
||||||
if (ctx->ExecuteFlag) {
|
if (ctx->ExecuteFlag) {
|
||||||
CALL_Bitmap(ctx->Exec, (width, height,
|
CALL_Bitmap(ctx->Exec, (width, height,
|
||||||
@@ -996,7 +1016,7 @@ _mesa_save_CallList(GLuint list)
|
|||||||
|
|
||||||
|
|
||||||
void GLAPIENTRY
|
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);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
GLint i;
|
GLint i;
|
||||||
@@ -1021,7 +1041,7 @@ _mesa_save_CallLists(GLsizei n, GLenum type, const GLvoid * lists)
|
|||||||
typeErrorFlag = GL_TRUE;
|
typeErrorFlag = GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < num; i++) {
|
||||||
GLint list = translate_id(i, type, lists);
|
GLint list = translate_id(i, type, lists);
|
||||||
Node *n = ALLOC_INSTRUCTION(ctx, OPCODE_CALL_LIST_OFFSET, 2);
|
Node *n = ALLOC_INSTRUCTION(ctx, OPCODE_CALL_LIST_OFFSET, 2);
|
||||||
if (n) {
|
if (n) {
|
||||||
@@ -1036,7 +1056,7 @@ _mesa_save_CallLists(GLsizei n, GLenum type, const GLvoid * lists)
|
|||||||
invalidate_saved_current_state( ctx );
|
invalidate_saved_current_state( ctx );
|
||||||
|
|
||||||
if (ctx->ExecuteFlag) {
|
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));
|
format, type, table));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
GLvoid *image = unpack_image(1, width, 1, 1, format, type, table,
|
|
||||||
&ctx->Unpack);
|
|
||||||
Node *n;
|
Node *n;
|
||||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_TABLE, 6);
|
n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_TABLE, 6);
|
||||||
@@ -1225,10 +1243,8 @@ save_ColorTable(GLenum target, GLenum internalFormat,
|
|||||||
n[3].i = width;
|
n[3].i = width;
|
||||||
n[4].e = format;
|
n[4].e = format;
|
||||||
n[5].e = type;
|
n[5].e = type;
|
||||||
n[6].data = image;
|
n[6].data = unpack_image(ctx, 1, width, 1, 1, format, type, table,
|
||||||
}
|
&ctx->Unpack);
|
||||||
else if (image) {
|
|
||||||
_mesa_free(image);
|
|
||||||
}
|
}
|
||||||
if (ctx->ExecuteFlag) {
|
if (ctx->ExecuteFlag) {
|
||||||
CALL_ColorTable(ctx->Exec, (target, internalFormat, width,
|
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)
|
GLenum format, GLenum type, const GLvoid * table)
|
||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
GLvoid *image = unpack_image(1, count, 1, 1, format, type, table,
|
|
||||||
&ctx->Unpack);
|
|
||||||
Node *n;
|
Node *n;
|
||||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_SUB_TABLE, 6);
|
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[3].i = count;
|
||||||
n[4].e = format;
|
n[4].e = format;
|
||||||
n[5].e = type;
|
n[5].e = type;
|
||||||
n[6].data = image;
|
n[6].data = unpack_image(ctx, 1, count, 1, 1, format, type, table,
|
||||||
}
|
&ctx->Unpack);
|
||||||
else if (image) {
|
|
||||||
_mesa_free(image);
|
|
||||||
}
|
}
|
||||||
if (ctx->ExecuteFlag) {
|
if (ctx->ExecuteFlag) {
|
||||||
CALL_ColorSubTable(ctx->Exec,
|
CALL_ColorSubTable(ctx->Exec,
|
||||||
@@ -1376,10 +1388,10 @@ save_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width,
|
|||||||
GLenum format, GLenum type, const GLvoid * filter)
|
GLenum format, GLenum type, const GLvoid * filter)
|
||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
GLvoid *image = unpack_image(1, width, 1, 1, format, type, filter,
|
|
||||||
&ctx->Unpack);
|
|
||||||
Node *n;
|
Node *n;
|
||||||
|
|
||||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
|
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_FILTER_1D, 6);
|
n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_FILTER_1D, 6);
|
||||||
if (n) {
|
if (n) {
|
||||||
n[1].e = target;
|
n[1].e = target;
|
||||||
@@ -1387,10 +1399,8 @@ save_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width,
|
|||||||
n[3].i = width;
|
n[3].i = width;
|
||||||
n[4].e = format;
|
n[4].e = format;
|
||||||
n[5].e = type;
|
n[5].e = type;
|
||||||
n[6].data = image;
|
n[6].data = unpack_image(ctx, 1, width, 1, 1, format, type, filter,
|
||||||
}
|
&ctx->Unpack);
|
||||||
else if (image) {
|
|
||||||
_mesa_free(image);
|
|
||||||
}
|
}
|
||||||
if (ctx->ExecuteFlag) {
|
if (ctx->ExecuteFlag) {
|
||||||
CALL_ConvolutionFilter1D(ctx->Exec, (target, internalFormat, width,
|
CALL_ConvolutionFilter1D(ctx->Exec, (target, internalFormat, width,
|
||||||
@@ -1405,10 +1415,10 @@ save_ConvolutionFilter2D(GLenum target, GLenum internalFormat,
|
|||||||
GLenum type, const GLvoid * filter)
|
GLenum type, const GLvoid * filter)
|
||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
GLvoid *image = unpack_image(2, width, height, 1, format, type, filter,
|
|
||||||
&ctx->Unpack);
|
|
||||||
Node *n;
|
Node *n;
|
||||||
|
|
||||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
|
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_FILTER_2D, 7);
|
n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_FILTER_2D, 7);
|
||||||
if (n) {
|
if (n) {
|
||||||
n[1].e = target;
|
n[1].e = target;
|
||||||
@@ -1417,10 +1427,8 @@ save_ConvolutionFilter2D(GLenum target, GLenum internalFormat,
|
|||||||
n[4].i = height;
|
n[4].i = height;
|
||||||
n[5].e = format;
|
n[5].e = format;
|
||||||
n[6].e = type;
|
n[6].e = type;
|
||||||
n[7].data = image;
|
n[7].data = unpack_image(ctx, 2, width, height, 1, format, type, filter,
|
||||||
}
|
&ctx->Unpack);
|
||||||
else if (image) {
|
|
||||||
_mesa_free(image);
|
|
||||||
}
|
}
|
||||||
if (ctx->ExecuteFlag) {
|
if (ctx->ExecuteFlag) {
|
||||||
CALL_ConvolutionFilter2D(ctx->Exec,
|
CALL_ConvolutionFilter2D(ctx->Exec,
|
||||||
@@ -1775,20 +1783,18 @@ save_DrawPixels(GLsizei width, GLsizei height,
|
|||||||
GLenum format, GLenum type, const GLvoid * pixels)
|
GLenum format, GLenum type, const GLvoid * pixels)
|
||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
GLvoid *image = unpack_image(2, width, height, 1, format, type,
|
|
||||||
pixels, &ctx->Unpack);
|
|
||||||
Node *n;
|
Node *n;
|
||||||
|
|
||||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
|
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_DRAW_PIXELS, 5);
|
n = ALLOC_INSTRUCTION(ctx, OPCODE_DRAW_PIXELS, 5);
|
||||||
if (n) {
|
if (n) {
|
||||||
n[1].i = width;
|
n[1].i = width;
|
||||||
n[2].i = height;
|
n[2].i = height;
|
||||||
n[3].e = format;
|
n[3].e = format;
|
||||||
n[4].e = type;
|
n[4].e = type;
|
||||||
n[5].data = image;
|
n[5].data = unpack_image(ctx, 2, width, height, 1, format, type,
|
||||||
}
|
pixels, &ctx->Unpack);
|
||||||
else if (image) {
|
|
||||||
_mesa_free(image);
|
|
||||||
}
|
}
|
||||||
if (ctx->ExecuteFlag) {
|
if (ctx->ExecuteFlag) {
|
||||||
CALL_DrawPixels(ctx->Exec, (width, height, format, type, pixels));
|
CALL_DrawPixels(ctx->Exec, (width, height, format, type, pixels));
|
||||||
@@ -1877,7 +1883,10 @@ save_Fogfv(GLenum pname, const GLfloat *params)
|
|||||||
static void GLAPIENTRY
|
static void GLAPIENTRY
|
||||||
save_Fogf(GLenum pname, GLfloat param)
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
/* Error will be caught later in gl_Fogfv */
|
/* Error will be caught later in gl_Fogfv */
|
||||||
;
|
ASSIGN_4V(p, 0.0F, 0.0F, 0.0F, 0.0F);
|
||||||
}
|
}
|
||||||
save_Fogfv(pname, p);
|
save_Fogfv(pname, p);
|
||||||
}
|
}
|
||||||
@@ -1910,7 +1919,10 @@ save_Fogiv(GLenum pname, const GLint *params)
|
|||||||
static void GLAPIENTRY
|
static void GLAPIENTRY
|
||||||
save_Fogi(GLenum pname, GLint param)
|
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
|
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
|
static void GLAPIENTRY
|
||||||
save_Lighti(GLenum light, GLenum pname, GLint param)
|
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
|
static void GLAPIENTRY
|
||||||
save_LightModelf(GLenum pname, GLfloat param)
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
/* Error will be caught later in gl_LightModelfv */
|
/* Error will be caught later in gl_LightModelfv */
|
||||||
;
|
ASSIGN_4V(fparam, 0.0F, 0.0F, 0.0F, 0.0F);
|
||||||
}
|
}
|
||||||
save_LightModelfv(pname, fparam);
|
save_LightModelfv(pname, fparam);
|
||||||
}
|
}
|
||||||
@@ -2180,7 +2201,10 @@ save_LightModeliv(GLenum pname, const GLint *params)
|
|||||||
static void GLAPIENTRY
|
static void GLAPIENTRY
|
||||||
save_LightModeli(GLenum pname, GLint param)
|
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
|
static void GLAPIENTRY
|
||||||
save_PointParameterfEXT(GLenum pname, GLfloat param)
|
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
|
static void GLAPIENTRY
|
||||||
save_PointParameteriNV(GLenum pname, GLint param)
|
save_PointParameteriNV(GLenum pname, GLint param)
|
||||||
{
|
{
|
||||||
GLfloat p = (GLfloat) param;
|
GLfloat parray[3];
|
||||||
save_PointParameterfvEXT(pname, &p);
|
parray[0] = (GLfloat) param;
|
||||||
|
parray[1] = parray[2] = 0.0F;
|
||||||
|
save_PointParameterfvEXT(pname, parray);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GLAPIENTRY
|
static void GLAPIENTRY
|
||||||
save_PointParameterivNV(GLenum pname, const GLint * param)
|
save_PointParameterivNV(GLenum pname, const GLint * param)
|
||||||
{
|
{
|
||||||
GLfloat p = (GLfloat) param[0];
|
GLfloat parray[3];
|
||||||
save_PointParameterfvEXT(pname, &p);
|
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)
|
save_PolygonStipple(const GLubyte * pattern)
|
||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
GLvoid *image = unpack_image(2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
|
|
||||||
pattern, &ctx->Unpack);
|
|
||||||
Node *n;
|
Node *n;
|
||||||
|
|
||||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
|
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_POLYGON_STIPPLE, 1);
|
n = ALLOC_INSTRUCTION(ctx, OPCODE_POLYGON_STIPPLE, 1);
|
||||||
if (n) {
|
if (n) {
|
||||||
n[1].data = image;
|
n[1].data = unpack_image(ctx, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
|
||||||
}
|
pattern, &ctx->Unpack);
|
||||||
else if (image) {
|
|
||||||
_mesa_free(image);
|
|
||||||
}
|
}
|
||||||
if (ctx->ExecuteFlag) {
|
if (ctx->ExecuteFlag) {
|
||||||
CALL_PolygonStipple(ctx->Exec, ((GLubyte *) pattern));
|
CALL_PolygonStipple(ctx->Exec, ((GLubyte *) pattern));
|
||||||
@@ -3383,7 +3412,10 @@ save_TexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
|
|||||||
static void GLAPIENTRY
|
static void GLAPIENTRY
|
||||||
save_TexEnvf(GLenum target, GLenum pname, GLfloat param)
|
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
|
static void GLAPIENTRY
|
||||||
save_TexGend(GLenum coord, GLenum pname, GLdouble param)
|
save_TexGend(GLenum coord, GLenum pname, GLdouble param)
|
||||||
{
|
{
|
||||||
GLfloat p = (GLfloat) param;
|
GLfloat parray[4];
|
||||||
save_TexGenfv(coord, pname, &p);
|
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
|
static void GLAPIENTRY
|
||||||
save_TexGenf(GLenum coord, GLenum pname, GLfloat param)
|
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
|
static void GLAPIENTRY
|
||||||
save_TexGeni(GLenum coord, GLenum pname, GLint param)
|
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
|
static void GLAPIENTRY
|
||||||
save_TexParameterf(GLenum target, GLenum pname, GLfloat param)
|
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));
|
border, format, type, pixels));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
GLvoid *image = unpack_image(1, width, 1, 1, format, type,
|
|
||||||
pixels, &ctx->Unpack);
|
|
||||||
Node *n;
|
Node *n;
|
||||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_IMAGE1D, 8);
|
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_IMAGE1D, 8);
|
||||||
@@ -3556,10 +3597,8 @@ save_TexImage1D(GLenum target,
|
|||||||
n[5].i = border;
|
n[5].i = border;
|
||||||
n[6].e = format;
|
n[6].e = format;
|
||||||
n[7].e = type;
|
n[7].e = type;
|
||||||
n[8].data = image;
|
n[8].data = unpack_image(ctx, 1, width, 1, 1, format, type,
|
||||||
}
|
pixels, &ctx->Unpack);
|
||||||
else if (image) {
|
|
||||||
_mesa_free(image);
|
|
||||||
}
|
}
|
||||||
if (ctx->ExecuteFlag) {
|
if (ctx->ExecuteFlag) {
|
||||||
CALL_TexImage1D(ctx->Exec, (target, level, components, width,
|
CALL_TexImage1D(ctx->Exec, (target, level, components, width,
|
||||||
@@ -3582,8 +3621,6 @@ save_TexImage2D(GLenum target,
|
|||||||
height, border, format, type, pixels));
|
height, border, format, type, pixels));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
GLvoid *image = unpack_image(2, width, height, 1, format, type,
|
|
||||||
pixels, &ctx->Unpack);
|
|
||||||
Node *n;
|
Node *n;
|
||||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_IMAGE2D, 9);
|
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_IMAGE2D, 9);
|
||||||
@@ -3596,10 +3633,8 @@ save_TexImage2D(GLenum target,
|
|||||||
n[6].i = border;
|
n[6].i = border;
|
||||||
n[7].e = format;
|
n[7].e = format;
|
||||||
n[8].e = type;
|
n[8].e = type;
|
||||||
n[9].data = image;
|
n[9].data = unpack_image(ctx, 2, width, height, 1, format, type,
|
||||||
}
|
pixels, &ctx->Unpack);
|
||||||
else if (image) {
|
|
||||||
_mesa_free(image);
|
|
||||||
}
|
}
|
||||||
if (ctx->ExecuteFlag) {
|
if (ctx->ExecuteFlag) {
|
||||||
CALL_TexImage2D(ctx->Exec, (target, level, components, width,
|
CALL_TexImage2D(ctx->Exec, (target, level, components, width,
|
||||||
@@ -3625,8 +3660,6 @@ save_TexImage3D(GLenum target,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Node *n;
|
Node *n;
|
||||||
GLvoid *image = unpack_image(3, width, height, depth, format, type,
|
|
||||||
pixels, &ctx->Unpack);
|
|
||||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_IMAGE3D, 10);
|
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_IMAGE3D, 10);
|
||||||
if (n) {
|
if (n) {
|
||||||
@@ -3639,10 +3672,8 @@ save_TexImage3D(GLenum target,
|
|||||||
n[7].i = border;
|
n[7].i = border;
|
||||||
n[8].e = format;
|
n[8].e = format;
|
||||||
n[9].e = type;
|
n[9].e = type;
|
||||||
n[10].data = image;
|
n[10].data = unpack_image(ctx, 3, width, height, depth, format, type,
|
||||||
}
|
pixels, &ctx->Unpack);
|
||||||
else if (image) {
|
|
||||||
_mesa_free(image);
|
|
||||||
}
|
}
|
||||||
if (ctx->ExecuteFlag) {
|
if (ctx->ExecuteFlag) {
|
||||||
CALL_TexImage3D(ctx->Exec, (target, level, internalFormat, width,
|
CALL_TexImage3D(ctx->Exec, (target, level, internalFormat, width,
|
||||||
@@ -3660,9 +3691,9 @@ save_TexSubImage1D(GLenum target, GLint level, GLint xoffset,
|
|||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
Node *n;
|
Node *n;
|
||||||
GLvoid *image = unpack_image(1, width, 1, 1, format, type,
|
|
||||||
pixels, &ctx->Unpack);
|
|
||||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
|
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_SUB_IMAGE1D, 7);
|
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_SUB_IMAGE1D, 7);
|
||||||
if (n) {
|
if (n) {
|
||||||
n[1].e = target;
|
n[1].e = target;
|
||||||
@@ -3671,10 +3702,8 @@ save_TexSubImage1D(GLenum target, GLint level, GLint xoffset,
|
|||||||
n[4].i = (GLint) width;
|
n[4].i = (GLint) width;
|
||||||
n[5].e = format;
|
n[5].e = format;
|
||||||
n[6].e = type;
|
n[6].e = type;
|
||||||
n[7].data = image;
|
n[7].data = unpack_image(ctx, 1, width, 1, 1, format, type,
|
||||||
}
|
pixels, &ctx->Unpack);
|
||||||
else if (image) {
|
|
||||||
_mesa_free(image);
|
|
||||||
}
|
}
|
||||||
if (ctx->ExecuteFlag) {
|
if (ctx->ExecuteFlag) {
|
||||||
CALL_TexSubImage1D(ctx->Exec, (target, level, xoffset, width,
|
CALL_TexSubImage1D(ctx->Exec, (target, level, xoffset, width,
|
||||||
@@ -3691,9 +3720,9 @@ save_TexSubImage2D(GLenum target, GLint level,
|
|||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
Node *n;
|
Node *n;
|
||||||
GLvoid *image = unpack_image(2, width, height, 1, format, type,
|
|
||||||
pixels, &ctx->Unpack);
|
|
||||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
|
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_SUB_IMAGE2D, 9);
|
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_SUB_IMAGE2D, 9);
|
||||||
if (n) {
|
if (n) {
|
||||||
n[1].e = target;
|
n[1].e = target;
|
||||||
@@ -3704,10 +3733,8 @@ save_TexSubImage2D(GLenum target, GLint level,
|
|||||||
n[6].i = (GLint) height;
|
n[6].i = (GLint) height;
|
||||||
n[7].e = format;
|
n[7].e = format;
|
||||||
n[8].e = type;
|
n[8].e = type;
|
||||||
n[9].data = image;
|
n[9].data = unpack_image(ctx, 2, width, height, 1, format, type,
|
||||||
}
|
pixels, &ctx->Unpack);
|
||||||
else if (image) {
|
|
||||||
_mesa_free(image);
|
|
||||||
}
|
}
|
||||||
if (ctx->ExecuteFlag) {
|
if (ctx->ExecuteFlag) {
|
||||||
CALL_TexSubImage2D(ctx->Exec, (target, level, xoffset, yoffset,
|
CALL_TexSubImage2D(ctx->Exec, (target, level, xoffset, yoffset,
|
||||||
@@ -3724,9 +3751,9 @@ save_TexSubImage3D(GLenum target, GLint level,
|
|||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
Node *n;
|
Node *n;
|
||||||
GLvoid *image = unpack_image(3, width, height, depth, format, type,
|
|
||||||
pixels, &ctx->Unpack);
|
|
||||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
|
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_SUB_IMAGE3D, 11);
|
n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_SUB_IMAGE3D, 11);
|
||||||
if (n) {
|
if (n) {
|
||||||
n[1].e = target;
|
n[1].e = target;
|
||||||
@@ -3739,10 +3766,8 @@ save_TexSubImage3D(GLenum target, GLint level,
|
|||||||
n[8].i = (GLint) depth;
|
n[8].i = (GLint) depth;
|
||||||
n[9].e = format;
|
n[9].e = format;
|
||||||
n[10].e = type;
|
n[10].e = type;
|
||||||
n[11].data = image;
|
n[11].data = unpack_image(ctx, 3, width, height, depth, format, type,
|
||||||
}
|
pixels, &ctx->Unpack);
|
||||||
else if (image) {
|
|
||||||
_mesa_free(image);
|
|
||||||
}
|
}
|
||||||
if (ctx->ExecuteFlag) {
|
if (ctx->ExecuteFlag) {
|
||||||
CALL_TexSubImage3D(ctx->Exec, (target, level,
|
CALL_TexSubImage3D(ctx->Exec, (target, level,
|
||||||
@@ -4455,18 +4480,17 @@ save_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
|
|||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
Node *n;
|
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);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
|
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_LOAD_PROGRAM_NV, 4);
|
n = ALLOC_INSTRUCTION(ctx, OPCODE_LOAD_PROGRAM_NV, 4);
|
||||||
if (n) {
|
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[1].e = target;
|
||||||
n[2].ui = id;
|
n[2].ui = id;
|
||||||
n[3].i = len;
|
n[3].i = len;
|
||||||
@@ -4483,15 +4507,17 @@ save_RequestResidentProgramsNV(GLsizei num, const GLuint * ids)
|
|||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
Node *n;
|
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);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
|
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_TRACK_MATRIX_NV, 2);
|
n = ALLOC_INSTRUCTION(ctx, OPCODE_TRACK_MATRIX_NV, 2);
|
||||||
if (n) {
|
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[1].i = num;
|
||||||
n[2].data = idCopy;
|
n[2].data = idCopy;
|
||||||
}
|
}
|
||||||
@@ -4652,16 +4678,17 @@ save_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name,
|
|||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
Node *n;
|
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);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
|
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_NAMED_PARAMETER_NV, 6);
|
n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_NAMED_PARAMETER_NV, 6);
|
||||||
if (n) {
|
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[1].ui = id;
|
||||||
n[2].i = len;
|
n[2].i = len;
|
||||||
n[3].data = nameCopy;
|
n[3].data = nameCopy;
|
||||||
@@ -4750,18 +4777,17 @@ save_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
|
|||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
Node *n;
|
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);
|
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
|
|
||||||
n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_STRING_ARB, 4);
|
n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_STRING_ARB, 4);
|
||||||
if (n) {
|
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[1].e = target;
|
||||||
n[2].e = format;
|
n[2].e = format;
|
||||||
n[3].i = len;
|
n[3].i = len;
|
||||||
|
|||||||
@@ -404,6 +404,7 @@ _mesa_enable_2_0_extensions(GLcontext *ctx)
|
|||||||
ctx->Extensions.ARB_fragment_shader = GL_TRUE;
|
ctx->Extensions.ARB_fragment_shader = GL_TRUE;
|
||||||
#endif
|
#endif
|
||||||
ctx->Extensions.ARB_point_sprite = GL_TRUE;
|
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;
|
ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE;
|
||||||
#if FEATURE_ARB_shader_objects
|
#if FEATURE_ARB_shader_objects
|
||||||
ctx->Extensions.ARB_shader_objects = GL_TRUE;
|
ctx->Extensions.ARB_shader_objects = GL_TRUE;
|
||||||
|
|||||||
@@ -417,21 +417,22 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
|
|||||||
if (format == GL_COLOR) {
|
if (format == GL_COLOR) {
|
||||||
if (att->Renderbuffer->_BaseFormat != GL_RGB &&
|
if (att->Renderbuffer->_BaseFormat != GL_RGB &&
|
||||||
att->Renderbuffer->_BaseFormat != GL_RGBA) {
|
att->Renderbuffer->_BaseFormat != GL_RGBA) {
|
||||||
ASSERT(att->Renderbuffer->RedBits);
|
|
||||||
ASSERT(att->Renderbuffer->GreenBits);
|
|
||||||
ASSERT(att->Renderbuffer->BlueBits);
|
|
||||||
att_incomplete("bad renderbuffer color format");
|
att_incomplete("bad renderbuffer color format");
|
||||||
att->Complete = GL_FALSE;
|
att->Complete = GL_FALSE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
ASSERT(att->Renderbuffer->RedBits);
|
||||||
|
ASSERT(att->Renderbuffer->GreenBits);
|
||||||
|
ASSERT(att->Renderbuffer->BlueBits);
|
||||||
}
|
}
|
||||||
else if (format == GL_DEPTH) {
|
else if (format == GL_DEPTH) {
|
||||||
ASSERT(att->Renderbuffer->DepthBits);
|
|
||||||
if (att->Renderbuffer->_BaseFormat == GL_DEPTH_COMPONENT) {
|
if (att->Renderbuffer->_BaseFormat == GL_DEPTH_COMPONENT) {
|
||||||
|
ASSERT(att->Renderbuffer->DepthBits);
|
||||||
/* OK */
|
/* OK */
|
||||||
}
|
}
|
||||||
else if (ctx->Extensions.EXT_packed_depth_stencil &&
|
else if (ctx->Extensions.EXT_packed_depth_stencil &&
|
||||||
att->Renderbuffer->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
|
att->Renderbuffer->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
|
||||||
|
ASSERT(att->Renderbuffer->DepthBits);
|
||||||
/* OK */
|
/* OK */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -442,12 +443,13 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
assert(format == GL_STENCIL);
|
assert(format == GL_STENCIL);
|
||||||
ASSERT(att->Renderbuffer->StencilBits);
|
|
||||||
if (att->Renderbuffer->_BaseFormat == GL_STENCIL_INDEX) {
|
if (att->Renderbuffer->_BaseFormat == GL_STENCIL_INDEX) {
|
||||||
|
ASSERT(att->Renderbuffer->StencilBits);
|
||||||
/* OK */
|
/* OK */
|
||||||
}
|
}
|
||||||
else if (ctx->Extensions.EXT_packed_depth_stencil &&
|
else if (ctx->Extensions.EXT_packed_depth_stencil &&
|
||||||
att->Renderbuffer->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
|
att->Renderbuffer->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
|
||||||
|
ASSERT(att->Renderbuffer->StencilBits);
|
||||||
/* OK */
|
/* OK */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -2038,7 +2040,9 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
|
|||||||
if (mask & GL_STENCIL_BUFFER_BIT) {
|
if (mask & GL_STENCIL_BUFFER_BIT) {
|
||||||
struct gl_renderbuffer *readRb = readFb->_StencilBuffer;
|
struct gl_renderbuffer *readRb = readFb->_StencilBuffer;
|
||||||
struct gl_renderbuffer *drawRb = drawFb->_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,
|
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||||
"glBlitFramebufferEXT(stencil buffer size mismatch");
|
"glBlitFramebufferEXT(stencil buffer size mismatch");
|
||||||
return;
|
return;
|
||||||
@@ -2048,7 +2052,9 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
|
|||||||
if (mask & GL_DEPTH_BUFFER_BIT) {
|
if (mask & GL_DEPTH_BUFFER_BIT) {
|
||||||
struct gl_renderbuffer *readRb = readFb->_DepthBuffer;
|
struct gl_renderbuffer *readRb = readFb->_DepthBuffer;
|
||||||
struct gl_renderbuffer *drawRb = drawFb->_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,
|
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||||
"glBlitFramebufferEXT(depth buffer size mismatch");
|
"glBlitFramebufferEXT(depth buffer size mismatch");
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1306,7 +1306,9 @@ static void build_fog( struct tnl_program *p )
|
|||||||
input = swizzle1(register_input(p, VERT_ATTRIB_FOG), X);
|
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_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;
|
break;
|
||||||
default:
|
default:
|
||||||
/* Error will be caught later in _mesa_Fogfv */
|
/* Error will be caught later in _mesa_Fogfv */
|
||||||
;
|
ASSIGN_4V(p, 0.0F, 0.0F, 0.0F, 0.0F);
|
||||||
}
|
}
|
||||||
_mesa_Fogfv(pname, p);
|
_mesa_Fogfv(pname, p);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5333,3 +5333,181 @@ _mesa_clip_to_region(GLint xmin, GLint ymin,
|
|||||||
|
|
||||||
return GL_TRUE;
|
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,
|
GLint *x, GLint *y,
|
||||||
GLsizei *width, GLsizei *height );
|
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
|
#endif
|
||||||
|
|||||||
@@ -496,7 +496,7 @@ _mesa_LightModeliv( GLenum pname, const GLint *params )
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* Error will be caught later in gl_LightModelfv */
|
/* Error will be caught later in gl_LightModelfv */
|
||||||
;
|
ASSIGN_4V(fparam, 0.0F, 0.0F, 0.0F, 0.0F);
|
||||||
}
|
}
|
||||||
_mesa_LightModelfv( pname, fparam );
|
_mesa_LightModelfv( pname, fparam );
|
||||||
}
|
}
|
||||||
@@ -1224,15 +1224,15 @@ _mesa_update_tnl_spaces( GLcontext *ctx, GLuint new_state )
|
|||||||
ctx->Driver.LightingSpaceChange( ctx );
|
ctx->Driver.LightingSpaceChange( ctx );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
GLuint new_state = ctx->NewState;
|
GLuint new_state2 = ctx->NewState;
|
||||||
|
|
||||||
/* Recalculate that same state only if it has been invalidated
|
/* Recalculate that same state only if it has been invalidated
|
||||||
* by other statechanges.
|
* by other statechanges.
|
||||||
*/
|
*/
|
||||||
if (new_state & _NEW_MODELVIEW)
|
if (new_state2 & _NEW_MODELVIEW)
|
||||||
update_modelview_scale(ctx);
|
update_modelview_scale(ctx);
|
||||||
|
|
||||||
if (new_state & (_NEW_LIGHT|_NEW_MODELVIEW))
|
if (new_state2 & (_NEW_LIGHT|_NEW_MODELVIEW))
|
||||||
compute_light_positions( ctx );
|
compute_light_positions( ctx );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -502,7 +502,8 @@ _mesa_update_state_locked( GLcontext *ctx )
|
|||||||
/* Determine which state flags effect vertex/fragment program state */
|
/* Determine which state flags effect vertex/fragment program state */
|
||||||
if (ctx->FragmentProgram._MaintainTexEnvProgram) {
|
if (ctx->FragmentProgram._MaintainTexEnvProgram) {
|
||||||
prog_flags |= (_NEW_TEXTURE | _NEW_FOG | _DD_NEW_SEPARATE_SPECULAR |
|
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) {
|
if (ctx->VertexProgram._MaintainTnlProgram) {
|
||||||
prog_flags |= (_NEW_ARRAY | _NEW_TEXTURE | _NEW_TEXTURE_MATRIX |
|
prog_flags |= (_NEW_ARRAY | _NEW_TEXTURE | _NEW_TEXTURE_MATRIX |
|
||||||
|
|||||||
@@ -263,6 +263,7 @@ static GLbitfield get_fp_input_mask( GLcontext *ctx )
|
|||||||
{
|
{
|
||||||
/* _NEW_PROGRAM */
|
/* _NEW_PROGRAM */
|
||||||
const GLboolean vertexShader = (ctx->Shader.CurrentProgram &&
|
const GLboolean vertexShader = (ctx->Shader.CurrentProgram &&
|
||||||
|
ctx->Shader.CurrentProgram->LinkStatus &&
|
||||||
ctx->Shader.CurrentProgram->VertexProgram);
|
ctx->Shader.CurrentProgram->VertexProgram);
|
||||||
const GLboolean vertexProgram = ctx->VertexProgram._Enabled;
|
const GLboolean vertexProgram = ctx->VertexProgram._Enabled;
|
||||||
GLbitfield fp_inputs = 0x0;
|
GLbitfield fp_inputs = 0x0;
|
||||||
@@ -328,7 +329,7 @@ static GLbitfield get_fp_input_mask( GLcontext *ctx )
|
|||||||
if (vertexShader)
|
if (vertexShader)
|
||||||
vprog = ctx->Shader.CurrentProgram->VertexProgram;
|
vprog = ctx->Shader.CurrentProgram->VertexProgram;
|
||||||
else
|
else
|
||||||
vprog = ctx->VertexProgram._Current;
|
vprog = ctx->VertexProgram.Current;
|
||||||
|
|
||||||
vp_outputs = vprog->Base.OutputsWritten;
|
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;
|
GLuint i, nr = key->unit[unit].NumArgsRGB;
|
||||||
|
|
||||||
@@ -1095,11 +1096,10 @@ static struct ureg emit_combine( struct texenv_fragment_program *p,
|
|||||||
static struct ureg
|
static struct ureg
|
||||||
emit_texenv(struct texenv_fragment_program *p, GLuint unit)
|
emit_texenv(struct texenv_fragment_program *p, GLuint unit)
|
||||||
{
|
{
|
||||||
struct state_key *key = p->state;
|
const struct state_key *key = p->state;
|
||||||
GLboolean saturate = (unit < p->last_tex_stage);
|
GLboolean saturate;
|
||||||
GLuint rgb_shift, alpha_shift;
|
GLuint rgb_shift, alpha_shift;
|
||||||
struct ureg out, shift;
|
struct ureg out, dest;
|
||||||
struct ureg dest;
|
|
||||||
|
|
||||||
if (!key->unit[unit].enabled) {
|
if (!key->unit[unit].enabled) {
|
||||||
return get_source(p, SRC_PREVIOUS, 0);
|
return get_source(p, SRC_PREVIOUS, 0);
|
||||||
@@ -1124,6 +1124,11 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
|
|||||||
break;
|
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 this is the very last calculation, emit direct to output reg:
|
||||||
*/
|
*/
|
||||||
if (key->separate_specular ||
|
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 ||
|
else if (key->unit[unit].ModeRGB == MODE_DOT3_RGBA_EXT ||
|
||||||
key->unit[unit].ModeRGB == MODE_DOT3_RGBA) {
|
key->unit[unit].ModeRGB == MODE_DOT3_RGBA) {
|
||||||
|
|
||||||
out = emit_combine( p, dest, WRITEMASK_XYZW, saturate,
|
out = emit_combine( p, dest, WRITEMASK_XYZW, saturate,
|
||||||
unit,
|
unit,
|
||||||
key->unit[unit].NumArgsRGB,
|
key->unit[unit].NumArgsRGB,
|
||||||
@@ -1172,6 +1176,10 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
|
|||||||
/* Deal with the final shift:
|
/* Deal with the final shift:
|
||||||
*/
|
*/
|
||||||
if (alpha_shift || rgb_shift) {
|
if (alpha_shift || rgb_shift) {
|
||||||
|
struct ureg shift;
|
||||||
|
|
||||||
|
saturate = GL_TRUE; /* always saturate at this point */
|
||||||
|
|
||||||
if (rgb_shift == alpha_shift) {
|
if (rgb_shift == alpha_shift) {
|
||||||
shift = register_scalar_const(p, (GLfloat)(1<<rgb_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
|
static GLboolean
|
||||||
load_texunit_sources( struct texenv_fragment_program *p, int unit )
|
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;
|
GLuint i;
|
||||||
|
|
||||||
for (i = 0; i < key->unit[unit].NumArgsRGB; 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
|
static GLboolean
|
||||||
load_texunit_bumpmap( struct texenv_fragment_program *p, int unit )
|
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;
|
GLuint bumpedUnitNr = key->unit[unit].OptRGB[1].Source - SRC_TEXTURE0;
|
||||||
struct ureg texcDst, bumpMapRes;
|
struct ureg texcDst, bumpMapRes;
|
||||||
struct ureg constdudvcolor = register_const4f(p, 0.0, 0.0, 0.0, 1.0);
|
struct ureg constdudvcolor = register_const4f(p, 0.0, 0.0, 0.0, 1.0);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* 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
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -30,8 +30,8 @@
|
|||||||
/* Mesa version */
|
/* Mesa version */
|
||||||
#define MESA_MAJOR 7
|
#define MESA_MAJOR 7
|
||||||
#define MESA_MINOR 5
|
#define MESA_MINOR 5
|
||||||
#define MESA_PATCH 0
|
#define MESA_PATCH 1
|
||||||
#define MESA_VERSION_STRING "7.5"
|
#define MESA_VERSION_STRING "7.5.1"
|
||||||
|
|
||||||
/* To make version comparison easy */
|
/* To make version comparison easy */
|
||||||
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
#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) {
|
if (specified_length != (int)param_var->param_binding_length) {
|
||||||
program_error(ctx, Program->Position,
|
program_error(ctx, Program->Position,
|
||||||
"Declared parameter array length does not match parameter list");
|
"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)");
|
_mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramivARB(pname)");
|
||||||
return;
|
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,
|
_mesa_print_alu_instruction(const struct prog_instruction *inst,
|
||||||
const char *opcode_string, GLuint numRegs)
|
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);
|
numRegs, PROG_PRINT_DEBUG, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -750,7 +750,7 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst,
|
|||||||
gl_prog_print_mode mode,
|
gl_prog_print_mode mode,
|
||||||
const struct gl_program *prog)
|
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)
|
_mesa_print_instruction(const struct prog_instruction *inst)
|
||||||
{
|
{
|
||||||
/* note: 4th param should be ignored for PROG_PRINT_DEBUG */
|
/* 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
|
void
|
||||||
_mesa_print_program(const struct gl_program *prog)
|
_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
|
void
|
||||||
_mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog)
|
_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
|
void
|
||||||
_mesa_print_parameter_list(const struct gl_program_parameter_list *list)
|
_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 *
|
static struct gl_program_parameter *
|
||||||
get_uniform_parameter(const struct gl_shader_program *shProg, GLuint index)
|
get_uniform_parameter(const struct gl_shader_program *shProg, GLuint index)
|
||||||
{
|
{
|
||||||
const struct gl_program *prog;
|
const struct gl_program *prog = NULL;
|
||||||
GLint progPos;
|
GLint progPos;
|
||||||
|
|
||||||
progPos = shProg->Uniforms->Uniforms[index].VertPos;
|
progPos = shProg->Uniforms->Uniforms[index].VertPos;
|
||||||
@@ -915,7 +915,7 @@ _mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index,
|
|||||||
GLenum *type, GLchar *nameOut)
|
GLenum *type, GLchar *nameOut)
|
||||||
{
|
{
|
||||||
const struct gl_shader_program *shProg;
|
const struct gl_shader_program *shProg;
|
||||||
const struct gl_program *prog;
|
const struct gl_program *prog = NULL;
|
||||||
const struct gl_program_parameter *param;
|
const struct gl_program_parameter *param;
|
||||||
GLint progPos;
|
GLint progPos;
|
||||||
|
|
||||||
@@ -1624,7 +1624,7 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program,
|
|||||||
|
|
||||||
if (param->Type == PROGRAM_SAMPLER) {
|
if (param->Type == PROGRAM_SAMPLER) {
|
||||||
/* This controls which texture unit which is used by a sampler */
|
/* This controls which texture unit which is used by a sampler */
|
||||||
GLuint texUnit, sampler;
|
GLboolean changed = GL_FALSE;
|
||||||
GLint i;
|
GLint i;
|
||||||
|
|
||||||
/* data type for setting samplers must be int */
|
/* data type for setting samplers must be int */
|
||||||
@@ -1639,8 +1639,9 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program,
|
|||||||
* common thing...
|
* common thing...
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
sampler = (GLuint) program->Parameters->ParameterValues[index + i][0];
|
GLuint sampler =
|
||||||
texUnit = ((GLuint *) values)[i];
|
(GLuint) program->Parameters->ParameterValues[index + offset + i][0];
|
||||||
|
GLuint texUnit = ((GLuint *) values)[i];
|
||||||
|
|
||||||
/* check that the sampler (tex unit index) is legal */
|
/* check that the sampler (tex unit index) is legal */
|
||||||
if (texUnit >= ctx->Const.MaxTextureImageUnits) {
|
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: */
|
/* This maps a sampler to a texture unit: */
|
||||||
if (sampler < MAX_SAMPLERS) {
|
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);
|
if (changed) {
|
||||||
|
/* When a sampler's value changes it usually requires rewriting
|
||||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
* 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 {
|
else {
|
||||||
/* ordinary uniform variable */
|
/* ordinary uniform variable */
|
||||||
|
|||||||
@@ -436,7 +436,7 @@ emit_statevars(const char *name, int array_len,
|
|||||||
struct gl_program_parameter_list *paramList)
|
struct gl_program_parameter_list *paramList)
|
||||||
{
|
{
|
||||||
if (type->type == SLANG_SPEC_ARRAY) {
|
if (type->type == SLANG_SPEC_ARRAY) {
|
||||||
GLint i, pos;
|
GLint i, pos = -1;
|
||||||
assert(array_len > 0);
|
assert(array_len > 0);
|
||||||
if (strcmp(name, "gl_ClipPlane") == 0) {
|
if (strcmp(name, "gl_ClipPlane") == 0) {
|
||||||
tokens[0] = STATE_CLIPPLANE;
|
tokens[0] = STATE_CLIPPLANE;
|
||||||
|
|||||||
@@ -94,6 +94,9 @@ struct bitmap_cache
|
|||||||
|
|
||||||
GLfloat color[4];
|
GLfloat color[4];
|
||||||
|
|
||||||
|
/** Bitmap's Z position */
|
||||||
|
GLfloat zpos;
|
||||||
|
|
||||||
struct pipe_texture *texture;
|
struct pipe_texture *texture;
|
||||||
struct pipe_transfer *trans;
|
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 */
|
/* draw textured quad */
|
||||||
offset = setup_bitmap_vertex_data(st, x, y, width, height,
|
offset = setup_bitmap_vertex_data(st, x, y, width, height, z, color);
|
||||||
ctx->Current.RasterPos[2],
|
|
||||||
color);
|
|
||||||
|
|
||||||
util_draw_vertex_buffer(pipe, st->bitmap.vbuf, offset,
|
util_draw_vertex_buffer(pipe, st->bitmap.vbuf, offset,
|
||||||
PIPE_PRIM_TRIANGLE_FAN,
|
PIPE_PRIM_TRIANGLE_FAN,
|
||||||
@@ -647,7 +650,7 @@ st_flush_bitmap_cache(struct st_context *st)
|
|||||||
draw_bitmap_quad(st->ctx,
|
draw_bitmap_quad(st->ctx,
|
||||||
cache->xpos,
|
cache->xpos,
|
||||||
cache->ypos,
|
cache->ypos,
|
||||||
st->ctx->Current.RasterPos[2],
|
cache->zpos,
|
||||||
BITMAP_CACHE_WIDTH, BITMAP_CACHE_HEIGHT,
|
BITMAP_CACHE_WIDTH, BITMAP_CACHE_HEIGHT,
|
||||||
cache->texture,
|
cache->texture,
|
||||||
cache->color);
|
cache->color);
|
||||||
@@ -687,6 +690,7 @@ accum_bitmap(struct st_context *st,
|
|||||||
{
|
{
|
||||||
struct bitmap_cache *cache = st->bitmap.cache;
|
struct bitmap_cache *cache = st->bitmap.cache;
|
||||||
int px = -999, py;
|
int px = -999, py;
|
||||||
|
const GLfloat z = st->ctx->Current.RasterPos[2];
|
||||||
|
|
||||||
if (width > BITMAP_CACHE_WIDTH ||
|
if (width > BITMAP_CACHE_WIDTH ||
|
||||||
height > BITMAP_CACHE_HEIGHT)
|
height > BITMAP_CACHE_HEIGHT)
|
||||||
@@ -697,7 +701,8 @@ accum_bitmap(struct st_context *st,
|
|||||||
py = y - cache->ypos;
|
py = y - cache->ypos;
|
||||||
if (px < 0 || px + width > BITMAP_CACHE_WIDTH ||
|
if (px < 0 || px + width > BITMAP_CACHE_WIDTH ||
|
||||||
py < 0 || py + height > BITMAP_CACHE_HEIGHT ||
|
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
|
/* This bitmap would extend beyond cache bounds, or the bitmap
|
||||||
* color is changing
|
* color is changing
|
||||||
* so flush and continue.
|
* so flush and continue.
|
||||||
@@ -712,6 +717,7 @@ accum_bitmap(struct st_context *st,
|
|||||||
py = (BITMAP_CACHE_HEIGHT - height) / 2;
|
py = (BITMAP_CACHE_HEIGHT - height) / 2;
|
||||||
cache->xpos = x;
|
cache->xpos = x;
|
||||||
cache->ypos = y - py;
|
cache->ypos = y - py;
|
||||||
|
cache->zpos = z;
|
||||||
cache->empty = GL_FALSE;
|
cache->empty = GL_FALSE;
|
||||||
COPY_4FV(cache->color, st->ctx->Current.RasterColor);
|
COPY_4FV(cache->color, st->ctx->Current.RasterColor);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,34 +69,107 @@ st_BlitFramebuffer(GLcontext *ctx,
|
|||||||
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
|
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
|
||||||
GLbitfield mask, GLenum filter)
|
GLbitfield mask, GLenum filter)
|
||||||
{
|
{
|
||||||
|
const GLbitfield depthStencil = (GL_DEPTH_BUFFER_BIT |
|
||||||
|
GL_STENCIL_BUFFER_BIT);
|
||||||
struct st_context *st = ctx->st;
|
struct st_context *st = ctx->st;
|
||||||
|
|
||||||
const uint pFilter = ((filter == GL_NEAREST)
|
const uint pFilter = ((filter == GL_NEAREST)
|
||||||
? PIPE_TEX_MIPFILTER_NEAREST
|
? PIPE_TEX_MIPFILTER_NEAREST
|
||||||
: PIPE_TEX_MIPFILTER_LINEAR);
|
: 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) {
|
if (mask & GL_COLOR_BUFFER_BIT) {
|
||||||
struct st_renderbuffer *srcRb =
|
struct st_renderbuffer *srcRb =
|
||||||
st_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer);
|
st_renderbuffer(readFB->_ColorReadBuffer);
|
||||||
struct st_renderbuffer *dstRb =
|
struct st_renderbuffer *dstRb =
|
||||||
st_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]);
|
st_renderbuffer(drawFB->_ColorDrawBuffers[0]);
|
||||||
struct pipe_surface *srcSurf = srcRb->surface;
|
struct pipe_surface *srcSurf = srcRb->surface;
|
||||||
struct pipe_surface *dstSurf = dstRb->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,
|
util_blit_pixels(st->blit,
|
||||||
srcSurf, srcX0, srcY0, srcX1, srcY1,
|
srcSurf, srcX0, srcY0, srcX1, srcY1,
|
||||||
dstSurf, dstX0, dstY0, dstX1, dstY1,
|
dstSurf, dstX0, dstY0, dstX1, dstY1,
|
||||||
0.0, pFilter);
|
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
|
static INLINE GLboolean
|
||||||
check_clear_color_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
|
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;
|
return TRUE;
|
||||||
|
|
||||||
if (!ctx->Color.ColorMask[0] ||
|
if (!ctx->Color.ColorMask[0] ||
|
||||||
@@ -300,7 +304,11 @@ check_clear_depth_stencil_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
|
|||||||
GLboolean maskStencil
|
GLboolean maskStencil
|
||||||
= (ctx->Stencil.WriteMask[0] & stencilMax) != stencilMax;
|
= (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;
|
return TRUE;
|
||||||
|
|
||||||
if (maskStencil)
|
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 struct st_renderbuffer *strb = st_renderbuffer(rb);
|
||||||
const GLboolean isDS = pf_is_depth_and_stencil(strb->surface->format);
|
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;
|
return TRUE;
|
||||||
|
|
||||||
if (isDS &&
|
if (isDS &&
|
||||||
@@ -345,7 +357,11 @@ check_clear_stencil_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
|
|||||||
if (maskStencil)
|
if (maskStencil)
|
||||||
return TRUE;
|
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;
|
return TRUE;
|
||||||
|
|
||||||
/* This is correct, but it is necessary to look at the depth clear
|
/* 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
|
else
|
||||||
usage = PIPE_TRANSFER_WRITE;
|
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),
|
ptDraw = st_cond_flush_get_tex_transfer(st_context(ctx),
|
||||||
rbDraw->texture, 0, 0, 0,
|
rbDraw->texture, 0, 0, 0,
|
||||||
usage, dstx, dsty,
|
usage, dstx, dsty,
|
||||||
|
|||||||
@@ -152,4 +152,16 @@ void st_init_flush_functions(struct dd_function_table *functions)
|
|||||||
{
|
{
|
||||||
functions->Flush = st_glFlush;
|
functions->Flush = st_glFlush;
|
||||||
functions->Finish = st_glFinish;
|
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_context.h"
|
||||||
#include "pipe/p_defines.h"
|
#include "pipe/p_defines.h"
|
||||||
#include "pipe/p_inlines.h"
|
#include "pipe/p_inlines.h"
|
||||||
|
#include "pipe/p_shader_tokens.h"
|
||||||
#include "util/u_tile.h"
|
#include "util/u_tile.h"
|
||||||
#include "util/u_blit.h"
|
#include "util/u_blit.h"
|
||||||
#include "util/u_surface.h"
|
#include "util/u_surface.h"
|
||||||
@@ -525,9 +526,9 @@ st_TexImage(GLcontext * ctx,
|
|||||||
struct st_texture_image *stImage = st_texture_image(texImage);
|
struct st_texture_image *stImage = st_texture_image(texImage);
|
||||||
GLint postConvWidth, postConvHeight;
|
GLint postConvWidth, postConvHeight;
|
||||||
GLint texelBytes, sizeInBytes;
|
GLint texelBytes, sizeInBytes;
|
||||||
GLuint dstRowStride;
|
GLuint dstRowStride = 0;
|
||||||
struct gl_pixelstore_attrib unpackNB;
|
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__,
|
DBG("%s target %s level %d %dx%dx%d border %d\n", __FUNCTION__,
|
||||||
_mesa_lookup_enum_by_nr(target), level, width, height, depth, border);
|
_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);
|
_mesa_image_image_stride(packing, width, height, format, type);
|
||||||
GLint i;
|
GLint i;
|
||||||
const GLubyte *src;
|
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__,
|
DBG("%s target %s level %d offset %d,%d %dx%d\n", __FUNCTION__,
|
||||||
_mesa_lookup_enum_by_nr(target),
|
_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.
|
* 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
|
* 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;
|
enum pipe_format dest_format, src_format;
|
||||||
GLboolean use_fallback = GL_TRUE;
|
GLboolean use_fallback = GL_TRUE;
|
||||||
GLboolean matching_base_formats;
|
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 */
|
/* any rendering in progress must flushed before we grab the fb image */
|
||||||
st_flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL);
|
st_flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL);
|
||||||
@@ -1494,13 +1529,14 @@ st_copy_texsubimage(GLcontext *ctx,
|
|||||||
* textured-quad paths.
|
* textured-quad paths.
|
||||||
*/
|
*/
|
||||||
matching_base_formats = (strb->Base._BaseFormat == texImage->_BaseFormat);
|
matching_base_formats = (strb->Base._BaseFormat == texImage->_BaseFormat);
|
||||||
|
format_writemask = compatible_src_dst_formats(&strb->Base, texImage);
|
||||||
|
|
||||||
if (matching_base_formats && ctx->_ImageTransferState == 0x0) {
|
if (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 (src_format == dest_format && !do_flip) {
|
if (matching_base_formats &&
|
||||||
|
src_format == dest_format &&
|
||||||
|
!do_flip)
|
||||||
|
{
|
||||||
/* use surface_copy() / blit */
|
/* use surface_copy() / blit */
|
||||||
|
|
||||||
dest_surface = screen->get_tex_surface(screen, stImage->pt,
|
dest_surface = screen->get_tex_surface(screen, stImage->pt,
|
||||||
@@ -1520,7 +1556,8 @@ st_copy_texsubimage(GLcontext *ctx,
|
|||||||
width, height);
|
width, height);
|
||||||
use_fallback = GL_FALSE;
|
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_2D,
|
||||||
PIPE_TEXTURE_USAGE_SAMPLER,
|
PIPE_TEXTURE_USAGE_SAMPLER,
|
||||||
0) &&
|
0) &&
|
||||||
@@ -1544,14 +1581,15 @@ st_copy_texsubimage(GLcontext *ctx,
|
|||||||
srcY0 = srcY;
|
srcY0 = srcY;
|
||||||
srcY1 = srcY0 + height;
|
srcY1 = srcY0 + height;
|
||||||
}
|
}
|
||||||
util_blit_pixels(ctx->st->blit,
|
util_blit_pixels_writemask(ctx->st->blit,
|
||||||
strb->surface,
|
strb->surface,
|
||||||
srcX, srcY0,
|
srcX, srcY0,
|
||||||
srcX + width, srcY1,
|
srcX + width, srcY1,
|
||||||
dest_surface,
|
dest_surface,
|
||||||
destX, destY,
|
destX, destY,
|
||||||
destX + width, destY + height,
|
destX + width, destY + height,
|
||||||
0.0, PIPE_TEX_MIPFILTER_NEAREST);
|
0.0, PIPE_TEX_MIPFILTER_NEAREST,
|
||||||
|
format_writemask);
|
||||||
use_fallback = GL_FALSE;
|
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)) {
|
if (screen->get_param(screen, PIPE_CAP_POINT_SPRITE)) {
|
||||||
ctx->Extensions.ARB_point_sprite = GL_TRUE;
|
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)) {
|
if (screen->get_param(screen, PIPE_CAP_OCCLUSION_QUERY)) {
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "main/glheader.h"
|
#include "main/glheader.h"
|
||||||
|
#include "main/image.h"
|
||||||
#include "main/macros.h"
|
#include "main/macros.h"
|
||||||
#include "s_context.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().
|
* Software fallback for glBlitFramebufferEXT().
|
||||||
*/
|
*/
|
||||||
@@ -747,8 +570,8 @@ _swrast_BlitFramebuffer(GLcontext *ctx,
|
|||||||
if (!ctx->DrawBuffer->_NumColorDrawBuffers)
|
if (!ctx->DrawBuffer->_NumColorDrawBuffers)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!clip_blit(ctx, &srcX0, &srcY0, &srcX1, &srcY1,
|
if (!_mesa_clip_blit(ctx, &srcX0, &srcY0, &srcX1, &srcY1,
|
||||||
&dstX0, &dstY0, &dstX1, &dstY1)) {
|
&dstX0, &dstY0, &dstX1, &dstY1)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -220,6 +220,9 @@ _swrast_update_deferred_texture(GLcontext *ctx)
|
|||||||
/* Z comes from fragment program/shader */
|
/* Z comes from fragment program/shader */
|
||||||
swrast->_DeferredTexture = GL_FALSE;
|
swrast->_DeferredTexture = GL_FALSE;
|
||||||
}
|
}
|
||||||
|
else if (fprog && fprog->UsesKill) {
|
||||||
|
swrast->_DeferredTexture = GL_FALSE;
|
||||||
|
}
|
||||||
else if (ctx->Query.CurrentOcclusionObject) {
|
else if (ctx->Query.CurrentOcclusionObject) {
|
||||||
/* occlusion query depends on shader discard/kill results */
|
/* occlusion query depends on shader discard/kill results */
|
||||||
swrast->_DeferredTexture = GL_FALSE;
|
swrast->_DeferredTexture = GL_FALSE;
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ void
|
|||||||
_swrast_feedback_triangle(GLcontext *ctx, const SWvertex *v0,
|
_swrast_feedback_triangle(GLcontext *ctx, const SWvertex *v0,
|
||||||
const SWvertex *v1, const SWvertex *v2)
|
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) (GLint) GL_POLYGON_TOKEN);
|
||||||
_mesa_feedback_token(ctx, (GLfloat) 3); /* three vertices */
|
_mesa_feedback_token(ctx, (GLfloat) 3); /* three vertices */
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ void
|
|||||||
_swrast_select_triangle(GLcontext *ctx, const SWvertex *v0,
|
_swrast_select_triangle(GLcontext *ctx, const SWvertex *v0,
|
||||||
const SWvertex *v1, const SWvertex *v2)
|
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;
|
const GLfloat zs = 1.0F / ctx->DrawBuffer->_DepthMaxF;
|
||||||
|
|
||||||
_mesa_update_hitflag( ctx, v0->attrib[FRAG_ATTRIB_WPOS][2] * zs );
|
_mesa_update_hitflag( ctx, v0->attrib[FRAG_ATTRIB_WPOS][2] * zs );
|
||||||
|
|||||||
@@ -44,8 +44,9 @@
|
|||||||
#include "s_triangle.h"
|
#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
|
GLboolean
|
||||||
_swrast_culltriangle( GLcontext *ctx,
|
_swrast_culltriangle( GLcontext *ctx,
|
||||||
@@ -53,16 +54,17 @@ _swrast_culltriangle( GLcontext *ctx,
|
|||||||
const SWvertex *v1,
|
const SWvertex *v1,
|
||||||
const SWvertex *v2 )
|
const SWvertex *v2 )
|
||||||
{
|
{
|
||||||
|
SWcontext *swrast = SWRAST_CONTEXT(ctx);
|
||||||
GLfloat ex = v1->attrib[FRAG_ATTRIB_WPOS][0] - v0->attrib[FRAG_ATTRIB_WPOS][0];
|
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 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 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 fy = v2->attrib[FRAG_ATTRIB_WPOS][1] - v0->attrib[FRAG_ATTRIB_WPOS][1];
|
||||||
GLfloat c = ex*fy-ey*fx;
|
GLfloat c = ex*fy-ey*fx;
|
||||||
|
|
||||||
if (c * SWRAST_CONTEXT(ctx)->_BackfaceCullSign > 0)
|
if (c * swrast->_BackfaceSign * swrast->_BackfaceCullSign <= 0.0F)
|
||||||
return 0;
|
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;
|
exec->vtx.max_vert = 0;
|
||||||
else
|
else
|
||||||
exec->vtx.max_vert = ((VBO_VERT_BUFFER_SIZE - exec->vtx.buffer_used) /
|
exec->vtx.max_vert = ((VBO_VERT_BUFFER_SIZE - exec->vtx.buffer_used) /
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ clean:
|
|||||||
|
|
||||||
|
|
||||||
gen_matypes: gen_matypes.c
|
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
|
# need some special rules here, unfortunately
|
||||||
matypes.h: ../main/mtypes.h ../tnl/t_context.h gen_matypes
|
matypes.h: ../main/mtypes.h ../tnl/t_context.h gen_matypes
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
CompileAs="0"
|
CompileAs="0"
|
||||||
|
ForcedIncludeFiles="../../../../src/mesa/main/compiler.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@@ -122,6 +123,7 @@
|
|||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
CompileAs="0"
|
CompileAs="0"
|
||||||
|
ForcedIncludeFiles="../../../../src/mesa/main/compiler.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@@ -192,6 +194,7 @@
|
|||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
CompileAs="0"
|
CompileAs="0"
|
||||||
|
ForcedIncludeFiles="../../../../src/mesa/main/compiler.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@@ -262,6 +265,7 @@
|
|||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
CompileAs="0"
|
CompileAs="0"
|
||||||
|
ForcedIncludeFiles="../../../../src/mesa/main/compiler.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@@ -378,6 +382,10 @@
|
|||||||
RelativePath="..\..\..\..\src\mesa\main\convolve.c"
|
RelativePath="..\..\..\..\src\mesa\main\convolve.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\..\src\mesa\main\cpuinfo.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\..\src\mesa\main\debug.c"
|
RelativePath="..\..\..\..\src\mesa\main\debug.c"
|
||||||
>
|
>
|
||||||
@@ -650,10 +658,6 @@
|
|||||||
RelativePath="..\..\..\..\src\mesa\shader\prog_cache.c"
|
RelativePath="..\..\..\..\src\mesa\shader\prog_cache.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\..\..\src\mesa\shader\prog_debug.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\..\src\mesa\shader\prog_execute.c"
|
RelativePath="..\..\..\..\src\mesa\shader\prog_execute.c"
|
||||||
>
|
>
|
||||||
@@ -666,6 +670,10 @@
|
|||||||
RelativePath="..\..\..\..\src\mesa\shader\prog_noise.c"
|
RelativePath="..\..\..\..\src\mesa\shader\prog_noise.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\..\src\mesa\shader\prog_optimize.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\..\src\mesa\shader\prog_parameter.c"
|
RelativePath="..\..\..\..\src\mesa\shader\prog_parameter.c"
|
||||||
>
|
>
|
||||||
@@ -1034,6 +1042,10 @@
|
|||||||
RelativePath="..\..\..\..\src\mesa\main\texgen.c"
|
RelativePath="..\..\..\..\src\mesa\main\texgen.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\..\src\mesa\main\texgetimage.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\..\src\mesa\main\teximage.c"
|
RelativePath="..\..\..\..\src\mesa\main\teximage.c"
|
||||||
>
|
>
|
||||||
@@ -1062,10 +1074,6 @@
|
|||||||
RelativePath="..\..\..\..\src\mesa\main\varray.c"
|
RelativePath="..\..\..\..\src\mesa\main\varray.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\..\..\src\mesa\main\viewport.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\..\src\mesa\vbo\vbo_context.c"
|
RelativePath="..\..\..\..\src\mesa\vbo\vbo_context.c"
|
||||||
>
|
>
|
||||||
@@ -1122,6 +1130,10 @@
|
|||||||
RelativePath="..\..\..\..\src\mesa\vbo\vbo_split_inplace.c"
|
RelativePath="..\..\..\..\src\mesa\vbo\vbo_split_inplace.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\..\src\mesa\main\viewport.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\..\src\mesa\main\vsnprintf.c"
|
RelativePath="..\..\..\..\src\mesa\main\vsnprintf.c"
|
||||||
>
|
>
|
||||||
@@ -1263,6 +1275,10 @@
|
|||||||
RelativePath="..\..\..\..\src\mesa\main\convolve.h"
|
RelativePath="..\..\..\..\src\mesa\main\convolve.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\..\src\mesa\main\cpuinfo.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\..\src\mesa\main\dd.h"
|
RelativePath="..\..\..\..\src\mesa\main\dd.h"
|
||||||
>
|
>
|
||||||
@@ -1519,10 +1535,6 @@
|
|||||||
RelativePath="..\..\..\..\src\mesa\main\polygon.h"
|
RelativePath="..\..\..\..\src\mesa\main\polygon.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\..\..\src\mesa\shader\prog_debug.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\..\src\mesa\shader\prog_execute.h"
|
RelativePath="..\..\..\..\src\mesa\shader\prog_execute.h"
|
||||||
>
|
>
|
||||||
@@ -1535,6 +1547,10 @@
|
|||||||
RelativePath="..\..\..\..\src\mesa\shader\prog_noise.h"
|
RelativePath="..\..\..\..\src\mesa\shader\prog_noise.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\..\src\mesa\shader\prog_optimize.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\..\src\mesa\shader\prog_parameter.h"
|
RelativePath="..\..\..\..\src\mesa\shader\prog_parameter.h"
|
||||||
>
|
>
|
||||||
@@ -1879,6 +1895,10 @@
|
|||||||
RelativePath="..\..\..\..\src\mesa\main\texgen.h"
|
RelativePath="..\..\..\..\src\mesa\main\texgen.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\..\src\mesa\main\texgetimage.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\..\src\mesa\main\teximage.h"
|
RelativePath="..\..\..\..\src\mesa\main\teximage.h"
|
||||||
>
|
>
|
||||||
@@ -1911,10 +1931,6 @@
|
|||||||
RelativePath="..\..\..\..\src\mesa\main\varray.h"
|
RelativePath="..\..\..\..\src\mesa\main\varray.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\..\..\src\mesa\main\viewport.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\..\src\mesa\vbo\vbo.h"
|
RelativePath="..\..\..\..\src\mesa\vbo\vbo.h"
|
||||||
>
|
>
|
||||||
@@ -1947,6 +1963,10 @@
|
|||||||
RelativePath="..\..\..\..\src\mesa\main\version.h"
|
RelativePath="..\..\..\..\src\mesa\main\version.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\..\src\mesa\main\viewport.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\..\src\mesa\main\vtxfmt.h"
|
RelativePath="..\..\..\..\src\mesa\main\vtxfmt.h"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -55,6 +55,7 @@
|
|||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
CompileAs="0"
|
CompileAs="0"
|
||||||
|
ForcedIncludeFiles="../../../../src/mesa/main/compiler.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@@ -145,6 +146,7 @@
|
|||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
CompileAs="0"
|
CompileAs="0"
|
||||||
|
ForcedIncludeFiles="../../../../src/mesa/main/compiler.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@@ -236,6 +238,7 @@
|
|||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
CompileAs="0"
|
CompileAs="0"
|
||||||
|
ForcedIncludeFiles="../../../../src/mesa/main/compiler.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@@ -327,6 +330,7 @@
|
|||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
CompileAs="0"
|
CompileAs="0"
|
||||||
|
ForcedIncludeFiles="../../../../src/mesa/main/compiler.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
|||||||
Reference in New Issue
Block a user