Commit Graph

49906 Commits

Author SHA1 Message Date
Ander Conselvan de Oliveira 410aa3eb45 egl_dri2: make flush extension useable by drm platform 2012-03-27 08:28:07 -04:00
Kristian Høgsberg 03eca9d92d wayland: Stop using wl_buffer.damage 2012-03-27 08:28:07 -04:00
Neil Roberts 03f617f413 Add support for GL_EXT_unpack_subimage on GLES2
This extension just permits GL_UNPACK_ROW_LENGTH, GL_UNPACK_SKIP_ROWS
and GL_UNPACK_SKIP_PIXELS to be passed to glPixelStore on GLES2 so it
is trivial to implement.
2012-03-27 08:28:06 -04:00
Benjamin Franzke 860f4846c7 gles: Enable the GL_EXT_read_format_bgra extension
Also fixes the usage of GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES,
which may be set to a BGRA format e.g. for a MESA_FORMAT_ARGB8888 fb.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-27 09:03:19 +02:00
Benjamin Franzke e9a5457d73 gles1: Enable GL_EXT_texture_format_BGRA8888 in APIspec
The extension is already exposed for GLES1, but the APIspec
doesnt allow the usage of GL_BGRA_EXT in glTex(Sub)Image2D.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-27 09:03:19 +02:00
Dylan Noblesmith aebd549243 glapi: regenerate enums.c
For previous four commits:

    glapi: add GL_ARB_texture_float
    glapi: add GL_ARB_depth_buffer_float
    glapi: add GL_ARB_texture_compression_rgtc
    glapi: add ARB_texture_rg
2012-03-26 21:35:24 +00:00
Dylan Noblesmith 91c8bedb8a glapi: add GL_ARB_texture_float
And add some missing core GL 3.0 enums that came from this
extension, too.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-26 21:35:17 +00:00
Dylan Noblesmith 50fa821854 glapi: add GL_ARB_depth_buffer_float
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-26 21:35:04 +00:00
Dylan Noblesmith faf954f151 glapi: add GL_ARB_texture_compression_rgtc
Noticed this was missing when writing the "glapi: sort ARB extensions
by number" commit, which at least shows it was effective.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-03-26 21:28:25 +00:00
Dylan Noblesmith bae4cd6882 glapi: add ARB_texture_rg
Noticed it was missing based on the lack of a descriptive enum
name from this bug's error message:

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

This moves two enums out of GL3x.xml. Though since this and
GL_ARB_texture_compression_rgtc are both strict subsets of GL3,
both extensions should have had all their enums in that file
to begin with, not just two of them.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-03-26 21:28:25 +00:00
Dylan Noblesmith a419595a87 regen for "glapi: sort ARB extensions by number" 2012-03-26 21:28:10 +00:00
Dylan Noblesmith 1ae2e39d01 glapi: sort ARB extensions by number
And add comments to fill in for extensions that aren't there.

Noticed the comment about "ARB extensions sorted by extension number"
didn't extend to the <xi:include> directives when it became clear
GL_ARB_texture_rg was missing, going by the error message seen here:

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

This makes it easier to notice in the future if an extension is missing
when it shouldn't be.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-03-26 21:27:15 +00:00
Vinson Lee b688700edc mesa: Fix memory leak in generate_mipmap_compressed.
Fixes Coverity resource leak defect.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-26 14:08:11 -07:00
Dave Airlie 7449ae4597 glsl: fix linker error message context for frag shader output.
A later error prints this properly, fix this case to do the same.

v2: remove attribute as per Ian's suggestion
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-03-26 18:48:46 +01:00
Dave Airlie a83c1d61c2 glapi: ARB_blend_func_extended support + regen. (v2)
This adds the xml file covering ARB_blend_func_extended.

v2: fix SRC1_ALPHA

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-26 18:42:41 +01:00
Kenneth Graunke 7a348b91ce glsl: Make ir_dereference_variable ctor assert the variable exists.
This also seems like a bad idea.  There were too many instances for me
to thoroughly scan the code as I did with the last two patches, but a
quick scan indicated that most callers newly allocate a variable,
dereference it, or NULL-check.  In some cases, it wasn't clear that the
value would be non-NULL, but they didn't check for error_type either.

At any rate, not checking for this is a bug, and assertions will trigger
it earlier and more reliably than returning error_type.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-26 10:21:57 -07:00
Kenneth Graunke dca19a7711 glsl: Explicitly NULL-check variables before making a dereference.
The constructor currently returns a ir_dereference_variable of error
type when provided NULL, but that's about to change in the next commit.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-26 10:21:55 -07:00
Kenneth Graunke 2cd652f810 glsl: Make ir_dereference_record constructor assert the variable exists.
Providing a NULL pointer to the ir_dereference_record() constructor
seems like a bad idea.  Currently, if provided NULL, it returns a
partially constructed value of error type.  However, none of the callers
are prepared to handle that scenario.

