[Mesa-dev] [PATCH 2/5] applegl: Provide requirements of _SET_DrawBuffers

2015-06-17 Thread Julien Isorce
From: Jon TURNEY _SET_DrawBuffers requires driDispatchRemapTable, so we need to link with libmesa for remap.c. libmesa requires the C++ linker. Also need to arrange to call _mesa_init_remap_table() to initialize the remap table. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90311 Signe

[Mesa-dev] [PATCH 5/5] osx: fix asm support on darwin

2015-06-17 Thread Julien Isorce
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90908 Signed-off-by: Julien Isorce --- configure.ac | 2 +- src/mesa/x86-64/xform4.S | 53 +--- src/mesa/x86/assyntax.h | 2 +- 3 files changed, 30 insertions(+), 27 deletions

[Mesa-dev] [PATCH 1/5] darwin: Suppress type conversion warnings for GLhandleARB

2015-06-17 Thread Julien Isorce
From: Jon TURNEY On darwin, GLhandleARB is defined as a void *, not the unsigned int it is on linux. For the moment, apply a cast to supress the warning Possibly this is safe, as for the mesa software renderer the shader program handle is not a real pointer, but a integer handle Probably this

[Mesa-dev] [PATCH 4/5] egl: use unix defines on osx with clang

2015-06-17 Thread Julien Isorce
=90249 Signed-off-by: Julien Isorce --- include/EGL/eglplatform.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h index 7802542..b376e64 100644 --- a/include/EGL/eglplatform.h +++ b/include/EGL/eglplatform.h @@ -77,7

[Mesa-dev] [PATCH 3/5] egl/dri2: load libglapi.0.dylib on osx

2015-06-17 Thread Julien Isorce
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90903 Signed-off-by: Julien Isorce --- src/egl/drivers/dri2/egl_dri2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index a1cbd43..90b9648 100644 --- a/src/egl

Re: [Mesa-dev] [PATCH 1/5] darwin: Suppress type conversion warnings for GLhandleARB

2015-06-18 Thread Julien Isorce
s.org/opengles/sdk/docs/man/xhtml/glBindAttribLocation.xml ) What is the purpose of src/mapi/glapi/gen/ARB_robustness.xml ? Thx Julien On 18 June 2015 at 19:16, Emil Velikov wrote: > On 18 June 2015 at 06:53, Julien Isorce wrote: > > From: Jon TURNEY > > > > On darwin, GLhand

Re: [Mesa-dev] [PATCH 2/5] applegl: Provide requirements of _SET_DrawBuffers

2015-06-18 Thread Julien Isorce
, Emil Velikov wrote: > On 18 June 2015 at 06:53, Julien Isorce wrote: > > From: Jon TURNEY > > > > _SET_DrawBuffers requires driDispatchRemapTable, > > so we need to link with libmesa for remap.c. > > libmesa requires the C++ linker. > > > > Also n

Re: [Mesa-dev] [PATCH 3/5] egl/dri2: load libglapi.0.dylib on osx

2015-06-18 Thread Julien Isorce
On 18 June 2015 at 19:29, Emil Velikov wrote: > On 18 June 2015 at 06:53, Julien Isorce wrote: > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90903 > > Signed-off-by: Julien Isorce > > --- > > src/egl/drivers/dri2/egl_dri2.c | 2 ++ > > 1 file chan

Re: [Mesa-dev] [PATCH 4/5] egl: use unix defines on osx with clang

2015-06-18 Thread Julien Isorce
On 18 June 2015 at 19:33, Emil Velikov wrote: > On 18 June 2015 at 19:29, Emil Velikov wrote: > Sorry about that. Unintentionally hit send ;-\ > > > On 18 June 2015 at 06:53, Julien Isorce wrote: > >> CC egl_dri2.lo > >> include/EGL/eglplatform.h:1

Re: [Mesa-dev] [PATCH 5/5] osx: fix asm support on darwin

2015-06-18 Thread Julien Isorce
On 18 June 2015 at 19:46, Emil Velikov wrote: > On 18 June 2015 at 06:53, Julien Isorce wrote: > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90908 > > Signed-off-by: Julien Isorce > > --- > > configure.ac | 2 +- > &g

[Mesa-dev] [PATCH] loader: move loader_open_device out of HAVE_LIBUDEV block

2015-06-23 Thread Julien Isorce
ot;, referenced from: _dri2_initialize_x11_dri2 in libegl_dri2.a(platform_x11.o) https://bugs.freedesktop.org/show_bug.cgi?id=91077 Signed-off-by: Julien Isorce --- src/loader/loader.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/l

Re: [Mesa-dev] [PATCH 1/5] darwin: Suppress type conversion warnings for GLhandleARB

2015-06-25 Thread Julien Isorce
On 19 June 2015 at 10:24, Jose Fonseca wrote: > On 19/06/15 04:46, Ian Romanick wrote: > >> On 06/17/2015 10:53 PM, Julien Isorce wrote: >> >>> From: Jon TURNEY >>> >>> On darwin, GLhandleARB is defined as a void *, not the unsigned int it >>

[Mesa-dev] [PATCH v2] darwin: Suppress type conversion warnings for GLhandleARB

