On Wed, Jan 27, 2021 at 3:20 PM Henri Verbeet hverbeet@gmail.com wrote:
On Tue, 26 Jan 2021 at 20:27, Matteo Bruni mbruni@codeweavers.com wrote:
- if (!options->preprocess_only && options->source_type == VKD3D_SHADER_SOURCE_HLSL && !options->profile)
- if (!options->preprocess_only && options->source_type == VKD3D_SHADER_SOURCE_HLSL) {
fprintf(stderr, "You need to specify a profile when compiling from HLSL source.\n");
return false;
if (!options->profile)
{
fprintf(stderr, "You need to specify a profile when compiling from HLSL source.\n");
return false;
}
if (!options->entry_point)
options->entry_point = "main";
Perhaps it's worth being explicit about this in vkd3d-compiler, but strictly speaking this is superfluous. The "entry_point" fields in both struct vkd3d_shader_hlsl_source_info and struct vkd3d_shader_spirv_target_info are specified to be "main" if NULL.
Pretty sure it crashed for me without this hunk. I'll have another look and fix it properly, if necessary.