vkd3d-shader/hlsl: Reject geometry shaders with instance count.

We currently emit a warning and miscompile them.
This commit is contained in:
Giovanni Mascellani
2025-07-26 14:03:05 +02:00
committed by Henri Verbeet
parent 22f84317c0
commit aba355896f
Notes: Henri Verbeet 2025-07-29 13:34:53 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1654
2 changed files with 5 additions and 3 deletions

View File

@@ -7549,6 +7549,8 @@ static void parse_entry_function_attributes(struct hlsl_ctx *ctx, struct hlsl_ir
entry_func->early_depth_test = true;
else if (!strcmp(attr->name, "maxvertexcount") && profile->type == VKD3D_SHADER_TYPE_GEOMETRY)
parse_maxvertexcount_attribute(ctx, attr);
else if (!strcmp(attr->name, "instance") && profile->type == VKD3D_SHADER_TYPE_GEOMETRY)
hlsl_fixme(ctx, &entry_func->attrs[i]->loc, "Geometry shader instance count");
else
hlsl_warning(ctx, &entry_func->attrs[i]->loc, VKD3D_SHADER_WARNING_HLSL_UNKNOWN_ATTRIBUTE,
"Ignoring unknown attribute \"%s\".", entry_func->attrs[i]->name);