mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader: Pass the interface info as part of the vkd3d_shader_compile_info structure chain.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
8ff9610fed
commit
c4e6657c11
@@ -129,7 +129,6 @@ static int vkd3d_shader_validate_spirv_target_info(const struct vkd3d_shader_spi
|
||||
|
||||
int vkd3d_shader_compile_dxbc(const struct vkd3d_shader_compile_info *compile_info,
|
||||
struct vkd3d_shader_code *spirv, unsigned int compiler_options,
|
||||
const struct vkd3d_shader_interface_info *shader_interface_info,
|
||||
const struct vkd3d_shader_spirv_target_info *info)
|
||||
{
|
||||
struct vkd3d_shader_instruction instruction;
|
||||
@@ -138,8 +137,8 @@ int vkd3d_shader_compile_dxbc(const struct vkd3d_shader_compile_info *compile_in
|
||||
struct vkd3d_shader_parser parser;
|
||||
int ret;
|
||||
|
||||
TRACE("compile_info %p, spirv %p, compiler_options %#x, shader_interface_info %p, info %p.\n",
|
||||
compile_info, spirv, compiler_options, shader_interface_info, info);
|
||||
TRACE("compile_info %p, spirv %p, compiler_options %#x, info %p.\n",
|
||||
compile_info, spirv, compiler_options, info);
|
||||
|
||||
if (compile_info->type != VKD3D_SHADER_STRUCTURE_TYPE_COMPILE_INFO)
|
||||
{
|
||||
@@ -147,12 +146,6 @@ int vkd3d_shader_compile_dxbc(const struct vkd3d_shader_compile_info *compile_in
|
||||
return VKD3D_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
if (shader_interface_info && shader_interface_info->type != VKD3D_SHADER_STRUCTURE_TYPE_INTERFACE_INFO)
|
||||
{
|
||||
WARN("Invalid structure type %#x.\n", shader_interface_info->type);
|
||||
return VKD3D_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
if ((ret = vkd3d_shader_validate_spirv_target_info(info)) < 0)
|
||||
return ret;
|
||||
|
||||
@@ -170,7 +163,7 @@ int vkd3d_shader_compile_dxbc(const struct vkd3d_shader_compile_info *compile_in
|
||||
vkd3d_shader_trace(parser.data);
|
||||
|
||||
if (!(spirv_compiler = vkd3d_dxbc_compiler_create(&parser.shader_version,
|
||||
&parser.shader_desc, compiler_options, shader_interface_info, info, &scan_info)))
|
||||
&parser.shader_desc, compiler_options, compile_info, info, &scan_info)))
|
||||
{
|
||||
ERR("Failed to create DXBC compiler.\n");
|
||||
vkd3d_shader_parser_destroy(&parser);
|
||||
|
Reference in New Issue
Block a user