vkd3d-shader/ir: Disallow OUTPUT registers in source parameters.

This commit is contained in:
Giovanni Mascellani 2024-10-09 23:01:50 +02:00 committed by Henri Verbeet
parent 5b5a27dccb
commit 6cbe5ffa15
Notes: Henri Verbeet 2024-10-10 20:10:37 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1172

View File

@ -6436,6 +6436,13 @@ static void vsir_validate_src_param(struct validation_context *ctx,
"Invalid NULL register used as source parameter.");
break;
case VKD3DSPR_OUTPUT:
if (ctx->program->shader_version.type != VKD3D_SHADER_TYPE_HULL
|| (ctx->phase != VKD3DSIH_HS_FORK_PHASE && ctx->phase != VKD3DSIH_HS_JOIN_PHASE))
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_REGISTER_TYPE,
"Invalid OUTPUT register used as source parameter.");
break;
default:
break;
}