[PATCH vkd3d 2/3] libs/vkd3d-shader: Use our own SPIR-V generator ID.

Józef Kucia joseph.kucia at gmail.com
Fri Feb 2 08:39:22 CST 2018


From: Józef Kucia <jkucia at codeweavers.com>

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 libs/vkd3d-shader/spirv.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c
index d92b7b1336b7..6eb1537f0b86 100644
--- a/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d-shader/spirv.c
@@ -87,6 +87,10 @@ static void vkd3d_spirv_validate(const struct vkd3d_shader_code *spirv) {}
 
 #endif /* HAVE_SPIRV_TOOLS */
 
+#define VKD3D_SPIRV_GENERATOR_ID 18
+#define VKD3D_SPIRV_GENERATOR_VERSION 0
+#define VKD3D_SPIRV_GENERATOR_MAGIC ((VKD3D_SPIRV_GENERATOR_ID << 16) | VKD3D_SPIRV_GENERATOR_VERSION)
+
 struct vkd3d_spirv_stream
 {
     uint32_t *words;
@@ -1535,7 +1539,7 @@ static bool vkd3d_spirv_compile_module(struct vkd3d_spirv_builder *builder,
 
     vkd3d_spirv_build_word(&stream, SpvMagicNumber);
     vkd3d_spirv_build_word(&stream, SpvVersion);
-    vkd3d_spirv_build_word(&stream, 0); /* generator */
+    vkd3d_spirv_build_word(&stream, VKD3D_SPIRV_GENERATOR_MAGIC);
     vkd3d_spirv_build_word(&stream, builder->current_id); /* bound */
     vkd3d_spirv_build_word(&stream, 0); /* schema, reserved */
 
-- 
2.13.6




More information about the wine-devel mailing list