Code inspection shows that all callers do one of the following:
- Already NULL-check the argument prior to creating the dereference
- Already deference the argument (and thus would crash if it were NULL)
- Newly allocate the argument.

Thus, it should be safe to simply assert the value passed is not NULL.
This should also catch issues right away, rather than dying later.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-26 10:21:53 -07:00
Kenneth Graunke 25b0d45d03 glsl: Make ir_dereference_array constructor assert the variable exists.
Providing a NULL pointer to the ir_dereference_array() constructor seems
like a bad idea.  Currently, if provided NULL, it returns a partially
constructed value of error type.  However, none of the callers are
prepared to handle that scenario.

Code inspection shows that all callers do one of the following:
- Already NULL-check the argument prior to creating the dereference
- Already deference the argument (and thus would crash if it were NULL)
- Newly allocate the argument.

Thus, it should be safe to simply assert the value passed is not NULL.
This should also catch issues right away, rather than dying later.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-26 10:21:51 -07:00
Kenneth Graunke ced54dcf9b glsl: Comment that expression flattening is used for matrix operations.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-26 10:21:44 -07:00
Christian König 7f6af49092 st/vdpau: clear video surface at least once
So if anything goes wrong we won't display a random image.

v2: flush before using the surface with the decoder.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-26 12:39:40 +02:00
Christian König 9f777699ed st/vdpau: invert interlaced buffer checks
That wasn't working as supposed.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-26 12:39:40 +02:00
Dave Airlie 7b6424143d intel: fix TFP at 16-bpp
don't ask why I had to debug this.

tested to fix g-s and kwin at 16-bpp on Ironlake.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-25 17:15:52 +01:00
Dave Airlie d6c5ad52b2 drisw: fix image stride calculation for 16-bit.
If you ran g-s in 16-bpp we'd do a bunch of memory corruption.

now it just misrenders for some other reasons.

applies to stable.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-03-25 17:15:23 +01:00
Dave Airlie ba3a4d79a7 glsl: fix compiling warning from gcc 4.7
ir_validate.cpp: In member function ‘virtual ir_visitor_status ir_validate::visit_leave(ir_swizzle*)’:
ir_validate.cpp:458:66: warning: narrowing conversion of ‘ir->ir_swizzle::mask.ir_swizzle_mask::x’ from ‘unsigned int’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
ir_validate.cpp:458:66: warning: narrowing conversion of ‘ir->ir_swizzle::mask.ir_swizzle_mask::y’ from ‘unsigned int’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
ir_validate.cpp:458:66: warning: narrowing conversion of ‘ir->ir_swizzle::mask.ir_swizzle_mask::z’ from ‘unsigned int’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
ir_validate.cpp:458:66: warning: narrowing conversion of ‘ir->ir_swizzle::mask.ir_swizzle_mask::w’ from ‘unsigned int’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-03-25 17:12:24 +01:00
Dave Airlie b78a77f979 glsl: initialise const force glsl extension warning in fake ctx
valgrind complained about an uninitialised value being used in
glsl_parser_extras.cpp, and this was the one it was giving out about.

Just initialise the value in the fakectx.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-25 17:12:24 +01:00
Dave Airlie 989e013b80 makefile: add phony am--refresh target
for some reason when I configure --with-dri-drivers="" the src/mesa/drivers/dri
Makefile tries to call the am--refresh target in the toplevel Makefile,
we don't have one, and I'm not sure what it should look like.

This makes things continue on.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-25 17:09:35 +01:00
Dave Airlie ea663d56e2 docs/GL3.txt: document ARB_blend_func_extended state
I've written softpipe version in my tree, + gallium/mesa/glsl changes,
however r600 currently hangs the GPU.
2012-03-24 16:35:46 +00:00
Dave Airlie 2c778375a1 glx/drisw: avoid segfaults when we fail to get visual
piglit glx-tfp segfaults on llvmpipe when run vs a 16-bit radeon screen,

it now fails instead of segfaulting, much prettier.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-24 13:05:19 +00:00
Vinson Lee 0f3aa9f4bd mesa: Fix memory leak in _mesa_get_uniform_location.
Fixes Coverity resource leak defect.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-23 22:52:57 -07:00
Brian Paul 318669f196 st/mesa: fix mipmap image size computation w.r.t. texture arrays
The image height or depth is the array_size for array textures.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=47742

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2012-03-23 10:08:49 -06:00
Brian Paul 281d0fd3a9 mesa: set numFaces=6 for cube maps in _mesa_test_texobj_completeness()
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-03-23 10:08:49 -06:00
Dylan Noblesmith 8d9decb75f intel: fix null dereference processing HiZ buffer
Or technically, a near-null dereference.

