History log of /external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c6d17701c823f10ce6d04e4ccb5df09b0186bfbd 23-Sep-2016 Jose Fonseca <jfonseca@vmware.com> pipe_loader_sw: Don't invoke Unix close() on Windows.

Trivial.
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
459cc94507071eec18b746f57a4ec82578a38b54 07-May-2016 Hans de Goede <hdegoede@redhat.com> pipe_loader_sw: Fix fd leak when instantiated via pipe_loader_sw_probe_kms

Make pipe_loader_sw_probe_kms take ownership of the passed in fd,
like pipe_loader_drm_probe_fd does.

The only caller is dri_kms_init_screen which passes in a dupped fd,
just like dri2_init_screen passes in a dupped fd to
pipe_loader_drm_probe_fd.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
5f92906b876d5463efba3ffb19c1de0dcb3c755f 23-Nov-2015 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: check if winsys.name is non-null prior to strcmp

In theory this wouldn't be an issue, as we'll find the correct name and
break out of the loop before we hit the sentinel.

Let's fix this and avoid issues in the future.

Spotted by Coverity (CID 1339869, 1339870, 1339871)

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
59cfb21d4670559d49a721df766073d9d288b51a 23-Nov-2015 Emil Velikov <emil.l.velikov@gmail.com> targets: use the non-inline sw helpers

Previously (with the inline ones) things were embedded into the
pipe-loader, which means that we cannot control/select what we want in
each target.

That also meant that at runtime we ended up with the empty
sw_screen_create() as the GALLIUM_SOFTPIPE/LLVMPIPE were not set.

v2: Cover all the targets, not just dri.

Cc: "11.1" <mesa-stable@lists.freedesktop.org>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Edward O'Callaghan <edward.ocallaghan@koparo.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Oded Gabbay <oded.gabbay@gmail.com>
Tested-by: Nick Sarnie <commendsarnex@gmail.com>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
f6235171882d18d0b4d11a3d564c6aa3b22af9d1 23-Nov-2015 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: fix off-by one error

With earlier commit we've dropped the manual iteration over the fixed
size array and prepemtively set the variable storing the size, that is
to be returned. Yet we forgot to adjust the comparison, as before we
were comparing the index, now we're comparing the size.

Fixes: ff9cd8a67ca "pipe-loader: directly use
pipe_loader_sw_probe_null() at probe time"
Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93091
Reported-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
be78f73b37caa5c9bc8dec9390d0c397bbff8729 20-Nov-2015 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: wire up the 'static' sw pipe-loader

Analogous to previous commit with a small catch.

As the sw inline helpers are mere wrappers, and the screen <> winsys
split is more prominent (with the latter not being part of the final
pipe-driver), things will just work.

v2: rebase on top of earlier 'consolitate teardown' changes

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
e465de5a51dbb1af50da1a44353867adc45d57c7 14-Oct-2015 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: annotate the ops as const data

Already defined as such in struct pipe_loader_device::ops.

Cc: Tom Stellard <thomas.stellard@amd.com>
Cc: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
46991ab9aac99c5ba55b735396f32447e75a6320 17-Oct-2015 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: teardown the winsys, if create_screen fails

i.e. plug some (hard to hit) memory leaks.

v2: fix rebase fallout - really teardown the winsys (Brian)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
d54ca54faa2a6dde3c4d2125fd41d10dfcf2f91e 17-Oct-2015 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: rework the sw backend

Move the winsys into the pipe-target, similar to the hardware
pipe-driver.

v2:
- move int declaration outside of loop (Brian)
- fold the teardown into a goto + separate function.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
ff9cd8a67cabe4a7bbfec941666a216617f18103 14-Oct-2015 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: directly use pipe_loader_sw_probe_null() at probe time

Due to the nature of the other sw winsys' we cannot use them during the
generic probe stage. As such there is little point in keeping the
abstraction layer.

