Compare commits

...

32 Commits

Author SHA1 Message Date
Jakob Bornecrantz
c85402aba9 mesa: Bump version number to 8.0-rc1
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2012-01-13 22:23:28 +01:00
Brian Paul
9c81e4eed1 docs: add links to xf86-video-vmware wiki pages
(cherry picked from commit 548526f2e9)
2012-01-13 13:46:57 -07:00
Eric Anholt
daa2545508 mesa: Throw the required error for glCopyPixels from multisample FBO.
Fixes piglit EXT_framebuffer_multisample/negative-copypixels.

Reviewed-by: Brian Paul <brianp@vmware.com>
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit 9be6654c1f)
2012-01-13 10:23:41 -08:00
Eric Anholt
baaa30ad52 mesa: Throw the required error for glCopyTex{Sub,}Image from multisample FBO.
Fixes piglit EXT_framebuffer_multisample/negative-copyteximage.

Reviewed-by: Brian Paul <brianp@vmware.com>
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit 6950a4faf6)
2012-01-13 10:23:35 -08:00
Eric Anholt
b178514e24 mesa: Throw the required error for glReadPixels() from a multisampled FBO.
Fixes piglit EXT_framebuffer_multisample-negative-readpixels.

Reviewed-by: Brian Paul <brianp@vmware.com>
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit 86b7c6707f)
2012-01-13 10:23:11 -08:00
Eric Anholt
48e72b6605 mesa: Avoid short-circuiting realloc of renderbuffers to new sample count.
Fixes piglit EXT_framebuffer_multisample/renderbuffer-samples.

Reviewed-by: Brian Paul <brianp@vmware.com>
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit 0e8d156c3c)
2012-01-13 10:23:00 -08:00
Eric Anholt
89fdeab1a2 meta: Add GL_RED/GL_RG support to meta CopyTexImage.
Fixes some _mesa_problem()s in oglconform.

Reviewed-by: Brian Paul <brianp@vmware.com>
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit f83756f80f)
2012-01-13 10:22:58 -08:00
Eric Anholt
504eaa1212 i965/gen7: Fix depth buffer rendering to tile offsets.
Previously, we were saying that everything from the starting tile to
region width+height was part of the limits of our depthbuffer, even if
the tile was near the bottom of the depthbuffer.  This mean that our
range was not clipping to buffer buonds if the start tile was anything
but the start of the buffer.

In bebc91f0f3, this was changed to
saying that we're just rendering to a region of the size of the
renderbuffer.  This is great -- we get a range that should actually
match what we want.  However, the hardware's range checking occurs
after the X/Y offset addition, so we were clipping out rendering to
small depth mip levels when an X/Y offset was present.  Just add
tile_x/y to the width in that case -- the WM won't produce negative
x/y values pre-offset, so we just need to get the left/bottom sides of
the region to cover our buffer.

Fixes the following Piglit regressions on gen7:
    spec/ARB_depth_buffer_float/fbo-clear-formats
    spec/ARB_depth_texture/fbo-clear-formats
    spec/EXT_packed_depth_stencil/fbo-clear-formats

NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit e6d6a10c5a)
2012-01-13 10:22:54 -08:00
Neil Roberts
399b9799de gen6_hiz: Don't bind GL_DRAW_FRAMEBUFFER on GLES
When using Mesa with a GLES API, calling _mesa_FramebufferRenderbuffer
with GL_DRAW_FRAMEBUFFER will report a 'user error' because
get_framebuffer_target validates that this enum from the framebuffer
blit extension is only used on GL. To work around it this patch makes
it use the GL_FRAMEBUFFER enum instead in that case.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43418
Note: This is a candidate for the 8.0 branch.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit 9462b84478)
2012-01-13 10:08:13 -08:00
Brian Paul
2c1ee157c7 docs: new page describing how to build, install VMware SVGA3D guest driver
(cherry picked from commit 27915708ed)
2012-01-13 10:57:45 -07:00
Brian Paul
8b7f6de8b9 mesa: s/GLushort/GLubyte/ in pack_ubyte_AL44()
The AL44 format occupies one byte, not two.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
(cherry picked from commit b0af16abf1)
2012-01-13 10:16:33 -07:00
Brian Paul
eb8063361e osmesa: fix renderbuffer format selection
The gl_renderbuffer::Format field wasn't always set properly.  This
didn't matter much in the past but with the recent swrast/renderbuffer
mapping changes, core Mesa will be directly touching OSMesa colorbuffers
so using the right MESA_FORMAT_x value is important.

Unfortunately, there aren't MESA_FORMATs for all the possible OSmesa
format/type combinations, such as GL_FLOAT / OSMESA_ARGB.  If anyone
runs into these we can add new Mesa formats.

v2: add warnings for unsupported formats, fix ARGB_REV mix-up.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
(cherry picked from commit 540a8b2cfd)
2012-01-13 10:16:24 -07:00
Brian Paul
b26682e12e docs: freshen up the introduction page with Mesa 8.0 info, etc
(cherry picked from commit 0c14bbbc86)
2012-01-13 10:16:14 -07:00
Brian Paul
deff0244ed osmesa: fix glReadPixels, etc
Needed to implement the Map/UnmapRenderbuffer() driver hooks.
This fixes glRead/Draw/CopyPixels, etc.

See https://bugs.freedesktop.org/show_bug.cgi?id=44723

Note: This is a candidate for the 8.0 branch.

Tested-by: Kevin Hobbs <hobbsk@ohiou.edu>
(cherry picked from commit cb254b75d7)
2012-01-13 10:15:51 -07:00
Brian Paul
830688b36a intel: move declaration before code
(cherry picked from commit 062a4b601e)
2012-01-13 10:15:42 -07:00
Brian Paul
cd56917a50 intel: fix mapping of malloc'd renderbuffers
This fixes accum buffer operations.  The accumulation buffer is the
only malloc-based renderbuffer for the intel drivers.

