<div dir="ltr">Hi All,<div><br></div><div>I want to implement the following use case on Intel Haswell CPU with HD graphics:</div><div><br></div><div>offscreen OpenGL rendering to OpenGL 2D texture -> useĀ <span style="color:rgb(0,0,0);white-space:pre-wrap">EGL_MESA_image_dma_buf_export to export the texture as prime fd -> vaCreateSurfaces from the prime fd -> use vaapi to hw acclerate h264 encoding</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><font color="#000000"><span style="white-space:pre-wrap">Is this supported by the latest va-api and libva-intel-driver release (i.e., 1.7.0)? If so, is there any example I can start with?</span></font></div><div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">I did read the sample application h264encode.c and thought it might be a good starting point. However, the first major issue I encountered is when creating context through vaCreateContext, a number of pre-allocated va surfaces are required and thus statically associated with the new va context. However, with prime fd, the fd will change so a new va surface is created with every new prime fd. I don't see any API can be used to dynamically add/remove va surfaces after the context is created. Can you please give me some suggestions?</span></font></div><div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">Best,</span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">Kristine</span></font></div></div>