Enable HLSL legalization
Also added known-good mechanism to fetch latest validated spirv-tools. Also added -Od and -Os to disable optimizer and optimize for size. Fetching spirv-tools is optional for both glsl and hlsl. Legalization of hlsl is done by default if spirv-opt is present at cmake time. Optimization for glsl is currently done through the option -Os. Legalization testing is currently only done on four existing shaders. A separate baseLegalResults directory holds those results. All previous testing is done with the optimizer disabled.
This commit is contained in:
parent
44dd6a00c3
commit
cd1f169c6a
16 changed files with 536 additions and 23 deletions
43
Test/baseLegalResults/hlsl.flattenOpaqueInitMix.vert.out
Normal file
43
Test/baseLegalResults/hlsl.flattenOpaqueInitMix.vert.out
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
hlsl.flattenOpaqueInitMix.vert
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 60
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 44
|
||||
Source HLSL 500
|
||||
Name 4 "main"
|
||||
Name 36 "g_tInputTexture_sampler"
|
||||
Name 37 "g_tInputTexture"
|
||||
Name 44 "@entryPointOutput"
|
||||
Decorate 36(g_tInputTexture_sampler) DescriptorSet 0
|
||||
Decorate 37(g_tInputTexture) DescriptorSet 0
|
||||
Decorate 44(@entryPointOutput) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeSampler
|
||||
7: TypePointer UniformConstant 6
|
||||
8: TypeFloat 32
|
||||
9: TypeImage 8(float) 2D sampled format:Unknown
|
||||
10: TypePointer UniformConstant 9
|
||||
12: TypeVector 8(float) 4
|
||||
24: TypeSampledImage 9
|
||||
28: TypeVector 8(float) 2
|
||||
30: 8(float) Constant 0
|
||||
35: 8(float) Constant 1056964608
|
||||
36(g_tInputTexture_sampler): 7(ptr) Variable UniformConstant
|
||||
37(g_tInputTexture): 10(ptr) Variable UniformConstant
|
||||
43: TypePointer Output 12(fvec4)
|
||||
44(@entryPointOutput): 43(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
53: 9 Load 37(g_tInputTexture)
|
||||
54: 6 Load 36(g_tInputTexture_sampler)
|
||||
55: 24 SampledImage 53 54
|
||||
58: 28(fvec2) CompositeConstruct 35 35
|
||||
59: 12(fvec4) ImageSampleExplicitLod 55 58 Lod 30
|
||||
Store 44(@entryPointOutput) 59
|
||||
Return
|
||||
FunctionEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue