mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/hlsl: Record default values for uniforms and constant buffers.
This commit is contained in:
committed by
Henri Verbeet
parent
1fe7a6581b
commit
e8dbc36bd2
Notes:
Henri Verbeet
2024-06-11 16:55:09 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/787
@ -218,6 +218,14 @@ static void prepend_uniform_copy(struct hlsl_ctx *ctx, struct hlsl_block *block,
|
||||
uniform->is_uniform = 1;
|
||||
uniform->is_param = temp->is_param;
|
||||
uniform->buffer = temp->buffer;
|
||||
if (temp->default_values)
|
||||
{
|
||||
/* Transfer default values from the temp to the uniform. */
|
||||
assert(!uniform->default_values);
|
||||
assert(hlsl_type_component_count(temp->data_type) == hlsl_type_component_count(uniform->data_type));
|
||||
uniform->default_values = temp->default_values;
|
||||
temp->default_values = NULL;
|
||||
}
|
||||
|
||||
if (!(new_name = hlsl_sprintf_alloc(ctx, "<temp-%s>", temp->name)))
|
||||
return;
|
||||
|
Reference in New Issue
Block a user