mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Validate and record input primitive types in geometry shaders.
This commit is contained in:
Notes:
Henri Verbeet
2025-03-12 22:20:50 +01:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1405
@@ -298,6 +298,12 @@ bool hlsl_type_is_patch_array(const struct hlsl_type *type)
|
||||
|| type->e.array.array_type == HLSL_ARRAY_PATCH_OUTPUT);
|
||||
}
|
||||
|
||||
bool hlsl_type_is_primitive_array(const struct hlsl_type *type)
|
||||
{
|
||||
return type->class == HLSL_CLASS_ARRAY && (type->e.array.array_type != HLSL_ARRAY_GENERIC
|
||||
|| (type->modifiers & HLSL_PRIMITIVE_MODIFIERS_MASK));
|
||||
}
|
||||
|
||||
bool hlsl_base_type_is_integer(enum hlsl_base_type type)
|
||||
{
|
||||
switch (type)
|
||||
@@ -4746,6 +4752,7 @@ static bool hlsl_ctx_init(struct hlsl_ctx *ctx, const struct vkd3d_shader_compil
|
||||
ctx->partitioning = 0;
|
||||
ctx->input_control_point_count = UINT_MAX;
|
||||
ctx->max_vertex_count = 0;
|
||||
ctx->input_primitive_type = VKD3D_PT_UNDEFINED;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user