mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Pass a vkd3d_shader_source_list pointer to hlsl_ctx_init().
Instead of storing the list inside struct hlsl_ctx. The source file names in the list are used by the location information that the HLSL frontend produces, and end up being referenced by the vsir program. If we want the vsir program to be able to outlive the hlsl_ctx, its location information can't reference data owned by the hlsl_ctx.
This commit is contained in:
Notes:
Henri Verbeet
2025-08-07 20:51:41 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1671
@@ -7192,14 +7192,14 @@ preproc_directive:
|
||||
{
|
||||
if (strcmp($2, ctx->location.source_name))
|
||||
{
|
||||
if (!vkd3d_shader_source_list_append(&ctx->source_files, $2))
|
||||
if (!vkd3d_shader_source_list_append(ctx->source_files, $2))
|
||||
{
|
||||
ctx->result = VKD3D_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
else
|
||||
{
|
||||
ctx->location.line = $1;
|
||||
ctx->location.source_name = ctx->source_files.sources[ctx->source_files.count - 1];
|
||||
ctx->location.source_name = ctx->source_files->sources[ctx->source_files->count - 1];
|
||||
}
|
||||
}
|
||||
vkd3d_free($2);
|
||||
|
Reference in New Issue
Block a user