Commit 2558f5f2 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Implement shader_spirv_compile_vk().

parent 3f3b0ac1
......@@ -632,6 +632,8 @@ POLL_LIBS
TOOLSEXT
MSVCRTFLAGS
EXTRACFLAGS
VKD3D_SHADER_LIBS
VKD3D_SHADER_CFLAGS
VKD3D_LIBS
VKD3D_CFLAGS
NETAPI_LIBS
......@@ -1928,6 +1930,8 @@ NETAPI_CFLAGS
NETAPI_LIBS
VKD3D_CFLAGS
VKD3D_LIBS
VKD3D_SHADER_CFLAGS
VKD3D_SHADER_LIBS
LDAP_CFLAGS
LDAP_LIBS'
......@@ -2730,6 +2734,10 @@ Some influential environment variables:
VKD3D_CFLAGS
C compiler flags for libvkd3d, overriding pkg-config
VKD3D_LIBS Linker flags for libvkd3d, overriding pkg-config
VKD3D_SHADER_CFLAGS
C compiler flags for libvkd3d-shader, overriding pkg-config
VKD3D_SHADER_LIBS
Linker flags for libvkd3d-shader, overriding pkg-config
LDAP_CFLAGS C compiler flags for openldap, overriding pkg-config
LDAP_LIBS Linker flags for openldap, overriding pkg-config
......@@ -16747,6 +16755,80 @@ _ACEOF
fi
CPPFLAGS=$ac_save_CPPFLAGS
if ${VKD3D_SHADER_CFLAGS:+false} :; then :
if ${PKG_CONFIG+:} false; then :
VKD3D_SHADER_CFLAGS=`$PKG_CONFIG --cflags libvkd3d-shader 2>/dev/null`
fi
fi
if ${VKD3D_SHADER_LIBS:+false} :; then :
if ${PKG_CONFIG+:} false; then :
VKD3D_SHADER_LIBS=`$PKG_CONFIG --libs libvkd3d-shader 2>/dev/null`
fi
fi
$as_echo "$as_me:${as_lineno-$LINENO}: libvkd3d-shader cflags: $VKD3D_SHADER_CFLAGS" >&5
$as_echo "$as_me:${as_lineno-$LINENO}: libvkd3d-shader libs: $VKD3D_SHADER_LIBS" >&5
ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $VKD3D_SHADER_CFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lvkd3d-shader" >&5
$as_echo_n "checking for -lvkd3d-shader... " >&6; }
if ${ac_cv_lib_soname_vkd3d_shader+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_soname_save_LIBS=$LIBS
LIBS="-lvkd3d-shader $VKD3D_SHADER_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char vkd3d_shader_compile ();
int
main ()
{
return vkd3d_shader_compile ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
case "$LIBEXT" in
dll) ac_cv_lib_soname_vkd3d_shader=`$ac_cv_path_LDD conftest.exe | grep "vkd3d-shader" | sed -e "s/dll.*/dll/"';2,$d'` ;;
dylib) ac_cv_lib_soname_vkd3d_shader=`$OTOOL -L conftest$ac_exeext | grep "libvkd3d-shader\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libvkd3d-shader\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
*) ac_cv_lib_soname_vkd3d_shader=`$READELF -d conftest$ac_exeext | grep "NEEDED.*libvkd3d-shader\\.$LIBEXT" | sed -e "s/^.*\\[\\(libvkd3d-shader\\.$LIBEXT[^ ]*\\)\\].*$/\1/"';2,$d'`
if ${ac_cv_lib_soname_vkd3d_shader:+false} :; then :
ac_cv_lib_soname_vkd3d_shader=`$LDD conftest$ac_exeext | grep "libvkd3d-shader\\.$LIBEXT" | sed -e "s/^.*\(libvkd3d-shader\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'`
fi ;;
esac
else
ac_cv_lib_soname_vkd3d_shader=
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_soname_save_LIBS
fi
if ${ac_cv_lib_soname_vkd3d_shader:+false} :; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_vkd3d_shader" >&5
$as_echo "$ac_cv_lib_soname_vkd3d_shader" >&6; }
cat >>confdefs.h <<_ACEOF
#define SONAME_LIBVKD3D_SHADER "$ac_cv_lib_soname_vkd3d_shader"
_ACEOF
fi
CPPFLAGS=$ac_save_CPPFLAGS
fi
if test "x$ac_cv_lib_soname_vkd3d" = "x"; then :
case "x$with_vkd3d" in
......@@ -19897,6 +19979,8 @@ NETAPI_CFLAGS = $NETAPI_CFLAGS
NETAPI_LIBS = $NETAPI_LIBS
VKD3D_CFLAGS = $VKD3D_CFLAGS
VKD3D_LIBS = $VKD3D_LIBS
VKD3D_SHADER_CFLAGS = $VKD3D_SHADER_CFLAGS
VKD3D_SHADER_LIBS = $VKD3D_SHADER_LIBS
POLL_LIBS = $POLL_LIBS
RT_LIBS = $RT_LIBS
LDAP_CFLAGS = $LDAP_CFLAGS
......
......@@ -1995,6 +1995,8 @@ if test "x$with_vkd3d" != "xno"
then
WINE_PACKAGE_FLAGS(VKD3D,[libvkd3d],,,,
[WINE_CHECK_SONAME(vkd3d,vkd3d_get_dxgi_format,,,[$VKD3D_LIBS])])
WINE_PACKAGE_FLAGS(VKD3D_SHADER,[libvkd3d-shader],,,,
[WINE_CHECK_SONAME(vkd3d-shader,vkd3d_shader_compile,,,[$VKD3D_SHADER_LIBS])])
fi
WINE_NOTICE_WITH(vkd3d,[test "x$ac_cv_lib_soname_vkd3d" = "x"],
[vkd3d ${notice_platform}development files not found (or too old), Direct3D 12 won't be supported.])
......
MODULE = wined3d.dll
IMPORTLIB = wined3d
IMPORTS = opengl32 user32 gdi32 advapi32
EXTRAINCL = $(VKD3D_SHADER_CFLAGS)
C_SRCS = \
adapter_gl.c \
......
......@@ -34,9 +34,6 @@
#include <limits.h>
#include <stdio.h>
#ifdef HAVE_FLOAT_H
# include <float.h>
#endif
#include "wined3d_private.h"
......
......@@ -405,6 +405,8 @@ static BOOL wined3d_dll_destroy(HINSTANCE hInstDLL)
DWORD wined3d_context_tls_idx = context_get_tls_idx();
unsigned int i;
wined3d_spirv_shader_backend_cleanup();
if (!TlsFree(wined3d_context_tls_idx))
{
DWORD err = GetLastError();
......
......@@ -51,6 +51,9 @@
#include "wine/debug.h"
#include "wine/heap.h"
#include "wine/unicode.h"
#ifdef HAVE_FLOAT_H
# include <float.h>
#endif
#include "objbase.h"
#include "wine/wined3d.h"
......@@ -1477,6 +1480,7 @@ extern const struct wined3d_shader_backend_ops arb_program_shader_backend DECLSP
extern const struct wined3d_shader_backend_ops none_shader_backend DECLSPEC_HIDDEN;
const struct wined3d_shader_backend_ops *wined3d_spirv_shader_backend_init_vk(void) DECLSPEC_HIDDEN;
void wined3d_spirv_shader_backend_cleanup(void) DECLSPEC_HIDDEN;
#define GL_EXTCALL(f) (gl_info->gl_ops.ext.p_##f)
......
......@@ -1397,6 +1397,9 @@
/* Define to the soname of the libvkd3d library. */
#undef SONAME_LIBVKD3D
/* Define to the soname of the libvkd3d-shader library. */
#undef SONAME_LIBVKD3D_SHADER
/* Define to the soname of the libvulkan library. */
#undef SONAME_LIBVULKAN
......
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