Commit a6b120da authored by Ted Meyer's avatar Ted Meyer Committed by Commit Bot

Turn off sharing for D3D11VideoDecoder with swap chains.

Previously, we checked only the finch flag for swap chain support,
in order to turn off resource sharing.  This was intended to avoid
a bug on intel platforms.

This CL replaces the finch check with a more robust one, to match
what dxva does.

Bug: 998901
Change-Id: I377e8e01169c927dd4431e8f22729d0d9c3fa7e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1775264Reviewed-by: default avatarTed Meyer <tmathmeyer@chromium.org>
Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
Auto-Submit: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693905}
parent a22b1f7d
......@@ -6,7 +6,6 @@
#define MEDIA_GPU_WINDOWS_D3D11_PICTURE_BUFFER_H_
#include <d3d11.h>
#include <dxva.h>
#include <wrl/client.h>
#include <memory>
......
......@@ -10,6 +10,7 @@
#include "media/base/media_switches.h"
#include "media/gpu/windows/d3d11_copying_texture_wrapper.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gl/direct_composition_surface_win.h"
namespace media {
......@@ -46,8 +47,8 @@ std::unique_ptr<TextureSelector> TextureSelector::Create(
const gpu::GpuPreferences& gpu_preferences,
const gpu::GpuDriverBugWorkarounds& workarounds,
const VideoDecoderConfig& config) {
bool supports_nv12_decode_swap_chain = base::FeatureList::IsEnabled(
features::kDirectCompositionUseNV12DecodeSwapChain);
bool supports_nv12_decode_swap_chain =
gl::DirectCompositionSurfaceWin::IsDecodeSwapChainSupported();
bool needs_texture_copy = !SupportsZeroCopy(gpu_preferences, workarounds);
DXGI_FORMAT input_dxgi_format = DXGI_FORMAT_NV12;
......
......@@ -7,6 +7,7 @@
#include <d3d11_1.h>
#include <d3d9.h>
#include <dxva.h>
#include <windows.h>
#include <wrl/client.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment