On Wed, 30 Jun 2021 at 05:11, Conor McCarthy cmccarthy@codeweavers.com wrote:
@@ -571,6 +572,8 @@ static void VKD3D_PRINTF_FUNC(3, 4) shader_read_error(struct vkd3d_sm4_data *pri va_start(args, format); vkd3d_shader_verror(priv->message_context, NULL, error, format, args); va_end(args);
- priv->valid = false;
}
[...]
@@ -1949,6 +1953,7 @@ void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct vkd3d_sha if (opcode_info->read_opcode_func) { opcode_info->read_opcode_func(ins, opcode, opcode_token, p, len, priv);
}return priv->valid;
I think that's a bit too coarse. In particular, if an error is not fatal (like for example the invalid register range one), it's often useful to continue parsing and also report subsequent errors and warnings.