]> git.sesse.net Git - nageru/blobdiff - h264encode.cpp
Seemingly renderD128 works where card0 does not.
[nageru] / h264encode.cpp
index 9660a1afaf316bda61da4fda57608369f9faa139..a478c2a1a2459a2fa24d3ed06c34a598ea1bf8d1 100644 (file)
@@ -924,7 +924,7 @@ int H264EncoderImpl::init_va(const string &va_display)
     
     if (support_encode == 0) {
         printf("Can't find VAEntrypointEncSlice for H264 profiles. If you are using a non-Intel GPU\n");
-        printf("but have one in your system, try launching Nageru with --va-display /dev/dri/card0\n");
+        printf("but have one in your system, try launching Nageru with --va-display /dev/dri/renderD128\n");
         printf("to use VA-API against DRM instead of X11.\n");
         exit(1);
     } else {
@@ -1949,7 +1949,12 @@ void H264EncoderImpl::encode_frame(H264EncoderImpl::PendingFrame frame, int enco
                                    int frame_type, int64_t pts, int64_t dts)
 {
        // Wait for the GPU to be done with the frame.
-       glClientWaitSync(frame.fence.get(), 0, 0);
+       GLenum sync_status;
+       do {
+               sync_status = glClientWaitSync(frame.fence.get(), 0, 1000000000);
+               check_error();
+       } while (sync_status == GL_TIMEOUT_EXPIRED);
+       assert(sync_status != GL_WAIT_FAILED);
 
        // Release back any input frames we needed to render this frame.
        frame.input_frames.clear();