[vlc-commits] [Git][videolan/vlc][master] 2 commits: check presence of d3dx9effect.h
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Oct 18 15:47:37 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
b7c263fb by Steve Lhomme at 2025-10-18T15:28:41+00:00
check presence of d3dx9effect.h
It's part of mingw-w64, but was removed from the Windows SDK a long time ago.
- - - - -
41b7f888 by Steve Lhomme at 2025-10-18T15:28:41+00:00
direct3d9: disable shader compilation if d3dx9effect.h is missing
- - - - -
4 changed files:
- config.h.meson
- configure.ac
- meson.build
- modules/video_output/win32/direct3d9.c
Changes:
=====================================
config.h.meson
=====================================
@@ -104,6 +104,9 @@
/* Define if the compiler supports typeof. */
#mesondefine HAVE_CXX_TYPEOF
+/* Define to 1 if you have the <d3dx9effect.h> header file. */
+#mesondefine HAVE_D3DX9EFFECT_H
+
/* Define to 1 if you have the `dirfd' function. */
#mesondefine HAVE_DIRFD
=====================================
configure.ac
=====================================
@@ -2792,6 +2792,7 @@ dnl
dnl DXGI debug
dnl
AC_CHECK_HEADERS([dxgidebug.h])
+AC_CHECK_HEADERS([d3dx9effect.h])
dnl
dnl IStorageFolder
=====================================
meson.build
=====================================
@@ -270,6 +270,7 @@ check_c_headers = [
['zlib.h', { 'args' : [contrib_inc_args] }],
['wordexp.h'],
['dxgidebug.h'],
+ ['d3dx9effect.h'],
['GL/wglew.h',
{ 'prefix' : ['#include <windows.h>', '#include <GL/glew.h>'],
'args' : [contrib_inc_args] }],
=====================================
modules/video_output/win32/direct3d9.c
=====================================
@@ -52,7 +52,9 @@
#include <windows.h>
#include <d3d9.h>
+#ifdef HAVE_D3DX9EFFECT_H
#include <d3dx9effect.h>
+#endif
#include "../../video_chroma/d3d9_fmt.h"
#include <dxvahd.h>
@@ -663,6 +665,7 @@ static int Direct3D9CreateScene(vout_display_t *vd, const video_format_t *fmt)
return VLC_SUCCESS;
}
+#ifdef HAVE_D3DX9EFFECT_H
static int Direct3D9CompileShader(vout_display_t *vd, const char *shader_source, size_t source_length)
{
vout_display_sys_t *sys = vd->sys;
@@ -717,6 +720,7 @@ static int Direct3D9CompileShader(vout_display_t *vd, const char *shader_source,
}
return VLC_SUCCESS;
}
+#endif
#define MAX_SHADER_FILE_SIZE (1024*1024)
@@ -732,6 +736,7 @@ static int Direct3D9CreateShaders(vout_display_t *vd)
if (!selected_shader)
return VLC_SUCCESS; /* Nothing to do */
+#ifdef HAVE_D3DX9EFFECT_H
const char *shader_source_builtin = NULL;
char *shader_source_file = NULL;
FILE *fs = NULL;
@@ -785,11 +790,12 @@ static int Direct3D9CreateShaders(vout_display_t *vd)
return VLC_SUCCESS;
error:
- Direct3D9DestroyShaders(vd);
- free(selected_shader);
free(shader_source_file);
if (fs)
fclose(fs);
+#endif // HAVE_D3DX9EFFECT_H
+ Direct3D9DestroyShaders(vd);
+ free(selected_shader);
return VLC_EGENERIC;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/0c704925208969174ed0efa2cdc43fb3a0fb6001...41b7f888deb665948683bffcf55d0d653a9160ba
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/0c704925208969174ed0efa2cdc43fb3a0fb6001...41b7f888deb665948683bffcf55d0d653a9160ba
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list