2015-06-30 Thread Julien Isorce
Note that the value will be preserved when casting back to GLuint. When GLhandleARB appears as a pointer there are also separate entry-points, i.e. _mesa_FuncNameARB. So the same logic can be applied. https://bugs.freedesktop.org/show_bug.cgi?id=66346 Signed-off-by: Julien Isorce --- con

[Mesa-dev] [PATCH v2] egl: use unix defines on osx with clang

2015-07-02 Thread Julien Isorce
From: Julien Isorce I also created an bug in Khronos 's bugzilla as you suggested: https://www.khronos.org/bugzilla/show_bug.cgi?id=1356 I'll let you know if I get feedback from this bug or else where. Patch with updated error messages: [PATCH] eglplatform: treat __APPLE__ the s

Re: [Mesa-dev] [RFC] loader: libudev vs sysfs vs libdrm

2015-07-13 Thread Julien Isorce
>> - libdrm: used as a last resource fall-back after the above two. the >> sole option used by *BSD, MacOS and Android. Hi, Unless I am missing something, libdrm is not used on MacOS. On osx, EGL_PLATFORM=x11 eglGetDisplay(NULL) calls dri2_initialize_x11 which fallback to dri2_initialize_x11_swr

Re: [Mesa-dev] [PATCH v4 0/6] nouveau: add support for vaapi

2015-10-16 Thread Julien Isorce
On 18 September 2015 at 21:34, Ilia Mirkin wrote: > On Fri, Sep 18, 2015 at 4:29 PM, Julien Isorce > wrote: > > > > > > On 17 September 2015 at 17:52, Ilia Mirkin wrote: > >> > >> On Wed, Sep 16, 2015 at 8:22 AM, Julien Isorce > >> wrote:

[Mesa-dev] [PATCH 3/7] st/va: in VaPutImage only destroy previous buffer if pipe->create_video_buffer succeeds

2015-10-16 Thread Julien Isorce
If formats are not the same it seems to re-create the video buffer with the right format. But if the creation of this new video buffer fails the surface loose its video buffer. Let's just destroy the previous buffer on success. Signed-off-by: Julien Isorce --- src/gallium/state_tracke

[Mesa-dev] [PATCH 2/7] st/va: properly defines VAImageFormat formats and improve VaCreateImage

2015-10-16 Thread Julien Isorce
Also add RGBA, RGBX and BGRX. Also extend ChromaToPipe and implement PipeToYCbCr. Note that gstreamer-vaapi check all the VAImageFormat fields. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/image.c | 10 ++-- src/gallium/state_trackers/va/va_private.h | 38

[Mesa-dev] [PATCH 4/7] st/va: implement VaCreateSurfaces2 and VaQuerySurfaceAttributes

2015-10-16 Thread Julien Isorce
Inspired from http://cgit.freedesktop.org/vaapi/intel-driver/tree/src/i965_drv_video.c Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/context.c| 5 +- src/gallium/state_trackers/va/surface.c| 288 - src/gallium/state_trackers/va

[Mesa-dev] [PATCH 0/7] st/va: VPP, dmabuf import and headless.

2015-10-16 Thread Julien Isorce
This patch serie adds initial support for Video Post Processing. It also implements VaCreateSurfaces2 for common purpose and also to import a dmabuf. Finally it adds support for headless mode, i.e. using DRM instead of X11 for device setup. Julien Isorce (7): nvc0: fix crash when

[Mesa-dev] [PATCH 7/7] st/va: add headless support, i.e. VA_DISPLAY_DRM

2015-10-16 Thread Julien Isorce
This patch allows to use gallium vaapi without requiring a X server running for your second graphic card. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/Makefile.am | 9 ++ src/gallium/state_trackers/va/context.c | 49 +++ 2 files changed, 53

[Mesa-dev] [PATCH 6/7] st/va: add initial Video Post Processing support

2015-10-16 Thread Julien Isorce
vlVaRenderPicture vlVaEndPicture Add handleVAProcPipelineParameterBufferType helper. One of the application is: VASurfaceNV12 -> gstvaapipostproc -> VASurfaceRGBA Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/config.c | 20 +++ src/gallium/state_trackers/va/context.c

[Mesa-dev] [PATCH 5/7] st/va: implement dmabuf import for VaCreateSurfaces2

2015-10-16 Thread Julien Isorce
For now it is limited to RGBA, BGRA, RGBX, BGRX surfaces. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/surface.c| 90 +- src/gallium/state_trackers/va/va_private.h | 1 + 2 files changed, 90 insertions(+), 1 deletion(-) diff --git a/src

[Mesa-dev] [PATCH 1/7] nvc0: fix crash when nv50_miptree_from_handle fails

2015-10-16 Thread Julien Isorce
Signed-off-by: Julien Isorce --- src/gallium/drivers/nouveau/nvc0/nvc0_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c index 12b5a02..15c803c 100644 --- a/src

Re: [Mesa-dev] [PATCH 1/7] nvc0: fix crash when nv50_miptree_from_handle fails

2015-10-19 Thread Julien Isorce
Thx for the review. I experienced the crash when testing patch 5/7 of this patch series, around "resource = pscreen->resource_from_handle" in the new vaCreateSurface2 function. Julien On 19 October 2015 at 16:59, Emil Velikov wrote: > On 17 October 2015 at 00:14, Julien

