summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau
Commit message (Collapse)AuthorAgeFilesLines
* Revert "st/vdpau: use linear layout for output surfaces"Dave Airlie2016-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d180de35320eafa3df3d76f0e82b332656530126. This is a radeon specific hack that causes problems on nouveau when combined with the SHARED flag later. If radeonsi needs a fix for this, please fix it in the driver. [chk] Using linear surfaces for this makes sense because tilling isn't beneficial and the surfaces can potentially be shared with other GPUs using the VDPAU OpenGL interop. [airlied] I think we need a flag that isn't SHARED/LINEAR that is more SHARED_OTHER_GPU. [mareko] Does radeonsi need PIPE_BIND_VIDEO_DECODE_OUTPUT that it would translate into linear ? [mareko] My only concern is decoding performance. If the decoder works in 64x1 blocks, tiling will hurt. That's the theory. I don't know how the decoder works. Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Tested-by: Ilia Mirkin <imirkin@alum.mit.edu> Tested-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> (I+A) (cherry picked from commit d0d5f7600c2e8ab8d0c153787185f7a534753edd)
* st/vdpau: flush the context before calling flush_frontbufferNayan Deshmukh2016-09-201-2/+5
| | | | | | | | | | so that the texture is rendered to back buffer before calling flush_frontbuffer and can be copied to a different buffer in the function Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* st/vdpau: fix argument type to vlVdpOutputSurfaceDMABufIlia Mirkin2016-09-201-1/+1
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/vdpau: use temporary buffers while applying filtersNayan Deshmukh2016-08-291-18/+57
| | | | | | | | | | | Use temporary buffers so that we don't read and write to the same surface at the same time. We don't need to use linear layout now. v2: rebase the patch against reverted change Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/vdpau: Revert "change the order in which filters are applied(v3)"Christian König2016-08-291-18/+10
| | | | | | | | | | This reverts commit 09dff7ae2e179d5a3490481762c6bd3d50430c9f. Turned out this can cause some artifacts in the output. Let's revert it for now until we have sorted out all issues. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Nayan Deshmukh <nayan26deshmukh@gmail.com>
* gallium: add a pipe_context parameter to resource_get_handleMarek Olšák2016-08-252-2/+4
| | | | | | | | radeonsi needs to do some operations (DCC decompression) for OpenGL-OpenCL interop and this is the only way to make it coherent with the current context. It can optionally be set to NULL. Reviewed-by: Brian Paul <brianp@vmware.com>
* st/vdpau: change the order in which filters are applied(v3)Nayan Deshmukh2016-08-161-10/+18
| | | | | | | | | | | | | | Apply the median and matrix filter before the compostioning we apply the deinterlacing first to avoid the extra overhead in processing the past and the future surfaces in deinterlacing. v2: apply the filters on all the surfaces (Christian) v3: use get_sampler_view_planes() instead of get_sampler_view_components() and iterate over VL_MAX_SURFACES (Christian) Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* gallium: add a pipe_context parameter to fence_finishMarek Olšák2016-08-101-2/+2
| | | | | | | | 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>
* gallium: add render_condition_enable param to clear_render_target/depth_stencilMarek Olšák2016-08-101-1/+1
| | | | | Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* gallium: split transfer_inline_write into buffer and texture callbacksMarek Olšák2016-07-233-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | to reduce the call indirections with u_resource_vtbl. The worst call tree you could get was: - u_transfer_inline_write_vtbl - u_default_transfer_inline_write - u_transfer_map_vtbl - driver_transfer_map - u_transfer_unmap_vtbl - driver_transfer_unmap That's 6 indirect calls. Some drivers only had 5. The goal is to have 1 indirect call for drivers that care. The resource type can be determined statically at most call sites. The new interface is: pipe_context::buffer_subdata(ctx, resource, usage, offset, size, data) pipe_context::texture_subdata(ctx, resource, level, usage, box, data, stride, layer_stride) v2: fix whitespace, correct ilo's behavior Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Acked-by: Roland Scheidegger <sroland@vmware.com>
* st/vdpau: use bicubic filter for scaling(v6.1)Nayan Deshmukh2016-07-013-14/+106
| | | | | | | | | | | | | | | | | | use bicubic filtering as high quality scaling L1. v2: fix a typo and add a newline to code v3: -render the unscaled image on a temporary surface (Christian) -apply noise reduction and sharpness filter on unscaled surface -render the final scaled surface using bicubic interpolation v4: support high quality scaling v5: set dst_area and dst_clip in bicubic filter v6: set buffer layer before setting dst_area v6.1: add PIPE_BIND_LINEAR when creating resource Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/vdpau: we support lumakeying nowChristian König2016-06-161-0/+1
| | | | Signed-off-by: Christian König <christian.koenig@amd.com>
* st/vdpau: replace 0.f and 1.f with 0.0f and 1.0f respectivelyNayan Deshmukh2016-06-142-8/+8
| | | | | Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/vdpau: implement luma keyingNayan Deshmukh2016-06-092-12/+39
| | | | | Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* vl: Apply luma key filter before CSC conversionNayan Deshmukh2016-06-092-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* st/vdpau: check for null pointer in get/put bits.Nayan Deshmukh2016-06-022-0/+12
| | | | | | | | Check for null pointer before accessing arrays in get/put bits native/YCbCr/Indexed in VdpOutputSurface and VdpVideoSurface. Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* Treewide: Remove Elements() macroJan Vesely2016-05-171-3/+3
| | | | | Signed-off-by: Jan Vesely <jano.vesely@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* st/vdpau: add dri3 supportLeo Liu2016-05-161-1/+5
| | | | | | Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* gallium: merge PIPE_SWIZZLE_* and UTIL_FORMAT_SWIZZLE_*Marek Olšák2016-04-221-12/+12
| | | | | | | | 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>
* st/vdpau: correct null checkThomas Hindoe Paaboel Andersen2016-03-301-4/+4
| | | | | | | The null check of result was the wrong way around. Also, move memset and dereference of result after the null check. Reviewed-by: Christian König <christian.koenig@amd.com>
* st/vdpau: implement the new DMA-buf based interop v2Christian König2016-03-294-3/+116
| | | | | | | | | That should allow us to get away from passing internal structures around. v2: rebased Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* st/vdpau: move FormatRGBAToPipe into the interopChristian König2016-03-294-28/+8
| | | | | | | We are going to need that in the Mesa state tracker as well. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* st/vdpau: use linear layout for output surfacesChristian König2016-03-291-1/+2
| | | | | | | | Works around a bug in radeonsi and tiling is actually not very beneficial in this use case. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* st/vdpau: use vl_video_buffer_adjust_sizeChristian König2016-01-121-10/+3
| | | | | | | Use the new helper function instead of open coding it. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* gallium: Remove unnecessary semicolonsEdward O'Callaghan2016-01-061-1/+1
| | | | | | | | | Fix silly issue with MSVC case fall-though support to need a extra 'break;' Found-by: Coccinelle Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* st/vdpau: use the vl_screen dispatchEmil Velikov2015-11-202-11/+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>
* st/vdpau: disable RefPicList for Vdpau HEVCBoyuan Zhang2015-10-271-0/+1
| | | | | | Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@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>
* st/vdpau: add HEVC support v2Christian König2015-08-142-3/+139
| | | | | | | v2: fix return code Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* st/vdpau: fix mixer size checksChristian König2015-07-091-11/+11
| | | | | | | | We need to check what the 3D pipe is able to handle for the mixer, not what the decoder is able to decode. This fixes output of resolutions like 720x1280. Signed-off-by: Christian König <christian.koenig@amd.com> CC: mesa-stable@lists.freedesktop.org
* gallium: use fence_finish instead of fence_signalled in state trackersMarek Olšák2015-07-051-1/+1
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* st/vdpau: add h264 decoder level supportLeo Liu2015-04-281-0/+5
| | | | | Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* Fix a few typosZoë Blade2015-04-271-1/+1
| | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* automake: rework VL dependency trackingEmil Velikov2014-11-261-0/+1
| | | | | | | | | | | | | | | 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/vdpau: move common functions to utilLeo Liu2014-10-011-77/+4
| | | | | | | | Break out these functions so that they can be shared with a other state trackers. They will be used in subsequent patches for the new VA-API state tracker. Signed-off-by: Leo Liu <leo.liu@amd.com>
* vdpau: unlock the mutex on error paths in attribute setting.Dave Airlie2014-09-031-12/+26
| | | | | | | | Coverity pointed out we never dropped the lock here, so fix it by using a common exit path. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* st/vdpau: pickup/ship the private headerEmil Velikov2014-08-281-8/+9
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/vdpau: remove obsolete define VL_HANDLESEmil Velikov2014-08-282-21/+5
| | | | | | | | | | This define is always set and it had no real purpose according to git log. Seems like it is a leftover from the vl/vdpau prototype stage. Cc: Christian König <christian.koenig@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/vdpau: fix vlVdpOutputSurfaceRender(Output|Bitmap)SurfaceChristian König2014-08-263-15/+71
| | | | | | | | | | Correctly handle that the source_surface is only optional. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80561 Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: mesa-stable@lists.freedesktop.org
* st/vdpau: add device reference countingChristian König2014-08-148-11/+46
| | | | | | | | | | This fixes an issue with flash where it tries to destroy a decoder after already destroying the device associated with the decoder. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=82517 Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
* gallium: rename R4A4 and A4R4 formats to match their swizzleMarek Olšák2014-03-071-2/+2
| | | | | | Like L4A4. Reviewed-by: Brian Paul <brianp@vmware.com>
* st/vdpau: Add rotation v2Kusanagi Kouichi2014-03-071-0/+6
| | | | | | | v2: add static asserts Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/vdpau: fix possible NULL dereferenceGrigori Goronzy2014-03-031-4/+4
| | | | Reviewed-by: Christian König <christian.koenig@amd.com>
* st/vdpau: add support for DEINTERLACE_TEMPORALGrigori Goronzy2014-02-143-4/+73
| | | | Reviewed-by: Christian König <christian.koenig@amd.com>
* st/vdpau: automake: export only PUBLIC symbolsEmil Velikov2014-02-111-0/+1
| | | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/vdpau: do not export VdpPresentationQueueTargetCreateX11Emil Velikov2014-02-112-2/+4
| | | | | | | | | The function pointer is retrieved via VdpGetProcAddress just like all the other vdpau functions and should not be exported. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* vdpau: flush the context before exporting the surface v2Marek Olšák2014-02-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Bugzilla (bug needs XBMC changes as well): https://bugs.freedesktop.org/show_bug.cgi?id=73191 When VL uploads vertex buffers, it uses PIPE_TRANSFER_DONTBLOCK, which always flushes the context in the winsys if the buffer being mapped is busy. Since I added handling of DISCARD_RANGE, DONTBLOCK has had no effect when combined with DISCARD_RANGE and I think the context isn't flushed anywhere else, so no commands are submitted to the GPU until the IB is full, which takes a lot of frames. Using DISCARD_RANGE is not the only way to trigger this bug. The other way is to reallocate the vertex buffer before every upload. BTW, I'm not sure if this is the right place for flushing, but it does fix the bug. v2 (chk): move the flush to the right place. Signed-off-by: Christian König <christian.koenig@amd.com> Tested-by: StrangeNoises (rachel@strangenoises.org)
* gallium: remove PIPE_USAGE_STATICMarek Olšák2014-02-062-2/+2
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* st/vdpau: s/surface/resource/ to fix compiler warningBrian Paul2014-01-201-1/+1
| | | | Reviewed-by: Christian König <christian.koenig@amd.com>