=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: libs/vkd3d-shader: Translate dcl_tessellator_domain instructions.
Alexandre Julliard
julliard at winehq.org
Tue Feb 6 15:09:10 CST 2018
Module: vkd3d
Branch: master
Commit: f1de58c58e0b09ab184cbfaaa3f1a1599faf3513
URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=f1de58c58e0b09ab184cbfaaa3f1a1599faf3513
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Tue Feb 6 13:03:00 2018 +0100
libs/vkd3d-shader: Translate dcl_tessellator_domain instructions.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
libs/vkd3d-shader/spirv.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c
index 8a45676..85e2593 100644
--- a/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d-shader/spirv.c
@@ -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;
More information about the wine-cvs
mailing list