mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Support void pass-through hull shader control point functions.
This commit is contained in:
Notes:
Henri Verbeet
2025-05-24 21:48:08 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1509
@@ -13526,7 +13526,26 @@ static void process_entry_function(struct hlsl_ctx *ctx,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (profile->type == VKD3D_SHADER_TYPE_HULL && !ctx->is_patch_constant_func)
|
if (profile->type == VKD3D_SHADER_TYPE_HULL && !ctx->is_patch_constant_func)
|
||||||
hlsl_fixme(ctx, &entry_func->loc, "Passthrough hull shader control point function.");
|
{
|
||||||
|
if (!ctx->input_control_point_type)
|
||||||
|
{
|
||||||
|
hlsl_error(ctx, &entry_func->loc, VKD3D_SHADER_ERROR_HLSL_MISSING_INPUT_PATCH,
|
||||||
|
"Pass-through control point function \"%s\" is missing an InputPatch parameter.",
|
||||||
|
entry_func->func->name);
|
||||||
|
}
|
||||||
|
else if (ctx->output_control_point_count
|
||||||
|
&& ctx->output_control_point_count != ctx->input_control_point_count)
|
||||||
|
{
|
||||||
|
hlsl_error(ctx, &entry_func->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_CONTROL_POINT_COUNT,
|
||||||
|
"Output control point count %u does not match the input control point count %u.",
|
||||||
|
ctx->output_control_point_count, ctx->input_control_point_count);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ctx->output_control_point_type = ctx->input_control_point_type;
|
||||||
|
ctx->output_control_point_count = ctx->input_control_point_count;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profile->type == VKD3D_SHADER_TYPE_GEOMETRY && ctx->input_primitive_type == VKD3D_PT_UNDEFINED)
|
if (profile->type == VKD3D_SHADER_TYPE_GEOMETRY && ctx->input_primitive_type == VKD3D_PT_UNDEFINED)
|
||||||
|
@@ -174,6 +174,7 @@ enum vkd3d_shader_error
|
|||||||
VKD3D_SHADER_ERROR_HLSL_INVALID_MAX_VERTEX_COUNT = 5042,
|
VKD3D_SHADER_ERROR_HLSL_INVALID_MAX_VERTEX_COUNT = 5042,
|
||||||
VKD3D_SHADER_ERROR_HLSL_MISSING_PRIMITIVE_TYPE = 5043,
|
VKD3D_SHADER_ERROR_HLSL_MISSING_PRIMITIVE_TYPE = 5043,
|
||||||
VKD3D_SHADER_ERROR_HLSL_MISPLACED_STREAM_OUTPUT = 5044,
|
VKD3D_SHADER_ERROR_HLSL_MISPLACED_STREAM_OUTPUT = 5044,
|
||||||
|
VKD3D_SHADER_ERROR_HLSL_MISSING_INPUT_PATCH = 5045,
|
||||||
|
|
||||||
VKD3D_SHADER_WARNING_HLSL_IMPLICIT_TRUNCATION = 5300,
|
VKD3D_SHADER_WARNING_HLSL_IMPLICIT_TRUNCATION = 5300,
|
||||||
VKD3D_SHADER_WARNING_HLSL_DIVISION_BY_ZERO = 5301,
|
VKD3D_SHADER_WARNING_HLSL_DIVISION_BY_ZERO = 5301,
|
||||||
|
@@ -99,7 +99,7 @@ if(!llvmpipe) todo(glsl | msl | mvk & vulkan) draw 3 control point patch list 3
|
|||||||
if(!llvmpipe) todo(mvk) probe (0, 0, 640, 480) rgba(0.0, 1.0, 0.0, 1.0)
|
if(!llvmpipe) todo(mvk) probe (0, 0, 640, 480) rgba(0.0, 1.0, 0.0, 1.0)
|
||||||
|
|
||||||
% Passthrough hull shader control point function.
|
% Passthrough hull shader control point function.
|
||||||
[hull shader todo]
|
[hull shader]
|
||||||
struct data
|
struct data
|
||||||
{
|
{
|
||||||
float4 position : SV_Position;
|
float4 position : SV_Position;
|
||||||
@@ -131,7 +131,7 @@ void main(InputPatch<data, 3> input)
|
|||||||
|
|
||||||
[test]
|
[test]
|
||||||
% DXC doesn't generate a passthrough control point phase like FXC does
|
% DXC doesn't generate a passthrough control point phase like FXC does
|
||||||
if(!llvmpipe & sm<6) todo draw 3 control point patch list 3
|
if(!llvmpipe & sm<6) todo(glsl | msl | mvk & vulkan) draw 3 control point patch list 3
|
||||||
if(!llvmpipe & sm<6) todo(mvk) probe (0, 0, 640, 480) rgba(0.0, 1.0, 0.0, 1.0)
|
if(!llvmpipe & sm<6) todo(mvk) probe (0, 0, 640, 480) rgba(0.0, 1.0, 0.0, 1.0)
|
||||||
|
|
||||||
[require]
|
[require]
|
||||||
|
Reference in New Issue
Block a user