mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-compiler: Add the HLSL source type.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
ce58af9df8
commit
0bcb8ba398
@@ -52,12 +52,17 @@ static const struct source_type_info
|
|||||||
enum vkd3d_shader_source_type type;
|
enum vkd3d_shader_source_type type;
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *description;
|
const char *description;
|
||||||
|
bool is_binary;
|
||||||
}
|
}
|
||||||
source_type_info[] =
|
source_type_info[] =
|
||||||
{
|
{
|
||||||
{VKD3D_SHADER_SOURCE_DXBC_TPF,
|
{VKD3D_SHADER_SOURCE_DXBC_TPF,
|
||||||
"dxbc-tpf", "A 'Tokenized Program Format' shader embedded in a DXBC container.\n"
|
"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
|
static const struct target_type_info
|
||||||
@@ -594,7 +599,7 @@ int main(int argc, char **argv)
|
|||||||
if (!(input = open_input(options.filename, &close_input)))
|
if (!(input = open_input(options.filename, &close_input)))
|
||||||
goto done;
|
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"
|
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");
|
"If this is really what you intended, specify the input explicitly.\n");
|
||||||
|
Reference in New Issue
Block a user