mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/d3d-asm: Pass a prefix and suffix to shader_dump_tessellator_output_primitive().
This commit is contained in:
parent
f61a92b908
commit
5f5145b8f8
Notes:
Alexandre Julliard
2024-03-18 23:26:29 +01:00
Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/727
@ -540,30 +540,33 @@ static void shader_print_tessellator_domain(struct vkd3d_d3d_asm_compiler *compi
|
|||||||
vkd3d_string_buffer_printf(buffer, "%s%s%s", prefix, domain, suffix);
|
vkd3d_string_buffer_printf(buffer, "%s%s%s", prefix, domain, suffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void shader_dump_tessellator_output_primitive(struct vkd3d_d3d_asm_compiler *compiler,
|
static void shader_print_tessellator_output_primitive(struct vkd3d_d3d_asm_compiler *compiler,
|
||||||
enum vkd3d_shader_tessellator_output_primitive output_primitive)
|
const char *prefix, enum vkd3d_shader_tessellator_output_primitive p, const char *suffix)
|
||||||
{
|
{
|
||||||
struct vkd3d_string_buffer *buffer = &compiler->buffer;
|
struct vkd3d_string_buffer *buffer = &compiler->buffer;
|
||||||
|
const char *primitive;
|
||||||
|
|
||||||
shader_addline(buffer, "output_");
|
switch (p)
|
||||||
switch (output_primitive)
|
|
||||||
{
|
{
|
||||||
case VKD3D_SHADER_TESSELLATOR_OUTPUT_POINT:
|
case VKD3D_SHADER_TESSELLATOR_OUTPUT_POINT:
|
||||||
shader_addline(buffer, "point");
|
primitive = "output_point";
|
||||||
break;
|
break;
|
||||||
case VKD3D_SHADER_TESSELLATOR_OUTPUT_LINE:
|
case VKD3D_SHADER_TESSELLATOR_OUTPUT_LINE:
|
||||||
shader_addline(buffer, "line");
|
primitive = "output_line";
|
||||||
break;
|
break;
|
||||||
case VKD3D_SHADER_TESSELLATOR_OUTPUT_TRIANGLE_CW:
|
case VKD3D_SHADER_TESSELLATOR_OUTPUT_TRIANGLE_CW:
|
||||||
shader_addline(buffer, "triangle_cw");
|
primitive = "output_triangle_cw";
|
||||||
break;
|
break;
|
||||||
case VKD3D_SHADER_TESSELLATOR_OUTPUT_TRIANGLE_CCW:
|
case VKD3D_SHADER_TESSELLATOR_OUTPUT_TRIANGLE_CCW:
|
||||||
shader_addline(buffer, "triangle_ccw");
|
primitive = "output_triangle_ccw";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
shader_addline(buffer, "unknown_tessellator_output_primitive(%#x)", output_primitive);
|
vkd3d_string_buffer_printf(buffer, "%s%s<unhandled tessellator output primitive %#x>%s%s",
|
||||||
break;
|
prefix, compiler->colours.error, p, compiler->colours.reset, suffix);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vkd3d_string_buffer_printf(buffer, "%s%s%s", prefix, primitive, suffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void shader_dump_tessellator_partitioning(struct vkd3d_d3d_asm_compiler *compiler,
|
static void shader_dump_tessellator_partitioning(struct vkd3d_d3d_asm_compiler *compiler,
|
||||||
@ -1945,8 +1948,7 @@ static void shader_dump_instruction(struct vkd3d_d3d_asm_compiler *compiler,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VKD3DSIH_DCL_TESSELLATOR_OUTPUT_PRIMITIVE:
|
case VKD3DSIH_DCL_TESSELLATOR_OUTPUT_PRIMITIVE:
|
||||||
vkd3d_string_buffer_printf(buffer, " ");
|
shader_print_tessellator_output_primitive(compiler, " ", ins->declaration.tessellator_output_primitive, "");
|
||||||
shader_dump_tessellator_output_primitive(compiler, ins->declaration.tessellator_output_primitive);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VKD3DSIH_DCL_TESSELLATOR_PARTITIONING:
|
case VKD3DSIH_DCL_TESSELLATOR_PARTITIONING:
|
||||||
|
Loading…
Reference in New Issue
Block a user