https://bugs.freedesktop.org/show_bug.cgi?id=46303
https://bugs.freedesktop.org/show_bug.cgi?id=46739

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-03-22 20:51:38 +00:00
Christopher Yeleighton 0c406afab0 docs: fix html in bugs.html
https://bugs.freedesktop.org/show_bug.cgi?id=47310
Signed-off-by: Brian Paul <brianp@vmware.com>
2012-03-22 08:15:11 -06:00
Christian König f23a2cb5d2 st/vdpau: improve frame dumping functionality a bit
Just a workaround until we get a real unit-
testing tool for VDPAU.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-22 09:47:04 +01:00
Christian König fa66fda5b0 st/vdpau: add VC-1 startcode if none is found in the stream
v2: only advanced profile needs that.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-22 09:47:04 +01:00
Eric Anholt e07b1603e2 glx: Fix glXGetProcAddress() of global glX symbols post-automake conversion.
When a GL LD_PRELOAD library like apitrace was used,
glXGetProcAddress() would return the preload's symbols instead of
libGL's symbol, leading to infinite recursion when the returned
function was called.  This didn't hit apitrace on most apps because
who calls glXGetProcAddress() on the global functions.

The -Bsymbolic, which was present in mklib before automake conversion,
causes the glxcmds.c:GLX_functions table to be resolved at link time,
so that LD_PRELOADs don't affect it any more.

Fixes crashes when running wine under apitrace.

Tested-by: Matt Turner <mattst88@gmail.com>
Tested-by: Marek Olšák <maraeo@gmail.com>
2012-03-21 13:55:41 -07:00
Brian Paul 20836c8185 st/mesa: set MaxUnrollIterations = 255
The default was 32 for the EmitNoLoops=0 case.  This allows the oZone3D
soft shadows test to work properly with the vmware driver.  Jose reported
that SM3 supports up to 255 loop iterations.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-03-21 13:46:44 -06:00
Brian Paul 7feabfe23d glsl: propagate MaxUnrollIterations to the optimizer's loop unroller
Instead of the hard-coded value of 32.  Note that MaxUnrollIterations
defaults to 32 so there's no net change.  But the gallium state tracker
can override this.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-21 13:46:36 -06:00
Eric Anholt 9bd38f3c67 intel: Make use of the new GPU-unsynchronized map functionality in libdrm.
Improves Unigine Tropics performance at 1024x768 by 2.06236% +/-
0.50272% (n=11).

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-21 12:45:06 -07:00
Eric Anholt 8308869311 intel: Drop the tracking of bo_map vs bo_map_gtt for unmapping.
drm_intel_bo_unmap() supports both in the current libdrm version.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-21 12:45:06 -07:00
Eric Anholt f97da4ed71 i965: Avoid flushing the batch for busy BOs for ARB_mbr with INVALIDATE_BUFFER.
Unigine Tropics uses INVALIDATE_BUFFER and not UNSYNCHRONIZED to reset
the buffer object when its streaming wraps.  Don't penalize it by
flushing the batch at the wrap point, just allocate a new BO and get
to using it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-21 12:45:06 -07:00
Eric Anholt 2222aa06e1 intel: Handle devid overrides using libdrm.
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-21 12:45:06 -07:00
Eric Anholt 0247d89183 intel: Ask libdrm to dump an AUB file if INTEL_DEBUG=aub.
It also asks for BMPs in the aub file at SwapBuffers time.

Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-21 12:45:05 -07:00
Eric Anholt 218f3a5663 intel: Bump libdrm requirement to 2.4.32.
We'll need this for AUB dumping and unsynchronized maps.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-21 12:45:05 -07:00
Jakob Bornecrantz 3a4ded6d1f docs: Add 8.0.2 md5sums
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
(cherry picked from commit 0bf0ba44de0cde5e041c188b409513866b7f5ab2)
2012-03-21 19:23:20 +00:00
Jakob Bornecrantz 7bb7e5ffbb docs: Add 8.0.2 release notes
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
(cherry picked from commit 5f7204c3bbc070fce2f3351419a64362fe15a8c6)
2012-03-21 19:23:20 +00:00
Jakob Bornecrantz 56d05a8d3a mesa: Include mesa ES mapi generated files
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
(cherry picked from commit 770f785a6f30e5295ababe44a8e9449ee0be640a)
2012-03-21 19:23:20 +00:00
Eric Anholt f1c1c9eabe glsl: Don't require gl_Position to be written in GLSL 1.40.
Fixes piglit glsl-1.40/execution/tf-no-position.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-21 12:07:54 -07:00
Jon TURNEY 0bc4407744 mapi: Use -no-undefined libtool flag in src/mapi/shared-glapi/Makefile.am
Use -no-undefined to assure libtool that the library has no unresolved
symbols at link time, so that libtool will build a shared library on
platforms that require that all symbols are resolved when the library
is linked.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-03-21 11:31:45 -07:00