mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/d3d-asm: Pass a prefix and suffix to shader_dump_tessellator_domain().
This commit is contained in:
parent
b98171878f
commit
f61a92b908
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
@ -514,27 +514,30 @@ static void shader_dump_uav_flags(struct vkd3d_d3d_asm_compiler *compiler, uint3
|
|||||||
vkd3d_string_buffer_printf(&compiler->buffer, "_unknown_flags(%#x)", uav_flags);
|
vkd3d_string_buffer_printf(&compiler->buffer, "_unknown_flags(%#x)", uav_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void shader_dump_tessellator_domain(struct vkd3d_d3d_asm_compiler *compiler,
|
static void shader_print_tessellator_domain(struct vkd3d_d3d_asm_compiler *compiler,
|
||||||
enum vkd3d_tessellator_domain domain)
|
const char *prefix, enum vkd3d_tessellator_domain d, const char *suffix)
|
||||||
{
|
{
|
||||||
struct vkd3d_string_buffer *buffer = &compiler->buffer;
|
struct vkd3d_string_buffer *buffer = &compiler->buffer;
|
||||||
|
const char *domain;
|
||||||
|
|
||||||
shader_addline(buffer, "domain_");
|
switch (d)
|
||||||
switch (domain)
|
|
||||||
{
|
{
|
||||||
case VKD3D_TESSELLATOR_DOMAIN_LINE:
|
case VKD3D_TESSELLATOR_DOMAIN_LINE:
|
||||||
shader_addline(buffer, "isoline");
|
domain = "domain_isoline";
|
||||||
break;
|
break;
|
||||||
case VKD3D_TESSELLATOR_DOMAIN_TRIANGLE:
|
case VKD3D_TESSELLATOR_DOMAIN_TRIANGLE:
|
||||||
shader_addline(buffer, "tri");
|
domain = "domain_tri";
|
||||||
break;
|
break;
|
||||||
case VKD3D_TESSELLATOR_DOMAIN_QUAD:
|
case VKD3D_TESSELLATOR_DOMAIN_QUAD:
|
||||||
shader_addline(buffer, "quad");
|
domain = "domain_quad";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
shader_addline(buffer, "unknown_tessellator_domain(%#x)", domain);
|
vkd3d_string_buffer_printf(buffer, "%s%s<unhandled tessellator domain %#x>%s%s",
|
||||||
break;
|
prefix, compiler->colours.error, d, compiler->colours.reset, suffix);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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_dump_tessellator_output_primitive(struct vkd3d_d3d_asm_compiler *compiler,
|
||||||
@ -1938,8 +1941,7 @@ static void shader_dump_instruction(struct vkd3d_d3d_asm_compiler *compiler,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VKD3DSIH_DCL_TESSELLATOR_DOMAIN:
|
case VKD3DSIH_DCL_TESSELLATOR_DOMAIN:
|
||||||
vkd3d_string_buffer_printf(buffer, " ");
|
shader_print_tessellator_domain(compiler, " ", ins->declaration.tessellator_domain, "");
|
||||||
shader_dump_tessellator_domain(compiler, ins->declaration.tessellator_domain);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VKD3DSIH_DCL_TESSELLATOR_OUTPUT_PRIMITIVE:
|
case VKD3DSIH_DCL_TESSELLATOR_OUTPUT_PRIMITIVE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user