Re: [Mesa-dev] [PATCH 4/7] st/va: implement VaCreateSurfaces2 and VaQuerySurfaceAttributes

2015-10-19 Thread Julien Isorce
On 19 October 2015 at 16:55, Emil Velikov wrote: > On 17 October 2015 at 00:14, Julien Isorce > wrote: > > Inspired from > http://cgit.freedesktop.org/vaapi/intel-driver/tree/src/i965_drv_video.c > > > Please mention the actual usecase here and/or how you've teste

Re: [Mesa-dev] [PATCH 2/7] st/va: properly defines VAImageFormat formats and improve VaCreateImage

2015-10-20 Thread Julien Isorce
s I should not use PIPE_FORMAT_RGBA_UNORM-likes so I guess the patch is ok. I think for now mesa st/va does not work on big endian cpu when it is about using "RGBs" formats. And after my patch it still does not. Though I can add them if you want but it will be untested :) Julien

Re: [Mesa-dev] [PATCH 7/7] st/va: add headless support, i.e. VA_DISPLAY_DRM

2015-10-20 Thread Julien Isorce
On 19 October 2015 at 17:16, Emil Velikov wrote: > On 17 October 2015 at 00:14, Julien Isorce > wrote: > > This patch allows to use gallium vaapi without requiring > > a X server running for your second graphic card. > > > I've sent a lengthy series which should

[Mesa-dev] [PATCH v2 5/7] st/va: implement dmabuf import for VaCreateSurfaces2

2015-10-20 Thread Julien Isorce
For now it is limited to RGBA, BGRA, RGBX, BGRX surfaces. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/surface.c | 97 - 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium

[Mesa-dev] [PATCH v2 2/7] st/va: properly defines VAImageFormat formats and improve VaCreateImage

2015-10-20 Thread Julien Isorce
Also add RGBA, RGBX and BGRX. Also extend ChromaToPipe and implement PipeToYCbCr. Note that gstreamer-vaapi check all the VAImageFormat fields. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/image.c | 18 +++--- src/gallium/state_trackers/va/va_private.h | 38

[Mesa-dev] [PATCH v2 3/7] st/va: do not destroy old buffer when new one failed

2015-10-20 Thread Julien Isorce
If formats are not the same vlVaPutImage re-creates the video buffer with the right format. But if the creation of this new video buffer fails then the surface looses its current buffer. Let's just destroy the previous buffer on success. Signed-off-by: Julien Isorce --- src/ga

[Mesa-dev] [PATCH v2 1/7] nvc0: fix crash when nv50_miptree_from_handle fails

2015-10-20 Thread Julien Isorce
Signed-off-by: Julien Isorce --- src/gallium/drivers/nouveau/nvc0/nvc0_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c index 12b5a02..15c803c 100644 --- a/src

[Mesa-dev] [PATCH v2 4/7] st/va: implement VaCreateSurfaces2 and VaQuerySurfaceAttributes

2015-10-20 Thread Julien Isorce
VaQuerySurfaceAttributes. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/context.c| 5 +- src/gallium/state_trackers/va/surface.c| 294 - src/gallium/state_trackers/va/va_private.h | 6 +- 3 files changed, 253 insertions(+), 52 deletions(-) diff --git a/src

Re: [Mesa-dev] [PATCH v2 1/7] nvc0: fix crash when nv50_miptree_from_handle fails

2015-10-21 Thread Julien Isorce
t wrote: > Is there a particular situation where nv50_miptree_from_handle() fails? > And did you check nv50? > > Anyway, this patch is: > Reviewed-by: Samuel Pitoiset > > On 20/10/2015 18:34, Julien Isorce wrote: > >> Signed-off-by: Julien Isorce >> --- >> src

[Mesa-dev] [PATCH] nouveau: fix double free when screen_create fails

2015-10-21 Thread Julien Isorce
with: nvc0_screen_create:717 - Error allocating PGRAPH context for M2MF: -16 Also see: https://bugs.freedesktop.org/show_bug.cgi?id=70354 Signed-off-by: Julien Isorce --- src/gallium/drivers/nouveau/nv30/nv30_screen.c | 5 - src/gallium/drivers/nouveau/nv50/nv50_screen.c | 4 +++-

Re: [Mesa-dev] [PATCH 6/7] st/va: add initial Video Post Processing support

2015-10-22 Thread Julien Isorce
Hi, Thx for your review. I'll submit a new version of the patch. Just replying here first to answer your questions: On 19 October 2015 at 18:10, Emil Velikov wrote: > On 17 October 2015 at 00:14, Julien Isorce > wrote: > > Improve following functions to support VA_PROFILE_

Re: [Mesa-dev] [PATCH 6/7] st/va: add initial Video Post Processing support

2015-10-22 Thread Julien Isorce
On 19 October 2015 at 18:10, Emil Velikov wrote: > On 17 October 2015 at 00:14, Julien Isorce > wrote: > > + > > + if (!(picture_width && picture_height) && !is_vpp) > >return VA_STATUS_ERROR_INVALID_IMAGE_FORMAT; > > > >

