[PATCH vkd3d 3/5] vkd3d-shader: Separate hlsl_report_message() into helpers for individual log levels.

Zebediah Figura (she/her) zfigura at codeweavers.com
Fri Feb 12 10:43:03 CST 2021


On 2/12/21 10:40 AM, Matteo Bruni wrote:
> On Wed, Feb 10, 2021 at 10:43 PM Zebediah Figura
> <zfigura at codeweavers.com> wrote:
>>
>> Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
>> ---
>>  libs/vkd3d-shader/hlsl.c |  23 +++++--
>>  libs/vkd3d-shader/hlsl.h |   9 ++-
>>  libs/vkd3d-shader/hlsl.l |   3 +-
>>  libs/vkd3d-shader/hlsl.y | 142 +++++++++++++++++++--------------------
>>  4 files changed, 93 insertions(+), 84 deletions(-)
>>
>> diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c
>> index 2b830a57..992e7062 100644
>> --- a/libs/vkd3d-shader/hlsl.c
>> +++ b/libs/vkd3d-shader/hlsl.c
>> @@ -25,15 +25,26 @@ void hlsl_message(const char *fmt, ...)
>>      /* FIXME */
>>  }
>>
>> -void hlsl_report_message(struct hlsl_ctx *ctx, const struct source_location loc,
>> -        enum hlsl_error_level level, const char *fmt, ...)
>> +void hlsl_note(struct hlsl_ctx *ctx, const struct source_location loc,
>> +        enum vkd3d_shader_log_level level, const char *fmt, ...)
>>  {
>>      /* FIXME */
>>
>> -    if (level == HLSL_LEVEL_ERROR)
>> -        set_parse_status(&ctx->status, PARSE_ERR);
>> -    else if (level == HLSL_LEVEL_WARNING)
>> -        set_parse_status(&ctx->status, PARSE_WARN);
>> +    set_parse_status(&ctx->status, PARSE_WARN);
>> +}
> 
> Just for the records, it seems a bit surprising for hlsl_note() to set
> the error status.
> 

Yes, that seems to be a copy/paste error. I'll send a v2...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20210212/b94e4e14/attachment.sig>


More information about the wine-devel mailing list