Compare commits

...

68 Commits

Author SHA1 Message Date
Aaron Plattner
ad7d36e919 Fix __glXInitializeVisualConfigFromTags's handling of unrecognized fbconfig tags.
__glXInitializeVisualConfigFromTags doesn't skip the payload of
unrecognized tags.  Instead, it treats the value as if it were the
next tag, which can happen if the server's GLX extension is not
Mesa's.  For example, this falls down when NVIDIA sends a
GLX_FLOAT_COMPONENTS_NV = 0 pair, causing
__glXInitializeVisualConfigFromTags to bail out early.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-04-23 11:48:11 -07:00
Jerome Glisse
eb4dc54788 r600: don't enable depth test if there is no depth buffer
If there is no depth buffer bound to current context don't
enable depth test. GL states that if depth test is enabled
without depth buffer it's as if depth buffer always pass.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-04-23 11:56:06 +02:00
Michel Dänzer
c37e275e77 glx/dri2: Fix build with dri2proto which doesn't define X_DRI2SwapInterval. 2010-04-23 11:16:03 +02:00
Tormod Volden
355370e30b radeon: 9800 SE has only one quadpipe
Although these cards have 2 pipelines on the silicon only
the first passed the QA and the other should be disabled.

http://www.digital-daily.com/video/ati-radeon9800se/
http://www.rojakpot.com/showarticle.aspx?artno=101&pgno=1

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2010-04-22 17:14:15 -04:00
Brian Paul
b1a9c76b57 st/mesa: add cases for MESA_FORMAT_Z24_X8, MESA_FORMAT_X8_Z24 2010-04-22 11:06:19 -06:00
Brian Paul
4d7ef6e06b mesa: fix conversion errors in signed_rgba8888[rev] texel fetch
Without the cast the returned texel colors were wrong.
Also, we don't need the "& 0xff" part anymore.
Bug found by Vinson Lee.
2010-04-22 11:06:19 -06:00
Alex Deucher
986eb4b99f r300: fix vertex unit setup
RV3xx is 2, RV560,RV570 is 8

Noticed by Tormod Volden.
2010-04-22 02:33:10 -04:00
Aaron Plattner
2e995cdf25 progs/demos: Fix the progs/demos/rain help text
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-04-21 18:13:19 -06:00
Dan Nicholson
88be2171e7 egl: Pass flags to locate Xlib headers and libraries
eglplatform.h pulls in Xlib.h on X11 platforms. Likewise, the egl glx
driver and egl programs needs to link to libX11. Make sure we use the
locations the user told us about.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2010-04-19 20:21:57 -07:00
Dan Nicholson
8e5effefc7 progs: Fix linking of Xlib demos for non-autoconf builds
The Xlib demos were fixed to use $(X11_LIBS) so that configure could
detect the proper directory to link the library from, but this broke
the non-autoconf builds. Give X11_LIBS a default value to fallback on.
(cherry picked from commit e40fce13e1)
2010-04-19 20:21:57 -07:00
Dan Nicholson
4e7a4bed37 Change libX11 variables to not conflict with AC_PATH_XTRA
The variable X_LIBS from AC_PATH_XTRA contains only the -L searchdir
parameter and not the -lX11 to link to Xlib. Use X11 prefixed build vars
for linking with Xlib to avoid the conflict.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
(cherry picked from commit e725ef171b)
2010-04-19 20:21:57 -07:00
Dan Nicholson
4f8bf353bd gallium: Respect user's CFLAGS for including X headers
This can break on systems that don't have a system X installation.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
(cherry picked from commit de4ee20578)

Conflicts:

	src/gallium/winsys/xlib/Makefile
2010-04-19 20:21:57 -07:00
Jeff Smith
3b693fd93f Use X_LIBS from pkg-config, instead of libdir, for locating libX11
Signed-off-by: Jeff Smith <whydoubt@yahoo.com>
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
(cherry picked from commit 8d86d395dc)
2010-04-19 20:21:57 -07:00
Jesse Barnes
0a18cdb0ed DRI2: check for swapAvailable before using swap interval protocol
This should have been part of the last change...
2010-04-19 14:20:21 -07:00
Jesse Barnes
385e2896eb DRI2: synchronize swap interval with server at startup time
In the direct rendered case, we need to tell the server our initial swap
interval.  If we don't, the local and server values will be out of sync,
since the server and client defaults may be different (as they were
before this patch).
2010-04-19 09:56:32 -07:00
Brian Paul
c060265bdb st/mesa: invert scissor rect depending on FB orientation
Fixes fd.o bug 27715
2010-04-19 10:10:47 -06:00
Matthieu Herrb
cf7d08b443 mesa: Fix build with gcc 3.3.
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-04-19 09:33:53 -06:00
Matthieu Herrb
f4553d99c6 radeon: Let this build with gcc 3.3
Declaring the loop index inside for () is not supported by this version.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-04-19 09:33:53 -06:00
Owain Ainsworth
c39ab02ae9 radeon: Fix command type for DRM_RADEON_IRQ_EMIT ioctl.
This should be drmCommandWriteRead to avoid an EINVAL error on systems
that strictly check ioctl args. This command has been r/w for ever.
Discussion with airlied agreed that this was the correct course.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-04-19 09:33:50 -06:00
Matthieu Herrb
7f1ae3a94d mesa: Use __OpenBSD__ to check for OpenBSD.
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-04-19 09:33:42 -06:00
Brian Paul
e3a34cc7f6 gallium/draw: use correct rasterization state for wide/AA points/lines
When points or lines are decomposed into triangles, we need to be sure
to disable polygon culling, stippling, "un-filled" modes, etc.

This patch sets the rasterization state to disable those things prior to
drawing points/lines with triangles, then restores the previous state
afterward.

The new piglit point-no-line-cull test checks this problem & solution.
2010-04-19 08:35:53 -06:00
Brian Paul
db3b34219e docs: update links for new mesa-users and mesa-announce lists 2010-04-16 08:25:58 -06:00
Tormod Volden
885048232f savage: call _mesa_meta_init/free()
Fixes crash when using _mesa_CopyTexImage2D.
Bug #27652.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-04-16 08:24:53 -06:00
Arpad Borsos
b3a68cdc6f softpipe: Fix division by zero
This can be triggered by running the cairo tests using the gl backend
and softpipe.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-04-14 14:26:37 -06:00
Michael Schmidt
d9793fc3ac Initialize DRI2 swap interval to 0
https://bugs.freedesktop.org/show_bug.cgi?id=27628
2010-04-14 10:15:47 -04:00
Jesse Barnes
157bdd1446 DRI2: report swap events correctly in direct rendered case
In the direct rendered case, we need to convert DRI2 swap complete
events to GLX events for the client to consume.  This path had what
looks like a stray "& 0x75" from some earlier debugging that prevented
clients from seeing the right event code.
2010-04-13 09:39:28 -07:00
Brian Paul
497b66094d docs: update name, link for mesa-dev list 2010-04-12 18:45:10 -06:00
Vinson Lee
4a796264df i915g: Fix assert. 2010-04-11 17:56:21 -07:00
Maciej Cencora
2657325c4a r300: respect radeon common code fallbacks
Fixes progs/demos/shadowtex under KMS
2010-04-11 13:42:00 +02:00
Maciej Cencora
6a5518861e r300: set proper vertex index limits also in non indexed mode
Fixes #27521, broken menus in UT2004 and broken water refraction in Sauerbraten.
2010-04-11 13:41:38 +02:00
Alex Deucher
edff2e0585 r600: add new r7xx pci ids 2010-04-09 20:20:42 -04:00
Kristian Høgsberg
394c25133e glx: Fix config chooser logic for 'mask' matching
When matching attributes using the 'mask' matching criteria, the spec
says that

  "Only GLXFBConfigs for which the set bits of attribute include all
   the bits that are set in the requested value are
   considered. (Additional bits might be set in the attribute)."

The current test returns true if the two bit masks have bits in
common, specifically it matches even if the requested value has bits
set that are not set in the fbconfig attribute.  For example, an
application asking for

  GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT | GLX_PBUFFER_BIT,

as glxpbdemo does, will match fbconfigs that don't support pbuffer
rendering, as long as they support pixmap rendering.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2010-04-09 15:24:29 -04:00
Brian Paul
b22a00bff4 mesa: fix instruction indexing bugs
We were looping over instructions but only looking at the 0th instruction's
opcode.

Fixes fd.o bug 27566.
2010-04-09 10:03:36 -06:00
Brian Paul
21cf976ad9 docs: link to 7.8.2 release notes 2010-04-08 13:11:30 -06:00
Brian Paul
3ad9a98ec2 docs: initial 7.8.2 release notes 2010-04-08 13:11:30 -06:00
Brian Paul
ffedd28c9c progs/tests: added some debug code (disabled) 2010-04-08 13:11:29 -06:00
Brian Paul
bab6c0a035 st/mesa: fix glDrawPixels(GL_DEPTH_COMPONENT) regression
Commit 1454f20a99 caused the regression.
When the vertex shader emitted both a texcoord and color we were grabbing
the wrong vertex attributes.  Fix the draw_quad() code to put texcoords
in slot[1] and color in slot[2].  That's a bit cleaner than changing
the vertex shader code.

Tested with progs/tests/zreaddraw.c
2010-04-08 13:11:29 -06:00
Li Peng
8ac7d7fa05 intel: Call intel_prepare_render() in intelClear()
Make sure we have up to date buffers before we start looking at
the tiling bits to determine how to clear.
2010-04-08 14:20:14 -04:00
Dave Airlie
4b39a0da89 texenvprogram: fix for ARB_draw_buffers.
piglit has a test called fbo-drawbuffers, this fails for me on r300g,
and fixing the texenv program to use the DATA outputs fixes it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-08 15:19:52 +10:00
Ian Romanick
582e292a88 docs: Update 7.8.1 release MD5 sums 2010-04-05 12:45:20 -07:00
Brian Paul
5683d77b22 mesa: bump MESA_TINY version 2010-04-05 11:22:32 -06:00
Brian Paul
0e0de77f0e docs: added news item for 7.8.1 release 2010-04-05 11:12:59 -06:00
Brian Paul
659669d74c docs: add link to 7.8.1 release notes 2010-04-05 11:10:51 -06:00
Brian Paul
0eea33b069 softpipe: index the correct blend/mask state index
Need to check pipe_blend_state::independent_blend_enable to determine
which render target/index to use when checking blend enable and colormask
state.

This is part of the fix for piglit/fbo-drawbuffers
2010-04-05 11:00:54 -06:00
Ian Romanick
1ad1a51f14 docs: Add 7.8.1 release MD5 sums 2010-04-05 09:51:18 -07:00
Ian Romanick
88b7329cdd mesa: set version string to 7.8.1 2010-04-05 09:49:08 -07:00
Ian Romanick
dcaa2c6e76 Initial 7.8.1 release notes 2010-04-05 09:12:33 -07:00
Henri Verbeet
f820b263db mesa: update_arrays() depends on program state.
It uses ctx->VertexProgram._Current.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-04-05 09:34:31 -06:00
Ian Romanick
42ea25cb4e Update to final names from GLX_INTEL_swap_event spec
Fixes bug #27454.
2010-04-04 23:06:01 -07:00
Ian Romanick
f66733e077 gl: updated glxext.h to version 27 2010-04-04 16:53:41 -07:00
Vinson Lee
930838efcd util: Use GCC atomic bultins on GCC 4.1 and higher only. 2010-04-03 12:14:21 -07:00
Jeremy Huddleston
71b2f1d8e6 xdemos: Build object files first
This helps debugging on darwin.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-03 11:23:09 -07:00
Vinson Lee
67776f66c9 glx: Fix compilation errors on non-GLX_DIRECT_RENDERING builds.
Add ifdef guards around variables of types defined only for
GLX_DIRECT_RENDERING.
2010-04-02 00:12:59 -07:00
Chia-I Wu
154d9242de st/vega: Do not depend on libm.
This fixes the "no rule to make target -lm" error on darwin, reported by
Jeremy Huddleston.
2010-04-02 10:32:36 +08:00
Jesse Barnes
2b4d8616f5 GLX/DRI2: pass GLX drawable ID to dri2InvalidateBuffers
The IDs will be the same in the case where an X window is used directly
as a GLX drawable, but will fail if a new GLX drawable is created
explicitly, as with glxgears_fbconfig.

Fixes fdo bug #27190.
2010-04-01 17:29:19 -07:00
Jeremy Huddleston
115203281c Revert accidental commits from the xquartz tree
This reverts commit 9aadc793f3.
This reverts commit 69ea4e7718.
This reverts commit dbe8b01393.
This reverts commit 23215ef4d6.
This reverts commit 9495e37030.
This reverts commit 0594cf7088.
This reverts commit 86a7978d37.
This reverts commit 437902ce97.
2010-04-01 17:01:51 -07:00
Jeremy Huddleston
9aadc793f3 apple: Don't build gallium
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:33:48 -07:00
Jeremy Huddleston
69ea4e7718 apple: Use mesa gl.h rather than generating one.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2010-04-01 12:33:47 -07:00
Jeremy Huddleston
dbe8b01393 apple: Integrate our libGL into the existing build system better
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:33:47 -07:00
Jeremy Huddleston
23215ef4d6 apple: Change ifdefs for DRI to be DRI && !APPLE
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:33:46 -07:00
Jeremy Huddleston
9495e37030 apple: Remove duplicate headers that already exist in mesa.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2010-04-01 12:33:46 -07:00
Jeremy Huddleston
0594cf7088 apple: Initial import of libGL for OSX from AppleSGLX svn repository.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:33:45 -07:00
Jeremy Huddleston
86a7978d37 xdemos: Build object files first
This helps debugging on darwin.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:33:39 -07:00
Jeremy Huddleston
437902ce97 xdemos: Fix a build failure for non-autoconf configs
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:14:45 -07:00
Vinson Lee
16f568a183 glx: Fix compilation errors on non-GLX_DIRECT_RENDERING builds.
driContext field for __GLXcontextRec struct is only defined if
GLX_DIRECT_RENDERING is set.
2010-04-01 00:10:28 -07:00
Ben Skeggs
e24f4378a1 st/mesa: use BITFIELD64_BIT to access shader OutputsWritten in more places 2010-03-31 23:34:42 +10:00
Michel Dänzer
07c6d94cd7 glx/dri2: Fix debug build with old dri2proto.
Apparently the higher compiler optimization level in non-debug builds was
eliminating the unused functions referencing the unresolved DRI2 symbols...
2010-03-30 11:50:13 +02:00
Brian Paul
2aafbd7c2a docs: fix 7.7.1 release date
(cherry picked from commit e6f5ca0fa3)
2010-03-29 12:01:28 -06:00
74 changed files with 751 additions and 316 deletions

