Commit Graph

49883 Commits

Author SHA1 Message Date
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
Eric Anholt 668ed95993 drirc: Add missing XML attributes that made the driconf application whine.
These are used for pretty presentation of the application name in the
UI.

Tested-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-21 09:47:57 -07:00
Alex Deucher b4082f492b r600g: add support for TN (trinity) APUs
Note: this is a candidate for the stable branches.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-03-20 19:43:59 -04:00
Eric Anholt d09fce51f0 i965: Change the hiz-override env var to a driconf option.
The force-enable option is dropped, now that the hardware we were
concerned about has HiZ on by default.  Now, instead of doing
INTEL_HIZ=0 to test disabling hiz, you can set hiz=false.

v2: Disable separate stencil on gen6 when HIZ is turned off.
    (previously, this had to be done manually in addition).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
2012-03-20 15:47:48 -07:00
Eric Anholt 447aff5b02 i965: Drop the INTEL_FORCE_GS environment variable.
This was a debug option during gen6 transform feedback bringup (and a
similar one existed during gen4 bringup).  However, it looks like
we're done with that, and we don't anticipate it being used again,
either for geometry shaders or transform feedback.

Suggested by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-20 15:31:44 -07:00
Eric Anholt 7e6221f2e3 intel: Drop the INTEL_NO_BLIT debug environment variable.
This was added in the i915/i965 merge from the i915 driver, but I
don't recall it ever being used since then.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-20 15:27:46 -07:00
Eric Anholt 67d3ff760a intel: Drop the INTEL_STRICT_CONFORMANCE environment variable.
If you want to test the graphics driver, you want to test it under the
conditions that users will see, not some set of additional fallbacks.
If you want to test swrast, run the swrast driver (or no_rast=true)
instead.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-20 15:27:46 -07:00
Anuj Phogat cdcfd5d1d6 intel: Fix a case when mapping large texture fails
This patch handles a case when mapping a large texture fails
in drm_intel_gem_bo_map_gtt(). These changes avoid assertion
failure later in the driver as reported in following bugs:

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

Testing: No regressions in piglit quick.tests

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
2012-03-20 15:11:39 -07:00
Kenneth Graunke 2097af9728 Add Makefile to shared-glapi .gitignore 2012-03-20 11:50:51 -07:00
Kenneth Graunke dfce56ba4d Add Makefile.in to toplevel .gitignore
To avoid redundancies, this patch also removes Makefile.in from the
other .gitignore files.

Acked-by: Eric Anholt <eric@anholt.net>
2012-03-20 11:50:50 -07:00
Paul Berry b41ab3b42c Add .deps/, .libs/, and *.la to toplevel .gitignore
To avoid redundancies, this patch also removes .deps, .libs, and *.la
from .gitignore files in subdirectories.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-20 11:50:50 -07:00
Brian Paul 75f82b5d58 mesa: only test cube face widths in _mesa_test_texobj_completeness()
As Eric pointed out, we know the cube faces are square at this point
so we only need to test the texture widths for consistency.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-20 09:43:10 -06:00
Brian Paul 2cbccfdcb0 softpipe: set max cube texture size to 4Kx4K
The max size was 16Kx16K so a 4 byte/pixel, six-sided cube would require
6 GBytes of memory.  If mipmapped, 8 GB.  Reduce the max size to 4K to
make the total size more reasonable.

Fixes a crash with the new piglit max-texture-size test.

Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2012-03-20 08:23:32 -06:00
Brian Paul 73fd269d2f mesa: add integer texture completeness check
Per the spec, only nearest filtering is supported for integer textures.
Otherwise, the texture is incomplete.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-20 08:23:32 -06:00
Brian Paul f4a93e0665 mesa: rework texture completeness testing
Instead of gl_texture_object::_Complete there are now two fields:
_BaseComplete and _MipmapComplete.  The former indicates whether the base
texture level is valid.  The later indicates whether the whole mipmap is
valid.

With sampler objects, a single texture can appear to be both complete and
incomplete at the same time.  See the GL_ARB_sampler_objects spec for more
details.  To implement this we now check if the texture is complete with
respect to a sampler state.

Another benefit of this is we no longer need to invalidate a texture's
completeness state when we change the minification/magnification filters
with glTexParameter().

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-20 08:23:32 -06:00
Brian Paul b219b2c310 mesa: add _mesa_is_mipmap_filter() helper
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-20 08:23:32 -06:00
Brian Paul ff005bdb7c mesa: use _mesa_dirty_texobj() in glTexParameter code
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-20 08:23:32 -06:00
Brian Paul 878c69fe54 mesa: use _mesa_dirty_texobj() function
To mark the texture object as incomplete.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-20 08:23:32 -06:00
Brian Paul d335e69b9a mesa: rewrite/consolidate code in _mesa_test_texobj_completeness()
Merge the mipmap level checking code that was separate cases for 1D,
2D, 3D and CUBE before.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-20 08:23:32 -06:00
Brian Paul e86d0dea8e mesa: use new baseImage var to simplify _mesa_test_texobj_completeness()
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-20 08:23:32 -06:00
Brian Paul fbbbb98fc4 mesa: add comments in _mesa_test_texobj_completeness() related to the spec
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-20 08:23:32 -06:00
Brian Paul 085d2bb97e mesa: better debug message in _mesa_test_texobj_completeness()
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-20 08:23:32 -06:00
Brian Paul 4c9537f7d0 mesa: move some code in _mesa_test_texobj_completeness()
Move the simple MaxLevel < BaseLevel test earlier to be closer to where
we error-check BaseLevel.  Also, use the local baseLevel var in more places.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-20 08:23:32 -06:00
Brian Paul 4c385d382f mesa: use switch(target) in _mesa_test_texobj_completeness()
and add missing case for GL_TEXTURE_BUFFER.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-03-20 08:23:32 -06:00