mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/ir: Test the data type when validating comparison operations.
I had forgot that bit.
This commit is contained in:
committed by
Henri Verbeet
parent
0c3250122c
commit
98b0ca544a
Notes:
Henri Verbeet
2025-07-14 18:53:08 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1608
@@ -10603,7 +10603,7 @@ static void vsir_validate_comparison_operation(struct validation_context *ctx,
|
||||
"Invalid data type %#x for result of comparison operation \"%s\" (%#x).",
|
||||
dst_data_type, vsir_opcode_get_name(instruction->opcode, "<unknown>"), instruction->opcode);
|
||||
|
||||
if (instruction->src_count < 1)
|
||||
if (instruction->src_count == 0)
|
||||
return;
|
||||
|
||||
src_data_type = instruction->src[0].reg.data_type;
|
||||
@@ -10611,6 +10611,11 @@ static void vsir_validate_comparison_operation(struct validation_context *ctx,
|
||||
if (src_data_type >= VKD3D_DATA_COUNT)
|
||||
return;
|
||||
|
||||
if (!types[src_data_type])
|
||||
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_DATA_TYPE,
|
||||
"Invalid data type %#x for comparison operation \"%s\" (%#x).",
|
||||
src_data_type, vsir_opcode_get_name(instruction->opcode, "<unknown>"), instruction->opcode);
|
||||
|
||||
for (i = 1; i < instruction->src_count; ++i)
|
||||
{
|
||||
if (instruction->src[i].reg.data_type != src_data_type)
|
||||
|
Reference in New Issue
Block a user