Re: [PATCH v2 0/1] MR685: vkd3d-shader/hlsl: Write the SFI0 section and "REQUIRES_ROVS" flag when ROVs are used.
Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/tpf.c:
+static void write_sm4_sfi0(struct hlsl_ctx *ctx, struct dxbc_writer *dxbc) +{ + struct extern_resource *extern_resources; + unsigned int extern_resources_count; + uint64_t *flags; + + flags = vkd3d_calloc(1, sizeof(*flags)); + + extern_resources = sm4_get_extern_resources(ctx, &extern_resources_count); + for (unsigned int i = 0; i < extern_resources_count; ++i) + { + if (extern_resources[i].data_type->e.resource.rasteriser_ordered) + *flags |= VKD3D_SM4_REQUIRES_ROVS; + } + sm4_free_extern_resources(extern_resources, extern_resources_count);
I'd rather accumulate flags while compiling the shader rather than doing another pass at the end. Not a terribly strong opinion, though. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/685#note_63346
participants (1)
-
Giovanni Mascellani (@giomasce)