mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
vkd3d-shader: Enable GLSL target support when VKD3D_SHADER_UNSUPPORTED_GLSL is defined.
This commit is contained in:
parent
4553b2a0dc
commit
1fc55d80cd
Notes:
Alexandre Julliard
2024-03-08 23:49:12 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/696
@ -12,7 +12,7 @@ rm -fr build
|
||||
mkdir build
|
||||
cd build
|
||||
export LD_LIBRARY_PATH=/usr/local/lib
|
||||
if ../configure --enable-demos --with-spirv-tools DXCOMPILER_LIBS="-L/usr/local/lib" CFLAGS="-g -O2 -Werror" CPPFLAGS="-DVKD3D_SHADER_UNSUPPORTED_DXIL" && \
|
||||
if ../configure --enable-demos --with-spirv-tools DXCOMPILER_LIBS="-L/usr/local/lib" CFLAGS="-g -O2 -Werror" CPPFLAGS="-DVKD3D_SHADER_UNSUPPORTED_DXIL -DVKD3D_SHADER_UNSUPPORTED_GLSL" && \
|
||||
make -j$(nproc) ; then
|
||||
make -j$(nproc) AM_COLOR_TESTS=always check || \
|
||||
touch ../tests_failed
|
||||
|
@ -96,6 +96,8 @@ int vkd3d_glsl_generator_generate(struct vkd3d_glsl_generator *generator,
|
||||
unsigned int i;
|
||||
void *code;
|
||||
|
||||
ERR("Generating a GLSL shader. This is unsupported; you get to keep all the pieces if it breaks.\n");
|
||||
|
||||
vkd3d_string_buffer_printf(&generator->buffer, "#version 440\n\n");
|
||||
vkd3d_string_buffer_printf(&generator->buffer, "void main()\n{\n");
|
||||
|
||||
|
@ -1874,7 +1874,7 @@ const enum vkd3d_shader_target_type *vkd3d_shader_get_supported_target_types(
|
||||
VKD3D_SHADER_TARGET_SPIRV_TEXT,
|
||||
#endif
|
||||
VKD3D_SHADER_TARGET_D3D_ASM,
|
||||
#if 0
|
||||
#ifdef VKD3D_SHADER_UNSUPPORTED_GLSL
|
||||
VKD3D_SHADER_TARGET_GLSL,
|
||||
#endif
|
||||
};
|
||||
@ -1895,13 +1895,21 @@ const enum vkd3d_shader_target_type *vkd3d_shader_get_supported_target_types(
|
||||
VKD3D_SHADER_TARGET_D3D_ASM,
|
||||
};
|
||||
|
||||
#ifdef VKD3D_SHADER_UNSUPPORTED_DXIL
|
||||
static const enum vkd3d_shader_target_type dxbc_dxil_types[] =
|
||||
{
|
||||
VKD3D_SHADER_TARGET_SPIRV_BINARY,
|
||||
# ifdef HAVE_SPIRV_TOOLS
|
||||
VKD3D_SHADER_TARGET_SPIRV_TEXT,
|
||||
# endif
|
||||
VKD3D_SHADER_TARGET_D3D_ASM,
|
||||
};
|
||||
#endif
|
||||
|
||||
TRACE("source_type %#x, count %p.\n", source_type, count);
|
||||
|
||||
switch (source_type)
|
||||
{
|
||||
#ifdef VKD3D_SHADER_UNSUPPORTED_DXIL
|
||||
case VKD3D_SHADER_SOURCE_DXBC_DXIL:
|
||||
#endif
|
||||
case VKD3D_SHADER_SOURCE_DXBC_TPF:
|
||||
*count = ARRAY_SIZE(dxbc_tpf_types);
|
||||
return dxbc_tpf_types;
|
||||
@ -1914,6 +1922,12 @@ const enum vkd3d_shader_target_type *vkd3d_shader_get_supported_target_types(
|
||||
*count = ARRAY_SIZE(d3dbc_types);
|
||||
return d3dbc_types;
|
||||
|
||||
#ifdef VKD3D_SHADER_UNSUPPORTED_DXIL
|
||||
case VKD3D_SHADER_SOURCE_DXBC_DXIL:
|
||||
*count = ARRAY_SIZE(dxbc_dxil_types);
|
||||
return dxbc_dxil_types;
|
||||
#endif
|
||||
|
||||
default:
|
||||
*count = 0;
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user