Use vaMapBuffer() on Intel GPUs
This commit is contained in:
parent
1904e045cd
commit
ce05f00f9d
1 changed files with 11 additions and 2 deletions
|
@ -2696,8 +2696,17 @@ uint64_t VaapiWrapper::GetEncodedChunkSize(VABufferID buffer_id,
|
|||
TRACE_EVENT0("media,gpu", "VaapiWrapper::GetEncodedChunkSize");
|
||||
base::AutoLockMaybe auto_lock(va_lock_);
|
||||
TRACE_EVENT0("media,gpu", "VaapiWrapper::GetEncodedChunkSizeLocked");
|
||||
|
||||
// vaSyncSurface() is not necessary on Intel platforms as long as there is a
|
||||
// vaMapBuffer() like in ScopedVABufferMapping below.
|
||||
// vaSyncSurface() synchronizes all active workloads (potentially many, e.g.
|
||||
// for k-SVC encoding). On Intel, we'd rather use the more fine-grained
|
||||
// vaMapBuffer() in ScopedVABufferMapping below. see b/184312032.
|
||||
if (VaapiWrapper::GetImplementationType() != VAImplementation::kIntelI965 &&
|
||||
VaapiWrapper::GetImplementationType() != VAImplementation::kIntelIHD) {
|
||||
VAStatus va_res = vaSyncSurface(va_display_, sync_surface_id);
|
||||
VA_SUCCESS_OR_RETURN(va_res, VaapiFunctions::kVASyncSurface, 0u);
|
||||
}
|
||||
|
||||
ScopedVABufferMapping mapping(va_lock_, va_display_, buffer_id);
|
||||
if (!mapping.IsValid())
|
||||
|
|
Loading…
Reference in a new issue