Commit Graph

62410 Commits

Author SHA1 Message Date
Ilia Mirkin 159cec9dec docs: mark ARB_texture_gather as done on nvc0
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-07 01:06:19 -04:00
Ilia Mirkin f6579e4b17 nvc0: add support for texture gather
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-07 01:06:19 -04:00
Ilia Mirkin 91900c6d33 docs: mark ARB_texture_query_lod as done for nv50, nvc0
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-07 01:06:18 -04:00
Ilia Mirkin 423f64e83a nvc0: enable texture query lod
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-07 01:06:18 -04:00
Ilia Mirkin d5faf8e786 nv50: enable texture query lod
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-07 01:06:18 -04:00
Dave Airlie 4dc13e3c71 st/mesa: add support for ARB_texture_query_lod
Add support for the LODQ texture instruction.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-04-07 01:06:18 -04:00
Dave Airlie be5276ae7d gallium: add support for LODQ opcodes.
This opcode provide support for GL_ARB_texture_query_lod,

Signed-off-by: Dave Airlie <airlied@redhat.com>
[imirkin: rebase, docs update]
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-04-07 01:06:18 -04:00
Matt Turner 5d0b3ec4ae i965/vec4: Allow constant propagation into dot product.
total instructions in shared programs: 1667088 -> 1667055 (-0.00%)
instructions in affected programs:     3362 -> 3329 (-0.98%)

Reviewed-by: Eric Anholt <eric@anholt.net>
2014-04-05 09:52:54 -07:00
Matt Turner 34ec1a24d6 glsl: Optimize (x + y cmp 0) into (x cmp -y).
Cuts a small handful of instructions in Serious Sam 3:

