Commit Graph

61283 Commits

Author SHA1 Message Date
Emil Velikov 11926e8997 targets/egl-static: automake: don't export local symbols
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-02-11 20:16:55 +00:00
Emil Velikov 5c7f75f70a gbm: automake: add symbol tests
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-11 19:00:09 +00:00
Emil Velikov 33b9c0d465 targets/gbm: automake: do not export internal symbols
Add VISIBILITY_CFLAGS to automake build, so that
only required symbols are exported.

v2: Rebase

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-02-11 19:00:09 +00:00
Emil Velikov 10e5ffd496 gbm: do not export _gbm_mesa_get_device
This symbol is internal and was never part of the API.
Unused by any of the gbm backends, it makes sense to
simply not export it.

Cc: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-02-11 19:00:09 +00:00
Emil Velikov d00b319f40 gbm: automake: add
VISIBILITY_CFLAGS

Currently the library exports every symbol imaginable,
rather than the ones defined by the API.

Note: This may cause issues for libraries that are linking
agaist libgbm's internals.

Cc: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-02-11 19:00:09 +00:00
Emil Velikov 631cc6105d st/gbm: automake: do not export gbm_gallium_drm_device_create
Symbol is internal and was never meant to be exported.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-02-11 19:00:09 +00:00
Emil Velikov 90ed101322 auxiliary/pipe-loader: automake: avoid exporting all symbols
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-02-11 19:00:09 +00:00
Emil Velikov 165eecf1f6 egl/dri2/android: free driver_name in dri2_initialize_android error path
v2:
Cleanup driver name if dri2_load_driver() fails. Spotted by Chad

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-11 19:00:09 +00:00
Emil Velikov 76d9f6d972 dri/nouveau: Pass the API into _mesa_initialize_context
Currently we create a OPENGL_COMPAT context regardless of
what was requested by the program. Correct that by retaining
the program's request and passing it into _mesa_initialize_context.

Based on a similar commit for radeon/r200 by Ian Romanick.

Cc: "9.1 9.2 10.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-11 19:00:09 +00:00
Emil Velikov 118c36adb4 configure: cleanup libudev handling
Add the explicit note about the required version during configure.
Require the same version (151) of udev when building the pipe-loader.
Mention the udev version requirement in GBM Requires.private.

v2: Resolve a couple of silly typos. Spotted by Ilia
v3: Cleanup platfrom/platform typo. Spotten by Stefan

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-11 18:59:59 +00:00
Emil Velikov 31f50f3149 gbm: drop unneeded dependency of libudev
As of recently we dlopen the library, additionally the only
code that is including the libudev.h header, is the loader.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-11 17:17:50 +00:00
Emil Velikov d57dc6dc30 opencl: do not link against libudev
Previously the linking was required due to dependency of udev in the
pipe-loader. Now this is no longer the case, as we dlopen the library.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-11 17:17:50 +00:00
Emil Velikov e19fba7cc6 gallium/tests: do not link against libudev
Previously the linking was required due to dependency of udev in the
pipe-loader. Now this is no longer the case, as we dlopen the library.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-11 17:17:50 +00:00
Emil Velikov 897e1989da egl-static: stop linking against libudev
No longer required since all the udev code is in the loader.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-11 17:17:50 +00:00
Emil Velikov 053e095ecb egl_dri2: remove LIBUDEV_CFLAGS from Makefile.am
None of the code within builds or (explicitly) requires udev.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-11 17:17:50 +00:00
Emil Velikov 6fe2ca7a08 configure: drop LIBUDEV_CFLAGS from X11_INCLUDES
The cflags are explicitly included in the only Makefile that
handles udev dependant code.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-11 17:17:50 +00:00
Emil Velikov 7536d744ee pipe-loader: drop obsolete libudev.h include
All the udev code is in the loader, so there is no
reason for us to include this header.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-11 17:17:49 +00:00
Emil Velikov 929f83376a configure: error out when building radeonsi without gallium-llvm
--enable-gallium-llvm is required by radeonsi. Currently we
check only for LLVM_VERSION_INT which is 0, whenever gallium-llvm
is disabled explicitly.

./configure --with-gallium-drivers=r600,radeonsi --disable-gallium-llvm

v2: Correct typo in error message. Spotted by Tom Stellard

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-11 17:04:18 +00:00
Christian König 4ca8439dce omx/radeonsi: fix target
Another minor typo.

Signed-off-by: Christian König <christian.koenig@amd.com>
2014-02-11 17:10:22 +01:00
Christian König 79aa29d45e omx: fix some minor configure.ac issues
Matt Turner noted the incorrect order, but I somehow forgotten to
change it before pushing upstream. The other one is a typo during rebase.