Cc: Tom Stellard <thomas.stellard@amd.com>
Cc: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
4e3c06a501cbba8cc463c3c244d6cb838e3be782 14-Oct-2015 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: add pipe_loader_sw_probe_init_common() helper

Allows us to fold the duplication in pipe_loader_sw_probe_*().

Cc: Tom Stellard <thomas.stellard@amd.com>
Cc: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
74d41a32bc179425e866f8afa33a222488ea7760 14-Oct-2015 Emil Velikov <emil.l.velikov@gmail.com> gallium: remove library_path argument from pipe_loader_create_screen()

Currently the location is determined at configure/build time and
consistently copied across gallium. Just remove the extra argument, and
use PIPE_SEARCH_DIR where appropriate.

This will allow us to remove the duplication in the *configuration and
*screen_create APIs by moving util_dl_get_proc_address() and friends to
probe time.

v2: rebase on top of vl_winsys_drm.c addition

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
33f1db1eb412382d2bd6552369e6f63bad52ca8d 14-Oct-2015 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: add pipe_loader_sw_probe_kms() implementation

Will be used as a counterpart for target-helpers'
kms_swrast_create_screen().

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
132031b110a9fd652f3c9d5727502134ef9c22c1 29-Jun-2015 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: remove pipe_loader_sw_probe_xlib

It was only useful for st/egl, although I've never got to merging the
pipe-loader and inline-helpers before it was removed. There are no users
for it ATM.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
e23d63cffd6103b8073c61f2740eb654c5c9b2c3 17-Nov-2014 Christoph Bumiller <christoph.bumiller@speed.at> gallium/auxiliary: implement sw_probe_wrapped (v2)

Implement pipe_loader_sw_probe_wrapped which allows to use the wrapped
software renderer backend when using the pipe loader.

v2: - remove unneeded ifdef
- use GALLIUM_PIPE_LOADER_WINSYS_LIBS
- check for CALLOC_STRUCT
thanks to Emil Velikov

Acked-by: Jose Fonseca <jfonseca@vmware.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
36ff20027c43cd7115f1b6f073e4094582f643b6 17-May-2014 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: add pipe_loader_ops::configuration()

Required for the dri state-tracker. Will be used to retrieve
driver specific configuration parameters:
- share_fd (dmabuf) capability
- throttle

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
c650033b863c3ac8388ff1b192b476f63cf81202 09-May-2014 Tom Stellard <thomas.stellard@amd.com> pipe-loader: Don't destroy the winsys in the sw loader

The screen takes ownership of the winsys, and is responsible for
destroying it. Users of pipe-loader should make sure they destory
and screens they've created to avoid memory leaks.

This fixes a crash in clover introduced by
ce6c17c0833032e91a2d1b34f9eb80c738a854a2 where the pipe-loader was
destroying the winsys while a screen was still using it.

Cc: "10.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
5c6a1445d530d5c070d1c5288dddf59884c7fca8 01-Apr-2014 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: conditionally build and use pipe_loader_sw_probe_dri

The function relies on the sw/dri winsys which is build only when --enable-dri
is set. Fixes build issues with the following config

./configure --disable-dri --with-gallium-drivers=svga --enable-xa

Issue can be reproduced with any hw gallium driver + st that uses the pipe-loader.

Cc: Brian Paul <brianp@vmware.com>
Reported-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
3445e8bb921545f74e2b6a823d47fa29352e9262 22-Feb-2014 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: wrap pipe_loader_sw_probe_xlib within HAVE_PIPE_LOADER_XLIB

The above function implies using the the xlib winsys, which
has additional library dependencies that should not be forced.

Make the software xlib pipe loader optional thus avoid all
the dependency hell. A user that wishes to use the particular
pipe-loader would need to set the following within configure.ac.

enable_gallium_xlib_loader=yes

v2:
- Wrap sw/xlib/xlib_sw_winsys.h to handle compilation on systems
lacking X11 headers. Spotted by Christian Prochaska.