[Mesa-dev] [PATCH v2 7/8] st/va: add colospace conversion through Video Post Processing

2015-10-22 Thread Julien Isorce
handleVAProcPipelineParameterBufferType helper. One application is: VASurfaceNV12 -> gstvaapipostproc -> VASurfaceRGBA Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/context.c| 91 +-- src/gallium/state_trackers/va/picture.c| 86 +- src/g

[Mesa-dev] [PATCH v2 6/8] st/va: handle Video Post Processing for configs

2015-10-22 Thread Julien Isorce
Add support for VA_PROFILE_NONE and VAEntrypointVideoProc in the 4 following functions: vlVaQueryConfigProfiles vlVaQueryConfigEntrypoints vlVaCreateConfig vlVaQueryConfigAttributes Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/config.c | 20 src

Re: [Mesa-dev] [PATCH v2 4/7] st/va: implement VaCreateSurfaces2 and VaQuerySurfaceAttributes

2015-10-23 Thread Julien Isorce
This patch is missing "memset(&templat, 0, sizeof(templat));" so I am going to submit a v3 for this one. On 20 October 2015 at 17:34, Julien Isorce wrote: > Inspired from http://cgit.freedesktop.org/vaapi/intel-driver/ > especially src/i965_drv_video.c::i965_CreateSurfaces

[Mesa-dev] [PATCH v3 4/7] st/va: implement VaCreateSurfaces2 and VaQuerySurfaceAttributes

2015-10-23 Thread Julien Isorce
VaQuerySurfaceAttributes. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/context.c| 5 +- src/gallium/state_trackers/va/surface.c| 296 - src/gallium/state_trackers/va/va_private.h | 6 +- 3 files changed, 255 insertions(+), 52 deletions(-) diff --git a/src

[Mesa-dev] [PATCH] st/va: pass picture desc to begin and decode

2015-10-23 Thread Julien Isorce
At least vl_mpeg12_decoder uses the picture desc in begin_frame and decode_bitstream. https://bugs.freedesktop.org/show_bug.cgi?id=92634 Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/picture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium

Re: [Mesa-dev] [PATCH v2 1/7] nvc0: fix crash when nv50_miptree_from_handle fails

2015-10-26 Thread Julien Isorce
On 25 October 2015 at 21:38, Samuel Pitoiset wrote: > > Do you need someone to push this patch? > Yes please ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] st/va: pass picture desc to begin and decode

2015-10-26 Thread Julien Isorce
Hi Christian, Would you mind to push this patch ? Thx Cheers Julien On 23 October 2015 at 14:33, Christian König wrote: > On 23.10.2015 14:25, Julien Isorce wrote: > >> At least vl_mpeg12_decoder uses the picture >> desc in begin_frame and decode_bitstream. >> >>

Re: [Mesa-dev] [PATCH] nouveau: fix double free when screen_create fails

2015-10-27 Thread Julien Isorce
On 25 October 2015 at 21:56, Samuel Pitoiset wrote: > > > On 10/22/2015 01:16 AM, Julien Isorce wrote: > >> The real fix is in nouveau_drm_winsys.c by setting dev to 0. >> Which means dev's ownership has been passed to previous call. >> Other changes are t

[Mesa-dev] [PATCH v2] nouveau: fix double free when screen_create fails

2015-10-27 Thread Julien Isorce
This patch prevents to call nouveau_device_del twice on the same device. Encountered this case when nvc0_screen_create fails with: nvc0_screen_create:717 - Error allocating PGRAPH context for M2MF: -16 https://bugs.freedesktop.org/show_bug.cgi?id=70354 Signed-off-by: Julien Isorce --- src

Re: [Mesa-dev] [PATCH v2] nouveau: fix double free when screen_create fails

2015-10-27 Thread Julien Isorce
fee ? > > This patch is loosely based on your first attempt, except that I removed > the call > to nouveau_device_del() in nouveau_drm_screen_create(). > > > On 27/10/2015 09:52, Julien Isorce wrote: > >> This patch prevents to call nouveau_device_del twice on the sa

[Mesa-dev] [PATCH v2 07/13] st/va: add headless support, i.e. VA_DISPLAY_DRM

2015-10-28 Thread Julien Isorce
This patch allows to use gallium vaapi without requiring a X server running for your second graphic card. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/Makefile.am | 9 src/gallium/state_trackers/va/context.c | 70 --- 2 files changed, 73

[Mesa-dev] [PATCH 1/2] st/va: implement VaDeriveImage

2015-10-29 Thread Julien Isorce
array. On of the consequences is that it is only possible VaDeriveImage is only useful on surfaces backed with contiguous planes. Implementation inspired from cgit.freedesktop.org/vaapi/intel-driver Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/buffer.c | 47

[Mesa-dev] [PATCH 2/2] st/va: add support to export a surface as dmabuf

2015-10-29 Thread Julien Isorce
with nouveau driver. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/buffer.c | 136 - src/gallium/state_trackers/va/context.c| 4 +- src/gallium/state_trackers/va/va_private.h | 6 ++ 3 files changed, 144 insertions(+), 2 deletions(-) diff

[Mesa-dev] [PATCH 0/2] vaapi: add support for dmabuf export