v2: apply x/y offset to returned pointer

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 6dbdc03956)
2012-01-13 10:15:30 -07:00
Brian Paul
867fdbd36d mesa: remove incorrect (float) cast in mipmap do_row()
The array holds GLuint values so remove the float cast.
Note, however, that to compute the average of four GLuints we really
want to do (a+b+c+d)/4 but that could overflow.  This change doesn't
address that for now.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
(cherry picked from commit 003dd8adf3)
2012-01-13 10:15:07 -07:00
Brian Paul
d7a4eb331b swrast: use BITFIELD64_BIT() macro to fix MSVC warnings
NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
(cherry picked from commit 706400f0a7)
2012-01-13 10:14:59 -07:00
Brian Paul
ee5b35c568 mesa: fix ir_variable declaration
ir_variable is a class, not a struct.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
(cherry picked from commit decd018b99)
2012-01-13 10:14:46 -07:00
Brian Paul
a748a9f8ee mesa: fix incorrect float vs. int values in a few places
In the first case, the newImage[] array contains GLuint values.
In the second case, the parameter type is GLuint, but the maxDepth
value is never used in this case (GL_FLOAT_32_UNSIGNED_INT_24_8_REV).
Pass ~OU just to be safe.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
(cherry picked from commit a240c998ac)
2012-01-13 10:14:34 -07:00
Brian Paul
f1ff449120 meta: fix incorrect argument order in setup_texture_coords() call
And pass integer width, height values.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
(cherry picked from commit 2f0fa456e3)
2012-01-13 10:14:25 -07:00
Brian Paul
af33e16eab sofpipe: remove extraneous semicolon
(cherry picked from commit 0c57323de8)
2012-01-13 10:14:07 -07:00
Brian Paul
89a1e7caf4 st/mesa: fix struct vs. class compilation warning
glsl_to_tgsi_visitor is earlier defined as a class, not a struct.
Fixes MSVC warning.

NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit 9f2963b631)
2012-01-13 10:13:58 -07:00
Brian Paul
ad77e2fb78 configs: fix, simplify RADEON_LIBS, RADEON_CFLAGS
Fixes build problems with the r200, radeon drivers.

NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit c7188ece0e)
2012-01-13 10:13:41 -07:00
Dave Airlie
1e51d4b4f6 softpipe: bump max texture array layers to 256.
This as per GL3 specification.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-13 08:29:58 +00:00
Dave Airlie
0b9e6d2017 r600g: don't advertise integers yet on r600.
Still some work to be done before this is finished.

This is a candidate for 8.0 branch.

Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 3e044bcc4b)
2012-01-13 08:28:52 +00:00
Thomas Hellstrom
57665cb09e configure: Add the svga gallium driver to the default gallium drivers
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2012-01-12 13:34:14 +01:00
Thomas Hellstrom
372b7f1d35 st/xa: Bump version to 1.0.0 according to the README
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2012-01-12 13:33:41 +01:00
José Fonseca
4b86bd1347 svga: Fix user clip planes.
Dirty flags also need to be updated in face of recent interface change.

Fixes regression in compiz.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-01-12 13:33:24 +01:00
Thomas Hellstrom
7465c5d976 gallium/svga: Pass the SVGA3D_SURFACE_HINT_RENDERTARGET flag to the device
Some hardware versions rely on it to render correctly.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2012-01-12 11:28:07 +01:00
Brian Paul
9489ae8938 mesa: remove const qualifier from fProg to silence warning
The args to _mesa_reference_shader_program() can't be const.
(cherry picked from commit 459a44460e)
2012-01-11 18:24:34 -07:00
Brian Paul
b8af8b83cf mesa: include uniforms.h to silence warning, remove unused var
(cherry picked from commit fe1b38960b)
2012-01-11 18:24:26 -07:00
34 changed files with 435 additions and 99 deletions

View File

@@ -184,7 +184,7 @@ ultrix-gcc:
# Rules for making release tarballs
PACKAGE_VERSION=8.0-devel
PACKAGE_VERSION=8.0-rc1
PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)

View File

@@ -70,7 +70,6 @@ INTEL_CFLAGS = $(shell $(PKG_CONFIG) --cflags libdrm_intel)
NOUVEAU_LIBS = $(shell $(PKG_CONFIG) --libs libdrm_nouveau)
NOUVEAU_CFLAGS = $(shell $(PKG_CONFIG) --cflags libdrm_nouveau)
LIBDRM_RADEON_LIBS = $(shell $(PKG_CONFIG) --libs libdrm_radeon)
LIBDRM_RADEON_CFLAGS = $(shell $(PKG_CONFIG) --cflags libdrm_radeon)
RADEON_CFLAGS = "-DHAVE_LIBDRM_RADEON=1 $(LIBDRM_RADEON_CFLAGS)"
RADEON_LIBS = $(shell $(PKG_CONFIG) --libs libdrm_radeon)
RADEON_CFLAGS = $(shell $(PKG_CONFIG) --cflags libdrm_radeon)
RADEON_LDFLAGS = $(LIBDRM_RADEON_LIBS)

View File

