Zebediah Figura : vkd3d-compiler: Add the HLSL source type.
Alexandre Julliard
julliard at winehq.org
Tue Sep 29 15:20:24 CDT 2020
Module: vkd3d
Branch: master
Commit: 0bcb8ba3989604c40d47d93f30cb4d3283911376
URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=0bcb8ba3989604c40d47d93f30cb4d3283911376
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Mon Sep 28 22:41:07 2020 -0500
vkd3d-compiler: Add the HLSL source type.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/vkd3d-compiler/main.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c
index 8480c4f..a5aff57 100644
--- a/programs/vkd3d-compiler/main.c
+++ b/programs/vkd3d-compiler/main.c
@@ -52,12 +52,17 @@ static const struct source_type_info
enum vkd3d_shader_source_type type;
const char *name;
const char *description;
+ bool is_binary;
}
source_type_info[] =
{
{VKD3D_SHADER_SOURCE_DXBC_TPF,
"dxbc-tpf", "A 'Tokenized Program Format' shader embedded in a DXBC container.\n"
- " This is the format used for Direct3D shader model 4 and 5 shaders.\n"},
+ " This is the format used for Direct3D shader model 4 and 5 shaders.\n",
+ true},
+ {VKD3D_SHADER_SOURCE_HLSL,
+ "hlsl", "High Level Shader Language source code.\n",
+ false},
};
static const struct target_type_info
@@ -594,7 +599,7 @@ int main(int argc, char **argv)
if (!(input = open_input(options.filename, &close_input)))
goto done;
- if (!options.filename && isatty(fileno(input)))
+ if (!options.filename && get_source_type_info(options.source_type)->is_binary && isatty(fileno(input)))
{
fprintf(stderr, "Input is a tty and input format is binary, exiting.\n"
"If this is really what you intended, specify the input explicitly.\n");
More information about the wine-cvs
mailing list