View File

@@ -180,7 +180,7 @@ ultrix-gcc:
# Rules for making release tarballs
VERSION=7.8
VERSION=7.8.1
DIRECTORY = Mesa-$(VERSION)
LIB_NAME = MesaLib-$(VERSION)
DEMO_NAME = MesaDemos-$(VERSION)

View File

@@ -24,6 +24,8 @@ RADEON_CFLAGS = @RADEON_CFLAGS@
RADEON_LDFLAGS = @RADEON_LDFLAGS@
INTEL_LIBS = @INTEL_LIBS@
INTEL_CFLAGS = @INTEL_CFLAGS@
X11_LIBS = @X11_LIBS@
X11_CFLAGS = @X11_CFLAGS@
# Assembler
MESA_ASM_SOURCES = @MESA_ASM_SOURCES@

View File

@@ -10,7 +10,7 @@ CONFIG_NAME = default
# Version info
MESA_MAJOR=7
MESA_MINOR=8
MESA_TINY=0
MESA_TINY=1
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
# external projects. This should be useless now that we use libdrm.
@@ -119,7 +119,7 @@ APP_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LI
# Program dependencies - specific GL/glut libraries added in Makefiles
APP_LIB_DEPS = -lm
X11_LIBS = -lX11
# Installation directories (for make install)
INSTALL_DIR = /usr/local

View File

@@ -547,8 +547,14 @@ else
x11_pkgconfig=no
fi
dnl Use the autoconf macro if no pkg-config files
if test "$x11_pkgconfig" = no; then
if test "$x11_pkgconfig" = yes; then
PKG_CHECK_MODULES([X11], [x11])
else
AC_PATH_XTRA
test -z "$X11_CFLAGS" && X11_CFLAGS="$X_CFLAGS"
test -z "$X11_LIBS" && X11_LIBS="$X_LIBS -lX11"
AC_SUBST([X11_CFLAGS])
AC_SUBST([X11_LIBS])
fi
dnl Try to tell the user that the --x-* options are only used when

View File

@@ -13,14 +13,14 @@
</p>
<ul>
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-users"
target="_parent">mesa3d-users</a> - intended for end-users of Mesa and DRI
<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-users"
target="_parent">mesa-users</a> - intended for end-users of Mesa and DRI
drivers. Newbie questions are OK, but please try the general OpenGL
resources and Mesa/DRI documentation first.
</li>
<br>
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-dev"
target="_parent">mesa3d-dev</a> - for Mesa, Gallium and DRI development
<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev"
target="_parent">mesa-dev</a> - for Mesa, Gallium and DRI development
discussion. Not for beginners.
</li>
<br>
@@ -30,8 +30,8 @@ target="_parent">mesa-commit</a> - relays git check-in messages
In general, people should not post to this list.
</li>
<br>
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-announce"
target="_parent">mesa3d-announce</a> - announcements of new Mesa
<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-announce"
target="_parent">mesa-announce</a> - announcements of new Mesa
versions are sent to this list. Very low traffic.
</li>
</ul>

View File

@@ -11,7 +11,15 @@
<H1>News</H1>
<h2>March 26, 2010</h2>
<h2>April 5, 2010</h2>
<p>
<a href="relnotes-7.8.1.html">Mesa 7.8.1</a> is released. This is a bug-fix
release for a few critical issues in the 7.8 release.
</p>
<h2>March 28, 2010</h2>
<p>
<a href="relnotes-7.7.1.html">Mesa 7.7.1</a> is released. This is a bug-fix
release fixing issues found in the 7.7 release.

62
docs/relnotes-7.8.1.html Normal file
View File

@@ -0,0 +1,62 @@
<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.1 Release Notes / April, 5, 2010</H1>
<p>
Mesa 7.8.1 fixes a couple critical bugs in the recent Mesa 7.8 release. Even
though this is a bug fix release, given its proximity to the 7.8 release, a
new development release, it should also be considered new development release.
People who are concerned with stability and reliability should stick
with a previous release, such as 7.7.1, or wait for Mesa 7.8.2.
</p>
<p>
Mesa 7.8.1 implements the OpenGL 2.1 API, but the version reported by
glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
<h2>MD5 checksums</h2>
<pre>
62e8e47cbd63741b4bbe634dcdc8a56a MesaLib-7.8.1.tar.gz
25ec15f8e41fde6d206118cc786dbac4 MesaLib-7.8.1.tar.bz2
22b1153010ffdf513836ea9931159e80 MesaLib-7.8.1.zip
c9c0a830923d3820807a08c09d521b3e MesaDemos-7.8.1.tar.gz
9ef47f911869657c6bf2f43ebce86b61 MesaDemos-7.8.1.tar.bz2
93720605eb3f784f9bcc289a4dd2ff52 MesaDemos-7.8.1.zip
ed1d0b1e960afe6a3768eab747cbdbd3 MesaGLUT-7.8.1.tar.gz
6bae516a44c6d26ff3152c960ab648e7 MesaGLUT-7.8.1.tar.bz2
ba306f603ea73c30ee0e7efa14dc5581 MesaGLUT-7.8.1.zip
</pre>
<h2>New features</h2>
<p>None.</p>
<h2>Bug fixes</h2>
<ul>
<li>Fix incorrect enums for GLX_INTEL_swap_event by updating glxext.h to
version 27 from OpenGL.org.</li>
<li>Fix compilation errors on non-GLX_DIRECT_RENDERING builds.</li>
<li>Various fixes for building Mesa on OS X.</li>
<li>Pass GLX drawable ID to dri2InvalidateBuffers. Fixes bug #27190.</li>
</ul>
<h2>Changes</h2>
<p>None.</p>
</body>
</html>

46
docs/relnotes-7.8.2.html Normal file
View File

@@ -0,0 +1,46 @@
<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.2 Release Notes / April, 5, 2010</H1>
<p>
Mesa 7.8.2 is a bug fix release which fixes bugs found since the 7.8.1 release.
</p>
<p>
Mesa 7.8.2 implements the OpenGL 2.1 API, but the version reported by
glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
<h2>MD5 checksums</h2>
<pre>
tbd
</pre>
<h2>New features</h2>
<p>None.</p>
<h2>Bug fixes</h2>
<ul>
<li>Fixed Gallium glDrawPixels(GL_DEPTH_COMPONENT).
</ul>
<h2>Changes</h2>
<p>None.</p>
</body>
</html>

View File

@@ -13,6 +13,8 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
<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>
<LI><A HREF="relnotes-7.7.1.html">7.7.1 release notes</A>
<LI><A HREF="relnotes-7.7.html">7.7 release notes</A>

View File