2015-10-29 Thread Julien Isorce
ub.com/Samsung/ChromiumGStreamerBackend The VA surface is exported as dmabuf in the new Media Process. Then this dmabuf is imported into an EGLImage in the GPU Process. Julien Isorce (2): st/va: implement VaDeriveImage st/va: add support to export a surface as dmabuf src/gallium/state_track

Re: [Mesa-dev] [PATCH v2 7/8] st/va: add colospace conversion through Video Post Processing

2015-10-29 Thread Julien Isorce
Ack. I confirm it still works without it. So I'll remove it. Thx -Original Message- From: Christian König [mailto:deathsim...@vodafone.de] Sent: 29 October 2015 14:02 To: Julien Isorce; mesa-dev@lists.freedesktop.org Cc: emil.l.veli...@gmail.com Subject: Re: [Mesa-dev] [PATCH v2 7/

Re: [Mesa-dev] [PATCH 1/2] st/va: implement VaDeriveImage

2015-10-29 Thread Julien Isorce
Ack. And I'll move this bit at the end just before the other FREE. Thx -Original Message- From: Christian König [mailto:deathsim...@vodafone.de] Sent: 29 October 2015 12:22 To: Julien Isorce; mesa-dev@lists.freedesktop.org Subject: Re: [Mesa-dev] [PATCH 1/2] st/va: impl

Re: [Mesa-dev] [PATCH 2/2] st/va: add support to export a surface as dmabuf

2015-10-29 Thread Julien Isorce
-Original Message- From: Christian König [mailto:deathsim...@vodafone.de] Sent: 29 October 2015 12:29 To: Julien Isorce; mesa-dev@lists.freedesktop.org Subject: Re: [Mesa-dev] [PATCH 2/2] st/va: add support to export a surface as dmabuf > @@ -108,6 +109,9 @@ vlVaMapBuf

Re: [Mesa-dev] [PATCH 0/7] st/va: VPP, dmabuf import and headless.

2015-10-29 Thread Julien Isorce
l or Ilia have no further comments please send out your full set of > patches once more I would like to get this pusched upstream. > > Best regards, > Christian. > > > On 17.10.2015 01:14, Julien Isorce wrote: > >> This patch serie adds initial support for

[Mesa-dev] [PATCH v4 9/9] st/va: add support to export a surface as dmabuf

2015-10-29 Thread Julien Isorce
with nouveau driver. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/buffer.c | 136 - src/gallium/state_trackers/va/context.c| 4 +- src/gallium/state_trackers/va/va_private.h | 6 ++ 3 files changed, 144 insertions(+), 2 deletions(-) diff

[Mesa-dev] [PATCH v4 4/9] st/va: implement dmabuf import for VaCreateSurfaces2

2015-10-29 Thread Julien Isorce
For now it is limited to RGBA, BGRA, RGBX, BGRX surfaces. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/surface.c | 97 - 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium

[Mesa-dev] [PATCH v4 3/9] st/va: implement VaCreateSurfaces2 and VaQuerySurfaceAttributes

2015-10-29 Thread Julien Isorce
VaQuerySurfaceAttributes. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/context.c| 5 +- src/gallium/state_trackers/va/surface.c| 294 - src/gallium/state_trackers/va/va_private.h | 6 +- 3 files changed, 253 insertions(+), 52 deletions(-) diff --git a/src

[Mesa-dev] [PATCH v4 8/9] st/va: implement VaDeriveImage

2015-10-29 Thread Julien Isorce
array. On of the consequences is that it is only possible VaDeriveImage is only useful on surfaces backed with contiguous planes. Implementation inspired from cgit.freedesktop.org/vaapi/intel-driver Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/buffer.c | 43 -- src

[Mesa-dev] [PATCH v4 7/9] st/va: add headless support, i.e. VA_DISPLAY_DRM

2015-10-29 Thread Julien Isorce
This patch allows to use gallium vaapi without requiring a X server running for your second graphic card. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/Makefile.am | 9 src/gallium/state_trackers/va/context.c | 70 --- 2 files changed, 73

[Mesa-dev] [PATCH v4 6/9] st/va: add colospace conversion through Video Post Processing

2015-10-29 Thread Julien Isorce
handleVAProcPipelineParameterBufferType helper. One application is: VASurfaceNV12 -> gstvaapipostproc -> VASurfaceRGBA Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/context.c| 124 + src/gallium/state_trackers/va/picture.c| 81 ++- src/gallium/state_tr

[Mesa-dev] [PATCH v4 2/9] st/va: do not destroy old buffer when new one failed

2015-10-29 Thread Julien Isorce
If formats are not the same vlVaPutImage re-creates the video buffer with the right format. But if the creation of this new video buffer fails then the surface looses its current buffer. Let's just destroy the previous buffer on success. Signed-off-by: Julien Isorce --- src/ga

[Mesa-dev] [PATCH v4 5/9] st/va: handle Video Post Processing for configs

2015-10-29 Thread Julien Isorce
Add support for VA_PROFILE_NONE and VAEntrypointVideoProc in the 4 following functions: vlVaQueryConfigProfiles vlVaQueryConfigEntrypoints vlVaCreateConfig vlVaQueryConfigAttributes Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/config.c | 20 src

