mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader: Translate dcl_tessellator_output_primitive instructions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d74133fda5
commit
2838ee5833
@ -4558,6 +4558,33 @@ static void vkd3d_dxbc_compiler_emit_dcl_tessellator_domain(struct vkd3d_dxbc_co
|
||||
vkd3d_dxbc_compiler_emit_execution_mode(compiler, mode, NULL, 0);
|
||||
}
|
||||
|
||||
static void vkd3d_dxbc_compiler_emit_dcl_tessellator_output_primitive(struct vkd3d_dxbc_compiler *compiler,
|
||||
const struct vkd3d_shader_instruction *instruction)
|
||||
{
|
||||
enum vkd3d_tessellator_output_primitive primitive = instruction->declaration.tessellator_output_primitive;
|
||||
SpvExecutionMode mode;
|
||||
|
||||
switch (primitive)
|
||||
{
|
||||
case VKD3D_TESSELLATOR_OUTPUT_POINT:
|
||||
mode = SpvExecutionModePointMode;
|
||||
break;
|
||||
case VKD3D_TESSELLATOR_OUTPUT_LINE:
|
||||
return;
|
||||
case VKD3D_TESSELLATOR_OUTPUT_TRIANGLE_CW:
|
||||
mode = SpvExecutionModeVertexOrderCw;
|
||||
break;
|
||||
case VKD3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW:
|
||||
mode = SpvExecutionModeVertexOrderCcw;
|
||||
break;
|
||||
default:
|
||||
FIXME("Invalid tessellator output primitive %#x.\n", primitive);
|
||||
return;
|
||||
}
|
||||
|
||||
vkd3d_dxbc_compiler_emit_execution_mode(compiler, mode, NULL, 0);
|
||||
}
|
||||
|
||||
static void vkd3d_dxbc_compiler_emit_dcl_tessellator_partitioning(struct vkd3d_dxbc_compiler *compiler,
|
||||
const struct vkd3d_shader_instruction *instruction)
|
||||
{
|
||||
@ -6870,6 +6897,9 @@ int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler,
|
||||
case VKD3DSIH_DCL_TESSELLATOR_DOMAIN:
|
||||
vkd3d_dxbc_compiler_emit_dcl_tessellator_domain(compiler, instruction);
|
||||
break;
|
||||
case VKD3DSIH_DCL_TESSELLATOR_OUTPUT_PRIMITIVE:
|
||||
vkd3d_dxbc_compiler_emit_dcl_tessellator_output_primitive(compiler, instruction);
|
||||
break;
|
||||
case VKD3DSIH_DCL_TESSELLATOR_PARTITIONING:
|
||||
vkd3d_dxbc_compiler_emit_dcl_tessellator_partitioning(compiler, instruction);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user