instructions in affected programs:     4692 -> 4666 (-0.55%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-04-05 09:47:37 -07:00
Matt Turner 6499ecafa5 i965/fs: Split out can_coalesce_vars() function.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2014-04-05 09:47:37 -07:00
Matt Turner 29841fbe20 i965/fs: Split out is_coalesce_candidate() function.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2014-04-05 09:47:37 -07:00
Matt Turner 0fbcdec2f6 i965/fs: Split fs_visitor::register_coalesce() into its own file.
The function has gotten large, and brw_fs.cpp is the largest source file
in the driver.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2014-04-05 09:47:37 -07:00
Matt Turner 8b1ab5c93b i965/fs: Mark appropriate fs_inst members as const.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2014-04-05 09:47:36 -07:00
Matt Turner 39ecfca121 i965: Mark is_tex() and friends as const.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2014-04-05 09:47:36 -07:00
Matt Turner 92d03f7f28 i965/fs: Don't propagate saturation modifiers if there are source modifiers.
Which would lead to translating

   mad     vgrf9:F,  vgrf3:F, u0:F, vgrf6:F
   mov.sat vgrf7:F, -vgrf9:F

into

   mad.sat vgrf9:F,  vgrf3:F, u0:F, vgrf6:F
   mov     vgrf7:F, -vgrf9:F

Fixes some lighting effects in Dota2.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76749
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-04-05 09:47:36 -07:00
Matt Turner 7a7b8a02be i965/fs: Don't propagate saturate modifiers into partial writes.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-04-05 09:47:36 -07:00
Matt Turner 86ae6f477d i965/fs: Fix off-by-one in saturate propagation.
ip needs to be initialized to start_ip - 1, since the first thing in the
main loop is ip++. Otherwise we would incorrectly propagate the saturate
from the mov to the mad:

   mad     a, b, c, d
   mov.sat x, a
   add     y, z, a

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-04-05 09:47:36 -07:00
Matt Turner 20dee82a75 i965/vec4: Consider sources of non-GRF-dst instructions for dead channels.
Previously we'd ignore the sources of instructions with non-GRF
destinations when calculating calculating the dead channels. This would
lead to us incorrectly removing the first instruction in this sequence:

   mov vgrf11, ...
   cmp.ne.f0 null, vgrf11, 1.0
   mov vgrf11, ...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76616
2014-04-05 09:47:36 -07:00
Matt Turner 63d57f3b08 i965/fs: Name temporary ralloc contexts something other than mem_ctx.
Or else poor programmers might mistakenly use the temporary mem_ctx,
instead of the fs_visitor's mem_ctx and wonder why their code is
crashing.

Also remove the parenting. These contexts are local to the optimization
passes they're in and are freed at the end.
2014-04-05 09:44:54 -07:00
Matt Turner 26012c1673 i965/fs: Recalculate live intervals in calculate_register_pressure().
Otherwise calling dump_instructions() after declaring a new fs_reg would
segfault when calculate_register_pressure()'s loop over reg walked off
the end of the virtual_grf_start[] array that calculate_live_intervals()
would have reallocated for you, if it had known there was a new
register.
2014-04-05 09:44:54 -07:00
Jonathan Gray c973e440d5 egl/dri2: use drm macros to construct device name
Don't hardcode /dev/dri/card0 but instead use the drm
macros which allows the correct /dev/drm0 device to be
opened on OpenBSD.

v2: use snprintf and fallback to /dev/dri/card0
v3: check for snprintf truncation

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-04-05 13:36:29 +01:00
Jonathan Gray 81799c82e4 configure: don't require libudev for gbm or egl drm/wayland
After the loader changes libudev is no longer required for
gbm or the egl drm/wayland platforms.  Lets these build/run
on OpenBSD.

v2: preserve the libudev requirement for Linux as suggested
by Emil Velikov.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-05 13:35:25 +01:00
Jonathan Gray 0295953c5d egl/dri2: don't require libudev to build drm/wayland platforms
After the loader changes libudev is no longer required to
build gbm or the egl drm/wayland platforms.

Remove a libudev ifdef which allows the the drm egl driver
to be loaded on OpenBSD.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-05 13:33:48 +01:00
Jonathan Gray 11623be934 automake: don't enable -Wl,--no-undefined on OpenBSD
OpenBSD does not have DT_NEEDED entries for libc by design,
over concerns how the symbols would be referenced after
changing the major version of the library.

So avoid -no-undefined checks on OpenBSD as they will fail.

v2: don't include the -no-undefined libtool option in the variable
    and change -Wl,--no-undefined references in Automake.inc as well.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76856
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-04-05 13:30:27 +01:00
Emil Velikov e4bd00c1c6 targets/dri: move common libraries to GALLIUM_DRI_LIB_DEPS
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-05 13:02:54 +01:00
Emil Velikov fc91e7e4ae targets/omx: use GALLIUM_COMMON_LIB_DEPS
The targets do not require expat or selinux. Use GALLIUM_COMMON_LIB_DEPS
which provides the core requirements for each gallium target.

Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-05 13:02:48 +01:00
Emil Velikov 6b41043050 targets/xvmc: use GALLIUM_COMMON_LIB_DEPS
The targets do not require expat or selinux. Use GALLIUM_COMMON_LIB_DEPS
which provides the core requirements for each gallium target.

Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-05 13:02:46 +01:00
Emil Velikov 432b5776f2 r600/omx: drop -lstdc++ hack
The build system will use g++ to link the static library due to the
dummy.cpp source(s). Thus one does not need the explicit link against
stdc++.

Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-05 13:02:30 +01:00
Emil Velikov 28a4276442 drivers/nouveau: mention dummy.cpp to use g++ linker
The build system does not know that the static library is C++.
Mention the cpp file to trigger generation of the proper variable
and drop the hacky stdc++ linking.

Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-05 13:00:32 +01:00
Emil Velikov 16372969c7 drivers/nouveau: use GALLIUM_COMMON_LIB_DEPS
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-05 13:00:14 +01:00
Emil Velikov c8129604ef drivers/r300: use GALLIUM_COMMON_LIB_DEPS
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76848
Tested-by: Vinson Lee <vlee@freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-05 13:00:07 +01:00
Emil Velikov ba5eba5008 automake: introduce GALLIUM_COMMON_LIB_DEPS
Rather than copying the core four dependencies all over gallium,
introduce the above variable to avoid all the duplication.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76848
Tested-by: Vinson Lee <vlee@freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-05 13:00:02 +01:00
Emil Velikov 16c13aaeb8 automake: move GALLIUM_DRI_LIB_DEPS to Automake.inc
With recent commit we started de-duplicating all of the compiler/
linker flags moving their handling inside Automake.inc.

This did not take into consideration that the above variable was set
at configure time, leading to issues on certain build combinations.

Move the variable to where it's used/handled thus cleaning up
configure.ac.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76848
Tested-by: Vinson Lee <vlee@freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-05 12:59:44 +01:00
Johannes Nixdorf 476db98e03 configure.ac: fix the detection of expat with pkg-config
The pkg-config module was called "EXPAT" instead of "expat" in
PKG_CHECK_EXISTS. This seems to have been wrong because the wrong
argument was copied from PKG_CHECK_MODULES.

Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-05 12:24:01 +01:00
Jonathan Gray 1cc742d912 megadriver_stub.c: don't use _GNU_SOURCE to gate the compat code
_GNU_SOURCE is only set/required for linux*|*-gnu*|gnu*) and as the
functionality is available on other systems check for RTLD_DEFAULT instead.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-05 12:21:31 +01:00
Jonathan Gray 380f05ccc3 loader: don't limit the non-udev path to only android
Platforms that lack libudev (OpenBSD and possibly others) need
this change in order to load the correct dri driver.
Under linux we unconditionally require libudev, thus this code
will never get build.