@@ -662,7 +662,7 @@ AC_ARG_ENABLE([gallium_gbm],
[enable_gallium_gbm=auto])
# Option for Gallium drivers
GALLIUM_DRIVERS_DEFAULT="r300,r600,swrast"
GALLIUM_DRIVERS_DEFAULT="r300,r600,svga,swrast"
AC_ARG_WITH([gallium-drivers],
[AS_HELP_STRING([--with-gallium-drivers@<:@=DIRS...@:>@],

View File

@@ -63,6 +63,7 @@ a:visited {
<LI><A HREF="extensions.html" target="MainFrame">Mesa Extensions</A>
<LI><A HREF="mangling.html" target="MainFrame">Function Name Mangling</A>
<LI><A href="llvmpipe.html" target="MainFrame">Gallium llvmpipe driver</A>
<LI><A href="vmware-guest.html" target="MainFrame">VMware SVGA3D guest driver</a>
<LI><A href="postprocess.html" target="MainFrame">Gallium post-processing</A>
<LI><A href="viewperf.html" target="MainFrame">Viewperf Issues</A>
</ul>

View File

@@ -132,12 +132,26 @@ June 2007: Mesa 7.0 is released, implementing the OpenGL 2.1 specification
and OpenGL Shading Language.
</p>
<p>
2008: Keith Whitwell and other Tungsten Graphics employees develop
<a href="http://en.wikipedia.org/wiki/Gallium3D" target="_parent">Gallium</a>
- a new GPU abstraction layer. The latest Mesa drivers are based on
Gallium and other APIs such as OpenVG are implemented on top of Gallium.
</p>
<p>
Ongoing: Mesa is used as the core of many hardware OpenGL drivers for
the XFree86 and X.org X servers within the
<A href="http://dri.freedesktop.org/" target="_parent">DRI project</A>.
I continue to enhance Mesa with new extensions and features.
February 2012: Mesa 8.0 is released, implementing the OpenGL 3.0 specification
and version 1.30 of the OpenGL Shading Language.
</p>
<p>
Ongoing: Mesa is the OpenGL implementation for several types of hardware
made by Intel, AMD and NVIDIA, plus the VMware virtual GPU.
There's also several software-based renderers: swrast (the legacy
Mesa rasterizer), softpipe (a gallium reference driver) and llvmpipe
(LLVM/JIT-based high-speed rasterizer).
Work continues on the drivers and core Mesa to implement newer versions
of the OpenGL specification.
</p>
@@ -151,6 +165,15 @@ of the OpenGL specification is implemented.
</p>
<H2>Version 8.x features</H2>
<p>
Version 8.x of Mesa implements the OpenGL 3.0 API.
The developers at Intel deserve a lot of credit for implementing most
of the OpenGL 3.0 features in core Mesa, the GLSL compiler as well as
the i965 driver.
</p>
<H2>Version 7.x features</H2>
<p>
Version 7.x of Mesa implements the OpenGL 2.1 API. The main feature

194
docs/vmware-guest.html Normal file
View File

@@ -0,0 +1,194 @@
<html>
<title>VMware guest GL driver</title>
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<body>
<h1>VMware guest GL driver</h1>
<p>
This page describes how to build, install and use the VMware guest GL driver
(aka the SVGA or SVGA3D driver) for Linux using the latest source code.
This driver gives a Linux virtual machine access to the host's GPU for
hardware-accelerated 3D.
VMware Workstation running on Linux or Windows and VMware Fusion running on
MacOS are all supported.
</p>
<p>
End users shouldn't have to go through all these steps once the driver is
included in newer Linux distributions.
</p>
<p>
For more information about the X components see these wiki pages at x.org:
</p>
<ul>
<li><a href="http://wiki.x.org/wiki/vmware" target="_parent">
Driver Overview</a>
<li><a href="http://wiki.x.org/wiki/vmware/vmware3D" target="_parent">
xf86-video-vmware Details</a>
</ul>
<h2>Components</h2>
The components involved in this include:
<ul>
<li>Linux kernel module: vmwgfx
<li>X server 2D driver: xf86-video-vmware
<li>User-space libdrm library
<li>Mesa/gallium OpenGL driver: "svga"
</ul>
<h2>Prerequisites</h2>
<ul>
<li>Kernel version at least 2.6.25
<li>Xserver version at least 1.7
<li>Ubuntu: For ubuntu you need to install a number of build dependencies.
<pre>
sudo apt-get install git-core
sudo apt-get install automake libtool libpthread-stubs0-dev
sudo apt-get install xserver-xorg-dev x11proto-xinerama-dev
sudo apt-get build-dep libgl1-mesa-dri libxcb-glx0-dev
</pre>
<li>Fedora: For Fedora you also need to install a number of build dependencies.
<pre>
sudo yum install mesa-libGL-devel xorg-x11-server-devel xorg-x11-util-macros
sudo yum install automake gcc libtool expat-devel kernel-devel git-core
</pre>
</ul>
<p>
Depending on your Linux distro, other packages may be needed.
The configure scripts should tell you what's missing.
</p>
<h2>Getting the Latest Source Code</h2>
Begin by saving your current directory location:
<pre>
export TOP=$PWD
</pre>
<ul>
<li>Mesa/Gallium master branch. This code is used to build libGL, and the direct rendering svga driver for libGL, vmwgfx_dri.so, and the X acceleration library libxatracker.so.x.x.x.
<pre>
git clone git://anongit.freedesktop.org/git/mesa/mesa
</pre>
<li>VMware Linux guest kernel module. Note that this repo contains the complete DRM and TTM code. The vmware-specific driver is really only the files prefixed with vmwgfx.
<pre>
git clone git://anongit.freedesktop.org/git/mesa/vmwgfx
</pre>
<li>libdrm, A user-space library that interfaces with drm. Most distros ship with this driver. Safest bet is really to replace the system one. Optionally you can point LIBDRM_CFLAGS and LIBDRM_LIBS to the libdrm-2.4.22 package in toolchain. But here, we replace:
<pre>
git clone git://anongit.freedesktop.org/git/mesa/drm
</pre>
<li>xf86-video-vmware. The chainloading driver, vmware_drv.so, the legacy driver vmwlegacy_drv.so, and the vmwgfx driver vmwgfx_drv.so.
<pre>
git clone git://anongit.freedesktop.org/git/xorg/driver/xf86-video-vmware
</pre>
</ul>
<h2>Building the Code</h2>
<ul>
<li>Build libdrm: If you're on a 32-bit system, you should skip the --libdir configure option. Note also the comment about toolchain libdrm above.
<pre>
cd $TOP/drm
./autogen.sh --prefix=/usr --enable-vmwgfx-experimental-api --libdir=/usr/lib64
make
sudo make install
</pre>
<li>Build Mesa and the vmwgfx_dri.so driver, the vmwgfx_drv.so xorg driver, the X acceleration library libxatracker.
The vmwgfx_dri.so is used by the OpenGL libraries during direct rendering,
and by the Xorg server during accelerated indirect GL rendering.
The libxatracker library is used exclusively by the X server to do render,
copy and video acceleration:
<br>
The following configure options doesn't build the EGL system.
<br>
As before, if you're on a 32-bit system, you should skip the --libdir
configure option.
<pre>
cd $TOP/mesa
./autogen.sh --prefix=/usr --libdir=/usr/lib64 --with-gallium-drivers=svga --with-dri-drivers= --enable-xa
make
sudo make install
</pre>
Note that you may have to install other packages that Mesa depends upon
if they're not installed in your system. You should be told what's missing.
<br>
<br>
<li>xf86-video-vmware: Now, once libxatracker is installed, we proceed with building and replacing the current Xorg driver. First check if your system is 32- or 64-bit. If you're building for a 32-bit system, you will not be needing the --libdir=/usr/lib64 option to autogen.
<pre>
cd $TOP/xf86-video-vmware
./autogen.sh --prefix=/usr --libdir=/usr/lib64
make
sudo make install
</pre>
<li>vmwgfx kernel module. First make sure that any old version of this kernel module is removed from the system by issuing
<pre>
sudo rm /lib/modules/`uname -r`/kernel/drivers/gpu/drm/vmwgfx.ko*
</pre>
Then
<pre>
cd $TOP/vmwgfx
make
sudo make install
sudo cp 00-vmwgfx.rules /etc/udev/rules.d
sudo depmod -ae
</pre>
</ul>
Now try to load the kernel module by issuing
<pre>
sudo modprobe vmwgfx</pre>
Then type
<pre>
dmesg</pre>
to watch the debug output. It should contain a number of lines prefixed with "[vmwgfx]".
<p>
Then restart the Xserver (or reboot).
The lines starting with "vmwlegacy" or "VMWARE" in the file /var/log/Xorg.0.log
should now have been replaced with lines starting with "vmwgfx", indicating that
the new Xorg driver is in use.
</p>
<h2>Running OpenGL Programs</h2>
<p>
In a shell, run 'glxinfo' and look for the following to verify that the
driver is working:
</p>
<pre>
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on SVGA3D; build: RELEASE;
OpenGL version string: 2.1 Mesa 8.0
</pre>
If you don't see this, try setting this environment variable:
<pre>
export LIBGL_DEBUG=verbose</pre>
then rerun glxinfo and examine the output for error messages.
</p>
</body>
</html>

View File

@@ -505,8 +505,6 @@ static int r600_get_shader_param(struct pipe_screen* pscreen, unsigned shader, e
case PIPE_SHADER_CAP_SUBROUTINES:
return 0;
case PIPE_SHADER_CAP_INTEGERS:
if (rscreen->chip_class == EVERGREEN)
return 1;
return 0;
case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
return 16;

View File

@@ -45,7 +45,7 @@
#include "sp_fence.h"
#include "sp_public.h"
DEBUG_GET_ONCE_BOOL_OPTION(use_llvm, "SOFTPIPE_USE_LLVM", FALSE);
DEBUG_GET_ONCE_BOOL_OPTION(use_llvm, "SOFTPIPE_USE_LLVM", FALSE)
static const char *
softpipe_get_vendor(struct pipe_screen *screen)
@@ -121,7 +121,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
return 1;
case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:
return 64; /* matches core Mesa defaults */
return 256; /* for GL3 */
case PIPE_CAP_MIN_TEXEL_OFFSET:
return -8;
case PIPE_CAP_MAX_TEXEL_OFFSET:

View File

@@ -454,16 +454,19 @@ svga_texture_create(struct pipe_screen *screen,
}
/*
* XXX: Never pass the SVGA3D_SURFACE_HINT_RENDERTARGET hint. Mesa cannot
* Note: Previously we never passed the
* SVGA3D_SURFACE_HINT_RENDERTARGET hint. Mesa cannot
* know beforehand whether a texture will be used as a rendertarget or not
* and it always requests PIPE_BIND_RENDER_TARGET, therefore
* passing the SVGA3D_SURFACE_HINT_RENDERTARGET here defeats its purpose.
*
* However, this was changed since other state trackers
* (XA for example) uses it accurately and certain device versions
* relies on it in certain situations to render correctly.
*/
#if 0
if((template->bind & PIPE_BIND_RENDER_TARGET) &&
!util_format_is_s3tc(template->format))
tex->key.flags |= SVGA3D_SURFACE_HINT_RENDERTARGET;
#endif
if(template->bind & PIPE_BIND_DEPTH_STENCIL)
tex->key.flags |= SVGA3D_SURFACE_HINT_DEPTHSTENCIL;

View File

@@ -477,7 +477,7 @@ emit_clip_planes( struct svga_context *svga,
/* TODO: just emit directly from svga_set_clip_state()?
*/
for (i = 0; i < 6; i++) {
for (i = 0; i < SVGA3D_MAX_CLIP_PLANES; i++) {
/* need to express the plane in D3D-style coordinate space.
* GL coords get converted to D3D coords with the matrix:
* [ 1 0 0 0 ]

View File

@@ -244,8 +244,8 @@ static int emit_rss( struct svga_context *svga,
EMIT_RS_FLOAT( svga, bias, DEPTHBIAS, fail );
}
if (dirty & SVGA_NEW_CLIP) {
/* the number of clip planes is how many planes to enable */
if (dirty & SVGA_NEW_RAST) {
/* bitmask of the enabled clip planes */
unsigned enabled = svga->curr.rast->templ.clip_plane_enable;
EMIT_RS( svga, enabled, CLIPPLANEENABLE, fail );
}
@@ -285,7 +285,6 @@ struct svga_tracked_state svga_hw_rss =
(SVGA_NEW_BLEND |
SVGA_NEW_BLEND_COLOR |
SVGA_NEW_CLIP |
SVGA_NEW_DEPTH_STENCIL |
SVGA_NEW_STENCIL_REF |
SVGA_NEW_RAST |

View File

@@ -36,8 +36,8 @@
#include <stdint.h>
#define XA_TRACKER_VERSION_MAJOR 0
#define XA_TRACKER_VERSION_MINOR 6
#define XA_TRACKER_VERSION_MAJOR 1
#define XA_TRACKER_VERSION_MINOR 0
#define XA_TRACKER_VERSION_PATCH 0
#define XA_FLAG_SHARED (1 << 0)

View File

@@ -3,8 +3,8 @@ include $(TOP)/configs/current
##### MACROS #####
XA_MAJOR = 0
XA_MINOR = 6
XA_MAJOR = 1
XA_MINOR = 0
XA_TINY = 0
XA_CFLAGS = -Wall -pedantic

View File

@@ -2920,8 +2920,8 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
/* setup texcoords (XXX what about border?) */
setup_texture_coords(faceTarget,
0.0f, 0.0f, /* width, height never used here */
slice,
0, 0, /* width, height never used here */
verts[0].tex,
verts[1].tex,
verts[2].tex,
@@ -3071,6 +3071,8 @@ get_temp_image_type(struct gl_context *ctx, GLenum baseFormat)
switch (baseFormat) {
case GL_RGBA:
case GL_RGB:
case GL_RG:
case GL_RED:
case GL_ALPHA:
case GL_LUMINANCE:
case GL_LUMINANCE_ALPHA:
@@ -3086,7 +3088,8 @@ get_temp_image_type(struct gl_context *ctx, GLenum baseFormat)
case GL_DEPTH_STENCIL:
return GL_UNSIGNED_INT_24_8;
default:
_mesa_problem(ctx, "Unexpected format in get_temp_image_type()");
_mesa_problem(ctx, "Unexpected format %d in get_temp_image_type()",
baseFormat);
return 0;
}
}

View File

@@ -376,8 +376,8 @@ static void emit_depthbuffer(struct brw_context *brw)
I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
offset);
OUT_BATCH((BRW_SURFACE_MIPMAPLAYOUT_BELOW << 1) |
((depth_irb->Base.Width - 1) << 6) |
((depth_irb->Base.Height - 1) << 19));
(((depth_irb->Base.Width + tile_x)- 1) << 6) |
(((depth_irb->Base.Height + tile_y) - 1) << 19));
OUT_BATCH(0);
if (intel->is_g4x || intel->gen >= 5)

View File

@@ -109,6 +109,24 @@ static const uint32_t gen6_hiz_meta_save =
MESA_META_SELECT_FEEDBACK;
static void
gen6_hiz_get_framebuffer_enum(struct gl_context *ctx,
GLenum *bind_enum,
GLenum *get_enum)
{
/* If the blit framebuffer extension isn't supported then Mesa will
report an error if we try to bind GL_DRAW_FRAMEBUFFER. However in
that case it should be safe to just save and restore
GL_FRAMEBUFFER instead. */
if (ctx->Extensions.EXT_framebuffer_blit && ctx->API == API_OPENGL) {
*bind_enum = GL_DRAW_FRAMEBUFFER;
*get_enum = GL_DRAW_FRAMEBUFFER_BINDING;
} else {
*bind_enum = GL_FRAMEBUFFER;
*get_enum = GL_FRAMEBUFFER_BINDING;
}
}
/**
* Initialize static data needed for HiZ operations.
*/
@@ -117,10 +135,13 @@ gen6_hiz_init(struct brw_context *brw)
{
struct gl_context *ctx = &brw->intel.ctx;
struct brw_hiz_state *hiz = &brw->hiz;
GLenum fb_bind_enum, fb_get_enum;
if (hiz->fbo != 0)
return;
gen6_hiz_get_framebuffer_enum(ctx, &fb_bind_enum, &fb_get_enum);
/* Create depthbuffer.
*
* Until glRenderbufferStorage is called, the renderbuffer hash table
@@ -139,8 +160,8 @@ gen6_hiz_init(struct brw_context *brw)
/* Setup FBO. */
_mesa_GenFramebuffersEXT(1, &hiz->fbo);
_mesa_BindFramebufferEXT(GL_DRAW_FRAMEBUFFER, hiz->fbo);
_mesa_FramebufferRenderbufferEXT(GL_DRAW_FRAMEBUFFER,
_mesa_BindFramebufferEXT(fb_bind_enum, hiz->fbo);
_mesa_FramebufferRenderbufferEXT(fb_bind_enum,
GL_DEPTH_ATTACHMENT,
GL_RENDERBUFFER,
hiz->depth_rb->Name);
@@ -241,6 +262,7 @@ gen6_resolve_slice(struct intel_context *intel,
struct gl_context *ctx = &intel->ctx;
struct brw_context *brw = brw_context(ctx);
struct brw_hiz_state *hiz = &brw->hiz;
GLenum fb_bind_enum, fb_get_enum;
/* Do not recurse. */
assert(!brw->hiz.op);
@@ -250,11 +272,13 @@ gen6_resolve_slice(struct intel_context *intel,
assert(level <= mt->last_level);
assert(layer < mt->level[level].depth);
gen6_hiz_get_framebuffer_enum(ctx, &fb_bind_enum, &fb_get_enum);
/* Save state. */
GLint save_drawbuffer;
GLint save_renderbuffer;
_mesa_meta_begin(ctx, gen6_hiz_meta_save);
_mesa_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &save_drawbuffer);
_mesa_GetIntegerv(fb_get_enum, &save_drawbuffer);
_mesa_GetIntegerv(GL_RENDERBUFFER_BINDING, &save_renderbuffer);
/* Initialize context data for HiZ operations. */
@@ -272,7 +296,7 @@ gen6_resolve_slice(struct intel_context *intel,
/* Setup FBO. */
gen6_hiz_setup_depth_buffer(brw, mt, level, layer);
_mesa_BindFramebufferEXT(GL_DRAW_FRAMEBUFFER, hiz->fbo);
_mesa_BindFramebufferEXT(fb_bind_enum, hiz->fbo);
/* A rectangle primitive (3DPRIM_RECTLIST) consists of only three vertices.
@@ -316,7 +340,7 @@ gen6_resolve_slice(struct intel_context *intel,
*/
gen6_hiz_teardown_depth_buffer(hiz->depth_rb);
_mesa_BindRenderbufferEXT(GL_RENDERBUFFER, save_renderbuffer);
_mesa_BindFramebufferEXT(GL_DRAW_FRAMEBUFFER, save_drawbuffer);
_mesa_BindFramebufferEXT(fb_bind_enum, save_drawbuffer);
_mesa_meta_end(ctx);
}

View File

@@ -107,8 +107,8 @@ static void emit_depthbuffer(struct brw_context *brw)
OUT_RELOC(region->bo,
I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
offset);
OUT_BATCH(((drb->Base.Width - 1) << 4) |
((drb->Base.Height - 1) << 18));
OUT_BATCH((((drb->Base.Width + tile_x) - 1) << 4) |
(((drb->Base.Height + tile_y) - 1) << 18));
OUT_BATCH(0);
OUT_BATCH(tile_x | (tile_y << 16));
OUT_BATCH(0);

View File

@@ -132,6 +132,15 @@ intel_map_renderbuffer(struct gl_context *ctx,
void *map;
int stride;
if (!irb && rb->Data) {
/* this is a malloc'd renderbuffer (accum buffer) */
GLint bpp = _mesa_get_format_bytes(rb->Format);
GLint rowStride = rb->RowStride * bpp;
*out_map = (GLubyte *) rb->Data + y * rowStride + x * bpp;
*out_stride = rowStride;
return;
}
/* We sometimes get called with this by our intel_span.c usage. */
if (!irb->mt) {
*out_map = NULL;
@@ -176,6 +185,12 @@ intel_unmap_renderbuffer(struct gl_context *ctx,
DBG("%s: rb %d (%s)\n", __FUNCTION__,
rb->Name, _mesa_get_format_name(rb->Format));
if (!irb && rb->Data) {
/* this is a malloc'd renderbuffer (accum buffer) */
/* nothing to do */
return;
}
intel_miptree_unmap(intel, irb->mt, irb->mt_level, irb->mt_layer);
}
@@ -636,10 +651,10 @@ intel_render_texture(struct gl_context * ctx,
struct intel_renderbuffer *irb = intel_renderbuffer(att->Renderbuffer);
struct intel_texture_image *intel_image = intel_texture_image(image);
struct intel_mipmap_tree *mt = intel_image->mt;
int layer;
(void) fb;
int layer;
if (att->CubeMapFace > 0) {
assert(att->Zoffset == 0);
layer = att->CubeMapFace;

View File

@@ -56,6 +56,8 @@
#include "vbo/vbo.h"
#define OSMESA_RENDERBUFFER_CLASS 0x053
/**
* OSMesa rendering context, derived from core Mesa struct gl_context.
@@ -721,9 +723,8 @@ osmesa_choose_line( struct gl_context *ctx )
static void
compute_row_addresses( OSMesaContext osmesa )
{
GLint bytesPerPixel, bytesPerRow, i;
GLint bytesPerRow, i;
GLubyte *origin = (GLubyte *) osmesa->rb->Data;
GLint bpc; /* bytes per channel */
GLint rowlength; /* in pixels */
GLint height = osmesa->rb->Height;
@@ -732,32 +733,7 @@ compute_row_addresses( OSMesaContext osmesa )
else
rowlength = osmesa->rb->Width;
if (osmesa->rb->DataType == GL_UNSIGNED_BYTE)
bpc = 1;
else if (osmesa->rb->DataType == GL_UNSIGNED_SHORT)
bpc = 2;
else if (osmesa->rb->DataType == GL_FLOAT)
bpc = 4;
else {
_mesa_problem(&osmesa->mesa,
"Unexpected datatype in osmesa::compute_row_addresses");
return;
}
if ((osmesa->format == OSMESA_RGB) || (osmesa->format == OSMESA_BGR)) {
/* RGB mode */
bytesPerPixel = 3 * bpc;
}
else if (osmesa->format == OSMESA_RGB_565) {
/* 5/6/5 RGB pixel in 16 bits */
bytesPerPixel = 2;
}
else {
/* RGBA mode */
bytesPerPixel = 4 * bpc;
}
bytesPerRow = rowlength * bytesPerPixel;
bytesPerRow = rowlength * _mesa_get_format_bytes(osmesa->rb->Format);
if (osmesa->yup) {
/* Y=0 is bottom line of window */
@@ -800,20 +776,33 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
/* Note: we can ignoring internalFormat for "window-system" renderbuffers */
(void) internalFormat;
/* Given the user-provided format and type, figure out which MESA_FORMAT_x
* to use.
* XXX There aren't Mesa formats for all the possible combinations here!
* XXX Specifically, there's only RGBA-order 16-bit/channel and float
* XXX formats.
* XXX The 8-bit/channel formats should all be OK.
*/
if (osmesa->format == OSMESA_RGBA) {
if (rb->DataType == GL_UNSIGNED_BYTE) {
if (_mesa_little_endian())
rb->Format = MESA_FORMAT_RGBA8888_REV;
else
rb->Format = MESA_FORMAT_RGBA8888;
rb->GetRow = get_row_RGBA8;
rb->GetValues = get_values_RGBA8;
rb->PutRow = put_row_RGBA8;
rb->PutValues = put_values_RGBA8;
}
else if (rb->DataType == GL_UNSIGNED_SHORT) {
rb->Format = MESA_FORMAT_RGBA_16;
rb->GetRow = get_row_RGBA16;
rb->GetValues = get_values_RGBA16;
rb->PutRow = put_row_RGBA16;
rb->PutValues = put_values_RGBA16;
}
else {
rb->Format = MESA_FORMAT_RGBA_FLOAT32;
rb->GetRow = get_row_RGBA32;
rb->GetValues = get_values_RGBA32;
rb->PutRow = put_row_RGBA32;
@@ -822,18 +811,26 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
}
else if (osmesa->format == OSMESA_BGRA) {
if (rb->DataType == GL_UNSIGNED_BYTE) {
if (_mesa_little_endian())
rb->Format = MESA_FORMAT_ARGB8888;
else
rb->Format = MESA_FORMAT_ARGB8888_REV;
rb->GetRow = get_row_BGRA8;
rb->GetValues = get_values_BGRA8;
rb->PutRow = put_row_BGRA8;
rb->PutValues = put_values_BGRA8;
}
else if (rb->DataType == GL_UNSIGNED_SHORT) {
_mesa_warning(ctx, "Unsupported OSMesa format BGRA/GLushort");
rb->Format = MESA_FORMAT_RGBA_16; /* not exactly right */
rb->GetRow = get_row_BGRA16;
rb->GetValues = get_values_BGRA16;
rb->PutRow = put_row_BGRA16;
rb->PutValues = put_values_BGRA16;
}
else {
_mesa_warning(ctx, "Unsupported OSMesa format BGRA/GLfloat");
rb->Format = MESA_FORMAT_RGBA_FLOAT32; /* not exactly right */
rb->GetRow = get_row_BGRA32;
rb->GetValues = get_values_BGRA32;
rb->PutRow = put_row_BGRA32;
@@ -842,18 +839,26 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
}
else if (osmesa->format == OSMESA_ARGB) {
if (rb->DataType == GL_UNSIGNED_BYTE) {
if (_mesa_little_endian())
rb->Format = MESA_FORMAT_ARGB8888_REV;
else
rb->Format = MESA_FORMAT_ARGB8888;
rb->GetRow = get_row_ARGB8;
rb->GetValues = get_values_ARGB8;
rb->PutRow = put_row_ARGB8;
rb->PutValues = put_values_ARGB8;
}
else if (rb->DataType == GL_UNSIGNED_SHORT) {
_mesa_warning(ctx, "Unsupported OSMesa format ARGB/GLushort");
rb->Format = MESA_FORMAT_RGBA_16; /* not exactly right */
rb->GetRow = get_row_ARGB16;
rb->GetValues = get_values_ARGB16;
rb->PutRow = put_row_ARGB16;
rb->PutValues = put_values_ARGB16;
}
else {
_mesa_warning(ctx, "Unsupported OSMesa format ARGB/GLfloat");
rb->Format = MESA_FORMAT_RGBA_FLOAT32; /* not exactly right */
rb->GetRow = get_row_ARGB32;
rb->GetValues = get_values_ARGB32;
rb->PutRow = put_row_ARGB32;
@@ -862,18 +867,23 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
}
else if (osmesa->format == OSMESA_RGB) {
if (rb->DataType == GL_UNSIGNED_BYTE) {
rb->Format = MESA_FORMAT_RGB888;
rb->GetRow = get_row_RGB8;
rb->GetValues = get_values_RGB8;
rb->PutRow = put_row_RGB8;
rb->PutValues = put_values_RGB8;
}
else if (rb->DataType == GL_UNSIGNED_SHORT) {
_mesa_warning(ctx, "Unsupported OSMesa format RGB/GLushort");
rb->Format = MESA_FORMAT_RGBA_16; /* not exactly right */
rb->GetRow = get_row_RGB16;
rb->GetValues = get_values_RGB16;
rb->PutRow = put_row_RGB16;
rb->PutValues = put_values_RGB16;
}
else {
_mesa_warning(ctx, "Unsupported OSMesa format RGB/GLfloat");
rb->Format = MESA_FORMAT_RGBA_FLOAT32; /* not exactly right */
rb->GetRow = get_row_RGB32;
rb->GetValues = get_values_RGB32;
rb->PutRow = put_row_RGB32;
@@ -882,18 +892,23 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
}
else if (osmesa->format == OSMESA_BGR) {
if (rb->DataType == GL_UNSIGNED_BYTE) {
rb->Format = MESA_FORMAT_BGR888;
rb->GetRow = get_row_BGR8;
rb->GetValues = get_values_BGR8;
rb->PutRow = put_row_BGR8;
rb->PutValues = put_values_BGR8;
}
else if (rb->DataType == GL_UNSIGNED_SHORT) {
_mesa_warning(ctx, "Unsupported OSMesa format BGR/GLushort");
rb->Format = MESA_FORMAT_RGBA_16; /* not exactly right */
rb->GetRow = get_row_BGR16;
rb->GetValues = get_values_BGR16;
rb->PutRow = put_row_BGR16;
rb->PutValues = put_values_BGR16;
}
else {
_mesa_warning(ctx, "Unsupported OSMesa format BGR/GLfloat");
rb->Format = MESA_FORMAT_RGBA_FLOAT32; /* not exactly right */
rb->GetRow = get_row_BGR32;
rb->GetValues = get_values_BGR32;
rb->PutRow = put_row_BGR32;
@@ -902,6 +917,7 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
}
else if (osmesa->format == OSMESA_RGB_565) {
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
rb->Format = MESA_FORMAT_RGB565;
rb->GetRow = get_row_RGB_565;
rb->GetValues = get_values_RGB_565;
rb->PutRow = put_row_RGB_565;
@@ -932,26 +948,9 @@ new_osmesa_renderbuffer(struct gl_context *ctx, GLenum format, GLenum type)
rb->RefCount = 1;
rb->Delete = osmesa_delete_renderbuffer;
rb->AllocStorage = osmesa_renderbuffer_storage;
rb->ClassID = OSMESA_RENDERBUFFER_CLASS;
rb->InternalFormat = GL_RGBA;
switch (type) {
case GL_UNSIGNED_BYTE:
rb->Format = MESA_FORMAT_RGBA8888;
break;
case GL_UNSIGNED_SHORT:
rb->Format = MESA_FORMAT_RGBA_16;
break;
case GL_UNSIGNED_SHORT_5_6_5:
rb->Format = MESA_FORMAT_RGB565;
type = GL_UNSIGNED_BYTE;
break;
case GL_FLOAT:
rb->Format = MESA_FORMAT_RGBA_FLOAT32;
break;
default:
assert(0 && "Unexpected type in new_osmesa_renderbuffer()");
rb->Format = MESA_FORMAT_RGBA8888;
}
rb->_BaseFormat = GL_RGBA;
rb->DataType = type;
}
@@ -959,6 +958,56 @@ new_osmesa_renderbuffer(struct gl_context *ctx, GLenum format, GLenum type)
}
static void
osmesa_MapRenderbuffer(struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint x, GLuint y, GLuint w, GLuint h,
GLbitfield mode,
GLubyte **mapOut, GLint *rowStrideOut)
{
const OSMesaContext osmesa = OSMESA_CONTEXT(ctx);
if (rb->ClassID == OSMESA_RENDERBUFFER_CLASS) {
/* this is an OSMesa renderbuffer which wraps user memory */
const GLuint bpp = _mesa_get_format_bytes(rb->Format);
GLint rowStride; /* in bytes */
if (osmesa->userRowLength)
rowStride = osmesa->userRowLength * bpp;
else
rowStride = rb->Width * bpp;
if (!osmesa->yup) {
/* Y=0 is top line of window */
y = rb->Height - y - 1;
*rowStrideOut = -rowStride;
}
else {
*rowStrideOut = rowStride;
}
*mapOut = (GLubyte *) rb->Data + y * rowStride + x * bpp;
}
else {
_swrast_map_soft_renderbuffer(ctx, rb, x, y, w, h, mode,
mapOut, rowStrideOut);
}
}
static void
osmesa_UnmapRenderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb)
{
if (rb->ClassID == OSMESA_RENDERBUFFER_CLASS) {
/* no-op */
}
else {
_swrast_unmap_soft_renderbuffer(ctx, rb);
}
}
/**********************************************************************/
/***** Public Functions *****/
/**********************************************************************/
@@ -1157,6 +1206,9 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
tnl = TNL_CONTEXT(ctx);
tnl->Driver.RunPipeline = _tnl_run_pipeline;
ctx->Driver.MapRenderbuffer = osmesa_MapRenderbuffer;
ctx->Driver.UnmapRenderbuffer = osmesa_UnmapRenderbuffer;
/* Extend the software rasterizer with our optimized line and triangle
* drawing functions.
*/

View File

@@ -203,6 +203,12 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
goto end;
}
if (ctx->ReadBuffer->Name != 0 && ctx->ReadBuffer->Visual.samples > 0) {
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
"glCopyPixels(multisample FBO)");
goto end;
}
if (!_mesa_source_buffer_exists(ctx, type) ||
!_mesa_dest_buffer_exists(ctx, type)) {
_mesa_error(ctx, GL_INVALID_OPERATION,

View File

@@ -1395,7 +1395,8 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,
if (rb->InternalFormat == internalFormat &&
rb->Width == (GLuint) width &&
rb->Height == (GLuint) height) {
rb->Height == (GLuint) height &&
rb->NumSamples == samples) {
/* no change in allocation needed */
return;
}

View File

@@ -528,7 +528,7 @@ struct texenv_fragment_program {
*/
/* Texcoord override from bumpmapping. */
struct ir_variable *texcoord_tex[MAX_TEXTURE_COORD_UNITS];
ir_variable *texcoord_tex[MAX_TEXTURE_COORD_UNITS];
/* Reg containing texcoord for a texture unit,
* needed for bump mapping, else undef.

View File

@@ -636,7 +636,7 @@ pack_float_ARGB1555_REV(const GLfloat src[4], void *dst)
static void
pack_ubyte_AL44(const GLubyte src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
GLubyte *d = ((GLubyte *) dst);
*d = PACK_COLOR_44(src[ACOMP], src[RCOMP]);
}

View File

@@ -476,7 +476,7 @@ do_row(GLenum datatype, GLuint comps, GLint srcWidth,
GLuint *dst = (GLuint *) dstRow;
for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
dst[i] = (GLfloat)(rowA[j] / 4 + rowA[k] / 4 + rowB[j] / 4 + rowB[k] / 4);
dst[i] = rowA[j] / 4 + rowA[k] / 4 + rowB[j] / 4 + rowB[k] / 4;
}
}

View File

@@ -782,6 +782,11 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height,
return;
}
if (ctx->ReadBuffer->Name != 0 && ctx->ReadBuffer->Visual.samples > 0) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(multisample FBO)");
return;
}
if (!_mesa_source_buffer_exists(ctx, format)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(no readbuffer)");
return;

View File

@@ -45,6 +45,7 @@
#include "main/mtypes.h"
#include "main/shaderapi.h"
#include "main/shaderobj.h"
#include "main/uniforms.h"
#include "program/program.h"
#include "program/prog_parameter.h"
#include "ralloc.h"
@@ -936,8 +937,6 @@ static GLboolean
validate_shader_program(const struct gl_shader_program *shProg,
char *errMsg)
{
unsigned i;
if (!shProg->LinkStatus) {
return GL_FALSE;
}

View File

@@ -228,7 +228,7 @@ update_program(struct gl_context *ctx)
{
const struct gl_shader_program *vsProg = ctx->Shader.CurrentVertexProgram;
const struct gl_shader_program *gsProg = ctx->Shader.CurrentGeometryProgram;
const struct gl_shader_program *fsProg = ctx->Shader.CurrentFragmentProgram;
struct gl_shader_program *fsProg = ctx->Shader.CurrentFragmentProgram;
const struct gl_vertex_program *prevVP = ctx->VertexProgram._Current;
const struct gl_fragment_program *prevFP = ctx->FragmentProgram._Current;
const struct gl_geometry_program *prevGP = ctx->GeometryProgram._Current;

View File

@@ -1909,6 +1909,13 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
"glCopyTexImage%dD(invalid readbuffer)", dimensions);
return GL_TRUE;
}
if (ctx->ReadBuffer->Visual.samples > 0) {
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
"glCopyTexImage%dD(multisample FBO)",
dimensions);
return GL_TRUE;
}
}
/* Check border */
@@ -2008,6 +2015,13 @@ copytexsubimage_error_check1( struct gl_context *ctx, GLuint dimensions,
"glCopyTexImage%dD(invalid readbuffer)", dimensions);
return GL_TRUE;
}
if (ctx->ReadBuffer->Visual.samples > 0) {
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
"glCopyTexSubImage%dD(multisample FBO)",
dimensions);
return GL_TRUE;
}
}
/* check target (proxies not allowed) */

View File

@@ -515,9 +515,9 @@ make_temp_uint_image(struct gl_context *ctx, GLuint dims,
for (k = 0; k < texComponents; k++) {
GLint j = map[k];
if (j == ZERO)
newImage[i * texComponents + k] = 0.0F;
newImage[i * texComponents + k] = 0;
else if (j == ONE)
newImage[i * texComponents + k] = 1.0F;
newImage[i * texComponents + k] = 1;
else
newImage[i * texComponents + k] = tempImage[i * logComponents + j];
}
@@ -4094,7 +4094,7 @@ _mesa_texstore_z32f_x24s8(TEXSTORE_PARAMS)
_mesa_unpack_depth_span(ctx, srcWidth,
GL_FLOAT_32_UNSIGNED_INT_24_8_REV, /* dst type */
dstRow, /* dst addr */
1.0f, srcType, src, srcPacking);
~0U, srcType, src, srcPacking);
if (srcFormat != GL_DEPTH_COMPONENT)
_mesa_unpack_stencil_span(ctx, srcWidth,

View File

@@ -35,7 +35,7 @@ struct gl_context;
#define MESA_MAJOR 8
#define MESA_MINOR 0
#define MESA_PATCH 0
#define MESA_VERSION_STRING "8.0-devel"
#define MESA_VERSION_STRING "8.0-rc1"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

View File

@@ -5093,7 +5093,7 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
}
void
st_translate_stream_output_info(struct glsl_to_tgsi_visitor *glsl_to_tgsi,
st_translate_stream_output_info(glsl_to_tgsi_visitor *glsl_to_tgsi,
const GLuint outputMapping[],
struct pipe_stream_output_info *so)
{

View File

@@ -175,7 +175,7 @@ NAME(line)(struct gl_context *ctx, const SWvertex *v0, const SWvertex *v1)
line.attrPlane[attr][c]);
}
}
line.span.arrayAttribs |= (1 << attr);
line.span.arrayAttribs |= BITFIELD64_BIT(attr);
if (attr >= FRAG_ATTRIB_TEX0 && attr < FRAG_ATTRIB_VAR0) {
const GLuint u = attr - FRAG_ATTRIB_TEX0;
const struct gl_texture_object *obj = ctx->Texture.Unit[u]._Current;

View File

@@ -531,7 +531,7 @@ _swrast_update_active_attribs(struct gl_context *ctx)
{
GLuint i, num = 0;
for (i = 0; i < FRAG_ATTRIB_MAX; i++) {
if (attribsMask & (1 << i)) {
if (attribsMask & BITFIELD64_BIT(i)) {
swrast->_ActiveAttribs[num++] = i;
/* how should this attribute be interpolated? */
if (i == FRAG_ATTRIB_COL0 || i == FRAG_ATTRIB_COL1)

View File

@@ -175,7 +175,7 @@ interpolate_active_attribs(struct gl_context *ctx, SWspan *span,
attrMask &= ~span->arrayAttribs;
ATTRIB_LOOP_BEGIN
if (attrMask & (1 << attr)) {
if (attrMask & BITFIELD64_BIT(attr)) {
const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3];
GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3];
const GLfloat dv0dx = span->attrStepX[attr][0];
@@ -199,8 +199,8 @@ interpolate_active_attribs(struct gl_context *ctx, SWspan *span,
v3 += dv3dx;
w += dwdx;
}
ASSERT((span->arrayAttribs & (1 << attr)) == 0);
span->arrayAttribs |= (1 << attr);
ASSERT((span->arrayAttribs & BITFIELD64_BIT(attr)) == 0);
span->arrayAttribs |= BITFIELD64_BIT(attr);
}
ATTRIB_LOOP_END
}