Tested-by: Tom Stellard <thomas.stellard@amd.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75356
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
dcbf404c0d1e9a40e0e75562e5112f53f95abe9d 10-Feb-2014 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: introduce pipe_loader_sw_probe_null helper function

v2: Handle null_sw_create failure, add missing function return type

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1)
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
969e8d15b77434a0505e883557529ed1073583a6 22-Feb-2014 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: introduce pipe_loader_sw_probe_dri helper

Will be used in the following commits.

v2: Link gallium tests against the library.
v3: Handle dri_create_sw_winsys failure
v4: Rebase on top of the targets/xa changes

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v2)
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
cc3aeacab64a6928a903f1dbfeaa7c880a8de5a6 10-Feb-2014 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: introduce pipe_loader_sw_probe_xlib helper

Will be used in the upcoming patches.

v2: handle xlib_create_sw_winsys failure, drop unneeded header

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1)
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
4f37e52f374b8b1d7177634dc09ab71e30e1779d 13-Feb-2014 Emil Velikov <emil.l.velikov@gmail.com> winsys/xlib: move xlib_create_sw_winsys within the winsys

v2: Rebase on top of vl_winsys_xsp.c removal
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1)
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
b4e8572bca60928c297e2b913ea1059aef104b98 10-Feb-2014 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: handle memory allocation failure

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
ed092a8e1f7006a57031299c5429a5952e5602e2 10-Feb-2014 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: destroy sw_winsys on sw_release

The sw pipe-loader implicitly handles winsys_create, thus we
it would make sense to implicitly destroy it upon releasing
the loader.

Currently we leak the sw_winsys when releasing the pipe-loader.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
877128505431adaf817dc8069172ebe4a1cdf5d8 17-Jan-2014 José Fonseca <jfonseca@vmware.com> s/Tungsten Graphics/VMware/

Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the
old copyright name is creating unnecessary confusion, hence this change.

This was the sed script I used:

$ cat tg2vmw.sed
# Run as:
#
# git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed
#

# Rename copyrights
s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g
/Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./
s/TUNGSTEN GRAPHICS/VMWARE/g

# Rename emails
s/alanh@tungstengraphics.com/alanh@vmware.com/
s/jens@tungstengraphics.com/jowen@vmware.com/g
s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/
s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g
s/keithw\?@tungstengraphics.com/keithw@vmware.com/g
s/michel@tungstengraphics.com/daenzer@vmware.com/g
s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/
s/zack@tungstengraphics.com/zackr@vmware.com/

# Remove dead links
s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g

# C string src/gallium/state_trackers/vega/api_misc.c
s/"Tungsten Graphics, Inc"/"VMware, Inc"/

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
a7653c19a3b1adae162864587a7ab1c17ab256e6 08-Nov-2013 Aaron Watry <awatry@gmail.com> pipe_loader/sw: close dev->lib when initialization fails

Prevents a memory leak.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

CC: "10.0" <mesa-stable@lists.freedesktop.org>
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
e1364530622a26f11c79694429cf84418a0b7ef7 25-Apr-2012 Francisco Jerez <currojerez@riseup.net> gallium: Add pipe loader for device enumeration and driver multiplexing.

The goal is to have a uniform interface to create winsys and
pipe_screen instances for any driver, exposing the device enumeration
capabilities that might be supported by the operating system (for now
there's a "drm" back-end using udev and a "sw" back-end that always
returns the same built-in devices).

The typical use case of this library will be:
>
> struct pipe_loader_device devs[n];
> struct pipe_screen *screen;
>
> pipe_loader_probe(&devs, n);
>[pick some device from the array...]
>
> screen = pipe_loader_create_screen(dev, library_search_path);
>[do something with screen...]
>
> screen->destroy(screen);
> pipe_loader_release(&devs, N);
>

A part of the code was taken from targets/gbm/pipe_loader.c, which
will be removed and replaced with calls into this library by a future
commit.
/external/mesa3d/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c