v2: Add commit message (Emil Velikov)

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-05 12:17:28 +01:00
Jonathan Gray 727f54a76e loader: use 0 instead of FALSE which isn't defined
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-05 12:16:45 +01:00
Francisco Jerez 4ccff1499c clover: Document that the *obj*() helpers already take care of object validation. 2014-04-05 12:18:29 +02:00
Matt Turner 489cb0b2d1 i965: Mark SNB GT1 as a GT1.
brw->gt only seems to be used on gen >= 7, so this shouldn't have any
effect.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-04-04 15:07:41 -07:00
Marek Olšák 78f754b739 gallium/u_blitter: implement scaled blitting in the Z direction
So that pipe->blit can be used for 3D mipmap generation.
2014-04-04 19:38:36 +02:00
Marek Olšák 8ab7bb4707 gallium/u_blitter: don't adjust cubemap coordinates by a small number
It may cause issues with mipmap generation.
I think it was used to make some piglit tests pass on r300g.
2014-04-04 19:38:36 +02:00
Leo Liu 0817182b2f Revert "radeon: just don't map VRAM buffers at all"
This reverts commit 96e8b916a7.
In the case of VCE encoding with raw YUV file, CPU load directly
to VRAM is faster than combination of CPU writing to GTT and
then blit to VRAM with GPU.

Reviewed-by: Christian König <christian.koenig@amd.com>
2014-04-04 16:21:04 +02:00
Leo Liu de1a59b7a7 radeon/vce: cleanup cpb handling
v2: fix whitespace errors, minor coding style changes

Signed-off-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
2014-04-04 12:35:55 +02:00
Christian König 6c59be7776 st/mesa: improve sampler view handling
Keep a dynamically increasing array of all the views
created for a texture instead of just the last one.

v2: add comments, fix array size calculation,
    release only the first sampler view found

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-04-04 10:25:35 +02:00
Thomas Hellstrom 61bedc3d6b st/xa: Fix advertized version number and try to avoid future discrepancies
The xa version number had to be set in two places. In configure.ac and in
xa_tracker.h. Furthermore, xa_tracker.h is an installed header so we can't
use mesa internal defines. So therefore, at configure time, modify the
xa_tracker.h header to use the version given by configure.ac

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
2014-04-04 08:33:43 +02:00
Ian Romanick 4fa58ae5c7 glapi: Fix make check
/me puts a paper bag on his head and sits in the corner.

This was supposed to be included in 5a68f731, which added
glPointSizePointerOES back to the list of functions exposed by
libGLESv1_CM.  It looks like it was an uncommitted change in my tree
when I sent the patch out.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-04-03 20:12:19 -07:00
Brian Paul 177c9be615 llvmpipe: remove no-op checks in sampler, sampler_view functions
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-04-03 20:05:56 -06:00
Brian Paul 61a3e9936c softpipe: remove no-op checks in sampler, sampler_view functions
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-04-03 19:39:23 -06:00
Brian Paul 4105ad825f svga: remove no-op checks in sampler, sampler_view functions
We are checking for no-ops in the CSO module for both of these items
so there's no reason to do it in the driver.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-04-03 19:39:23 -06:00
Brian Paul 5a2f8b2c48 cso: check for no sampler view changes in cso_set_sampler_views()
As we do for sampler states in single_sampler_done() and many other
CSO functions.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-04-03 19:39:23 -06:00