vkd3d-shader: Pass down SBT descriptor size to dxil-spirv.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
This commit is contained in:
Hans-Kristian Arntzen 2021-02-22 12:07:45 +01:00
parent 15e36a0430
commit a90ed938b4
3 changed files with 16 additions and 0 deletions

View File

@ -251,6 +251,7 @@ struct vkd3d_shader_interface_local_info
unsigned int shader_record_buffer_count;
const struct vkd3d_shader_resource_binding *bindings;
unsigned int binding_count;
uint32_t descriptor_size;
};
struct vkd3d_shader_transform_feedback_element

View File

@ -984,6 +984,19 @@ int vkd3d_shader_compile_dxil_export(const struct vkd3d_shader_code *dxil,
}
}
{
const struct dxil_spv_option_sbt_descriptor_size_log2 helper =
{ { DXIL_SPV_OPTION_SBT_DESCRIPTOR_SIZE_LOG2 },
vkd3d_bitmask_tzcnt32(shader_interface_local_info->descriptor_size),
vkd3d_bitmask_tzcnt32(shader_interface_local_info->descriptor_size) };
if (dxil_spv_converter_add_option(converter, &helper.base) != DXIL_SPV_SUCCESS)
{
ERR("dxil-spirv does not support SBT_DESCRIPTOR_SIZE_LOG2.\n");
ret = VKD3D_ERROR_NOT_IMPLEMENTED;
goto end;
}
}
{
const struct dxil_spv_option_bindless_offset_buffer_layout helper =
{ { DXIL_SPV_OPTION_BINDLESS_OFFSET_BUFFER_LAYOUT },

View File

@ -576,6 +576,8 @@ static HRESULT d3d12_state_object_compile_pipeline(struct d3d12_state_object *ob
else
memset(&shader_interface_local_info, 0, sizeof(shader_interface_local_info));
shader_interface_local_info.descriptor_size = sizeof(struct d3d12_desc);
for (i = 0; i < data->entry_points_count; i++)
{
entry = &data->entry_points[i];