[Mesa-dev] [PATCH v4 1/9] st/va: properly defines VAImageFormat formats and improve VaCreateImage

2015-10-29 Thread Julien Isorce
Also add RGBA, RGBX and BGRX. Also extend ChromaToPipe and implement PipeToYCbCr. Note that gstreamer-vaapi check all the VAImageFormat fields. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/image.c | 18 +++--- src/gallium/state_trackers/va/va_private.h | 38

Re: [Mesa-dev] [PATCH v4 2/9] st/va: do not destroy old buffer when new one failed

2015-10-29 Thread Julien Isorce
Yes please. Thx Julien On 29 October 2015 at 19:12, Christian König wrote: > On 29.10.2015 18:40, Julien Isorce wrote: > >> If formats are not the same vlVaPutImage re-creates the video >> buffer with the right format. But if the creation of this new >> video buffe

Re: [Mesa-dev] [PATCH v4 3/9] st/va: implement VaCreateSurfaces2 and VaQuerySurfaceAttributes

2015-10-30 Thread Julien Isorce
-Original Message- From: Emil Velikov [mailto:emil.l.veli...@gmail.com] Sent: 29 October 2015 19:04 To: Julien Isorce Cc: ML mesa-dev Subject: Re: [Mesa-dev] [PATCH v4 3/9] st/va: implement VaCreateSurfaces2 and VaQuerySurfaceAttributes On 29 October 2015 at 17:40, Julien Isorce

Re: [Mesa-dev] [PATCH v4 1/9] st/va: properly defines VAImageFormat formats and improve VaCreateImage

2015-10-30 Thread Julien Isorce
-Original Message- From: Christian König [mailto:deathsim...@vodafone.de] Sent: 29 October 2015 19:07 To: Julien Isorce; mesa-dev@lists.freedesktop.org Subject: Re: [PATCH v4 1/9] st/va: properly defines VAImageFormat formats and improve VaCreateImage > @@ -80,12 +82,46 @@ YCbCrToP

Re: [Mesa-dev] [PATCH v4 5/9] st/va: handle Video Post Processing for configs

2015-10-30 Thread Julien Isorce
Ok I will reorder, make sense. -Original Message- From: Christian König [mailto:deathsim...@vodafone.de] Sent: 29 October 2015 19:26 To: Julien Isorce; mesa-dev@lists.freedesktop.org Subject: Re: [PATCH v4 5/9] st/va: handle Video Post Processing for configs On 29.10.2015 18:40, Julien

Re: [Mesa-dev] [PATCH v4 5/9] st/va: handle Video Post Processing for configs

2015-10-30 Thread Julien Isorce
-Original Message- From: Christian König [mailto:deathsim...@vodafone.de] Sent: 29 October 2015 19:26 To: Julien Isorce; mesa-dev@lists.freedesktop.org Subject: Re: [PATCH v4 5/9] st/va: handle Video Post Processing for configs On 29.10.2015 18:40, Julien Isorce wrote: > Add supp

Re: [Mesa-dev] [PATCH v4 4/9] st/va: implement dmabuf import for VaCreateSurfaces2

2015-10-30 Thread Julien Isorce
-Original Message- From: Christian König [mailto:deathsim...@vodafone.de] Sent: 29 October 2015 19:24 To: Julien Isorce; mesa-dev@lists.freedesktop.org Subject: Re: [PATCH v4 4/9] st/va: implement dmabuf import for VaCreateSurfaces2 On 29.10.2015 18:40, Julien Isorce wrote: > For

Re: [Mesa-dev] [PATCH v4 8/9] st/va: implement VaDeriveImage

2015-10-30 Thread Julien Isorce
Ok I'll make a separate patch for the add of errors checks and add the break in the loop. Thx Julien -Original Message- From: Emil Velikov [mailto:emil.l.veli...@gmail.com] Sent: 29 October 2015 22:03 To: Julien Isorce Cc: ML mesa-dev Subject: Re: [Mesa-dev] [PATCH v4 8/9]

Re: [Mesa-dev] [PATCH v2 07/13] st/va: add headless support, i.e. VA_DISPLAY_DRM

2015-10-30 Thread Julien Isorce
-Original Message- From: Emil Velikov [mailto:emil.l.veli...@gmail.com] Sent: 29 October 2015 22:21 To: Christian König Cc: Julien Isorce; ML mesa-dev Subject: Re: [Mesa-dev] [PATCH v2 07/13] st/va: add headless support, i.e. VA_DISPLAY_DRM >>With the VA_RT_FORMAT_YUV400 ha

Re: [Mesa-dev] [PATCH v4 7/9] st/va: add headless support, i.e. VA_DISPLAY_DRM

2015-10-30 Thread Julien Isorce
; On 29 October 2015 at 17:40, Julien Isorce wrote: > > This patch allows to use gallium vaapi without requiring > > a X server running for your second graphic card. > > > > Signed-off-by: Julien Isorce > > --- > > src/gallium/state_trackers/va/

[Mesa-dev] [PATCH v5 10/10] st/va: add support to export a surface as dmabuf

2015-10-30 Thread Julien Isorce
with nouveau driver. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/buffer.c | 136 - src/gallium/state_trackers/va/context.c| 4 +- src/gallium/state_trackers/va/va_private.h | 6 ++ 3 files changed, 144 insertions(+), 2 deletions(-) diff

