Compare commits
99 Commits
mesa-7.10.
...
7.8
Author | SHA1 | Date | |
---|---|---|---|
|
3af43c0b4c | ||
|
337dace22d | ||
|
cc32ff741c | ||
|
340e063525 | ||
|
9c0eb872a2 | ||
|
b7cea230b3 | ||
|
5aade70660 | ||
|
793a121433 | ||
|
d2c4a8813e | ||
|
75181e974c | ||
|
6628188a87 | ||
|
435474e116 | ||
|
4adff471fe | ||
|
016a79b732 | ||
|
84e84cf4e7 | ||
|
800473566c | ||
|
9af135c7cd | ||
|
d06b34f563 | ||
|
f8363b25bb | ||
|
b69946870e | ||
|
3daa728fe7 | ||
|
596e1d3e44 | ||
|
7b6a68df92 | ||
|
4a915f34e1 | ||
|
be86a63d9a | ||
|
cb37c3a1c6 | ||
|
218b9be37a | ||
|
fb9a133071 | ||
|
886019125e | ||
|
aac05a8580 | ||
|
8186c7d106 | ||
|
7e07c8f40e | ||
|
c81ba220d7 | ||
|
8f2100b48e | ||
|
27bbb68dfb | ||
|
c3cc7d4033 | ||
|
47a2046a08 | ||
|
f3724c830c | ||
|
bedecdff1f | ||
|
43f332e6fc | ||
|
12df872f8c | ||
|
0d3ac51bf2 | ||
|
9cad102121 | ||
|
66ad60399a | ||
|
7f31029471 | ||
|
7b706cc69b | ||
|
69088d5484 | ||
|
8cb6b198d2 | ||
|
ac82d16021 | ||
|
f02cd9030c | ||
|
74959ed201 | ||
|
d06e0117e3 | ||
|
b69d5414aa | ||
|
f6bba7b996 | ||
|
6afe2936f7 | ||
|
fd95ea52e5 | ||
|
31799da47f | ||
|
078d04ed81 | ||
|
a2782af384 | ||
|
b12692404c | ||
|
43becf60f8 | ||
|
c19bc5de96 | ||
|
41e371e351 | ||
|
7b86b24808 | ||
|
6e0c3a1ba0 | ||
|
843a02eb9b | ||
|
8825d5ca54 | ||
|
226e612631 | ||
|
3e9f4d19f6 | ||
|
37a8fa74c3 | ||
|
eb99b66737 | ||
|
fc0b912f1e | ||
|
a48edfad8a | ||
|
1f756d916a | ||
|
7dbfc2565e | ||
|
d2f2d0a1b7 | ||
|
fadc3c5c06 | ||
|
011e7b2c96 | ||
|
2eb5bc5add | ||
|
7d313d3506 | ||
|
5c54b54e00 | ||
|
433626e5c0 | ||
|
b4777f82d5 | ||
|
f94e259d8e | ||
|
533b766383 | ||
|
71f028bf93 | ||
|
f007d0f89d | ||
|
728df9aaca | ||
|
d2ade4b802 | ||
|
e48964a561 | ||
|
53557f1f34 | ||
|
3bf7ea2a1c | ||
|
f3b55494f3 | ||
|
8b68c0aa24 | ||
|
3c407b52ff | ||
|
210b74c613 | ||
|
f7638f004d | ||
|
30e9ffcd3b | ||
|
4d63be67f3 |
10
Makefile
10
Makefile
@@ -180,7 +180,7 @@ ultrix-gcc:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
VERSION=7.8.1
|
||||
VERSION=7.8.3-rc1
|
||||
DIRECTORY = Mesa-$(VERSION)
|
||||
LIB_NAME = MesaLib-$(VERSION)
|
||||
DEMO_NAME = MesaDemos-$(VERSION)
|
||||
@@ -285,9 +285,6 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/src/mesa/x86-64/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/x86-64/Makefile \
|
||||
$(DIRECTORY)/progs/Makefile \
|
||||
$(DIRECTORY)/progs/util/README \
|
||||
$(DIRECTORY)/progs/util/*.[ch] \
|
||||
$(DIRECTORY)/progs/util/sampleMakefile \
|
||||
$(DIRECTORY)/windows/VC8/
|
||||
|
||||
ES_FILES = \
|
||||
@@ -438,7 +435,10 @@ DEMO_FILES = \
|
||||
$(DIRECTORY)/progs/glsl/*.c \
|
||||
$(DIRECTORY)/progs/glsl/*.frag \
|
||||
$(DIRECTORY)/progs/glsl/*.vert \
|
||||
$(DIRECTORY)/progs/glsl/*.shtest
|
||||
$(DIRECTORY)/progs/glsl/*.shtest \
|
||||
$(DIRECTORY)/progs/util/README \
|
||||
$(DIRECTORY)/progs/util/*.[ch] \
|
||||
$(DIRECTORY)/progs/util/sampleMakefile
|
||||
|
||||
GLUT_FILES = \
|
||||
$(DIRECTORY)/include/GL/glut.h \
|
||||
|
@@ -26,6 +26,11 @@ INTEL_LIBS = @INTEL_LIBS@
|
||||
INTEL_CFLAGS = @INTEL_CFLAGS@
|
||||
X11_LIBS = @X11_LIBS@
|
||||
X11_CFLAGS = @X11_CFLAGS@
|
||||
GLW_CFLAGS = @GLW_CFLAGS@
|
||||
GLUT_CFLAGS = @GLUT_CFLAGS@
|
||||
|
||||
# dlopen
|
||||
DLOPEN_LIBS = @DLOPEN_LIBS@
|
||||
|
||||
# Assembler
|
||||
MESA_ASM_SOURCES = @MESA_ASM_SOURCES@
|
||||
|
@@ -10,7 +10,7 @@ CONFIG_NAME = default
|
||||
# Version info
|
||||
MESA_MAJOR=7
|
||||
MESA_MINOR=8
|
||||
MESA_TINY=1
|
||||
MESA_TINY=2
|
||||
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
|
||||
|
||||
# external projects. This should be useless now that we use libdrm.
|
||||
@@ -121,6 +121,8 @@ APP_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LI
|
||||
APP_LIB_DEPS = -lm
|
||||
X11_LIBS = -lX11
|
||||
|
||||
DLOPEN_LIBS = -ldl
|
||||
|
||||
# Installation directories (for make install)
|
||||
INSTALL_DIR = /usr/local
|
||||
INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR)
|
||||
|
32
configure.ac
32
configure.ac
@@ -398,6 +398,7 @@ dnl Check to see if dlopen is in default libraries (like Solaris, which
|
||||
dnl has it in libc), or if libdl is needed to get it.
|
||||
AC_CHECK_FUNC([dlopen], [],
|
||||
[AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])])
|
||||
AC_SUBST([DLOPEN_LIBS])
|
||||
|
||||
dnl See if posix_memalign is available
|
||||
AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
|
||||
@@ -699,7 +700,7 @@ AC_SUBST([DRI_DRIVER_SEARCH_DIR])
|
||||
dnl Direct rendering or just indirect rendering
|
||||
AC_ARG_ENABLE([driglx-direct],
|
||||
[AS_HELP_STRING([--disable-driglx-direct],
|
||||
[enable direct rendering in GLX for DRI @<:@default=enabled@:>@])],
|
||||
[enable direct rendering in GLX and EGL for DRI @<:@default=enabled@:>@])],
|
||||
[driglx_direct="$enableval"],
|
||||
[driglx_direct="yes"])
|
||||
dnl Which drivers to build - default is chosen by platform
|
||||
@@ -865,7 +866,7 @@ else
|
||||
fi
|
||||
AC_ARG_ENABLE([gl-osmesa],
|
||||
[AS_HELP_STRING([--enable-gl-osmesa],
|
||||
[enable OSMesa on libGL @<:@default=enabled for xlib driver@:>@])],
|
||||
[enable OSMesa with libGL @<:@default=enabled for xlib driver@:>@])],
|
||||
[gl_osmesa="$enableval"],
|
||||
[gl_osmesa="$default_gl_osmesa"])
|
||||
if test "x$gl_osmesa" = xyes; then
|
||||
@@ -900,8 +901,8 @@ x16|x32)
|
||||
esac
|
||||
AC_SUBST([OSMESA_LIB])
|
||||
|
||||
case "$mesa_driver" in
|
||||
osmesa)
|
||||
case "$DRIVER_DIRS" in
|
||||
*osmesa*)
|
||||
# only link libraries with osmesa if shared
|
||||
if test "$enable_static" = no; then
|
||||
OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS"
|
||||
@@ -911,19 +912,7 @@ osmesa)
|
||||
OSMESA_MESA_DEPS=""
|
||||
OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS"
|
||||
;;
|
||||
*)
|
||||
# Link OSMesa to libGL otherwise
|
||||
OSMESA_LIB_DEPS=""
|
||||
# only link libraries with osmesa if shared
|
||||
if test "$enable_static" = no; then
|
||||
OSMESA_MESA_DEPS='-l$(GL_LIB)'
|
||||
else
|
||||
OSMESA_MESA_DEPS=""
|
||||
fi
|
||||
OSMESA_PC_REQ="gl"
|
||||
;;
|
||||
esac
|
||||
OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV"
|
||||
AC_SUBST([OSMESA_LIB_DEPS])
|
||||
AC_SUBST([OSMESA_MESA_DEPS])
|
||||
AC_SUBST([OSMESA_PC_REQ])
|
||||
@@ -1114,10 +1103,6 @@ fi
|
||||
|
||||
if test "x$enable_glut" = xyes; then
|
||||
SRC_DIRS="$SRC_DIRS glut/glx"
|
||||
GLUT_CFLAGS=""
|
||||
if test "x$GCC" = xyes; then
|
||||
GLUT_CFLAGS="-fexceptions"
|
||||
fi
|
||||
if test "$x11_pkgconfig" = yes; then
|
||||
PKG_CHECK_MODULES([GLUT],[x11 xmu xi])
|
||||
GLUT_PC_REQ_PRIV="x11 xmu xi"
|
||||
@@ -1128,6 +1113,9 @@ if test "x$enable_glut" = xyes; then
|
||||
GLUT_PC_LIB_PRIV="$GLUT_LIB_DEPS"
|
||||
GLUT_PC_CFLAGS="$X11_INCLUDES"
|
||||
fi
|
||||
if test "x$GCC" = xyes; then
|
||||
GLUT_CFLAGS="$GLUT_CFLAGS -fexceptions"
|
||||
fi
|
||||
GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm"
|
||||
GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm"
|
||||
|
||||
@@ -1229,6 +1217,10 @@ yes)
|
||||
if test "x$enable_egl" != xyes; then
|
||||
AC_MSG_ERROR([cannot build egl state tracker without EGL library])
|
||||
fi
|
||||
# define GLX_DIRECT_RENDERING even when the driver is not dri
|
||||
if test "x$mesa_driver" != xdri -a "x$driglx_direct" = xyes; then
|
||||
DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
|
||||
fi
|
||||
;;
|
||||
xorg)
|
||||
PKG_CHECK_MODULES([LIBDRM_XORG], [libdrm >= $LIBDRM_XORG_REQUIRED])
|
||||
|
@@ -145,7 +145,7 @@ Make sure the values in src/mesa/main/version.h are correct.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Update the docs/news.html file and docs/download.html files.
|
||||
Update docs/news.html.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -208,10 +208,11 @@ sftp USERNAME,mesa3d@web.sourceforge.net
|
||||
|
||||
<p>
|
||||
Make an announcement on the mailing lists:
|
||||
<em>m</em><em>e</em><em>s</em><em>a</em><em>3</em><em>d</em><em>-</em><em>d</em><em>e</em><em>v</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>s</em><em>f</em><em>.</em><em>n</em><em>e</em><em>t</em>,
|
||||
<em>m</em><em>e</em><em>s</em><em>a</em><em>3</em><em>d</em><em>-</em><em>u</em><em>s</em><em>e</em><em>r</em><em>s</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>s</em><em>f</em><em>.</em><em>n</em><em>e</em><em>t</em>
|
||||
|
||||
<em>m</em><em>e</em><em>s</em><em>a</em><em>-</em><em>d</em><em>e</em><em>v</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>f</em><em>r</em><em>e</em><em>e</em><em>d</em><em>e</em><em>s</em><em>k</em><em>t</em><em>o</em><em>p</em><em>.</em><em>o</em><em>r</em><em>g</em>,
|
||||
<em>m</em><em>e</em><em>s</em><em>a</em><em>-</em><em>u</em><em>s</em><em>e</em><em>r</em><em>s</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>f</em><em>r</em><em>e</em><em>e</em><em>d</em><em>e</em><em>s</em><em>k</em><em>t</em><em>o</em><em>p</em><em>.</em><em>o</em><em>r</em><em>g</em>
|
||||
and
|
||||
<em>m</em><em>e</em><em>s</em><em>a</em><em>3</em><em>d</em><em>-</em><em>a</em><em>n</em><em>n</em><em>o</em><em>u</em><em>n</em><em>c</em><em>e</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>s</em><em>f</em><em>.</em><em>n</em><em>e</em><em>t</em>
|
||||
<em>m</em><em>e</em><em>s</em><em>a</em><em>-</em><em>a</em><em>n</em><em>n</em><em>o</em><em>u</em><em>n</em><em>c</em><em>e</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>f</em><em>r</em><em>e</em><em>e</em><em>d</em><em>e</em><em>s</em><em>k</em><em>t</em><em>o</em><em>p</em><em>.</em><em>o</em><em>r</em><em>g</em>
|
||||
</p>
|
||||
|
||||
|
||||
|
@@ -11,6 +11,22 @@
|
||||
<H1>News</H1>
|
||||
|
||||
|
||||
<h2>TBD, 2010</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-7.8.3.html">Mesa 7.8.3</a> is released. This is a bug-fix
|
||||
release collecting fixes since the 7.8.2 release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>June 16, 2010</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-7.8.2.html">Mesa 7.8.2</a> is released. This is a bug-fix
|
||||
release collecting fixes since the 7.8.1 release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>April 5, 2010</h2>
|
||||
|
||||
<p>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.8.2 Release Notes / April, 5, 2010</H1>
|
||||
<H1>Mesa 7.8.2 Release Notes / (date tbd)</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.8.2 is a bug fix release which fixes bugs found since the 7.8.1 release.
|
||||
@@ -26,7 +26,15 @@ for DRI hardware acceleration.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
tbd
|
||||
c89b63d253605ed40e8ac370d25a833c MesaLib-7.8.2.tar.gz
|
||||
6be2d343a0089bfd395ce02aaf8adb57 MesaLib-7.8.2.tar.bz2
|
||||
a04ad3b06ac5ff3969a003fa7bbf7d5b MesaLib-7.8.2.zip
|
||||
7c213f92efeb471f0331670d5079d4c0 MesaDemos-7.8.2.tar.gz
|
||||
757d9e2e06f48b1a52848be9b0307ced MesaDemos-7.8.2.tar.bz2
|
||||
8d0e5cfe68b8ebf90265d350ae2c48b1 MesaDemos-7.8.2.zip
|
||||
b74482e3f44f35ed395c4aada4fd8240 MesaGLUT-7.8.2.tar.gz
|
||||
a471807b65e49c325808ba4551be93ed MesaGLUT-7.8.2.tar.bz2
|
||||
9f190268c42be582ef66e47365ee61e3 MesaGLUT-7.8.2.zip
|
||||
</pre>
|
||||
|
||||
|
||||
@@ -43,10 +51,96 @@ tbd
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Fixed Gallium glDrawPixels(GL_DEPTH_COMPONENT).
|
||||
<li>Fixed Gallium Cell driver to buildable, runable state
|
||||
<li>Fixed bad error checking for glFramebufferRenderbuffer(attachment=GL_DEPTH_STENCIL_ATTACHMENT).
|
||||
<li>Fixed incorrect Z coordinate handling in "meta" glDraw/CopyPixels.
|
||||
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=23670">Bug
|
||||
#23670</a>.</li>
|
||||
|
||||
<li>Assorted i965 driver fixes.
|
||||
Including but not limited to:
|
||||
<ul>
|
||||
<li>Fix scissoring when width or height is
|
||||
0. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27643">Bug
|
||||
#27643</a>.
|
||||
<li>Fix bit allocation for number of color regions for
|
||||
ARB_draw_buffers.</li>
|
||||
<li>Set the correct provoking vertex for clipped first-mode
|
||||
trifans. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=24470">Bug
|
||||
#24470</a>.</li>
|
||||
<li>Use <code>R16G16B16A16_FLOAT</code> for 3-component half-float.</li>
|
||||
<li>Fix assertion for surface tile offset usage on Ironlake.</li>
|
||||
<li>Fix cube map layouts on Ironlake.</li>
|
||||
<li>When an RB gets a new region, clear the old from the state
|
||||
cache. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=24119">Bug
|
||||
#24119</a>.</li>
|
||||
<li>Reject shaders with uninlined function calls instead of hanging.</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Assorted i915 driver fixes. Including but not limited to:
|
||||
<ul>
|
||||
<li>Fixed texture LOD clamping in i915 driver.
|
||||
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=24846">Bug
|
||||
#24846</a>.</li>
|
||||
<li>Fix off-by-one for drawing rectangle.
|
||||
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=27408">Bug
|
||||
#27408</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Fixed hangs in etracer on 830 and 845
|
||||
chipsets. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=26557">Bug
|
||||
#26557</a>.</li>
|
||||
<li>Fixed tiling of small textures on all Intel drivers.</li>
|
||||
<li>Fixed crash in Savage driver when using <code>_mesa_CopyTexImage2D</code>.
|
||||
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=27652">Bug
|
||||
#27652</a>.</li>
|
||||
|
||||
<li>Assorted GLX fixes. Including but not limited to:
|
||||
<ul>
|
||||
<li>Fixed <code>__glXInitializeVisualConfigFromTags</code>'s handling of
|
||||
unrecognized fbconfig tags.</li>
|
||||
<li>Fixed regression with <code>GLX_USE_GL</code>.
|
||||
<li>Fixed config chooser logic for 'mask' matching.</li>
|
||||
<li>Report swap events correctly in direct rendered case (DRI2)</li>
|
||||
<li>Fixed build with dri2proto which doesn't define
|
||||
<code>X_DRI2SwapInterval</code>.</li>
|
||||
<li>Get <code>GLX_SCREEN</code> first in <code>__glXQueryContextInfo</code>.
|
||||
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=14245">Bug
|
||||
#14245</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Assorted GLSL fixes. Including but not limited to:
|
||||
<ul>
|
||||
<li>Change variable declared assertion into conditional in GLSL
|
||||
compiler. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27921">Bug
|
||||
#27921</a>.</li>
|
||||
<li>Fix instruction indexing
|
||||
bugs. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27566">Bug
|
||||
#27566</a>.</li>
|
||||
<li>Updated uniform location / offset encoding to be more like
|
||||
other implementations.</li>
|
||||
<li>Don't overwrite a driver's shader infolog with generic failure
|
||||
message.</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Fixed OSMesa build for 16 and 32-bit color channel depth.
|
||||
<li>Fixed OSMesa build with hidden symbol visibility. libOSMesa no longer links to libGL.
|
||||
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=28305">Bug
|
||||
#28305</a>.
|
||||
<li>Fixed handling of multiple render targets in fixed-function
|
||||
texture envrionmnent programs.</li>
|
||||
<li>Fixed conversion errors in <code>signed_rgba8888[rev]</code> texel
|
||||
fetch.</li>
|
||||
<li>Don't set srcLevel on <code>GL_TEXTURE_RECTANGLE_ARB</code> targets.</li>
|
||||
<li>Various build fixes for OpenBSD.</li>
|
||||
<li>Various build fixes for OS X.</li>
|
||||
<li>Various build fixes for GCC 3.3.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<p>None.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
89
docs/relnotes-7.8.3.html
Normal file
89
docs/relnotes-7.8.3.html
Normal file
@@ -0,0 +1,89 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.8.3 Release Notes / (date tbd)</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.8.3 is a bug fix release which fixes bugs found since the 7.8.2 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.8.3 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>
|
||||
x MesaLib-7.8.3.tar.gz
|
||||
x MesaLib-7.8.3.tar.bz2
|
||||
x MesaLib-7.8.3.zip
|
||||
x MesaDemos-7.8.3.tar.gz
|
||||
x MesaDemos-7.8.3.tar.bz2
|
||||
x MesaDemos-7.8.3.zip
|
||||
x MesaGLUT-7.8.3.tar.gz
|
||||
x MesaGLUT-7.8.3.tar.bz2
|
||||
x MesaGLUT-7.8.3.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None.</p>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>The radeon driver should use less memory when searching for a valid mip
|
||||
image.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Fix unsupported FB with D24S8 (bug
|
||||
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=23670">29116</a>)</li>
|
||||
<li>Fix ReadPixels crash when reading depth/stencil from an FBO</li>
|
||||
<li>Fixed a bug rendering to 16-bit buffers using swrast.</li>
|
||||
<li>Fixed a state tracker/TGSI bug that caused crashes when using Windows'
|
||||
memory debugging features.</li>
|
||||
<li>Fixed an issue rendering to 32-bit channels with swrast (bug
|
||||
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=29487">29487</a>)</li>
|
||||
<li>GLSL: fix indirect <TT>gl_TextureMatrix</TT> addressing (bug
|
||||
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=28967">28967</a>)</li>
|
||||
<li>GLSL: fix for bug
|
||||
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=27216">27216</a></li>
|
||||
<li>GLSL: fix zw fragcoord entries in some cases (bug
|
||||
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=29183">29183</a>)</li>
|
||||
<li>Fix texture env generation in some cases (bug
|
||||
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=28169">28169</a>)</li>
|
||||
<li>osmesa: a fix for calling <TT>OSMesaMakeCurrent</TT> twice was applied (bug
|
||||
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=10966">10966</a></li>
|
||||
<li>A bug was fixed which could cause Mesa to ignore the
|
||||
<TT>MESA_EXTENSION_OVERRIDE</TT> environment variable.</li>
|
||||
<li>A bug related to specular highlights on backfaces was fixed.</li>
|
||||
<li>A radeon-specific issue with <TT>glCopyTex(Sub)Image</TT> was
|
||||
corrected.</li>
|
||||
<li>radeon/wine: flush command stream in more cases, fixing wine d3d9
|
||||
tests.</li>
|
||||
<li>r600: fix sin+cos normalization.</li>
|
||||
<li>r600: (properly) ignore <TT>GL_COORD_REPLACE</TT> when point sprites are
|
||||
disabled.</li>
|
||||
<li>radeon: avoid flushing when the context is not current.</li>
|
||||
<li>r300c: a bug affecting unaligned BOs was fixed.</li>
|
||||
<li>r300c: a hardlock caused by ARB_half_float_vertex incorrectly advertised on some chipsets.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -13,6 +13,7 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="relnotes-7.8.3.html">7.8.3 release notes</A>
|
||||
<LI><A HREF="relnotes-7.8.2.html">7.8.2 release notes</A>
|
||||
<LI><A HREF="relnotes-7.8.1.html">7.8.1 release notes</A>
|
||||
<LI><A HREF="relnotes-7.8.html">7.8 release notes</A>
|
||||
|
@@ -56,6 +56,7 @@
|
||||
#define glBeginOcclusionQueryNV MANGLE(BeginOcclusionQueryNV)
|
||||
#define glBeginPerfMonitorAMD MANGLE(BeginPerfMonitorAMD)
|
||||
#define glBeginQueryARB MANGLE(BeginQueryARB)
|
||||
#define glBeginQueryIndexed MANGLE(BeginQueryIndexed)
|
||||
#define glBeginQuery MANGLE(BeginQuery)
|
||||
#define glBeginTransformFeedbackEXT MANGLE(BeginTransformFeedbackEXT)
|
||||
#define glBeginTransformFeedback MANGLE(BeginTransformFeedback)
|
||||
@@ -75,6 +76,7 @@
|
||||
#define glBindBufferRange MANGLE(BindBufferRange)
|
||||
#define glBindBufferRangeNV MANGLE(BindBufferRangeNV)
|
||||
#define glBindFragDataLocationEXT MANGLE(BindFragDataLocationEXT)
|
||||
#define glBindFragDataLocationIndexed MANGLE(BindFragDataLocationIndexed)
|
||||
#define glBindFragDataLocation MANGLE(BindFragDataLocation)
|
||||
#define glBindFragmentShaderATI MANGLE(BindFragmentShaderATI)
|
||||
#define glBindFramebufferEXT MANGLE(BindFramebufferEXT)
|
||||
@@ -87,10 +89,12 @@
|
||||
#define glBindProgramNV MANGLE(BindProgramNV)
|
||||
#define glBindRenderbufferEXT MANGLE(BindRenderbufferEXT)
|
||||
#define glBindRenderbuffer MANGLE(BindRenderbuffer)
|
||||
#define glBindSampler MANGLE(BindSampler)
|
||||
#define glBindTexGenParameterEXT MANGLE(BindTexGenParameterEXT)
|
||||
#define glBindTextureEXT MANGLE(BindTextureEXT)
|
||||
#define glBindTexture MANGLE(BindTexture)
|
||||
#define glBindTextureUnitParameterEXT MANGLE(BindTextureUnitParameterEXT)
|
||||
#define glBindTransformFeedback MANGLE(BindTransformFeedback)
|
||||
#define glBindTransformFeedbackNV MANGLE(BindTransformFeedbackNV)
|
||||
#define glBindVertexArrayAPPLE MANGLE(BindVertexArrayAPPLE)
|
||||
#define glBindVertexArray MANGLE(BindVertexArray)
|
||||
@@ -215,6 +219,10 @@
|
||||
#define glColorMaskIndexedEXT MANGLE(ColorMaskIndexedEXT)
|
||||
#define glColorMask MANGLE(ColorMask)
|
||||
#define glColorMaterial MANGLE(ColorMaterial)
|
||||
#define glColorP3ui MANGLE(ColorP3ui)
|
||||
#define glColorP3uiv MANGLE(ColorP3uiv)
|
||||
#define glColorP4ui MANGLE(ColorP4ui)
|
||||
#define glColorP4uiv MANGLE(ColorP4uiv)
|
||||
#define glColorPointerEXT MANGLE(ColorPointerEXT)
|
||||
#define glColorPointerListIBM MANGLE(ColorPointerListIBM)
|
||||
#define glColorPointer MANGLE(ColorPointer)
|
||||
@@ -236,6 +244,7 @@
|
||||
#define glCombinerParameterivNV MANGLE(CombinerParameterivNV)
|
||||
#define glCombinerStageParameterfvNV MANGLE(CombinerStageParameterfvNV)
|
||||
#define glCompileShaderARB MANGLE(CompileShaderARB)
|
||||
#define glCompileShaderIncludeARB MANGLE(CompileShaderIncludeARB)
|
||||
#define glCompileShader MANGLE(CompileShader)
|
||||
#define glCompressedMultiTexImage1DEXT MANGLE(CompressedMultiTexImage1DEXT)
|
||||
#define glCompressedMultiTexImage2DEXT MANGLE(CompressedMultiTexImage2DEXT)
|
||||
@@ -326,6 +335,7 @@
|
||||
#define glDeleteFramebuffersEXT MANGLE(DeleteFramebuffersEXT)
|
||||
#define glDeleteFramebuffers MANGLE(DeleteFramebuffers)
|
||||
#define glDeleteLists MANGLE(DeleteLists)
|
||||
#define glDeleteNamedStringARB MANGLE(DeleteNamedStringARB)
|
||||
#define glDeleteObjectARB MANGLE(DeleteObjectARB)
|
||||
#define glDeleteOcclusionQueriesNV MANGLE(DeleteOcclusionQueriesNV)
|
||||
#define glDeletePerfMonitorsAMD MANGLE(DeletePerfMonitorsAMD)
|
||||
@@ -336,10 +346,12 @@
|
||||
#define glDeleteQueries MANGLE(DeleteQueries)
|
||||
#define glDeleteRenderbuffersEXT MANGLE(DeleteRenderbuffersEXT)
|
||||
#define glDeleteRenderbuffers MANGLE(DeleteRenderbuffers)
|
||||
#define glDeleteSamplers MANGLE(DeleteSamplers)
|
||||
#define glDeleteShader MANGLE(DeleteShader)
|
||||
#define glDeleteSync MANGLE(DeleteSync)
|
||||
#define glDeleteTexturesEXT MANGLE(DeleteTexturesEXT)
|
||||
#define glDeleteTextures MANGLE(DeleteTextures)
|
||||
#define glDeleteTransformFeedbacks MANGLE(DeleteTransformFeedbacks)
|
||||
#define glDeleteTransformFeedbacksNV MANGLE(DeleteTransformFeedbacksNV)
|
||||
#define glDeleteVertexArraysAPPLE MANGLE(DeleteVertexArraysAPPLE)
|
||||
#define glDeleteVertexArrays MANGLE(DeleteVertexArrays)
|
||||
@@ -363,6 +375,7 @@
|
||||
#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB)
|
||||
#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray)
|
||||
#define glDrawArraysEXT MANGLE(DrawArraysEXT)
|
||||
#define glDrawArraysIndirect MANGLE(DrawArraysIndirect)
|
||||
#define glDrawArraysInstancedARB MANGLE(DrawArraysInstancedARB)
|
||||
#define glDrawArraysInstancedEXT MANGLE(DrawArraysInstancedEXT)
|
||||
#define glDrawArraysInstanced MANGLE(DrawArraysInstanced)
|
||||
@@ -374,6 +387,7 @@
|
||||
#define glDrawElementArrayAPPLE MANGLE(DrawElementArrayAPPLE)
|
||||
#define glDrawElementArrayATI MANGLE(DrawElementArrayATI)
|
||||
#define glDrawElementsBaseVertex MANGLE(DrawElementsBaseVertex)
|
||||
#define glDrawElementsIndirect MANGLE(DrawElementsIndirect)
|
||||
#define glDrawElementsInstancedARB MANGLE(DrawElementsInstancedARB)
|
||||
#define glDrawElementsInstancedBaseVertex MANGLE(DrawElementsInstancedBaseVertex)
|
||||
#define glDrawElementsInstancedEXT MANGLE(DrawElementsInstancedEXT)
|
||||
@@ -386,7 +400,9 @@
|
||||
#define glDrawRangeElementsBaseVertex MANGLE(DrawRangeElementsBaseVertex)
|
||||
#define glDrawRangeElementsEXT MANGLE(DrawRangeElementsEXT)
|
||||
#define glDrawRangeElements MANGLE(DrawRangeElements)
|
||||
#define glDrawTransformFeedback MANGLE(DrawTransformFeedback)
|
||||
#define glDrawTransformFeedbackNV MANGLE(DrawTransformFeedbackNV)
|
||||
#define glDrawTransformFeedbackStream MANGLE(DrawTransformFeedbackStream)
|
||||
#define glEdgeFlagFormatNV MANGLE(EdgeFlagFormatNV)
|
||||
#define glEdgeFlag MANGLE(EdgeFlag)
|
||||
#define glEdgeFlagPointerEXT MANGLE(EdgeFlagPointerEXT)
|
||||
@@ -414,6 +430,7 @@
|
||||
#define glEndOcclusionQueryNV MANGLE(EndOcclusionQueryNV)
|
||||
#define glEndPerfMonitorAMD MANGLE(EndPerfMonitorAMD)
|
||||
#define glEndQueryARB MANGLE(EndQueryARB)
|
||||
#define glEndQueryIndexed MANGLE(EndQueryIndexed)
|
||||
#define glEndQuery MANGLE(EndQuery)
|
||||
#define glEndTransformFeedbackEXT MANGLE(EndTransformFeedbackEXT)
|
||||
#define glEndTransformFeedback MANGLE(EndTransformFeedback)
|
||||
@@ -498,7 +515,6 @@
|
||||
#define glFramebufferTextureEXT MANGLE(FramebufferTextureEXT)
|
||||
#define glFramebufferTextureFaceARB MANGLE(FramebufferTextureFaceARB)
|
||||
#define glFramebufferTextureFaceEXT MANGLE(FramebufferTextureFaceEXT)
|
||||
#define glFramebufferTextureFace MANGLE(FramebufferTextureFace)
|
||||
#define glFramebufferTextureLayerARB MANGLE(FramebufferTextureLayerARB)
|
||||
#define glFramebufferTextureLayerEXT MANGLE(FramebufferTextureLayerEXT)
|
||||
#define glFramebufferTextureLayer MANGLE(FramebufferTextureLayer)
|
||||
@@ -529,15 +545,20 @@
|
||||
#define glGenQueries MANGLE(GenQueries)
|
||||
#define glGenRenderbuffersEXT MANGLE(GenRenderbuffersEXT)
|
||||
#define glGenRenderbuffers MANGLE(GenRenderbuffers)
|
||||
#define glGenSamplers MANGLE(GenSamplers)
|
||||
#define glGenSymbolsEXT MANGLE(GenSymbolsEXT)
|
||||
#define glGenTexturesEXT MANGLE(GenTexturesEXT)
|
||||
#define glGenTextures MANGLE(GenTextures)
|
||||
#define glGenTransformFeedbacks MANGLE(GenTransformFeedbacks)
|
||||
#define glGenTransformFeedbacksNV MANGLE(GenTransformFeedbacksNV)
|
||||
#define glGenVertexArraysAPPLE MANGLE(GenVertexArraysAPPLE)
|
||||
#define glGenVertexArrays MANGLE(GenVertexArrays)
|
||||
#define glGenVertexShadersEXT MANGLE(GenVertexShadersEXT)
|
||||
#define glGetActiveAttribARB MANGLE(GetActiveAttribARB)
|
||||
#define glGetActiveAttrib MANGLE(GetActiveAttrib)
|
||||
#define glGetActiveSubroutineName MANGLE(GetActiveSubroutineName)
|
||||
#define glGetActiveSubroutineUniformiv MANGLE(GetActiveSubroutineUniformiv)
|
||||
#define glGetActiveSubroutineUniformName MANGLE(GetActiveSubroutineUniformName)
|
||||
#define glGetActiveUniformARB MANGLE(GetActiveUniformARB)
|
||||
#define glGetActiveUniformBlockiv MANGLE(GetActiveUniformBlockiv)
|
||||
#define glGetActiveUniformBlockName MANGLE(GetActiveUniformBlockName)
|
||||
@@ -599,6 +620,7 @@
|
||||
#define glGetFloatIndexedvEXT MANGLE(GetFloatIndexedvEXT)
|
||||
#define glGetFloatv MANGLE(GetFloatv)
|
||||
#define glGetFogFuncSGIS MANGLE(GetFogFuncSGIS)
|
||||
#define glGetFragDataIndex MANGLE(GetFragDataIndex)
|
||||
#define glGetFragDataLocationEXT MANGLE(GetFragDataLocationEXT)
|
||||
#define glGetFragDataLocation MANGLE(GetFragDataLocation)
|
||||
#define glGetFragmentLightfvSGIX MANGLE(GetFragmentLightfvSGIX)
|
||||
@@ -678,6 +700,8 @@
|
||||
#define glGetNamedProgramLocalParameterIuivEXT MANGLE(GetNamedProgramLocalParameterIuivEXT)
|
||||
#define glGetNamedProgramStringEXT MANGLE(GetNamedProgramStringEXT)
|
||||
#define glGetNamedRenderbufferParameterivEXT MANGLE(GetNamedRenderbufferParameterivEXT)
|
||||
#define glGetNamedStringARB MANGLE(GetNamedStringARB)
|
||||
#define glGetNamedStringivARB MANGLE(GetNamedStringivARB)
|
||||
#define glGetObjectBufferfvATI MANGLE(GetObjectBufferfvATI)
|
||||
#define glGetObjectBufferivATI MANGLE(GetObjectBufferivATI)
|
||||
#define glGetObjectParameterfvARB MANGLE(GetObjectParameterfvARB)
|
||||
@@ -717,18 +741,26 @@
|
||||
#define glGetProgramParameterdvNV MANGLE(GetProgramParameterdvNV)
|
||||
#define glGetProgramParameterfvNV MANGLE(GetProgramParameterfvNV)
|
||||
#define glGetProgramRegisterfvMESA MANGLE(GetProgramRegisterfvMESA)
|
||||
#define glGetProgramStageiv MANGLE(GetProgramStageiv)
|
||||
#define glGetProgramStringARB MANGLE(GetProgramStringARB)
|
||||
#define glGetProgramStringNV MANGLE(GetProgramStringNV)
|
||||
#define glGetQueryIndexediv MANGLE(GetQueryIndexediv)
|
||||
#define glGetQueryivARB MANGLE(GetQueryivARB)
|
||||
#define glGetQueryiv MANGLE(GetQueryiv)
|
||||
#define glGetQueryObjecti64vEXT MANGLE(GetQueryObjecti64vEXT)
|
||||
#define glGetQueryObjecti64v MANGLE(GetQueryObjecti64v)
|
||||
#define glGetQueryObjectivARB MANGLE(GetQueryObjectivARB)
|
||||
#define glGetQueryObjectiv MANGLE(GetQueryObjectiv)
|
||||
#define glGetQueryObjectui64vEXT MANGLE(GetQueryObjectui64vEXT)
|
||||
#define glGetQueryObjectui64v MANGLE(GetQueryObjectui64v)
|
||||
#define glGetQueryObjectuivARB MANGLE(GetQueryObjectuivARB)
|
||||
#define glGetQueryObjectuiv MANGLE(GetQueryObjectuiv)
|
||||
#define glGetRenderbufferParameterivEXT MANGLE(GetRenderbufferParameterivEXT)
|
||||
#define glGetRenderbufferParameteriv MANGLE(GetRenderbufferParameteriv)
|
||||
#define glGetSamplerParameterfv MANGLE(GetSamplerParameterfv)
|
||||
#define glGetSamplerParameterIfv MANGLE(GetSamplerParameterIfv)
|
||||
#define glGetSamplerParameterIiv MANGLE(GetSamplerParameterIiv)
|
||||
#define glGetSamplerParameteriv MANGLE(GetSamplerParameteriv)
|
||||
#define glGetSeparableFilterEXT MANGLE(GetSeparableFilterEXT)
|
||||
#define glGetSeparableFilter MANGLE(GetSeparableFilter)
|
||||
#define glGetShaderInfoLog MANGLE(GetShaderInfoLog)
|
||||
@@ -738,6 +770,8 @@
|
||||
#define glGetSharpenTexFuncSGIS MANGLE(GetSharpenTexFuncSGIS)
|
||||
#define glGetStringi MANGLE(GetStringi)
|
||||
#define glGetString MANGLE(GetString)
|
||||
#define glGetSubroutineIndex MANGLE(GetSubroutineIndex)
|
||||
#define glGetSubroutineUniformLocation MANGLE(GetSubroutineUniformLocation)
|
||||
#define glGetSynciv MANGLE(GetSynciv)
|
||||
#define glGetTexBumpParameterfvATI MANGLE(GetTexBumpParameterfvATI)
|
||||
#define glGetTexBumpParameterivATI MANGLE(GetTexBumpParameterivATI)
|
||||
@@ -770,6 +804,7 @@
|
||||
#define glGetTransformFeedbackVaryingNV MANGLE(GetTransformFeedbackVaryingNV)
|
||||
#define glGetUniformBlockIndex MANGLE(GetUniformBlockIndex)
|
||||
#define glGetUniformBufferSizeEXT MANGLE(GetUniformBufferSizeEXT)
|
||||
#define glGetUniformdv MANGLE(GetUniformdv)
|
||||
#define glGetUniformfvARB MANGLE(GetUniformfvARB)
|
||||
#define glGetUniformfv MANGLE(GetUniformfv)
|
||||
#define glGetUniformIndices MANGLE(GetUniformIndices)
|
||||
@@ -778,6 +813,7 @@
|
||||
#define glGetUniformLocationARB MANGLE(GetUniformLocationARB)
|
||||
#define glGetUniformLocation MANGLE(GetUniformLocation)
|
||||
#define glGetUniformOffsetEXT MANGLE(GetUniformOffsetEXT)
|
||||
#define glGetUniformSubroutineuiv MANGLE(GetUniformSubroutineuiv)
|
||||
#define glGetUniformui64vNV MANGLE(GetUniformui64vNV)
|
||||
#define glGetUniformuivEXT MANGLE(GetUniformuivEXT)
|
||||
#define glGetUniformuiv MANGLE(GetUniformuiv)
|
||||
@@ -865,6 +901,7 @@
|
||||
#define glIsFramebuffer MANGLE(IsFramebuffer)
|
||||
#define glIsList MANGLE(IsList)
|
||||
#define glIsNamedBufferResidentNV MANGLE(IsNamedBufferResidentNV)
|
||||
#define glIsNamedStringARB MANGLE(IsNamedStringARB)
|
||||
#define glIsObjectBufferATI MANGLE(IsObjectBufferATI)
|
||||
#define glIsOcclusionQueryNV MANGLE(IsOcclusionQueryNV)
|
||||
#define glIsProgramARB MANGLE(IsProgramARB)
|
||||
@@ -874,10 +911,12 @@
|
||||
#define glIsQuery MANGLE(IsQuery)
|
||||
#define glIsRenderbufferEXT MANGLE(IsRenderbufferEXT)
|
||||
#define glIsRenderbuffer MANGLE(IsRenderbuffer)
|
||||
#define glIsSampler MANGLE(IsSampler)
|
||||
#define glIsShader MANGLE(IsShader)
|
||||
#define glIsSync MANGLE(IsSync)
|
||||
#define glIsTextureEXT MANGLE(IsTextureEXT)
|
||||
#define glIsTexture MANGLE(IsTexture)
|
||||
#define glIsTransformFeedback MANGLE(IsTransformFeedback)
|
||||
#define glIsTransformFeedbackNV MANGLE(IsTransformFeedbackNV)
|
||||
#define glIsVariantEnabledEXT MANGLE(IsVariantEnabledEXT)
|
||||
#define glIsVertexArrayAPPLE MANGLE(IsVertexArrayAPPLE)
|
||||
@@ -915,6 +954,8 @@
|
||||
#define glLogicOp MANGLE(LogicOp)
|
||||
#define glMakeBufferNonResidentNV MANGLE(MakeBufferNonResidentNV)
|
||||
#define glMakeBufferResidentNV MANGLE(MakeBufferResidentNV)
|
||||
#define glMakeNamedBufferNonResidentNV MANGLE(MakeNamedBufferNonResidentNV)
|
||||
#define glMakeNamedBufferResidentNV MANGLE(MakeNamedBufferResidentNV)
|
||||
#define glMap1d MANGLE(Map1d)
|
||||
#define glMap1f MANGLE(Map1f)
|
||||
#define glMap2d MANGLE(Map2d)
|
||||
@@ -1048,6 +1089,14 @@
|
||||
#define glMultiTexCoord4s MANGLE(MultiTexCoord4s)
|
||||
#define glMultiTexCoord4svARB MANGLE(MultiTexCoord4svARB)
|
||||
#define glMultiTexCoord4sv MANGLE(MultiTexCoord4sv)
|
||||
#define glMultiTexCoordP1ui MANGLE(MultiTexCoordP1ui)
|
||||
#define glMultiTexCoordP1uiv MANGLE(MultiTexCoordP1uiv)
|
||||
#define glMultiTexCoordP2ui MANGLE(MultiTexCoordP2ui)
|
||||
#define glMultiTexCoordP2uiv MANGLE(MultiTexCoordP2uiv)
|
||||
#define glMultiTexCoordP3ui MANGLE(MultiTexCoordP3ui)
|
||||
#define glMultiTexCoordP3uiv MANGLE(MultiTexCoordP3uiv)
|
||||
#define glMultiTexCoordP4ui MANGLE(MultiTexCoordP4ui)
|
||||
#define glMultiTexCoordP4uiv MANGLE(MultiTexCoordP4uiv)
|
||||
#define glMultiTexCoordPointerEXT MANGLE(MultiTexCoordPointerEXT)
|
||||
#define glMultiTexEnvfEXT MANGLE(MultiTexEnvfEXT)
|
||||
#define glMultiTexEnvfvEXT MANGLE(MultiTexEnvfvEXT)
|
||||
@@ -1087,8 +1136,6 @@
|
||||
#define glNamedFramebufferTextureEXT MANGLE(NamedFramebufferTextureEXT)
|
||||
#define glNamedFramebufferTextureFaceEXT MANGLE(NamedFramebufferTextureFaceEXT)
|
||||
#define glNamedFramebufferTextureLayerEXT MANGLE(NamedFramebufferTextureLayerEXT)
|
||||
#define glNamedMakeBufferNonResidentNV MANGLE(NamedMakeBufferNonResidentNV)
|
||||
#define glNamedMakeBufferResidentNV MANGLE(NamedMakeBufferResidentNV)
|
||||
#define glNamedProgramLocalParameter4dEXT MANGLE(NamedProgramLocalParameter4dEXT)
|
||||
#define glNamedProgramLocalParameter4dvEXT MANGLE(NamedProgramLocalParameter4dvEXT)
|
||||
#define glNamedProgramLocalParameter4fEXT MANGLE(NamedProgramLocalParameter4fEXT)
|
||||
@@ -1104,6 +1151,7 @@
|
||||
#define glNamedRenderbufferStorageEXT MANGLE(NamedRenderbufferStorageEXT)
|
||||
#define glNamedRenderbufferStorageMultisampleCoverageEXT MANGLE(NamedRenderbufferStorageMultisampleCoverageEXT)
|
||||
#define glNamedRenderbufferStorageMultisampleEXT MANGLE(NamedRenderbufferStorageMultisampleEXT)
|
||||
#define glNamedStringARB MANGLE(NamedStringARB)
|
||||
#define glNewList MANGLE(NewList)
|
||||
#define glNewObjectBufferATI MANGLE(NewObjectBufferATI)
|
||||
#define glNormal3b MANGLE(Normal3b)
|
||||
@@ -1121,6 +1169,8 @@
|
||||
#define glNormal3s MANGLE(Normal3s)
|
||||
#define glNormal3sv MANGLE(Normal3sv)
|
||||
#define glNormalFormatNV MANGLE(NormalFormatNV)
|
||||
#define glNormalP3ui MANGLE(NormalP3ui)
|
||||
#define glNormalP3uiv MANGLE(NormalP3uiv)
|
||||
#define glNormalPointerEXT MANGLE(NormalPointerEXT)
|
||||
#define glNormalPointerListIBM MANGLE(NormalPointerListIBM)
|
||||
#define glNormalPointer MANGLE(NormalPointer)
|
||||
@@ -1140,6 +1190,9 @@
|
||||
#define glOrtho MANGLE(Ortho)
|
||||
#define glPassTexCoordATI MANGLE(PassTexCoordATI)
|
||||
#define glPassThrough MANGLE(PassThrough)
|
||||
#define glPatchParameterfv MANGLE(PatchParameterfv)
|
||||
#define glPatchParameteri MANGLE(PatchParameteri)
|
||||
#define glPauseTransformFeedback MANGLE(PauseTransformFeedback)
|
||||
#define glPauseTransformFeedbackNV MANGLE(PauseTransformFeedbackNV)
|
||||
#define glPixelDataRangeNV MANGLE(PixelDataRangeNV)
|
||||
#define glPixelMapfv MANGLE(PixelMapfv)
|
||||
@@ -1231,38 +1284,55 @@
|
||||
#define glProgramParameters4dvNV MANGLE(ProgramParameters4dvNV)
|
||||
#define glProgramParameters4fvNV MANGLE(ProgramParameters4fvNV)
|
||||
#define glProgramStringARB MANGLE(ProgramStringARB)
|
||||
#define glProgramUniform1dEXT MANGLE(ProgramUniform1dEXT)
|
||||
#define glProgramUniform1dvEXT MANGLE(ProgramUniform1dvEXT)
|
||||
#define glProgramUniform1fEXT MANGLE(ProgramUniform1fEXT)
|
||||
#define glProgramUniform1fvEXT MANGLE(ProgramUniform1fvEXT)
|
||||
#define glProgramUniform1iEXT MANGLE(ProgramUniform1iEXT)
|
||||
#define glProgramUniform1ivEXT MANGLE(ProgramUniform1ivEXT)
|
||||
#define glProgramUniform1uiEXT MANGLE(ProgramUniform1uiEXT)
|
||||
#define glProgramUniform1uivEXT MANGLE(ProgramUniform1uivEXT)
|
||||
#define glProgramUniform2dEXT MANGLE(ProgramUniform2dEXT)
|
||||
#define glProgramUniform2dvEXT MANGLE(ProgramUniform2dvEXT)
|
||||
#define glProgramUniform2fEXT MANGLE(ProgramUniform2fEXT)
|
||||
#define glProgramUniform2fvEXT MANGLE(ProgramUniform2fvEXT)
|
||||
#define glProgramUniform2iEXT MANGLE(ProgramUniform2iEXT)
|
||||
#define glProgramUniform2ivEXT MANGLE(ProgramUniform2ivEXT)
|
||||
#define glProgramUniform2uiEXT MANGLE(ProgramUniform2uiEXT)
|
||||
#define glProgramUniform2uivEXT MANGLE(ProgramUniform2uivEXT)
|
||||
#define glProgramUniform3dEXT MANGLE(ProgramUniform3dEXT)
|
||||
#define glProgramUniform3dvEXT MANGLE(ProgramUniform3dvEXT)
|
||||
#define glProgramUniform3fEXT MANGLE(ProgramUniform3fEXT)
|
||||
#define glProgramUniform3fvEXT MANGLE(ProgramUniform3fvEXT)
|
||||
#define glProgramUniform3iEXT MANGLE(ProgramUniform3iEXT)
|
||||
#define glProgramUniform3ivEXT MANGLE(ProgramUniform3ivEXT)
|
||||
#define glProgramUniform3uiEXT MANGLE(ProgramUniform3uiEXT)
|
||||
#define glProgramUniform3uivEXT MANGLE(ProgramUniform3uivEXT)
|
||||
#define glProgramUniform4dEXT MANGLE(ProgramUniform4dEXT)
|
||||
#define glProgramUniform4dvEXT MANGLE(ProgramUniform4dvEXT)
|
||||
#define glProgramUniform4fEXT MANGLE(ProgramUniform4fEXT)
|
||||
#define glProgramUniform4fvEXT MANGLE(ProgramUniform4fvEXT)
|
||||
#define glProgramUniform4iEXT MANGLE(ProgramUniform4iEXT)
|
||||
#define glProgramUniform4ivEXT MANGLE(ProgramUniform4ivEXT)
|
||||
#define glProgramUniform4uiEXT MANGLE(ProgramUniform4uiEXT)
|
||||
#define glProgramUniform4uivEXT MANGLE(ProgramUniform4uivEXT)
|
||||
#define glProgramUniformMatrix2dvEXT MANGLE(ProgramUniformMatrix2dvEXT)
|
||||
#define glProgramUniformMatrix2fvEXT MANGLE(ProgramUniformMatrix2fvEXT)
|
||||
#define glProgramUniformMatrix2x3dvEXT MANGLE(ProgramUniformMatrix2x3dvEXT)
|
||||
#define glProgramUniformMatrix2x3fvEXT MANGLE(ProgramUniformMatrix2x3fvEXT)
|
||||
#define glProgramUniformMatrix2x4dvEXT MANGLE(ProgramUniformMatrix2x4dvEXT)
|
||||
#define glProgramUniformMatrix2x4fvEXT MANGLE(ProgramUniformMatrix2x4fvEXT)
|
||||
#define glProgramUniformMatrix3dvEXT MANGLE(ProgramUniformMatrix3dvEXT)
|
||||
#define glProgramUniformMatrix3fvEXT MANGLE(ProgramUniformMatrix3fvEXT)
|
||||
#define glProgramUniformMatrix3x2dvEXT MANGLE(ProgramUniformMatrix3x2dvEXT)
|
||||
#define glProgramUniformMatrix3x2fvEXT MANGLE(ProgramUniformMatrix3x2fvEXT)
|
||||
#define glProgramUniformMatrix3x4dvEXT MANGLE(ProgramUniformMatrix3x4dvEXT)
|
||||
#define glProgramUniformMatrix3x4fvEXT MANGLE(ProgramUniformMatrix3x4fvEXT)
|
||||
#define glProgramUniformMatrix4dvEXT MANGLE(ProgramUniformMatrix4dvEXT)
|
||||
#define glProgramUniformMatrix4fvEXT MANGLE(ProgramUniformMatrix4fvEXT)
|
||||
#define glProgramUniformMatrix4x2dvEXT MANGLE(ProgramUniformMatrix4x2dvEXT)
|
||||
#define glProgramUniformMatrix4x2fvEXT MANGLE(ProgramUniformMatrix4x2fvEXT)
|
||||
#define glProgramUniformMatrix4x3dvEXT MANGLE(ProgramUniformMatrix4x3dvEXT)
|
||||
#define glProgramUniformMatrix4x3fvEXT MANGLE(ProgramUniformMatrix4x3fvEXT)
|
||||
#define glProgramUniformui64NV MANGLE(ProgramUniformui64NV)
|
||||
#define glProgramUniformui64vNV MANGLE(ProgramUniformui64vNV)
|
||||
@@ -1274,6 +1344,7 @@
|
||||
#define glPushClientAttrib MANGLE(PushClientAttrib)
|
||||
#define glPushMatrix MANGLE(PushMatrix)
|
||||
#define glPushName MANGLE(PushName)
|
||||
#define glQueryCounter MANGLE(QueryCounter)
|
||||
#define glRasterPos2d MANGLE(RasterPos2d)
|
||||
#define glRasterPos2dv MANGLE(RasterPos2dv)
|
||||
#define glRasterPos2f MANGLE(RasterPos2f)
|
||||
@@ -1345,6 +1416,7 @@
|
||||
#define glResetMinmaxEXT MANGLE(ResetMinmaxEXT)
|
||||
#define glResetMinmax MANGLE(ResetMinmax)
|
||||
#define glResizeBuffersMESA MANGLE(ResizeBuffersMESA)
|
||||
#define glResumeTransformFeedback MANGLE(ResumeTransformFeedback)
|
||||
#define glResumeTransformFeedbackNV MANGLE(ResumeTransformFeedbackNV)
|
||||
#define glRotated MANGLE(Rotated)
|
||||
#define glRotatef MANGLE(Rotatef)
|
||||
@@ -1357,6 +1429,12 @@
|
||||
#define glSampleMaskSGIS MANGLE(SampleMaskSGIS)
|
||||
#define glSamplePatternEXT MANGLE(SamplePatternEXT)
|
||||
#define glSamplePatternSGIS MANGLE(SamplePatternSGIS)
|
||||
#define glSamplerParameterf MANGLE(SamplerParameterf)
|
||||
#define glSamplerParameterfv MANGLE(SamplerParameterfv)
|
||||
#define glSamplerParameterIiv MANGLE(SamplerParameterIiv)
|
||||
#define glSamplerParameteri MANGLE(SamplerParameteri)
|
||||
#define glSamplerParameterIuiv MANGLE(SamplerParameterIuiv)
|
||||
#define glSamplerParameteriv MANGLE(SamplerParameteriv)
|
||||
#define glScaled MANGLE(Scaled)
|
||||
#define glScalef MANGLE(Scalef)
|
||||
#define glScissor MANGLE(Scissor)
|
||||
@@ -1395,6 +1473,8 @@
|
||||
#define glSecondaryColor3usvEXT MANGLE(SecondaryColor3usvEXT)
|
||||
#define glSecondaryColor3usv MANGLE(SecondaryColor3usv)
|
||||
#define glSecondaryColorFormatNV MANGLE(SecondaryColorFormatNV)
|
||||
#define glSecondaryColorP3ui MANGLE(SecondaryColorP3ui)
|
||||
#define glSecondaryColorP3uiv MANGLE(SecondaryColorP3uiv)
|
||||
#define glSecondaryColorPointerEXT MANGLE(SecondaryColorPointerEXT)
|
||||
#define glSecondaryColorPointerListIBM MANGLE(SecondaryColorPointerListIBM)
|
||||
#define glSecondaryColorPointer MANGLE(SecondaryColorPointer)
|
||||
@@ -1509,6 +1589,14 @@
|
||||
#define glTexCoord4s MANGLE(TexCoord4s)
|
||||
#define glTexCoord4sv MANGLE(TexCoord4sv)
|
||||
#define glTexCoordFormatNV MANGLE(TexCoordFormatNV)
|
||||
#define glTexCoordP1ui MANGLE(TexCoordP1ui)
|
||||
#define glTexCoordP1uiv MANGLE(TexCoordP1uiv)
|
||||
#define glTexCoordP2ui MANGLE(TexCoordP2ui)
|
||||
#define glTexCoordP2uiv MANGLE(TexCoordP2uiv)
|
||||
#define glTexCoordP3ui MANGLE(TexCoordP3ui)
|
||||
#define glTexCoordP3uiv MANGLE(TexCoordP3uiv)
|
||||
#define glTexCoordP4ui MANGLE(TexCoordP4ui)
|
||||
#define glTexCoordP4uiv MANGLE(TexCoordP4uiv)
|
||||
#define glTexCoordPointerEXT MANGLE(TexCoordPointerEXT)
|
||||
#define glTexCoordPointerListIBM MANGLE(TexCoordPointerListIBM)
|
||||
#define glTexCoordPointer MANGLE(TexCoordPointer)
|
||||
@@ -1574,6 +1662,8 @@
|
||||
#define glTransformFeedbackVaryingsNV MANGLE(TransformFeedbackVaryingsNV)
|
||||
#define glTranslated MANGLE(Translated)
|
||||
#define glTranslatef MANGLE(Translatef)
|
||||
#define glUniform1d MANGLE(Uniform1d)
|
||||
#define glUniform1dv MANGLE(Uniform1dv)
|
||||
#define glUniform1fARB MANGLE(Uniform1fARB)
|
||||
#define glUniform1f MANGLE(Uniform1f)
|
||||
#define glUniform1fvARB MANGLE(Uniform1fvARB)
|
||||
@@ -1586,6 +1676,8 @@
|
||||
#define glUniform1ui MANGLE(Uniform1ui)
|
||||
#define glUniform1uivEXT MANGLE(Uniform1uivEXT)
|
||||
#define glUniform1uiv MANGLE(Uniform1uiv)
|
||||
#define glUniform2d MANGLE(Uniform2d)
|
||||
#define glUniform2dv MANGLE(Uniform2dv)
|
||||
#define glUniform2fARB MANGLE(Uniform2fARB)
|
||||
#define glUniform2f MANGLE(Uniform2f)
|
||||
#define glUniform2fvARB MANGLE(Uniform2fvARB)
|
||||
@@ -1598,6 +1690,8 @@
|
||||
#define glUniform2ui MANGLE(Uniform2ui)
|
||||
#define glUniform2uivEXT MANGLE(Uniform2uivEXT)
|
||||
#define glUniform2uiv MANGLE(Uniform2uiv)
|
||||
#define glUniform3d MANGLE(Uniform3d)
|
||||
#define glUniform3dv MANGLE(Uniform3dv)
|
||||
#define glUniform3fARB MANGLE(Uniform3fARB)
|
||||
#define glUniform3f MANGLE(Uniform3f)
|
||||
#define glUniform3fvARB MANGLE(Uniform3fvARB)
|
||||
@@ -1610,6 +1704,8 @@
|
||||
#define glUniform3ui MANGLE(Uniform3ui)
|
||||
#define glUniform3uivEXT MANGLE(Uniform3uivEXT)
|
||||
#define glUniform3uiv MANGLE(Uniform3uiv)
|
||||
#define glUniform4d MANGLE(Uniform4d)
|
||||
#define glUniform4dv MANGLE(Uniform4dv)
|
||||
#define glUniform4fARB MANGLE(Uniform4fARB)
|
||||
#define glUniform4f MANGLE(Uniform4f)
|
||||
#define glUniform4fvARB MANGLE(Uniform4fvARB)
|
||||
@@ -1624,18 +1720,28 @@
|
||||
#define glUniform4uiv MANGLE(Uniform4uiv)
|
||||
#define glUniformBlockBinding MANGLE(UniformBlockBinding)
|
||||
#define glUniformBufferEXT MANGLE(UniformBufferEXT)
|
||||
#define glUniformMatrix2dv MANGLE(UniformMatrix2dv)
|
||||
#define glUniformMatrix2fvARB MANGLE(UniformMatrix2fvARB)
|
||||
#define glUniformMatrix2fv MANGLE(UniformMatrix2fv)
|
||||
#define glUniformMatrix2x3dv MANGLE(UniformMatrix2x3dv)
|
||||
#define glUniformMatrix2x3fv MANGLE(UniformMatrix2x3fv)
|
||||
#define glUniformMatrix2x4dv MANGLE(UniformMatrix2x4dv)
|
||||
#define glUniformMatrix2x4fv MANGLE(UniformMatrix2x4fv)
|
||||
#define glUniformMatrix3dv MANGLE(UniformMatrix3dv)
|
||||
#define glUniformMatrix3fvARB MANGLE(UniformMatrix3fvARB)
|
||||
#define glUniformMatrix3fv MANGLE(UniformMatrix3fv)
|
||||
#define glUniformMatrix3x2dv MANGLE(UniformMatrix3x2dv)
|
||||
#define glUniformMatrix3x2fv MANGLE(UniformMatrix3x2fv)
|
||||
#define glUniformMatrix3x4dv MANGLE(UniformMatrix3x4dv)
|
||||
#define glUniformMatrix3x4fv MANGLE(UniformMatrix3x4fv)
|
||||
#define glUniformMatrix4dv MANGLE(UniformMatrix4dv)
|
||||
#define glUniformMatrix4fvARB MANGLE(UniformMatrix4fvARB)
|
||||
#define glUniformMatrix4fv MANGLE(UniformMatrix4fv)
|
||||
#define glUniformMatrix4x2dv MANGLE(UniformMatrix4x2dv)
|
||||
#define glUniformMatrix4x2fv MANGLE(UniformMatrix4x2fv)
|
||||
#define glUniformMatrix4x3dv MANGLE(UniformMatrix4x3dv)
|
||||
#define glUniformMatrix4x3fv MANGLE(UniformMatrix4x3fv)
|
||||
#define glUniformSubroutinesuiv MANGLE(UniformSubroutinesuiv)
|
||||
#define glUniformui64NV MANGLE(Uniformui64NV)
|
||||
#define glUniformui64vNV MANGLE(Uniformui64vNV)
|
||||
#define glUnlockArraysEXT MANGLE(UnlockArraysEXT)
|
||||
@@ -1844,6 +1950,14 @@
|
||||
#define glVertexAttribIFormatNV MANGLE(VertexAttribIFormatNV)
|
||||
#define glVertexAttribIPointerEXT MANGLE(VertexAttribIPointerEXT)
|
||||
#define glVertexAttribIPointer MANGLE(VertexAttribIPointer)
|
||||
#define glVertexAttribP1ui MANGLE(VertexAttribP1ui)
|
||||
#define glVertexAttribP1uiv MANGLE(VertexAttribP1uiv)
|
||||
#define glVertexAttribP2ui MANGLE(VertexAttribP2ui)
|
||||
#define glVertexAttribP2uiv MANGLE(VertexAttribP2uiv)
|
||||
#define glVertexAttribP3ui MANGLE(VertexAttribP3ui)
|
||||
#define glVertexAttribP3uiv MANGLE(VertexAttribP3uiv)
|
||||
#define glVertexAttribP4ui MANGLE(VertexAttribP4ui)
|
||||
#define glVertexAttribP4uiv MANGLE(VertexAttribP4uiv)
|
||||
#define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB)
|
||||
#define glVertexAttribPointer MANGLE(VertexAttribPointer)
|
||||
#define glVertexAttribPointerNV MANGLE(VertexAttribPointerNV)
|
||||
@@ -1868,6 +1982,12 @@
|
||||
#define glVertexBlendEnvfATI MANGLE(VertexBlendEnvfATI)
|
||||
#define glVertexBlendEnviATI MANGLE(VertexBlendEnviATI)
|
||||
#define glVertexFormatNV MANGLE(VertexFormatNV)
|
||||
#define glVertexP2ui MANGLE(VertexP2ui)
|
||||
#define glVertexP2uiv MANGLE(VertexP2uiv)
|
||||
#define glVertexP3ui MANGLE(VertexP3ui)
|
||||
#define glVertexP3uiv MANGLE(VertexP3uiv)
|
||||
#define glVertexP4ui MANGLE(VertexP4ui)
|
||||
#define glVertexP4uiv MANGLE(VertexP4uiv)
|
||||
#define glVertexPointerEXT MANGLE(VertexPointerEXT)
|
||||
#define glVertexPointerListIBM MANGLE(VertexPointerListIBM)
|
||||
#define glVertexPointer MANGLE(VertexPointer)
|
||||
|
@@ -60,7 +60,7 @@ xeglgears: xeglgears.o $(HEADERS) $(LIB_DEP)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X11_LIBS)
|
||||
|
||||
xeglthreads: xeglthreads.o $(HEADERS) $(LIB_DEP)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X11_LIBS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -lpthread $(X11_LIBS)
|
||||
|
||||
xegl_tri: xegl_tri.o $(HEADERS) $(LIB_DEP)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X11_LIBS)
|
||||
|
@@ -1331,6 +1331,7 @@ _eglMain(const char *args)
|
||||
if (!dri2_drv)
|
||||
return NULL;
|
||||
|
||||
memset(dri2_drv, 0, sizeof *dri2_drv);
|
||||
_eglInitDriverFallbacks(&dri2_drv->base);
|
||||
dri2_drv->base.API.Initialize = dri2_initialize;
|
||||
dri2_drv->base.API.Terminate = dri2_terminate;
|
||||
|
@@ -125,7 +125,7 @@ vs_ppc_run_linear( struct draw_vertex_shader *base,
|
||||
*/
|
||||
shader->func(inputs_soa, outputs_soa, temps_soa,
|
||||
(float (*)[4]) shader->base.immediates,
|
||||
(const float (*)[4])constants[0],
|
||||
(float (*)[4]) constants[0],
|
||||
ppc_builtin_constants);
|
||||
|
||||
/* convert (up to) four output verts from SoA back to AoS format */
|
||||
|
2
src/gallium/auxiliary/indices/.gitignore
vendored
Normal file
2
src/gallium/auxiliary/indices/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
u_indices_gen.c
|
||||
u_unfilled_gen.c
|
File diff suppressed because it is too large
Load Diff
@@ -1,992 +0,0 @@
|
||||
/* File automatically generated by u_unfilled_gen.py */
|
||||
|
||||
/*
|
||||
* Copyright 2009 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* on the rights to use, copy, modify, merge, publish, distribute, sub
|
||||
* license, and/or sell copies of the Software, and to permit persons to whom
|
||||
* the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Functions to translate and generate index lists
|
||||
*/
|
||||
|
||||
#include "indices/u_indices.h"
|
||||
#include "indices/u_indices_priv.h"
|
||||
#include "pipe/p_compiler.h"
|
||||
#include "util/u_debug.h"
|
||||
#include "pipe/p_defines.h"
|
||||
#include "util/u_memory.h"
|
||||
|
||||
|
||||
static unsigned out_size_idx( unsigned index_size )
|
||||
{
|
||||
switch (index_size) {
|
||||
case 4: return OUT_UINT;
|
||||
case 2: return OUT_USHORT;
|
||||
default: assert(0); return OUT_USHORT;
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned in_size_idx( unsigned index_size )
|
||||
{
|
||||
switch (index_size) {
|
||||
case 4: return IN_UINT;
|
||||
case 2: return IN_USHORT;
|
||||
case 1: return IN_UBYTE;
|
||||
default: assert(0); return IN_UBYTE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static u_generate_func generate_line[OUT_COUNT][PRIM_COUNT];
|
||||
static u_translate_func translate_line[IN_COUNT][OUT_COUNT][PRIM_COUNT];
|
||||
|
||||
|
||||
static void generate_tris_ushort(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i+=3) {
|
||||
(out+j)[0] = (ushort)(i);
|
||||
(out+j)[1] = (ushort)(i+1);
|
||||
(out+j+2)[0] = (ushort)(i+1);
|
||||
(out+j+2)[1] = (ushort)(i+2);
|
||||
(out+j+4)[0] = (ushort)(i+2);
|
||||
(out+j+4)[1] = (ushort)(i);
|
||||
}
|
||||
}
|
||||
static void generate_tristrip_ushort(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)(i);
|
||||
(out+j)[1] = (ushort)(i+1/*+(i&1)*/);
|
||||
(out+j+2)[0] = (ushort)(i+1/*+(i&1)*/);
|
||||
(out+j+2)[1] = (ushort)(i+2/*-(i&1)*/);
|
||||
(out+j+4)[0] = (ushort)(i+2/*-(i&1)*/);
|
||||
(out+j+4)[1] = (ushort)(i);
|
||||
}
|
||||
}
|
||||
static void generate_trifan_ushort(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)(0);
|
||||
(out+j)[1] = (ushort)(i+1);
|
||||
(out+j+2)[0] = (ushort)(i+1);
|
||||
(out+j+2)[1] = (ushort)(i+2);
|
||||
(out+j+4)[0] = (ushort)(i+2);
|
||||
(out+j+4)[1] = (ushort)(0);
|
||||
}
|
||||
}
|
||||
static void generate_quads_ushort(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=4) {
|
||||
(out+j)[0] = (ushort)(i+0);
|
||||
(out+j)[1] = (ushort)(i+1);
|
||||
(out+j+2)[0] = (ushort)(i+1);
|
||||
(out+j+2)[1] = (ushort)(i+2);
|
||||
(out+j+4)[0] = (ushort)(i+2);
|
||||
(out+j+4)[1] = (ushort)(i+3);
|
||||
(out+j+6)[0] = (ushort)(i+3);
|
||||
(out+j+6)[1] = (ushort)(i+0);
|
||||
}
|
||||
}
|
||||
static void generate_quadstrip_ushort(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=2) {
|
||||
(out+j)[0] = (ushort)(i+2);
|
||||
(out+j)[1] = (ushort)(i+0);
|
||||
(out+j+2)[0] = (ushort)(i+0);
|
||||
(out+j+2)[1] = (ushort)(i+1);
|
||||
(out+j+4)[0] = (ushort)(i+1);
|
||||
(out+j+4)[1] = (ushort)(i+3);
|
||||
(out+j+6)[0] = (ushort)(i+3);
|
||||
(out+j+6)[1] = (ushort)(i+2);
|
||||
}
|
||||
}
|
||||
static void generate_polygon_ushort(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)(0);
|
||||
(out+j)[1] = (ushort)(i+1);
|
||||
(out+j+2)[0] = (ushort)(i+1);
|
||||
(out+j+2)[1] = (ushort)(i+2);
|
||||
(out+j+4)[0] = (ushort)(i+2);
|
||||
(out+j+4)[1] = (ushort)(0);
|
||||
}
|
||||
}
|
||||
static void generate_tris_uint(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i+=3) {
|
||||
(out+j)[0] = (uint)(i);
|
||||
(out+j)[1] = (uint)(i+1);
|
||||
(out+j+2)[0] = (uint)(i+1);
|
||||
(out+j+2)[1] = (uint)(i+2);
|
||||
(out+j+4)[0] = (uint)(i+2);
|
||||
(out+j+4)[1] = (uint)(i);
|
||||
}
|
||||
}
|
||||
static void generate_tristrip_uint(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)(i);
|
||||
(out+j)[1] = (uint)(i+1/*+(i&1)*/);
|
||||
(out+j+2)[0] = (uint)(i+1/*+(i&1)*/);
|
||||
(out+j+2)[1] = (uint)(i+2/*-(i&1)*/);
|
||||
(out+j+4)[0] = (uint)(i+2/*-(i&1)*/);
|
||||
(out+j+4)[1] = (uint)(i);
|
||||
}
|
||||
}
|
||||
static void generate_trifan_uint(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)(0);
|
||||
(out+j)[1] = (uint)(i+1);
|
||||
(out+j+2)[0] = (uint)(i+1);
|
||||
(out+j+2)[1] = (uint)(i+2);
|
||||
(out+j+4)[0] = (uint)(i+2);
|
||||
(out+j+4)[1] = (uint)(0);
|
||||
}
|
||||
}
|
||||
static void generate_quads_uint(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=4) {
|
||||
(out+j)[0] = (uint)(i+0);
|
||||
(out+j)[1] = (uint)(i+1);
|
||||
(out+j+2)[0] = (uint)(i+1);
|
||||
(out+j+2)[1] = (uint)(i+2);
|
||||
(out+j+4)[0] = (uint)(i+2);
|
||||
(out+j+4)[1] = (uint)(i+3);
|
||||
(out+j+6)[0] = (uint)(i+3);
|
||||
(out+j+6)[1] = (uint)(i+0);
|
||||
}
|
||||
}
|
||||
static void generate_quadstrip_uint(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=2) {
|
||||
(out+j)[0] = (uint)(i+2);
|
||||
(out+j)[1] = (uint)(i+0);
|
||||
(out+j+2)[0] = (uint)(i+0);
|
||||
(out+j+2)[1] = (uint)(i+1);
|
||||
(out+j+4)[0] = (uint)(i+1);
|
||||
(out+j+4)[1] = (uint)(i+3);
|
||||
(out+j+6)[0] = (uint)(i+3);
|
||||
(out+j+6)[1] = (uint)(i+2);
|
||||
}
|
||||
}
|
||||
static void generate_polygon_uint(
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)(0);
|
||||
(out+j)[1] = (uint)(i+1);
|
||||
(out+j+2)[0] = (uint)(i+1);
|
||||
(out+j+2)[1] = (uint)(i+2);
|
||||
(out+j+4)[0] = (uint)(i+2);
|
||||
(out+j+4)[1] = (uint)(0);
|
||||
}
|
||||
}
|
||||
static void translate_tris_ubyte2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i+=3) {
|
||||
(out+j)[0] = (ushort)in[i];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_tristrip_ubyte2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[i];
|
||||
(out+j)[1] = (ushort)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[0] = (ushort)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[1] = (ushort)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[0] = (ushort)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[1] = (ushort)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_trifan_ubyte2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_quads_ubyte2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=4) {
|
||||
(out+j)[0] = (ushort)in[i+0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[i+3];
|
||||
(out+j+6)[0] = (ushort)in[i+3];
|
||||
(out+j+6)[1] = (ushort)in[i+0];
|
||||
}
|
||||
}
|
||||
static void translate_quadstrip_ubyte2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=2) {
|
||||
(out+j)[0] = (ushort)in[i+2];
|
||||
(out+j)[1] = (ushort)in[i+0];
|
||||
(out+j+2)[0] = (ushort)in[i+0];
|
||||
(out+j+2)[1] = (ushort)in[i+1];
|
||||
(out+j+4)[0] = (ushort)in[i+1];
|
||||
(out+j+4)[1] = (ushort)in[i+3];
|
||||
(out+j+6)[0] = (ushort)in[i+3];
|
||||
(out+j+6)[1] = (ushort)in[i+2];
|
||||
}
|
||||
}
|
||||
static void translate_polygon_ubyte2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_tris_ubyte2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i+=3) {
|
||||
(out+j)[0] = (uint)in[i];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_tristrip_ubyte2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[i];
|
||||
(out+j)[1] = (uint)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[0] = (uint)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[1] = (uint)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[0] = (uint)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[1] = (uint)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_trifan_ubyte2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_quads_ubyte2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=4) {
|
||||
(out+j)[0] = (uint)in[i+0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[i+3];
|
||||
(out+j+6)[0] = (uint)in[i+3];
|
||||
(out+j+6)[1] = (uint)in[i+0];
|
||||
}
|
||||
}
|
||||
static void translate_quadstrip_ubyte2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=2) {
|
||||
(out+j)[0] = (uint)in[i+2];
|
||||
(out+j)[1] = (uint)in[i+0];
|
||||
(out+j+2)[0] = (uint)in[i+0];
|
||||
(out+j+2)[1] = (uint)in[i+1];
|
||||
(out+j+4)[0] = (uint)in[i+1];
|
||||
(out+j+4)[1] = (uint)in[i+3];
|
||||
(out+j+6)[0] = (uint)in[i+3];
|
||||
(out+j+6)[1] = (uint)in[i+2];
|
||||
}
|
||||
}
|
||||
static void translate_polygon_ubyte2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ubyte*in = (const ubyte*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_tris_ushort2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i+=3) {
|
||||
(out+j)[0] = (ushort)in[i];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_tristrip_ushort2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[i];
|
||||
(out+j)[1] = (ushort)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[0] = (ushort)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[1] = (ushort)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[0] = (ushort)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[1] = (ushort)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_trifan_ushort2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_quads_ushort2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=4) {
|
||||
(out+j)[0] = (ushort)in[i+0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[i+3];
|
||||
(out+j+6)[0] = (ushort)in[i+3];
|
||||
(out+j+6)[1] = (ushort)in[i+0];
|
||||
}
|
||||
}
|
||||
static void translate_quadstrip_ushort2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=2) {
|
||||
(out+j)[0] = (ushort)in[i+2];
|
||||
(out+j)[1] = (ushort)in[i+0];
|
||||
(out+j+2)[0] = (ushort)in[i+0];
|
||||
(out+j+2)[1] = (ushort)in[i+1];
|
||||
(out+j+4)[0] = (ushort)in[i+1];
|
||||
(out+j+4)[1] = (ushort)in[i+3];
|
||||
(out+j+6)[0] = (ushort)in[i+3];
|
||||
(out+j+6)[1] = (ushort)in[i+2];
|
||||
}
|
||||
}
|
||||
static void translate_polygon_ushort2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_tris_ushort2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i+=3) {
|
||||
(out+j)[0] = (uint)in[i];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_tristrip_ushort2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[i];
|
||||
(out+j)[1] = (uint)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[0] = (uint)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[1] = (uint)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[0] = (uint)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[1] = (uint)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_trifan_ushort2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_quads_ushort2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=4) {
|
||||
(out+j)[0] = (uint)in[i+0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[i+3];
|
||||
(out+j+6)[0] = (uint)in[i+3];
|
||||
(out+j+6)[1] = (uint)in[i+0];
|
||||
}
|
||||
}
|
||||
static void translate_quadstrip_ushort2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=2) {
|
||||
(out+j)[0] = (uint)in[i+2];
|
||||
(out+j)[1] = (uint)in[i+0];
|
||||
(out+j+2)[0] = (uint)in[i+0];
|
||||
(out+j+2)[1] = (uint)in[i+1];
|
||||
(out+j+4)[0] = (uint)in[i+1];
|
||||
(out+j+4)[1] = (uint)in[i+3];
|
||||
(out+j+6)[0] = (uint)in[i+3];
|
||||
(out+j+6)[1] = (uint)in[i+2];
|
||||
}
|
||||
}
|
||||
static void translate_polygon_ushort2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const ushort*in = (const ushort*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_tris_uint2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i+=3) {
|
||||
(out+j)[0] = (ushort)in[i];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_tristrip_uint2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[i];
|
||||
(out+j)[1] = (ushort)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[0] = (ushort)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[1] = (ushort)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[0] = (ushort)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[1] = (ushort)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_trifan_uint2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_quads_uint2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=4) {
|
||||
(out+j)[0] = (ushort)in[i+0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[i+3];
|
||||
(out+j+6)[0] = (ushort)in[i+3];
|
||||
(out+j+6)[1] = (ushort)in[i+0];
|
||||
}
|
||||
}
|
||||
static void translate_quadstrip_uint2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=2) {
|
||||
(out+j)[0] = (ushort)in[i+2];
|
||||
(out+j)[1] = (ushort)in[i+0];
|
||||
(out+j+2)[0] = (ushort)in[i+0];
|
||||
(out+j+2)[1] = (ushort)in[i+1];
|
||||
(out+j+4)[0] = (ushort)in[i+1];
|
||||
(out+j+4)[1] = (ushort)in[i+3];
|
||||
(out+j+6)[0] = (ushort)in[i+3];
|
||||
(out+j+6)[1] = (ushort)in[i+2];
|
||||
}
|
||||
}
|
||||
static void translate_polygon_uint2ushort(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
ushort *out = (ushort*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (ushort)in[0];
|
||||
(out+j)[1] = (ushort)in[i+1];
|
||||
(out+j+2)[0] = (ushort)in[i+1];
|
||||
(out+j+2)[1] = (ushort)in[i+2];
|
||||
(out+j+4)[0] = (ushort)in[i+2];
|
||||
(out+j+4)[1] = (ushort)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_tris_uint2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i+=3) {
|
||||
(out+j)[0] = (uint)in[i];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_tristrip_uint2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[i];
|
||||
(out+j)[1] = (uint)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[0] = (uint)in[i+1/*+(i&1)*/];
|
||||
(out+j+2)[1] = (uint)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[0] = (uint)in[i+2/*-(i&1)*/];
|
||||
(out+j+4)[1] = (uint)in[i];
|
||||
}
|
||||
}
|
||||
static void translate_trifan_uint2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[0];
|
||||
}
|
||||
}
|
||||
static void translate_quads_uint2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=4) {
|
||||
(out+j)[0] = (uint)in[i+0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[i+3];
|
||||
(out+j+6)[0] = (uint)in[i+3];
|
||||
(out+j+6)[1] = (uint)in[i+0];
|
||||
}
|
||||
}
|
||||
static void translate_quadstrip_uint2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=8, i+=2) {
|
||||
(out+j)[0] = (uint)in[i+2];
|
||||
(out+j)[1] = (uint)in[i+0];
|
||||
(out+j+2)[0] = (uint)in[i+0];
|
||||
(out+j+2)[1] = (uint)in[i+1];
|
||||
(out+j+4)[0] = (uint)in[i+1];
|
||||
(out+j+4)[1] = (uint)in[i+3];
|
||||
(out+j+6)[0] = (uint)in[i+3];
|
||||
(out+j+6)[1] = (uint)in[i+2];
|
||||
}
|
||||
}
|
||||
static void translate_polygon_uint2uint(
|
||||
const void * _in,
|
||||
unsigned nr,
|
||||
void *_out )
|
||||
{
|
||||
const uint*in = (const uint*)_in;
|
||||
uint *out = (uint*)_out;
|
||||
unsigned i, j;
|
||||
(void)j;
|
||||
for (j = i = 0; j < nr; j+=6, i++) {
|
||||
(out+j)[0] = (uint)in[0];
|
||||
(out+j)[1] = (uint)in[i+1];
|
||||
(out+j+2)[0] = (uint)in[i+1];
|
||||
(out+j+2)[1] = (uint)in[i+2];
|
||||
(out+j+4)[0] = (uint)in[i+2];
|
||||
(out+j+4)[1] = (uint)in[0];
|
||||
}
|
||||
}
|
||||
void u_unfilled_init( void )
|
||||
{
|
||||
static int firsttime = 1;
|
||||
if (!firsttime) return;
|
||||
firsttime = 0;
|
||||
generate_line[OUT_USHORT][PIPE_PRIM_TRIANGLES] = generate_tris_ushort;
|
||||
generate_line[OUT_USHORT][PIPE_PRIM_TRIANGLE_FAN] = generate_trifan_ushort;
|
||||
generate_line[OUT_USHORT][PIPE_PRIM_TRIANGLE_STRIP] = generate_tristrip_ushort;
|
||||
generate_line[OUT_USHORT][PIPE_PRIM_QUADS] = generate_quads_ushort;
|
||||
generate_line[OUT_USHORT][PIPE_PRIM_QUAD_STRIP] = generate_quadstrip_ushort;
|
||||
generate_line[OUT_USHORT][PIPE_PRIM_POLYGON] = generate_polygon_ushort;
|
||||
generate_line[OUT_UINT][PIPE_PRIM_TRIANGLES] = generate_tris_uint;
|
||||
generate_line[OUT_UINT][PIPE_PRIM_TRIANGLE_FAN] = generate_trifan_uint;
|
||||
generate_line[OUT_UINT][PIPE_PRIM_TRIANGLE_STRIP] = generate_tristrip_uint;
|
||||
generate_line[OUT_UINT][PIPE_PRIM_QUADS] = generate_quads_uint;
|
||||
generate_line[OUT_UINT][PIPE_PRIM_QUAD_STRIP] = generate_quadstrip_uint;
|
||||
generate_line[OUT_UINT][PIPE_PRIM_POLYGON] = generate_polygon_uint;
|
||||
translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_TRIANGLES] = translate_tris_ubyte2ushort;
|
||||
translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ubyte2ushort;
|
||||
translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ubyte2ushort;
|
||||
translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_QUADS] = translate_quads_ubyte2ushort;
|
||||
translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ubyte2ushort;
|
||||
translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_POLYGON] = translate_polygon_ubyte2ushort;
|
||||
translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_TRIANGLES] = translate_tris_ubyte2uint;
|
||||
translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ubyte2uint;
|
||||
translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ubyte2uint;
|
||||
translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_QUADS] = translate_quads_ubyte2uint;
|
||||
translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ubyte2uint;
|
||||
translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_POLYGON] = translate_polygon_ubyte2uint;
|
||||
translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_TRIANGLES] = translate_tris_ushort2ushort;
|
||||
translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ushort2ushort;
|
||||
translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ushort2ushort;
|
||||
translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_QUADS] = translate_quads_ushort2ushort;
|
||||
translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ushort2ushort;
|
||||
translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_POLYGON] = translate_polygon_ushort2ushort;
|
||||
translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_TRIANGLES] = translate_tris_ushort2uint;
|
||||
translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ushort2uint;
|
||||
translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ushort2uint;
|
||||
translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_QUADS] = translate_quads_ushort2uint;
|
||||
translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ushort2uint;
|
||||
translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_POLYGON] = translate_polygon_ushort2uint;
|
||||
translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_TRIANGLES] = translate_tris_uint2ushort;
|
||||
translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_uint2ushort;
|
||||
translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_uint2ushort;
|
||||
translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_QUADS] = translate_quads_uint2ushort;
|
||||
translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_uint2ushort;
|
||||
translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_POLYGON] = translate_polygon_uint2ushort;
|
||||
translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_TRIANGLES] = translate_tris_uint2uint;
|
||||
translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_uint2uint;
|
||||
translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_uint2uint;
|
||||
translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_QUADS] = translate_quads_uint2uint;
|
||||
translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_uint2uint;
|
||||
translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_POLYGON] = translate_polygon_uint2uint;
|
||||
}
|
||||
#include "indices/u_unfilled_indices.c"
|
@@ -1757,6 +1757,8 @@ void (*x86_get_func( struct x86_function *p ))(void)
|
||||
|
||||
#else
|
||||
|
||||
void x86sse_dummy( void );
|
||||
|
||||
void x86sse_dummy( void )
|
||||
{
|
||||
}
|
||||
|
@@ -1489,6 +1489,12 @@ const struct tgsi_token *ureg_get_tokens( struct ureg_program *ureg,
|
||||
}
|
||||
|
||||
|
||||
void ureg_free_tokens( const struct tgsi_token *tokens )
|
||||
{
|
||||
FREE((struct tgsi_token *)tokens);
|
||||
}
|
||||
|
||||
|
||||
struct ureg_program *ureg_create( unsigned processor )
|
||||
{
|
||||
struct ureg_program *ureg = CALLOC_STRUCT( ureg_program );
|
||||
|
@@ -104,6 +104,10 @@ ureg_get_tokens( struct ureg_program *ureg,
|
||||
unsigned *nr_tokens );
|
||||
|
||||
|
||||
/* Free the tokens created by ureg_get_tokens() */
|
||||
void ureg_free_tokens( const struct tgsi_token *tokens );
|
||||
|
||||
|
||||
void
|
||||
ureg_destroy( struct ureg_program * );
|
||||
|
||||
|
@@ -29,6 +29,8 @@
|
||||
#define PIPE_ATOMIC_ASM_MSVC_X86
|
||||
#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86))
|
||||
#define PIPE_ATOMIC_ASM_GCC_X86
|
||||
#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86_64))
|
||||
#define PIPE_ATOMIC_ASM_GCC_X86_64
|
||||
#elif defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 401)
|
||||
#define PIPE_ATOMIC_GCC_INTRINSIC
|
||||
#else
|
||||
@@ -36,6 +38,51 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(PIPE_ATOMIC_ASM_GCC_X86_64)
|
||||
#define PIPE_ATOMIC "GCC x86_64 assembly"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define p_atomic_set(_v, _i) (*(_v) = (_i))
|
||||
#define p_atomic_read(_v) (*(_v))
|
||||
|
||||
static INLINE boolean
|
||||
p_atomic_dec_zero(int32_t *v)
|
||||
{
|
||||
unsigned char c;
|
||||
|
||||
__asm__ __volatile__("lock; decl %0; sete %1":"+m"(*v), "=qm"(c)
|
||||
::"memory");
|
||||
|
||||
return c != 0;
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
p_atomic_inc(int32_t *v)
|
||||
{
|
||||
__asm__ __volatile__("lock; incl %0":"+m"(*v));
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
p_atomic_dec(int32_t *v)
|
||||
{
|
||||
__asm__ __volatile__("lock; decl %0":"+m"(*v));
|
||||
}
|
||||
|
||||
static INLINE int32_t
|
||||
p_atomic_cmpxchg(int32_t *v, int32_t old, int32_t _new)
|
||||
{
|
||||
return __sync_val_compare_and_swap(v, old, _new);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PIPE_ATOMIC_ASM_GCC_X86_64 */
|
||||
|
||||
|
||||
#if defined(PIPE_ATOMIC_ASM_GCC_X86)
|
||||
|
||||
|
@@ -74,7 +74,7 @@ cell_destroy_context( struct pipe_context *pipe )
|
||||
static struct draw_context *
|
||||
cell_draw_create(struct cell_context *cell)
|
||||
{
|
||||
struct draw_context *draw = draw_create();
|
||||
struct draw_context *draw = draw_create(&cell->pipe);
|
||||
|
||||
#if 0 /* broken */
|
||||
if (getenv("GALLIUM_CELL_VS")) {
|
||||
|
@@ -92,7 +92,6 @@ cell_add_buffer_to_list(struct cell_context *cell,
|
||||
struct cell_buffer_list *list,
|
||||
struct pipe_buffer *buffer)
|
||||
{
|
||||
struct pipe_screen *ps = cell->pipe.screen;
|
||||
struct cell_buffer_node *node = CALLOC_STRUCT(cell_buffer_node);
|
||||
/* create new list node which references the buffer, insert at head */
|
||||
if (node) {
|
||||
|
@@ -197,7 +197,7 @@ cell_bind_rasterizer_state(struct pipe_context *pipe, void *rast)
|
||||
struct cell_context *cell = cell_context(pipe);
|
||||
|
||||
/* pass-through to draw module */
|
||||
draw_set_rasterizer_state(cell->draw, rasterizer);
|
||||
draw_set_rasterizer_state(cell->draw, rasterizer, rast);
|
||||
|
||||
cell->rasterizer = rasterizer;
|
||||
|
||||
|
@@ -16,6 +16,8 @@
|
||||
|
||||
#include "glxinit.h"
|
||||
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
|
||||
typedef struct GLXGenericGetString
|
||||
{
|
||||
CARD8 reqType;
|
||||
@@ -680,3 +682,5 @@ __glXInitialize(Display * dpy)
|
||||
|
||||
return dpyPriv;
|
||||
}
|
||||
|
||||
#endif /* GLX_DIRECT_RENDERING */
|
||||
|
@@ -37,6 +37,8 @@
|
||||
#include "native_x11.h"
|
||||
#include "x11_screen.h"
|
||||
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
|
||||
enum dri2_surface_type {
|
||||
DRI2_SURFACE_TYPE_WINDOW,
|
||||
DRI2_SURFACE_TYPE_PIXMAP,
|
||||
@@ -878,3 +880,15 @@ x11_create_dri2_display(EGLNativeDisplayType dpy,
|
||||
|
||||
return &dri2dpy->base;
|
||||
}
|
||||
|
||||
#else /* GLX_DIRECT_RENDERING */
|
||||
|
||||
struct native_display *
|
||||
x11_create_dri2_display(EGLNativeDisplayType dpy,
|
||||
struct native_event_handler *event_handler,
|
||||
struct drm_api *api)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* GLX_DIRECT_RENDERING */
|
||||
|
@@ -70,7 +70,9 @@ native_create_probe(EGLNativeDisplayType dpy)
|
||||
xscr = x11_screen_create(xdpy, scr);
|
||||
if (xscr) {
|
||||
if (x11_screen_support(xscr, X11_SCREEN_EXTENSION_DRI2)) {
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
driver_name = x11_screen_probe_dri2(xscr, NULL, NULL);
|
||||
#endif
|
||||
if (driver_name)
|
||||
nprobe->data = strdup(driver_name);
|
||||
}
|
||||
|
@@ -39,8 +39,10 @@
|
||||
#include "glxinit.h"
|
||||
|
||||
struct x11_screen {
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
/* dummy base class */
|
||||
struct __GLXDRIdisplayRec base;
|
||||
#endif
|
||||
|
||||
Display *dpy;
|
||||
int number;
|
||||
@@ -103,15 +105,19 @@ x11_screen_destroy(struct x11_screen *xscr)
|
||||
if (xscr->dri_device)
|
||||
Xfree(xscr->dri_device);
|
||||
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
/* xscr->glx_dpy will be destroyed with the X display */
|
||||
if (xscr->glx_dpy)
|
||||
xscr->glx_dpy->dri2Display = NULL;
|
||||
#endif
|
||||
|
||||
if (xscr->visuals)
|
||||
XFree(xscr->visuals);
|
||||
free(xscr);
|
||||
}
|
||||
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
|
||||
static boolean
|
||||
x11_screen_init_dri2(struct x11_screen *xscr)
|
||||
{
|
||||
@@ -133,6 +139,8 @@ x11_screen_init_glx(struct x11_screen *xscr)
|
||||
return (xscr->glx_dpy != NULL);
|
||||
}
|
||||
|
||||
#endif /* GLX_DIRECT_RENDERING */
|
||||
|
||||
/**
|
||||
* Return true if the screen supports the extension.
|
||||
*/
|
||||
@@ -145,12 +153,14 @@ x11_screen_support(struct x11_screen *xscr, enum x11_screen_extension ext)
|
||||
case X11_SCREEN_EXTENSION_XSHM:
|
||||
supported = XShmQueryExtension(xscr->dpy);
|
||||
break;
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
case X11_SCREEN_EXTENSION_GLX:
|
||||
supported = x11_screen_init_glx(xscr);
|
||||
break;
|
||||
case X11_SCREEN_EXTENSION_DRI2:
|
||||
supported = x11_screen_init_dri2(xscr);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -233,6 +243,39 @@ x11_screen_convert_visual(struct x11_screen *xscr, const XVisualInfo *visual,
|
||||
mode->xRenderable = TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the depth of a drawable.
|
||||
*
|
||||
* Unlike other drawable functions, the drawable needs not be a DRI2 drawable.
|
||||
*/
|
||||
uint
|
||||
x11_drawable_get_depth(struct x11_screen *xscr, Drawable drawable)
|
||||
{
|
||||
unsigned int depth;
|
||||
|
||||
if (drawable != xscr->last_drawable) {
|
||||
Window root;
|
||||
int x, y;
|
||||
unsigned int w, h, border;
|
||||
Status ok;
|
||||
|
||||
ok = XGetGeometry(xscr->dpy, drawable, &root,
|
||||
&x, &y, &w, &h, &border, &depth);
|
||||
if (!ok)
|
||||
depth = 0;
|
||||
|
||||
xscr->last_drawable = drawable;
|
||||
xscr->last_depth = depth;
|
||||
}
|
||||
else {
|
||||
depth = xscr->last_depth;
|
||||
}
|
||||
|
||||
return depth;
|
||||
}
|
||||
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
|
||||
/**
|
||||
* Return the GLX fbconfigs.
|
||||
*/
|
||||
@@ -391,37 +434,6 @@ x11_drawable_get_buffers(struct x11_screen *xscr, Drawable drawable,
|
||||
return (struct x11_drawable_buffer *) dri2bufs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the depth of a drawable.
|
||||
*
|
||||
* Unlike other drawable functions, the drawable needs not be a DRI2 drawable.
|
||||
*/
|
||||
uint
|
||||
x11_drawable_get_depth(struct x11_screen *xscr, Drawable drawable)
|
||||
{
|
||||
unsigned int depth;
|
||||
|
||||
if (drawable != xscr->last_drawable) {
|
||||
Window root;
|
||||
int x, y;
|
||||
unsigned int w, h, border;
|
||||
Status ok;
|
||||
|
||||
ok = XGetGeometry(xscr->dpy, drawable, &root,
|
||||
&x, &y, &w, &h, &border, &depth);
|
||||
if (!ok)
|
||||
depth = 0;
|
||||
|
||||
xscr->last_drawable = drawable;
|
||||
xscr->last_depth = depth;
|
||||
}
|
||||
else {
|
||||
depth = xscr->last_depth;
|
||||
}
|
||||
|
||||
return depth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a mode list of the given size.
|
||||
*/
|
||||
@@ -489,3 +501,5 @@ dri2InvalidateBuffers(Display *dpy, XID drawable)
|
||||
|
||||
xscr->dri_invalidate_buffers(xscr, drawable, xscr->dri_user_data);
|
||||
}
|
||||
|
||||
#endif /* GLX_DIRECT_RENDERING */
|
||||
|
@@ -68,20 +68,18 @@ void
|
||||
x11_screen_convert_visual(struct x11_screen *xscr, const XVisualInfo *visual,
|
||||
__GLcontextModes *mode);
|
||||
|
||||
uint
|
||||
x11_drawable_get_depth(struct x11_screen *xscr, Drawable drawable);
|
||||
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
|
||||
/* GLX */
|
||||
const __GLcontextModes *
|
||||
x11_screen_get_glx_configs(struct x11_screen *xscr);
|
||||
|
||||
const __GLcontextModes *
|
||||
x11_screen_get_glx_visuals(struct x11_screen *xscr);
|
||||
|
||||
const char *
|
||||
x11_screen_probe_dri2(struct x11_screen *xscr, int *major, int *minor);
|
||||
|
||||
int
|
||||
x11_screen_enable_dri2(struct x11_screen *xscr,
|
||||
x11_drawable_invalidate_buffers invalidate_buffers,
|
||||
void *user_data);
|
||||
|
||||
__GLcontextModes *
|
||||
x11_context_modes_create(unsigned count);
|
||||
|
||||
@@ -91,6 +89,15 @@ x11_context_modes_destroy(__GLcontextModes *modes);
|
||||
unsigned
|
||||
x11_context_modes_count(const __GLcontextModes *modes);
|
||||
|
||||
/* DRI2 */
|
||||
const char *
|
||||
x11_screen_probe_dri2(struct x11_screen *xscr, int *major, int *minor);
|
||||
|
||||
int
|
||||
x11_screen_enable_dri2(struct x11_screen *xscr,
|
||||
x11_drawable_invalidate_buffers invalidate_buffers,
|
||||
void *user_data);
|
||||
|
||||
void
|
||||
x11_drawable_enable_dri2(struct x11_screen *xscr,
|
||||
Drawable drawable, boolean on);
|
||||
@@ -105,7 +112,6 @@ x11_drawable_get_buffers(struct x11_screen *xscr, Drawable drawable,
|
||||
int *width, int *height, unsigned int *attachments,
|
||||
boolean with_format, int num_ins, int *num_outs);
|
||||
|
||||
uint
|
||||
x11_drawable_get_depth(struct x11_screen *xscr, Drawable drawable);
|
||||
#endif /* GLX_DIRECT_RENDERING */
|
||||
|
||||
#endif /* _X11_SCREEN_H_ */
|
||||
|
@@ -11,7 +11,7 @@
|
||||
|
||||
EGL_DRIVER_OBJECTS = $(EGL_DRIVER_SOURCES:.c=.o)
|
||||
|
||||
common_LIBS = -ldrm -lm -ldl
|
||||
common_LIBS = -ldrm -lm $(DLOPEN_LIBS)
|
||||
|
||||
x11_ST = $(TOP)/src/gallium/state_trackers/egl/libeglx11.a
|
||||
x11_LIBS = $(common_LIBS) -lX11 -lXext -lXfixes
|
||||
|
@@ -17,7 +17,7 @@ OBJECTS = $(GLW_SOURCES:.c=.o)
|
||||
##### RULES #####
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(INCDIRS) $(CFLAGS) $<
|
||||
$(CC) -c $(INCDIRS) $(CFLAGS) $(GLW_CFLAGS) $<
|
||||
|
||||
|
||||
|
||||
|
@@ -887,9 +887,6 @@ glXCopyContext(Display * dpy, GLXContext source,
|
||||
static Bool
|
||||
__glXIsDirect(Display * dpy, GLXContextID contextID)
|
||||
{
|
||||
#ifdef GLX_USE_APPLEGL /* TODO: apple indirect */
|
||||
return GC_IS_DIRECT(gc);
|
||||
#else
|
||||
#if !defined(USE_XCB)
|
||||
xGLXIsDirectReq *req;
|
||||
xGLXIsDirectReply reply;
|
||||
@@ -925,7 +922,6 @@ __glXIsDirect(Display * dpy, GLXContextID contextID)
|
||||
|
||||
return reply.isDirect;
|
||||
#endif /* USE_XCB */
|
||||
#endif /* GLX_USE_APPLEGL */
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -943,7 +939,11 @@ glXIsDirect(Display * dpy, GLXContext gc)
|
||||
else if (GC_IS_DIRECT(gc)) {
|
||||
return GL_TRUE;
|
||||
}
|
||||
#ifdef GLX_USE_APPLEGL /* TODO: indirect on darwin */
|
||||
return GL_FALSE;
|
||||
#else
|
||||
return __glXIsDirect(dpy, gc->xid);
|
||||
#endif
|
||||
}
|
||||
|
||||
PUBLIC GLXPixmap
|
||||
@@ -1766,6 +1766,15 @@ static int __glXQueryContextInfo(Display * dpy, GLXContext ctx)
|
||||
unsigned i;
|
||||
|
||||
_XRead(dpy, (char *) propList, nPropListBytes);
|
||||
|
||||
/* Look up screen first so we can look up visuals/fbconfigs later */
|
||||
pProp = propList;
|
||||
for (i = 0; i < numValues; i++, pProp += 2)
|
||||
if (pProp[0] == GLX_SCREEN) {
|
||||
ctx->screen = pProp[1];
|
||||
ctx->psc = GetGLXScreenConfigs(dpy, ctx->screen);
|
||||
}
|
||||
|
||||
pProp = propList;
|
||||
for (i = 0; i < numValues; i++) {
|
||||
switch (*pProp++) {
|
||||
@@ -1776,9 +1785,6 @@ static int __glXQueryContextInfo(Display * dpy, GLXContext ctx)
|
||||
ctx->mode =
|
||||
_gl_context_modes_find_visual(ctx->psc->visuals, *pProp++);
|
||||
break;
|
||||
case GLX_SCREEN:
|
||||
ctx->screen = *pProp++;
|
||||
break;
|
||||
case GLX_FBCONFIG_ID:
|
||||
ctx->mode =
|
||||
_gl_context_modes_find_fbconfig(ctx->psc->configs,
|
||||
@@ -1787,6 +1793,7 @@ static int __glXQueryContextInfo(Display * dpy, GLXContext ctx)
|
||||
case GLX_RENDER_TYPE:
|
||||
ctx->renderType = *pProp++;
|
||||
break;
|
||||
case GLX_SCREEN:
|
||||
default:
|
||||
pProp++;
|
||||
continue;
|
||||
|
@@ -584,6 +584,10 @@ __glXInitializeVisualConfigFromTags(__GLcontextModes * config, int count,
|
||||
config->yInverted = *bp++;
|
||||
break;
|
||||
#endif
|
||||
case GLX_USE_GL:
|
||||
if (fbconfig_style_tags)
|
||||
bp++;
|
||||
break;
|
||||
case None:
|
||||
i = count;
|
||||
break;
|
||||
|
@@ -812,6 +812,21 @@ _mesa_meta_end(GLcontext *ctx)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Convert Z from a normalized value in the range [0, 1] to an object-space
|
||||
* Z coordinate in [-1, +1] so that drawing at the new Z position with the
|
||||
* default/identity ortho projection results in the original Z value.
|
||||
* Used by the meta-Clear, Draw/CopyPixels and Bitmap functions where the Z
|
||||
* value comes from the clear value or raster position.
|
||||
*/
|
||||
static INLINE GLfloat
|
||||
invert_z(GLfloat normZ)
|
||||
{
|
||||
GLfloat objZ = 1.0 - 2.0 * normZ;
|
||||
return objZ;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* One-time init for a temp_texture object.
|
||||
* Choose tex target, compute max tex size, etc.
|
||||
@@ -1433,7 +1448,7 @@ _mesa_meta_Clear(GLcontext *ctx, GLbitfield buffers)
|
||||
const GLfloat y0 = (GLfloat) ctx->DrawBuffer->_Ymin;
|
||||
const GLfloat x1 = (GLfloat) ctx->DrawBuffer->_Xmax;
|
||||
const GLfloat y1 = (GLfloat) ctx->DrawBuffer->_Ymax;
|
||||
const GLfloat z = 1.0 - 2.0 * ctx->Depth.Clear;
|
||||
const GLfloat z = invert_z(ctx->Depth.Clear);
|
||||
GLuint i;
|
||||
|
||||
verts[0].x = x0;
|
||||
@@ -1539,7 +1554,7 @@ _mesa_meta_CopyPixels(GLcontext *ctx, GLint srcX, GLint srcY,
|
||||
const GLfloat dstY0 = (GLfloat) dstY;
|
||||
const GLfloat dstX1 = dstX + width * ctx->Pixel.ZoomX;
|
||||
const GLfloat dstY1 = dstY + height * ctx->Pixel.ZoomY;
|
||||
const GLfloat z = ctx->Current.RasterPos[2];
|
||||
const GLfloat z = invert_z(ctx->Current.RasterPos[2]);
|
||||
|
||||
verts[0].x = dstX0;
|
||||
verts[0].y = dstY0;
|
||||
@@ -1828,7 +1843,7 @@ _mesa_meta_DrawPixels(GLcontext *ctx,
|
||||
const GLfloat y0 = (GLfloat) y;
|
||||
const GLfloat x1 = x + width * ctx->Pixel.ZoomX;
|
||||
const GLfloat y1 = y + height * ctx->Pixel.ZoomY;
|
||||
const GLfloat z = ctx->Current.RasterPos[2];
|
||||
const GLfloat z = invert_z(ctx->Current.RasterPos[2]);
|
||||
|
||||
verts[0].x = x0;
|
||||
verts[0].y = y0;
|
||||
@@ -2031,7 +2046,7 @@ _mesa_meta_Bitmap(GLcontext *ctx,
|
||||
const GLfloat y0 = (GLfloat) y;
|
||||
const GLfloat x1 = (GLfloat) (x + width);
|
||||
const GLfloat y1 = (GLfloat) (y + height);
|
||||
const GLfloat z = ctx->Current.RasterPos[2];
|
||||
const GLfloat z = invert_z(ctx->Current.RasterPos[2]);
|
||||
GLuint i;
|
||||
|
||||
verts[0].x = x0;
|
||||
|
@@ -484,7 +484,7 @@ i945_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree * mt,
|
||||
case GL_TEXTURE_1D:
|
||||
case GL_TEXTURE_2D:
|
||||
case GL_TEXTURE_RECTANGLE_ARB:
|
||||
i945_miptree_layout_2d(intel, mt, tiling);
|
||||
i945_miptree_layout_2d(intel, mt, tiling, 1);
|
||||
break;
|
||||
default:
|
||||
_mesa_problem(NULL, "Unexpected tex target in i945_miptree_layout()");
|
||||
|
@@ -281,6 +281,7 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
|
||||
GLenum ws = tObj->WrapS;
|
||||
GLenum wt = tObj->WrapT;
|
||||
GLenum wr = tObj->WrapR;
|
||||
float minlod;
|
||||
|
||||
/* We program 1D textures as 2D textures, so the 2D texcoord could
|
||||
* result in sampling border values if we don't set the T wrap to
|
||||
@@ -321,8 +322,9 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
|
||||
(translate_wrap_mode(wt) << SS3_TCY_ADDR_MODE_SHIFT) |
|
||||
(translate_wrap_mode(wr) << SS3_TCZ_ADDR_MODE_SHIFT));
|
||||
|
||||
minlod = MIN2(tObj->MinLod, tObj->_MaxLevel - tObj->BaseLevel);
|
||||
state[I915_TEXREG_SS3] |= (unit << SS3_TEXTUREMAP_INDEX_SHIFT);
|
||||
state[I915_TEXREG_SS3] |= (U_FIXED(CLAMP(tObj->MinLod, 0.0, 11.0), 4) <<
|
||||
state[I915_TEXREG_SS3] |= (U_FIXED(CLAMP(minlod, 0.0, 11.0), 4) <<
|
||||
SS3_MIN_LOD_SHIFT);
|
||||
|
||||
}
|
||||
|
@@ -627,8 +627,8 @@ i915_set_draw_region(struct intel_context *intel,
|
||||
state->Buffer[I915_DESTREG_DRAWRECT2] = 0;
|
||||
state->Buffer[I915_DESTREG_DRAWRECT3] = (draw_y << 16) | draw_x;
|
||||
state->Buffer[I915_DESTREG_DRAWRECT4] =
|
||||
((ctx->DrawBuffer->Width + draw_x) & 0xffff) |
|
||||
((ctx->DrawBuffer->Height + draw_y) << 16);
|
||||
((ctx->DrawBuffer->Width + draw_x - 1) & 0xffff) |
|
||||
((ctx->DrawBuffer->Height + draw_y - 1) << 16);
|
||||
state->Buffer[I915_DESTREG_DRAWRECT5] = (draw_y << 16) | draw_x;
|
||||
|
||||
I915_STATECHANGE(i915, I915_UPLOAD_BUFFERS);
|
||||
|
@@ -72,7 +72,7 @@ static void compile_clip_prog( struct brw_context *brw,
|
||||
*/
|
||||
c.header_position_offset = ATTR_SIZE;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
delta = 3 * REG_SIZE;
|
||||
else
|
||||
delta = REG_SIZE;
|
||||
@@ -85,7 +85,7 @@ static void compile_clip_prog( struct brw_context *brw,
|
||||
|
||||
c.nr_attrs = brw_count_bits(c.key.attrs);
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
c.nr_regs = (c.nr_attrs + 1) / 2 + 3; /* are vertices packed, or reg-aligned? */
|
||||
else
|
||||
c.nr_regs = (c.nr_attrs + 1) / 2 + 1; /* are vertices packed, or reg-aligned? */
|
||||
@@ -162,7 +162,7 @@ static void upload_clip_prog(struct brw_context *brw)
|
||||
/* _NEW_TRANSFORM */
|
||||
key.nr_userclip = brw_count_bits(ctx->Transform.ClipPlanesEnabled);
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
key.clip_mode = BRW_CLIPMODE_KERNEL_CLIP;
|
||||
else
|
||||
key.clip_mode = BRW_CLIPMODE_NORMAL;
|
||||
|
@@ -102,10 +102,10 @@ clip_unit_create_from_key(struct brw_context *brw,
|
||||
*/
|
||||
assert(key->nr_urb_entries % 2 == 0);
|
||||
|
||||
/* Although up to 16 concurrent Clip threads are allowed on IGDNG,
|
||||
/* Although up to 16 concurrent Clip threads are allowed on Ironlake,
|
||||
* only 2 threads can output VUEs at a time.
|
||||
*/
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
clip.thread4.max_threads = 16 - 1;
|
||||
else
|
||||
clip.thread4.max_threads = 2 - 1;
|
||||
|
@@ -78,7 +78,7 @@ void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
|
||||
for (j = 0; j < 3; j++) {
|
||||
GLuint delta = c->nr_attrs*16 + 32;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
delta = c->nr_attrs * 16 + 32 * 3;
|
||||
|
||||
brw_MOV(&c->func, byte_offset(c->reg.vertex[j], delta), brw_imm_f(0));
|
||||
@@ -177,7 +177,7 @@ void brw_clip_tri_init_vertices( struct brw_clip_compile *c )
|
||||
void brw_clip_tri_flat_shade( struct brw_clip_compile *c )
|
||||
{
|
||||
struct brw_compile *p = &c->func;
|
||||
struct brw_instruction *is_poly;
|
||||
struct brw_instruction *is_poly, *is_trifan;
|
||||
struct brw_reg tmp0 = c->reg.loopcount; /* handy temporary */
|
||||
|
||||
brw_AND(p, tmp0, get_element_ud(c->reg.R0, 2), brw_imm_ud(PRIM_MASK));
|
||||
@@ -195,8 +195,22 @@ void brw_clip_tri_flat_shade( struct brw_clip_compile *c )
|
||||
is_poly = brw_ELSE(p, is_poly);
|
||||
{
|
||||
if (c->key.pv_first) {
|
||||
brw_clip_copy_colors(c, 1, 0);
|
||||
brw_clip_copy_colors(c, 2, 0);
|
||||
brw_CMP(p,
|
||||
vec1(brw_null_reg()),
|
||||
BRW_CONDITIONAL_EQ,
|
||||
tmp0,
|
||||
brw_imm_ud(_3DPRIM_TRIFAN));
|
||||
is_trifan = brw_IF(p, BRW_EXECUTE_1);
|
||||
{
|
||||
brw_clip_copy_colors(c, 0, 1);
|
||||
brw_clip_copy_colors(c, 2, 1);
|
||||
}
|
||||
is_trifan = brw_ELSE(p, is_trifan);
|
||||
{
|
||||
brw_clip_copy_colors(c, 1, 0);
|
||||
brw_clip_copy_colors(c, 2, 0);
|
||||
}
|
||||
brw_ENDIF(p, is_trifan);
|
||||
}
|
||||
else {
|
||||
brw_clip_copy_colors(c, 0, 2);
|
||||
|
@@ -151,7 +151,7 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
|
||||
for (i = 0; i < c->nr_attrs; i++) {
|
||||
GLuint delta = i*16 + 32;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
delta = i * 16 + 32 * 3;
|
||||
|
||||
if (delta == c->offset[VERT_RESULT_EDGE]) {
|
||||
@@ -185,7 +185,7 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
|
||||
if (i & 1) {
|
||||
GLuint delta = i*16 + 32;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
delta = i * 16 + 32 * 3;
|
||||
|
||||
brw_MOV(p, deref_4f(dest_ptr, delta), brw_imm_f(0));
|
||||
|
@@ -150,7 +150,7 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
|
||||
MIN2(ctx->Const.FragmentProgram.MaxNativeParameters,
|
||||
ctx->Const.FragmentProgram.MaxEnvParams);
|
||||
|
||||
if (intel->is_ironlake || intel->is_g4x || intel->gen >= 6) {
|
||||
if (intel->is_g4x || intel->gen >= 5) {
|
||||
brw->CMD_VF_STATISTICS = CMD_VF_STATISTICS_GM45;
|
||||
brw->CMD_PIPELINE_SELECT = CMD_PIPELINE_SELECT_GM45;
|
||||
brw->has_surface_tile_offset = GL_TRUE;
|
||||
@@ -162,7 +162,7 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
|
||||
}
|
||||
|
||||
/* WM maximum threads is number of EUs times number of threads per EU. */
|
||||
if (intel->is_ironlake) {
|
||||
if (intel->gen == 5) {
|
||||
brw->urb.size = 1024;
|
||||
brw->vs_max_threads = 72;
|
||||
brw->wm_max_threads = 12 * 6;
|
||||
|
@@ -674,12 +674,12 @@
|
||||
#define BRW_SAMPLER_MESSAGE_SIMD8_LD 3
|
||||
#define BRW_SAMPLER_MESSAGE_SIMD16_LD 3
|
||||
|
||||
#define BRW_SAMPLER_MESSAGE_SAMPLE_IGDNG 0
|
||||
#define BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_IGDNG 1
|
||||
#define BRW_SAMPLER_MESSAGE_SAMPLE_LOD_IGDNG 2
|
||||
#define BRW_SAMPLER_MESSAGE_SAMPLE_COMPARE_IGDNG 3
|
||||
#define BRW_SAMPLER_MESSAGE_SAMPLE_GEN5 0
|
||||
#define BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_GEN5 1
|
||||
#define BRW_SAMPLER_MESSAGE_SAMPLE_LOD_GEN5 2
|
||||
#define BRW_SAMPLER_MESSAGE_SAMPLE_COMPARE_GEN5 3
|
||||
|
||||
/* for IGDNG only */
|
||||
/* for GEN5 only */
|
||||
#define BRW_SAMPLER_SIMD_MODE_SIMD4X2 0
|
||||
#define BRW_SAMPLER_SIMD_MODE_SIMD8 1
|
||||
#define BRW_SAMPLER_SIMD_MODE_SIMD16 2
|
||||
|
@@ -59,7 +59,7 @@ static GLuint half_float_types[5] = {
|
||||
0,
|
||||
BRW_SURFACEFORMAT_R16_FLOAT,
|
||||
BRW_SURFACEFORMAT_R16G16_FLOAT,
|
||||
0, /* can't seem to render this one */
|
||||
BRW_SURFACEFORMAT_R16G16B16A16_FLOAT,
|
||||
BRW_SURFACEFORMAT_R16G16B16A16_FLOAT
|
||||
};
|
||||
|
||||
@@ -522,7 +522,7 @@ static void brw_emit_vertices(struct brw_context *brw)
|
||||
OUT_RELOC(input->bo,
|
||||
I915_GEM_DOMAIN_VERTEX, 0,
|
||||
input->offset);
|
||||
if (intel->is_ironlake || intel->gen >= 6) {
|
||||
if (intel->gen >= 5) {
|
||||
OUT_RELOC(input->bo,
|
||||
I915_GEM_DOMAIN_VERTEX, 0,
|
||||
input->bo->size - 1);
|
||||
@@ -565,7 +565,7 @@ static void brw_emit_vertices(struct brw_context *brw)
|
||||
(0 << BRW_VE0_SRC_OFFSET_SHIFT));
|
||||
}
|
||||
|
||||
if (intel->is_ironlake || intel->gen >= 6)
|
||||
if (intel->gen >= 5)
|
||||
OUT_BATCH((comp0 << BRW_VE1_COMPONENT_0_SHIFT) |
|
||||
(comp1 << BRW_VE1_COMPONENT_1_SHIFT) |
|
||||
(comp2 << BRW_VE1_COMPONENT_2_SHIFT) |
|
||||
|
@@ -253,19 +253,19 @@ static void brw_set_math_message( struct brw_context *brw,
|
||||
struct intel_context *intel = &brw->intel;
|
||||
brw_set_src1(insn, brw_imm_d(0));
|
||||
|
||||
if (intel->is_ironlake) {
|
||||
insn->bits3.math_igdng.function = function;
|
||||
insn->bits3.math_igdng.int_type = integer_type;
|
||||
insn->bits3.math_igdng.precision = low_precision;
|
||||
insn->bits3.math_igdng.saturate = saturate;
|
||||
insn->bits3.math_igdng.data_type = dataType;
|
||||
insn->bits3.math_igdng.snapshot = 0;
|
||||
insn->bits3.math_igdng.header_present = 0;
|
||||
insn->bits3.math_igdng.response_length = response_length;
|
||||
insn->bits3.math_igdng.msg_length = msg_length;
|
||||
insn->bits3.math_igdng.end_of_thread = 0;
|
||||
insn->bits2.send_igdng.sfid = BRW_MESSAGE_TARGET_MATH;
|
||||
insn->bits2.send_igdng.end_of_thread = 0;
|
||||
if (intel->gen == 5) {
|
||||
insn->bits3.math_gen5.function = function;
|
||||
insn->bits3.math_gen5.int_type = integer_type;
|
||||
insn->bits3.math_gen5.precision = low_precision;
|
||||
insn->bits3.math_gen5.saturate = saturate;
|
||||
insn->bits3.math_gen5.data_type = dataType;
|
||||
insn->bits3.math_gen5.snapshot = 0;
|
||||
insn->bits3.math_gen5.header_present = 0;
|
||||
insn->bits3.math_gen5.response_length = response_length;
|
||||
insn->bits3.math_gen5.msg_length = msg_length;
|
||||
insn->bits3.math_gen5.end_of_thread = 0;
|
||||
insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_MATH;
|
||||
insn->bits2.send_gen5.end_of_thread = 0;
|
||||
} else {
|
||||
insn->bits3.math.function = function;
|
||||
insn->bits3.math.int_type = integer_type;
|
||||
@@ -293,18 +293,18 @@ static void brw_set_ff_sync_message( struct brw_context *brw,
|
||||
{
|
||||
brw_set_src1(insn, brw_imm_d(0));
|
||||
|
||||
insn->bits3.urb_igdng.opcode = 1;
|
||||
insn->bits3.urb_igdng.offset = offset;
|
||||
insn->bits3.urb_igdng.swizzle_control = swizzle_control;
|
||||
insn->bits3.urb_igdng.allocate = allocate;
|
||||
insn->bits3.urb_igdng.used = used;
|
||||
insn->bits3.urb_igdng.complete = complete;
|
||||
insn->bits3.urb_igdng.header_present = 1;
|
||||
insn->bits3.urb_igdng.response_length = response_length;
|
||||
insn->bits3.urb_igdng.msg_length = msg_length;
|
||||
insn->bits3.urb_igdng.end_of_thread = end_of_thread;
|
||||
insn->bits2.send_igdng.sfid = BRW_MESSAGE_TARGET_URB;
|
||||
insn->bits2.send_igdng.end_of_thread = end_of_thread;
|
||||
insn->bits3.urb_gen5.opcode = 1;
|
||||
insn->bits3.urb_gen5.offset = offset;
|
||||
insn->bits3.urb_gen5.swizzle_control = swizzle_control;
|
||||
insn->bits3.urb_gen5.allocate = allocate;
|
||||
insn->bits3.urb_gen5.used = used;
|
||||
insn->bits3.urb_gen5.complete = complete;
|
||||
insn->bits3.urb_gen5.header_present = 1;
|
||||
insn->bits3.urb_gen5.response_length = response_length;
|
||||
insn->bits3.urb_gen5.msg_length = msg_length;
|
||||
insn->bits3.urb_gen5.end_of_thread = end_of_thread;
|
||||
insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_URB;
|
||||
insn->bits2.send_gen5.end_of_thread = end_of_thread;
|
||||
}
|
||||
|
||||
static void brw_set_urb_message( struct brw_context *brw,
|
||||
@@ -321,17 +321,17 @@ static void brw_set_urb_message( struct brw_context *brw,
|
||||
struct intel_context *intel = &brw->intel;
|
||||
brw_set_src1(insn, brw_imm_d(0));
|
||||
|
||||
if (intel->is_ironlake || intel->gen >= 6) {
|
||||
insn->bits3.urb_igdng.opcode = 0; /* ? */
|
||||
insn->bits3.urb_igdng.offset = offset;
|
||||
insn->bits3.urb_igdng.swizzle_control = swizzle_control;
|
||||
insn->bits3.urb_igdng.allocate = allocate;
|
||||
insn->bits3.urb_igdng.used = used; /* ? */
|
||||
insn->bits3.urb_igdng.complete = complete;
|
||||
insn->bits3.urb_igdng.header_present = 1;
|
||||
insn->bits3.urb_igdng.response_length = response_length;
|
||||
insn->bits3.urb_igdng.msg_length = msg_length;
|
||||
insn->bits3.urb_igdng.end_of_thread = end_of_thread;
|
||||
if (intel->gen >= 5) {
|
||||
insn->bits3.urb_gen5.opcode = 0; /* ? */
|
||||
insn->bits3.urb_gen5.offset = offset;
|
||||
insn->bits3.urb_gen5.swizzle_control = swizzle_control;
|
||||
insn->bits3.urb_gen5.allocate = allocate;
|
||||
insn->bits3.urb_gen5.used = used; /* ? */
|
||||
insn->bits3.urb_gen5.complete = complete;
|
||||
insn->bits3.urb_gen5.header_present = 1;
|
||||
insn->bits3.urb_gen5.response_length = response_length;
|
||||
insn->bits3.urb_gen5.msg_length = msg_length;
|
||||
insn->bits3.urb_gen5.end_of_thread = end_of_thread;
|
||||
if (intel->gen >= 6) {
|
||||
/* For SNB, the SFID bits moved to the condmod bits, and
|
||||
* EOT stayed in bits3 above. Does the EOT bit setting
|
||||
@@ -339,8 +339,8 @@ static void brw_set_urb_message( struct brw_context *brw,
|
||||
*/
|
||||
insn->header.destreg__conditionalmod = BRW_MESSAGE_TARGET_URB;
|
||||
} else {
|
||||
insn->bits2.send_igdng.sfid = BRW_MESSAGE_TARGET_URB;
|
||||
insn->bits2.send_igdng.end_of_thread = end_of_thread;
|
||||
insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_URB;
|
||||
insn->bits2.send_gen5.end_of_thread = end_of_thread;
|
||||
}
|
||||
} else {
|
||||
insn->bits3.urb.opcode = 0; /* ? */
|
||||
@@ -369,18 +369,18 @@ static void brw_set_dp_write_message( struct brw_context *brw,
|
||||
struct intel_context *intel = &brw->intel;
|
||||
brw_set_src1(insn, brw_imm_d(0));
|
||||
|
||||
if (intel->is_ironlake) {
|
||||
insn->bits3.dp_write_igdng.binding_table_index = binding_table_index;
|
||||
insn->bits3.dp_write_igdng.msg_control = msg_control;
|
||||
insn->bits3.dp_write_igdng.pixel_scoreboard_clear = pixel_scoreboard_clear;
|
||||
insn->bits3.dp_write_igdng.msg_type = msg_type;
|
||||
insn->bits3.dp_write_igdng.send_commit_msg = 0;
|
||||
insn->bits3.dp_write_igdng.header_present = 1;
|
||||
insn->bits3.dp_write_igdng.response_length = response_length;
|
||||
insn->bits3.dp_write_igdng.msg_length = msg_length;
|
||||
insn->bits3.dp_write_igdng.end_of_thread = end_of_thread;
|
||||
insn->bits2.send_igdng.sfid = BRW_MESSAGE_TARGET_DATAPORT_WRITE;
|
||||
insn->bits2.send_igdng.end_of_thread = end_of_thread;
|
||||
if (intel->gen == 5) {
|
||||
insn->bits3.dp_write_gen5.binding_table_index = binding_table_index;
|
||||
insn->bits3.dp_write_gen5.msg_control = msg_control;
|
||||
insn->bits3.dp_write_gen5.pixel_scoreboard_clear = pixel_scoreboard_clear;
|
||||
insn->bits3.dp_write_gen5.msg_type = msg_type;
|
||||
insn->bits3.dp_write_gen5.send_commit_msg = 0;
|
||||
insn->bits3.dp_write_gen5.header_present = 1;
|
||||
insn->bits3.dp_write_gen5.response_length = response_length;
|
||||
insn->bits3.dp_write_gen5.msg_length = msg_length;
|
||||
insn->bits3.dp_write_gen5.end_of_thread = end_of_thread;
|
||||
insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_DATAPORT_WRITE;
|
||||
insn->bits2.send_gen5.end_of_thread = end_of_thread;
|
||||
} else {
|
||||
insn->bits3.dp_write.binding_table_index = binding_table_index;
|
||||
insn->bits3.dp_write.msg_control = msg_control;
|
||||
@@ -407,18 +407,18 @@ static void brw_set_dp_read_message( struct brw_context *brw,
|
||||
struct intel_context *intel = &brw->intel;
|
||||
brw_set_src1(insn, brw_imm_d(0));
|
||||
|
||||
if (intel->is_ironlake) {
|
||||
insn->bits3.dp_read_igdng.binding_table_index = binding_table_index;
|
||||
insn->bits3.dp_read_igdng.msg_control = msg_control;
|
||||
insn->bits3.dp_read_igdng.msg_type = msg_type;
|
||||
insn->bits3.dp_read_igdng.target_cache = target_cache;
|
||||
insn->bits3.dp_read_igdng.header_present = 1;
|
||||
insn->bits3.dp_read_igdng.response_length = response_length;
|
||||
insn->bits3.dp_read_igdng.msg_length = msg_length;
|
||||
insn->bits3.dp_read_igdng.pad1 = 0;
|
||||
insn->bits3.dp_read_igdng.end_of_thread = end_of_thread;
|
||||
insn->bits2.send_igdng.sfid = BRW_MESSAGE_TARGET_DATAPORT_READ;
|
||||
insn->bits2.send_igdng.end_of_thread = end_of_thread;
|
||||
if (intel->gen == 5) {
|
||||
insn->bits3.dp_read_gen5.binding_table_index = binding_table_index;
|
||||
insn->bits3.dp_read_gen5.msg_control = msg_control;
|
||||
insn->bits3.dp_read_gen5.msg_type = msg_type;
|
||||
insn->bits3.dp_read_gen5.target_cache = target_cache;
|
||||
insn->bits3.dp_read_gen5.header_present = 1;
|
||||
insn->bits3.dp_read_gen5.response_length = response_length;
|
||||
insn->bits3.dp_read_gen5.msg_length = msg_length;
|
||||
insn->bits3.dp_read_gen5.pad1 = 0;
|
||||
insn->bits3.dp_read_gen5.end_of_thread = end_of_thread;
|
||||
insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_DATAPORT_READ;
|
||||
insn->bits2.send_gen5.end_of_thread = end_of_thread;
|
||||
} else {
|
||||
insn->bits3.dp_read.binding_table_index = binding_table_index; /*0:7*/
|
||||
insn->bits3.dp_read.msg_control = msg_control; /*8:11*/
|
||||
@@ -447,17 +447,17 @@ static void brw_set_sampler_message(struct brw_context *brw,
|
||||
assert(eot == 0);
|
||||
brw_set_src1(insn, brw_imm_d(0));
|
||||
|
||||
if (intel->is_ironlake) {
|
||||
insn->bits3.sampler_igdng.binding_table_index = binding_table_index;
|
||||
insn->bits3.sampler_igdng.sampler = sampler;
|
||||
insn->bits3.sampler_igdng.msg_type = msg_type;
|
||||
insn->bits3.sampler_igdng.simd_mode = simd_mode;
|
||||
insn->bits3.sampler_igdng.header_present = header_present;
|
||||
insn->bits3.sampler_igdng.response_length = response_length;
|
||||
insn->bits3.sampler_igdng.msg_length = msg_length;
|
||||
insn->bits3.sampler_igdng.end_of_thread = eot;
|
||||
insn->bits2.send_igdng.sfid = BRW_MESSAGE_TARGET_SAMPLER;
|
||||
insn->bits2.send_igdng.end_of_thread = eot;
|
||||
if (intel->gen == 5) {
|
||||
insn->bits3.sampler_gen5.binding_table_index = binding_table_index;
|
||||
insn->bits3.sampler_gen5.sampler = sampler;
|
||||
insn->bits3.sampler_gen5.msg_type = msg_type;
|
||||
insn->bits3.sampler_gen5.simd_mode = simd_mode;
|
||||
insn->bits3.sampler_gen5.header_present = header_present;
|
||||
insn->bits3.sampler_gen5.response_length = response_length;
|
||||
insn->bits3.sampler_gen5.msg_length = msg_length;
|
||||
insn->bits3.sampler_gen5.end_of_thread = eot;
|
||||
insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_SAMPLER;
|
||||
insn->bits2.send_gen5.end_of_thread = eot;
|
||||
} else if (intel->is_g4x) {
|
||||
insn->bits3.sampler_g4x.binding_table_index = binding_table_index;
|
||||
insn->bits3.sampler_g4x.sampler = sampler;
|
||||
@@ -663,7 +663,7 @@ struct brw_instruction *brw_ELSE(struct brw_compile *p,
|
||||
struct brw_instruction *insn;
|
||||
GLuint br = 1;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
br = 2;
|
||||
|
||||
if (p->single_program_flow) {
|
||||
@@ -705,7 +705,7 @@ void brw_ENDIF(struct brw_compile *p,
|
||||
struct intel_context *intel = &p->brw->intel;
|
||||
GLuint br = 1;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
br = 2;
|
||||
|
||||
if (p->single_program_flow) {
|
||||
@@ -820,7 +820,7 @@ struct brw_instruction *brw_WHILE(struct brw_compile *p,
|
||||
struct brw_instruction *insn;
|
||||
GLuint br = 1;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
br = 2;
|
||||
|
||||
if (p->single_program_flow)
|
||||
@@ -864,7 +864,7 @@ void brw_land_fwd_jump(struct brw_compile *p,
|
||||
struct brw_instruction *landing = &p->store[p->nr_insn];
|
||||
GLuint jmpi = 1;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
jmpi = 2;
|
||||
|
||||
assert(jmp_insn->header.opcode == BRW_OPCODE_JMPI);
|
||||
|
@@ -60,7 +60,7 @@ static void compile_gs_prog( struct brw_context *brw,
|
||||
*/
|
||||
c.nr_attrs = brw_count_bits(c.key.attrs);
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
c.nr_regs = (c.nr_attrs + 1) / 2 + 3; /* are vertices packed, or reg-aligned? */
|
||||
else
|
||||
c.nr_regs = (c.nr_attrs + 1) / 2 + 1; /* are vertices packed, or reg-aligned? */
|
||||
|
@@ -98,7 +98,7 @@ gs_unit_create_from_key(struct brw_context *brw, struct brw_gs_unit_key *key)
|
||||
else
|
||||
gs.thread4.max_threads = 0;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
gs.thread4.rendering_enable = 1;
|
||||
|
||||
if (INTEL_DEBUG & DEBUG_STATS)
|
||||
|
@@ -248,7 +248,7 @@ static void emit_depthbuffer(struct brw_context *brw)
|
||||
|
||||
if (intel->gen >= 6)
|
||||
len = 7;
|
||||
else if (intel->is_g4x || intel->is_ironlake)
|
||||
else if (intel->is_g4x || intel->gen == 5)
|
||||
len = 6;
|
||||
else
|
||||
len = 5;
|
||||
@@ -262,7 +262,7 @@ static void emit_depthbuffer(struct brw_context *brw)
|
||||
OUT_BATCH(0);
|
||||
OUT_BATCH(0);
|
||||
|
||||
if (intel->is_g4x || intel->is_ironlake || intel->gen >= 6)
|
||||
if (intel->is_g4x || intel->gen >= 5)
|
||||
OUT_BATCH(0);
|
||||
|
||||
if (intel->gen >= 6)
|
||||
@@ -306,7 +306,7 @@ static void emit_depthbuffer(struct brw_context *brw)
|
||||
((region->height - 1) << 19));
|
||||
OUT_BATCH(0);
|
||||
|
||||
if (intel->is_g4x || intel->is_ironlake || intel->gen >= 6)
|
||||
if (intel->is_g4x || intel->gen >= 5)
|
||||
OUT_BATCH(0);
|
||||
|
||||
if (intel->gen >= 6)
|
||||
@@ -608,7 +608,7 @@ static void upload_state_base_address( struct brw_context *brw )
|
||||
OUT_BATCH(1); /* Indirect object upper bound */
|
||||
OUT_BATCH(1); /* Instruction access upper bound */
|
||||
ADVANCE_BATCH();
|
||||
} else if (intel->is_ironlake) {
|
||||
} else if (intel->gen == 5) {
|
||||
BEGIN_BATCH(8);
|
||||
OUT_BATCH(CMD_STATE_BASE_ADDRESS << 16 | (8 - 2));
|
||||
OUT_BATCH(1); /* General state base address */
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include "shader/prog_parameter.h"
|
||||
#include "shader/program.h"
|
||||
#include "shader/programopt.h"
|
||||
#include "shader/shader_api.h"
|
||||
#include "tnl/tnl.h"
|
||||
|
||||
#include "brw_context.h"
|
||||
@@ -119,12 +120,28 @@ static GLboolean brwIsProgramNative( GLcontext *ctx,
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
shader_error(GLcontext *ctx, struct gl_program *prog, const char *msg)
|
||||
{
|
||||
struct gl_shader_program *shader;
|
||||
|
||||
shader = _mesa_lookup_shader_program(ctx, prog->Id);
|
||||
|
||||
if (shader) {
|
||||
if (shader->InfoLog) {
|
||||
free(shader->InfoLog);
|
||||
}
|
||||
shader->InfoLog = _mesa_strdup(msg);
|
||||
shader->LinkStatus = GL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static GLboolean brwProgramStringNotify( GLcontext *ctx,
|
||||
GLenum target,
|
||||
struct gl_program *prog )
|
||||
{
|
||||
struct brw_context *brw = brw_context(ctx);
|
||||
int i;
|
||||
|
||||
if (target == GL_FRAGMENT_PROGRAM_ARB) {
|
||||
struct gl_fragment_program *fprog = (struct gl_fragment_program *) prog;
|
||||
@@ -160,7 +177,22 @@ static GLboolean brwProgramStringNotify( GLcontext *ctx,
|
||||
_tnl_program_string(ctx, target, prog);
|
||||
}
|
||||
|
||||
/* XXX check if program is legal, within limits */
|
||||
/* Reject programs with subroutines, which are totally broken at the moment
|
||||
* (all program flows return when any program flow returns, and
|
||||
* the VS also hangs if a function call calls a function.
|
||||
*
|
||||
* See piglit glsl-{vs,fs}-functions-[23] tests.
|
||||
*/
|
||||
for (i = 0; i < prog->NumInstructions; i++) {
|
||||
if (prog->Instructions[i].Opcode == OPCODE_CAL) {
|
||||
shader_error(ctx, prog,
|
||||
"i965 driver doesn't yet support uninlined function "
|
||||
"calls. Move to using a single return statement at "
|
||||
"the end of the function to work around it.");
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
@@ -162,7 +162,7 @@ static void do_flatshade_triangle( struct brw_sf_compile *c )
|
||||
if (c->key.primitive == SF_UNFILLED_TRIS)
|
||||
return;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
jmpi = 2;
|
||||
|
||||
brw_push_insn_state(p);
|
||||
@@ -201,7 +201,7 @@ static void do_flatshade_line( struct brw_sf_compile *c )
|
||||
if (c->key.primitive == SF_UNFILLED_TRIS)
|
||||
return;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
jmpi = 2;
|
||||
|
||||
brw_push_insn_state(p);
|
||||
|
@@ -76,7 +76,20 @@ static void upload_sf_vp(struct brw_context *brw)
|
||||
* Note that the hardware's coordinates are inclusive, while Mesa's min is
|
||||
* inclusive but max is exclusive.
|
||||
*/
|
||||
if (render_to_fbo) {
|
||||
|
||||
if (ctx->DrawBuffer->_Xmin == ctx->DrawBuffer->_Xmax ||
|
||||
ctx->DrawBuffer->_Ymin == ctx->DrawBuffer->_Ymax) {
|
||||
/* If the scissor was out of bounds and got clamped to 0
|
||||
* width/height at the bounds, the subtraction of 1 from
|
||||
* maximums could produce a negative number and thus not clip
|
||||
* anything. Instead, just provide a min > max scissor inside
|
||||
* the bounds, which produces the expected no rendering.
|
||||
*/
|
||||
sfv.scissor.xmin = 1;
|
||||
sfv.scissor.xmax = 0;
|
||||
sfv.scissor.ymin = 1;
|
||||
sfv.scissor.ymax = 0;
|
||||
} else if (render_to_fbo) {
|
||||
/* texmemory: Y=0=bottom */
|
||||
sfv.scissor.xmin = ctx->DrawBuffer->_Xmin;
|
||||
sfv.scissor.xmax = ctx->DrawBuffer->_Xmax - 1;
|
||||
@@ -177,7 +190,7 @@ sf_unit_create_from_key(struct brw_context *brw, struct brw_sf_unit_key *key,
|
||||
|
||||
sf.thread3.dispatch_grf_start_reg = 3;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
sf.thread3.urb_entry_read_offset = 3;
|
||||
else
|
||||
sf.thread3.urb_entry_read_offset = 1;
|
||||
@@ -190,7 +203,7 @@ sf_unit_create_from_key(struct brw_context *brw, struct brw_sf_unit_key *key,
|
||||
/* Each SF thread produces 1 PUE, and there can be up to 24 (Pre-Ironlake) or
|
||||
* 48 (Ironlake) threads.
|
||||
*/
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
chipset_max_threads = 48;
|
||||
else
|
||||
chipset_max_threads = 24;
|
||||
|
@@ -925,7 +925,7 @@ struct brw_gs_unit_state
|
||||
struct
|
||||
{
|
||||
GLuint pad0:8;
|
||||
GLuint rendering_enable:1; /* for IGDNG */
|
||||
GLuint rendering_enable:1; /* for Ironlake */
|
||||
GLuint pad4:1;
|
||||
GLuint stats_enable:1;
|
||||
GLuint nr_urb_entries:7;
|
||||
@@ -1035,7 +1035,7 @@ struct brw_wm_unit_state
|
||||
GLfloat global_depth_offset_constant;
|
||||
GLfloat global_depth_offset_scale;
|
||||
|
||||
/* for IGDNG only */
|
||||
/* for Ironlake only */
|
||||
struct {
|
||||
GLuint pad0:1;
|
||||
GLuint grf_reg_count_1:3;
|
||||
@@ -1448,7 +1448,7 @@ struct brw_instruction
|
||||
GLuint end_of_thread:1;
|
||||
GLuint pad1:1;
|
||||
GLuint sfid:4;
|
||||
} send_igdng; /* for IGDNG only */
|
||||
} send_gen5; /* for Ironlake only */
|
||||
|
||||
} bits2;
|
||||
|
||||
@@ -1549,7 +1549,7 @@ struct brw_instruction
|
||||
GLuint msg_length:4;
|
||||
GLuint pad1:2;
|
||||
GLuint end_of_thread:1;
|
||||
} math_igdng;
|
||||
} math_gen5;
|
||||
|
||||
struct {
|
||||
GLuint binding_table_index:8;
|
||||
@@ -1585,7 +1585,7 @@ struct brw_instruction
|
||||
GLuint msg_length:4;
|
||||
GLuint pad1:2;
|
||||
GLuint end_of_thread:1;
|
||||
} sampler_igdng;
|
||||
} sampler_gen5;
|
||||
|
||||
struct brw_urb_immediate urb;
|
||||
|
||||
@@ -1603,7 +1603,7 @@ struct brw_instruction
|
||||
GLuint msg_length:4;
|
||||
GLuint pad1:2;
|
||||
GLuint end_of_thread:1;
|
||||
} urb_igdng;
|
||||
} urb_gen5;
|
||||
|
||||
struct {
|
||||
GLuint binding_table_index:8;
|
||||
@@ -1628,7 +1628,7 @@ struct brw_instruction
|
||||
GLuint msg_length:4;
|
||||
GLuint pad1:2;
|
||||
GLuint end_of_thread:1;
|
||||
} dp_read_igdng;
|
||||
} dp_read_gen5;
|
||||
|
||||
struct {
|
||||
GLuint binding_table_index:8;
|
||||
@@ -1655,7 +1655,7 @@ struct brw_instruction
|
||||
GLuint msg_length:4;
|
||||
GLuint pad1:2;
|
||||
GLuint end_of_thread:1;
|
||||
} dp_write_igdng;
|
||||
} dp_write_gen5;
|
||||
|
||||
struct {
|
||||
GLuint pad:16;
|
||||
@@ -1673,7 +1673,7 @@ struct brw_instruction
|
||||
GLuint msg_length:4;
|
||||
GLuint pad1:2;
|
||||
GLuint end_of_thread:1;
|
||||
} generic_igdng;
|
||||
} generic_gen5;
|
||||
|
||||
GLint d;
|
||||
GLuint ud;
|
||||
|
@@ -48,77 +48,31 @@ GLboolean brw_miptree_layout(struct intel_context *intel,
|
||||
|
||||
switch (mt->target) {
|
||||
case GL_TEXTURE_CUBE_MAP:
|
||||
if (intel->is_ironlake) {
|
||||
GLuint align_h = 2, align_w = 4;
|
||||
if (intel->gen == 5) {
|
||||
GLuint align_h = 2;
|
||||
GLuint level;
|
||||
GLuint x = 0;
|
||||
GLuint y = 0;
|
||||
GLuint width = mt->width0;
|
||||
GLuint height = mt->height0;
|
||||
GLuint qpitch = 0;
|
||||
GLuint y_pitch = 0;
|
||||
int h0, h1, q;
|
||||
|
||||
mt->pitch = mt->width0;
|
||||
intel_get_texture_alignment_unit(mt->internal_format, &align_w, &align_h);
|
||||
y_pitch = ALIGN(height, align_h);
|
||||
/* On Ironlake, cube maps are finally represented as just a series
|
||||
* of MIPLAYOUT_BELOW 2D textures (like 2D texture arrays), separated
|
||||
* by a pitch of qpitch rows, where qpitch is defined by the equation
|
||||
* given in Volume 1 of the BSpec.
|
||||
*/
|
||||
h0 = ALIGN(mt->height0, align_h);
|
||||
h1 = ALIGN(minify(h0), align_h);
|
||||
qpitch = (h0 + h1 + 11 * align_h);
|
||||
if (mt->compressed)
|
||||
qpitch /= 4;
|
||||
|
||||
if (mt->compressed) {
|
||||
mt->pitch = ALIGN(mt->width0, align_w);
|
||||
}
|
||||
|
||||
if (mt->first_level != mt->last_level) {
|
||||
GLuint mip1_width;
|
||||
|
||||
if (mt->compressed) {
|
||||
mip1_width = ALIGN(minify(mt->width0), align_w)
|
||||
+ ALIGN(minify(minify(mt->width0)), align_w);
|
||||
} else {
|
||||
mip1_width = ALIGN(minify(mt->width0), align_w)
|
||||
+ minify(minify(mt->width0));
|
||||
}
|
||||
|
||||
if (mip1_width > mt->pitch) {
|
||||
mt->pitch = mip1_width;
|
||||
}
|
||||
}
|
||||
|
||||
mt->pitch = intel_miptree_pitch_align(intel, mt, tiling, mt->pitch);
|
||||
|
||||
if (mt->compressed) {
|
||||
qpitch = (y_pitch + ALIGN(minify(y_pitch), align_h) + 11 * align_h) / 4;
|
||||
mt->total_height = (y_pitch + ALIGN(minify(y_pitch), align_h) + 11 * align_h) / 4 * 6;
|
||||
} else {
|
||||
qpitch = (y_pitch + ALIGN(minify(y_pitch), align_h) + 11 * align_h);
|
||||
mt->total_height = (y_pitch + ALIGN(minify(y_pitch), align_h) + 11 * align_h) * 6;
|
||||
}
|
||||
i945_miptree_layout_2d(intel, mt, tiling, 6);
|
||||
|
||||
for (level = mt->first_level; level <= mt->last_level; level++) {
|
||||
GLuint img_height;
|
||||
GLuint nr_images = 6;
|
||||
GLuint q = 0;
|
||||
|
||||
intel_miptree_set_level_info(mt, level, nr_images, x, y, width,
|
||||
height, 1);
|
||||
|
||||
for (q = 0; q < nr_images; q++)
|
||||
intel_miptree_set_image_offset(mt, level, q,
|
||||
x, y + q * qpitch);
|
||||
|
||||
if (mt->compressed)
|
||||
img_height = MAX2(1, height/4);
|
||||
else
|
||||
img_height = ALIGN(height, align_h);
|
||||
|
||||
if (level == mt->first_level + 1) {
|
||||
x += ALIGN(width, align_w);
|
||||
}
|
||||
else {
|
||||
y += img_height;
|
||||
}
|
||||
|
||||
width = minify(width);
|
||||
height = minify(height);
|
||||
for (q = 0; q < 6; q++) {
|
||||
intel_miptree_set_image_offset(mt, level, q, 0, q * qpitch);
|
||||
}
|
||||
}
|
||||
mt->total_height = qpitch * 6;
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -208,7 +162,7 @@ GLboolean brw_miptree_layout(struct intel_context *intel,
|
||||
}
|
||||
|
||||
default:
|
||||
i945_miptree_layout_2d(intel, mt, tiling);
|
||||
i945_miptree_layout_2d(intel, mt, tiling, 1);
|
||||
break;
|
||||
}
|
||||
DBG("%s: %dx%dx%d - sz 0x%x\n", __FUNCTION__,
|
||||
|
@@ -148,7 +148,7 @@ static void recalculate_urb_fence( struct brw_context *brw )
|
||||
|
||||
brw->urb.constrained = 0;
|
||||
|
||||
if (intel->is_ironlake) {
|
||||
if (intel->gen == 5) {
|
||||
brw->urb.nr_vs_entries = 128;
|
||||
brw->urb.nr_sf_entries = 48;
|
||||
if (check_urb_layout(brw)) {
|
||||
|
@@ -182,7 +182,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
|
||||
|
||||
if (intel->gen >= 6)
|
||||
mrf = 6;
|
||||
else if (intel->is_ironlake)
|
||||
else if (intel->gen == 5)
|
||||
mrf = 8;
|
||||
else
|
||||
mrf = 4;
|
||||
@@ -283,7 +283,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
|
||||
|
||||
if (intel->gen >= 6)
|
||||
c->prog_data.urb_entry_size = (attributes_in_vue + 4 + 7) / 8;
|
||||
else if (intel->is_ironlake)
|
||||
else if (intel->gen == 5)
|
||||
c->prog_data.urb_entry_size = (attributes_in_vue + 6 + 3) / 4;
|
||||
else
|
||||
c->prog_data.urb_entry_size = (attributes_in_vue + 2 + 3) / 4;
|
||||
@@ -1288,7 +1288,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
|
||||
brw_MOV(p, offset(m0, 2), pos);
|
||||
brw_MOV(p, offset(m0, 5), pos);
|
||||
len_vertex_header = 4;
|
||||
} else if (intel->is_ironlake) {
|
||||
} else if (intel->gen == 5) {
|
||||
/* There are 20 DWs (D0-D19) in VUE header on Ironlake:
|
||||
* dword 0-3 (m1) of the header is indices, point width, clip flags.
|
||||
* dword 4-7 (m2) is the ndc position (set above)
|
||||
@@ -1710,7 +1710,7 @@ void brw_vs_emit(struct brw_vs_compile *c )
|
||||
|
||||
loop_depth--;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
br = 2;
|
||||
|
||||
inst0 = inst1 = brw_WHILE(p, loop_inst[loop_depth]);
|
||||
|
@@ -98,7 +98,7 @@ vs_unit_create_from_key(struct brw_context *brw, struct brw_vs_unit_key *key)
|
||||
*/
|
||||
vs.thread1.single_program_flow = 0;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
vs.thread1.binding_table_entry_count = 0; /* hardware requirement */
|
||||
else
|
||||
vs.thread1.binding_table_entry_count = key->nr_surfaces;
|
||||
@@ -109,7 +109,7 @@ vs_unit_create_from_key(struct brw_context *brw, struct brw_vs_unit_key *key)
|
||||
vs.thread3.urb_entry_read_offset = 0;
|
||||
vs.thread3.const_urb_entry_read_offset = key->curbe_offset * 2;
|
||||
|
||||
if (intel->is_ironlake) {
|
||||
if (intel->gen == 5) {
|
||||
switch (key->nr_urb_entries) {
|
||||
case 8:
|
||||
case 12:
|
||||
@@ -150,7 +150,7 @@ vs_unit_create_from_key(struct brw_context *brw, struct brw_vs_unit_key *key)
|
||||
|
||||
/* No samplers for ARB_vp programs:
|
||||
*/
|
||||
/* It has to be set to 0 for IGDNG
|
||||
/* It has to be set to 0 for Ironlake
|
||||
*/
|
||||
vs.vs5.sampler_count = 0;
|
||||
|
||||
|
@@ -67,7 +67,7 @@ struct brw_wm_prog_key {
|
||||
GLuint flat_shade:1;
|
||||
GLuint linear_color:1; /**< linear interpolation vs perspective interp */
|
||||
GLuint runtime_check_aads_emit:1;
|
||||
GLuint nr_color_regions:2;
|
||||
GLuint nr_color_regions:5;
|
||||
|
||||
GLbitfield proj_attrib_mask; /**< one bit per fragment program attribute */
|
||||
GLuint shadowtex_mask:16;
|
||||
|
@@ -898,7 +898,7 @@ void emit_tex(struct brw_wm_compile *c,
|
||||
}
|
||||
|
||||
/* Pre-Ironlake, the 8-wide sampler always took u,v,r. */
|
||||
if (!intel->is_ironlake && c->dispatch_width == 8)
|
||||
if (intel->gen < 5 && c->dispatch_width == 8)
|
||||
nr_texcoords = 3;
|
||||
|
||||
/* For shadow comparisons, we have to supply u,v,r. */
|
||||
@@ -916,7 +916,7 @@ void emit_tex(struct brw_wm_compile *c,
|
||||
|
||||
/* Fill in the shadow comparison reference value. */
|
||||
if (shadow) {
|
||||
if (intel->is_ironlake) {
|
||||
if (intel->gen == 5) {
|
||||
/* Fill in the cube map array index value. */
|
||||
brw_MOV(p, brw_message_reg(cur_mrf), brw_imm_f(0));
|
||||
cur_mrf += mrf_per_channel;
|
||||
@@ -929,11 +929,11 @@ void emit_tex(struct brw_wm_compile *c,
|
||||
cur_mrf += mrf_per_channel;
|
||||
}
|
||||
|
||||
if (intel->is_ironlake) {
|
||||
if (intel->gen == 5) {
|
||||
if (shadow)
|
||||
msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_COMPARE_IGDNG;
|
||||
msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_COMPARE_GEN5;
|
||||
else
|
||||
msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_IGDNG;
|
||||
msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_GEN5;
|
||||
} else {
|
||||
/* Note that G45 and older determines shadow compare and dispatch width
|
||||
* from message length for most messages.
|
||||
@@ -981,16 +981,16 @@ void emit_txb(struct brw_wm_compile *c,
|
||||
* undefined, and trust the execution mask to keep the undefined pixels
|
||||
* from mattering.
|
||||
*/
|
||||
if (c->dispatch_width == 16 || !intel->is_ironlake) {
|
||||
if (intel->is_ironlake)
|
||||
msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_IGDNG;
|
||||
if (c->dispatch_width == 16 || intel->gen < 5) {
|
||||
if (intel->gen == 5)
|
||||
msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_GEN5;
|
||||
else
|
||||
msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS;
|
||||
mrf_per_channel = 2;
|
||||
dst_retyped = retype(vec16(dst[0]), BRW_REGISTER_TYPE_UW);
|
||||
response_length = 8;
|
||||
} else {
|
||||
msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_IGDNG;
|
||||
msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_GEN5;
|
||||
mrf_per_channel = 1;
|
||||
dst_retyped = retype(vec8(dst[0]), BRW_REGISTER_TYPE_UW);
|
||||
response_length = 4;
|
||||
|
@@ -2006,7 +2006,7 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
|
||||
struct brw_instruction *inst0, *inst1;
|
||||
GLuint br = 1;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
br = 2;
|
||||
|
||||
assert(loop_depth > 0);
|
||||
|
@@ -137,7 +137,7 @@ wm_unit_create_from_key(struct brw_context *brw, struct brw_wm_unit_key *key,
|
||||
wm.thread1.depth_coef_urb_read_offset = 1;
|
||||
wm.thread1.floating_point_mode = BRW_FLOATING_POINT_NON_IEEE_754;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
wm.thread1.binding_table_entry_count = 0; /* hardware requirement */
|
||||
else
|
||||
wm.thread1.binding_table_entry_count = key->nr_surfaces;
|
||||
@@ -157,7 +157,7 @@ wm_unit_create_from_key(struct brw_context *brw, struct brw_wm_unit_key *key,
|
||||
wm.thread3.const_urb_entry_read_length = key->curb_entry_read_length;
|
||||
wm.thread3.const_urb_entry_read_offset = key->curbe_offset * 2;
|
||||
|
||||
if (intel->is_ironlake)
|
||||
if (intel->gen == 5)
|
||||
wm.wm4.sampler_count = 0; /* hardware requirement */
|
||||
else
|
||||
wm.wm4.sampler_count = (key->sampler_count + 1) / 4;
|
||||
|
@@ -588,7 +588,7 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
|
||||
tile_base = ((key.draw_y / 32) * (32 * pitch));
|
||||
tile_base += (key.draw_x - tile_x) / (128 / key.cpp) * 4096;
|
||||
}
|
||||
assert(intel->is_g4x || (tile_x == 0 && tile_y == 0));
|
||||
assert(brw->has_surface_tile_offset || (tile_x == 0 && tile_y == 0));
|
||||
assert(tile_x % 4 == 0);
|
||||
assert(tile_y % 2 == 0);
|
||||
/* Note that the low bits of these fields are missing, so
|
||||
|
@@ -93,7 +93,7 @@
|
||||
|
||||
#define IS_ILD(devid) (devid == PCI_CHIP_ILD_G)
|
||||
#define IS_ILM(devid) (devid == PCI_CHIP_ILM_G)
|
||||
#define IS_IGDNG(devid) (IS_ILD(devid) || IS_ILM(devid))
|
||||
#define IS_GEN5(devid) (IS_ILD(devid) || IS_ILM(devid))
|
||||
|
||||
#define IS_915(devid) (devid == PCI_CHIP_I915_G || \
|
||||
devid == PCI_CHIP_E7221_G || \
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
#define IS_965(devid) (IS_GEN4(devid) || \
|
||||
IS_G4X(devid) || \
|
||||
IS_IGDNG(devid) || \
|
||||
IS_GEN5(devid) || \
|
||||
IS_GEN6(devid))
|
||||
|
||||
#define IS_9XX(devid) (IS_915(devid) || \
|
||||
|
@@ -159,10 +159,10 @@ intelGetString(GLcontext * ctx, GLenum name)
|
||||
chipset = "Intel(R) B43";
|
||||
break;
|
||||
case PCI_CHIP_ILD_G:
|
||||
chipset = "Intel(R) IGDNG_D";
|
||||
chipset = "Intel(R) Ironlake Desktop";
|
||||
break;
|
||||
case PCI_CHIP_ILM_G:
|
||||
chipset = "Intel(R) IGDNG_M";
|
||||
chipset = "Intel(R) Ironlake Mobile";
|
||||
break;
|
||||
default:
|
||||
chipset = "Unknown Intel Chipset";
|
||||
@@ -362,7 +362,7 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
|
||||
if (buffers[i].attachment == __DRI_BUFFER_DEPTH)
|
||||
depth_region = region;
|
||||
|
||||
intel_renderbuffer_set_region(rb, region);
|
||||
intel_renderbuffer_set_region(intel, rb, region);
|
||||
intel_region_release(®ion);
|
||||
|
||||
if (buffers[i].attachment == __DRI_BUFFER_DEPTH_STENCIL) {
|
||||
@@ -374,7 +374,7 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
|
||||
continue;
|
||||
|
||||
intel_region_reference(&stencil_region, region);
|
||||
intel_renderbuffer_set_region(rb, stencil_region);
|
||||
intel_renderbuffer_set_region(intel, rb, stencil_region);
|
||||
intel_region_release(&stencil_region);
|
||||
}
|
||||
}
|
||||
@@ -610,12 +610,21 @@ intelInitContext(struct intel_context *intel,
|
||||
intel->driContext = driContextPriv;
|
||||
intel->driFd = sPriv->fd;
|
||||
|
||||
intel->has_xrgb_textures = GL_TRUE;
|
||||
if (IS_GEN6(intel->intelScreen->deviceID)) {
|
||||
intel->gen = 6;
|
||||
intel->needs_ff_sync = GL_TRUE;
|
||||
intel->has_luminance_srgb = GL_TRUE;
|
||||
} else if (IS_GEN5(intel->intelScreen->deviceID)) {
|
||||
intel->gen = 5;
|
||||
intel->needs_ff_sync = GL_TRUE;
|
||||
intel->has_luminance_srgb = GL_TRUE;
|
||||
} else if (IS_965(intel->intelScreen->deviceID)) {
|
||||
intel->gen = 4;
|
||||
if (IS_G4X(intel->intelScreen->deviceID)) {
|
||||
intel->has_luminance_srgb = GL_TRUE;
|
||||
intel->is_g4x = GL_TRUE;
|
||||
}
|
||||
} else if (IS_9XX(intel->intelScreen->deviceID)) {
|
||||
intel->gen = 3;
|
||||
if (IS_945(intel->intelScreen->deviceID)) {
|
||||
@@ -623,15 +632,10 @@ intelInitContext(struct intel_context *intel,
|
||||
}
|
||||
} else {
|
||||
intel->gen = 2;
|
||||
}
|
||||
|
||||
if (IS_IGDNG(intel->intelScreen->deviceID)) {
|
||||
intel->is_ironlake = GL_TRUE;
|
||||
intel->needs_ff_sync = GL_TRUE;
|
||||
intel->has_luminance_srgb = GL_TRUE;
|
||||
} else if (IS_G4X(intel->intelScreen->deviceID)) {
|
||||
intel->has_luminance_srgb = GL_TRUE;
|
||||
intel->is_g4x = GL_TRUE;
|
||||
if (intel->intelScreen->deviceID == PCI_CHIP_I830_M ||
|
||||
intel->intelScreen->deviceID == PCI_CHIP_845_G) {
|
||||
intel->has_xrgb_textures = GL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
driParseConfigFiles(&intel->optionCache, &intelScreen->optionCache,
|
||||
|
@@ -142,10 +142,10 @@ struct intel_context
|
||||
*/
|
||||
int gen;
|
||||
GLboolean needs_ff_sync;
|
||||
GLboolean is_ironlake;
|
||||
GLboolean is_g4x;
|
||||
GLboolean is_945;
|
||||
GLboolean has_luminance_srgb;
|
||||
GLboolean has_xrgb_textures;
|
||||
|
||||
int urb_size;
|
||||
|
||||
|
@@ -42,7 +42,9 @@
|
||||
#include "intel_fbo.h"
|
||||
#include "intel_mipmap_tree.h"
|
||||
#include "intel_regions.h"
|
||||
|
||||
#ifndef I915
|
||||
#include "brw_state.h"
|
||||
#endif
|
||||
|
||||
#define FILE_DEBUG_FLAG DEBUG_FBO
|
||||
|
||||
@@ -280,7 +282,8 @@ intel_nop_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
|
||||
|
||||
|
||||
void
|
||||
intel_renderbuffer_set_region(struct intel_renderbuffer *rb,
|
||||
intel_renderbuffer_set_region(struct intel_context *intel,
|
||||
struct intel_renderbuffer *rb,
|
||||
struct intel_region *region)
|
||||
{
|
||||
struct intel_region *old;
|
||||
@@ -288,6 +291,12 @@ intel_renderbuffer_set_region(struct intel_renderbuffer *rb,
|
||||
old = rb->region;
|
||||
rb->region = NULL;
|
||||
intel_region_reference(&rb->region, region);
|
||||
#ifndef I915
|
||||
if (old) {
|
||||
brw_state_cache_bo_delete(&brw_context(&intel->ctx)->surface_cache,
|
||||
old->buffer);
|
||||
}
|
||||
#endif
|
||||
intel_region_release(&old);
|
||||
}
|
||||
|
||||
|
@@ -82,7 +82,8 @@ intel_get_renderbuffer(struct gl_framebuffer *fb, int attIndex)
|
||||
|
||||
|
||||
extern void
|
||||
intel_renderbuffer_set_region(struct intel_renderbuffer *irb,
|
||||
intel_renderbuffer_set_region(struct intel_context *intel,
|
||||
struct intel_renderbuffer *irb,
|
||||
struct intel_region *region);
|
||||
|
||||
|
||||
|
@@ -117,17 +117,16 @@ intel_miptree_create(struct intel_context *intel,
|
||||
GLboolean expect_accelerated_upload)
|
||||
{
|
||||
struct intel_mipmap_tree *mt;
|
||||
uint32_t tiling;
|
||||
uint32_t tiling = I915_TILING_NONE;
|
||||
|
||||
if (intel->use_texture_tiling && compress_byte == 0) {
|
||||
if (intel->gen >= 4 &&
|
||||
(base_format == GL_DEPTH_COMPONENT ||
|
||||
base_format == GL_DEPTH_STENCIL_EXT))
|
||||
tiling = I915_TILING_Y;
|
||||
else
|
||||
else if (width0 >= 64)
|
||||
tiling = I915_TILING_X;
|
||||
} else
|
||||
tiling = I915_TILING_NONE;
|
||||
}
|
||||
|
||||
mt = intel_miptree_create_internal(intel, target, internal_format,
|
||||
first_level, last_level, width0,
|
||||
|
@@ -167,7 +167,7 @@ intel_stencil_drawpixels(GLcontext * ctx,
|
||||
irb = intel_create_renderbuffer(MESA_FORMAT_ARGB8888);
|
||||
irb->Base.Width = depth_irb->Base.Width;
|
||||
irb->Base.Height = depth_irb->Base.Height;
|
||||
intel_renderbuffer_set_region(irb, depth_irb->region);
|
||||
intel_renderbuffer_set_region(intel, irb, depth_irb->region);
|
||||
|
||||
/* Create a name for our renderbuffer, which lets us use other mesa
|
||||
* rb functions for convenience.
|
||||
|
@@ -49,7 +49,14 @@ intelChooseTextureFormat(GLcontext * ctx, GLint internalFormat,
|
||||
if (format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5) {
|
||||
return MESA_FORMAT_RGB565;
|
||||
}
|
||||
return do32bpt ? MESA_FORMAT_XRGB8888 : MESA_FORMAT_RGB565;
|
||||
if (do32bpt) {
|
||||
if (intel->has_xrgb_textures)
|
||||
return MESA_FORMAT_XRGB8888;
|
||||
else
|
||||
return MESA_FORMAT_ARGB8888;
|
||||
} else {
|
||||
return MESA_FORMAT_RGB565;
|
||||
}
|
||||
|
||||
case GL_RGBA8:
|
||||
case GL_RGB10_A2:
|
||||
@@ -68,7 +75,10 @@ intelChooseTextureFormat(GLcontext * ctx, GLint internalFormat,
|
||||
case GL_RGB10:
|
||||
case GL_RGB12:
|
||||
case GL_RGB16:
|
||||
return MESA_FORMAT_XRGB8888;
|
||||
if (intel->has_xrgb_textures)
|
||||
return MESA_FORMAT_XRGB8888;
|
||||
else
|
||||
return MESA_FORMAT_ARGB8888;
|
||||
|
||||
case GL_RGB5:
|
||||
case GL_RGB4:
|
||||
|
@@ -63,9 +63,9 @@ void intel_get_texture_alignment_unit(GLenum internalFormat, GLuint *w, GLuint *
|
||||
}
|
||||
}
|
||||
|
||||
void i945_miptree_layout_2d( struct intel_context *intel,
|
||||
struct intel_mipmap_tree *mt,
|
||||
uint32_t tiling )
|
||||
void i945_miptree_layout_2d(struct intel_context *intel,
|
||||
struct intel_mipmap_tree *mt,
|
||||
uint32_t tiling, int nr_images)
|
||||
{
|
||||
GLuint align_h = 2, align_w = 4;
|
||||
GLuint level;
|
||||
@@ -111,7 +111,7 @@ void i945_miptree_layout_2d( struct intel_context *intel,
|
||||
for ( level = mt->first_level ; level <= mt->last_level ; level++ ) {
|
||||
GLuint img_height;
|
||||
|
||||
intel_miptree_set_level_info(mt, level, 1, x, y, width,
|
||||
intel_miptree_set_level_info(mt, level, nr_images, x, y, width,
|
||||
height, 1);
|
||||
|
||||
if (mt->compressed)
|
||||
|
@@ -40,5 +40,5 @@ static INLINE GLuint minify( GLuint d )
|
||||
|
||||
extern void i945_miptree_layout_2d(struct intel_context *intel,
|
||||
struct intel_mipmap_tree *mt,
|
||||
uint32_t tiling);
|
||||
uint32_t tiling, int nr_images);
|
||||
extern void intel_get_texture_alignment_unit(GLenum, GLuint *, GLuint *);
|
||||
|
@@ -141,12 +141,28 @@ static void add_inst_to_list(struct schedule_instruction ** list, struct schedul
|
||||
*list = inst;
|
||||
}
|
||||
|
||||
static void add_inst_to_list_end(struct schedule_instruction ** list,
|
||||
struct schedule_instruction * inst)
|
||||
{
|
||||
if(!*list){
|
||||
*list = inst;
|
||||
}else{
|
||||
struct schedule_instruction * temp = *list;
|
||||
while(temp->NextReady){
|
||||
temp = temp->NextReady;
|
||||
}
|
||||
temp->NextReady = inst;
|
||||
}
|
||||
}
|
||||
|
||||
static void instruction_ready(struct schedule_state * s, struct schedule_instruction * sinst)
|
||||
{
|
||||
DBG("%i is now ready\n", sinst->Instruction->IP);
|
||||
|
||||
/* Adding Ready TEX instructions to the end of the "Ready List" helps
|
||||
* us emit TEX instructions in blocks without losing our place. */
|
||||
if (sinst->Instruction->Type == RC_INSTRUCTION_NORMAL)
|
||||
add_inst_to_list(&s->ReadyTEX, sinst);
|
||||
add_inst_to_list_end(&s->ReadyTEX, sinst);
|
||||
else if (sinst->Instruction->U.P.Alpha.Opcode == RC_OPCODE_NOP)
|
||||
add_inst_to_list(&s->ReadyRGB, sinst);
|
||||
else if (sinst->Instruction->U.P.RGB.Opcode == RC_OPCODE_NOP)
|
||||
@@ -163,11 +179,14 @@ static void decrease_dependencies(struct schedule_state * s, struct schedule_ins
|
||||
instruction_ready(s, sinst);
|
||||
}
|
||||
|
||||
static void commit_instruction(struct schedule_state * s, struct schedule_instruction * sinst)
|
||||
{
|
||||
DBG("%i: commit\n", sinst->Instruction->IP);
|
||||
|
||||
for(unsigned int i = 0; i < sinst->NumReadValues; ++i) {
|
||||
/**
|
||||
* This function decreases the dependencies of the next instruction that
|
||||
* wants to write to each of sinst's read values.
|
||||
*/
|
||||
static void commit_update_reads(struct schedule_state * s,
|
||||
struct schedule_instruction * sinst){
|
||||
unsigned int i;
|
||||
for(i = 0; i < sinst->NumReadValues; ++i) {
|
||||
struct reg_value * v = sinst->ReadValues[i];
|
||||
assert(v->NumReaders > 0);
|
||||
v->NumReaders--;
|
||||
@@ -176,8 +195,12 @@ static void commit_instruction(struct schedule_state * s, struct schedule_instru
|
||||
decrease_dependencies(s, v->Next->Writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(unsigned int i = 0; i < sinst->NumWriteValues; ++i) {
|
||||
static void commit_update_writes(struct schedule_state * s,
|
||||
struct schedule_instruction * sinst){
|
||||
unsigned int i;
|
||||
for(i = 0; i < sinst->NumWriteValues; ++i) {
|
||||
struct reg_value * v = sinst->WriteValues[i];
|
||||
if (v->NumReaders) {
|
||||
for(struct reg_value_reader * r = v->Readers; r; r = r->Next) {
|
||||
@@ -196,6 +219,15 @@ static void commit_instruction(struct schedule_state * s, struct schedule_instru
|
||||
}
|
||||
}
|
||||
|
||||
static void commit_alu_instruction(struct schedule_state * s, struct schedule_instruction * sinst)
|
||||
{
|
||||
DBG("%i: commit\n", sinst->Instruction->IP);
|
||||
|
||||
commit_update_reads(s, sinst);
|
||||
|
||||
commit_update_writes(s, sinst);
|
||||
}
|
||||
|
||||
/**
|
||||
* Emit all ready texture instructions in a single block.
|
||||
*
|
||||
@@ -208,21 +240,37 @@ static void emit_all_tex(struct schedule_state * s, struct rc_instruction * befo
|
||||
|
||||
assert(s->ReadyTEX);
|
||||
|
||||
/* Don't let the ready list change under us! */
|
||||
readytex = s->ReadyTEX;
|
||||
s->ReadyTEX = 0;
|
||||
|
||||
/* Node marker for R300 */
|
||||
struct rc_instruction * inst_begin = rc_insert_new_instruction(s->C, before->Prev);
|
||||
inst_begin->U.I.Opcode = RC_OPCODE_BEGIN_TEX;
|
||||
|
||||
/* Link texture instructions back in */
|
||||
readytex = s->ReadyTEX;
|
||||
while(readytex) {
|
||||
struct schedule_instruction * tex = readytex;
|
||||
readytex = readytex->NextReady;
|
||||
rc_insert_instruction(before->Prev, readytex->Instruction);
|
||||
DBG("%i: commit TEX reads\n", readytex->Instruction->IP);
|
||||
|
||||
rc_insert_instruction(before->Prev, tex->Instruction);
|
||||
commit_instruction(s, tex);
|
||||
/* All of the TEX instructions in the same TEX block have
|
||||
* their source registers read from before any of the
|
||||
* instructions in that block write to their destination
|
||||
* registers. This means that when we commit a TEX
|
||||
* instruction, any other TEX instruction that wants to write
|
||||
* to one of the committed instruction's source register can be
|
||||
* marked as ready and should be emitted in the same TEX
|
||||
* block. This prevents the following sequence from being
|
||||
* emitted in two different TEX blocks:
|
||||
* 0: TEX temp[0].xyz, temp[1].xy__, 2D[0];
|
||||
* 1: TEX temp[1].xyz, temp[2].xy__, 2D[0];
|
||||
*/
|
||||
commit_update_reads(s, readytex);
|
||||
readytex = readytex->NextReady;
|
||||
}
|
||||
readytex = s->ReadyTEX;
|
||||
s->ReadyTEX = 0;
|
||||
while(readytex){
|
||||
DBG("%i: commit TEX writes\n", readytex->Instruction->IP);
|
||||
commit_update_writes(s, readytex);
|
||||
readytex = readytex->NextReady;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,7 +376,7 @@ static void emit_one_alu(struct schedule_state *s, struct rc_instruction * befor
|
||||
}
|
||||
|
||||
rc_insert_instruction(before->Prev, sinst->Instruction);
|
||||
commit_instruction(s, sinst);
|
||||
commit_alu_instruction(s, sinst);
|
||||
} else {
|
||||
struct schedule_instruction **prgb;
|
||||
struct schedule_instruction **palpha;
|
||||
@@ -346,8 +394,8 @@ static void emit_one_alu(struct schedule_state *s, struct rc_instruction * befor
|
||||
*prgb = (*prgb)->NextReady;
|
||||
*palpha = (*palpha)->NextReady;
|
||||
rc_insert_instruction(before->Prev, psirgb->Instruction);
|
||||
commit_instruction(s, psirgb);
|
||||
commit_instruction(s, psialpha);
|
||||
commit_alu_instruction(s, psirgb);
|
||||
commit_alu_instruction(s, psialpha);
|
||||
goto success;
|
||||
}
|
||||
}
|
||||
@@ -357,7 +405,7 @@ static void emit_one_alu(struct schedule_state *s, struct rc_instruction * befor
|
||||
s->ReadyRGB = s->ReadyRGB->NextReady;
|
||||
|
||||
rc_insert_instruction(before->Prev, sinst->Instruction);
|
||||
commit_instruction(s, sinst);
|
||||
commit_alu_instruction(s, sinst);
|
||||
success: ;
|
||||
}
|
||||
}
|
||||
|
@@ -456,7 +456,7 @@ static void r300InitGLExtensions(GLcontext *ctx)
|
||||
if (!r300->radeon.radeonScreen->drmSupportsOcclusionQueries) {
|
||||
_mesa_disable_extension(ctx, "GL_ARB_occlusion_query");
|
||||
}
|
||||
if (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV350)
|
||||
if (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_R420)
|
||||
_mesa_enable_extension(ctx, "GL_ARB_half_float_vertex");
|
||||
|
||||
if (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV515)
|
||||
|
@@ -523,8 +523,7 @@ static void r300AllocDmaRegions(GLcontext *ctx, const struct gl_client_array *in
|
||||
r300ConvertAttrib(ctx, count, input[i], &vbuf->attribs[index]);
|
||||
} else {
|
||||
if (input[i]->BufferObj->Name) {
|
||||
if (stride % 4 != 0) {
|
||||
assert(((intptr_t) input[i]->Ptr) % input[i]->StrideB == 0);
|
||||
if (stride % 4 != 0 || (intptr_t)input[i]->Ptr % 4 != 0) {
|
||||
r300AlignDataToDword(ctx, input[i], count, &vbuf->attribs[index]);
|
||||
vbuf->attribs[index].is_named_bo = GL_FALSE;
|
||||
} else {
|
||||
|
@@ -293,7 +293,9 @@ GLuint GetSurfaceFormat(GLenum eType, GLuint nChannels, GLuint * pClient_size)
|
||||
case 2:
|
||||
format = FMT_16_16; break;
|
||||
case 3:
|
||||
format = FMT_16_16_16; break;
|
||||
/* 3 comp GL_SHORT vertex format doesnt work on r700
|
||||
4 somehow works, test - sauerbraten */
|
||||
format = FMT_16_16_16_16; break;
|
||||
case 4:
|
||||
format = FMT_16_16_16_16; break;
|
||||
default:
|
||||
@@ -1051,6 +1053,67 @@ void checkop_init(r700_AssemblerBase* pAsm)
|
||||
pAsm->aArgSubst[3] = -1;
|
||||
}
|
||||
|
||||
static GLboolean next_ins(r700_AssemblerBase *pAsm)
|
||||
{
|
||||
struct prog_instruction *pILInst = &(pAsm->pILInst[pAsm->uiCurInst]);
|
||||
|
||||
if (GL_TRUE == pAsm->is_tex)
|
||||
{
|
||||
if (pILInst->TexSrcTarget == TEXTURE_RECT_INDEX)
|
||||
{
|
||||
if (GL_FALSE == assemble_tex_instruction(pAsm, GL_FALSE))
|
||||
{
|
||||
radeon_error("Error assembling TEX instruction\n");
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GL_FALSE == assemble_tex_instruction(pAsm, GL_TRUE))
|
||||
{
|
||||
radeon_error("Error assembling TEX instruction\n");
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{ //ALU
|
||||
if (GL_FALSE == assemble_alu_instruction(pAsm))
|
||||
{
|
||||
radeon_error("Error assembling ALU instruction\n");
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (pAsm->D.dst.rtype == DST_REG_OUT)
|
||||
{
|
||||
assert(pAsm->D.dst.reg >= pAsm->starting_export_register_number);
|
||||
|
||||
if (pAsm->D.dst.op3)
|
||||
{
|
||||
// There is no mask for OP3 instructions, so all channels are written
|
||||
pAsm->pucOutMask[pAsm->D.dst.reg - pAsm->starting_export_register_number] = 0xF;
|
||||
}
|
||||
else
|
||||
{
|
||||
pAsm->pucOutMask[pAsm->D.dst.reg - pAsm->starting_export_register_number]
|
||||
|= (unsigned char)pAsm->pILInst[pAsm->uiCurInst].DstReg.WriteMask;
|
||||
}
|
||||
}
|
||||
|
||||
//reset for next inst.
|
||||
pAsm->D.bits = 0;
|
||||
pAsm->D2.bits = 0;
|
||||
pAsm->S[0].bits = 0;
|
||||
pAsm->S[1].bits = 0;
|
||||
pAsm->S[2].bits = 0;
|
||||
pAsm->is_tex = GL_FALSE;
|
||||
pAsm->need_tex_barrier = GL_FALSE;
|
||||
pAsm->D2.bits = 0;
|
||||
pAsm->C[0].bits = pAsm->C[1].bits = pAsm->C[2].bits = pAsm->C[3].bits = 0;
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
GLboolean mov_temp(r700_AssemblerBase* pAsm, int src)
|
||||
{
|
||||
GLuint tmp = gethelpr(pAsm);
|
||||
@@ -1201,7 +1264,7 @@ GLboolean checkop3(r700_AssemblerBase* pAsm)
|
||||
{
|
||||
if( GL_FALSE == mov_temp(pAsm, 1) )
|
||||
{
|
||||
return 1;
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2578,62 +2641,6 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
GLboolean next_ins(r700_AssemblerBase *pAsm)
|
||||
{
|
||||
struct prog_instruction *pILInst = &(pAsm->pILInst[pAsm->uiCurInst]);
|
||||
|
||||
if( GL_TRUE == pAsm->is_tex )
|
||||
{
|
||||
if (pILInst->TexSrcTarget == TEXTURE_RECT_INDEX) {
|
||||
if( GL_FALSE == assemble_tex_instruction(pAsm, GL_FALSE) )
|
||||
{
|
||||
radeon_error("Error assembling TEX instruction\n");
|
||||
return GL_FALSE;
|
||||
}
|
||||
} else {
|
||||
if( GL_FALSE == assemble_tex_instruction(pAsm, GL_TRUE) )
|
||||
{
|
||||
radeon_error("Error assembling TEX instruction\n");
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{ //ALU
|
||||
if( GL_FALSE == assemble_alu_instruction(pAsm) )
|
||||
{
|
||||
radeon_error("Error assembling ALU instruction\n");
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if(pAsm->D.dst.rtype == DST_REG_OUT)
|
||||
{
|
||||
if(pAsm->D.dst.op3)
|
||||
{
|
||||
// There is no mask for OP3 instructions, so all channels are written
|
||||
pAsm->pucOutMask[pAsm->D.dst.reg - pAsm->starting_export_register_number] = 0xF;
|
||||
}
|
||||
else
|
||||
{
|
||||
pAsm->pucOutMask[pAsm->D.dst.reg - pAsm->starting_export_register_number]
|
||||
|= (unsigned char)pAsm->pILInst[pAsm->uiCurInst].DstReg.WriteMask;
|
||||
}
|
||||
}
|
||||
|
||||
//reset for next inst.
|
||||
pAsm->D.bits = 0;
|
||||
pAsm->D2.bits = 0;
|
||||
pAsm->S[0].bits = 0;
|
||||
pAsm->S[1].bits = 0;
|
||||
pAsm->S[2].bits = 0;
|
||||
pAsm->is_tex = GL_FALSE;
|
||||
pAsm->need_tex_barrier = GL_FALSE;
|
||||
pAsm->D2.bits = 0;
|
||||
pAsm->C[0].bits = pAsm->C[1].bits = pAsm->C[2].bits = pAsm->C[3].bits = 0;
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
GLboolean assemble_math_function(r700_AssemblerBase* pAsm, BITS opcode)
|
||||
{
|
||||
BITS tmp;
|
||||
@@ -2865,25 +2872,92 @@ GLboolean assemble_CMP(r700_AssemblerBase *pAsm)
|
||||
|
||||
GLboolean assemble_TRIG(r700_AssemblerBase *pAsm, BITS opcode)
|
||||
{
|
||||
/*
|
||||
* r600 - trunc to -PI..PI range
|
||||
* r700 - normalize by dividing by 2PI
|
||||
* see fdo bug 27901
|
||||
*/
|
||||
|
||||
int tmp;
|
||||
checkop1(pAsm);
|
||||
|
||||
tmp = gethelpr(pAsm);
|
||||
|
||||
pAsm->D.dst.opcode = SQ_OP2_INST_MUL;
|
||||
pAsm->D.dst.opcode = SQ_OP3_INST_MULADD;
|
||||
pAsm->D.dst.op3 = 1;
|
||||
|
||||
setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
|
||||
pAsm->D.dst.rtype = DST_REG_TEMPORARY;
|
||||
pAsm->D.dst.reg = tmp;
|
||||
pAsm->D.dst.writex = 1;
|
||||
|
||||
assemble_src(pAsm, 0, -1);
|
||||
|
||||
pAsm->S[1].src.rtype = SRC_REC_LITERAL;
|
||||
setswizzle_PVSSRC(&(pAsm->S[1].src), SQ_SEL_X);
|
||||
|
||||
pAsm->S[2].src.rtype = SRC_REC_LITERAL;
|
||||
setswizzle_PVSSRC(&(pAsm->S[2].src), SQ_SEL_Y);
|
||||
|
||||
pAsm->D2.dst2.literal_slots = 1;
|
||||
pAsm->C[0].f = 1/(3.1415926535 * 2);
|
||||
pAsm->C[1].f = 0.0F;
|
||||
next_ins(pAsm);
|
||||
pAsm->C[1].f = 0.5f;
|
||||
|
||||
if ( GL_FALSE == next_ins(pAsm) )
|
||||
{
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
pAsm->D.dst.opcode = SQ_OP2_INST_FRACT;
|
||||
|
||||
setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
|
||||
pAsm->D.dst.rtype = DST_REG_TEMPORARY;
|
||||
pAsm->D.dst.reg = tmp;
|
||||
pAsm->D.dst.writex = 1;
|
||||
|
||||
setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
|
||||
pAsm->S[0].src.rtype = SRC_REG_TEMPORARY;
|
||||
pAsm->S[0].src.reg = tmp;
|
||||
setswizzle_PVSSRC(&(pAsm->S[0].src), SQ_SEL_X);
|
||||
|
||||
if(( GL_FALSE == next_ins(pAsm) ))
|
||||
{
|
||||
return GL_FALSE;
|
||||
}
|
||||
pAsm->D.dst.opcode = SQ_OP3_INST_MULADD;
|
||||
pAsm->D.dst.op3 = 1;
|
||||
|
||||
setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
|
||||
pAsm->D.dst.rtype = DST_REG_TEMPORARY;
|
||||
pAsm->D.dst.reg = tmp;
|
||||
|
||||
setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
|
||||
pAsm->S[0].src.rtype = SRC_REG_TEMPORARY;
|
||||
pAsm->S[0].src.reg = tmp;
|
||||
setswizzle_PVSSRC(&(pAsm->S[0].src), SQ_SEL_X);
|
||||
|
||||
pAsm->S[1].src.rtype = SRC_REC_LITERAL;
|
||||
setswizzle_PVSSRC(&(pAsm->S[1].src), SQ_SEL_X);
|
||||
|
||||
pAsm->S[2].src.rtype = SRC_REC_LITERAL;
|
||||
setswizzle_PVSSRC(&(pAsm->S[2].src), SQ_SEL_Y);
|
||||
|
||||
pAsm->D2.dst2.literal_slots = 1;
|
||||
|
||||
if (pAsm->bR6xx)
|
||||
{
|
||||
pAsm->C[0].f = 3.1415926535897f * 2.0f;
|
||||
pAsm->C[1].f = -3.1415926535897f;
|
||||
}
|
||||
else
|
||||
{
|
||||
pAsm->C[0].f = 1.0f;
|
||||
pAsm->C[1].f = -0.5f;
|
||||
}
|
||||
|
||||
if(( GL_FALSE == next_ins(pAsm) ))
|
||||
{
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
pAsm->D.dst.opcode = opcode;
|
||||
pAsm->D.dst.math = 1;
|
||||
@@ -4023,22 +4097,79 @@ GLboolean assemble_SCS(r700_AssemblerBase *pAsm)
|
||||
checkop1(pAsm);
|
||||
|
||||
tmp = gethelpr(pAsm);
|
||||
/* tmp.x = src /2*PI */
|
||||
pAsm->D.dst.opcode = SQ_OP2_INST_MUL;
|
||||
|
||||
pAsm->D.dst.opcode = SQ_OP3_INST_MULADD;
|
||||
pAsm->D.dst.op3 = 1;
|
||||
|
||||
setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
|
||||
pAsm->D.dst.rtype = DST_REG_TEMPORARY;
|
||||
pAsm->D.dst.reg = tmp;
|
||||
pAsm->D.dst.writex = 1;
|
||||
|
||||
assemble_src(pAsm, 0, -1);
|
||||
|
||||
pAsm->S[1].src.rtype = SRC_REC_LITERAL;
|
||||
setswizzle_PVSSRC(&(pAsm->S[1].src), SQ_SEL_X);
|
||||
|
||||
pAsm->S[2].src.rtype = SRC_REC_LITERAL;
|
||||
setswizzle_PVSSRC(&(pAsm->S[2].src), SQ_SEL_Y);
|
||||
|
||||
pAsm->D2.dst2.literal_slots = 1;
|
||||
pAsm->C[0].f = 1/(3.1415926535 * 2);
|
||||
pAsm->C[1].f = 0.0F;
|
||||
pAsm->C[1].f = 0.5F;
|
||||
|
||||
next_ins(pAsm);
|
||||
if ( GL_FALSE == next_ins(pAsm) )
|
||||
{
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
pAsm->D.dst.opcode = SQ_OP2_INST_FRACT;
|
||||
|
||||
setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
|
||||
pAsm->D.dst.rtype = DST_REG_TEMPORARY;
|
||||
pAsm->D.dst.reg = tmp;
|
||||
pAsm->D.dst.writex = 1;
|
||||
|
||||
setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
|
||||
pAsm->S[0].src.rtype = SRC_REG_TEMPORARY;
|
||||
pAsm->S[0].src.reg = tmp;
|
||||
setswizzle_PVSSRC(&(pAsm->S[0].src), SQ_SEL_X);
|
||||
|
||||
if(( GL_FALSE == next_ins(pAsm) ))
|
||||
{
|
||||
return GL_FALSE;
|
||||
}
|
||||
pAsm->D.dst.opcode = SQ_OP3_INST_MULADD;
|
||||
pAsm->D.dst.op3 = 1;
|
||||
|
||||
setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
|
||||
pAsm->D.dst.rtype = DST_REG_TEMPORARY;
|
||||
pAsm->D.dst.reg = tmp;
|
||||
|
||||
setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
|
||||
pAsm->S[0].src.rtype = SRC_REG_TEMPORARY;
|
||||
pAsm->S[0].src.reg = tmp;
|
||||
setswizzle_PVSSRC(&(pAsm->S[0].src), SQ_SEL_X);
|
||||
|
||||
pAsm->S[1].src.rtype = SRC_REC_LITERAL;
|
||||
setswizzle_PVSSRC(&(pAsm->S[1].src), SQ_SEL_X);
|
||||
|
||||
pAsm->S[2].src.rtype = SRC_REC_LITERAL;
|
||||
setswizzle_PVSSRC(&(pAsm->S[2].src), SQ_SEL_Y);
|
||||
|
||||
pAsm->D2.dst2.literal_slots = 1;
|
||||
|
||||
if(pAsm->bR6xx) {
|
||||
pAsm->C[0].f = 3.1415926535897f * 2.0f;
|
||||
pAsm->C[1].f = -3.1415926535897f;
|
||||
} else {
|
||||
pAsm->C[0].f = 1.0f;
|
||||
pAsm->C[1].f = -0.5f;
|
||||
}
|
||||
|
||||
if(( GL_FALSE == next_ins(pAsm) ))
|
||||
{
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
// COS dst.x, a.x
|
||||
pAsm->D.dst.opcode = SQ_OP2_INST_COS;
|
||||
@@ -6154,7 +6285,7 @@ GLboolean callPreSub(r700_AssemblerBase* pAsm,
|
||||
}
|
||||
if(uNumValidSrc > 0)
|
||||
{
|
||||
prelude_cf_ptr = pAsm->cf_current_alu_clause_ptr;
|
||||
prelude_cf_ptr = (R700ControlFlowGenericClause*) pAsm->cf_current_alu_clause_ptr;
|
||||
pAsm->alu_x_opcode = SQ_CF_INST_ALU;
|
||||
}
|
||||
|
||||
@@ -6274,7 +6405,7 @@ GLboolean callPreSub(r700_AssemblerBase* pAsm,
|
||||
|
||||
next_ins(pAsm);
|
||||
|
||||
pAsm->callers[pAsm->unCallerArrayPointer - 1].finale_cf_ptr = pAsm->cf_current_alu_clause_ptr;
|
||||
pAsm->callers[pAsm->unCallerArrayPointer - 1].finale_cf_ptr = (R700ControlFlowGenericClause*) pAsm->cf_current_alu_clause_ptr;
|
||||
pAsm->callers[pAsm->unCallerArrayPointer - 1].prelude_cf_ptr = prelude_cf_ptr;
|
||||
pAsm->alu_x_opcode = SQ_CF_INST_ALU;
|
||||
}
|
||||
@@ -6347,6 +6478,8 @@ GLboolean Process_Export(r700_AssemblerBase* pAsm,
|
||||
|
||||
if (export_count == 1)
|
||||
{
|
||||
assert(starting_register_number >= pAsm->starting_export_register_number);
|
||||
|
||||
ucWriteMask = pAsm->pucOutMask[starting_register_number - pAsm->starting_export_register_number];
|
||||
/* exports Z as a float into Red channel */
|
||||
if (GL_TRUE == is_depth_export)
|
||||
@@ -6437,6 +6570,7 @@ GLboolean Process_Fragment_Exports(r700_AssemblerBase *pR700AsmCode,
|
||||
{
|
||||
unsigned int unBit;
|
||||
GLuint export_count = 0;
|
||||
unsigned int i;
|
||||
|
||||
if(pR700AsmCode->depth_export_register_number >= 0)
|
||||
{
|
||||
@@ -6446,39 +6580,24 @@ GLboolean Process_Fragment_Exports(r700_AssemblerBase *pR700AsmCode,
|
||||
}
|
||||
}
|
||||
|
||||
unBit = 1 << FRAG_RESULT_COLOR;
|
||||
if(OutputsWritten & unBit)
|
||||
{
|
||||
if( GL_FALSE == Process_Export(pR700AsmCode,
|
||||
SQ_EXPORT_PIXEL,
|
||||
0,
|
||||
1,
|
||||
pR700AsmCode->uiFP_OutputMap[FRAG_RESULT_COLOR],
|
||||
GL_FALSE) )
|
||||
for (i = 0; i < FRAG_RESULT_MAX; ++i)
|
||||
{
|
||||
unBit = 1 << i;
|
||||
|
||||
if (OutputsWritten & unBit)
|
||||
{
|
||||
return GL_FALSE;
|
||||
GLboolean is_depth = i == FRAG_RESULT_DEPTH ? GL_TRUE : GL_FALSE;
|
||||
if (!Process_Export(pR700AsmCode, SQ_EXPORT_PIXEL, 0, 1, pR700AsmCode->uiFP_OutputMap[i], is_depth))
|
||||
return GL_FALSE;
|
||||
++export_count;
|
||||
}
|
||||
export_count++;
|
||||
}
|
||||
unBit = 1 << FRAG_RESULT_DEPTH;
|
||||
if(OutputsWritten & unBit)
|
||||
{
|
||||
if( GL_FALSE == Process_Export(pR700AsmCode,
|
||||
SQ_EXPORT_PIXEL,
|
||||
0,
|
||||
1,
|
||||
pR700AsmCode->uiFP_OutputMap[FRAG_RESULT_DEPTH],
|
||||
GL_TRUE))
|
||||
{
|
||||
return GL_FALSE;
|
||||
}
|
||||
export_count++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Need to export something, otherwise we'll hang
|
||||
* results are undefined anyway */
|
||||
if(export_count == 0)
|
||||
{
|
||||
Process_Export(pR700AsmCode, SQ_EXPORT_PIXEL, 0, 1, 0, GL_FALSE);
|
||||
Process_Export(pR700AsmCode, SQ_EXPORT_PIXEL, 0, 1, pR700AsmCode->starting_export_register_number, GL_FALSE);
|
||||
}
|
||||
|
||||
if(pR700AsmCode->cf_last_export_ptr != NULL)
|
||||
@@ -6511,13 +6630,30 @@ GLboolean Process_Vertex_Exports(r700_AssemblerBase *pR700AsmCode,
|
||||
{
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
export_starting_index++;
|
||||
export_count--;
|
||||
}
|
||||
|
||||
unBit = 1 << VERT_RESULT_PSIZ;
|
||||
if(OutputsWritten & unBit)
|
||||
{
|
||||
if( GL_FALSE == Process_Export(pR700AsmCode,
|
||||
SQ_EXPORT_POS,
|
||||
export_starting_index,
|
||||
1,
|
||||
pR700AsmCode->ucVP_OutputMap[VERT_RESULT_PSIZ],
|
||||
GL_FALSE) )
|
||||
{
|
||||
return GL_FALSE;
|
||||
}
|
||||
export_count--;
|
||||
}
|
||||
|
||||
pR700AsmCode->cf_last_export_ptr->m_Word1.f.cf_inst = SQ_CF_INST_EXPORT_DONE;
|
||||
|
||||
pR700AsmCode->cf_last_export_ptr->m_Word1.f.cf_inst = SQ_CF_INST_EXPORT_DONE;
|
||||
}
|
||||
|
||||
pR700AsmCode->number_of_exports = export_count;
|
||||
export_starting_index = 0;
|
||||
|
||||
unBit = 1 << VERT_RESULT_COL0;
|
||||
if(OutputsWritten & unBit)
|
||||
|
@@ -582,7 +582,6 @@ GLboolean check_scalar(r700_AssemblerBase* pAsm,
|
||||
GLboolean check_vector(r700_AssemblerBase* pAsm,
|
||||
R700ALUInstruction* alu_instruction_ptr);
|
||||
GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm);
|
||||
GLboolean next_ins(r700_AssemblerBase *pAsm);
|
||||
|
||||
GLboolean pops(r700_AssemblerBase *pAsm, GLuint pops);
|
||||
GLboolean jumpToOffest(r700_AssemblerBase *pAsm, GLuint pops, GLint offset);
|
||||
|
@@ -226,22 +226,23 @@ void Map_Fragment_Program(r700_AssemblerBase *pAsm,
|
||||
pAsm->number_of_exports = 0;
|
||||
pAsm->number_of_colorandz_exports = 0; /* don't include stencil and mask out. */
|
||||
pAsm->starting_export_register_number = pAsm->number_used_registers;
|
||||
unBit = 1 << FRAG_RESULT_COLOR;
|
||||
if(mesa_fp->Base.OutputsWritten & unBit)
|
||||
{
|
||||
pAsm->uiFP_OutputMap[FRAG_RESULT_COLOR] = pAsm->number_used_registers++;
|
||||
pAsm->number_of_exports++;
|
||||
pAsm->number_of_colorandz_exports++;
|
||||
}
|
||||
unBit = 1 << FRAG_RESULT_DEPTH;
|
||||
if(mesa_fp->Base.OutputsWritten & unBit)
|
||||
{
|
||||
pAsm->depth_export_register_number = pAsm->number_used_registers;
|
||||
pAsm->uiFP_OutputMap[FRAG_RESULT_DEPTH] = pAsm->number_used_registers++;
|
||||
pAsm->number_of_exports++;
|
||||
pAsm->number_of_colorandz_exports++;
|
||||
pAsm->pR700Shader->depthIsExported = 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < FRAG_RESULT_MAX; ++i)
|
||||
{
|
||||
unBit = 1 << i;
|
||||
if (mesa_fp->Base.OutputsWritten & unBit)
|
||||
{
|
||||
if (i == FRAG_RESULT_DEPTH)
|
||||
{
|
||||
pAsm->depth_export_register_number = pAsm->number_used_registers;
|
||||
pAsm->pR700Shader->depthIsExported = 1;
|
||||
}
|
||||
|
||||
pAsm->uiFP_OutputMap[i] = pAsm->number_used_registers++;
|
||||
++pAsm->number_of_exports;
|
||||
++pAsm->number_of_colorandz_exports;
|
||||
}
|
||||
}
|
||||
|
||||
pAsm->pucOutMask = (unsigned char*) MALLOC(pAsm->number_of_exports);
|
||||
for(ui=0; ui<pAsm->number_of_exports; ui++)
|
||||
@@ -560,27 +561,34 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
|
||||
CLEARbit(r700->SPI_PS_IN_CONTROL_1.u32All, FRONT_FACE_ENA_bit);
|
||||
}
|
||||
|
||||
/* see if we need any point_sprite replacements */
|
||||
for (i = VERT_RESULT_TEX0; i<= VERT_RESULT_TEX7; i++)
|
||||
/* see if we need any point_sprite replacements, also increase num_interp
|
||||
* as there's no vp output for them */
|
||||
if (ctx->Point.PointSprite)
|
||||
{
|
||||
if(ctx->Point.CoordReplace[i - VERT_RESULT_TEX0] == GL_TRUE)
|
||||
point_sprite = GL_TRUE;
|
||||
for (i = FRAG_ATTRIB_TEX0; i<= FRAG_ATTRIB_TEX7; i++)
|
||||
{
|
||||
if (ctx->Point.CoordReplace[i - FRAG_ATTRIB_TEX0] == GL_TRUE)
|
||||
{
|
||||
ui++;
|
||||
point_sprite = GL_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( mesa_fp->Base.InputsRead & (1 << FRAG_ATTRIB_PNTC))
|
||||
ui++;
|
||||
|
||||
if ((mesa_fp->Base.InputsRead & (1 << FRAG_ATTRIB_PNTC)) || point_sprite)
|
||||
{
|
||||
/* for FRAG_ATTRIB_PNTC we need to increase num_interp */
|
||||
if(mesa_fp->Base.InputsRead & (1 << FRAG_ATTRIB_PNTC))
|
||||
{
|
||||
ui++;
|
||||
SETfield(r700->SPI_PS_IN_CONTROL_0.u32All, ui, NUM_INTERP_shift, NUM_INTERP_mask);
|
||||
}
|
||||
SETfield(r700->SPI_PS_IN_CONTROL_0.u32All, ui, NUM_INTERP_shift, NUM_INTERP_mask);
|
||||
SETbit(r700->SPI_INTERP_CONTROL_0.u32All, PNT_SPRITE_ENA_bit);
|
||||
SETfield(r700->SPI_INTERP_CONTROL_0.u32All, SPI_PNT_SPRITE_SEL_S, PNT_SPRITE_OVRD_X_shift, PNT_SPRITE_OVRD_X_mask);
|
||||
SETfield(r700->SPI_INTERP_CONTROL_0.u32All, SPI_PNT_SPRITE_SEL_T, PNT_SPRITE_OVRD_Y_shift, PNT_SPRITE_OVRD_Y_mask);
|
||||
SETfield(r700->SPI_INTERP_CONTROL_0.u32All, SPI_PNT_SPRITE_SEL_0, PNT_SPRITE_OVRD_Z_shift, PNT_SPRITE_OVRD_Z_mask);
|
||||
SETfield(r700->SPI_INTERP_CONTROL_0.u32All, SPI_PNT_SPRITE_SEL_1, PNT_SPRITE_OVRD_W_shift, PNT_SPRITE_OVRD_W_mask);
|
||||
if(ctx->Point.SpriteOrigin == GL_LOWER_LEFT)
|
||||
/* Like e.g. viewport and winding, point sprite coordinates are
|
||||
* inverted when rendering to FBO. */
|
||||
if ((ctx->Point.SpriteOrigin == GL_LOWER_LEFT) == !ctx->DrawBuffer->Name)
|
||||
SETbit(r700->SPI_INTERP_CONTROL_0.u32All, PNT_SPRITE_TOP_1_bit);
|
||||
else
|
||||
CLEARbit(r700->SPI_INTERP_CONTROL_0.u32All, PNT_SPRITE_TOP_1_bit);
|
||||
@@ -668,8 +676,9 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
|
||||
|
||||
for(i=0; i<8; i++)
|
||||
{
|
||||
GLboolean coord_replace = ctx->Point.PointSprite && ctx->Point.CoordReplace[i];
|
||||
unBit = 1 << (VERT_RESULT_TEX0 + i);
|
||||
if(OutputsWritten & unBit)
|
||||
if ((OutputsWritten & unBit) || coord_replace)
|
||||
{
|
||||
ui = pAsm->uiFP_AttributeMap[FRAG_ATTRIB_TEX0 + i];
|
||||
SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
|
||||
@@ -677,7 +686,7 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
|
||||
SEMANTIC_shift, SEMANTIC_mask);
|
||||
CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
|
||||
/* ARB_point_sprite */
|
||||
if(ctx->Point.CoordReplace[i] == GL_TRUE)
|
||||
if (coord_replace)
|
||||
{
|
||||
SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, PT_SPRITE_TEX_bit);
|
||||
}
|
||||
|
@@ -628,6 +628,16 @@ GLboolean r700SetupVertexProgram(GLcontext * ctx)
|
||||
|
||||
R600_STATECHANGE(context, spi);
|
||||
|
||||
if(vp->mesa_program->Base.OutputsWritten & (1 << VERT_RESULT_PSIZ)) {
|
||||
R600_STATECHANGE(context, cl);
|
||||
SETbit(r700->PA_CL_VS_OUT_CNTL.u32All, USE_VTX_POINT_SIZE_bit);
|
||||
SETbit(r700->PA_CL_VS_OUT_CNTL.u32All, VS_OUT_MISC_VEC_ENA_bit);
|
||||
} else if (r700->PA_CL_VS_OUT_CNTL.u32All != 0) {
|
||||
R600_STATECHANGE(context, cl);
|
||||
CLEARbit(r700->PA_CL_VS_OUT_CNTL.u32All, USE_VTX_POINT_SIZE_bit);
|
||||
CLEARbit(r700->PA_CL_VS_OUT_CNTL.u32All, VS_OUT_MISC_VEC_ENA_bit);
|
||||
}
|
||||
|
||||
SETfield(r700->SPI_VS_OUT_CONFIG.u32All,
|
||||
vp->r700Shader.nParamExports ? (vp->r700Shader.nParamExports - 1) : 0,
|
||||
VS_EXPORT_COUNT_shift, VS_EXPORT_COUNT_mask);
|
||||
|
@@ -413,9 +413,9 @@ enum {
|
||||
CHIP_FAMILY_R350,
|
||||
CHIP_FAMILY_RV350,
|
||||
CHIP_FAMILY_RV380,
|
||||
CHIP_FAMILY_RS400,
|
||||
CHIP_FAMILY_R420,
|
||||
CHIP_FAMILY_RV410,
|
||||
CHIP_FAMILY_RS400,
|
||||
CHIP_FAMILY_RS600,
|
||||
CHIP_FAMILY_RS690,
|
||||
CHIP_FAMILY_RS740,
|
||||
|
@@ -300,10 +300,10 @@ void radeonDestroyContext(__DRIcontext *driContextPriv )
|
||||
_mesa_meta_free(radeon->glCtx);
|
||||
|
||||
if (radeon == current) {
|
||||
radeon_firevertices(radeon);
|
||||
_mesa_make_current(NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
radeon_firevertices(radeon);
|
||||
if (!is_empty_list(&radeon->dma.reserved)) {
|
||||
rcommonFlushCmdBuf( radeon, __FUNCTION__ );
|
||||
}
|
||||
|
@@ -588,17 +588,17 @@ int radeon_validate_texture_miptree(GLcontext * ctx, struct gl_texture_object *t
|
||||
__FUNCTION__, texObj ,t->minLod, t->maxLod);
|
||||
|
||||
radeon_mipmap_tree *dst_miptree;
|
||||
dst_miptree = get_biggest_matching_miptree(t, t->minLod, t->maxLod);
|
||||
dst_miptree = get_biggest_matching_miptree(t, t->base.BaseLevel, t->base.MaxLevel);
|
||||
|
||||
radeon_miptree_unreference(&t->mt);
|
||||
if (!dst_miptree) {
|
||||
radeon_miptree_unreference(&t->mt);
|
||||
radeon_try_alloc_miptree(rmesa, t);
|
||||
dst_miptree = t->mt;
|
||||
radeon_print(RADEON_TEXTURE, RADEON_NORMAL,
|
||||
"%s: No matching miptree found, allocated new one %p\n",
|
||||
__FUNCTION__, t->mt);
|
||||
|
||||
} else {
|
||||
radeon_miptree_reference(dst_miptree, &t->mt);
|
||||
radeon_print(RADEON_TEXTURE, RADEON_NORMAL,
|
||||
"%s: Using miptree %p\n", __FUNCTION__, t->mt);
|
||||
}
|
||||
@@ -615,7 +615,7 @@ int radeon_validate_texture_miptree(GLcontext * ctx, struct gl_texture_object *t
|
||||
"Checking image level %d, face %d, mt %p ... ",
|
||||
level, face, img->mt);
|
||||
|
||||
if (img->mt != dst_miptree) {
|
||||
if (img->mt != t->mt) {
|
||||
radeon_print(RADEON_TEXTURE, RADEON_TRACE,
|
||||
"MIGRATING\n");
|
||||
|
||||
@@ -623,7 +623,7 @@ int radeon_validate_texture_miptree(GLcontext * ctx, struct gl_texture_object *t
|
||||
if (src_bo && radeon_bo_is_referenced_by_cs(src_bo, rmesa->cmdbuf.cs)) {
|
||||
radeon_firevertices(rmesa);
|
||||
}
|
||||
migrate_image_to_miptree(dst_miptree, img, face, level);
|
||||
migrate_image_to_miptree(t->mt, img, face, level);
|
||||
} else
|
||||
radeon_print(RADEON_TEXTURE, RADEON_TRACE, "OK\n");
|
||||
}
|
||||
|
@@ -52,22 +52,34 @@ do_copy_texsubimage(GLcontext *ctx,
|
||||
gl_format dst_mesaformat;
|
||||
unsigned src_width;
|
||||
unsigned dst_width;
|
||||
unsigned flip_y;
|
||||
|
||||
if (!radeon->vtbl.blit) {
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
if (_mesa_get_format_bits(timg->base.TexFormat, GL_DEPTH_BITS) > 0) {
|
||||
rrb = radeon_get_depthbuffer(radeon);
|
||||
if (ctx->ReadBuffer->_DepthBuffer && ctx->ReadBuffer->_DepthBuffer->Wrapped) {
|
||||
rrb = radeon_renderbuffer(ctx->ReadBuffer->_DepthBuffer->Wrapped);
|
||||
} else {
|
||||
rrb = radeon_renderbuffer(ctx->ReadBuffer->_DepthBuffer);
|
||||
}
|
||||
flip_y = ctx->ReadBuffer->Attachment[BUFFER_DEPTH].Type == GL_NONE;
|
||||
} else {
|
||||
rrb = radeon_get_colorbuffer(radeon);
|
||||
rrb = radeon_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer);
|
||||
flip_y = ctx->ReadBuffer->Attachment[BUFFER_COLOR0].Type == GL_NONE;
|
||||
}
|
||||
|
||||
// This is software renderbuffer, fallback to swrast
|
||||
if (!rrb) {
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
if (!timg->mt) {
|
||||
radeon_validate_texture_miptree(ctx, &tobj->base);
|
||||
}
|
||||
|
||||
assert(rrb && rrb->bo);
|
||||
assert(rrb->bo);
|
||||
assert(timg->mt);
|
||||
assert(timg->mt->bo);
|
||||
assert(timg->base.Width >= dstx + width);
|
||||
@@ -124,7 +136,7 @@ do_copy_texsubimage(GLcontext *ctx,
|
||||
timg->mt->bo, dst_offset, dst_mesaformat,
|
||||
timg->mt->levels[level].rowstride / dst_bpp,
|
||||
dst_width, timg->base.Height,
|
||||
dstx, dsty, width, height, 1);
|
||||
dstx, dsty, width, height, flip_y);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -1016,7 +1016,15 @@ radeon_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
|
||||
__func__, ctx, texObj, image, compressed);
|
||||
|
||||
if (image->mt) {
|
||||
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
|
||||
/* Map the texture image read-only */
|
||||
if (radeon_bo_is_referenced_by_cs(image->mt->bo, rmesa->cmdbuf.cs)) {
|
||||
radeon_print(RADEON_TEXTURE, RADEON_VERBOSE,
|
||||
"%s: called for texture that is queued for GPU processing\n",
|
||||
__func__);
|
||||
radeon_firevertices(rmesa);
|
||||
}
|
||||
|
||||
radeon_teximage_map(image, GL_FALSE);
|
||||
} else {
|
||||
/* Image hasn't been uploaded to a miptree yet */
|
||||
|
@@ -19,17 +19,11 @@ INCLUDE_DIRS = \
|
||||
-I$(TOP)/src/mesa \
|
||||
-I$(TOP)/src/mesa/main
|
||||
|
||||
# Standalone osmesa needs to be linked with core Mesa APIs
|
||||
ifeq ($(DRIVER_DIRS), osmesa)
|
||||
CORE_MESA = \
|
||||
$(TOP)/src/mesa/libmesa.a \
|
||||
$(TOP)/src/mesa/libglapi.a \
|
||||
$(TOP)/src/glsl/cl/libglslcl.a \
|
||||
$(TOP)/src/glsl/pp/libglslpp.a
|
||||
else
|
||||
CORE_MESA =
|
||||
endif
|
||||
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
|
||||
|
@@ -1004,7 +1004,20 @@ new_osmesa_renderbuffer(GLcontext *ctx, GLenum format, GLenum type)
|
||||
rb->AllocStorage = osmesa_renderbuffer_storage;
|
||||
|
||||
rb->InternalFormat = GL_RGBA;
|
||||
rb->Format = MESA_FORMAT_RGBA8888;
|
||||
switch (type) {
|
||||
case GL_UNSIGNED_BYTE:
|
||||
rb->Format = MESA_FORMAT_RGBA8888;
|
||||
break;
|
||||
case GL_UNSIGNED_SHORT:
|
||||
rb->Format = MESA_FORMAT_SIGNED_RGBA_16;
|
||||
break;
|
||||
case GL_FLOAT:
|
||||
rb->Format = MESA_FORMAT_RGBA_FLOAT32;
|
||||
break;
|
||||
default:
|
||||
assert(0 && "Unexpected type in new_osmesa_renderbuffer()");
|
||||
rb->Format = MESA_FORMAT_RGBA8888;
|
||||
}
|
||||
rb->_BaseFormat = GL_RGBA;
|
||||
rb->DataType = type;
|
||||
}
|
||||
@@ -1048,7 +1061,6 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
|
||||
struct dd_function_table functions;
|
||||
GLint rind, gind, bind, aind;
|
||||
GLint redBits = 0, greenBits = 0, blueBits = 0, alphaBits =0;
|
||||
GLenum type = CHAN_TYPE;
|
||||
|
||||
rind = gind = bind = aind = 0;
|
||||
if (format==OSMESA_RGBA) {
|
||||
@@ -1167,11 +1179,9 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* create front color buffer in user-provided memory (no back buffer) */
|
||||
osmesa->rb = new_osmesa_renderbuffer(&osmesa->mesa, format, type);
|
||||
_mesa_add_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT, osmesa->rb);
|
||||
assert(osmesa->rb->RefCount == 2);
|
||||
|
||||
/* Create depth/stencil/accum buffers. We'll create the color
|
||||
* buffer later in OSMesaMakeCurrent().
|
||||
*/
|
||||
_mesa_add_soft_renderbuffers(osmesa->gl_buffer,
|
||||
GL_FALSE, /* color */
|
||||
osmesa->gl_visual->haveDepthBuffer,
|
||||
@@ -1308,11 +1318,24 @@ OSMesaMakeCurrent( OSMesaContext osmesa, void *buffer, GLenum type,
|
||||
*/
|
||||
_glapi_check_multithread();
|
||||
|
||||
|
||||
/* Create a front/left color buffer which wraps the user-provided buffer.
|
||||
* There is no back color buffer.
|
||||
* If the user tries to use a 8, 16 or 32-bit/channel buffer that
|
||||
* doesn't match what Mesa was compiled for (CHAN_BITS) the
|
||||
* _mesa_add_renderbuffer() function will create a "wrapper" renderbuffer
|
||||
* that converts rendering from CHAN_BITS to the user-requested channel
|
||||
* size.
|
||||
*/
|
||||
osmesa->rb = new_osmesa_renderbuffer(&osmesa->mesa, osmesa->format, type);
|
||||
_mesa_remove_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT);
|
||||
_mesa_add_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT, osmesa->rb);
|
||||
assert(osmesa->rb->RefCount == 2);
|
||||
|
||||
/* Set renderbuffer fields. Set width/height = 0 to force
|
||||
* osmesa_renderbuffer_storage() being called by _mesa_resize_framebuffer()
|
||||
*/
|
||||
osmesa->rb->Data = buffer;
|
||||
osmesa->rb->DataType = type;
|
||||
osmesa->rb->Width = osmesa->rb->Height = 0;
|
||||
|
||||
/* Set the framebuffer's size. This causes the
|
||||
|
@@ -1880,7 +1880,7 @@ _mesa_BufferObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
||||
|
||||
bufObj->Purgeable = GL_FALSE;
|
||||
|
||||
retval = GL_RETAINED_APPLE;
|
||||
retval = option;
|
||||
if (ctx->Driver.BufferObjectUnpurgeable)
|
||||
retval = ctx->Driver.BufferObjectUnpurgeable(ctx, bufObj, option);
|
||||
|
||||
@@ -1910,11 +1910,11 @@ _mesa_RenderObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
||||
|
||||
bufObj->Purgeable = GL_FALSE;
|
||||
|
||||
retval = GL_RETAINED_APPLE;
|
||||
retval = option;
|
||||
if (ctx->Driver.RenderObjectUnpurgeable)
|
||||
retval = ctx->Driver.RenderObjectUnpurgeable(ctx, bufObj, option);
|
||||
|
||||
return option;
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
@@ -1940,7 +1940,7 @@ _mesa_TextureObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
||||
|
||||
bufObj->Purgeable = GL_FALSE;
|
||||
|
||||
retval = GL_RETAINED_APPLE;
|
||||
retval = option;
|
||||
if (ctx->Driver.TextureObjectUnpurgeable)
|
||||
retval = ctx->Driver.TextureObjectUnpurgeable(ctx, bufObj, option);
|
||||
|
||||
|
@@ -1358,6 +1358,8 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
|
||||
if (newCtx->FirstTimeCurrent) {
|
||||
_mesa_compute_version(newCtx);
|
||||
|
||||
newCtx->Extensions.String = _mesa_make_extension_string(newCtx);
|
||||
|
||||
check_context_limits(newCtx);
|
||||
|
||||
/* We can use this to help debug user's problems. Tell them to set
|
||||
|
@@ -1766,10 +1766,10 @@ _mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment,
|
||||
rb = NULL;
|
||||
}
|
||||
|
||||
if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
|
||||
if (attachment == GL_DEPTH_STENCIL_ATTACHMENT &&
|
||||
rb && rb->Format != MESA_FORMAT_NONE) {
|
||||
/* make sure the renderbuffer is a depth/stencil format */
|
||||
const GLenum baseFormat =
|
||||
_mesa_get_format_base_format(att->Renderbuffer->Format);
|
||||
const GLenum baseFormat = _mesa_get_format_base_format(rb->Format);
|
||||
if (baseFormat != GL_DEPTH_STENCIL) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glFramebufferRenderbufferEXT(renderbuffer"
|
||||
|
@@ -71,8 +71,6 @@ _mesa_GetString( GLenum name )
|
||||
case GL_VERSION:
|
||||
return (const GLubyte *) ctx->VersionString;
|
||||
case GL_EXTENSIONS:
|
||||
if (!ctx->Extensions.String)
|
||||
ctx->Extensions.String = _mesa_make_extension_string(ctx);
|
||||
return (const GLubyte *) ctx->Extensions.String;
|
||||
#if FEATURE_ARB_shading_language_100
|
||||
case GL_SHADING_LANGUAGE_VERSION_ARB:
|
||||
|
@@ -537,7 +537,7 @@ _mesa_update_state_locked( GLcontext *ctx )
|
||||
|
||||
/* Determine which state flags effect vertex/fragment program state */
|
||||
if (ctx->FragmentProgram._MaintainTexEnvProgram) {
|
||||
prog_flags |= (_NEW_TEXTURE | _NEW_FOG |
|
||||
prog_flags |= (_NEW_BUFFERS | _NEW_TEXTURE | _NEW_FOG |
|
||||
_NEW_ARRAY | _NEW_LIGHT | _NEW_POINT | _NEW_RENDERMODE |
|
||||
_NEW_PROGRAM);
|
||||
}
|
||||
|
@@ -98,6 +98,7 @@ struct state_key {
|
||||
GLuint fog_enabled:1;
|
||||
GLuint fog_mode:2; /**< FOG_x */
|
||||
GLuint inputs_available:12;
|
||||
GLuint num_draw_buffers:4;
|
||||
|
||||
/* NOTE: This array of structs must be last! (see "keySize" below) */
|
||||
struct {
|
||||
@@ -485,6 +486,9 @@ static GLuint make_state_key( GLcontext *ctx, struct state_key *key )
|
||||
inputs_referenced |= FRAG_BIT_FOGC; /* maybe */
|
||||
}
|
||||
|
||||
/* _NEW_BUFFERS */
|
||||
key->num_draw_buffers = ctx->DrawBuffer->_NumColorDrawBuffers;
|
||||
|
||||
key->inputs_available = (inputs_available & inputs_referenced);
|
||||
|
||||
/* compute size of state key, ignoring unused texture units */
|
||||
@@ -1199,11 +1203,14 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
|
||||
else
|
||||
alpha_saturate = GL_FALSE;
|
||||
|
||||
/* If this is the very last calculation, emit direct to output reg:
|
||||
/* If this is the very last calculation (and various other conditions
|
||||
* are met), emit directly to the color output register. Otherwise,
|
||||
* emit to a temporary register.
|
||||
*/
|
||||
if (key->separate_specular ||
|
||||
unit != p->last_tex_stage ||
|
||||
alpha_shift ||
|
||||
key->num_draw_buffers != 1 ||
|
||||
rgb_shift)
|
||||
dest = get_temp( p );
|
||||
else
|
||||
@@ -1438,10 +1445,10 @@ create_new_program(GLcontext *ctx, struct state_key *key,
|
||||
p.program->Base.Parameters = _mesa_new_parameter_list();
|
||||
p.program->Base.InputsRead = 0x0;
|
||||
|
||||
if (ctx->DrawBuffer->_NumColorDrawBuffers == 1)
|
||||
if (key->num_draw_buffers == 1)
|
||||
p.program->Base.OutputsWritten = 1 << FRAG_RESULT_COLOR;
|
||||
else {
|
||||
for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++)
|
||||
for (i = 0; i < key->num_draw_buffers; i++)
|
||||
p.program->Base.OutputsWritten |= (1 << (FRAG_RESULT_DATA0 + i));
|
||||
}
|
||||
|
||||
@@ -1493,8 +1500,8 @@ create_new_program(GLcontext *ctx, struct state_key *key,
|
||||
|
||||
cf = get_source( &p, SRC_PREVIOUS, 0 );
|
||||
|
||||
for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
|
||||
if (ctx->DrawBuffer->_NumColorDrawBuffers == 1)
|
||||
for (i = 0; i < key->num_draw_buffers; i++) {
|
||||
if (key->num_draw_buffers == 1)
|
||||
out = make_ureg( PROGRAM_OUTPUT, FRAG_RESULT_COLOR );
|
||||
else {
|
||||
out = make_ureg( PROGRAM_OUTPUT, FRAG_RESULT_DATA0 + i );
|
||||
|
@@ -34,8 +34,8 @@
|
||||
/* Mesa version */
|
||||
#define MESA_MAJOR 7
|
||||
#define MESA_MINOR 8
|
||||
#define MESA_PATCH 1
|
||||
#define MESA_VERSION_STRING "7.8.1"
|
||||
#define MESA_PATCH 3
|
||||
#define MESA_VERSION_STRING "7.8.3"
|
||||
|
||||
/* To make version comparison easy */
|
||||
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
|
@@ -1259,6 +1259,54 @@ lookup_uniform_parameter(GLcontext *ctx, GLuint program, GLint location,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* GLGL uniform arrays and structs require special handling.
|
||||
*
|
||||
* The GL_ARB_shader_objects spec says that if you use
|
||||
* glGetUniformLocation to get the location of an array, you CANNOT
|
||||
* access other elements of the array by adding an offset to the
|
||||
* returned location. For example, you must call
|
||||
* glGetUniformLocation("foo[16]") if you want to set the 16th element
|
||||
* of the array with glUniform().
|
||||
*
|
||||
* HOWEVER, some other OpenGL drivers allow accessing array elements
|
||||
* by adding an offset to the returned array location. And some apps
|
||||
* seem to depend on that behaviour.
|
||||
*
|
||||
* Mesa's gl_uniform_list doesn't directly support this since each
|
||||
* entry in the list describes one uniform variable, not one uniform
|
||||
* element. We could insert dummy entries in the list for each array
|
||||
* element after [0] but that causes complications elsewhere.
|
||||
*
|
||||
* We solve this problem by encoding two values in the location that's
|
||||
* returned by glGetUniformLocation():
|
||||
* a) index into gl_uniform_list::Uniforms[] for the uniform
|
||||
* b) an array/field offset (0 for simple types)
|
||||
*
|
||||
* These two values are encoded in the high and low halves of a GLint.
|
||||
* By putting the uniform number in the high part and the offset in the
|
||||
* low part, we can support the unofficial ability to index into arrays
|
||||
* by adding offsets to the location value.
|
||||
*/
|
||||
static void
|
||||
merge_location_offset(GLint *location, GLint offset)
|
||||
{
|
||||
*location = (*location << 16) | offset;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Seperate the uniform location and parameter offset. See above.
|
||||
*/
|
||||
static void
|
||||
split_location_offset(GLint *location, GLint *offset)
|
||||
{
|
||||
*offset = *location & 0xffff;
|
||||
*location = *location >> 16;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Called via ctx->Driver.GetUniformfv().
|
||||
*/
|
||||
@@ -1268,6 +1316,9 @@ _mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
|
||||
{
|
||||
struct gl_program *prog;
|
||||
GLint paramPos;
|
||||
GLint offset;
|
||||
|
||||
split_location_offset(&location, &offset);
|
||||
|
||||
lookup_uniform_parameter(ctx, program, location, &prog, ¶mPos);
|
||||
|
||||
@@ -1298,7 +1349,10 @@ _mesa_get_uniformiv(GLcontext *ctx, GLuint program, GLint location,
|
||||
{
|
||||
struct gl_program *prog;
|
||||
GLint paramPos;
|
||||
GLint offset;
|
||||
|
||||
split_location_offset(&location, &offset);
|
||||
|
||||
lookup_uniform_parameter(ctx, program, location, &prog, ¶mPos);
|
||||
|
||||
if (prog) {
|
||||
@@ -1318,31 +1372,6 @@ _mesa_get_uniformiv(GLcontext *ctx, GLuint program, GLint location,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The value returned by GetUniformLocation actually encodes two things:
|
||||
* 1. the index into the prog->Uniforms[] array for the uniform
|
||||
* 2. an offset in the prog->ParameterValues[] array for specifying array
|
||||
* elements or structure fields.
|
||||
* This function merges those two values.
|
||||
*/
|
||||
static void
|
||||
merge_location_offset(GLint *location, GLint offset)
|
||||
{
|
||||
*location = *location | (offset << 16);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Seperate the uniform location and parameter offset. See above.
|
||||
*/
|
||||
static void
|
||||
split_location_offset(GLint *location, GLint *offset)
|
||||
{
|
||||
*offset = (*location >> 16);
|
||||
*location = *location & 0xffff;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Called via ctx->Driver.GetUniformLocation().
|
||||
*
|
||||
|
@@ -399,7 +399,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field,
|
||||
}
|
||||
|
||||
if (isMatrix) {
|
||||
/* load all four columns of matrix */
|
||||
/* load all four rows (or columns) of matrix */
|
||||
GLint pos[4];
|
||||
GLuint j;
|
||||
for (j = 0; j < 4; j++) {
|
||||
@@ -489,9 +489,26 @@ emit_statevars(const char *name, int array_len,
|
||||
tokens[0] = STATE_TEXGEN;
|
||||
tokens[2] = STATE_TEXGEN_OBJECT_Q;
|
||||
}
|
||||
else if (strcmp(name, "gl_TextureMatrix") == 0) {
|
||||
tokens[0] = STATE_TEXTURE_MATRIX;
|
||||
tokens[4] = STATE_MATRIX_TRANSPOSE;
|
||||
}
|
||||
else if (strcmp(name, "gl_TextureMatrixInverse") == 0) {
|
||||
tokens[0] = STATE_TEXTURE_MATRIX;
|
||||
tokens[4] = STATE_MATRIX_INVTRANS;
|
||||
}
|
||||
else if (strcmp(name, "gl_TextureMatrixTranspose") == 0) {
|
||||
tokens[0] = STATE_TEXTURE_MATRIX;
|
||||
tokens[4] = 0;
|
||||
}
|
||||
else if (strcmp(name, "gl_TextureMatrixInverseTranspose") == 0) {
|
||||
tokens[0] = STATE_TEXTURE_MATRIX;
|
||||
tokens[4] = STATE_MATRIX_INVERSE;
|
||||
}
|
||||
else {
|
||||
return -1; /* invalid array name */
|
||||
}
|
||||
/* emit state vars for each array element */
|
||||
for (i = 0; i < array_len; i++) {
|
||||
GLint p;
|
||||
tokens[1] = i;
|
||||
@@ -513,6 +530,19 @@ emit_statevars(const char *name, int array_len,
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
else if (type->type == SLANG_SPEC_MAT4) {
|
||||
/* unroll/emit 4 array rows (or columns) */
|
||||
slang_type_specifier vec4;
|
||||
GLint i, p, pos = -1;
|
||||
vec4.type = SLANG_SPEC_VEC4;
|
||||
for (i = 0; i < 4; i++) {
|
||||
tokens[2] = tokens[3] = i; /* row[i] (or column[i]) of matrix */
|
||||
p = emit_statevars(NULL, 0, &vec4, tokens, paramList);
|
||||
if (pos == -1)
|
||||
pos = p;
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
else {
|
||||
GLint pos;
|
||||
assert(type->type == SLANG_SPEC_VEC4 ||
|
||||
|
@@ -4187,11 +4187,10 @@ _slang_gen_variable(slang_assemble_ctx * A, slang_operation *oper)
|
||||
slang_atom name = oper->var ? oper->var->a_name : oper->a_id;
|
||||
slang_variable *var = _slang_variable_locate(oper->locals, name, GL_TRUE);
|
||||
slang_ir_node *n;
|
||||
if (!var) {
|
||||
if (!var || !var->declared) {
|
||||
slang_info_log_error(A->log, "undefined variable '%s'", (char *) name);
|
||||
return NULL;
|
||||
}
|
||||
assert(var->declared);
|
||||
n = new_var(A, var);
|
||||
return n;
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ typedef struct slang_variable_
|
||||
GLuint size; /**< Variable's size in bytes */
|
||||
GLboolean is_global;
|
||||
GLboolean isTemp; /**< a named temporary (__resultTmp) */
|
||||
GLboolean declared; /**< for debug */
|
||||
GLboolean declared; /**< has the var been declared? */
|
||||
struct slang_ir_storage_ *store; /**< Storage for this var */
|
||||
} slang_variable;
|
||||
|
||||
|
@@ -2362,7 +2362,10 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n)
|
||||
#if 0
|
||||
assert(!n->Store);
|
||||
#endif
|
||||
n->Store = n->Children[1]->Store;
|
||||
if (n->Children[1]->Store)
|
||||
n->Store = n->Children[1]->Store;
|
||||
else
|
||||
n->Store = n->Children[0]->Store;
|
||||
return inst;
|
||||
|
||||
case IR_SCOPE:
|
||||
@@ -2370,6 +2373,7 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n)
|
||||
_slang_push_var_table(emitInfo->vt);
|
||||
inst = emit(emitInfo, n->Children[0]);
|
||||
_slang_pop_var_table(emitInfo->vt);
|
||||
n->Store = n->Children[0]->Store;
|
||||
return inst;
|
||||
|
||||
case IR_VAR_DECL:
|
||||
|
@@ -921,7 +921,10 @@ _slang_link(GLcontext *ctx,
|
||||
|
||||
if (!vertNotify || !fragNotify) {
|
||||
/* driver rejected one/both of the vertex/fragment programs */
|
||||
link_error(shProg, "Vertex and/or fragment program rejected by driver\n");
|
||||
if (!shProg->InfoLog) {
|
||||
link_error(shProg,
|
||||
"Vertex and/or fragment program rejected by driver\n");
|
||||
}
|
||||
}
|
||||
else {
|
||||
shProg->LinkStatus = (shProg->VertexProgram || shProg->FragmentProgram);
|
||||
|
@@ -1135,7 +1135,7 @@ st_destroy_drawpix(struct st_context *st)
|
||||
st_reference_fragprog(st, &st->drawpix.z_shader, NULL);
|
||||
st_reference_fragprog(st, &st->pixel_xfer.combined_prog, NULL);
|
||||
if (st->drawpix.vert_shaders[0])
|
||||
free(st->drawpix.vert_shaders[0]);
|
||||
ureg_free_tokens(st->drawpix.vert_shaders[0]);
|
||||
if (st->drawpix.vert_shaders[1])
|
||||
free(st->drawpix.vert_shaders[1]);
|
||||
ureg_free_tokens(st->drawpix.vert_shaders[1]);
|
||||
}
|
||||
|
@@ -460,26 +460,38 @@ static void
|
||||
st_validate_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
|
||||
{
|
||||
struct pipe_screen *screen = ctx->st->pipe->screen;
|
||||
const struct gl_renderbuffer *depthRb =
|
||||
fb->Attachment[BUFFER_DEPTH].Renderbuffer;
|
||||
const struct gl_renderbuffer *stencilRb =
|
||||
fb->Attachment[BUFFER_STENCIL].Renderbuffer;
|
||||
const struct gl_renderbuffer_attachment *depth =
|
||||
&fb->Attachment[BUFFER_DEPTH];
|
||||
const struct gl_renderbuffer_attachment *stencil =
|
||||
&fb->Attachment[BUFFER_STENCIL];
|
||||
GLuint i;
|
||||
|
||||
if (stencilRb && depthRb && stencilRb != depthRb) {
|
||||
if (depth->Type && stencil->Type && depth->Type != stencil->Type) {
|
||||
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
|
||||
return;
|
||||
}
|
||||
if (depth->Type == GL_RENDERBUFFER_EXT &&
|
||||
stencil->Type == GL_RENDERBUFFER_EXT &&
|
||||
depth->Renderbuffer != stencil->Renderbuffer) {
|
||||
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
|
||||
return;
|
||||
}
|
||||
if (depth->Type == GL_TEXTURE &&
|
||||
stencil->Type == GL_TEXTURE &&
|
||||
depth->Texture != stencil->Texture) {
|
||||
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!st_validate_attachment(screen,
|
||||
&fb->Attachment[BUFFER_DEPTH],
|
||||
PIPE_TEXTURE_USAGE_DEPTH_STENCIL)) {
|
||||
depth,
|
||||
PIPE_TEXTURE_USAGE_DEPTH_STENCIL)) {
|
||||
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
|
||||
return;
|
||||
}
|
||||
if (!st_validate_attachment(screen,
|
||||
&fb->Attachment[BUFFER_STENCIL],
|
||||
PIPE_TEXTURE_USAGE_DEPTH_STENCIL)) {
|
||||
stencil,
|
||||
PIPE_TEXTURE_USAGE_DEPTH_STENCIL)) {
|
||||
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
|
||||
return;
|
||||
}
|
||||
|
@@ -69,6 +69,10 @@ st_read_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
|
||||
ubyte *stmap;
|
||||
GLint j;
|
||||
|
||||
if (strb->Base.Wrapped) {
|
||||
strb = st_renderbuffer(strb->Base.Wrapped);
|
||||
}
|
||||
|
||||
if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) {
|
||||
y = ctx->DrawBuffer->Height - y - height;
|
||||
}
|
||||
@@ -366,6 +370,9 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
|
||||
}
|
||||
else if (format == GL_DEPTH_COMPONENT) {
|
||||
strb = st_renderbuffer(ctx->ReadBuffer->_DepthBuffer);
|
||||
if (strb->Base.Wrapped) {
|
||||
strb = st_renderbuffer(strb->Base.Wrapped);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Read color buffer */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user