On Wed, 30 Jun 2021 at 05:11, Conor McCarthy cmccarthy@codeweavers.com wrote:
+static void VKD3D_PRINTF_FUNC(3, 4) shader_read_error(struct vkd3d_sm4_data *priv,
enum vkd3d_shader_error error, const char *format, ...)
+{
- va_list args;
- va_start(args, format);
- vkd3d_shader_verror(priv->message_context, NULL, error, format, args);
- va_end(args);
+}
That should probably be called shader_sm4_error(). We'd also want to keep track of the source location, although that doesn't need to be in this patch.
static bool shader_sm4_read_src_param(struct vkd3d_sm4_data *priv, const DWORD **ptr, const DWORD *end, enum vkd3d_data_type data_type, struct vkd3d_shader_src_param *src_param); static bool shader_sm4_read_dst_param(struct vkd3d_sm4_data *priv, const DWORD **ptr, const DWORD *end, @@ -629,7 +641,11 @@ static void shader_sm4_read_descriptor_register_range(struct vkd3d_sm4_data *pri range->first = reg->idx[shader_is_sm_5_1(priv) ? 1 : 0].offset; range->last = reg->idx[shader_is_sm_5_1(priv) ? 2 : 0].offset; if (range->last < range->first)
- { FIXME("Invalid register range [%u:%u].\n", range->first, range->last);
shader_read_error(priv, VKD3D_SHADER_ERROR_SPV_INVALID_REGISTER_RANGE,
"Last register %u must not be less than first register %u in range.\n", range->last, range->first);
- }
}
VKD3D_SHADER_ERROR_SPV_ errors are for errors specific to SPIR-V generation. This should be a VKD3D_SHADER_ERROR_TPF_ error.