[Mesa-dev] [PATCH v5 04/10] st/va: implement dmabuf import for VaCreateSurfaces2

2015-10-30 Thread Julien Isorce
For now it is limited to RGBA, BGRA, RGBX, BGRX surfaces. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/surface.c | 97 - 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium

[Mesa-dev] [PATCH v5 06/10] st/va: handle Video Post Processing for configs

2015-10-30 Thread Julien Isorce
Add support for VA_PROFILE_NONE and VAEntrypointVideoProc in the 4 following functions: vlVaQueryConfigProfiles vlVaQueryConfigEntrypoints vlVaCreateConfig vlVaQueryConfigAttributes Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/config.c | 20 src

[Mesa-dev] [PATCH v5 09/10] st/va: implement VaDeriveImage

2015-10-30 Thread Julien Isorce
array. On of the consequences is that it is only possible VaDeriveImage is only useful on surfaces backed with contiguous planes. Implementation inspired from cgit.freedesktop.org/vaapi/intel-driver Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/buffer.c | 43 -- src

[Mesa-dev] [PATCH v5 01/10] st/va: properly defines VAImageFormat formats and improve VaCreateImage

2015-10-30 Thread Julien Isorce
VAImageFormat fields. Signed-off-by: Julien Isorce --- src/gallium/include/pipe/p_format.h| 3 ++- src/gallium/state_trackers/va/image.c | 24 - src/gallium/state_trackers/va/va_private.h | 41 +++--- 3 files changed, 57 insertions(+), 11 deletions

[Mesa-dev] [PATCH v5 08/10] st/va: add more errors checks in vlVaBufferSetNumElements and vlVaMapBuffer

2015-10-30 Thread Julien Isorce
Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/buffer.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/state_trackers/va/buffer.c b/src/gallium/state_trackers/va/buffer.c index 8f9ba44..f5b9e81 100644 --- a/src/gallium/state_trackers/va/buffer.c +++ b/src

[Mesa-dev] [PATCH v5 03/10] st/va: implement VaCreateSurfaces2 and VaQuerySurfaceAttributes

2015-10-30 Thread Julien Isorce
VaQuerySurfaceAttributes. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/context.c| 5 +- src/gallium/state_trackers/va/surface.c| 290 - src/gallium/state_trackers/va/va_private.h | 6 +- 3 files changed, 249 insertions(+), 52 deletions(-) diff --git a/src

[Mesa-dev] [PATCH v5 00/10] st/va: add support for VPP, headless and dmabuf

2015-10-30 Thread Julien Isorce
or the Chromium browser: https://github.com/Samsung/ChromiumGStreamerBackend The VA surface is exported as dmabuf in the new Media Process. Then this dmabuf is imported into an EGLImage in the GPU Process. Julien Isorce (10): st/va: properly defines VAImageFormat formats and improve VaCreateImage

[Mesa-dev] [PATCH v5 05/10] st/va: add colospace conversion through Video Post Processing

2015-10-30 Thread Julien Isorce
handleVAProcPipelineParameterBufferType helper. One application is: VASurfaceNV12 -> gstvaapipostproc -> VASurfaceRGBA Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/context.c| 124 + src/gallium/state_trackers/va/picture.c| 81 ++- src/gallium/state_tr

[Mesa-dev] [PATCH v5 07/10] st/va: add headless support, i.e. VA_DISPLAY_DRM

2015-10-30 Thread Julien Isorce
This patch allows to use gallium vaapi without requiring a X server running for your second graphic card. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/Makefile.am | 9 src/gallium/state_trackers/va/context.c | 70 --- 2 files changed, 73

[Mesa-dev] [PATCH v5 02/10] st/va: do not destroy old buffer when new one failed

2015-10-30 Thread Julien Isorce
If formats are not the same vlVaPutImage re-creates the video buffer with the right format. But if the creation of this new video buffer fails then the surface looses its current buffer. Let's just destroy the previous buffer on success. Signed-off-by: Julien Isorce --- src/ga

Re: [Mesa-dev] [PATCH v4 6/9] st/va: add colospace conversion through Video Post Processing

2015-10-30 Thread Julien Isorce
On 30 October 2015 at 11:54, Christian König wrote: > On 29.10.2015 18:40, Julien Isorce wrote: > >> Add support for VPP in the following functions: >> vlVaCreateContext >> vlVaDestroyContext >> vlVaBeginPicture >> vlVaRenderPicture >> vlVaEndPicture

[Mesa-dev] [PATCH 2/4] st/va: fix memory leak on error in vlVaCreateSurfaces2

2015-11-05 Thread Julien Isorce
Found by coverity: CID #1337953 Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/surface.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c index 59815aa..3db21c3

[Mesa-dev] [PATCH 4/4] st/va: add support for RGBX and BGRX in VPP

2015-11-05 Thread Julien Isorce
Before it was only possible to convert a NV12 surface to RGBA or BGRA. This patch uses the same post processing function, "handleVAProcPipelineParameterBufferType", but add definitions for RGBX and BGRX. This patch also makes vlVaQuerySurfaceAttributes more generic. Signed-off-by: Jul

