summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* vl/buffers: fixes vl_video_buffer_formats for RGBXJulien Isorce2015-12-041-1/+1
| | | | | | | | Fixes: 42a5e143a8d "vl/buffers: add RGBX and BGRX to the supported formats" Cc: [email protected] Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Emil Velikov <[email protected]> (cherry picked from commit 10c14919c82b0fd209500d3ecd5a8bbb2653a5a1)
* auxiliary/vl/dri: fd management cleanupsEmil Velikov2015-11-301-2/+5
| | | | | | | | | | | Analogous to previous commit, minus the extra dup. We are the one opening the device thus we can directly use the fd. Spotted by Coverity (CID 1339867, 1339877) Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> (cherry picked from commit 5d294d9fa3dcdf8453d97f35e2c799efa887cbcc)
* auxiliary/vl/drm: fd management cleanupsEmil Velikov2015-11-301-1/+7
| | | | | | | | | | Analogous to previous commit. Spotted by Coverity (CID 1339868) Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> (cherry picked from commit 151290c1548052fa4e4d625ba99ad63919467e96)
* pipe-loader: check if winsys.name is non-null prior to strcmpEmil Velikov2015-11-301-4/+4
| | | | | | | | | | | | | 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: [email protected] Signed-off-by: Emil Velikov <[email protected]> (cherry picked from commit 5f92906b876d5463efba3ffb19c1de0dcb3c755f)
* targets: use the non-inline sw helpersEmil Velikov2015-11-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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" <[email protected]> Cc: Ilia Mirkin <[email protected]> Cc: Edward O'Callaghan <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Tested-by: Oded Gabbay <[email protected]> Tested-by: Nick Sarnie <[email protected]> (cherry picked from commit 59cfb21d4670559d49a721df766073d9d288b51a) Squashed with commit targets/xvmc: use the non-inline sw helpers This was missed in commit 59cfb21d ("targets: use the non-inline sw helpers"). Fixes build failure: CXXLD libXvMCgallium.la ../../../../src/gallium/auxiliary/pipe-loader/.libs/libpipe_loader_static.a(libpipe_loader_static_la-pipe_loader_sw.o):(.data.rel.ro+0x0): undefined reference to `sw_screen_create' collect2: error: ld returned 1 exit status Makefile:756: recipe for target 'libXvMCgallium.la' failed make[3]: *** [libXvMCgallium.la] Error 1 Trivial. (cherry picked from commit 22d2dda03be32d23bc8e9f5823a4f2469737ddbe)
* target-hepers: add non inline sw helpersEmil Velikov2015-11-292-0/+83
| | | | | | | | | | | | | Feeling rather dirty copying the inline ones, yet we need the inline ones for swrast only targets like libgl-xlib, osmesa. Cc: "11.1" <[email protected]> Cc: Ilia Mirkin <[email protected]> Cc: Edward O'Callaghan <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Tested-by: Oded Gabbay <[email protected]> Tested-by: Nick Sarnie <[email protected]> (cherry picked from commit fbc6447c3d06d85a862df67aadb68333e2ea2431)
* pipe-loader: fix off-by one errorEmil Velikov2015-11-291-1/+1
| | | | | | | | | | | | | | | | | | 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: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93091 Reported-by: Tom Stellard <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Tested-by: Tom Stellard <[email protected]> Tested-by: Dieter Nützel <[email protected]> (cherry picked from commit f6235171882d18d0b4d11a3d564c6aa3b22af9d1)
* pipe-loader: link against libloader regardless of libdrm presenceEmil Velikov2015-11-291-2/+2
| | | | | | | | | | | | Whether or not the loader has libdrm support is up-to it. Anyone using the loader should just include it whenever they depend on it. Cc: [email protected] Fixes: 0f39f9cb7ad "pipe-loader: add a dummy 'static' pipe-loader" Reported-by: Jon TURNEY <[email protected]> Tested-by: Jon TURNEY <[email protected]> Signed-off-by: Emil Velikov <[email protected]> (cherry picked from commit 8a6d4765880a2c9000970b2b6e584291090b1dc3)
* vc4: Take precedence over ilo when in simulator mode.Eric Anholt2015-11-291-8/+12
| | | | | | | | | | | They're exclusive at build time, but the ilo entry is always present, so we'd try to use it and fail out. v2: Add comment in the code, from Emil. Cc: [email protected] Reviewed-by: Emil Velikov <[email protected]> (cherry picked from commit 1b62a4e885267c374dbbe5d5bb2c36515eee6a95)
* virgl: pipe_virgl_create_screen is not staticIgor Gnatenko2015-11-291-1/+1
| | | | | | | | | Cc: [email protected] Fixes: 17d3a5f8579 "target-helpers: add a non-inline drm_helper.h" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93063 Signed-off-by: Igor Gnatenko <[email protected]> Reviewed-by: Emil Velikov <[email protected]> (cherry picked from commit 05eed0eca71f8c35f315b3b0d7de30f3ff1878b4)
* util: use RTLD_LOCAL with util_dl_open()11.1-branchpointEmil Velikov2015-11-211-1/+1
| | | | | | | Otherwise we risk things blowing up due to conflicting symbols. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* auxiliary/vl: Don't close the drm fd on failureEmil Velikov2015-11-211-1/+1
| | | | | | | | | | | | | Ported from an identically named commit in st/xa commit 35cf3831d71770211f29da6608313dc1f6213d7b Author: Thomas Hellstrom <[email protected]> Date: Thu Jul 3 02:07:36 2014 -0700 st/xa: Don't close the drm fd on failure v2 Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* target-helpers: remove inline_drm_helper.hEmil Velikov2015-11-211-371/+0
| | | | | | | | | | As of earlier all the targets use the non inline version. Don't forget to remove the function prototypes/declarations. v2: rebase on top of virgl support. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* {auxiliary,targets}/vl: use static/dynamic pipe-loaderEmil Velikov2015-11-213-24/+1
| | | | | | | | | Analogous to previous commit. v2: rebase on top of vl_winsys_drm.c addition Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* {st,targets}/dri: use static/dynamic pipe-loaderEmil Velikov2015-11-212-52/+0
| | | | | | | | | | Covert DRI to use only the pipe-loader interface. With drisw_create_screen and kms_swrast_create_screen replaced by their pipe-loader equivalent, we can now drop them. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: add preliminary Android supportEmil Velikov2015-11-211-0/+49
| | | | | | | | | Add a 'static' pipe-loader build, which will be used with follow-up commits. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Chih-Wei Huang <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: add preliminary scons supportEmil Velikov2015-11-212-0/+36
| | | | | | | | Add a 'static' pipe-loader build, which will be used with follow-up commits. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: don't mix code and variable declarationsEmil Velikov2015-11-211-1/+2
| | | | | | | | We cannot use this C99 feature here quite yet, as the code needs to be build with MSVC prior to 2013. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* target-helpers: add a non-inline drm_helper.hEmil Velikov2015-11-211-0/+275
| | | | | | | | | | | | | | | | Unlike the inline ones, here we'd want to have an extern definition of the functions. This is required as with follow-up commits, we'll gradually start using the static pipe-loader, with the latter needing the symbols. These are direct copy from the inline version. v2: - rebase on top of virgl support - add "driver missing" printfs (Nicolai) Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* target-helpers: move the DRI specifics to the targetEmil Velikov2015-11-212-146/+0
| | | | | | | | | | Rather than having all targets include the file, with only some defining the relevant guard macro, just move things where they are used. v2: rebase on top of virgl support. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* automake: remove no longer needed HAVE_LOADER_GALLIUM conditionalEmil Velikov2015-11-211-4/+0
| | | | | | | | | | | | | | | | | As of last few commits we have a static and dynamic pipe-loader. Either of which will be used with (almost) all targets.. We can look into allowing the user to select which way the targets are built, be that 'static for all' or 'per target' in follow up commits. After which we can look into building only the static or dynamic version, although building both shouldn't cause any issues. Hack/workaround alert: Control the standalone pipe-drivers via HAVE_CLOVER. Will need to be fixed as the targets are converted/configure knobs are in. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: wire up the 'static' sw pipe-loaderEmil Velikov2015-11-211-0/+47
| | | | | | | | | | | | | 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 <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: wire up the 'static' drm pipe-loaderEmil Velikov2015-11-212-3/+161
| | | | | | | | | | | | | | Add a list of driver descriptors and select one from the list, during probe time. As we'll need to have all the driver pipe_foo_screen_create() functions provided externally (i.e. from another static lib) we need a separate (non-inline) drm_helper, which contains the function declarations. v2: rebase on top of virgl support. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: add a dummy 'static' pipe-loaderEmil Velikov2015-11-211-3/+20
| | | | | | | | | | | | It is to be used in contrast of the dynamic one. The state-tracker does not need to know if the pipe-driver is built into the final blob or a separate object. This will allow us to move the logic to the final step (in target) where the appropriate pipe-loader will be chosen. Cc: Tom Stellard <[email protected]> Cc: Francisco Jerez <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* gallium: rename libpipe_loader to libpipe_loader_dynamicEmil Velikov2015-11-211-4/+4
| | | | | | | | | With the next commits we'll introduce a 'static' version, which will essentially load the statically linked-in pipe-drivers, rather than the standalone pipe-$foo.so ones. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: dlopen/dlsym the pipe-driver at probe timeEmil Velikov2015-11-211-27/+17
| | | | | | | | | | | Rather than giving false hopes that things might work, just check at probe time. This allows us to remove the duplication and consolidate the code wrt the upcomming static pipe-loader. Cc: Tom Stellard <[email protected]> Cc: Francisco Jerez <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: annotate the ops as const dataEmil Velikov2015-11-212-4/+4
| | | | | | | | | Already defined as such in struct pipe_loader_device::ops. Cc: Tom Stellard <[email protected]> Cc: Francisco Jerez <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: teardown the winsys, if create_screen failsEmil Velikov2015-11-211-1/+6
| | | | | | | | i.e. plug some (hard to hit) memory leaks. v2: fix rebase fallout - really teardown the winsys (Brian) Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: rework the sw backendEmil Velikov2015-11-211-36/+91
| | | | | | | | | | | | 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 <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: directly use pipe_loader_sw_probe_null() at probe timeEmil Velikov2015-11-211-13/+4
| | | | | | | | | | | 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 <[email protected]> Cc: Francisco Jerez <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: add pipe_loader_sw_probe_init_common() helperEmil Velikov2015-11-211-20/+18
| | | | | | | | | Allows us to fold the duplication in pipe_loader_sw_probe_*(). Cc: Tom Stellard <[email protected]> Cc: Francisco Jerez <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* gallium: remove library_path argument from pipe_loader_create_screen()Emil Velikov2015-11-219-23/+13
| | | | | | | | | | | | | | | 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 <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: remove HAVE_DRM_LOADER_GALLIUM and HAVE_PIPE_LOADER_DRMEmil Velikov2015-11-212-2/+2
| | | | | | | | | | | ... in favour of HAVE_LIBDRM. After all we solely want to build the code when the latter is available. In the not too distant future we will remove the libudev/sysfs dependency and simplify configure.ac even further. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: add pipe_loader_sw_probe_kms() implementationEmil Velikov2015-11-212-0/+34
| | | | | | | | Will be used as a counterpart for target-helpers' kms_swrast_create_screen(). Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* targets/nine: use the existing sw_screen_wrap() over our custom versionEmil Velikov2015-11-211-27/+0
| | | | | | Cc: Axel Davy <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* automake: use GALLIUM_PIPE_LOADER_DEFINES only where applicableEmil Velikov2015-11-211-1/+0
| | | | | | | | As of last commit we no longer need the defines in order to have the function prototypes. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: remove HAVE_PIPE_LOADER_foo function prototype guardsEmil Velikov2015-11-211-8/+0
| | | | | | | | | | They serve little to no purpose, as we don't need any additional dependencies (headers and/or symbols). On the other hand dropping them will allow us to use GALLIUM_PIPE_LOADER_DEFINES in only one single place - the pipe-loader. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* ttn: add TEX2 supportIlia Mirkin2015-11-201-3/+11
| | | | | | | | | This fixes CubeArrayShadow tests (where the shadow comes in via a second arg to the TEX2 instruction). Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]> Cc: [email protected]
* gallium/hud: add support for batch queriesNicolai Hähnle2015-11-203-46/+261
| | | | | | | v2 + v3: be more defensive about allocations Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Samuel Pitoiset <[email protected]>
* gallium/hud: remove unused field in query_infoNicolai Hähnle2015-11-201-1/+0
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Samuel Pitoiset <[email protected]>
* gallivm: use sampler index 0 for texel fetchesRoland Scheidegger2015-11-201-1/+6
| | | | | | | | | | | | | texel fetches don't use any samplers. Previously we just set the same number for both texture and sampler unit (as per "ordinary" gl style sampling where the numbers are always the same) however this would trigger some assertions checking that the sampler index isn't over PIPE_MAX_SAMPLERS limit elsewhere with d3d10, so just set to 0. (Fixing the assertion instead isn't really an option, the sampler isn't really used but might still pass an out-of-bound pointer around and even copy some things from it.) Reviewed-by: Jose Fonseca <[email protected]>
* auxiliary/vl/dri2: coding style fixesEmil Velikov2015-11-202-22/+34
| | | | | | | Rewrap long(ish) lines, add space between struct foo and *. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/dri2: hide internal functionsEmil Velikov2015-11-202-34/+20
| | | | | | | | Analogous to previous commit. While we're here prefix all functions identically -> vl_dri2_foo Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/drm: hide internal functionsEmil Velikov2015-11-202-5/+5
| | | | | | | | As of last commit everyone is using the vl_screen dispatch, thus we can hide this function from the headers and make it static. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/dri2: setup the dispatchEmil Velikov2015-11-202-8/+15
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/drm: use a label for the error pathEmil Velikov2015-11-201-6/+10
| | | | | | | ... just like every other place in gallium. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/drm: setup the dispatchEmil Velikov2015-11-201-0/+6
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl: add dispatch tableEmil Velikov2015-11-201-0/+17
| | | | | | | | As mentioned previously, it will allow us to use different vl backend in a generic way from either video state-tracker. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl: rename vl_screen_create to vl_dri2_screen_createEmil Velikov2015-11-202-4/+4
| | | | | | | | | | | In a preparation of having proper multi-platform/backend handling in VL. With follow up commits we'll introduce a dispatch within vl_screen similar to the one in pipe_screen. This way any VL state-tracker can operate seamlessly, considering the backend/platform is properly setup. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* os: check for GALLIUM_PROCESS_NAME to override os_get_process_name()Brian Paul2015-11-191-18/+29
| | | | | | | Useful for debugging and for glretrace. Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>