mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/ir: Check that the DCL_INDEX_RANGE effective mask stabilizes after one iteration.
This commit is contained in:
parent
bbeecfc835
commit
703da18955
Notes:
Henri Verbeet
2024-12-09 16:18:44 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1305
@ -8593,8 +8593,13 @@ static void vsir_validate_dcl_index_range(struct validation_context *ctx,
|
||||
}
|
||||
|
||||
/* Check again to have at most one intersection for each register, but this
|
||||
* time using the effective write mask. This important for being able to
|
||||
* merge all the signature elements in a single one without conflicts. */
|
||||
* time using the effective write mask. Also check that we have stabilized,
|
||||
* i.e., the effective write mask now contains all the signature element
|
||||
* masks. This important for being able to merge all the signature elements
|
||||
* in a single one without conflicts (there is no hard reason why we
|
||||
* couldn't support an effective write mask that stabilizes after more
|
||||
* iterations, but the code would be more complicated, and we avoid that if
|
||||
* we can). */
|
||||
for (i = 0; i < range->register_count; ++i)
|
||||
{
|
||||
bool found = false;
|
||||
@ -8634,6 +8639,12 @@ static void vsir_validate_dcl_index_range(struct validation_context *ctx,
|
||||
range->dst.write_mask);
|
||||
|
||||
found = true;
|
||||
|
||||
if (~effective_write_mask & element->mask)
|
||||
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_WRITE_MASK,
|
||||
"Invalid write mask %#x on a signature element touched by a "
|
||||
"DCL_INDEX_RANGE instruction with effective write mask %#x.",
|
||||
element->mask, effective_write_mask);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user