[Mesa-dev] [PATCH 0/4] st/va: indent, leak fix and RGBx/BGRx for vpp

2015-11-05 Thread Julien Isorce
A few fixes and small improvement from recent changes in st/va: * Indentation was wrong for some functions. * Coverity reported a memory leak. (thx to Ilia for pointing this) * More color formats convertion for Video Post Processing Julien Isorce (4): st/va: indent vlVaQuerySurfaceAttributes

[Mesa-dev] [PATCH 1/4] st/va: indent vlVaQuerySurfaceAttributes and vlVaCreateSurfaces2

2015-11-05 Thread Julien Isorce
Some lines were using 4 indentation spaces instead of 3. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/surface.c | 566 1 file changed, 283 insertions(+), 283 deletions(-) diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium

[Mesa-dev] [PATCH 3/4] st/va: properly indent buffer.c, config.c, image.c and picture.c

2015-11-05 Thread Julien Isorce
Some lines were using 4 indentation spaces instead of 3. The switch in vlVaAcquireBufferHandle actually had wrong brackets surrounding case+default. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/buffer.c | 23 + src/gallium/state_trackers/va/config.c | 12 ++--- src

Re: [Mesa-dev] [PATCH 3/4] st/va: properly indent buffer.c, config.c, image.c and picture.c

2015-11-05 Thread Julien Isorce
On 5 November 2015 at 16:28, Emil Velikov wrote: > On 5 November 2015 at 08:24, Julien Isorce > wrote: > > Some lines were using 4 indentation spaces instead of 3. > > > > The switch in vlVaAcquireBufferHandle actually had wrong brackets > > surrounding case+d

Re: [Mesa-dev] [PATCH 4/4] st/va: add support for RGBX and BGRX in VPP

2015-11-05 Thread Julien Isorce
On 5 November 2015 at 16:27, Emil Velikov wrote: > Hi Julien, > > On 5 November 2015 at 08:24, Julien Isorce > wrote: > > Before it was only possible to convert a NV12 surface to > > RGBA or BGRA. This patch uses the same post processing > > function, "hand

Re: [Mesa-dev] [PATCH 0/4] st/va: indent, leak fix and RGBx/BGRx for vpp

2015-11-05 Thread Julien Isorce
ould I commit that for you as well or do you now have an account? > I requested the account few minutes ago but please push #1 and #2. Tomorrow I'll send a v2 about #3 and #4 after addressing remarks + split. Thx Julien > > Regards, > Christian. > > > On 05.11.2015 09

[Mesa-dev] [PATCH v2 3/4] vl/buffers: add RGBX and BGRX to the supported formats

2015-11-06 Thread Julien Isorce
Useful is one wants to create RGBX or BGRX surfaces. The infrastructure is such that it required just a few definitions to support these formats. Signed-off-by: Julien Isorce --- src/gallium/auxiliary/vl/vl_video_buffer.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a

[Mesa-dev] [PATCH v2 2/4] st/va: properly use brackets in vlVaAcquireBufferHandle's switch

2015-11-06 Thread Julien Isorce
In "switch (mem_type)" the brackets were surrounding "case+default" instead of "case" only. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/buffer.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gallium/state_track

[Mesa-dev] [PATCH v2 1/4] st/va: properly indent buffer.c, config.c, image.c and picture.c

2015-11-06 Thread Julien Isorce
Some lines were using 4 indentation spaces instead of 3. The switch in vlVaAcquireBufferHandle actually had wrong brackets surrounding case+default. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/buffer.c | 14 +++--- src/gallium/state_trackers/va/config.c | 12 ++--- src

[Mesa-dev] [PATCH v2 4/4] st/va: add support for RGBX and BGRX in VPP

2015-11-06 Thread Julien Isorce
asting the same lines. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/picture.c | 5 +++-- src/gallium/state_trackers/va/surface.c | 36 ++--- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/gallium/state_trackers/va/picture.c b/s

Re: [Mesa-dev] [PATCH v4 0/6] nouveau: add support for vaapi

2015-11-10 Thread Julien Isorce
ist[i][1] = h264->ReferenceFrames[i].BottomFieldOrderCnt; + context->desc.h264.frame_num_list[i] = h264->ReferenceFrames[i].frame_idx; + } I am surprised that "getReferenceFrame" is not called at all in the h264 case. Cheers Julien On 16 October 2015 at 23:18, Ili

[Mesa-dev] question about container_of

2017-02-27 Thread Julien Isorce
Hi, Since 2012 commit ccff74971203b533bf16b46b49a9e61753f75e6c it is said: "sample must be initialized, or else the result is undefined" in the description of mesa/src/util/list.h::container_of . But I can find a few places where it is used without initializing that second parameter, i.e. like:

[Mesa-dev] vlVaQueryImageFormats and vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities also return unsupported formats

2015-08-21 Thread Julien Isorce
Hi, vlVaQueryImageFormats (or vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities) implementation call pscreen->is_video_format_supported with input profile equal to PIPE_VIDEO_PROFILE_UNKNOWN. Problem is that "nouveau_vp3_screen_video_supported" or "rvid_is_format_supported" will returns several f

  1   2   3   >