Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.y:
}
- assert(offset_dim); - if (params->args_count > 1 + multisampled) + if (!!offset_dim) { - if (!(load_params.texel_offset = add_implicit_conversion(ctx, block, params->args[1 + multisampled], - hlsl_get_vector_type(ctx, HLSL_TYPE_INT, offset_dim), loc))) - return false; + if (params->args_count > 1 + multisampled) + { + if (!(load_params.texel_offset = add_implicit_conversion(ctx, block, params->args[1 + multisampled], + hlsl_get_vector_type(ctx, HLSL_TYPE_INT, offset_dim), loc))) + return false; + } }
Can be simplified to if (offset_dim && ...) -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/569#note_60964