[vlc-commits] d3d11_fmt: keep the feature level in d3d11_device_t
Steve Lhomme
git at videolan.org
Tue Mar 13 15:26:40 CET 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Mar 13 14:14:55 2018 +0100| [d444a1ae5d188bbdefafd45639410c8db9ea1cd9] | committer: Steve Lhomme
d3d11_fmt: keep the feature level in d3d11_device_t
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d444a1ae5d188bbdefafd45639410c8db9ea1cd9
---
modules/video_chroma/d3d11_fmt.c | 9 ++++-----
modules/video_chroma/d3d11_fmt.h | 1 +
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c
index 1ebc5ddd45..0932c4228d 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -269,21 +269,20 @@ HRESULT D3D11_CreateDevice(vlc_object_t *obj, d3d11_handle_t *hd3d,
};
for (UINT driver = 0; driver < ARRAY_SIZE(driverAttempts); driver++) {
- D3D_FEATURE_LEVEL i_feature_level;
hr = D3D11CreateDevice(NULL, driverAttempts[driver], NULL, creationFlags,
D3D11_features, ARRAY_SIZE(D3D11_features), D3D11_SDK_VERSION,
- &out->d3ddevice, &i_feature_level, &out->d3dcontext);
+ &out->d3ddevice, &out->feature_level, &out->d3dcontext);
if (SUCCEEDED(hr)) {
#ifndef NDEBUG
msg_Dbg(obj, "Created the D3D11 device 0x%p ctx 0x%p type %d level %x.",
(void *)out->d3ddevice, (void *)out->d3dcontext,
- driverAttempts[driver], i_feature_level);
+ driverAttempts[driver], out->feature_level);
D3D11_GetDriverVersion( obj, out );
#endif
/* we can work with legacy levels but only if forced */
- if ( obj->obj.force || i_feature_level >= D3D_FEATURE_LEVEL_11_0 )
+ if ( obj->obj.force || out->feature_level >= D3D_FEATURE_LEVEL_11_0 )
break;
- msg_Dbg(obj, "Incompatible feature level %x", i_feature_level);
+ msg_Dbg(obj, "Incompatible feature level %x", out->feature_level);
ID3D11DeviceContext_Release(out->d3dcontext);
ID3D11Device_Release(out->d3ddevice);
out->d3dcontext = NULL;
diff --git a/modules/video_chroma/d3d11_fmt.h b/modules/video_chroma/d3d11_fmt.h
index 6c80992672..a5b46ad582 100644
--- a/modules/video_chroma/d3d11_fmt.h
+++ b/modules/video_chroma/d3d11_fmt.h
@@ -41,6 +41,7 @@ typedef struct
ID3D11DeviceContext *d3dcontext; /* D3D context */
bool owner;
struct wddm_version WDDM;
+ D3D_FEATURE_LEVEL feature_level;
} d3d11_device_t;
typedef struct
More information about the vlc-commits
mailing list