[PATCH vkd3d 4/6] vkd3d-shader: Mark the return variable as an output varying.
Zebediah Figura (she/her)
zfigura at codeweavers.com
Mon Apr 26 11:04:00 CDT 2021
On 4/26/21 7:49 AM, Matteo Bruni wrote:
> On Wed, Apr 21, 2021 at 6:30 AM Zebediah Figura <zfigura at codeweavers.com> wrote:
>>
>> Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
>> ---
>> libs/vkd3d-shader/hlsl.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c
>> index 50b40d65..b48bd250 100644
>> --- a/libs/vkd3d-shader/hlsl.c
>> +++ b/libs/vkd3d-shader/hlsl.c
>> @@ -576,6 +576,7 @@ struct hlsl_ir_function_decl *hlsl_new_func_decl(struct hlsl_ctx *ctx, struct hl
>> vkd3d_free(decl);
>> return NULL;
>> }
>> + return_var->is_output_varying = 1;
>> list_add_tail(&ctx->globals->vars, &return_var->scope_entry);
>> decl->return_var = return_var;
>> }
>
> This doesn't seem right. I don't think that this should apply to
> non-main functions at least. I'm not sure that it is so clear cut for
> the entry point function either (unless there are already tests that I
> missed, in which case, nevermind).
>
See line 98 of hlsl-invalid.shader_test.
We currently mark all function arguments as varyings, which I would
agree isn't really correct, though it doesn't cause problems, since we
only care about those flags for the entry point.
I guess we could defer setting those flags, one way or another.
More information about the wine-devel
mailing list