mirror of
https://github.com/KhronosGroup/SPIRV-Cross.git
synced 2024-11-13 23:50:08 +00:00
Update test output for preserve structured.
This commit is contained in:
parent
63ea1a521b
commit
bf752edaa4
@ -9,7 +9,7 @@ static float4 out_var_SV_Target;
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 out_var_SV_Target : COLOR0;
|
||||
float4 out_var_SV_Target : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
@ -21,6 +21,6 @@ SPIRV_Cross_Output main()
|
||||
{
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.out_var_SV_Target = float4(out_var_SV_Target);
|
||||
stage_output.out_var_SV_Target = out_var_SV_Target;
|
||||
return stage_output;
|
||||
}
|
@ -9,7 +9,7 @@ static float4 out_var_SV_Target;
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 out_var_SV_Target : COLOR0;
|
||||
float4 out_var_SV_Target : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
@ -21,6 +21,6 @@ SPIRV_Cross_Output main()
|
||||
{
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.out_var_SV_Target = float4(out_var_SV_Target);
|
||||
stage_output.out_var_SV_Target = out_var_SV_Target;
|
||||
return stage_output;
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
struct Data
|
||||
{
|
||||
float4 Color;
|
||||
};
|
||||
|
||||
StructuredBuffer<Data> Colors[2] : register(t0);
|
||||
|
||||
static float4 out_var_SV_Target;
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 out_var_SV_Target : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
out_var_SV_Target = Colors[1][3u].Color;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
{
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.out_var_SV_Target = out_var_SV_Target;
|
||||
return stage_output;
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
struct Data
|
||||
{
|
||||
float4 Color;
|
||||
};
|
||||
|
||||
StructuredBuffer<Data> Colors : register(t0);
|
||||
|
||||
static float4 out_var_SV_Target;
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 out_var_SV_Target : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
out_var_SV_Target = Colors[3u].Color;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
{
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.out_var_SV_Target = out_var_SV_Target;
|
||||
return stage_output;
|
||||
}
|
@ -515,6 +515,8 @@ def cross_compile_hlsl(shader, spirv, opt, force_no_external_validation, iterati
|
||||
hlsl_args.append('--hlsl-flatten-matrix-vertex-input-semantics')
|
||||
if '.relax-nan.' in shader:
|
||||
hlsl_args.append('--relax-nan-checks')
|
||||
if '.structured.' in shader:
|
||||
hlsl_args.append('--hlsl-preserve-structured-buffers')
|
||||
|
||||
subprocess.check_call(hlsl_args)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user