Signed-off-by: Christian König <christian.koenig@amd.com>
2014-02-11 17:08:42 +01:00
Christian König ee978aee94 vl: add H264 encoding interface
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Leo Liu <leo.liu@amd.com>
2014-02-11 13:26:13 +01:00
Kenneth Graunke eaf3358e0a i965: Don't call abort() on an unknown device.
If we don't recognize the PCI ID, we can't reasonably load the driver.
However, calling abort() is quite rude - it means the application that
tried to initialize us (possibly the X server) can't continue via
fallback paths.  We already have a more polite mechanism - failing to
create the context.  So, just use that.

While we're at it, improve the error message.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73024
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Lu Hua <huax.lu@intel.com>
2014-02-11 02:23:22 -08:00
Daniel Kurtz b47d231526 glsl: Add locking to builtin_builder singleton
Consider a multithreaded program with two contexts A and B, and the
following scenario:

1. Context A calls initialize(), which allocates mem_ctx and starts
   building built-ins.
2. Context B calls initialize(), which sees mem_ctx != NULL and assumes
   everything is already set up.  It returns.
3. Context B calls find(), which fails to find the built-in since it
   hasn't been created yet.
4. Context A finally finishes initializing the built-ins.

This will break at step 3.  Adding a lock ensures that subsequent
callers of initialize() will wait until initialization is actually
complete.

Similarly, if any thread calls release while another thread is still
initializing, or calling find(), the mem_ctx/shader would get free'd while
from under it, leading to corruption or use-after-free crashes.

Fixes sporadic failures in Piglit's glx-multithread-shader-compile.

Bugzilla: https://bugs.freedesktop.org/69200
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "10.1 10.0" <mesa-stable@lists.freedesktop.org>
2014-02-11 02:21:41 -08:00
Kenneth Graunke e95a4ed296 i965/fs: Simplify FS_OPCODE_SET_OMASK stride mashing a bit.
In the first case, we can simply call stride(mask, 16, 8, 2) rather than
creating a new register with a different stride, then immediately
changing it a second time.

In the second case, the stride was already what we wanted, so we can
just use mask without any changes at all.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-02-11 02:21:35 -08:00
Kenneth Graunke f948ad2a07 i965/fs: Simplify FS_OPCODE_SET_SAMPLE_ID stride mashing a bit.
stride(brw_vec1_reg(...) ...) takes some register, changes the strides,
then changes the strides again.  Let's do it once.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-02-11 02:21:26 -08:00
Dave Airlie 08fd34c8a3 docs/GL3.txt: denote r600g support for ARB_viewport_array
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-02-11 14:15:18 +10:00
Dave Airlie 6d434252e2 r600g: add support for multiple viewports.
tested on rv635 and barts.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-02-11 14:14:50 +10:00
Dave Airlie 0705fa35cd st/mesa: add support for GL_ARB_viewport_array (v0.2)
this just ties the mesa code to the pre-existing gallium interface,
I'm not sure what to do with the CSO stuff yet.

0.2: fix min/max bounds

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-02-11 14:14:50 +10:00
Dave Airlie c116ee6042 st/mesa: add support for viewport index semantic
This adds GS output and FS input support, even though FS input
support isn't supported until GLSL 4.30 from what I can see.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-02-11 14:06:40 +10:00
Kenneth Graunke a21552a96b i965: Program 2x MSAA sample positions.
There are only two sensible placements for 2x MSAA samples - and one is
the mirror image of the other.  I chose (0.25, 0.25) and (0.75, 0.75).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
2014-02-10 08:18:29 -08:00
Kenneth Graunke f4bc0ac83e i965: Store 4x MSAA sample positions in a scalar value, not an array.
Storing a single value in an array is rather pointless.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
2014-02-10 08:18:29 -08:00
Kenneth Graunke 16f7510ad3 i965: Duplicate less code in GetSamplePositions driver hook.
The 4x and 8x cases contained identical code for extracting the X and
Y sample offset values and converting them from U0.4 back to float.

Without this refactoring, we'd have to duplicate it a third time in
order to support 2x MSAA.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
2014-02-10 08:18:28 -08:00
Ilia Mirkin 40dd777b33 nouveau/video: make sure that firmware is present when checking caps
Apparently some players are ill-prepared for us claiming that a decoder
exists only to have creating it fail, and express this poor preparation
with crashes (e.g. flash). Check that firmware is there to increase the
chances of there being a high correlation between reported capabilities
and ability to create a decoder.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: 10.0 10.1 <mesa-stable@lists.freedesktop.org>
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-10 14:00:17 +01:00
Kenneth Graunke a487ef87fe mesa: Fix MESA_FORMAT_Z24_UNORM_S8_UINT vs. X8_UINT mix-up.
In commit eeed49f5f2, Mark accidentally
renamed MESA_FORMAT_S8_Z24 to MESA_FORMAT_Z24_UNORM_X8_UINT and
MESA_FORMAT_X8_Z24 to MESA_FORMAT_Z24_UNORM_S8_UINT, reversing their
sense.  The commit message was correct, but what sed commands actually
got run didn't match that.

This patch swaps the two enum names, reversing them.  This should undo
the damage, but might break things if people have manually fixed a few
instances in the meantime...

Mark's commit also failed to mention renames:
s/MESA_FORMAT_ARGB2101010_UINT\b/MESA_FORMAT_B10G10R10A2_UINT/g
s/MESA_FORMAT_ABGR2101010\b/MESA_FORMAT_R10G10B10A2_UNORM/g
but those seem okay.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-02-09 16:57:45 -08:00
Maxence Le Doré b903be50b0 mesa: remove duplicated init of MaxViewports
Already declared 5 lines before.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-02-09 16:45:23 -08:00
Grigori Goronzy d34d5fddf8 gallium: add geometry shader output limits
v2: adjust limits for radeonsi and llvmpipe
v3: add documentation

Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2014-02-09 23:31:38 +01:00
Siavash Eliasi 61bc014c96 mesa: Removed unnecessary check for NULL pointer when freeing memory
Note that it is OK to pass NULL pointers to this function since this commit:

mesa: modified _mesa_align_free() to accept NULL pointer
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f0cc59d68a9f5231e8e2111393a1834858820735

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-02-09 16:16:34 +01:00
Ilia Mirkin 356aff3a5c nv30: report 8 maximum inputs
nvfx_fragprog_assign_generic only allows for up to 10/8 texcoords for
nv40/nv30. This fixes compilation of the varying-packing tests.
Furthermore it appears that the last 2 inputs on nv4x don't seem to
work in those tests, so just report 8 everywhere for now.

Tested on NV42, NV44. NV4B appears to have additional problems.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: 9.1 9.2 10.0 10.1 <mesa-stable@lists.freedesktop.org>
2014-02-08 19:06:51 -05:00
Christoph Bumiller 2e9ee44797 nv50/ir/ra: some register spilling fixes
Cc: 10.1 <mesa-stable@lists.freedesktop.org>
2014-02-09 00:04:13 +01:00
Brian Paul c325ec8965 mesa: update assertion in detach_shader() for geom shaders
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74723
Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
2014-02-08 14:21:28 -07:00
Brian Paul 6e8d04ac3e mesa: allocate gl_debug_state on demand
We don't need to allocate all the state related to GL_ARB_debug_output
until some aspect of that extension is actually needed.

The sizeof(gl_debug_state) is huge (~285KB on 64-bit systems), not even
counting the 54(!) hash tables and lists that it contains.  This change
reduces the size of gl_context alone from 431KB bytes to 145KB bytes on
64-bit systems and from 277KB bytes to 78KB bytes on 32-bit systems.

Reviewed-by: Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-02-08 11:27:58 -07:00
Brian Paul 31b2625cb5 mesa: trivial clean-ups in errors.c
Whitespace changes, 78-column rewrapping, comment clean-ups, add
some braces, etc.

Reviewed-by: Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-02-08 11:27:58 -07:00
Brian Paul 1dc209d8f2 mesa: remove _mesa_ prefix from some static functions
Reviewed-by: Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-02-08 11:27:57 -07:00
Kenneth Graunke dcb0330d30 i965: Label JIP and UIP in Broadwell shader disassembly.
This makes it obvious which number is which.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-02-07 19:38:15 -08:00
Kenneth Graunke 8a7fe50067 i965: Don't disassemble UIP field for Broadwell WHILE instructions.
The WHILE instruction doesn't have UIP.  It only has JIP.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-02-07 19:38:12 -08:00
Kenneth Graunke 5230655a2e i965: Don't print source registers for Broadwell flow control.
The bits which normally contain the source register descriptions
actually contain the JIP/UIP jump targets, which we already printed.

Interpreting JIP/UIP as source registers results in some really creepy
looking output, like IF statements with acc14.4<0,1,0>UD sources.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-02-07 19:37:34 -08:00
Kenneth Graunke 8e0a0e4d30 i965: Fix fast depth clear values on Broadwell.
Broadwell's 3DSTATE_CLEAR_PARAMS packet expects a floating point value
regardless of format.  This means we need to stop converting it to
UNORM.

Storing the value as float would make sense, but since we already have a
uint32_t field, this patch continues shoehorning it into that.  In a
sense, this makes mt->depth_clear_value the DWord you emit in the
packet, rather than the clear value itself.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-02-07 19:36:14 -08:00
Christoph Bumiller 882e98e5e6 nvc0: handle TGSI_SEMANTIC_LAYER
Cc: 10.1 <mesa-stable@lists.freedesktop.org>
2014-02-07 23:14:00 +01:00
Christoph Bumiller dd2229d4c6 nvc0: create the SW object
It's required for being able to use software methods now.
2014-02-07 22:53:37 +01:00
Christoph Bumiller b7233acf78 nvc0/ir/emit: hardcode vertex output stream to 0 for now 2014-02-07 22:53:36 +01:00