[PATCH vkd3d 3/6] vkd3d-compiler: Require a source type with --print-target-types.

Matteo Bruni mbruni at codeweavers.com
Tue Jan 26 13:26:34 CST 2021


Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
 programs/vkd3d-compiler/main.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c
index f1e597a..a0e3280 100644
--- a/programs/vkd3d-compiler/main.c
+++ b/programs/vkd3d-compiler/main.c
@@ -481,7 +481,14 @@ static bool parse_command_line(int argc, char **argv, struct options *options)
     }
 
     if (options->print_target_types)
+    {
+        if (options->source_type == VKD3D_SHADER_SOURCE_NONE)
+        {
+            fprintf(stderr, "You need to specify a source type when using the --print-target-types option.\n");
+            return false;
+        }
         return true;
+    }
 
     if (options->source_type == VKD3D_SHADER_SOURCE_NONE)
         options->source_type = options->preprocess_only ? VKD3D_SHADER_SOURCE_HLSL : VKD3D_SHADER_SOURCE_DXBC_TPF;
-- 
2.26.2




More information about the wine-devel mailing list