summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/xvmc
Commit message (Collapse)AuthorAgeFilesLines
* st/xvmc/tests: force enable assertionsEmil Velikov2016-10-061-0/+2
| | | | | | | | | | Similar to the other 'tests', enable assertions in xvmc_bench. This silences the GCC warnings about unused-variable(s), makes the program actually useful, as the XvMC API called. Atm the function calls are omitted, since they're called within the assert. Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* st/xvmc: fix a couple 'unused-but-set-variable' warningsEric Engestrom2016-08-241-2/+3
| | | | | | Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* gallium: add a pipe_context parameter to fence_finishMarek Olšák2016-08-101-1/+1
| | | | | | | | required by glClientWaitSync (GL 4.5 Core spec) that can optionally flush the context Reviewed-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* vl: Apply luma key filter before CSC conversionNayan Deshmukh2016-06-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply the luma key filter to the YCbCr values during the CSC conversion in video buffer shader. The initial values of max and min luma are set to opposite values to disable the filter initially and will be set when enabling it. Add extra parmeters min and max luma for the luma key filter in vl_compositor_set_csc_matrix in va, xvmc. Setting them to opposite value 1.f and 0.f respectively won't effect the CSC conversion v2: -Squash 1,2 and 3 into one patch to avoid breaking build of other components. (Christian) -use ureg_swizzle. (Christian) -change name of the variables. (Christian) v3: -Squash all patches in one to avoid breaking of build. (Emil) -wrap functions properly. (Emil) -use 0.0f and 1.0f instead of 0.f and 1.f respectively. (Emil) v4: -Divide it in two patches one which introduces the functionality and assigs dummy values to the changed functions and second which implements the lumakey filter. (Christian) -use ureg_scalar instead ureg_swizzle. (Christian) Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* gallium: merge PIPE_SWIZZLE_* and UTIL_FORMAT_SWIZZLE_*Marek Olšák2016-04-221-1/+1
| | | | | | | | Use PIPE_SWIZZLE_* everywhere. Use X/Y/Z/W/0/1 instead of RED, GREEN, BLUE, ALPHA, ZERO, ONE. The new enum is called pipe_swizzle. Acked-by: Jose Fonseca <jfonseca@vmware.com>
* xvmc: force assertion in XvMC testsGiuseppe Bilotta2015-12-045-0/+10
| | | | | | | | | | | | | | | This follows the src/util/u_atomic_test.c model of undefining NDEBUG unconditionally throughouth the XvMC tests, to force asserts regardless of debug mode. The comment on u_atomic_test.c is also fixed (read 'debug' where it should have been 'release'). v2: s/debug/release/ in relevant comments Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> [Emil Velikov: keep the src/util/ hunk as separate patch] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/xvmc: use the vl_screen dispatchEmil Velikov2015-11-202-12/+11
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
* auxiliary/vl: rename vl_screen_create to vl_dri2_screen_createEmil Velikov2015-11-201-1/+1
| | | | | | | | | | | 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 <emil.l.velikov@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
* gallium: add flags parameter to pipe_screen::context_createMarek Olšák2015-08-261-1/+1
| | | | | | | | This allows creating compute-only and debug contexts. Reviewed-by: Brian Paul <brianp@vmware.com> Acked-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
* gallium: replace INLINE with inlineIlia Mirkin2015-07-211-1/+1
| | | | | | | | | | | | | | | | Generated by running: git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g' git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g' git checkout src/gallium/state_trackers/clover/Doxyfile and manual edits to src/gallium/include/pipe/p_compiler.h src/gallium/README.portability to remove mentions of the inline define. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Marek Olšák <marek.olsak@amd.com>
* gallium: use fence_finish instead of fence_signalled in state trackersMarek Olšák2015-07-051-1/+1
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Enable subdir-objects globally.Matt Turner2015-06-261-1/+0
| | | | Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/xvmc: Fix compiler warningsJan Vesely2014-12-033-6/+6
| | | | | | | Mostly signed/unsigned comparison Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Christian König <christian.koenig@amd.com>
* automake: rework VL dependency trackingEmil Velikov2014-11-261-1/+3
| | | | | | | | | | | | | | | Set a single VL_{CFLAG,LIBS} for xcb and friends, and let each target check for it's relevant library alone. Required as with follow up commits we'll build aux/vl into a separate module, which needs VL_CFLAGS Cleanup add a couple of explicit LIBDRM_LIBS linking, as aux/vl itself requires libdrm, despite that LIBDRM_{RADEON,NOUVEAU...} may provide it as well. v2: Rebase. Make sure st/xvmc programs work. Cc: Christian König <christian.koenig@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/xvmc/tests: avoid non portable error.h functionsJonathan Gray2014-09-055-13/+22
| | | | | | | To improve compatibility with OpenBSD. Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* xvmc/tests: %C isn't a valid printf specifier.Dave Airlie2014-09-021-2/+2
| | | | | | Reported-by: Coverity scanner. Signed-off-by: Dave Airlie <airlied@redhat.com>
* st/xvmc: pick up the headers for distributionEmil Velikov2014-08-282-2/+5
| | | | | | | - autotools/make will pick them up in the tarball. - Sort the list alphabetically. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/xvmc: automake: move tests to noinstEmil Velikov2014-08-281-3/+4
| | | | | | | | | | | | All the tests require an installed and setup XvMC, thus they are not good candidates for 'make check'. Keep them around as the user might want to actually test the implementation post installation/setup. Cc: Ilia Mirkin <imirkin@alum.mit.edu> Cc: Tom Stellard <thomas.stellard@amd.com> Cc: Christian König <christian.koenig@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* gallium: rename R4A4 and A4R4 formats to match their swizzleMarek Olšák2014-03-071-3/+3
| | | | | | Like L4A4. Reviewed-by: Brian Paul <brianp@vmware.com>
* st/xvmc: fix tests so that they passIlia Mirkin2014-02-163-10/+12
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Christian König <christian.koenig@amd.com>
* gallium: remove PIPE_USAGE_STATICMarek Olšák2014-02-061-1/+1
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-1714-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* swrast* (gallium, classic): add MESA_copy_sub_buffer support (v3)Dave Airlie2013-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This patches add MESA_copy_sub_buffer support to the dri sw loader and then to gallium state tracker, llvmpipe, softpipe and other bits. It reuses the dri1 driver extension interface, and it updates the swrast loader interface for a new putimage which can take a stride. I've tested this with gnome-shell with a cogl hacked to reenable sub copies for llvmpipe and the one piglit test. I could probably split this patch up as well. v2: pass a pipe_box, to reduce the entrypoints, as per Jose's review, add to p_screen doc comments. v3: finish off winsys interfaces, add swrast classic support as well. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com> swrast: add support for copy_sub_buffer
* st/xvmc: enable automake subdir-objectsEmil Velikov2013-11-161-0/+1
| | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/xvmc: consolidate C sources list into Makefile.sourcesEmil Velikov2013-10-012-6/+8
| | | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/xvmc: Include u_surface.h for u_copy_rect.Vinson Lee2013-09-301-0/+1
| | | | | | | | | | | | | | | This patch fixes the build error introduced with commit 81bb98e928861260170c16f5c3e0d80492251d6b. CC subpicture.lo subpicture.c: In function 'upload_sampler': subpicture.c:181:4: error: implicit declaration of function 'util_copy_rect' [-Werror=implicit-function-declaration] subpicture.c: In function 'XvMCClearSubpicture': subpicture.c:304:21: error: storage size of 'uc' isn't known subpicture.c:328:4: error: implicit declaration of function 'util_fill_rect' [-Werror=implicit-function-declaration] subpicture.c:304:21: warning: unused variable 'uc' [-Wunused-variable] Signed-off-by: Vinson Lee <vlee@freedesktop.org>
* st/xvmc: exit gracefully if we fail to create video bufferEmil Velikov2013-08-191-0/+4
| | | | | | | | Free any allocated memory and return BadAlloc if create_video_buffer() has failed to create a buffer. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* vl: add entrypoint to get_video_paramChristian König2013-08-192-2/+5
| | | | Signed-off-by: Christian König <christian.koenig@amd.com>
* vl: rename pipe_video_decoder to pipe_video_codecChristian König2013-08-194-8/+8
| | | | Signed-off-by: Christian König <christian.koenig@amd.com>
* vl: rename enum pipe_video_codec to pipe_video_formatChristian König2013-08-191-1/+1
| | | | Signed-off-by: Christian König <christian.koenig@amd.com>
* vl: use a template for create_video_decoderChristian König2013-08-191-8/+10
| | | | Signed-off-by: Christian König <christian.koenig@amd.com>
* st/xvmc/tests: avoid non portable error.h functionsJonathan Gray2013-07-111-5/+8
| | | | | Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/xvmc/tests: Fix build failure, v2Lauri Kasanen2013-05-031-1/+1
| | | | | | | | | v2: Removed extra libs as requested by Matt Turner. Signed-off-by: Lauri Kasanen <cand@gmx.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
* vl/compositor: cleanup background clearingChristian König2013-05-011-1/+1
| | | | | | Add an extra parameter to specify if we should clear the render target. Signed-off-by: Christian König <christian.koenig@amd.com>
* st/xvmc/tests: Ensure colorkey is initialized.Vinson Lee2013-02-221-0/+4
| | | | | | | Fixes uninitialized scalar variable defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Christian König <christian.koenig@amd.com>
* Remove hacks for static MakefilesMatt Turner2013-01-131-6/+0
| | | | | | | | | | | v2: Andreas Boll <andreas.boll.dev@gmail.com> - don't remove compatibility with scripts for the old build system v3: Andreas Boll <andreas.boll.dev@gmail.com> - remove more obsolete hacks v4: Andreas Boll <andreas.boll.dev@gmail.com> - add a previously removed TOP variable to fix vgapi build
* Clean up .gitignore filesMatt Turner2013-01-101-1/+0
|
* state_trackers/xvmc/test: Convert to automakeMatt Turner2013-01-104-31/+25
|
* state_trackers/xvmc: Convert to automakeMatt Turner2013-01-103-14/+43
|
* gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flagMarek Olšák2013-01-041-1/+1
| | | | | | | | | | | | | | | | | Usage with pipe_context: pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME); Usage with st_context_iface: st->flush(st, ST_FLUSH_END_OF_FRAME, NULL); The flag is only a hint for drivers. Radeon will use it for buffer eviction heuristics in the kernel (e.g. for queries like how many frames have passed since a buffer was used). The flag is currently only generated by st/dri on SwapBuffers. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
* gallium: remove pipe_surface::usageMarek Olšák2012-12-121-1/+0
| | | | | | Not really used by anybody now. Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium: unify transfer functionsMarek Olšák2012-10-111-22/+13
| | | | | | | | | | | | | | "get_transfer + transfer_map" becomes "transfer_map". "transfer_unmap + transfer_destroy" becomes "transfer_unmap". transfer_map must create and return the transfer object and transfer_unmap must destroy it. transfer_map is successful if the returned buffer pointer is not NULL. If transfer_map fails, the pointer to the transfer object remains unchanged (i.e. doesn't have to be NULL). Acked-by: Brian Paul <brianp@vmware.com>
* Remove useless checks for NULL before freeingMatt Turner2012-09-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + free (E); + E = NULL; - if (unlikely (E != NULL)) { - free(E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; type T; @@ + free ((T) E); + E = NULL; - if (unlikely (E != NULL)) { - free((T) E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; @@ + free (E); - if (unlikely (E != NULL)) { - free (E); - } @@ expression E; type T; @@ + free ((T) E); - if (unlikely (E != NULL)) { - free ((T) E); - } Reviewed-by: Brian Paul <brianp@vmware.com>
* Remove Xcalloc/Xmalloc/Xfree callsMatt Turner2012-09-054-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These calls allowed Xlib to use a custom memory allocator, but Xlib has used the standard C library functions since at least its initial import into git in 2003. It seems unlikely that it will grow a custom memory allocator. The functions now just add extra overhead. Replacing them will make future Coccinelle patches simpler. This patch has been generated by the following Coccinelle semantic patch: // Remove Xcalloc/Xmalloc/Xfree calls @@ expression E1, E2; @@ - Xcalloc (E1, E2) + calloc (E1, E2) @@ expression E; @@ - Xmalloc (E) + malloc (E) @@ expression E; @@ - Xfree (E) + free (E) @@ expression E; @@ - XFree (E) + free (E) Reviewed-by: Brian Paul <brianp@vmware.com>
* vl: move winsys helper out of winsys directoryChristian König2012-03-284-8/+4
| | | | | | | | | They aren't winsys of their own, just help dealing with them. v2: add some more comments in vl_winsys.h Signed-off-by: Christian König <deathsimple@vodafone.de>
* vl/csc: simplify matrix handlingChristian König2012-03-022-6/+6
| | | | | | A csc matrix is only 4x3 not 4x4, also define a VDPAU compatible type for it. Signed-off-by: Christian König <deathsimple@vodafone.de>
* vl/compositor: add support for per layer dst areasChristian König2012-03-021-1/+2
| | | | Signed-off-by: Christian König <deathsimple@vodafone.de>
* vl/compositor: add per vertex color suportChristian König2012-03-021-1/+1
| | | | | | Used in subtitles, for example. Signed-off-by: Christian König <deathsimple@vodafone.de>
* vl/compositor: replace pipe_video_rect with u_rectChristian König2012-03-023-6/+6
| | | | | | So we support things like flipping also. Signed-off-by: Christian König <deathsimple@vodafone.de>
* vl/compositor: split shaders and stateChristian König2012-03-024-7/+23
| | | | Signed-off-by: Christian König <deathsimple@vodafone.de>