@@ -6,7 +6,7 @@ extern "C" {
#endif
/*
** Copyright (c) 2007-2009 The Khronos Group Inc.
** Copyright (c) 2007-2010 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
@@ -48,9 +48,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
/* glxext.h last updated 2009/10/08 */
/* glxext.h last updated 2010/02/10 */
/* Current version at http://www.opengl.org/registry/ */
#define GLX_GLXEXT_VERSION 25
#define GLX_GLXEXT_VERSION 27
#ifndef GLX_VERSION_1_3
#define GLX_WINDOW_BIT 0x00000001
@@ -396,6 +396,13 @@ extern "C" {
#ifndef GLX_NV_copy_image
#endif
#ifndef GLX_INTEL_swap_event
#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000
#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
#define GLX_COPY_COMPLETE_INTEL 0x8181
#define GLX_FLIP_COMPLETE_INTEL 0x8182
#endif
/*************************************************************/
@@ -477,24 +484,24 @@ typedef unsigned __int64 uint64_t;
#ifndef GLX_VERSION_1_3
#define GLX_VERSION_1_3 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
extern void glXDestroyWindow (Display *, GLXWindow);
extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
extern void glXDestroyPixmap (Display *, GLXPixmap);
extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
extern void glXDestroyPbuffer (Display *, GLXPbuffer);
extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
extern GLXFBConfig * glXGetFBConfigs (Display *dpy, int screen, int *nelements);
extern GLXFBConfig * glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements);
extern int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value);
extern XVisualInfo * glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config);
extern GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
extern void glXDestroyWindow (Display *dpy, GLXWindow win);
extern GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
extern void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap);
extern GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list);
extern void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf);
extern void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
extern GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
extern Bool glXMakeContextCurrent (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
extern GLXDrawable glXGetCurrentReadDrawable (void);
extern Display * glXGetCurrentDisplay (void);
extern int glXQueryContext (Display *, GLXContext, int, int *);
extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
extern int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value);
extern void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask);
extern void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
@@ -519,7 +526,7 @@ typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, un
#ifndef GLX_VERSION_1_4
#define GLX_VERSION_1_4 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *procName);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
#endif
@@ -527,7 +534,7 @@ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
#ifndef GLX_ARB_get_proc_address
#define GLX_ARB_get_proc_address 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
#endif
@@ -543,7 +550,7 @@ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procNam
#ifndef GLX_ARB_create_context
#define GLX_ARB_create_context 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXContext glXCreateContextAttribsARB (Display *, GLXFBConfig, GLXContext, Bool, const int *);
extern GLXContext glXCreateContextAttribsARB (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
#endif
@@ -563,7 +570,7 @@ typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBCo
#ifndef GLX_SGI_swap_control
#define GLX_SGI_swap_control 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXSwapIntervalSGI (int);
extern int glXSwapIntervalSGI (int interval);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
#endif
@@ -571,8 +578,8 @@ typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
#ifndef GLX_SGI_video_sync
#define GLX_SGI_video_sync 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXGetVideoSyncSGI (unsigned int *);
extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
extern int glXGetVideoSyncSGI (unsigned int *count);
extern int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int *count);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
@@ -581,7 +588,7 @@ typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigne
#ifndef GLX_SGI_make_current_read
#define GLX_SGI_make_current_read 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
extern Bool glXMakeCurrentReadSGI (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
@@ -592,8 +599,8 @@ typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
#define GLX_SGIX_video_source 1
#ifdef _VL_H
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
extern void glXDestroyGLXVideoSourceSGIX (Display *dpy, GLXVideoSourceSGIX glxvideosource);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
@@ -608,10 +615,10 @@ typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSou
#define GLX_EXT_import_context 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Display * glXGetCurrentDisplayEXT (void);
extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
extern GLXContextID glXGetContextIDEXT (const GLXContext);
extern GLXContext glXImportContextEXT (Display *, GLXContextID);
extern void glXFreeContextEXT (Display *, GLXContext);
extern int glXQueryContextInfoEXT (Display *dpy, GLXContext context, int attribute, int *value);
extern GLXContextID glXGetContextIDEXT (const GLXContext context);
extern GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID);
extern void glXFreeContextEXT (Display *dpy, GLXContext context);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
@@ -623,12 +630,12 @@ typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
#ifndef GLX_SGIX_fbconfig
#define GLX_SGIX_fbconfig 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
extern int glXGetFBConfigAttribSGIX (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *dpy, int screen, int *attrib_list, int *nelements);
extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
extern GLXContext glXCreateContextWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *dpy, GLXFBConfigSGIX config);
extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *dpy, XVisualInfo *vis);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
@@ -641,11 +648,11 @@ typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy,
#ifndef GLX_SGIX_pbuffer
#define GLX_SGIX_pbuffer 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
extern void glXDestroyGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf);
extern int glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
extern void glXSelectEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long mask);
extern void glXGetSelectedEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long *mask);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
@@ -657,7 +664,7 @@ typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable draw
#ifndef GLX_SGI_cushion
#define GLX_SGI_cushion 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXCushionSGI (Display *, Window, float);
extern void glXCushionSGI (Display *dpy, Window window, float cushion);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
#endif
@@ -665,11 +672,11 @@ typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushi
#ifndef GLX_SGIX_video_resize
#define GLX_SGIX_video_resize 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
extern int glXBindChannelToWindowSGIX (Display *display, int screen, int channel, Window window);
extern int glXChannelRectSGIX (Display *display, int screen, int channel, int x, int y, int w, int h);
extern int glXQueryChannelRectSGIX (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
extern int glXQueryChannelDeltasSGIX (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
extern int glXChannelRectSyncSGIX (Display *display, int screen, int channel, GLenum synctype);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
@@ -682,7 +689,7 @@ typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, in
#define GLX_SGIX_dmbuffer 1
#ifdef _DM_BUFFER_H_
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
extern Bool glXAssociateDMPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
#endif /* _DM_BUFFER_H_ */
@@ -691,24 +698,16 @@ typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX
#ifndef GLX_SGIX_swap_group
#define GLX_SGIX_swap_group 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
extern void glXJoinSwapGroupSGIX (Display *dpy, GLXDrawable drawable, GLXDrawable member);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
#endif
#ifndef GLX_INTEL_swap_event
#define GLX_INTEL_swap_event
#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x10000000
#define GLX_EXCHANGE_COMPLETE_INTEL 0x8024
#define GLX_BLIT_COMPLETE_INTEL 0x8025
#define GLX_FLIP_COMPLETE_INTEL 0x8026
#endif
#ifndef GLX_SGIX_swap_barrier
#define GLX_SGIX_swap_barrier 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
extern void glXBindSwapBarrierSGIX (Display *dpy, GLXDrawable drawable, int barrier);
extern Bool glXQueryMaxSwapBarriersSGIX (Display *dpy, int screen, int *max);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
@@ -717,7 +716,7 @@ typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen,
#ifndef GLX_SUN_get_transparent_index
#define GLX_SUN_get_transparent_index 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
extern Status glXGetTransparentIndexSUN (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
#endif
@@ -725,7 +724,7 @@ typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overl
#ifndef GLX_MESA_copy_sub_buffer
#define GLX_MESA_copy_sub_buffer 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
extern void glXCopySubBufferMESA (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
#endif
@@ -733,7 +732,7 @@ typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawabl
#ifndef GLX_MESA_pixmap_colormap
#define GLX_MESA_pixmap_colormap 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
extern GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
#endif
@@ -741,7 +740,7 @@ typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo
#ifndef GLX_MESA_release_buffers
#define GLX_MESA_release_buffers 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
extern Bool glXReleaseBuffersMESA (Display *dpy, GLXDrawable drawable);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
#endif
@@ -749,7 +748,7 @@ typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawab
#ifndef GLX_MESA_set_3dfx_mode
#define GLX_MESA_set_3dfx_mode 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXSet3DfxModeMESA (int);
extern Bool glXSet3DfxModeMESA (int mode);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
#endif
@@ -765,11 +764,11 @@ typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
#ifndef GLX_OML_sync_control
#define GLX_OML_sync_control 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
extern Bool glXGetSyncValuesOML (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
extern Bool glXGetMscRateOML (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
extern int64_t glXSwapBuffersMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
extern Bool glXWaitForMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
extern Bool glXWaitForSbcOML (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
@@ -810,14 +809,14 @@ typedef struct {
} GLXPipeRectLimits;
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
extern int glXBindHyperpipeSGIX (Display *, int);
extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *dpy, int *npipes);
extern int glXHyperpipeConfigSGIX (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *dpy, int hpId, int *npipes);
extern int glXDestroyHyperpipeConfigSGIX (Display *dpy, int hpId);
extern int glXBindHyperpipeSGIX (Display *dpy, int hpId);
extern int glXQueryHyperpipeBestAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
extern int glXHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
extern int glXQueryHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
@@ -832,7 +831,7 @@ typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice
#ifndef GLX_MESA_agp_offset
#define GLX_MESA_agp_offset 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern unsigned int glXGetAGPOffsetMESA (const void *);
extern unsigned int glXGetAGPOffsetMESA (const void *pointer);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
#endif
@@ -848,8 +847,8 @@ typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
#ifndef GLX_EXT_texture_from_pixmap
#define GLX_EXT_texture_from_pixmap 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *);
extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int);
extern void glXBindTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
extern void glXReleaseTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
@@ -858,8 +857,8 @@ typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawab
#ifndef GLX_NV_present_video
#define GLX_NV_present_video 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern unsigned int * glXEnumerateVideoDevicesNV (Display *, int, int *);
extern int glXBindVideoDeviceNV (Display *, unsigned int, unsigned int, const int *);
extern unsigned int * glXEnumerateVideoDevicesNV (Display *dpy, int screen, int *nelements);
extern int glXBindVideoDeviceNV (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef unsigned int * ( * PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements);
typedef int ( * PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
@@ -868,12 +867,12 @@ typedef int ( * PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_s
#ifndef GLX_NV_video_output
#define GLX_NV_video_output 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXGetVideoDeviceNV (Display *, int, int, GLXVideoDeviceNV *);
extern int glXReleaseVideoDeviceNV (Display *, int, GLXVideoDeviceNV);
extern int glXBindVideoImageNV (Display *, GLXVideoDeviceNV, GLXPbuffer, int);
extern int glXReleaseVideoImageNV (Display *, GLXPbuffer);
extern int glXSendPbufferToVideoNV (Display *, GLXPbuffer, int, unsigned long *, GLboolean);
extern int glXGetVideoInfoNV (Display *, int, GLXVideoDeviceNV, unsigned long *, unsigned long *);
extern int glXGetVideoDeviceNV (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
extern int glXReleaseVideoDeviceNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
extern int glXBindVideoImageNV (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
extern int glXReleaseVideoImageNV (Display *dpy, GLXPbuffer pbuf);
extern int glXSendPbufferToVideoNV (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
extern int glXGetVideoInfoNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXGETVIDEODEVICENVPROC) (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
typedef int ( * PFNGLXRELEASEVIDEODEVICENVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
@@ -886,12 +885,12 @@ typedef int ( * PFNGLXGETVIDEOINFONVPROC) (Display *dpy, int screen, GLXVideoDev
#ifndef GLX_NV_swap_group
#define GLX_NV_swap_group 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXJoinSwapGroupNV (Display *, GLXDrawable, GLuint);
extern Bool glXBindSwapBarrierNV (Display *, GLuint, GLuint);
extern Bool glXQuerySwapGroupNV (Display *, GLXDrawable, GLuint *, GLuint *);
extern Bool glXQueryMaxSwapGroupsNV (Display *, int, GLuint *, GLuint *);
extern Bool glXQueryFrameCountNV (Display *, int, GLuint *);
extern Bool glXResetFrameCountNV (Display *, int);
extern Bool glXJoinSwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint group);
extern Bool glXBindSwapBarrierNV (Display *dpy, GLuint group, GLuint barrier);
extern Bool glXQuerySwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
extern Bool glXQueryMaxSwapGroupsNV (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
extern Bool glXQueryFrameCountNV (Display *dpy, int screen, GLuint *count);
extern Bool glXResetFrameCountNV (Display *dpy, int screen);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group);
typedef Bool ( * PFNGLXBINDSWAPBARRIERNVPROC) (Display *dpy, GLuint group, GLuint barrier);
@@ -904,11 +903,11 @@ typedef Bool ( * PFNGLXRESETFRAMECOUNTNVPROC) (Display *dpy, int screen);
#ifndef GLX_NV_video_capture
#define GLX_NV_video_capture 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXBindVideoCaptureDeviceNV (Display *, unsigned int, GLXVideoCaptureDeviceNV);
extern GLXVideoCaptureDeviceNV * glXEnumerateVideoCaptureDevicesNV (Display *, int, int *);
extern void glXLockVideoCaptureDeviceNV (Display *, GLXVideoCaptureDeviceNV);
extern int glXQueryVideoCaptureDeviceNV (Display *, GLXVideoCaptureDeviceNV, int, int *);
extern void glXReleaseVideoCaptureDeviceNV (Display *, GLXVideoCaptureDeviceNV);
extern int glXBindVideoCaptureDeviceNV (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
extern GLXVideoCaptureDeviceNV * glXEnumerateVideoCaptureDevicesNV (Display *dpy, int screen, int *nelements);
extern void glXLockVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device);
extern int glXQueryVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
extern void glXReleaseVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXBINDVIDEOCAPTUREDEVICENVPROC) (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
typedef GLXVideoCaptureDeviceNV * ( * PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC) (Display *dpy, int screen, int *nelements);
@@ -920,7 +919,7 @@ typedef void ( * PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoC
#ifndef GLX_EXT_swap_control
#define GLX_EXT_swap_control 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXSwapIntervalEXT (Display *, GLXDrawable, int);
extern int glXSwapIntervalEXT (Display *dpy, GLXDrawable drawable, int interval);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, int interval);
#endif
@@ -928,11 +927,15 @@ typedef int ( * PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable,
#ifndef GLX_NV_copy_image
#define GLX_NV_copy_image 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXCopyImageSubDataNV (Display *, GLXContext, GLuint, GLenum, GLint, GLint, GLint, GLint, GLXContext, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei);
extern void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
#endif
#ifndef GLX_INTEL_swap_event
#define GLX_INTEL_swap_event 1
#endif
#ifdef __cplusplus
}

View File

@@ -158,7 +158,7 @@ static void printhelp(void)
glRasterPos2i(60,240);
printstring(GLUT_BITMAP_TIMES_ROMAN_24,"l - Increase rain length");
glRasterPos2i(60,210);
printstring(GLUT_BITMAP_TIMES_ROMAN_24,"k - Increase rain length");
printstring(GLUT_BITMAP_TIMES_ROMAN_24,"k - Decrease rain length");
}
static void drawrain(void)

View File

@@ -4,7 +4,7 @@ TOP = ../..
include $(TOP)/configs/current
INCLUDE_DIRS = -I$(TOP)/include
INCLUDE_DIRS = -I$(TOP)/include $(X11_CFLAGS)
HEADERS = $(TOP)/include/GLES/egl.h
LIB_DEP = $(TOP)/$(LIB_DIR)/libEGL.so
@@ -57,13 +57,13 @@ peglgears: peglgears.o $(HEADERS) $(LIB_DEP)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(LIBDRM_LIB) -lm
xeglgears: xeglgears.o $(HEADERS) $(LIB_DEP)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X11_LIBS)
xeglthreads: xeglthreads.o $(HEADERS) $(LIB_DEP)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X11_LIBS)
xegl_tri: xegl_tri.o $(HEADERS) $(LIB_DEP)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X11_LIBS)
clean:
-rm -f *.o *~

View File

@@ -102,6 +102,19 @@ static void Display(void)
/* read back scaled depth image */
glReadPixels(100, 0, 400, 400, GL_DEPTH_COMPONENT, GL_FLOAT, depth2);
/* debug */
if (0) {
int i;
float *z = depth2 + 400 * 200;
printf("z at y=200:\n");
for (i = 0; i < 400; i++) {
printf("%5.3f ", z[i]);
if ((i + 1) % 12 == 0)
printf("\n");
}
}
/* draw as luminance */
glPixelZoom(1.0, 1.0);
glWindowPos2i(100, 0);

View File

@@ -9,9 +9,9 @@ INCDIR = $(TOP)/include
LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
# Add X11 and pthread libs to satisfy GNU gold.
APP_LIB_DEPS += -lX11 -lpthread
APP_LIB_DEPS += $(X11_LIBS) -lpthread
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(libdir) $(APP_LIB_DEPS)
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
PROGS = \
corender \
@@ -53,17 +53,18 @@ EXTRA_PROGS = \
##### RULES #####
.SUFFIXES:
.SUFFIXES: .c
.o: $(LIB_DEP)
$(APP_CC) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
.c: $(LIB_DEP)
$(APP_CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
.c.o:
$(APP_CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $< -c -o $@
##### TARGETS #####
default: $(PROGS)
$(PROGS): $(PROGS:%=%.o)
extra: $(EXTRA_PROGS)
@@ -74,45 +75,29 @@ clean:
# special cases
pbutil.o: pbutil.h
pbinfo.o: pbutil.h
pbinfo: pbinfo.o pbutil.o
$(APP_CC) $(CFLAGS) $(LDFLAGS) pbinfo.o pbutil.o $(LIBS) -o $@
pbdemo.o: pbutil.h
pbdemo: pbdemo.o pbutil.o
$(APP_CC) $(CFLAGS) $(LDFLAGS) pbdemo.o pbutil.o $(LIBS) -o $@
pbinfo.o: pbinfo.c pbutil.h
$(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbinfo.c
pbdemo.o: pbdemo.c pbutil.h
$(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbdemo.c
pbutil.o: pbutil.c pbutil.h
$(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbutil.c
glxgears_fbconfig.o: pbutil.h
glxgears_fbconfig: glxgears_fbconfig.o pbutil.o
$(APP_CC) $(CFLAGS) $(LDFLAGS) glxgears_fbconfig.o pbutil.o $(LIBS) -o $@
glxgears_fbconfig.o: glxgears_fbconfig.c pbutil.h
$(APP_CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) -c -I. $(CFLAGS) glxgears_fbconfig.c
xuserotfont.o: xuserotfont.h
xrotfontdemo.o: xuserotfont.h
xrotfontdemo: xrotfontdemo.o xuserotfont.o
$(APP_CC) $(CFLAGS) $(LDFLAGS) xrotfontdemo.o xuserotfont.o $(LIBS) -o $@
xuserotfont.o: xuserotfont.c xuserotfont.h
$(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xuserotfont.c
xrotfontdemo.o: xrotfontdemo.c xuserotfont.h
$(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xrotfontdemo.c
ipc.o: ipc.h
corender.o: ipc.h
corender: corender.o ipc.o
$(APP_CC) $(CFLAGS) $(LDFLAGS) corender.o ipc.o $(LIBS) -o $@
corender.o: corender.c ipc.h
$(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) corender.c
ipc.o: ipc.c ipc.h
$(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) ipc.c
yuvrect_client: yuvrect_client.c
$(APP_CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $< $(LDFLAGS) $(LIBS) -l$(GLU_LIB) -o $@
yuvrect_client: yuvrect_client.o
$(APP_CC) $(CFLAGS) $< $(LDFLAGS) $(LIBS) -l$(GLU_LIB) -o $@

View File

@@ -10,7 +10,7 @@ EGL_INCLUDES = \
-I$(TOP)/include \
-I$(TOP)/src/egl/main
EGL_CFLAGS =
EGL_LIBS = -lX11 -lGL
EGL_CFLAGS = $(X11_CFLAGS)
EGL_LIBS = $(X11_LIBS) -lGL
include ../Makefile.template

View File

@@ -7,7 +7,7 @@ include $(TOP)/configs/current
EGL_MAJOR = 1
EGL_MINOR = 0
INCLUDE_DIRS = -I$(TOP)/include
INCLUDE_DIRS = -I$(TOP)/include $(X11_CFLAGS)
HEADERS = \
eglcompiler.h \

View File

@@ -31,6 +31,7 @@
*/
#include "pipe/p_context.h"
#include "util/u_memory.h"
#include "util/u_math.h"
#include "draw_context.h"
@@ -38,7 +39,7 @@
#include "draw_gs.h"
struct draw_context *draw_create( void )
struct draw_context *draw_create( struct pipe_context *pipe )
{
struct draw_context *draw = CALLOC_STRUCT( draw_context );
if (draw == NULL)
@@ -68,6 +69,8 @@ struct draw_context *draw_create( void )
if (!draw_gs_init( draw ))
goto fail;
draw->pipe = pipe;
return draw;
fail:
@@ -78,10 +81,21 @@ fail:
void draw_destroy( struct draw_context *draw )
{
struct pipe_context *pipe = draw->pipe;
int i, j;
if (!draw)
return;
/* free any rasterizer CSOs that we may have created.
*/
for (i = 0; i < 2; i++) {
for (j = 0; j < 2; j++) {
if (draw->rasterizer_no_cull[i][j]) {
pipe->delete_rasterizer_state(pipe, draw->rasterizer_no_cull[i][j]);
}
}
}
/* Not so fast -- we're just borrowing this at the moment.
*
@@ -123,12 +137,17 @@ void draw_set_mrd(struct draw_context *draw, double mrd)
* This causes the drawing pipeline to be rebuilt.
*/
void draw_set_rasterizer_state( struct draw_context *draw,
const struct pipe_rasterizer_state *raster )
const struct pipe_rasterizer_state *raster,
void *rast_handle )
{
draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
if (!draw->suspend_flushing) {
draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
draw->rasterizer = raster;
draw->bypass_clipping = draw->driver.bypass_clipping;
draw->rasterizer = raster;
draw->rast_handle = rast_handle;
draw->bypass_clipping = draw->driver.bypass_clipping;
}
}
@@ -481,3 +500,37 @@ draw_current_shader_position_output(const struct draw_context *draw)
return draw->gs.position_output;
return draw->vs.position_output;
}
/**
* Return a pointer/handle for a driver/CSO rasterizer object which
* disabled culling, stippling, unfilled tris, etc.
* This is used by some pipeline stages (such as wide_point, aa_line
* and aa_point) which convert points/lines into triangles. In those
* cases we don't want to accidentally cull the triangles.
*
* \param scissor should the rasterizer state enable scissoring?
* \param flatshade should the rasterizer state use flat shading?
* \return rasterizer CSO handle
*/
void *
draw_get_rasterizer_no_cull( struct draw_context *draw,
boolean scissor,
boolean flatshade )
{
if (!draw->rasterizer_no_cull[scissor][flatshade]) {
/* create now */
struct pipe_context *pipe = draw->pipe;
struct pipe_rasterizer_state rast;
memset(&rast, 0, sizeof(rast));
rast.scissor = scissor;
rast.flatshade = flatshade;
rast.front_winding = PIPE_WINDING_CCW;
rast.gl_rasterization_rules = draw->rasterizer->gl_rasterization_rules;
draw->rasterizer_no_cull[scissor][flatshade] =
pipe->create_rasterizer_state(pipe, &rast);
}
return draw->rasterizer_no_cull[scissor][flatshade];
}

View File

@@ -49,7 +49,7 @@ struct draw_geometry_shader;
struct tgsi_sampler;
struct draw_context *draw_create( void );
struct draw_context *draw_create( struct pipe_context *pipe );
void draw_destroy( struct draw_context *draw );
@@ -60,7 +60,8 @@ void draw_set_clip_state( struct draw_context *pipe,
const struct pipe_clip_state *clip );
void draw_set_rasterizer_state( struct draw_context *draw,
const struct pipe_rasterizer_state *raster );
const struct pipe_rasterizer_state *raster,
void *rast_handle );
void draw_set_rasterize_stage( struct draw_context *draw,
struct draw_stage *stage );

View File

@@ -113,8 +113,6 @@ struct aaline_stage
void **);
void (*driver_set_sampler_textures)(struct pipe_context *, unsigned,
struct pipe_texture **);
struct pipe_context *pipe;
};
@@ -339,6 +337,7 @@ aa_transform_inst(struct tgsi_transform_context *ctx,
static boolean
generate_aaline_fs(struct aaline_stage *aaline)
{
struct pipe_context *pipe = aaline->stage.draw->pipe;
const struct pipe_shader_state *orig_fs = &aaline->fs->state;
struct pipe_shader_state aaline_fs;
struct aa_transform_context transform;
@@ -371,7 +370,7 @@ generate_aaline_fs(struct aaline_stage *aaline)
aaline->fs->sampler_unit = transform.freeSampler;
aaline->fs->aaline_fs
= aaline->driver_create_fs_state(aaline->pipe, &aaline_fs);
= aaline->driver_create_fs_state(pipe, &aaline_fs);
if (aaline->fs->aaline_fs == NULL)
goto fail;
@@ -391,7 +390,7 @@ fail:
static boolean
aaline_create_texture(struct aaline_stage *aaline)
{
struct pipe_context *pipe = aaline->pipe;
struct pipe_context *pipe = aaline->stage.draw->pipe;
struct pipe_screen *screen = pipe->screen;
struct pipe_texture texTemp;
uint level;
@@ -464,7 +463,7 @@ static boolean
aaline_create_sampler(struct aaline_stage *aaline)
{
struct pipe_sampler_state sampler;
struct pipe_context *pipe = aaline->pipe;
struct pipe_context *pipe = aaline->stage.draw->pipe;
memset(&sampler, 0, sizeof(sampler));
sampler.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
@@ -493,13 +492,14 @@ static boolean
bind_aaline_fragment_shader(struct aaline_stage *aaline)
{
struct draw_context *draw = aaline->stage.draw;
struct pipe_context *pipe = draw->pipe;
if (!aaline->fs->aaline_fs &&
!generate_aaline_fs(aaline))
return FALSE;
draw->suspend_flushing = TRUE;
aaline->driver_bind_fs_state(aaline->pipe, aaline->fs->aaline_fs);
aaline->driver_bind_fs_state(pipe, aaline->fs->aaline_fs);
draw->suspend_flushing = FALSE;
return TRUE;
@@ -639,8 +639,10 @@ aaline_first_line(struct draw_stage *stage, struct prim_header *header)
{
auto struct aaline_stage *aaline = aaline_stage(stage);
struct draw_context *draw = stage->draw;
struct pipe_context *pipe = aaline->pipe;
struct pipe_context *pipe = draw->pipe;
const struct pipe_rasterizer_state *rast = draw->rasterizer;
uint num_samplers;
void *r;
assert(draw->rasterizer->line_smooth);
@@ -679,6 +681,11 @@ aaline_first_line(struct draw_stage *stage, struct prim_header *header)
draw->suspend_flushing = TRUE;
aaline->driver_bind_sampler_states(pipe, num_samplers, aaline->state.sampler);
aaline->driver_set_sampler_textures(pipe, num_samplers, aaline->state.texture);
/* Disable triangle culling, stippling, unfilled mode etc. */
r = draw_get_rasterizer_no_cull(draw, rast->scissor, rast->flatshade);
pipe->bind_rasterizer_state(pipe, r);
draw->suspend_flushing = FALSE;
/* now really draw first line */
@@ -692,7 +699,7 @@ aaline_flush(struct draw_stage *stage, unsigned flags)
{
struct draw_context *draw = stage->draw;
struct aaline_stage *aaline = aaline_stage(stage);
struct pipe_context *pipe = aaline->pipe;
struct pipe_context *pipe = draw->pipe;
stage->line = aaline_first_line;
stage->next->flush( stage->next, flags );
@@ -704,6 +711,12 @@ aaline_flush(struct draw_stage *stage, unsigned flags)
aaline->state.sampler);
aaline->driver_set_sampler_textures(pipe, aaline->num_textures,
aaline->state.texture);
/* restore original rasterizer state */
if (draw->rast_handle) {
pipe->bind_rasterizer_state(pipe, draw->rast_handle);
}
draw->suspend_flushing = FALSE;
draw->extra_shader_outputs.slot = 0;
@@ -721,6 +734,7 @@ static void
aaline_destroy(struct draw_stage *stage)
{
struct aaline_stage *aaline = aaline_stage(stage);
struct pipe_context *pipe = stage->draw->pipe;
uint i;
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
@@ -728,7 +742,7 @@ aaline_destroy(struct draw_stage *stage)
}
if (aaline->sampler_cso)
aaline->pipe->delete_sampler_state(aaline->pipe, aaline->sampler_cso);
pipe->delete_sampler_state(pipe, aaline->sampler_cso);
if (aaline->texture)
pipe_texture_reference(&aaline->texture, NULL);
@@ -787,13 +801,14 @@ aaline_create_fs_state(struct pipe_context *pipe,
{
struct aaline_stage *aaline = aaline_stage_from_pipe(pipe);
struct aaline_fragment_shader *aafs = CALLOC_STRUCT(aaline_fragment_shader);
if (aafs == NULL)
return NULL;
aafs->state = *fs;
/* pass-through */
aafs->driver_fs = aaline->driver_create_fs_state(aaline->pipe, fs);
aafs->driver_fs = aaline->driver_create_fs_state(pipe, fs);
return aafs;
}
@@ -808,8 +823,7 @@ aaline_bind_fs_state(struct pipe_context *pipe, void *fs)
/* save current */
aaline->fs = aafs;
/* pass-through */
aaline->driver_bind_fs_state(aaline->pipe,
(aafs ? aafs->driver_fs : NULL));
aaline->driver_bind_fs_state(pipe, (aafs ? aafs->driver_fs : NULL));
}
@@ -818,11 +832,12 @@ aaline_delete_fs_state(struct pipe_context *pipe, void *fs)
{
struct aaline_stage *aaline = aaline_stage_from_pipe(pipe);
struct aaline_fragment_shader *aafs = (struct aaline_fragment_shader *) fs;
/* pass-through */
aaline->driver_delete_fs_state(aaline->pipe, aafs->driver_fs);
aaline->driver_delete_fs_state(pipe, aafs->driver_fs);
if (aafs->aaline_fs)
aaline->driver_delete_fs_state(aaline->pipe, aafs->aaline_fs);
aaline->driver_delete_fs_state(pipe, aafs->aaline_fs);
FREE(aafs);
}
@@ -839,7 +854,7 @@ aaline_bind_sampler_states(struct pipe_context *pipe,
aaline->num_samplers = num;
/* pass-through */
aaline->driver_bind_sampler_states(aaline->pipe, num, sampler);
aaline->driver_bind_sampler_states(pipe, num, sampler);
}
@@ -860,7 +875,7 @@ aaline_set_sampler_textures(struct pipe_context *pipe,
aaline->num_textures = num;
/* pass-through */
aaline->driver_set_sampler_textures(aaline->pipe, num, texture);
aaline->driver_set_sampler_textures(pipe, num, texture);
}
@@ -883,8 +898,6 @@ draw_install_aaline_stage(struct draw_context *draw, struct pipe_context *pipe)
if (!aaline)
goto fail;
aaline->pipe = pipe;
/* create special texture, sampler state */
if (!aaline_create_texture(aaline))
goto fail;

View File

@@ -107,8 +107,6 @@ struct aapoint_stage
const struct pipe_shader_state *);
void (*driver_bind_fs_state)(struct pipe_context *, void *);
void (*driver_delete_fs_state)(struct pipe_context *, void *);
struct pipe_context *pipe;
};
@@ -499,6 +497,7 @@ generate_aapoint_fs(struct aapoint_stage *aapoint)
struct pipe_shader_state aapoint_fs;
struct aa_transform_context transform;
const uint newLen = tgsi_num_tokens(orig_fs->tokens) + NUM_NEW_TOKENS;
struct pipe_context *pipe = aapoint->stage.draw->pipe;
aapoint_fs = *orig_fs; /* copy to init */
aapoint_fs.tokens = tgsi_alloc_tokens(newLen);
@@ -527,7 +526,7 @@ generate_aapoint_fs(struct aapoint_stage *aapoint)
#endif
aapoint->fs->aapoint_fs
= aapoint->driver_create_fs_state(aapoint->pipe, &aapoint_fs);
= aapoint->driver_create_fs_state(pipe, &aapoint_fs);
if (aapoint->fs->aapoint_fs == NULL)
goto fail;
@@ -549,13 +548,14 @@ static boolean
bind_aapoint_fragment_shader(struct aapoint_stage *aapoint)
{
struct draw_context *draw = aapoint->stage.draw;
struct pipe_context *pipe = draw->pipe;
if (!aapoint->fs->aapoint_fs &&
!generate_aapoint_fs(aapoint))
return FALSE;
draw->suspend_flushing = TRUE;
aapoint->driver_bind_fs_state(aapoint->pipe, aapoint->fs->aapoint_fs);
aapoint->driver_bind_fs_state(pipe, aapoint->fs->aapoint_fs);
draw->suspend_flushing = FALSE;
return TRUE;
@@ -679,6 +679,9 @@ aapoint_first_point(struct draw_stage *stage, struct prim_header *header)
{
auto struct aapoint_stage *aapoint = aapoint_stage(stage);
struct draw_context *draw = stage->draw;
struct pipe_context *pipe = draw->pipe;
const struct pipe_rasterizer_state *rast = draw->rasterizer;
void *r;
assert(draw->rasterizer->point_smooth);
@@ -716,6 +719,14 @@ aapoint_first_point(struct draw_stage *stage, struct prim_header *header)
}
}
draw->suspend_flushing = TRUE;
/* Disable triangle culling, stippling, unfilled mode etc. */
r = draw_get_rasterizer_no_cull(draw, rast->scissor, rast->flatshade);
pipe->bind_rasterizer_state(pipe, r);
draw->suspend_flushing = FALSE;
/* now really draw first point */
stage->point = aapoint_point;
stage->point(stage, header);
@@ -727,7 +738,7 @@ aapoint_flush(struct draw_stage *stage, unsigned flags)
{
struct draw_context *draw = stage->draw;
struct aapoint_stage *aapoint = aapoint_stage(stage);
struct pipe_context *pipe = aapoint->pipe;
struct pipe_context *pipe = draw->pipe;
stage->point = aapoint_first_point;
stage->next->flush( stage->next, flags );
@@ -735,6 +746,12 @@ aapoint_flush(struct draw_stage *stage, unsigned flags)
/* restore original frag shader */
draw->suspend_flushing = TRUE;
aapoint->driver_bind_fs_state(pipe, aapoint->fs->driver_fs);
/* restore original rasterizer state */
if (draw->rast_handle) {
pipe->bind_rasterizer_state(pipe, draw->rast_handle);
}
draw->suspend_flushing = FALSE;
draw->extra_shader_outputs.slot = 0;
@@ -811,7 +828,7 @@ aapoint_create_fs_state(struct pipe_context *pipe,
aafs->state = *fs;
/* pass-through */
aafs->driver_fs = aapoint->driver_create_fs_state(aapoint->pipe, fs);
aafs->driver_fs = aapoint->driver_create_fs_state(pipe, fs);
return aafs;
}
@@ -825,7 +842,7 @@ aapoint_bind_fs_state(struct pipe_context *pipe, void *fs)
/* save current */
aapoint->fs = aafs;
/* pass-through */
aapoint->driver_bind_fs_state(aapoint->pipe,
aapoint->driver_bind_fs_state(pipe,
(aafs ? aafs->driver_fs : NULL));
}
@@ -837,10 +854,10 @@ aapoint_delete_fs_state(struct pipe_context *pipe, void *fs)
struct aapoint_fragment_shader *aafs = (struct aapoint_fragment_shader *) fs;
/* pass-through */
aapoint->driver_delete_fs_state(aapoint->pipe, aafs->driver_fs);
aapoint->driver_delete_fs_state(pipe, aafs->driver_fs);
if (aafs->aapoint_fs)
aapoint->driver_delete_fs_state(aapoint->pipe, aafs->aapoint_fs);
aapoint->driver_delete_fs_state(pipe, aafs->aapoint_fs);
FREE(aafs);
}
@@ -857,8 +874,6 @@ draw_install_aapoint_stage(struct draw_context *draw,
{
struct aapoint_stage *aapoint;
pipe->draw = (void *) draw;
/*
* Create / install AA point drawing / prim stage
*/
@@ -866,8 +881,6 @@ draw_install_aapoint_stage(struct draw_context *draw,
if (aapoint == NULL)
return FALSE;
aapoint->pipe = pipe;
/* save original driver functions */
aapoint->driver_create_fs_state = pipe->create_fs_state;
aapoint->driver_bind_fs_state = pipe->bind_fs_state;

View File

@@ -28,6 +28,7 @@
/* Authors: Keith Whitwell <keith@tungstengraphics.com>
*/
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_shader_tokens.h"
#include "util/u_math.h"
@@ -142,9 +143,40 @@ static void wideline_line( struct draw_stage *stage,
}
static void wideline_first_line( struct draw_stage *stage,
struct prim_header *header )
{
struct draw_context *draw = stage->draw;
struct pipe_context *pipe = draw->pipe;
const struct pipe_rasterizer_state *rast = draw->rasterizer;
void *r;
/* Disable triangle culling, stippling, unfilled mode etc. */
r = draw_get_rasterizer_no_cull(draw, rast->scissor, rast->flatshade);
draw->suspend_flushing = TRUE;
pipe->bind_rasterizer_state(pipe, r);
draw->suspend_flushing = FALSE;
stage->line = wideline_line;
wideline_line(stage, header);
}
static void wideline_flush( struct draw_stage *stage, unsigned flags )
{
struct draw_context *draw = stage->draw;
struct pipe_context *pipe = draw->pipe;
stage->line = wideline_first_line;
stage->next->flush( stage->next, flags );
/* restore original rasterizer state */
if (draw->rast_handle) {
draw->suspend_flushing = TRUE;
pipe->bind_rasterizer_state(pipe, draw->rast_handle);
draw->suspend_flushing = FALSE;
}
}
@@ -171,7 +203,7 @@ struct draw_stage *draw_wide_line_stage( struct draw_context *draw )
wide->stage.name = "wide-line";
wide->stage.next = NULL;
wide->stage.point = draw_pipe_passthrough_point;
wide->stage.line = wideline_line;
wide->stage.line = wideline_first_line;
wide->stage.tri = draw_pipe_passthrough_tri;
wide->stage.flush = wideline_flush;
wide->stage.reset_stipple_counter = wideline_reset_stipple_counter;

View File

@@ -52,6 +52,7 @@
*/
#include "pipe/p_context.h"
#include "util/u_math.h"
#include "util/u_memory.h"
#include "pipe/p_defines.h"
@@ -213,6 +214,9 @@ static void widepoint_first_point( struct draw_stage *stage,
{
struct widepoint_stage *wide = widepoint_stage(stage);
struct draw_context *draw = stage->draw;
struct pipe_context *pipe = draw->pipe;
const struct pipe_rasterizer_state *rast = draw->rasterizer;
void *r;
wide->half_point_size = 0.5f * draw->rasterizer->point_size;
wide->xbias = 0.0;
@@ -222,6 +226,12 @@ static void widepoint_first_point( struct draw_stage *stage,
wide->xbias = 0.125;
}
/* Disable triangle culling, stippling, unfilled mode etc. */
r = draw_get_rasterizer_no_cull(draw, rast->scissor, rast->flatshade);
draw->suspend_flushing = TRUE;
pipe->bind_rasterizer_state(pipe, r);
draw->suspend_flushing = FALSE;
/* XXX we won't know the real size if it's computed by the vertex shader! */
if ((draw->rasterizer->point_size > draw->pipeline.wide_point_threshold) ||
(draw->rasterizer->sprite_coord_enable && draw->pipeline.point_sprite)) {
@@ -277,9 +287,19 @@ static void widepoint_first_point( struct draw_stage *stage,
static void widepoint_flush( struct draw_stage *stage, unsigned flags )
{
struct draw_context *draw = stage->draw;
struct pipe_context *pipe = draw->pipe;
stage->point = widepoint_first_point;
stage->next->flush( stage->next, flags );
stage->draw->extra_shader_outputs.slot = 0;
/* restore original rasterizer state */
if (draw->rast_handle) {
draw->suspend_flushing = TRUE;
pipe->bind_rasterizer_state(pipe, draw->rast_handle);
draw->suspend_flushing = FALSE;
}
}

View File

@@ -82,6 +82,8 @@ struct vertex_header {
*/
struct draw_context
{
struct pipe_context *pipe;
/** Drawing/primitive pipeline stages */
struct {
struct draw_stage *first; /**< one of the following */
@@ -174,8 +176,14 @@ struct draw_context
double mrd; /**< minimum resolvable depth value, for polygon offset */
/* pipe state that we need: */
/** Current rasterizer state given to us by the driver */
const struct pipe_rasterizer_state *rasterizer;
/** Driver CSO handle for the current rasterizer state */
void *rast_handle;
/** Rasterizer CSOs without culling/stipple/etc */
void *rasterizer_no_cull[2][2];
struct pipe_viewport_state viewport;
boolean identity_viewport;
@@ -345,5 +353,10 @@ void draw_do_flush( struct draw_context *draw, unsigned flags );
void *
draw_get_rasterizer_no_cull( struct draw_context *draw,
boolean scissor,
boolean flatshade );
#endif /* DRAW_PRIVATE_H */

View File

@@ -29,7 +29,7 @@
#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)
#elif defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 401)
#define PIPE_ATOMIC_GCC_INTRINSIC
#else
#error "Unsupported platform"

View File

@@ -210,7 +210,7 @@ i915_create_context(struct pipe_screen *screen, void *priv)
/*
* Create drawing context and plug our rendering stage into it.
*/
i915->draw = draw_create();
i915->draw = draw_create(&i915->base);
assert(i915->draw);
if (!debug_get_bool_option("I915_NO_VBUF", FALSE)) {
draw_set_rasterize_stage(i915->draw, i915_draw_vbuf_stage(i915));

View File

@@ -243,7 +243,7 @@ uint i915_emit_texld( struct i915_fp_compile *p,
}
else {
assert(GET_UREG_TYPE(dest) != REG_TYPE_CONST);
assert(dest = UREG(GET_UREG_TYPE(dest), GET_UREG_NR(dest)));
assert(dest == UREG(GET_UREG_TYPE(dest), GET_UREG_NR(dest)));
/* is the sampler coord a texcoord input reg? */
if (GET_UREG_TYPE(coord) != REG_TYPE_T) {

View File

@@ -714,7 +714,8 @@ static void i915_bind_rasterizer_state( struct pipe_context *pipe,
/* pass-through to draw module */
draw_set_rasterizer_state(i915->draw,
(i915->rasterizer ? i915->rasterizer->templ : NULL));
(i915->rasterizer ? i915->rasterizer->templ : NULL),
raster);
i915->dirty |= I915_NEW_RASTERIZER;
}

View File

@@ -174,7 +174,7 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv )
/*
* Create drawing context and plug our rendering stage into it.
*/
llvmpipe->draw = draw_create();
llvmpipe->draw = draw_create(&llvmpipe->pipe);
if (!llvmpipe->draw)
goto fail;

View File

@@ -38,19 +38,26 @@ void *
llvmpipe_create_rasterizer_state(struct pipe_context *pipe,
const struct pipe_rasterizer_state *rast)
{
/* We do nothing special with rasterizer state.
* The CSO handle is just a pointer to a pipe_rasterizer_state object.
*/
return mem_dup(rast, sizeof(*rast));
}
void llvmpipe_bind_rasterizer_state(struct pipe_context *pipe,
void *rasterizer)
void
llvmpipe_bind_rasterizer_state(struct pipe_context *pipe, void *handle)
{
struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
const struct pipe_rasterizer_state *rasterizer =
(const struct pipe_rasterizer_state *) handle;
if (llvmpipe->rasterizer == rasterizer)
return;
/* pass-through to draw module */
draw_set_rasterizer_state(llvmpipe->draw, rasterizer);
draw_set_rasterizer_state(llvmpipe->draw, rasterizer, handle);
llvmpipe->rasterizer = rasterizer;
@@ -68,6 +75,7 @@ void llvmpipe_bind_rasterizer_state(struct pipe_context *pipe,
llvmpipe->dirty |= LP_NEW_RASTERIZER;
}
void llvmpipe_delete_rasterizer_state(struct pipe_context *pipe,
void *rasterizer)
{

View File

@@ -129,7 +129,7 @@ nv50_create(struct pipe_screen *pscreen, void *priv)
nv50_init_state_functions(nv50);
nv50_init_query_functions(nv50);
nv50->draw = draw_create();
nv50->draw = draw_create(&nv50->pipe);
assert(nv50->draw);
draw_set_rasterize_stage(nv50->draw, nv50_draw_render_stage(nv50));

View File

@@ -181,7 +181,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
r300->context.draw_range_elements = r300_swtcl_draw_range_elements;
/* Create a Draw. This is used for SW TCL. */
r300->draw = draw_create();
r300->draw = draw_create(&r300->context);
/* Enable our renderer. */
draw_set_rasterize_stage(r300->draw, r300_draw_stage(r300));
/* Enable Draw's clipping. */

View File

@@ -810,7 +810,7 @@ static void r300_bind_rs_state(struct pipe_context* pipe, void* state)
if (r300->draw) {
draw_flush(r300->draw);
draw_set_rasterizer_state(r300->draw, &rs->rs);
draw_set_rasterizer_state(r300->draw, &rs->rs, state);
}
if (rs) {

View File

@@ -298,7 +298,7 @@ softpipe_create_context( struct pipe_screen *screen,
/*
* Create drawing context and plug our rendering stage into it.
*/
softpipe->draw = draw_create();
softpipe->draw = draw_create(&softpipe->pipe);
if (!softpipe->draw)
goto fail;

View File

@@ -744,6 +744,8 @@ blend_fallback(struct quad_stage *qs,
for (cbuf = 0; cbuf < softpipe->framebuffer.nr_cbufs; cbuf++)
{
/* which blend/mask state index to use: */
const uint blend_buf = blend->independent_blend_enable ? cbuf : 0;
float dest[4][QUAD_SIZE];
struct softpipe_cached_tile *tile
= sp_get_cached_tile(softpipe->cbuf_cache[cbuf],
@@ -771,11 +773,11 @@ blend_fallback(struct quad_stage *qs,
if (blend->logicop_enable) {
logicop_quad( qs, quadColor, dest );
}
else if (blend->rt[cbuf].blend_enable) {
else if (blend->rt[blend_buf].blend_enable) {
blend_quad( qs, quadColor, dest, cbuf );
}
if (blend->rt[cbuf].colormask != 0xf)
if (blend->rt[blend_buf].colormask != 0xf)
colormask_quad( blend->rt[cbuf].colormask, quadColor, dest);
/* Output color values

View File

@@ -669,17 +669,17 @@ static void setup_tri_edges( struct setup_context *setup )
setup->emaj.sy = ceilf(vmin_y);
setup->emaj.lines = (int) ceilf(vmax_y - setup->emaj.sy);
setup->emaj.dxdy = setup->emaj.dx / setup->emaj.dy;
setup->emaj.dxdy = setup->emaj.dy ? setup->emaj.dx / setup->emaj.dy : .0f;
setup->emaj.sx = vmin_x + (setup->emaj.sy - vmin_y) * setup->emaj.dxdy;
setup->etop.sy = ceilf(vmid_y);
setup->etop.lines = (int) ceilf(vmax_y - setup->etop.sy);
setup->etop.dxdy = setup->etop.dx / setup->etop.dy;
setup->etop.dxdy = setup->etop.dy ? setup->etop.dx / setup->etop.dy : .0f;
setup->etop.sx = vmid_x + (setup->etop.sy - vmid_y) * setup->etop.dxdy;
setup->ebot.sy = ceilf(vmin_y);
setup->ebot.lines = (int) ceilf(vmid_y - setup->ebot.sy);
setup->ebot.dxdy = setup->ebot.dx / setup->ebot.dy;
setup->ebot.dxdy = setup->ebot.dy ? setup->ebot.dx / setup->ebot.dy : .0f;
setup->ebot.sx = vmin_x + (setup->ebot.sy - vmin_y) * setup->ebot.dxdy;
}

View File

@@ -49,7 +49,7 @@ void softpipe_bind_rasterizer_state(struct pipe_context *pipe,
return;
/* pass-through to draw module */
draw_set_rasterizer_state(softpipe->draw, rasterizer);
draw_set_rasterizer_state(softpipe->draw, rasterizer, rasterizer);
softpipe->rasterizer = rasterizer;

View File

@@ -222,7 +222,8 @@ static void svga_bind_rasterizer_state( struct pipe_context *pipe,
svga->curr.rast = raster;
draw_set_rasterizer_state(svga->swtnl.draw, raster ? &raster->templ : NULL);
draw_set_rasterizer_state(svga->swtnl.draw, raster ? &raster->templ : NULL,
state);
svga->dirty |= SVGA_NEW_RAST;
}

View File

@@ -134,7 +134,7 @@ boolean svga_init_swtnl( struct svga_context *svga )
/*
* Create drawing context and plug our rendering stage into it.
*/
svga->swtnl.draw = draw_create();
svga->swtnl.draw = draw_create(&svga->pipe);
if (svga->swtnl.draw == NULL)
goto fail;

View File

@@ -113,7 +113,8 @@ static int update_swtnl_draw( struct svga_context *svga,
if (dirty & SVGA_NEW_RAST)
draw_set_rasterizer_state(svga->swtnl.draw,
&svga->curr.rast->templ);
&svga->curr.rast->templ,
(void *) svga->curr.rast);
if (dirty & SVGA_NEW_FRAME_BUFFER)
draw_set_mrd(svga->swtnl.draw,

View File

@@ -16,6 +16,7 @@ x11_INCLUDES = \
-I$(TOP)/src/gallium/drivers \
-I$(TOP)/src/glx \
-I$(TOP)/src/mesa \
$(X11_CFLAGS) \
$(shell pkg-config --cflags-only-I libdrm)
x11_SOURCES = $(wildcard x11/*.c) \

View File

@@ -5,7 +5,8 @@ LIBNAME = xlib
LIBRARY_INCLUDES = \
-I$(TOP)/include \
-I$(TOP)/src/mesa
-I$(TOP)/src/mesa \
$(X11_CFLAGS)
C_SOURCES = \
glx_api.c \

View File

@@ -42,7 +42,8 @@ VG_SOURCES = \
VG_OBJECTS = $(VG_SOURCES:.c=.o)
VG_LIBS = $(GALLIUM_AUXILIARIES) -lm
VG_LIBS = $(GALLIUM_AUXILIARIES)
VG_LIB_DEPS = $(EXTRA_LIB_PATH) -lm
### Include directories
@@ -64,7 +65,7 @@ $(TOP)/$(LIB_DIR)/$(VG_LIB_NAME): $(VG_OBJECTS) $(VG_LIBS)
-minor $(VG_MINOR) \
-patch $(VG_TINY) \
-install $(TOP)/$(LIB_DIR) \
$(VG_OBJECTS) $(VG_LIBS)
$(VG_OBJECTS) $(VG_LIBS) $(VG_LIB_DEPS)
######################################################################
# Generic stuff

View File

@@ -20,7 +20,8 @@ INCLUDE_DIRS = \
-I$(TOP)/src/gallium/include \
-I$(TOP)/src/gallium/drivers \
-I$(TOP)/src/gallium/state_trackers/glx/xlib \
-I$(TOP)/src/gallium/auxiliary
-I$(TOP)/src/gallium/auxiliary \
$(X11_CFLAGS)
DEFINES += \
-DGALLIUM_SOFTPIPE

View File

@@ -101,8 +101,7 @@ DRI2WireToEvent(Display *dpy, XEvent *event, xEvent *wire)
GLXBufferSwapComplete *aevent = (GLXBufferSwapComplete *)event;
xDRI2BufferSwapComplete *awire = (xDRI2BufferSwapComplete *)wire;
aevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire);
aevent->type =
(glx_info->codes->first_event + GLX_BufferSwapComplete) & 0x75;
aevent->type = glx_info->codes->first_event + GLX_BufferSwapComplete;
aevent->send_event = (awire->type & 0x80) != 0;
aevent->display = dpy;
aevent->drawable = awire->drawable;
@@ -111,7 +110,7 @@ DRI2WireToEvent(Display *dpy, XEvent *event, xEvent *wire)
aevent->event_type = GLX_EXCHANGE_COMPLETE_INTEL;
break;
case DRI2_BLIT_COMPLETE:
aevent->event_type = GLX_BLIT_COMPLETE_INTEL;
aevent->event_type = GLX_COPY_COMPLETE_INTEL;
break;
case DRI2_FLIP_COMPLETE:
aevent->event_type = GLX_FLIP_COMPLETE_INTEL;

View File

@@ -175,6 +175,8 @@ dri2CreateDrawable(__GLXscreenConfigs * psc,
{
__GLXDRIdrawablePrivate *pdraw;
__GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) modes;
__GLXdisplayPrivate *dpyPriv;
__GLXDRIdisplayPrivate *pdp;
pdraw = Xmalloc(sizeof(*pdraw));
if (!pdraw)
@@ -185,9 +187,12 @@ dri2CreateDrawable(__GLXscreenConfigs * psc,
pdraw->base.drawable = drawable;
pdraw->base.psc = psc;
pdraw->bufferCount = 0;
pdraw->swap_interval = 1;
DRI2CreateDrawable(psc->dpy, xDrawable);
dpyPriv = __glXInitialize(psc->dpy);
pdp = (__GLXDRIdisplayPrivate *)dpyPriv->dri2Display;;
/* Create a new drawable */
pdraw->base.driDrawable =
(*psc->dri2->createNewDrawable) (psc->__driScreen,
@@ -199,9 +204,20 @@ dri2CreateDrawable(__GLXscreenConfigs * psc,
return NULL;
}
#ifdef X_DRI2SwapInterval
/*
* Make sure server has the same swap interval we do for the new
* drawable.
*/
if (pdp->swapAvailable)
DRI2SwapInterval(psc->dpy, xDrawable, pdraw->swap_interval);
#endif
return &pdraw->base;
}
#ifdef X_DRI2GetMSC
static int
dri2DrawableGetMSC(__GLXscreenConfigs *psc, __GLXDRIdrawable *pdraw,
int64_t *ust, int64_t *msc, int64_t *sbc)
@@ -209,6 +225,11 @@ dri2DrawableGetMSC(__GLXscreenConfigs *psc, __GLXDRIdrawable *pdraw,
return DRI2GetMSC(psc->dpy, pdraw->xDrawable, ust, msc, sbc);
}
#endif
#ifdef X_DRI2WaitMSC
static int
dri2WaitForMSC(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc)
@@ -225,6 +246,8 @@ dri2WaitForSBC(__GLXDRIdrawable *pdraw, int64_t target_sbc, int64_t *ust,
sbc);
}
#endif /* X_DRI2WaitMSC */
static void
dri2CopySubBuffer(__GLXDRIdrawable *pdraw, int x, int y, int width, int height)
{
@@ -320,7 +343,7 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate)
/* Old servers don't send invalidate events */
if (!pdp->invalidateAvailable)
dri2InvalidateBuffers(priv->dpy, pdraw->base.xDrawable);
dri2InvalidateBuffers(priv->dpy, pdraw->base.drawable);
dri2WaitGL(loaderPrivate);
}
@@ -384,7 +407,7 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
/* Old servers don't send invalidate events */
if (!pdp->invalidateAvailable)
dri2InvalidateBuffers(dpyPriv->dpy, pdraw->xDrawable);
dri2InvalidateBuffers(dpyPriv->dpy, pdraw->drawable);
/* Old servers can't handle swapbuffers */
if (!pdp->swapAvailable) {
@@ -448,6 +471,8 @@ dri2GetBuffersWithFormat(__DRIdrawable * driDrawable,
return pdraw->buffers;
}
#ifdef X_DRI2SwapInterval
static void
dri2SetSwapInterval(__GLXDRIdrawable *pdraw, int interval)
{
@@ -465,6 +490,8 @@ dri2GetSwapInterval(__GLXDRIdrawable *pdraw)
return priv->swap_interval;
}
#endif /* X_DRI2SwapInterval */
static const __DRIdri2LoaderExtension dri2LoaderExtension = {
{__DRI_DRI2_LOADER, __DRI_DRI2_LOADER_VERSION},
dri2GetBuffers,

View File

@@ -1110,6 +1110,13 @@ init_fbconfig_for_chooser(__GLcontextModes * config,
} \
} while ( 0 )
/* Test that all bits from a are contained in b */
#define MATCH_MASK(param) \
do { \
if ((a->param & ~b->param) != 0) \
return False; \
} while (0);
/**
* Determine if two GLXFBConfigs are compatible.
*
@@ -1148,11 +1155,8 @@ fbconfigs_compatible(const __GLcontextModes * const a,
MATCH_DONT_CARE(stereoMode);
MATCH_EXACT(level);
if (((a->drawableType & b->drawableType) == 0)
|| ((a->renderType & b->renderType) == 0)) {
return False;
}
MATCH_MASK(drawableType);
MATCH_MASK(renderType);
/* There is a bug in a few of the XFree86 DDX drivers. They contain
* visuals with a "transparent type" of 0 when they really mean GLX_NONE.
@@ -1917,6 +1921,7 @@ __glXSwapIntervalSGI(int interval)
#endif
psc = GetGLXScreenConfigs( gc->currentDpy, gc->screen);
#ifdef GLX_DIRECT_RENDERING
if (gc->driContext && psc->driScreen && psc->driScreen->setSwapInterval) {
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(gc->currentDpy,
gc->currentDrawable,
@@ -1924,6 +1929,7 @@ __glXSwapIntervalSGI(int interval)
psc->driScreen->setSwapInterval(pdraw, interval);
return 0;
}
#endif
dpy = gc->currentDpy;
opcode = __glXSetupForCommand(dpy);
@@ -1974,6 +1980,7 @@ __glXSwapIntervalMESA(unsigned int interval)
}
#endif
#ifdef GLX_DIRECT_RENDERING
if (gc != NULL && gc->driContext) {
__GLXscreenConfigs *psc;
@@ -1985,6 +1992,7 @@ __glXSwapIntervalMESA(unsigned int interval)
return 0;
}
}
#endif
return GLX_BAD_CONTEXT;
}
@@ -2009,6 +2017,8 @@ __glXGetSwapIntervalMESA(void)
}
}
#endif
#ifdef GLX_DIRECT_RENDERING
if (gc != NULL && gc->driContext) {
__GLXscreenConfigs *psc;
@@ -2019,6 +2029,7 @@ __glXGetSwapIntervalMESA(void)
return psc->driScreen->getSwapInterval(pdraw);
}
}
#endif
return 0;
}
@@ -2135,13 +2146,22 @@ __glXGetVideoSyncSGI(unsigned int *count)
int ret;
GLXContext gc = __glXGetCurrentContext();
__GLXscreenConfigs *psc;
#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw;
#endif
if (!gc || !gc->driContext)
if (!gc)
return GLX_BAD_CONTEXT;
#ifdef GLX_DIRECT_RENDERING
if (!gc->driContext)
return GLX_BAD_CONTEXT;
#endif
psc = GetGLXScreenConfigs(gc->currentDpy, gc->screen);
#ifdef GLX_DIRECT_RENDERING
pdraw = GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable, NULL);
#endif
/* FIXME: Looking at the GLX_SGI_video_sync spec in the extension registry,
* FIXME: there should be a GLX encoding for this call. I can find no
@@ -2156,11 +2176,14 @@ __glXGetVideoSyncSGI(unsigned int *count)
return (ret == 0) ? 0 : GLX_BAD_CONTEXT;
}
#endif
#ifdef GLX_DIRECT_RENDERING
if (psc->driScreen && psc->driScreen->getDrawableMSC) {
ret = psc->driScreen->getDrawableMSC(psc, pdraw, &ust, &msc, &sbc);
*count = (unsigned) msc;
return (ret == True) ? 0 : GLX_BAD_CONTEXT;
}
#endif
return GLX_BAD_CONTEXT;
}
@@ -2170,18 +2193,27 @@ __glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
{
GLXContext gc = __glXGetCurrentContext();
__GLXscreenConfigs *psc;
#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw;
#endif
int64_t ust, msc, sbc;
int ret;
if (divisor <= 0 || remainder < 0)
return GLX_BAD_VALUE;
if (!gc || !gc->driContext)
if (!gc)
return GLX_BAD_CONTEXT;
#ifdef GLX_DIRECT_RENDERING
if (!gc->driContext)
return GLX_BAD_CONTEXT;
#endif
psc = GetGLXScreenConfigs( gc->currentDpy, gc->screen);
#ifdef GLX_DIRECT_RENDERING
pdraw = GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable, NULL);
#endif
#ifdef __DRI_MEDIA_STREAM_COUNTER
if (psc->msc != NULL && psc->driScreen ) {
@@ -2191,12 +2223,15 @@ __glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
return (ret == 0) ? 0 : GLX_BAD_CONTEXT;
}
#endif
#ifdef GLX_DIRECT_RENDERING
if (psc->driScreen && psc->driScreen->waitForMSC) {
ret = psc->driScreen->waitForMSC(pdraw, 0, divisor, remainder, &ust, &msc,
&sbc);
*count = (unsigned) msc;
return (ret == True) ? 0 : GLX_BAD_CONTEXT;
}
#endif
return GLX_BAD_CONTEXT;
}
@@ -2354,13 +2389,17 @@ __glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable,
{
__GLXdisplayPrivate * const priv = __glXInitialize(dpy);
int i, ret;
#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw;
#endif
__GLXscreenConfigs *psc;
if (!priv)
return False;
#ifdef GLX_DIRECT_RENDERING
pdraw = GetGLXDRIDrawable(dpy, drawable, &i);
#endif
psc = &priv->screenConfigs[i];
#if defined(__DRI_SWAP_BUFFER_COUNTER) && defined(__DRI_MEDIA_STREAM_COUNTER)
@@ -2370,10 +2409,13 @@ __glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable,
&& ((*psc->sbc->getSBC)(pdraw->driDrawable, sbc) == 0)
&& (__glXGetUST(ust) == 0) );
#endif
#ifdef GLX_DIRECT_RENDERING
if (pdraw && psc && psc->driScreen && psc->driScreen->getDrawableMSC) {
ret = psc->driScreen->getDrawableMSC(psc, pdraw, ust, msc, sbc);
return ret;
}
#endif
return False;
}
@@ -2491,12 +2533,19 @@ __glXSwapBuffersMscOML(Display * dpy, GLXDrawable drawable,
{
GLXContext gc = __glXGetCurrentContext();
int screen;
#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, &screen);
#endif
__GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen);
if (!pdraw || !gc || !gc->driContext) /* no GLX for this */
if (!gc) /* no GLX for this */
return -1;
#ifdef GLX_DIRECT_RENDERING
if (!pdraw || !gc->driContext)
return -1;
#endif
/* The OML_sync_control spec says these should "generate a GLX_BAD_VALUE
* error", but it also says "It [glXSwapBuffersMscOML] will return a value
* of -1 if the function failed because of errors detected in the input
@@ -2530,7 +2579,9 @@ __glXWaitForMscOML(Display * dpy, GLXDrawable drawable,
int64_t * msc, int64_t * sbc)
{
int screen;
#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, &screen);
#endif
__GLXscreenConfigs * const psc = GetGLXScreenConfigs( dpy, screen );
int ret;
@@ -2554,11 +2605,14 @@ __glXWaitForMscOML(Display * dpy, GLXDrawable drawable,
return ((ret == 0) && (__glXGetUST(ust) == 0));
}
#endif
#ifdef GLX_DIRECT_RENDERING
if (pdraw && psc->driScreen && psc->driScreen->waitForMSC) {
ret = psc->driScreen->waitForMSC(pdraw, target_msc, divisor, remainder,
ust, msc, sbc);
return ret;
}
#endif
return False;
}
@@ -2570,7 +2624,9 @@ __glXWaitForSbcOML(Display * dpy, GLXDrawable drawable,
int64_t * msc, int64_t * sbc)
{
int screen;
#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, &screen);
#endif
__GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen);
int ret;
@@ -2590,10 +2646,14 @@ __glXWaitForSbcOML(Display * dpy, GLXDrawable drawable,
return ((ret == 0) && (__glXGetUST(ust) == 0));
}
#endif
#ifdef GLX_DIRECT_RENDERING
if (pdraw && psc->driScreen && psc->driScreen->waitForSBC) {
ret = psc->driScreen->waitForSBC(pdraw, target_sbc, ust, msc, sbc);
return ret;
}
#endif
return False;
}

View File

@@ -206,7 +206,7 @@ __glXEventToWire(Display *dpy, XEvent *event, xEvent *wire)
break;
case GLX_EXCHANGE_COMPLETE_INTEL:
break;
case GLX_BLIT_COMPLETE_INTEL:
case GLX_COPY_COMPLETE_INTEL:
break;
case GLX_FLIP_COMPLETE_INTEL:
break;
@@ -539,6 +539,8 @@ __glXInitializeVisualConfigFromTags(__GLcontextModes * config, int count,
i = count;
break;
default:
/* Ignore the unrecognized tag's value */
bp++;
break;
}
}

View File

@@ -65,7 +65,7 @@ extern char *program_invocation_name, *program_invocation_short_name;
#endif
#if !defined(GET_PROGRAM_NAME)
# if defined(OpenBSD) || defined(NetBSD) || defined(__UCLIBC__)
# if defined(__OpenBSD__) || defined(NetBSD) || defined(__UCLIBC__)
/* This is a hack. It's said to work on OpenBSD, NetBSD and GNU.
* Rogelio M.Serrano Jr. reported it's also working with UCLIBC. It's
* used as a last resort, if there is no documented facility available. */

View File

@@ -247,8 +247,6 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask)
GLuint buf;
all = (cw == fb->Width && ch == fb->Height);
intel_prepare_render(intel);
/* Loop over all renderbuffers */
for (buf = 0; buf < BUFFER_COUNT && mask; buf++) {
const GLbitfield bufBit = 1 << buf;

View File

@@ -90,6 +90,10 @@ intelClear(GLcontext *ctx, GLbitfield mask)
tri_mask |= (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT));
}
/* Make sure we have up to date buffers before we start looking at
* the tiling bits to determine how to clear. */
intel_prepare_render(intel);
/* HW stencil */
if (mask & BUFFER_BIT_STENCIL) {
const struct intel_region *stencilRegion

View File

@@ -61,6 +61,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r300_state.h"
#include "r300_tex.h"
#include "r300_emit.h"
#include "r300_render.h"
#include "r300_swtcl.h"
#include "radeon_bocs_wrapper.h"
#include "radeon_buffer_objects.h"
@@ -226,6 +227,8 @@ static void r300_fallback(GLcontext *ctx, GLuint bit, GLboolean mode)
r300->radeon.Fallback |= bit;
else
r300->radeon.Fallback &= ~bit;
r300SwitchFallback(ctx, R300_FALLBACK_RADEON_COMMON, mode);
}
static void r300_emit_query_finish(radeonContextPtr radeon)

View File

@@ -386,6 +386,14 @@ void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim)
WARN_ONCE("Fixme: can't handle spliting prim %d\n", prim);
return;
}
if (rmesa->radeon.radeonScreen->kernel_mm) {
BEGIN_BATCH_NO_AUTOSTATE(2);
OUT_BATCH_REGSEQ(R300_VAP_VF_MAX_VTX_INDX, 1);
OUT_BATCH(rmesa->radeon.tcl.aos[0].count);
END_BATCH();
}
r300_emit_scissor(rmesa->radeon.glCtx);
while (num_verts > 0) {
int nr;
@@ -400,8 +408,9 @@ void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim)
COMMIT_BATCH();
}
static const char *getFallbackString(uint32_t bit)
static const char *getFallbackString(r300ContextPtr rmesa, uint32_t bit)
{
static char common_fallback_str[32];
switch (bit) {
case R300_FALLBACK_VERTEX_PROGRAM :
return "vertex program";
@@ -421,6 +430,9 @@ static const char *getFallbackString(uint32_t bit)
return "render mode != GL_RENDER";
case R300_FALLBACK_FRAGMENT_PROGRAM:
return "fragment program";
case R300_FALLBACK_RADEON_COMMON:
snprintf(common_fallback_str, 32, "radeon common 0x%08x", rmesa->radeon.Fallback);
return common_fallback_str;
case R300_FALLBACK_AOS_LIMIT:
return "aos limit";
case R300_FALLBACK_INVALID_BUFFERS:
@@ -440,7 +452,7 @@ void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode)
if (mode) {
if ((fallback_warn & bit) == 0) {
if (RADEON_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "WARNING! Falling back to software for %s\n", getFallbackString(bit));
fprintf(stderr, "WARNING! Falling back to software for %s\n", getFallbackString(rmesa, bit));
fallback_warn |= bit;
}
rmesa->fallback |= bit;

View File

@@ -41,6 +41,7 @@
#define R300_FALLBACK_STENCIL_TWOSIDE (1 << 21)
#define R300_FALLBACK_RENDER_MODE (1 << 22)
#define R300_FALLBACK_FRAGMENT_PROGRAM (1 << 23)
#define R300_FALLBACK_RADEON_COMMON (1 << 29)
#define R300_FALLBACK_AOS_LIMIT (1 << 30)
#define R300_FALLBACK_INVALID_BUFFERS (1 << 31)
#define R300_RASTER_FALLBACK_MASK 0xffff0000

View File

@@ -1658,20 +1658,21 @@ void r300VapCntl(r300ContextPtr rmesa, GLuint input_count,
(5 << R300_PVS_NUM_CNTLRS_SHIFT) |
(5 << R300_VF_MAX_VTX_NUM_SHIFT));
if (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV515)
rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (2 << R300_PVS_NUM_FPUS_SHIFT);
else if ((rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV530) ||
(rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV560) ||
(rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV570))
if ((rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R300) ||
(rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R350))
rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (4 << R300_PVS_NUM_FPUS_SHIFT);
else if (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV530)
rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (5 << R300_PVS_NUM_FPUS_SHIFT);
else if ((rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV410) ||
(rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R420))
rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (6 << R300_PVS_NUM_FPUS_SHIFT);
else if ((rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R520) ||
(rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R580))
(rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R580) ||
(rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV560) ||
(rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV570))
rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (8 << R300_PVS_NUM_FPUS_SHIFT);
else
rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (4 << R300_PVS_NUM_FPUS_SHIFT);
rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (2 << R300_PVS_NUM_FPUS_SHIFT);
}

View File

@@ -252,12 +252,15 @@ void r700UpdateShaderStates(GLcontext * ctx)
static void r700SetDepthState(GLcontext * ctx)
{
struct radeon_renderbuffer *rrb;
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
R600_STATECHANGE(context, db);
if (ctx->Depth.Test)
rrb = radeon_get_depthbuffer(&context->radeon);
if (ctx->Depth.Test && rrb && rrb->bo)
{
SETbit(r700->DB_DEPTH_CONTROL.u32All, Z_ENABLE_bit);
if (ctx->Depth.Mask)

View File

@@ -357,6 +357,7 @@
#define PCI_CHIP_RV770_9456 0x9456
#define PCI_CHIP_RV770_945A 0x945A
#define PCI_CHIP_RV770_945B 0x945B
#define PCI_CHIP_RV770_945E 0x945E
#define PCI_CHIP_RV790_9460 0x9460
#define PCI_CHIP_RV790_9462 0x9462
#define PCI_CHIP_RV770_946A 0x946A
@@ -368,6 +369,7 @@
#define PCI_CHIP_RV730_9487 0x9487
#define PCI_CHIP_RV730_9488 0x9488
#define PCI_CHIP_RV730_9489 0x9489
#define PCI_CHIP_RV730_948A 0x948A
#define PCI_CHIP_RV730_948F 0x948F
#define PCI_CHIP_RV730_9490 0x9490
#define PCI_CHIP_RV730_9491 0x9491
@@ -386,6 +388,7 @@
#define PCI_CHIP_RV710_9553 0x9553
#define PCI_CHIP_RV710_9555 0x9555
#define PCI_CHIP_RV710_9557 0x9557
#define PCI_CHIP_RV710_955F 0x955F
#define PCI_CHIP_RV740_94A0 0x94A0
#define PCI_CHIP_RV740_94A1 0x94A1

View File

@@ -326,7 +326,7 @@ static int cs_emit(struct radeon_cs_int *cs)
(!IS_R600_CLASS(csm->ctx->radeonScreen))) { /* +r6/r7 : No irq for r6/r7 yet. */
drm_radeon_irq_emit_t emit_cmd;
emit_cmd.irq_seq = (int*)&csm->pending_age;
r = drmCommandWrite(cs->csm->fd, DRM_RADEON_IRQ_EMIT, &emit_cmd, sizeof(emit_cmd));
r = drmCommandWriteRead(cs->csm->fd, DRM_RADEON_IRQ_EMIT, &emit_cmd, sizeof(emit_cmd));
if (r) {
return r;
}

View File

@@ -512,8 +512,10 @@ static radeon_mipmap_tree * get_biggest_matching_miptree(radeonTexObj *texObj,
unsigned mtCount = 0;
unsigned maxMtIndex = 0;
radeon_mipmap_tree *tmp;
unsigned int level;
int i;
for (unsigned level = firstLevel; level <= lastLevel; ++level) {
for (level = firstLevel; level <= lastLevel; ++level) {
radeon_texture_image *img = get_radeon_texture_image(texObj->base.Image[0][level]);
unsigned found = 0;
// TODO: why this hack??
@@ -523,7 +525,7 @@ static radeon_mipmap_tree * get_biggest_matching_miptree(radeonTexObj *texObj,
if (!img->mt)
continue;
for (int i = 0; i < mtCount; ++i) {
for (i = 0; i < mtCount; ++i) {
if (mts[i] == img->mt) {
found = 1;
mtSizes[i] += img->mt->levels[img->mtlevel].size;
@@ -544,7 +546,7 @@ static radeon_mipmap_tree * get_biggest_matching_miptree(radeonTexObj *texObj,
return NULL;
}
for (int i = 1; i < mtCount; ++i) {
for (i = 1; i < mtCount; ++i) {
if (mtSizes[i] > mtSizes[maxMtIndex]) {
maxMtIndex = i;
}

View File

@@ -846,6 +846,7 @@ static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id)
case PCI_CHIP_RV770_9456:
case PCI_CHIP_RV770_945A:
case PCI_CHIP_RV770_945B:
case PCI_CHIP_RV770_945E:
case PCI_CHIP_RV790_9460:
case PCI_CHIP_RV790_9462:
case PCI_CHIP_RV770_946A:
@@ -860,6 +861,7 @@ static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id)
case PCI_CHIP_RV730_9487:
case PCI_CHIP_RV730_9488:
case PCI_CHIP_RV730_9489:
case PCI_CHIP_RV730_948A:
case PCI_CHIP_RV730_948F:
case PCI_CHIP_RV730_9490:
case PCI_CHIP_RV730_9491:
@@ -881,6 +883,7 @@ static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id)
case PCI_CHIP_RV710_9553:
case PCI_CHIP_RV710_9555:
case PCI_CHIP_RV710_9557:
case PCI_CHIP_RV710_955F:
screen->chip_family = CHIP_FAMILY_RV710;
screen->chip_flags = RADEON_CHIPSET_TCL;
break;
@@ -1133,6 +1136,7 @@ radeonCreateScreen( __DRIscreen *sPriv )
/* pipe overrides */
switch (dri_priv->deviceID) {
case PCI_CHIP_R300_AD: /* 9500 with 1 quadpipe verified by: Reid Linnemann <lreid@cs.okstate.edu> */
case PCI_CHIP_R350_AH: /* 9800 SE only have 1 quadpipe */
case PCI_CHIP_RV410_5E4C: /* RV410 SE only have 1 quadpipe */
case PCI_CHIP_RV410_5E4F: /* RV410 SE only have 1 quadpipe */
screen->num_gb_pipes = 1;
@@ -1340,6 +1344,7 @@ radeonCreateScreen2(__DRIscreen *sPriv)
/* pipe overrides */
switch (device_id) {
case PCI_CHIP_R300_AD: /* 9500 with 1 quadpipe verified by: Reid Linnemann <lreid@cs.okstate.edu> */
case PCI_CHIP_R350_AH: /* 9800 SE only have 1 quadpipe */
case PCI_CHIP_RV410_5E4C: /* RV410 SE only have 1 quadpipe */
case PCI_CHIP_RV410_5E4F: /* RV410 SE only have 1 quadpipe */
screen->num_gb_pipes = 1;

View File

@@ -44,6 +44,7 @@
#include "tnl/t_pipeline.h"
#include "drivers/common/driverfuncs.h"
#include "drivers/common/meta.h"
#include "savagedd.h"
#include "savagestate.h"
@@ -473,6 +474,8 @@ savageCreateContext( const __GLcontextModes *mesaVis,
imesa->CurrentTexObj[0] = 0;
imesa->CurrentTexObj[1] = 0;
_mesa_meta_init( ctx );
/* Initialize the software rasterizer and helper modules.
*/
_swrast_CreateContext( ctx );
@@ -564,6 +567,8 @@ savageDestroyContext(__DRIcontext *driContextPriv)
free(imesa->cmdBuf.base);
free(imesa->clientVtxBuf.buf);
_mesa_meta_free( imesa->glCtx );
_swsetup_DestroyContext(imesa->glCtx );
_tnl_DestroyContext( imesa->glCtx );
_vbo_DestroyContext( imesa->glCtx );

View File

@@ -564,7 +564,8 @@ _mesa_ffsll(int64_t val)
unsigned int
_mesa_bitcount(unsigned int n)
{
#if defined(__GNUC__)
#if defined(__GNUC__) && \
((_GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)
return __builtin_popcount(n);
#else
unsigned int bits;

View File

@@ -404,7 +404,8 @@ _mesa_is_pow_two(int x)
static INLINE int32_t
_mesa_next_pow_two_32(uint32_t x)
{
#ifdef __GNUC__
#if defined(__GNUC__) && \
((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)
uint32_t y = (x != 1);
return (1 + y) << ((__builtin_clz(x - y) ^ 31) );
#else
@@ -422,7 +423,8 @@ _mesa_next_pow_two_32(uint32_t x)
static INLINE int64_t
_mesa_next_pow_two_64(uint64_t x)
{
#ifdef __GNUC__
#if defined(__GNUC__) && \
((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)
uint64_t y = (x != 1);
if (sizeof(x) == sizeof(long))
return (1 + y) << ((__builtin_clzl(x - y) ^ 63));

View File

@@ -582,9 +582,6 @@ _mesa_update_state_locked( GLcontext *ctx )
if (new_state & _DD_NEW_SEPARATE_SPECULAR)
update_separate_specular( ctx );
if (new_state & (_NEW_ARRAY | _NEW_PROGRAM | _NEW_BUFFER_OBJECT))
update_arrays( ctx );
if (new_state & (_NEW_BUFFERS | _NEW_VIEWPORT))
update_viewport_matrix(ctx);
@@ -620,6 +617,8 @@ _mesa_update_state_locked( GLcontext *ctx )
new_prog_state |= update_program( ctx );
}
if (new_state & (_NEW_ARRAY | _NEW_PROGRAM | _NEW_BUFFER_OBJECT))
update_arrays( ctx );
out:
new_prog_state |= update_program_constants(ctx);

View File

@@ -1415,6 +1415,7 @@ create_new_program(GLcontext *ctx, struct state_key *key,
struct texenv_fragment_program p;
GLuint unit;
struct ureg cf, out;
int i;
memset(&p, 0, sizeof(p));
p.state = key;
@@ -1436,7 +1437,13 @@ create_new_program(GLcontext *ctx, struct state_key *key,
p.program->Base.NumAddressRegs = 0;
p.program->Base.Parameters = _mesa_new_parameter_list();
p.program->Base.InputsRead = 0x0;
p.program->Base.OutputsWritten = 1 << FRAG_RESULT_COLOR;
if (ctx->DrawBuffer->_NumColorDrawBuffers == 1)
p.program->Base.OutputsWritten = 1 << FRAG_RESULT_COLOR;
else {
for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++)
p.program->Base.OutputsWritten |= (1 << (FRAG_RESULT_DATA0 + i));
}
for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {
p.src_texture[unit] = undef;
@@ -1485,22 +1492,28 @@ create_new_program(GLcontext *ctx, struct state_key *key,
}
cf = get_source( &p, SRC_PREVIOUS, 0 );
out = make_ureg( PROGRAM_OUTPUT, FRAG_RESULT_COLOR );
if (key->separate_specular) {
/* Emit specular add.
*/
struct ureg s = register_input(&p, FRAG_ATTRIB_COL1);
emit_arith( &p, OPCODE_ADD, out, WRITEMASK_XYZ, 0, cf, s, undef );
emit_arith( &p, OPCODE_MOV, out, WRITEMASK_W, 0, cf, undef, undef );
}
else if (memcmp(&cf, &out, sizeof(cf)) != 0) {
/* Will wind up in here if no texture enabled or a couple of
* other scenarios (GL_REPLACE for instance).
*/
emit_arith( &p, OPCODE_MOV, out, WRITEMASK_XYZW, 0, cf, undef, undef );
}
for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
if (ctx->DrawBuffer->_NumColorDrawBuffers == 1)
out = make_ureg( PROGRAM_OUTPUT, FRAG_RESULT_COLOR );
else {
out = make_ureg( PROGRAM_OUTPUT, FRAG_RESULT_DATA0 + i );
}
if (key->separate_specular) {
/* Emit specular add.
*/
struct ureg s = register_input(&p, FRAG_ATTRIB_COL1);
emit_arith( &p, OPCODE_ADD, out, WRITEMASK_XYZ, 0, cf, s, undef );
emit_arith( &p, OPCODE_MOV, out, WRITEMASK_W, 0, cf, undef, undef );
}
else if (memcmp(&cf, &out, sizeof(cf)) != 0) {
/* Will wind up in here if no texture enabled or a couple of
* other scenarios (GL_REPLACE for instance).
*/
emit_arith( &p, OPCODE_MOV, out, WRITEMASK_XYZW, 0, cf, undef, undef );
}
}
/* Finish up:
*/
emit_arith( &p, OPCODE_END, undef, WRITEMASK_XYZW, 0, undef, undef, undef);

View File

@@ -1215,10 +1215,10 @@ static void FETCH(signed_rgba8888)( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
texel[RCOMP] = BYTE_TO_FLOAT_TEX( (s >> 24) );
texel[GCOMP] = BYTE_TO_FLOAT_TEX( (s >> 16) & 0xff );
texel[BCOMP] = BYTE_TO_FLOAT_TEX( (s >> 8) & 0xff );
texel[ACOMP] = BYTE_TO_FLOAT_TEX( (s ) & 0xff );
texel[RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 24) );
texel[GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 16) );
texel[BCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 8) );
texel[ACOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s ) );
}
#if DIM == 3
@@ -1235,10 +1235,10 @@ static void FETCH(signed_rgba8888_rev)( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
texel[RCOMP] = BYTE_TO_FLOAT_TEX( (s ) & 0xff );
texel[GCOMP] = BYTE_TO_FLOAT_TEX( (s >> 8) & 0xff );
texel[BCOMP] = BYTE_TO_FLOAT_TEX( (s >> 16) & 0xff );
texel[ACOMP] = BYTE_TO_FLOAT_TEX( (s >> 24) );
texel[RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s ) );
texel[GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 8) );
texel[BCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 16) );
texel[ACOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 24) );
}
#if DIM == 3

View File

@@ -34,8 +34,8 @@
/* Mesa version */
#define MESA_MAJOR 7
#define MESA_MINOR 8
#define MESA_PATCH 0
#define MESA_VERSION_STRING "7.8"
#define MESA_PATCH 1
#define MESA_VERSION_STRING "7.8.1"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

View File

@@ -625,7 +625,7 @@ replace_registers(struct prog_instruction *inst, GLuint numInst,
GLuint i, j;
for (i = 0; i < numInst; i++) {
/* src regs */
for (j = 0; j < _mesa_num_inst_src_regs(inst->Opcode); j++) {
for (j = 0; j < _mesa_num_inst_src_regs(inst[i].Opcode); j++) {
if (inst[i].SrcReg[j].File == oldFile &&
inst[i].SrcReg[j].Index == oldIndex) {
inst[i].SrcReg[j].File = newFile;
@@ -652,7 +652,7 @@ adjust_param_indexes(struct prog_instruction *inst, GLuint numInst,
{
GLuint i, j;
for (i = 0; i < numInst; i++) {
for (j = 0; j < _mesa_num_inst_src_regs(inst->Opcode); j++) {
for (j = 0; j < _mesa_num_inst_src_regs(inst[i].Opcode); j++) {
GLuint f = inst[i].SrcReg[j].File;
if (f == PROGRAM_CONSTANT ||
f == PROGRAM_UNIFORM ||

View File

@@ -209,7 +209,7 @@ static void update_raster_state( struct st_context *st )
*/
if (vertProg) {
if (vertProg->Base.Id == 0) {
if (vertProg->Base.OutputsWritten & (1 << VERT_RESULT_PSIZ)) {
if (vertProg->Base.OutputsWritten & BITFIELD64_BIT(VERT_RESULT_PSIZ)) {
/* generated program which emits point size */
raster->point_size_per_vertex = TRUE;
}

View File

@@ -72,12 +72,15 @@ update_scissor( struct st_context *st )
scissor.minx = scissor.miny = scissor.maxx = scissor.maxy = 0;
}
/* Now invert Y. Pipe drivers use the convention Y=0=top for surfaces
/* Now invert Y if needed.
* Gallium drivers use the convention Y=0=top for surfaces.
*/
miny = fb->Height - scissor.maxy;
maxy = fb->Height - scissor.miny;
scissor.miny = miny;
scissor.maxy = maxy;
if (st_fb_orientation(fb) == Y_0_TOP) {
miny = fb->Height - scissor.maxy;
maxy = fb->Height - scissor.miny;
scissor.miny = miny;
scissor.maxy = maxy;
}
if (memcmp(&scissor, &st->state.scissor, sizeof(scissor)) != 0) {
/* state has changed */

View File

@@ -250,13 +250,13 @@ make_passthrough_vertex_shader(struct st_context *st,
ureg_DECL_output( ureg, TGSI_SEMANTIC_POSITION, 0 ),
ureg_DECL_vs_input( ureg, 0 ));
/* MOV result.texcoord0, vertex.texcoord0; */
/* MOV result.texcoord0, vertex.attr[1]; */
ureg_MOV(ureg,
ureg_DECL_output( ureg, TGSI_SEMANTIC_GENERIC, 0 ),
ureg_DECL_vs_input( ureg, 1 ));
if (passColor) {
/* MOV result.color0, vertex.color0; */
/* MOV result.color0, vertex.attr[2]; */
ureg_MOV(ureg,
ureg_DECL_output( ureg, TGSI_SEMANTIC_COLOR, 0 ),
ureg_DECL_vs_input( ureg, 2 ));
@@ -430,7 +430,7 @@ draw_quad(GLcontext *ctx, GLfloat x0, GLfloat y0, GLfloat z,
const GLfloat sLeft = 0.0f, sRight = maxXcoord;
const GLfloat tTop = invertTex ? maxYcoord : 0.0f;
const GLfloat tBot = invertTex ? 0.0f : maxYcoord;
GLuint tex, i;
GLuint i;
/* upper-left */
verts[0][0][0] = clip_x0; /* v[0].attr[0].x */
@@ -448,32 +448,31 @@ draw_quad(GLcontext *ctx, GLfloat x0, GLfloat y0, GLfloat z,
verts[3][0][0] = clip_x0;
verts[3][0][1] = clip_y1;
tex = color ? 2 : 1;
verts[0][tex][0] = sLeft; /* v[0].attr[tex].s */
verts[0][tex][1] = tTop; /* v[0].attr[tex].t */
verts[1][tex][0] = sRight;
verts[1][tex][1] = tTop;
verts[2][tex][0] = sRight;
verts[2][tex][1] = tBot;
verts[3][tex][0] = sLeft;
verts[3][tex][1] = tBot;
verts[0][1][0] = sLeft; /* v[0].attr[1].S */
verts[0][1][1] = tTop; /* v[0].attr[1].T */
verts[1][1][0] = sRight;
verts[1][1][1] = tTop;
verts[2][1][0] = sRight;
verts[2][1][1] = tBot;
verts[3][1][0] = sLeft;
verts[3][1][1] = tBot;
/* same for all verts: */
if (color) {
for (i = 0; i < 4; i++) {
verts[i][0][2] = z; /*Z*/
verts[i][0][3] = 1.0f; /*W*/
verts[i][1][0] = color[0];
verts[i][1][1] = color[1];
verts[i][1][2] = color[2];
verts[i][1][3] = color[3];
verts[i][2][2] = 0.0f; /*R*/
verts[i][2][3] = 1.0f; /*Q*/
verts[i][0][2] = z; /* v[i].attr[0].z */
verts[i][0][3] = 1.0f; /* v[i].attr[0].w */
verts[i][2][0] = color[0]; /* v[i].attr[2].r */
verts[i][2][1] = color[1]; /* v[i].attr[2].g */
verts[i][2][2] = color[2]; /* v[i].attr[2].b */
verts[i][2][3] = color[3]; /* v[i].attr[2].a */
verts[i][1][2] = 0.0f; /* v[i].attr[1].R */
verts[i][1][3] = 1.0f; /* v[i].attr[1].Q */
}
}
else {
for (i = 0; i < 4; i++) {
verts[i][0][2] = z; /*Z*/
verts[i][0][2] = z; /*Z*/
verts[i][0][3] = 1.0f; /*W*/
verts[i][1][2] = 0.0f; /*R*/
verts[i][1][3] = 1.0f; /*Q*/

View File

@@ -115,7 +115,7 @@ st_create_context_priv( GLcontext *ctx, struct pipe_context *pipe )
_vbo_CreateContext(ctx);
#if FEATURE_feedback || FEATURE_drawpix
st->draw = draw_create(); /* for selection/feedback */
st->draw = draw_create(pipe); /* for selection/feedback */
/* Disable draw options that might convert points/lines to tris, etc.
* as that would foul-up feedback/selection mode.

View File

@@ -134,7 +134,7 @@ st_feedback_draw_vbo(GLcontext *ctx,
assert(draw);
draw_set_viewport_state(draw, &st->state.viewport);
draw_set_clip_state(draw, &st->state.clip);
draw_set_rasterizer_state(draw, &st->state.rasterizer);
draw_set_rasterizer_state(draw, &st->state.rasterizer, NULL);
draw_bind_vertex_shader(draw, st->vp_varient->draw_shader);
set_feedback_vertex_format(ctx);

View File

@@ -154,6 +154,10 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
return PIPE_FORMAT_S8Z24_UNORM;
case MESA_FORMAT_S8_Z24:
return PIPE_FORMAT_Z24S8_UNORM;
case MESA_FORMAT_Z24_X8:
return PIPE_FORMAT_X8Z24_UNORM;
case MESA_FORMAT_X8_Z24:
return PIPE_FORMAT_Z24X8_UNORM;
case MESA_FORMAT_YCBCR:
return PIPE_FORMAT_UYVY;
#if FEATURE_texture_s3tc

View File

@@ -121,7 +121,7 @@ st_prepare_vertex_program(struct st_context *st,
/* Compute mapping of vertex program outputs to slots.
*/
for (attr = 0; attr < VERT_RESULT_MAX; attr++) {
if ((stvp->Base.Base.OutputsWritten & (1 << attr)) == 0) {
if ((stvp->Base.Base.OutputsWritten & BITFIELD64_BIT(attr)) == 0) {
stvp->result_to_output[attr] = ~0;
}
else {
@@ -388,7 +388,7 @@ st_translate_fragment_program(struct st_context *st,
GLbitfield64 outputsWritten = stfp->Base.Base.OutputsWritten;
/* if z is written, emit that first */
if (outputsWritten & (1 << FRAG_RESULT_DEPTH)) {
if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) {
fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_POSITION;
fs_output_semantic_index[fs_num_outputs] = 0;
outputMapping[FRAG_RESULT_DEPTH] = fs_num_outputs;
@@ -398,7 +398,7 @@ st_translate_fragment_program(struct st_context *st,
/* handle remaning outputs (color) */
for (attr = 0; attr < FRAG_RESULT_MAX; attr++) {
if (outputsWritten & (1 << attr)) {
if (outputsWritten & BITFIELD64_BIT(attr)) {
switch (attr) {
case FRAG_RESULT_DEPTH:
/* handled above */