Skip to content
Snippets Groups Projects
Commit f1de58c5 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard
Browse files

libs/vkd3d-shader: Translate dcl_tessellator_domain instructions.

parent 8d2c59dd
No related branches found
No related tags found
No related merge requests found
......@@ -3704,6 +3704,31 @@ static void vkd3d_dxbc_compiler_emit_dcl_gs_instances(struct vkd3d_dxbc_compiler
SpvExecutionModeInvocations, instruction->declaration.count);
}
static void vkd3d_dxbc_compiler_emit_dcl_tessellator_domain(struct vkd3d_dxbc_compiler *compiler,
const struct vkd3d_shader_instruction *instruction)
{
enum vkd3d_tessellator_domain domain = instruction->declaration.tessellator_domain;
SpvExecutionMode mode;
switch (domain)
{
case VKD3D_TESSELLATOR_DOMAIN_LINE:
mode = SpvExecutionModeIsolines;
break;
case VKD3D_TESSELLATOR_DOMAIN_TRIANGLE:
mode = SpvExecutionModeTriangles;
break;
case VKD3D_TESSELLATOR_DOMAIN_QUAD:
mode = SpvExecutionModeQuads;
break;
default:
FIXME("Invalid tessellator domain %#x.\n", domain);
return;
}
vkd3d_dxbc_compiler_emit_execution_mode(compiler, mode, NULL, 0);
}
static void vkd3d_dxbc_compiler_emit_dcl_thread_group(struct vkd3d_dxbc_compiler *compiler,
const struct vkd3d_shader_instruction *instruction)
{
......@@ -5644,6 +5669,9 @@ void vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler
case VKD3DSIH_DCL_GS_INSTANCES:
vkd3d_dxbc_compiler_emit_dcl_gs_instances(compiler, instruction);
break;
case VKD3DSIH_DCL_TESSELLATOR_DOMAIN:
vkd3d_dxbc_compiler_emit_dcl_tessellator_domain(compiler, instruction);
break;
case VKD3DSIH_DCL_THREAD_GROUP:
vkd3d_dxbc_compiler_emit_dcl_thread_group(compiler, instruction);
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment