Re: [PATCH vkd3d 5/5] vkd3d-shader: Make the HLSL compiler reëntrant.

Zebediah Figura (she/her) zfigura at codeweavers.com
Tue Feb 9 10:31:35 CST 2021


On 2/9/21 10:23 AM, Matteo Bruni wrote:
> On Thu, Feb 4, 2021 at 11:34 PM Zebediah Figura <zfigura at codeweavers.com> wrote:
>>
>> Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
>> ---
>> This is an unfortunately huge patch, but the majority of the line count is due
>> to passing "ctx" to functions, or treating it as a pointer where it previously
>> was not.
> 
> Sorry, took me a while to get at these. Yeah, not much you can do
> about patch size, and as you mentioned most of it is obvious search
> and replace so not particularly problematic.
> 
> Patch is great. I have a potential followup idea, although it's going
> to be more churn for no real benefit, so feel free to dismiss it.
> 
>>  libs/vkd3d-shader/hlsl.c | 100 ++++-----
>>  libs/vkd3d-shader/hlsl.h |  44 ++--
>>  libs/vkd3d-shader/hlsl.l |  98 ++++----
>>  libs/vkd3d-shader/hlsl.y | 466 ++++++++++++++++++++-------------------
>>  4 files changed, 362 insertions(+), 346 deletions(-)
>>
>> diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c
>> index 43072c26..2b830a57 100644
>> --- a/libs/vkd3d-shader/hlsl.c
>> +++ b/libs/vkd3d-shader/hlsl.c
>> @@ -25,19 +25,20 @@ void hlsl_message(const char *fmt, ...)
>>      /* FIXME */
>>  }
>>
>> -void hlsl_report_message(const struct source_location loc,
>> +void hlsl_report_message(struct hlsl_ctx *ctx, const struct source_location loc,
>>          enum hlsl_error_level level, const char *fmt, ...)
> 
> It feels like the "loc" argument was intended to be a pointer.
> 

I guess. I know that flat structs are rare and thus look weird. On the
other hand, it's small, and I do kind of like avoiding "&@". I don't
think I feel strongly about it.

-------------- 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/20210209/c6d47224/attachment.sig>


More information about the wine-devel mailing list