Skip to content

Commit

Permalink
d3d11: When using vkd3d, require 1.10 or newer
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo committed Dec 6, 2023
1 parent 2428453 commit 8b81b66
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions mojoshader_d3d11.c
Expand Up @@ -649,6 +649,22 @@ MOJOSHADER_d3d11Context* MOJOSHADER_d3d11CreateContext(
UNLOAD_D3DCOMPILER(compileDLL);
return NULL;
} // if
#ifdef USING_VKD3D
unsigned int major, minor;
const char *(*vkd3d_shader_get_version)(unsigned int *, unsigned int *);
vkd3d_shader_get_version = dlsym(compileDLL, "vkd3d_shader_get_version");
if (vkd3d_shader_get_version == NULL)
{
UNLOAD_D3DCOMPILER(compileDLL);
return NULL;
}
vkd3d_shader_get_version(&major, &minor);
if (!((major > 1) || (major == 1 && minor >= 10)))
{
UNLOAD_D3DCOMPILER(compileDLL);
return NULL;
}
#endif
#endif

if (m == NULL) m = MOJOSHADER_internal_malloc;
Expand Down

0 comments on commit 8b81b66

Please sign in to comment.