Commit 592e8f04 by John Kessenich

HLSL: Tests: Add subset of flattened opaque test to legalize results.

parent 908813c2
hlsl.flattenSubset.frag
WARNING: AST will form illegal SPIR-V; need to transform to legalize
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 85
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 54 57
ExecutionMode 4 OriginUpperLeft
Source HLSL 500
Name 4 "main"
Name 17 "samp"
Name 41 "tex"
Name 54 "vpos"
Name 57 "@entryPointOutput"
Decorate 17(samp) DescriptorSet 0
Decorate 41(tex) DescriptorSet 0
Decorate 54(vpos) Location 0
Decorate 57(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
13: TypeSampler
16: TypePointer UniformConstant 13
17(samp): 16(ptr) Variable UniformConstant
39: TypeImage 6(float) 2D sampled format:Unknown
40: TypePointer UniformConstant 39
41(tex): 40(ptr) Variable UniformConstant
44: TypeSampledImage 39
46: TypeVector 6(float) 2
47: 6(float) Constant 1056964608
48: 46(fvec2) ConstantComposite 47 47
53: TypePointer Input 7(fvec4)
54(vpos): 53(ptr) Variable Input
56: TypePointer Output 7(fvec4)
57(@entryPointOutput): 56(ptr) Variable Output
4(main): 2 Function None 3
5: Label
74: 13 Load 17(samp)
81: 39 Load 41(tex)
83: 44 SampledImage 81 74
84: 7(fvec4) ImageSampleImplicitLod 83 48
Store 57(@entryPointOutput) 84
Return
FunctionEnd
...@@ -23,10 +23,14 @@ struct S2 ...@@ -23,10 +23,14 @@ struct S2
S1 resources; S1 resources;
}; };
SamplerState samp;
Texture2D tex;
float4 main(float4 vpos : VPOS) : COLOR0 float4 main(float4 vpos : VPOS) : COLOR0
{ {
S1 s1; S1 s1;
S2 s2; S2 s2;
s1.s0.ss = samp;
s2.resources = s1; s2.resources = s1;
return float4(0,0,0,0); return tex.Sample(s2.resources.s0.ss, float2(0.5));
} }
...@@ -379,7 +379,8 @@ INSTANTIATE_TEST_CASE_P( ...@@ -379,7 +379,8 @@ INSTANTIATE_TEST_CASE_P(
{"hlsl.aliasOpaque.frag", "main"}, {"hlsl.aliasOpaque.frag", "main"},
{"hlsl.flattenOpaque.frag", "main"}, {"hlsl.flattenOpaque.frag", "main"},
{"hlsl.flattenOpaqueInit.vert", "main"}, {"hlsl.flattenOpaqueInit.vert", "main"},
{"hlsl.flattenOpaqueInitMix.vert", "main"} {"hlsl.flattenOpaqueInitMix.vert", "main"},
{"hlsl.flattenSubset.frag", "main"}
}), }),
FileNameAsCustomTestSuffix FileNameAsCustomTestSuffix
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment