OSDN Git Service
Jon TURNEY [Mon, 19 Dec 2011 17:42:02 +0000 (17:42 +0000)]
Fix compilation on cygwin after commit
762c9766c93697af8d7fbaa729aed118789dbe8e
Fix compilation on cygwin after commit
762c9766c93697af8d7fbaa729aed118789dbe8e
"Use VERT_ATTRIB_* indexed array in gl_array_object" added the first non-driver
use of ffsll(), which exposes the fact that this isn't provided on cygwin.
Found by tinderbox, see [1]
[1] http://tinderbox.freedesktop.org/builds/2011-11-30-0017/logs/libGL/#build
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Brian Paul <brianp@vmware.com>
Maarten Lankhorst [Tue, 20 Dec 2011 11:32:37 +0000 (12:32 +0100)]
xvmc: Remove unused variable
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
Maarten Lankhorst [Tue, 20 Dec 2011 11:36:18 +0000 (12:36 +0100)]
vl: Remove unused declaration
csc is not used for rgba and gives a warning.
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
Maarten Lankhorst [Mon, 19 Dec 2011 15:42:49 +0000 (16:42 +0100)]
vl: Use pipe clear_render_target instead of util_clear_render_target
Mapping to software and uploading again clearing is killing performance.
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
Pekka Paalanen [Fri, 16 Dec 2011 14:10:47 +0000 (16:10 +0200)]
mesa: fix a leak in _mesa_delete_texture_image()
Valgrind complains about a definitely lost block allocated in
intelNewTextureImage(). This leak was apparently created by
6e0f9001fe3fb191c2928bd09aa9e9d05ddf4ea9, "mesa: move
gl_texture_image::Data, RowStride, ImageOffsets to swrast", as it
removes the free() from _mesa_delete_texture_image().
Put the free() back, fixes a Valgrind error.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Chia-I Wu [Tue, 20 Dec 2011 09:18:56 +0000 (17:18 +0800)]
st/egl: error check and clamp coordinates in eglPostSubBufferNV
EGL_BAD_PARAMETER should be returned when any of the coordinates is negative.
Chia-I Wu [Tue, 20 Dec 2011 09:25:22 +0000 (17:25 +0800)]
egl_dri2/x11: error check coordinates in eglPostSubBufferNV
EGL_BAD_PARAMETER should be returned when any of the coordinates is negative.
Fredrik Höglund [Wed, 14 Dec 2011 20:24:11 +0000 (21:24 +0100)]
st/egl: Add support for EGL_NV_post_sub_buffer
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
[olv: remove #ifdef checks]
Fredrik Höglund [Wed, 14 Dec 2011 20:24:10 +0000 (21:24 +0100)]
egl_dri2/x11: Add support for EGL_NV_post_sub_buffer
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Fredrik Höglund [Wed, 14 Dec 2011 20:24:09 +0000 (21:24 +0100)]
egl: add EGL_NV_post_sub_buffer
v2: Handle EGL_POST_SUB_BUFFER_SUPPORTED_NV in
_eglParseSurfaceAttribList()
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
[olv: remove #ifdef checks]
Chia-I Wu [Tue, 20 Dec 2011 08:42:11 +0000 (16:42 +0800)]
egl: KHR_reusable_sync entrypoints are missing from eglGetProcAddress
Chia-I Wu [Tue, 20 Dec 2011 08:28:20 +0000 (16:28 +0800)]
egl: remove #ifdef's for official extensions
There is no point in having them when we distribute eglext.h.
As for unofficial extensions, there is a chance that we might remove some of
them evetually. Keeping the #ifdef's for now should make that easier.
Chia-I Wu [Tue, 20 Dec 2011 08:19:08 +0000 (16:19 +0800)]
egl: remove EGL_ANDROID_swap_rectangle
We never support this unofficial extension, and it has been removed from
Android recently. There is no point in keeping it.
Chia-I Wu [Thu, 15 Dec 2011 07:20:01 +0000 (15:20 +0800)]
egl: update headers
Update to revision 15052.
EGL_MESA_drm_image is now official. But apparently we have our own extension
to it and we need this in eglmesaext.h:
#ifdef EGL_MESA_drm_image
/* Mesa's extension to EGL_MESA_drm_image... */
#ifndef EGL_DRM_BUFFER_USE_CURSOR_MESA
#define EGL_DRM_BUFFER_USE_CURSOR_MESA 0x0004
#endif
#endif
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Chia-I Wu [Mon, 19 Dec 2011 09:37:30 +0000 (17:37 +0800)]
egl: move unofficial extensions to eglmesaext.h
As suggested by Ian in
http://lists.freedesktop.org/archives/mesa-dev/2011-December/016035.html
Note that eglext.h has to include eglmesaext.h at the end instead of the
beginning because some extensions in eglmesaext.h depend on the official
extensions.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Stéphane Marchesin [Thu, 15 Dec 2011 20:55:18 +0000 (12:55 -0800)]
i915g: Add unsupported caps.
Stéphane Marchesin [Fri, 16 Dec 2011 00:19:46 +0000 (16:19 -0800)]
i915g: Turn an assert into a debug message, print more debug info for missing depth swz.
Also fix indentation a bit.
Stéphane Marchesin [Thu, 15 Dec 2011 20:59:58 +0000 (12:59 -0800)]
i915g: Make the pipe_sampler_state struct non const and get rid of useless memcpy.
Stéphane Marchesin [Thu, 15 Dec 2011 20:31:36 +0000 (12:31 -0800)]
i915g: Implement KILP.
Stéphane Marchesin [Thu, 15 Dec 2011 19:10:32 +0000 (11:10 -0800)]
i915g: Add two unsupported caps.
Stéphane Marchesin [Thu, 15 Dec 2011 18:59:26 +0000 (10:59 -0800)]
i915g: Put the templates at the beggining of the structures.
Seriously. This fixes fragment-and-vertex-texturing in piglit and probably
a boatload of other stuff.
Kenneth Graunke [Fri, 28 Oct 2011 04:57:48 +0000 (21:57 -0700)]
i965: Advertise our vertex shader texture units.
Previously, we advertised 0 VS texture units. Now that we have proper
support for using the sampling engine in the VS, we can advertise 16,
which is conveniently the number required for OpenGL 3.0.
v2: Enable on Gen4. I hacked up my tests to not use flat ivec varyings
and they pass.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Wed, 7 Dec 2011 11:20:53 +0000 (03:20 -0800)]
i965/vs: Implement EXT_texture_swizzle support for VS texturing.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Wed, 7 Dec 2011 11:13:50 +0000 (03:13 -0800)]
i965/vs: Add texture related data to brw_vs_prog_key.
Now that this is all factored out, it's trivial to do.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Thu, 8 Dec 2011 20:15:59 +0000 (12:15 -0800)]
i965/fs: Only set brw_wm_prog_key data for samplers used by the WM.
This should avoid state-dependent FS recompiles when samplers that are
only used by the VS change.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Tue, 6 Dec 2011 23:36:21 +0000 (15:36 -0800)]
i965/fs: Factor out texturing related data from brw_wm_prog_key.
The idea is to reuse this for the VS and (in the future) GS as well.
v2: Include yuvtex data since we're not dropping GL_MESA_ycbycr.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net> [v1]
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Sat, 12 Nov 2011 10:21:44 +0000 (02:21 -0800)]
i965/vs: Add support for texel offsets.
The visit() half computes the values to put in the header based on the
IR and simply stuffs that in the vec4_instruction; the emit() half uses
this to set up the message header. This works out well since emit() can
use brw_reg directly and access individual DWords without kludgery.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Wed, 26 Oct 2011 20:51:28 +0000 (13:51 -0700)]
i965/fs: Factor out texture offset bitfield computation.
We'll want to reuse this for the VS, and it's complex enough that I'd
rather not cut and paste it.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Wed, 26 Oct 2011 21:00:52 +0000 (14:00 -0700)]
i965/vs: Implement vec4_visitor::visit(ir_texture *).
This translates the GLSL compiler's IR into vec4_instruction IR,
generating code to load coordinates, LOD info, shadow comparitors, and
so on into the appropriate message registers.
It turns out that the SIMD4x2 parameters are identical on Gen 5-7, and
the Gen4 code is similar enough that, unlike in the FS, it's easy enough
to support all generations in a single function.
v2: Load zeros for missing coordinates (fixing vs-texelFetch-sampler1D
and 2D on G45), and fix G45 message length for shadow comparisons.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Wed, 26 Oct 2011 20:53:11 +0000 (13:53 -0700)]
i965/vs: Implement vec4_visitor::generate_tex().
This is the part that takes the vec4_instruction IR and turns it into
actual Gen ISA.
v2: Add Gen4 messages, don't retype m0 to UW.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Thu, 15 Dec 2011 00:18:42 +0000 (16:18 -0800)]
i965: Add missing SIMD4x2 sample_l_c message #defines.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Thu, 15 Dec 2011 21:43:00 +0000 (13:43 -0800)]
i965: Don't minify depth when setting up cube map miptrees on Gen4.
Prior to Ironlake, cube maps were stored as 3D textures. In recent
refactoring, we removed a separate "layers" parameter in favor of using
depth. Unfortunately, depth was getting minified, which is only correct
for actual 3D textures.
Fixes piglit tests:
- bugs/crash-cubemap-order
- fbo/fbo-cubemap
- texturing/cubemap
Also changes texturing/cubemap npot from abort to fail.
This hasn't seen a full test run since Piglit on Mesa master hangs
GM45 a lot.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Wed, 30 Nov 2011 18:55:54 +0000 (10:55 -0800)]
glx: Remove GLX_USE_APPLEGL cruft in extension string handling
All of the extensions require that both libGL and either the server or
the direct rendering driver (or both) enable the extension before it's
advertised. It seems safe to assume that none of the other components
on OS X will enable these extensions, so all the #ifdef blocks here
just clutter the code.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Jeremy Huddleston <jeremyhu@apple.com>
Ian Romanick [Wed, 30 Nov 2011 19:00:00 +0000 (11:00 -0800)]
glx: GLX 1.4 does not require GLX_INTEL_swap_event
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Wed, 30 Nov 2011 18:53:59 +0000 (10:53 -0800)]
glx: Remove some extensions that are not, and never will be, supported
There are a few unsupported extensions (e.g., the ATI and NV float
extensions) that are still in the list. There is some small chance
that these may be supported some day.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Tue, 29 Nov 2011 02:31:21 +0000 (18:31 -0800)]
glx: Explicitly reject servers that only support GLX 1.0
__glXInitialize calls AllocAndFetchScreenConfigs.
AllocAndFetchScreenConfigs unconditionally sends a glXQuerySeverString
request to the server. This request is only supported with GLX 1.1 or
later, so we were already implicitly incompatible with GLX 1.0
servers. How many more similar bugs lurk in the code that nobody has
noticed in years?
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Thu, 8 Dec 2011 23:03:19 +0000 (15:03 -0800)]
glx: Initialize share_xid in CreateContext
Previously the share_xid was only set in the glXImportContextEXT path,
and it was left set to None in all of the other create-context paths.
Fixes the piglit test glx-query-context-info-ext.
NOTE: This is a candidate for the 7.11 branch.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Mon, 12 Dec 2011 17:48:29 +0000 (09:48 -0800)]
glx: Make parameter types for __glXSendError match protocol types
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Jeremy Huddleston <jeremyhu@apple.com>
Ian Romanick [Thu, 8 Dec 2011 00:12:21 +0000 (16:12 -0800)]
glx: Make __glXSendError available in non-Apple builds
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Jeremy Huddleston <jeremyhu@apple.com>
Ian Romanick [Wed, 7 Dec 2011 21:31:27 +0000 (13:31 -0800)]
glx: Send DestroyContext protocol at the correct times
Send the DestroyContext protocol immediately when glXDestroyContext is
called, and never call it when glXFreeContextEXT is called. In both
cases, either destroy the client-side structures or, if the context is
current, set xid to None so that the client-side structures will be
destroyed later.
I believe this restores the behavior of the original SGI code. See
src/glx/x11 around commit
5df82c8. The spec doesn't say anything
about glXDestroyContext not really destroying imported contexts (it
acts like glXFreeContextEXT instead), but that's what the original
code did. Note that glXFreeContextEXT on a non-imported context does
not destroy it either.
Fixes the piglit test glx-free-context.
NOTE: This is a candidate for the 7.11 branch.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Wed, 7 Dec 2011 19:37:01 +0000 (11:37 -0800)]
glx: Don't segfault if glXGetContextIDEXT is pased a NULL context
Fixes the piglit test glx-get-context-id.
NOTE: This is a candidate for the 7.11 branch.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Wed, 7 Dec 2011 19:15:14 +0000 (11:15 -0800)]
glx: Fix handling of property list received from the server in glXImportContextEXT
The primary problem was that the number of reply bytes read is clamped
to sizeof(propList), but the loop that processes the properties tries
to examine all of the properties sent by the server. If the server
sends 47,000 properties, we only read 3 but process all 47,000.
NOTE: This is a candidate for the 7.11 branch.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Wed, 7 Dec 2011 01:15:26 +0000 (17:15 -0800)]
glx: Don't segfault if xcb_glx_is_direct_reply returns NULL
NOTE: This is a candidate for the 7.11 branch.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Tue, 6 Dec 2011 20:19:39 +0000 (12:19 -0800)]
glx: Don't create a shared context if the other context isn't the same kind
Each of the DRI, DRI2, and DRISW backends contain code like the
following in their create-context routine:
if (shareList) {
pcp_shared = (struct dri2_context *) shareList;
shared = pcp_shared->driContext;
}
This assumes that the glx_context *shareList is actually the correct
derived type. However, if shareList was created as an
indirect-rendering context, it will not be the expected type. As a
result, shared will contain garbage. This garbage will be passed to
the driver, and the driver will probably segfault. This can be
observed with the following GLX code:
ctx0 = glXCreateContext(dpy, visinfo, NULL, False);
ctx1 = glXCreateContext(dpy, visinfo, ctx0, True);
Create-context is the only case where this occurs. All other cases
where a context is passed to the backend, it is the 'this' pointer
(i.e., we got to the backend by call something from ctx->vtable).
To work around this, check that the shareList->vtable->destroy method
is the same as the destroy method of the expected type. We could also
check that shareList->vtable matches the vtable or by adding a "tag"
to glx_context to identify the derived type.
NOTE: This is a candidate for the 7.11 branch.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Eric Anholt [Fri, 18 Nov 2011 01:19:12 +0000 (17:19 -0800)]
i965: Add support for GL_ARB_depth_buffer_float under 3.0 override.
This is not exposed generally yet because some of the swrast paths hit
in piglit (drawpixels, copypixels, blit) aren't yet converted to
MapRenderbuffer.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 7 Dec 2011 22:49:45 +0000 (14:49 -0800)]
i965: Add separate stencil/HiZ setup for MESA_FORMAT_Z32_FLOAT_X24S8.
This is a little more unusual than the separate MESA_FORMAT_S8_Z24
support, because in addition to storing the real stencil data in a
MESA_FORMAT_S8 miptree, we also make the Z miptree be
MESA_FORMAT_Z32_FLOAT instead of the requested format.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Tue, 13 Dec 2011 20:40:09 +0000 (12:40 -0800)]
i965: Use the miptree format for texture surface format choice.
With separate stencil GL_DEPTH32F_STENCIL8, the miptree will have a
really different format (MESA_FORMAT_Z32_FLOAT) from the teximage
(MESA_FORMAT_Z32_FLOAT_X24S8).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Sat, 3 Dec 2011 00:00:10 +0000 (16:00 -0800)]
i965: Add support for mapping Z32_FLOAT_X24S8 fake packed depth/stencil.
The format handling here is tricky, because we're not actually
generating a Z32_FLOAT_X24S8 miptree, so we're guessing the format
that GL wants based on seeing Z32_FLOAT with a separate stencil.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Thu, 8 Dec 2011 16:33:28 +0000 (08:33 -0800)]
intel: Stop creating the wrapped depth irb.
All the operations were just trying to get at irb->wrapped_depth->mt,
which is the same as irb->mt now.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Thu, 15 Dec 2011 01:16:07 +0000 (17:16 -0800)]
i965: Properly demote the depth mt format for fake packed depth/stencil.
gen7 only supports the non-packed formats, even if you associate a
real separate stencil buffer -- otherwise it's as if the depth test
always fails.
This requires a little bit of care in the match_texture_image case,
since the miptree format no longer matches the texture image format.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Thu, 15 Dec 2011 04:43:06 +0000 (20:43 -0800)]
intel: Reuse intel_miptree_match_image().
This little bit of logic was duplicated, which isn't much, but I was
going to need to duplicate a bit of additional logic in the next
commit.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 7 Dec 2011 23:02:02 +0000 (15:02 -0800)]
intel: Stop creating the wrapped stencil irb.
There were only two places it was really used at this point, which was
in the batchbuffer emit of the separate stencil packets for gen6/7.
Just write in the ->stencil_mt reference in those two places and ditch
all this flailing around with allocation and refcounts.
v2: Fix separate stencil on gen7.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Dave Airlie [Mon, 19 Dec 2011 16:40:05 +0000 (16:40 +0000)]
tgsi: update documents with some info on texture lookup
this mentions which channels are used for slice and depth comparison values.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Dave Airlie [Mon, 19 Dec 2011 11:51:39 +0000 (11:51 +0000)]
softpipe: fix shadow1d tests.
This fixes the piglit glsl-1.10 shadow1D related tests.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Dave Airlie [Mon, 19 Dec 2011 10:34:20 +0000 (10:34 +0000)]
softpipe: fix shadow 2d texture array sampling
The 4th texcoord is used in this case for the comparison.
This fixes piglit glsl-fs-shadow2DArray* on softpipe.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Dave Airlie [Mon, 19 Dec 2011 15:57:50 +0000 (15:57 +0000)]
gallium/draw: fix two side handling
The code didn't handle the case where front wasn't specified in the vertex
shader outputs, but back was.
In that case we were doing a copy from back to non-existant front,
this code checks we have existant front/backs and only does the copy when
they both exist.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Alex Galakhov [Mon, 19 Dec 2011 14:40:07 +0000 (07:40 -0700)]
osmesa: fix RGB565 rendering
Signed-off-by: Brian Paul <brianp@vmware.com>
Maarten Lankhorst [Mon, 19 Dec 2011 09:16:06 +0000 (10:16 +0100)]
vdpau: Add background surface support
Sets rgba layer as zeroth layer if a custom background_surface is specified.
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
Maarten Lankhorst [Mon, 19 Dec 2011 09:14:16 +0000 (10:14 +0100)]
vdpau: Add support for mixer attributes
It's harmless to add support for attributes we don't support,
since they require a feature enabled for them to affect
something. As long as they aren't enabled, nothing happens.
This enables support for custom colorspaces and background colors.
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
Maarten Lankhorst [Mon, 19 Dec 2011 09:10:06 +0000 (10:10 +0100)]
vdpau: Add support for parameters
Currently only validating, since nothing else can be done with it yet
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
v2: removed check_video_surface
Signed-off-by: Christian König <deathsimple@vodafone.de>
Dave Airlie [Sun, 18 Dec 2011 21:25:15 +0000 (21:25 +0000)]
softpipe: fix depth sampling for linear vs nearest.
This sample compare was always doing linear, and this makes the
glsl-fs-shadow1DArray test render like the Intel driver.
fix wrong 0->j from initial patch
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Dave Airlie [Sun, 18 Dec 2011 21:18:19 +0000 (21:18 +0000)]
softpipe: fix texture sampling from 1D texture array
This is the first part of a fix to piglit glsl-fs-shadow1DArray
also fix the passing of unused r[2] in the normal 1D case.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Brian Paul [Sun, 18 Dec 2011 17:02:42 +0000 (10:02 -0700)]
mesa: make _mesa_set_tex_image() static since it's not called anywhere else
Christoph Bumiller [Sun, 18 Dec 2011 21:34:50 +0000 (22:34 +0100)]
nvc0: add NVC0_RESOURCE_FLAG_VIDEO
Dave Airlie [Sat, 10 Dec 2011 18:33:49 +0000 (18:33 +0000)]
glsl_to_tgsi: make sure copied instructions don't lose texture target. (v2)
The piglit draw-pixel-with-texture was asserting in the glsl->tgsi code,
due to 0 texture target, this makes sure the texture target is copied over
correctly when we copy instructions around.
v2: drive-by fix bitmap on the way past.
This avoids the assertion, have to contemplate fixing things as per the spec
later.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Kenneth Graunke [Fri, 28 Oct 2011 04:45:12 +0000 (21:45 -0700)]
i965/vs: Add a new dst_reg constructor for file, number, type, and mask.
This will be especially useful for loading texturing parameters, where I
need to (for example) reference m3.xz<D>.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Wed, 26 Oct 2011 19:59:33 +0000 (12:59 -0700)]
i965/vs: Add vec4_instruction::is_tex() query.
Copy and pasted from fs_inst::is_tex(), but without TXB.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Wed, 26 Oct 2011 19:58:37 +0000 (12:58 -0700)]
i965: Rename texturing ops from FS_OPCODE to SHADER_OPCODE, except TXB.
We'll be reusing most of these for the VS shortly. The one exception is
TXB (texturing with LOD bias), which is explicitly forbidden in the VS.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Tue, 6 Dec 2011 20:39:54 +0000 (12:39 -0800)]
i965/fs: Don't swizzle the results of textureSize().
Fixes a regression since
d2235b0f4681f75d562131d655a6d7b7033d2d8b,
in my new textureSize sampler(1DArrayShadow|2DShadow|2DArrayShadow)
piglit tests, though I'm not honestly sure how this ever worked.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
nobled [Sun, 18 Dec 2011 17:17:10 +0000 (17:17 +0000)]
program: fix previous commit
Accidentally an old patch.
nobled [Thu, 8 Dec 2011 21:07:18 +0000 (21:07 +0000)]
program: fix out of bounds array accesses and other bad things
Noticed a "warning: array subscript is above array bounds" given at one of
the existing sanity-check asserts. Turns out all the arrays of strings
haven't matched the corresponding enum values in a while, if ever.
I didn't know the proper names for any of these and couldn't find
them in the base specs aside from "result.pointsize" in
ARB_vertex_program, so I just filled in the enum's value
as was done with other slots.
Also add four STATIC_ASSERT()s to be sure and catch future additions
or bumps to MAX_VARYING/etc again, and some more non-static asserts
where there weren't any before.
(Note, the fragment enum that corresponded to result.color(half) was removed in
8d475822e6e19fa79719c856a2db5b6a205db1b9.)
Reviewed-by: Brian Paul <brianp@vmware.com>
nobled [Thu, 8 Dec 2011 20:53:25 +0000 (20:53 +0000)]
gen_matypes: eliminate printf warnings
The VERT_BIT_* defines are 64-bit values now, but the printf
was still expecting a simple int.
Marek Olšák [Sat, 17 Dec 2011 18:42:13 +0000 (19:42 +0100)]
r600g: fix MAX_STREAM_OUTPUT_SEPARATE_ATTRIBS limit
Marek Olšák [Sat, 17 Dec 2011 14:14:03 +0000 (15:14 +0100)]
mesa/x86: fix printf warning
Marek Olšák [Sat, 17 Dec 2011 14:13:37 +0000 (15:13 +0100)]
drisw: remove unused variable
Marek Olšák [Sat, 17 Dec 2011 14:13:23 +0000 (15:13 +0100)]
r600g: handle new caps
Marek Olšák [Sat, 17 Dec 2011 14:12:59 +0000 (15:12 +0100)]
r300g: handle new caps
Marek Olšák [Sat, 17 Dec 2011 13:47:15 +0000 (14:47 +0100)]
docs: update GL3 status
Marek Olšák [Tue, 8 Nov 2011 20:58:27 +0000 (21:58 +0100)]
r600g: implement transform feedback
r600: DONE.
r700: MOSTLY (done but locks up).
Evergreen: MOSTLY (done but doesn't work for an unknown reason).
The kernel support will come soon.
Marek Olšák [Tue, 13 Dec 2011 17:11:00 +0000 (18:11 +0100)]
st/mesa: expose conservative_depth if GLSL 1.3 is supported
It's not yet, but it can be enabled by the override environment variable.
Vinson Lee [Tue, 13 Dec 2011 01:54:54 +0000 (17:54 -0800)]
gallivm: Fix build with llvm-3.1svn.
llvm-3.1svn r145714 moved global variables into a new TargetOptions
class. TargetMachine constructor now needs a TargetOptions object as
well.
Signed-off-by: Vinson Lee <vlee@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Vinson Lee [Sat, 10 Dec 2011 22:46:13 +0000 (14:46 -0800)]
mesa: Fix memory leak on error path.
Fixes Coverity resource leak defect.
Signed-off-by: Vinson Lee <vlee@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Vinson Lee [Tue, 6 Dec 2011 08:15:28 +0000 (00:15 -0800)]
st/mesa: Fix memory leak in out-of-memory path.
Fixes Coverity resource leak defect.
Signed-off-by: Vinson Lee <vlee@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Brian Paul [Thu, 15 Dec 2011 14:36:49 +0000 (07:36 -0700)]
meta: use _mesa_prepare_mipmap_level() in the mipmap generation code
See previous commit for more information.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Thu, 15 Dec 2011 23:30:33 +0000 (16:30 -0700)]
mesa: new _mesa_prepare_mipmap_level() function for mipmap generation
This helper function is used during mipmap generation to prepare space
for the destination mipmap levels.
This improves/fixes two things:
1. If the texture object was created with glTexStorage2D, calling
_mesa_TexImage2D() to allocate the new image would generate
INVALID_OPERATION since the texture is marked as immutable.
2. _mesa_TexImage2D() always frees any existing texture image memory
before allocating new memory. That's inefficient if the existing
image is the right size already.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Fri, 16 Dec 2011 00:33:33 +0000 (17:33 -0700)]
mesa: make update_fbo_texture() non-static
We'll call this from the mipmap generation code.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Fri, 16 Dec 2011 15:44:43 +0000 (08:44 -0700)]
mesa: whitespace and comment fixes in fbobject.c
Brian Paul [Fri, 16 Dec 2011 15:44:43 +0000 (08:44 -0700)]
mesa: add MESA_FORMAT_RGB565[_REV] as candidates for GL_R3_G3_B2
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Fri, 16 Dec 2011 15:44:43 +0000 (08:44 -0700)]
vbo: add comment for map_vp_non[] array
Brian Paul [Fri, 16 Dec 2011 15:44:42 +0000 (08:44 -0700)]
mesa: add a few comments for the z unpacking functions
Anuj Phogat [Tue, 13 Dec 2011 19:52:59 +0000 (11:52 -0800)]
Enabling display list support for glClearBuffer functions with minor fixes
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Fredrik Höglund [Thu, 15 Dec 2011 19:41:42 +0000 (20:41 +0100)]
gallium: fix a crash in drivers that don't support stream output
Christoph Bumiller [Thu, 15 Dec 2011 19:10:16 +0000 (20:10 +0100)]
llvmpipe: adapt to struct stream_output_info modifications
My fault, I broke it with v5 of
861a029ddb31e91bb4d8e18ab708d0d172f63aad.
Christoph Bumiller [Fri, 9 Dec 2011 17:46:09 +0000 (18:46 +0100)]
nvc0: implement new stream output interface
Christoph Bumiller [Thu, 15 Dec 2011 17:46:10 +0000 (18:46 +0100)]
d3d1x: implement new stream output interface
Marek Olšák [Fri, 9 Dec 2011 17:33:58 +0000 (18:33 +0100)]
st/mesa: implement EXT_transform_feedback and ARB_transform_feedback2
Marek Olšák [Fri, 9 Dec 2011 17:32:41 +0000 (18:32 +0100)]
u_blitter: implement copy_buffer using stream output
Marek Olšák [Sat, 19 Nov 2011 20:44:28 +0000 (21:44 +0100)]
u_blitter: restore stream output targets
Christoph Bumiller [Fri, 9 Dec 2011 18:12:38 +0000 (19:12 +0100)]
trace: implement stream output interface
Marek Olšák [Sat, 19 Nov 2011 20:44:27 +0000 (21:44 +0100)]
noop: implement stream output