Selaa lähdekoodia

start work on dx12 raytraing shader pipeline configuration

Kolja Strohm 1 kuukausi sitten
vanhempi
commit
3a33305a47
13 muutettua tiedostoa jossa 1335 lisäystä ja 110 poistoa
  1. 17 0
      Common.hlsl
  2. 5 0
      DX12GraphicsApi.cpp
  3. 313 0
      DX12HitShader.h
  4. 291 0
      DX12MissShader.h
  5. 428 0
      DX12RayGenShader.h
  6. 91 68
      DX12Shader.cpp
  7. 85 41
      DX12Shader.h
  8. 48 0
      Framework.vcxproj
  9. 12 0
      Framework.vcxproj.filters
  10. 7 0
      Hit.hlsl
  11. 7 0
      Miss.hlsl
  12. 24 0
      RayGen.hlsl
  13. 7 1
      Shader.h

+ 17 - 0
Common.hlsl

@@ -0,0 +1,17 @@
+// Hit information, aka ray payload
+// This sample only carries a shading color and hit distance.
+// Note that the payload should be kept as small as possible,
+// and that its size must be declared in the corresponding
+// D3D12_RAYTRACING_SHADER_CONFIG pipeline subobjet.
+
+struct HitInfo
+{
+    float4 colorAndDistance;
+};
+
+// Attributes output by the raytracing when hitting a surface,
+// here the barycentric coordinates
+struct Attributes
+{
+    float2 bary;
+};

+ 5 - 0
DX12GraphicsApi.cpp

@@ -786,6 +786,11 @@ void DirectX12::renderKamera(Cam3D* zKamera)
     // TODO: call ray tracing
 }
 
+void Framework::DirectX12::renderKamera(Cam3D* zKamera, Texture* zTarget)
+{
+    // TODO: implement rendering to a texture target
+}
+
 void DirectX12::presentFrame()
 {
     // TODO

+ 313 - 0
DX12HitShader.h

@@ -0,0 +1,313 @@
+#if 0
+; shader debug name: x64\Debug\DX12HitShader.pdb
+; shader hash: 4033113f1d72c412d30e083d1a5cd06e
+;
+; Buffer Definitions:
+;
+;
+; Resource Bindings:
+;
+; Name                                 Type  Format         Dim      ID      HLSL Bind  Count
+; ------------------------------ ---------- ------- ----------- ------- -------------- ------
+;
+target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64"
+target triple = "dxil-ms-dx"
+
+%struct.HitInfo = type { <4 x float> }
+%struct.Attributes = type { <2 x float> }
+
+@dx.nothing.a = internal constant [1 x i32] zeroinitializer
+
+; Function Attrs: nounwind
+define void @"\01?ClosestHit@@YAXUHitInfo@@UAttributes@@@Z"(%struct.HitInfo* noalias %payload, %struct.Attributes* %attrib) #0 {
+  %1 = call float @dx.op.rayTCurrent.f32(i32 154)  ; RayTCurrent()
+  %2 = insertelement <4 x float> <float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float undef>, float %1, i64 3
+  %3 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @dx.nothing.a, i32 0, i32 0)
+  %4 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @dx.nothing.a, i32 0, i32 0)
+  %5 = getelementptr inbounds %struct.HitInfo, %struct.HitInfo* %payload, i32 0, i32 0
+  store <4 x float> %2, <4 x float>* %5
+  ret void
+}
+
+; Function Attrs: nounwind readonly
+declare float @dx.op.rayTCurrent.f32(i32) #1
+
+attributes #0 = { nounwind }
+attributes #1 = { nounwind readonly }
+
+!llvm.ident = !{!0}
+!dx.version = !{!1}
+!dx.valver = !{!2}
+!dx.shaderModel = !{!3}
+!dx.typeAnnotations = !{!4}
+!dx.entryPoints = !{!10, !12}
+
+!0 = !{!"dxcoob 1.8.2502.11 (239921522)"}
+!1 = !{i32 1, i32 3}
+!2 = !{i32 1, i32 8}
+!3 = !{!"lib", i32 6, i32 3}
+!4 = !{i32 1, void (%struct.HitInfo*, %struct.Attributes*)* @"\01?ClosestHit@@YAXUHitInfo@@UAttributes@@@Z", !5}
+!5 = !{!6, !8, !9}
+!6 = !{i32 1, !7, !7}
+!7 = !{}
+!8 = !{i32 2, !7, !7}
+!9 = !{i32 0, !7, !7}
+!10 = !{null, !"", null, null, !11}
+!11 = !{i32 0, i64 1}
+!12 = !{void (%struct.HitInfo*, %struct.Attributes*)* @"\01?ClosestHit@@YAXUHitInfo@@UAttributes@@@Z", !"\01?ClosestHit@@YAXUHitInfo@@UAttributes@@@Z", null, null, !13}
+!13 = !{i32 8, i32 10, i32 6, i32 16, i32 7, i32 8, i32 5, !14}
+!14 = !{i32 0}
+
+#endif
+
+const unsigned char g_lib.no::entry[] = {
+  0x44, 0x58, 0x42, 0x43, 0x92, 0xd8, 0x06, 0xda, 0x5e, 0x4a, 0xc0, 0xb7,
+  0x9b, 0x00, 0x86, 0x0f, 0xa5, 0x3f, 0x3c, 0x86, 0x01, 0x00, 0x00, 0x00,
+  0xac, 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
+  0x4c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00,
+  0x40, 0x06, 0x00, 0x00, 0x68, 0x06, 0x00, 0x00, 0x84, 0x06, 0x00, 0x00,
+  0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x28, 0x00, 0x00, 0x00,
+  0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x12, 0x00, 0x00,
+  0x15, 0x00, 0x00, 0x00, 0x32, 0x33, 0x39, 0x39, 0x32, 0x31, 0x35, 0x32,
+  0x00, 0x31, 0x2e, 0x38, 0x2e, 0x32, 0x35, 0x30, 0x32, 0x2e, 0x31, 0x31,
+  0x00, 0x00, 0x00, 0x00, 0x52, 0x44, 0x41, 0x54, 0x94, 0x00, 0x00, 0x00,
+  0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+  0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
+  0x00, 0x01, 0x3f, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x73, 0x74, 0x48, 0x69,
+  0x74, 0x40, 0x40, 0x59, 0x41, 0x58, 0x55, 0x48, 0x69, 0x74, 0x49, 0x6e,
+  0x66, 0x6f, 0x40, 0x40, 0x55, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
+  0x74, 0x65, 0x73, 0x40, 0x40, 0x40, 0x5a, 0x00, 0x43, 0x6c, 0x6f, 0x73,
+  0x65, 0x73, 0x74, 0x48, 0x69, 0x74, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+  0x3c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+  0x01, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
+  0xff, 0xff, 0xff, 0xff, 0x0a, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x04, 0x00, 0x00, 0x63, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0xff, 0xff, 0xff, 0xff, 0x53, 0x54, 0x41, 0x54, 0x20, 0x05, 0x00, 0x00,
+  0x63, 0x00, 0x06, 0x00, 0x48, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c,
+  0x03, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x05, 0x00, 0x00,
+  0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00,
+  0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
+  0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39,
+  0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62,
+  0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14,
+  0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20,
+  0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90,
+  0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a,
+  0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
+  0x1b, 0x88, 0x20, 0x00, 0x92, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff,
+  0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09,
+  0xa8, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+  0x13, 0x84, 0x40, 0x98, 0x10, 0x0c, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00,
+  0x18, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04,
+  0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14,
+  0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x44, 0x73, 0x04,
+  0x60, 0x90, 0x01, 0x80, 0xc2, 0x08, 0xc0, 0x0c, 0xc0, 0x30, 0x02, 0x41,
+  0x9c, 0x23, 0x4d, 0x11, 0x25, 0x4c, 0x7e, 0x88, 0x4c, 0x62, 0x53, 0x38,
+  0x28, 0x28, 0x64, 0x86, 0x11, 0x04, 0xe2, 0x22, 0x69, 0x8a, 0x28, 0x61,
+  0xf2, 0xb5, 0x69, 0x8a, 0x90, 0x80, 0x9a, 0x08, 0x09, 0x05, 0x88, 0x52,
+  0x19, 0xc6, 0x51, 0xb4, 0x8a, 0x40, 0x00, 0xb5, 0x81, 0x80, 0x39, 0x02,
+  0x50, 0x00, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87,
+  0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50,
+  0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30,
+  0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0,
+  0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20,
+  0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0,
+  0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90,
+  0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10,
+  0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20,
+  0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0,
+  0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60,
+  0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f,
+  0x24, 0x90, 0x21, 0x23, 0x25, 0x40, 0x00, 0x1e, 0xa8, 0x31, 0xe4, 0x59,
+  0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8,
+  0xd3, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
+  0x16, 0x08, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14,
+  0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x02,
+  0x25, 0x50, 0x06, 0x23, 0x00, 0xc5, 0x50, 0x20, 0xe5, 0x50, 0x12, 0xa5,
+  0x51, 0x08, 0x05, 0x51, 0x04, 0x45, 0x51, 0x0a, 0x04, 0x4b, 0x80, 0xcc,
+  0x0c, 0x00, 0xa5, 0x19, 0x00, 0x0a, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x79, 0x18, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90,
+  0x46, 0x02, 0x13, 0x44, 0x8f, 0x0c, 0x6f, 0xec, 0xed, 0x4d, 0x0c, 0x24,
+  0xc6, 0x05, 0xc7, 0x45, 0xa6, 0x06, 0x46, 0xc6, 0x25, 0x26, 0x06, 0x04,
+  0x45, 0x66, 0x26, 0x27, 0x47, 0x26, 0xa6, 0x46, 0x46, 0x26, 0x65, 0x43,
+  0x10, 0x4c, 0x10, 0x80, 0x61, 0x82, 0x00, 0x10, 0x1b, 0x84, 0x81, 0x98,
+  0x20, 0x00, 0xc5, 0x06, 0xc1, 0x30, 0x38, 0xb0, 0xa5, 0x89, 0x4d, 0x10,
+  0x00, 0x63, 0xc3, 0x80, 0x24, 0xc4, 0x04, 0xc1, 0x88, 0x26, 0x08, 0xc0,
+  0x41, 0x68, 0xec, 0x8d, 0xed, 0x4d, 0x2e, 0xc8, 0x8d, 0x8c, 0x28, 0x6d,
+  0x8e, 0x2e, 0xcc, 0x6d, 0xac, 0x6c, 0x82, 0x00, 0x20, 0x13, 0x04, 0x20,
+  0x99, 0x20, 0x00, 0xca, 0x04, 0x01, 0x58, 0x36, 0x20, 0x49, 0x43, 0x18,
+  0xce, 0x03, 0x45, 0x1b, 0x04, 0x46, 0x9a, 0x20, 0x24, 0xd2, 0x04, 0x01,
+  0x60, 0x48, 0x88, 0x85, 0xc9, 0xe5, 0x4d, 0x10, 0x80, 0x66, 0x03, 0x92,
+  0x58, 0x84, 0xe1, 0x3c, 0xd0, 0xb5, 0x41, 0xa8, 0xb0, 0x0d, 0x85, 0xb1,
+  0x4c, 0x54, 0x36, 0x41, 0x60, 0x82, 0x0d, 0xc0, 0x86, 0x61, 0xe0, 0xb8,
+  0x0d, 0xc3, 0xc5, 0x71, 0x1b, 0x06, 0x83, 0xe3, 0x36, 0x0c, 0x9d, 0xf7,
+  0x6d, 0x18, 0x86, 0x0d, 0x0c, 0x08, 0x4c, 0x10, 0x20, 0x68, 0x83, 0x60,
+  0x8c, 0xc1, 0x86, 0x02, 0x10, 0x03, 0x00, 0x20, 0x03, 0xaa, 0x41, 0xc0,
+  0xcf, 0x10, 0xdb, 0xdb, 0x5c, 0xd9, 0x1c, 0x1d, 0x52, 0x1a, 0x1d, 0x10,
+  0x50, 0x56, 0x10, 0x56, 0x15, 0x52, 0x1a, 0x5d, 0x92, 0x9b, 0xd9, 0x1b,
+  0x10, 0x50, 0x55, 0x10, 0x1d, 0x9d, 0x5c, 0x9a, 0x58, 0x1d, 0x5d, 0xd9,
+  0x1c, 0x10, 0x10, 0x90, 0xd6, 0x04, 0x01, 0x70, 0x26, 0x08, 0xc0, 0xb3,
+  0x21, 0x30, 0x36, 0x20, 0xd5, 0x19, 0x24, 0x8c, 0x53, 0xa1, 0x41, 0x1a,
+  0x6c, 0x28, 0x36, 0x33, 0x00, 0x00, 0x35, 0x60, 0x91, 0xe6, 0x36, 0x47,
+  0x37, 0xb7, 0x41, 0x60, 0x03, 0xa7, 0x0a, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b,
+  0x1a, 0x59, 0x99, 0x1b, 0xdd, 0x94, 0x20, 0xa8, 0x42, 0x86, 0xe7, 0x62,
+  0x57, 0x26, 0x37, 0x97, 0xf6, 0xe6, 0x36, 0x25, 0x20, 0x9a, 0x90, 0xe1,
+  0xb9, 0xd8, 0x85, 0xb1, 0xd9, 0x95, 0xc9, 0x4d, 0x09, 0x8c, 0x3a, 0x64,
+  0x78, 0x2e, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65,
+  0x6c, 0x53, 0x82, 0xa4, 0x12, 0x19, 0x9e, 0x0b, 0x5d, 0x1e, 0x5c, 0x59,
+  0x90, 0x9b, 0xdb, 0x1b, 0x5d, 0x18, 0x5d, 0xda, 0x9b, 0xdb, 0xdc, 0x14,
+  0x21, 0x03, 0x83, 0x3a, 0x64, 0x78, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x79,
+  0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x53, 0x04, 0x32, 0x50, 0x83, 0x2e,
+  0x64, 0x78, 0x2e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x53,
+  0x02, 0x36, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
+  0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88,
+  0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73,
+  0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e,
+  0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30,
+  0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8,
+  0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b,
+  0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76,
+  0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e,
+  0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e,
+  0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61,
+  0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4,
+  0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76,
+  0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37,
+  0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76,
+  0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71,
+  0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e,
+  0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1,
+  0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61,
+  0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90,
+  0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8,
+  0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc,
+  0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8,
+  0x21, 0x07, 0x7c, 0x70, 0x03, 0x72, 0x10, 0x87, 0x73, 0x70, 0x03, 0x7b,
+  0x08, 0x07, 0x79, 0x60, 0x87, 0x70, 0xc8, 0x87, 0x77, 0xa8, 0x07, 0x7a,
+  0x98, 0x81, 0x3c, 0xe4, 0x80, 0x0f, 0x6e, 0x40, 0x0f, 0xe5, 0xd0, 0x0e,
+  0xf0, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00,
+  0x15, 0xa0, 0x06, 0x81, 0xdf, 0x90, 0xfd, 0x9e, 0x97, 0xe7, 0x74, 0x64,
+  0x9a, 0x0e, 0x04, 0x66, 0x83, 0xd8, 0x2a, 0x32, 0x4d, 0x4f, 0xba, 0xcd,
+  0x6f, 0x20, 0xb0, 0x1a, 0xa4, 0xd3, 0xe5, 0x69, 0x71, 0x9d, 0x5e, 0x9e,
+  0x03, 0x81, 0x40, 0xad, 0x01, 0x30, 0xc3, 0xe5, 0x37, 0xce, 0x74, 0x20,
+  0x8d, 0xe1, 0x03, 0x26, 0x50, 0x0d, 0x97, 0xef, 0x3c, 0x7e, 0x04, 0x60,
+  0x2d, 0x47, 0x45, 0x11, 0xd1, 0x4c, 0x7e, 0x71, 0xdb, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x49, 0x4c, 0x44, 0x4e, 0x20, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x1b, 0x00, 0x78, 0x36, 0x34, 0x5c, 0x44, 0x65, 0x62, 0x75,
+  0x67, 0x5c, 0x44, 0x58, 0x31, 0x32, 0x48, 0x69, 0x74, 0x53, 0x68, 0x61,
+  0x64, 0x65, 0x72, 0x2e, 0x70, 0x64, 0x62, 0x00, 0x48, 0x41, 0x53, 0x48,
+  0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x33, 0x11, 0x3f,
+  0x1d, 0x72, 0xc4, 0x12, 0xd3, 0x0e, 0x08, 0x3d, 0x1a, 0x5c, 0xd0, 0x6e,
+  0x44, 0x58, 0x49, 0x4c, 0x20, 0x05, 0x00, 0x00, 0x63, 0x00, 0x06, 0x00,
+  0x48, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x03, 0x01, 0x00, 0x00,
+  0x10, 0x00, 0x00, 0x00, 0x08, 0x05, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde,
+  0x21, 0x0c, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00,
+  0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91,
+  0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c,
+  0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02,
+  0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b,
+  0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5,
+  0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50,
+  0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06,
+  0x51, 0x18, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1b, 0x88, 0x20, 0x00,
+  0x92, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30,
+  0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x00, 0x00,
+  0x49, 0x18, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x84, 0x40, 0x98,
+  0x10, 0x0c, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00,
+  0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84,
+  0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c,
+  0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x4c, 0x73, 0x04, 0x60, 0x90, 0x01, 0x80,
+  0xc2, 0x08, 0xc0, 0x0c, 0xc0, 0x30, 0x02, 0x41, 0x9c, 0x23, 0x4d, 0x11,
+  0x25, 0x4c, 0x7e, 0x88, 0x4c, 0x62, 0x53, 0x38, 0x28, 0x28, 0x64, 0x86,
+  0x11, 0x04, 0xe2, 0x22, 0x69, 0x8a, 0x28, 0x61, 0xf2, 0xb5, 0x69, 0x8a,
+  0x90, 0x80, 0x9a, 0x08, 0x09, 0x05, 0x88, 0x52, 0x19, 0xc6, 0x51, 0xb4,
+  0x8a, 0x40, 0x00, 0xb5, 0x81, 0x80, 0x39, 0x02, 0x50, 0x20, 0x40, 0x05,
+  0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87,
+  0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50,
+  0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30,
+  0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0,
+  0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20,
+  0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0,
+  0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90,
+  0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10,
+  0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20,
+  0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0,
+  0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60,
+  0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f,
+  0x24, 0x90, 0x21, 0x23, 0x25, 0x40, 0x00, 0x1e, 0x9e, 0x31, 0xe4, 0x59,
+  0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8,
+  0xd3, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
+  0x16, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x10,
+  0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x02,
+  0x25, 0x50, 0x06, 0x05, 0x51, 0x0c, 0x45, 0x30, 0x02, 0x50, 0x14, 0x05,
+  0x52, 0x0e, 0xa5, 0x40, 0xb0, 0x04, 0x28, 0x8c, 0x00, 0x00, 0x00, 0x00,
+  0x79, 0x18, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90,
+  0x46, 0x02, 0x13, 0x44, 0x8f, 0x0c, 0x6f, 0xec, 0xed, 0x4d, 0x0c, 0x24,
+  0xc6, 0x05, 0xc7, 0x45, 0xa6, 0x06, 0x46, 0xc6, 0x25, 0x26, 0x06, 0x04,
+  0x45, 0x66, 0x26, 0x27, 0x47, 0x26, 0xa6, 0x46, 0x46, 0x26, 0x65, 0x43,
+  0x10, 0x4c, 0x10, 0x80, 0x61, 0x82, 0x00, 0x10, 0x1b, 0x84, 0x81, 0x98,
+  0x20, 0x00, 0xc5, 0x06, 0x61, 0x30, 0x38, 0xb0, 0xa5, 0x89, 0x4d, 0x10,
+  0x00, 0x63, 0xc3, 0x80, 0x24, 0xc4, 0x04, 0x81, 0x09, 0x36, 0x00, 0x1b,
+  0x86, 0x81, 0x61, 0x26, 0x08, 0xc0, 0xb1, 0x61, 0x70, 0x18, 0x66, 0x82,
+  0x00, 0x20, 0x1b, 0x06, 0x88, 0x61, 0x36, 0x0c, 0xcd, 0x13, 0x6d, 0x18,
+  0x86, 0x45, 0x22, 0x30, 0x41, 0x80, 0x9a, 0x0d, 0x02, 0x54, 0x6d, 0x28,
+  0x00, 0x0a, 0x00, 0x2c, 0xaa, 0x41, 0xc0, 0xcf, 0x10, 0xdb, 0xdb, 0x5c,
+  0xd9, 0x1c, 0x1d, 0x52, 0x1a, 0x1d, 0x10, 0x50, 0x56, 0x10, 0x56, 0x15,
+  0x52, 0x1a, 0x5d, 0x92, 0x9b, 0xd9, 0x1b, 0x10, 0x50, 0x55, 0x10, 0x1d,
+  0x9d, 0x5c, 0x9a, 0x58, 0x1d, 0x5d, 0xd9, 0x1c, 0x10, 0x10, 0x90, 0xd6,
+  0x04, 0x01, 0x48, 0x26, 0x08, 0x80, 0x32, 0x41, 0x00, 0x96, 0x09, 0x02,
+  0xc0, 0x6c, 0x08, 0xa0, 0x0d, 0x88, 0x91, 0x25, 0xda, 0x66, 0x70, 0xdd,
+  0x86, 0x62, 0xc1, 0x00, 0xc0, 0xab, 0xc2, 0xc6, 0x66, 0xd7, 0xe6, 0x92,
+  0x46, 0x56, 0xe6, 0x46, 0x37, 0x25, 0x08, 0xaa, 0x90, 0xe1, 0xb9, 0xd8,
+  0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0x88, 0x26, 0x64, 0x78,
+  0x2e, 0x76, 0x61, 0x6c, 0x76, 0x65, 0x72, 0x53, 0x02, 0xa3, 0x0e, 0x19,
+  0x9e, 0xcb, 0x1c, 0x5a, 0x18, 0x59, 0x99, 0x5c, 0xd3, 0x1b, 0x59, 0x19,
+  0xdb, 0x94, 0x20, 0xa9, 0x44, 0x86, 0xe7, 0x42, 0x97, 0x07, 0x57, 0x16,
+  0xe4, 0xe6, 0xf6, 0x46, 0x17, 0x46, 0x97, 0xf6, 0xe6, 0x36, 0x37, 0x25,
+  0x90, 0xea, 0x90, 0xe1, 0xb9, 0x94, 0xb9, 0xd1, 0xc9, 0xe5, 0x41, 0xbd,
+  0xa5, 0xb9, 0xd1, 0xcd, 0x4d, 0x11, 0x2c, 0x0f, 0x79, 0x18, 0x00, 0x00,
+  0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66,
+  0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07,
+  0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10,
+  0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce,
+  0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b,
+  0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c,
+  0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07,
+  0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11,
+  0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0,
+  0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8,
+  0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b,
+  0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b,
+  0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87,
+  0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07,
+  0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87,
+  0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81,
+  0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30,
+  0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4,
+  0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca,
+  0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39,
+  0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b,
+  0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b,
+  0xb0, 0xc3, 0x8c, 0xc8, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x72, 0x10, 0x87,
+  0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60, 0x87, 0x70, 0xc8, 0x87,
+  0x77, 0xa8, 0x07, 0x7a, 0x98, 0x81, 0x3c, 0xe4, 0x80, 0x0f, 0x6e, 0x40,
+  0x0f, 0xe5, 0xd0, 0x0e, 0xf0, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00,
+  0x12, 0x00, 0x00, 0x00, 0x15, 0xa0, 0x06, 0x81, 0xdf, 0x90, 0xfd, 0x9e,
+  0x97, 0xe7, 0x74, 0x64, 0x9a, 0x0e, 0x04, 0x66, 0x83, 0xd8, 0x2a, 0x32,
+  0x4d, 0x4f, 0xba, 0xcd, 0x6f, 0x20, 0xb0, 0x1a, 0xa4, 0xd3, 0xe5, 0x69,
+  0x71, 0x9d, 0x5e, 0x9e, 0x03, 0x81, 0x40, 0xad, 0x01, 0x30, 0xc3, 0xe5,
+  0x37, 0xce, 0x74, 0x20, 0x8d, 0xe1, 0x03, 0x26, 0x50, 0x0d, 0x97, 0xef,
+  0x3c, 0x7e, 0x04, 0x60, 0x2d, 0x47, 0x45, 0x11, 0xd1, 0x4c, 0x7e, 0x71,
+  0xdb, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00,
+  0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
+  0x04, 0x8a, 0x56, 0x80, 0x60, 0x19, 0x10, 0x19, 0x01, 0x98, 0x01, 0xa0,
+  0x32, 0x07, 0x61, 0x59, 0x13, 0x45, 0x64, 0x8c, 0x00, 0x04, 0x41, 0x10,
+  0xff, 0x28, 0x0e, 0x75, 0x04, 0x02, 0x00, 0x20, 0x00, 0x02, 0x00, 0x00,
+  0x23, 0x06, 0x05, 0x00, 0x82, 0x60, 0xd0, 0x58, 0xc7, 0x1c, 0x03, 0x11,
+  0x1c, 0x34, 0x00, 0x40, 0x04, 0x00, 0xdb, 0x0c, 0x0d, 0x45, 0x0d, 0x1b,
+  0x10, 0x01, 0x01, 0x00, 0x18, 0x0e, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00,
+  0x06, 0x61, 0x00, 0xd3, 0x14, 0x21, 0x81, 0x3d, 0x1c, 0x0f, 0x80, 0x2d,
+  0x0e, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};

+ 291 - 0
DX12MissShader.h

@@ -0,0 +1,291 @@
+#if 0
+; shader debug name: x64\Debug\DX12MissShader.pdb
+; shader hash: 70d091c3988b74a3163f2b5ad94091e9
+;
+; Buffer Definitions:
+;
+;
+; Resource Bindings:
+;
+; Name                                 Type  Format         Dim      ID      HLSL Bind  Count
+; ------------------------------ ---------- ------- ----------- ------- -------------- ------
+;
+target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64"
+target triple = "dxil-ms-dx"
+
+%struct.HitInfo = type { <4 x float> }
+
+@dx.nothing.a = internal constant [1 x i32] zeroinitializer
+
+; Function Attrs: nounwind
+define void @"\01?Miss@@YAXUHitInfo@@@Z"(%struct.HitInfo* noalias %payload) #0 {
+  %1 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @dx.nothing.a, i32 0, i32 0)
+  %2 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @dx.nothing.a, i32 0, i32 0)
+  %3 = getelementptr inbounds %struct.HitInfo, %struct.HitInfo* %payload, i32 0, i32 0
+  store <4 x float> <float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FE99999A0000000, float -1.000000e+00>, <4 x float>* %3
+  ret void
+}
+
+attributes #0 = { nounwind }
+
+!llvm.ident = !{!0}
+!dx.version = !{!1}
+!dx.valver = !{!2}
+!dx.shaderModel = !{!3}
+!dx.typeAnnotations = !{!4, !7}
+!dx.entryPoints = !{!13, !15}
+
+!0 = !{!"dxcoob 1.8.2502.11 (239921522)"}
+!1 = !{i32 1, i32 3}
+!2 = !{i32 1, i32 8}
+!3 = !{!"lib", i32 6, i32 3}
+!4 = !{i32 0, %struct.HitInfo undef, !5}
+!5 = !{i32 16, !6}
+!6 = !{i32 6, !"colorAndDistance", i32 3, i32 0, i32 7, i32 9}
+!7 = !{i32 1, void (%struct.HitInfo*)* @"\01?Miss@@YAXUHitInfo@@@Z", !8}
+!8 = !{!9, !11}
+!9 = !{i32 1, !10, !10}
+!10 = !{}
+!11 = !{i32 2, !12, !10}
+!12 = !{i32 4, !"SV_RayPayload"}
+!13 = !{null, !"", null, null, !14}
+!14 = !{i32 0, i64 1}
+!15 = !{void (%struct.HitInfo*)* @"\01?Miss@@YAXUHitInfo@@@Z", !"\01?Miss@@YAXUHitInfo@@@Z", null, null, !16}
+!16 = !{i32 8, i32 11, i32 6, i32 16, i32 5, !17}
+!17 = !{i32 0}
+
+#endif
+
+const unsigned char g_lib.no::entry[] = {
+  0x44, 0x58, 0x42, 0x43, 0x84, 0xe3, 0xe7, 0x8c, 0x17, 0x72, 0x21, 0x88,
+  0xd2, 0x32, 0x2b, 0x61, 0x08, 0x99, 0xb3, 0x1e, 0x01, 0x00, 0x00, 0x00,
+  0xd0, 0x0a, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
+  0x4c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+  0xa8, 0x05, 0x00, 0x00, 0xd4, 0x05, 0x00, 0x00, 0xf0, 0x05, 0x00, 0x00,
+  0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x28, 0x00, 0x00, 0x00,
+  0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x12, 0x00, 0x00,
+  0x15, 0x00, 0x00, 0x00, 0x32, 0x33, 0x39, 0x39, 0x32, 0x31, 0x35, 0x32,
+  0x00, 0x31, 0x2e, 0x38, 0x2e, 0x32, 0x35, 0x30, 0x32, 0x2e, 0x31, 0x31,
+  0x00, 0x00, 0x00, 0x00, 0x52, 0x44, 0x41, 0x54, 0x7c, 0x00, 0x00, 0x00,
+  0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+  0x38, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+  0x00, 0x01, 0x3f, 0x4d, 0x69, 0x73, 0x73, 0x40, 0x40, 0x59, 0x41, 0x58,
+  0x55, 0x48, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x40, 0x40, 0x40, 0x5a,
+  0x00, 0x4d, 0x69, 0x73, 0x73, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+  0x3c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+  0x01, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
+  0xff, 0xff, 0xff, 0xff, 0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x08, 0x00, 0x00, 0x63, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0xff, 0xff, 0xff, 0xff, 0x53, 0x54, 0x41, 0x54, 0xa0, 0x04, 0x00, 0x00,
+  0x63, 0x00, 0x06, 0x00, 0x28, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c,
+  0x03, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x88, 0x04, 0x00, 0x00,
+  0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x1f, 0x01, 0x00, 0x00,
+  0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
+  0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39,
+  0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62,
+  0x80, 0x10, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0x84, 0x10, 0x32, 0x14,
+  0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x42, 0x88, 0x48, 0x90, 0x14, 0x20,
+  0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90,
+  0x11, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a,
+  0x04, 0x21, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+  0x1b, 0x88, 0x20, 0x00, 0x92, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff,
+  0x03, 0x20, 0x01, 0x00, 0x49, 0x18, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+  0x13, 0x84, 0x40, 0x00, 0x89, 0x20, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
+  0x32, 0x22, 0x08, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x22, 0xa4, 0x84,
+  0x04, 0x13, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x88, 0x8c,
+  0x0b, 0x84, 0x84, 0x4c, 0x10, 0x30, 0x73, 0x04, 0x60, 0x90, 0x01, 0x40,
+  0x31, 0x02, 0x30, 0x03, 0x30, 0x8c, 0x40, 0x10, 0xe7, 0x48, 0x53, 0x44,
+  0x09, 0x93, 0x1f, 0x22, 0x93, 0xd8, 0x14, 0x0e, 0x0a, 0x8a, 0xac, 0x08,
+  0x73, 0x84, 0x03, 0x01, 0x73, 0x04, 0xa0, 0x00, 0x13, 0x14, 0x72, 0xc0,
+  0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0,
+  0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d,
+  0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d,
+  0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78,
+  0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a,
+  0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73,
+  0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74,
+  0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d,
+  0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6,
+  0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78,
+  0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76,
+  0x40, 0x07, 0x3a, 0x0f, 0x24, 0x90, 0x21, 0x23, 0x25, 0x40, 0x00, 0x1e,
+  0xa4, 0x31, 0xe4, 0x41, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x20, 0x0b, 0x04, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
+  0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47,
+  0xc6, 0x04, 0x43, 0x82, 0x12, 0x28, 0x83, 0x11, 0x80, 0x62, 0x28, 0x90,
+  0x72, 0x28, 0x89, 0xd2, 0x28, 0x84, 0x22, 0x28, 0x88, 0xb2, 0x28, 0x05,
+  0xda, 0x12, 0x20, 0x9b, 0x01, 0xa0, 0x18, 0x01, 0x00, 0x00, 0x00, 0x00,
+  0x79, 0x18, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90,
+  0x46, 0x02, 0x13, 0x44, 0x8f, 0x0c, 0x6f, 0xec, 0xed, 0x4d, 0x0c, 0x24,
+  0xc6, 0x05, 0xc7, 0x45, 0xa6, 0x06, 0x46, 0xc6, 0x25, 0x26, 0x06, 0x04,
+  0x45, 0x66, 0x26, 0x27, 0x47, 0x26, 0xa6, 0x46, 0x46, 0x26, 0x65, 0x43,
+  0x10, 0x4c, 0x10, 0x00, 0x61, 0x82, 0x00, 0x0c, 0x1b, 0x84, 0x81, 0x98,
+  0x20, 0x00, 0xc4, 0x06, 0xc1, 0x30, 0x38, 0xb0, 0xa5, 0x89, 0x4d, 0x10,
+  0x80, 0x62, 0xc3, 0x80, 0x24, 0xc4, 0x04, 0xc1, 0x80, 0x26, 0x08, 0x80,
+  0x41, 0x68, 0xec, 0x8d, 0xed, 0x4d, 0x2e, 0xc8, 0x8d, 0x8c, 0x28, 0x6d,
+  0x8e, 0x2e, 0xcc, 0x6d, 0xac, 0x6c, 0x82, 0x00, 0x1c, 0x13, 0x04, 0x00,
+  0x99, 0x20, 0x00, 0xc9, 0x04, 0x01, 0x50, 0x36, 0x20, 0x49, 0x43, 0x18,
+  0xce, 0x03, 0x45, 0x1b, 0x04, 0x46, 0xda, 0x30, 0x18, 0xcb, 0x34, 0x41,
+  0x48, 0x82, 0x0d, 0xc0, 0x86, 0x61, 0xb0, 0xac, 0x09, 0x02, 0xb0, 0xb0,
+  0x99, 0xb2, 0xfa, 0x92, 0x0a, 0xcb, 0x83, 0x0a, 0xcb, 0x63, 0x7b, 0x0b,
+  0x23, 0xdb, 0x20, 0x44, 0xd9, 0x86, 0x01, 0xd3, 0xac, 0x0d, 0xc2, 0xb5,
+  0x6d, 0x18, 0x86, 0x8a, 0x23, 0x30, 0x41, 0x58, 0x9e, 0x0d, 0x82, 0xf1,
+  0x6d, 0x28, 0x00, 0x0f, 0x00, 0xc0, 0x80, 0x57, 0xc0, 0x4f, 0x53, 0xda,
+  0xdc, 0x1c, 0x10, 0x50, 0x56, 0x10, 0x56, 0x15, 0x52, 0x1a, 0x5d, 0x92,
+  0x9b, 0xd9, 0x1b, 0x10, 0x10, 0x90, 0xd6, 0x04, 0x01, 0x60, 0x26, 0x08,
+  0x40, 0x33, 0x41, 0x00, 0x9c, 0x0d, 0x81, 0xb1, 0xc1, 0x18, 0x03, 0x32,
+  0x48, 0x98, 0x32, 0x30, 0x83, 0x0d, 0x45, 0x25, 0x06, 0x00, 0x70, 0x06,
+  0x2c, 0xd2, 0xdc, 0xe6, 0xe8, 0xe6, 0x36, 0x08, 0x69, 0x50, 0x06, 0x55,
+  0xd8, 0xd8, 0xec, 0xda, 0x5c, 0xd2, 0xc8, 0xca, 0xdc, 0xe8, 0xa6, 0x04,
+  0x41, 0x15, 0x32, 0x3c, 0x17, 0xbb, 0x32, 0xb9, 0xb9, 0xb4, 0x37, 0xb7,
+  0x29, 0x01, 0xd1, 0x84, 0x0c, 0xcf, 0xc5, 0x2e, 0x8c, 0xcd, 0xae, 0x4c,
+  0x6e, 0x4a, 0x60, 0xd4, 0x21, 0xc3, 0x73, 0x99, 0x43, 0x0b, 0x23, 0x2b,
+  0x93, 0x6b, 0x7a, 0x23, 0x2b, 0x63, 0x9b, 0x12, 0x24, 0x95, 0xc8, 0xf0,
+  0x5c, 0xe8, 0xf2, 0xe0, 0xca, 0x82, 0xdc, 0xdc, 0xde, 0xe8, 0xc2, 0xe8,
+  0xd2, 0xde, 0xdc, 0xe6, 0xa6, 0x08, 0x13, 0x57, 0x87, 0x0c, 0xcf, 0xa5,
+  0xcc, 0x8d, 0x4e, 0x2e, 0x0f, 0xea, 0x2d, 0xcd, 0x8d, 0x6e, 0x6e, 0x8a,
+  0x00, 0x06, 0x67, 0xd0, 0x85, 0x0c, 0xcf, 0x65, 0xec, 0xad, 0xce, 0x8d,
+  0xae, 0x4c, 0x6e, 0x6e, 0x4a, 0x90, 0x06, 0x00, 0x79, 0x18, 0x00, 0x00,
+  0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66,
+  0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07,
+  0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10,
+  0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce,
+  0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b,
+  0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c,
+  0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07,
+  0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11,
+  0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0,
+  0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8,
+  0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b,
+  0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b,
+  0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87,
+  0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07,
+  0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87,
+  0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81,
+  0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30,
+  0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4,
+  0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca,
+  0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39,
+  0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b,
+  0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b,
+  0xb0, 0xc3, 0x8c, 0xc8, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x72, 0x10, 0x87,
+  0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60, 0x87, 0x70, 0xc8, 0x87,
+  0x77, 0xa8, 0x07, 0x7a, 0x98, 0x81, 0x3c, 0xe4, 0x80, 0x0f, 0x6e, 0x40,
+  0x0f, 0xe5, 0xd0, 0x0e, 0xf0, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00,
+  0x09, 0x00, 0x00, 0x00, 0x15, 0x70, 0x05, 0x7e, 0xcd, 0xf4, 0x7c, 0x0e,
+  0x04, 0x66, 0x83, 0xd8, 0x2a, 0x32, 0x4d, 0x4f, 0xba, 0xcd, 0x6f, 0x20,
+  0x10, 0xa8, 0x35, 0x00, 0x66, 0xb8, 0xfc, 0xc6, 0x99, 0x0e, 0xa4, 0x31,
+  0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x4c, 0x44, 0x4e,
+  0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x78, 0x36, 0x34, 0x5c,
+  0x44, 0x65, 0x62, 0x75, 0x67, 0x5c, 0x44, 0x58, 0x31, 0x32, 0x4d, 0x69,
+  0x73, 0x73, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x64, 0x62,
+  0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x70, 0xd0, 0x91, 0xc3, 0x98, 0x8b, 0x74, 0xa3,
+  0x16, 0x3f, 0x2b, 0x5a, 0xd9, 0x40, 0x91, 0xe9, 0x44, 0x58, 0x49, 0x4c,
+  0xd8, 0x04, 0x00, 0x00, 0x63, 0x00, 0x06, 0x00, 0x36, 0x01, 0x00, 0x00,
+  0x44, 0x58, 0x49, 0x4c, 0x03, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+  0xc0, 0x04, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00,
+  0x2d, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00,
+  0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49,
+  0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19,
+  0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42,
+  0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x42, 0x88,
+  0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42,
+  0xe4, 0x48, 0x0e, 0x90, 0x11, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c,
+  0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00,
+  0x04, 0x00, 0x00, 0x00, 0x1b, 0x88, 0x20, 0x00, 0x92, 0x0d, 0x84, 0xf0,
+  0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x01, 0x00, 0x49, 0x18, 0x00, 0x00,
+  0x01, 0x00, 0x00, 0x00, 0x13, 0x84, 0x40, 0x00, 0x89, 0x20, 0x00, 0x00,
+  0x12, 0x00, 0x00, 0x00, 0x32, 0x22, 0x08, 0x09, 0x20, 0x64, 0x85, 0x04,
+  0x13, 0x22, 0xa4, 0x84, 0x04, 0x13, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14,
+  0x12, 0x4c, 0x88, 0x8c, 0x0b, 0x84, 0x84, 0x4c, 0x10, 0x38, 0x73, 0x04,
+  0x60, 0x90, 0x01, 0x40, 0x31, 0x02, 0x30, 0x03, 0x30, 0x8c, 0x40, 0x10,
+  0xe7, 0x48, 0x53, 0x44, 0x09, 0x93, 0x1f, 0x22, 0x93, 0xd8, 0x14, 0x0e,
+  0x0a, 0x8a, 0xac, 0x08, 0x73, 0x84, 0x03, 0x01, 0x73, 0x04, 0xa0, 0x40,
+  0x40, 0x05, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87,
+  0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50,
+  0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30,
+  0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0,
+  0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20,
+  0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0,
+  0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90,
+  0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10,
+  0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20,
+  0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0,
+  0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60,
+  0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f,
+  0x24, 0x90, 0x21, 0x23, 0x25, 0x40, 0x00, 0x1e, 0xa2, 0x31, 0xe4, 0x41,
+  0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0b,
+  0x04, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14,
+  0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x82,
+  0x12, 0x28, 0x83, 0x82, 0x28, 0x86, 0x11, 0x80, 0x02, 0x29, 0x87, 0x92,
+  0x28, 0x82, 0x42, 0x28, 0x8b, 0x52, 0xa0, 0x2d, 0x01, 0xb2, 0x19, 0x00,
+  0x8a, 0x11, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00,
+  0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x8f, 0x0c, 0x6f, 0xec,
+  0xed, 0x4d, 0x0c, 0x24, 0xc6, 0x05, 0xc7, 0x45, 0xa6, 0x06, 0x46, 0xc6,
+  0x25, 0x26, 0x06, 0x04, 0x45, 0x66, 0x26, 0x27, 0x47, 0x26, 0xa6, 0x46,
+  0x46, 0x26, 0x65, 0x43, 0x10, 0x4c, 0x10, 0x00, 0x61, 0x82, 0x00, 0x0c,
+  0x1b, 0x84, 0x81, 0x98, 0x20, 0x00, 0xc4, 0x06, 0x61, 0x30, 0x38, 0xb0,
+  0xa5, 0x89, 0x4d, 0x10, 0x80, 0x62, 0xc3, 0x80, 0x24, 0xc4, 0x04, 0x01,
+  0x30, 0x26, 0x08, 0xc6, 0x33, 0x41, 0x00, 0x0e, 0x42, 0x63, 0x6f, 0x6c,
+  0x6f, 0x72, 0x41, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63,
+  0x65, 0x13, 0x04, 0x00, 0x99, 0x20, 0x00, 0xc9, 0x06, 0x23, 0x71, 0x88,
+  0xe5, 0x81, 0x36, 0x08, 0x4d, 0xb4, 0x61, 0x58, 0x18, 0x69, 0x82, 0x90,
+  0x04, 0x1b, 0x80, 0x0d, 0xc3, 0x50, 0x55, 0x13, 0x04, 0x40, 0x99, 0x20,
+  0x00, 0x0b, 0x9b, 0x29, 0xab, 0x2f, 0xa9, 0xb0, 0x3c, 0xa8, 0xb0, 0x3c,
+  0xb6, 0xb7, 0x30, 0xb2, 0x0d, 0x02, 0x96, 0x6d, 0x18, 0x2e, 0xad, 0xda,
+  0x20, 0x58, 0xdb, 0x86, 0x61, 0xa0, 0x38, 0x02, 0x13, 0x84, 0xc5, 0xd9,
+  0x20, 0x2c, 0xdf, 0x86, 0x02, 0xf0, 0x00, 0x00, 0x0c, 0x78, 0x05, 0xfc,
+  0x34, 0xa5, 0xcd, 0xcd, 0x01, 0x01, 0x65, 0x05, 0x61, 0x55, 0x21, 0xa5,
+  0xd1, 0x25, 0xb9, 0x99, 0xbd, 0x01, 0x01, 0x01, 0x69, 0x4d, 0x10, 0x00,
+  0x66, 0x82, 0x00, 0x34, 0x1b, 0x82, 0x65, 0x83, 0x61, 0x8c, 0x41, 0xd2,
+  0x90, 0x41, 0x19, 0x6c, 0x28, 0x28, 0x31, 0x00, 0x00, 0x33, 0xa8, 0xc2,
+  0xc6, 0x66, 0xd7, 0xe6, 0x92, 0x46, 0x56, 0xe6, 0x46, 0x37, 0x25, 0x08,
+  0xaa, 0x90, 0xe1, 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d,
+  0x09, 0x88, 0x26, 0x64, 0x78, 0x2e, 0x76, 0x61, 0x6c, 0x76, 0x65, 0x72,
+  0x53, 0x02, 0xa3, 0x0e, 0x19, 0x9e, 0xcb, 0x1c, 0x5a, 0x18, 0x59, 0x99,
+  0x5c, 0xd3, 0x1b, 0x59, 0x19, 0xdb, 0x94, 0x20, 0xa9, 0x44, 0x86, 0xe7,
+  0x42, 0x97, 0x07, 0x57, 0x16, 0xe4, 0xe6, 0xf6, 0x46, 0x17, 0x46, 0x97,
+  0xf6, 0xe6, 0x36, 0x37, 0x45, 0x90, 0xb8, 0x3a, 0x64, 0x78, 0x2e, 0x65,
+  0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x53, 0x04,
+  0x30, 0x30, 0x03, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
+  0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88,
+  0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73,
+  0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e,
+  0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30,
+  0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8,
+  0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b,
+  0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76,
+  0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e,
+  0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e,
+  0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61,
+  0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4,
+  0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76,
+  0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37,
+  0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76,
+  0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71,
+  0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e,
+  0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1,
+  0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61,
+  0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90,
+  0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8,
+  0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc,
+  0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8,
+  0x21, 0x07, 0x7c, 0x70, 0x03, 0x72, 0x10, 0x87, 0x73, 0x70, 0x03, 0x7b,
+  0x08, 0x07, 0x79, 0x60, 0x87, 0x70, 0xc8, 0x87, 0x77, 0xa8, 0x07, 0x7a,
+  0x98, 0x81, 0x3c, 0xe4, 0x80, 0x0f, 0x6e, 0x40, 0x0f, 0xe5, 0xd0, 0x0e,
+  0xf0, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
+  0x15, 0x70, 0x05, 0x7e, 0xcd, 0xf4, 0x7c, 0x0e, 0x04, 0x66, 0x83, 0xd8,
+  0x2a, 0x32, 0x4d, 0x4f, 0xba, 0xcd, 0x6f, 0x20, 0x10, 0xa8, 0x35, 0x00,
+  0x66, 0xb8, 0xfc, 0xc6, 0x99, 0x0e, 0xa4, 0x31, 0x7c, 0x00, 0x00, 0x00,
+  0x61, 0x20, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c,
+  0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x54, 0x63, 0x11, 0xad,
+  0x39, 0xe7, 0xe4, 0xd7, 0x9a, 0x73, 0x4e, 0x7e, 0xad, 0x39, 0xe7, 0xf4,
+  0x07, 0x82, 0x20, 0x88, 0xff, 0x02, 0xf1, 0x50, 0x47, 0x20, 0x00, 0x80,
+  0x01, 0x18, 0x00, 0x00, 0x14, 0x00, 0x20, 0x01, 0xc0, 0xb6, 0xa1, 0x80,
+  0xa0, 0x61, 0x03, 0x22, 0x28, 0x00, 0x00, 0xc3, 0x81, 0x00, 0x00, 0x00,
+  0x02, 0x00, 0x00, 0x00, 0x16, 0x71, 0x3c, 0x00, 0xb6, 0x38, 0xc0, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};

+ 428 - 0
DX12RayGenShader.h

@@ -0,0 +1,428 @@
+#if 0
+;
+; Note: shader requires additional functionality:
+;       Typed UAV Load Additional Formats
+;
+; shader debug name: x64\Debug\DX12RayGenShader.pdb
+; shader hash: 2f0fc4477c866a8b514963c2680d6cd2
+;
+; Buffer Definitions:
+;
+;
+; Resource Bindings:
+;
+; Name                                 Type  Format         Dim      ID      HLSL Bind  Count
+; ------------------------------ ---------- ------- ----------- ------- -------------- ------
+; gOutput                               UAV     f32          2d      U0             u0     1
+; guiTexture                            UAV     f32          2d      U1             u1     1
+;
+target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64"
+target triple = "dxil-ms-dx"
+
+%"class.RWTexture2D<vector<float, 4> >" = type { <4 x float> }
+%dx.types.Handle = type { i8* }
+%dx.types.ResRet.f32 = type { float, float, float, float, i32 }
+
+@"\01?gOutput@@3V?$RWTexture2D@V?$vector@M$03@@@@A" = external constant %"class.RWTexture2D<vector<float, 4> >", align 4
+@"\01?guiTexture@@3V?$RWTexture2D@V?$vector@M$03@@@@A" = external constant %"class.RWTexture2D<vector<float, 4> >", align 4
+@dx.nothing.a = internal constant [1 x i32] zeroinitializer
+
+; Function Attrs: nounwind
+define void @"\01?RayGen@@YAXXZ"() #0 {
+  %1 = load %"class.RWTexture2D<vector<float, 4> >", %"class.RWTexture2D<vector<float, 4> >"* @"\01?guiTexture@@3V?$RWTexture2D@V?$vector@M$03@@@@A"
+  %2 = load %"class.RWTexture2D<vector<float, 4> >", %"class.RWTexture2D<vector<float, 4> >"* @"\01?gOutput@@3V?$RWTexture2D@V?$vector@M$03@@@@A"
+  %3 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @dx.nothing.a, i32 0, i32 0)
+  %4 = call i32 @dx.op.dispatchRaysIndex.i32(i32 145, i8 0)  ; DispatchRaysIndex(col)
+  %5 = call i32 @dx.op.dispatchRaysIndex.i32(i32 145, i8 1)  ; DispatchRaysIndex(col)
+  %6 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @dx.nothing.a, i32 0, i32 0)
+  %7 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @dx.nothing.a, i32 0, i32 0)
+  %8 = call %dx.types.Handle @"dx.op.createHandleForLib.class.RWTexture2D<vector<float, 4> >"(i32 160, %"class.RWTexture2D<vector<float, 4> >" %1)  ; CreateHandleForLib(Resource)
+  %9 = call %dx.types.ResRet.f32 @dx.op.textureLoad.f32(i32 66, %dx.types.Handle %8, i32 undef, i32 %4, i32 %5, i32 undef, i32 undef, i32 undef, i32 undef)  ; TextureLoad(srv,mipLevelOrSampleCount,coord0,coord1,coord2,offset0,offset1,offset2)
+  %10 = extractvalue %dx.types.ResRet.f32 %9, 0
+  %11 = extractvalue %dx.types.ResRet.f32 %9, 1
+  %12 = extractvalue %dx.types.ResRet.f32 %9, 2
+  %13 = extractvalue %dx.types.ResRet.f32 %9, 3
+  %14 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @dx.nothing.a, i32 0, i32 0)
+  %15 = fsub fast float 1.000000e+00, %13
+  %16 = fmul fast float 0x3FECCCCCC0000000, %15
+  %17 = fmul fast float 0x3FE3333340000000, %15
+  %18 = fmul fast float 0x3FC99999A0000000, %15
+  %19 = fmul fast float %10, %13
+  %20 = fmul fast float %11, %13
+  %21 = fmul fast float %12, %13
+  %22 = fadd fast float %16, %19
+  %23 = fadd fast float %17, %20
+  %24 = fadd fast float %18, %21
+  %25 = call %dx.types.Handle @"dx.op.createHandleForLib.class.RWTexture2D<vector<float, 4> >"(i32 160, %"class.RWTexture2D<vector<float, 4> >" %2)  ; CreateHandleForLib(Resource)
+  call void @dx.op.textureStore.f32(i32 67, %dx.types.Handle %25, i32 %4, i32 %5, i32 undef, float %22, float %23, float %24, float 1.000000e+00, i8 15)  ; TextureStore(srv,coord0,coord1,coord2,value0,value1,value2,value3,mask)
+  %26 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @dx.nothing.a, i32 0, i32 0)
+  ret void
+}
+
+; Function Attrs: nounwind readnone
+declare i32 @dx.op.dispatchRaysIndex.i32(i32, i8) #1
+
+; Function Attrs: nounwind readonly
+declare %dx.types.ResRet.f32 @dx.op.textureLoad.f32(i32, %dx.types.Handle, i32, i32, i32, i32, i32, i32, i32) #2
+
+; Function Attrs: nounwind
+declare void @dx.op.textureStore.f32(i32, %dx.types.Handle, i32, i32, i32, float, float, float, float, i8) #0
+
+; Function Attrs: nounwind readonly
+declare %dx.types.Handle @"dx.op.createHandleForLib.class.RWTexture2D<vector<float, 4> >"(i32, %"class.RWTexture2D<vector<float, 4> >") #2
+
+attributes #0 = { nounwind }
+attributes #1 = { nounwind readnone }
+attributes #2 = { nounwind readonly }
+
+!llvm.ident = !{!0}
+!dx.version = !{!1}
+!dx.valver = !{!2}
+!dx.shaderModel = !{!3}
+!dx.resources = !{!4}
+!dx.typeAnnotations = !{!9}
+!dx.entryPoints = !{!13, !15}
+
+!0 = !{!"dxcoob 1.8.2502.11 (239921522)"}
+!1 = !{i32 1, i32 3}
+!2 = !{i32 1, i32 8}
+!3 = !{!"lib", i32 6, i32 3}
+!4 = !{null, !5, null, null}
+!5 = !{!6, !8}
+!6 = !{i32 0, %"class.RWTexture2D<vector<float, 4> >"* @"\01?gOutput@@3V?$RWTexture2D@V?$vector@M$03@@@@A", !"gOutput", i32 0, i32 0, i32 1, i32 2, i1 false, i1 false, i1 false, !7}
+!7 = !{i32 0, i32 9}
+!8 = !{i32 1, %"class.RWTexture2D<vector<float, 4> >"* @"\01?guiTexture@@3V?$RWTexture2D@V?$vector@M$03@@@@A", !"guiTexture", i32 0, i32 1, i32 1, i32 2, i1 false, i1 false, i1 false, !7}
+!9 = !{i32 1, void ()* @"\01?RayGen@@YAXXZ", !10}
+!10 = !{!11}
+!11 = !{i32 1, !12, !12}
+!12 = !{}
+!13 = !{null, !"", null, !4, !14}
+!14 = !{i32 0, i64 8193}
+!15 = !{void ()* @"\01?RayGen@@YAXXZ", !"\01?RayGen@@YAXXZ", null, null, !16}
+!16 = !{i32 8, i32 7, i32 5, !17}
+!17 = !{i32 0}
+
+#endif
+
+const unsigned char g_lib.no::entry[] = {
+  0x44, 0x58, 0x42, 0x43, 0x01, 0x43, 0x94, 0x5c, 0x28, 0x94, 0x57, 0x1f,
+  0xfa, 0x5d, 0x89, 0x63, 0x3a, 0x5c, 0xac, 0xe9, 0x01, 0x00, 0x00, 0x00,
+  0xfc, 0x0e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
+  0x4c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x78, 0x01, 0x00, 0x00,
+  0xcc, 0x07, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x14, 0x08, 0x00, 0x00,
+  0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x28, 0x00, 0x00, 0x00,
+  0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x12, 0x00, 0x00,
+  0x15, 0x00, 0x00, 0x00, 0x32, 0x33, 0x39, 0x39, 0x32, 0x31, 0x35, 0x32,
+  0x00, 0x31, 0x2e, 0x38, 0x2e, 0x32, 0x35, 0x30, 0x32, 0x2e, 0x31, 0x31,
+  0x00, 0x00, 0x00, 0x00, 0x52, 0x44, 0x41, 0x54, 0xf4, 0x00, 0x00, 0x00,
+  0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
+  0x4c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00,
+  0x01, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x67, 0x4f, 0x75,
+  0x74, 0x70, 0x75, 0x74, 0x00, 0x67, 0x75, 0x69, 0x54, 0x65, 0x78, 0x74,
+  0x75, 0x72, 0x65, 0x00, 0x01, 0x3f, 0x52, 0x61, 0x79, 0x47, 0x65, 0x6e,
+  0x40, 0x40, 0x59, 0x41, 0x58, 0x58, 0x5a, 0x00, 0x52, 0x61, 0x79, 0x47,
+  0x65, 0x6e, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
+  0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+  0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+  0x01, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x04, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+  0x34, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x63, 0x00, 0x07, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00,
+  0x0c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x01, 0x00, 0x00, 0x00, 0x53, 0x54, 0x41, 0x54, 0x4c, 0x06, 0x00, 0x00,
+  0x63, 0x00, 0x06, 0x00, 0x93, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c,
+  0x03, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x34, 0x06, 0x00, 0x00,
+  0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x8a, 0x01, 0x00, 0x00,
+  0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
+  0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39,
+  0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62,
+  0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14,
+  0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20,
+  0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90,
+  0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a,
+  0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+  0x1b, 0x88, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0xda, 0x60, 0x08,
+  0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x12, 0x40, 0x6d, 0x30, 0x86, 0xff,
+  0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00,
+  0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06,
+  0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00,
+  0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84,
+  0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c,
+  0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x64, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30,
+  0x13, 0x19, 0x8c, 0x03, 0x3b, 0x84, 0xc3, 0x3c, 0xcc, 0x83, 0x1b, 0xc8,
+  0xc2, 0x2d, 0xd0, 0x42, 0x39, 0xe0, 0x03, 0x3d, 0xd4, 0x83, 0x3c, 0x94,
+  0x83, 0x1c, 0x90, 0x02, 0x1f, 0xd8, 0x43, 0x39, 0x8c, 0x03, 0x3d, 0xbc,
+  0x83, 0x3c, 0xf0, 0x81, 0x39, 0xb0, 0xc3, 0x3b, 0x84, 0x03, 0x3d, 0xb0,
+  0x01, 0x18, 0xd0, 0x81, 0x1f, 0x80, 0x81, 0x1f, 0xa0, 0x20, 0x90, 0x98,
+  0x23, 0x00, 0x83, 0x0c, 0x20, 0x54, 0x46, 0x00, 0x4a, 0x70, 0x08, 0xcd,
+  0x11, 0x20, 0x65, 0x20, 0x44, 0xd1, 0xba, 0x69, 0xb8, 0xfc, 0x09, 0x7b,
+  0x08, 0xc9, 0x5f, 0x09, 0x69, 0x25, 0x26, 0xbf, 0xb8, 0x6d, 0x54, 0x00,
+  0x00, 0x00, 0x21, 0x75, 0xcf, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0x1f,
+  0x02, 0xcd, 0xb0, 0x10, 0x28, 0x70, 0x45, 0x69, 0xe4, 0x11, 0x42, 0x08,
+  0x21, 0x84, 0x60, 0x59, 0x0e, 0x79, 0x84, 0x10, 0x00, 0x00, 0x50, 0x24,
+  0xcb, 0xf0, 0x88, 0x20, 0x3a, 0x10, 0x30, 0x47, 0x10, 0xcc, 0x11, 0x80,
+  0x02, 0x00, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87,
+  0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50,
+  0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30,
+  0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0,
+  0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20,
+  0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0,
+  0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90,
+  0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10,
+  0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20,
+  0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0,
+  0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60,
+  0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f,
+  0x64, 0x90, 0x21, 0x23, 0x45, 0x44, 0x00, 0x6a, 0x00, 0xc0, 0xd4, 0x00,
+  0x80, 0xd9, 0xc1, 0x1a, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x02, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x2c, 0x40, 0x00, 0x08, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x81, 0x80, 0x00, 0x18,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01,
+  0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0x87, 0x02,
+  0x02, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2c, 0x10,
+  0x0c, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90,
+  0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x50, 0x06, 0x23,
+  0x00, 0xc5, 0x50, 0x04, 0x25, 0x51, 0x10, 0xe5, 0x50, 0x0a, 0x45, 0x51,
+  0x38, 0x84, 0x4b, 0x10, 0x30, 0x80, 0xee, 0x08, 0x00, 0x95, 0x11, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00,
+  0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x8f, 0x0c, 0x6f, 0xec,
+  0xed, 0x4d, 0x0c, 0x24, 0xc6, 0x05, 0xc7, 0x45, 0xa6, 0x06, 0x46, 0xc6,
+  0x25, 0x26, 0x06, 0x04, 0x45, 0x66, 0x26, 0x27, 0x47, 0x26, 0xa6, 0x46,
+  0x46, 0x26, 0x65, 0x43, 0x10, 0x4c, 0x10, 0x08, 0x64, 0x82, 0x40, 0x24,
+  0x1b, 0x84, 0x81, 0x98, 0x20, 0x10, 0xca, 0x06, 0xc1, 0x30, 0x38, 0xb0,
+  0xa5, 0x89, 0x4d, 0x10, 0x88, 0x65, 0xc3, 0x80, 0x24, 0xc4, 0x04, 0x61,
+  0x00, 0x78, 0x9c, 0x3d, 0xd5, 0xd1, 0xc1, 0xd5, 0xd1, 0x4d, 0x10, 0x08,
+  0x66, 0x82, 0x70, 0x51, 0x13, 0x04, 0xa2, 0xd9, 0x20, 0x18, 0xcf, 0x86,
+  0xc5, 0x58, 0x18, 0xc3, 0x18, 0x1a, 0xc7, 0x71, 0xa0, 0x09, 0xc2, 0x10,
+  0x50, 0x39, 0xab, 0x4b, 0xa3, 0x2a, 0xc3, 0xa3, 0xab, 0x93, 0x2b, 0xdb,
+  0xb0, 0x0c, 0xd2, 0x64, 0x0c, 0x43, 0xe3, 0x38, 0x0e, 0xb4, 0x41, 0x88,
+  0xa8, 0x0d, 0x04, 0x50, 0x01, 0xc0, 0x04, 0x21, 0x19, 0x36, 0x00, 0x1b,
+  0x86, 0x01, 0xc3, 0x36, 0x04, 0xd9, 0x86, 0x61, 0xb8, 0x34, 0x02, 0x13,
+  0x04, 0x6c, 0xda, 0x20, 0x18, 0xdd, 0x86, 0x02, 0xe0, 0x00, 0xcb, 0xe3,
+  0x13, 0xf0, 0x23, 0x15, 0x96, 0x77, 0x54, 0xe6, 0x06, 0x04, 0x94, 0x15,
+  0x84, 0x85, 0xa5, 0x35, 0x41, 0x20, 0x9c, 0x09, 0x02, 0xf1, 0x4c, 0x10,
+  0x08, 0x68, 0x43, 0x60, 0x6c, 0x20, 0xc2, 0x40, 0x0c, 0xc6, 0x80, 0x0c,
+  0x36, 0x14, 0x17, 0x18, 0x00, 0x40, 0x19, 0xd0, 0x30, 0x63, 0x7b, 0x0b,
+  0xa3, 0x9b, 0x9b, 0x20, 0x10, 0x11, 0x8b, 0x34, 0xb7, 0x39, 0xba, 0xb9,
+  0x09, 0x02, 0x21, 0x11, 0xa1, 0x2b, 0xc3, 0xfb, 0x62, 0x7b, 0x0b, 0x23,
+  0x63, 0x42, 0x57, 0x86, 0xf7, 0x35, 0x47, 0xf7, 0x26, 0x57, 0xb6, 0x01,
+  0x39, 0x03, 0x34, 0x48, 0x03, 0x35, 0x58, 0x83, 0x81, 0x0d, 0x86, 0x2a,
+  0x6c, 0x6c, 0x76, 0x6d, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x53, 0x82,
+  0xa0, 0x0a, 0x19, 0x9e, 0x8b, 0x5d, 0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb,
+  0x94, 0x80, 0x68, 0x42, 0x86, 0xe7, 0x62, 0x17, 0xc6, 0x66, 0x57, 0x26,
+  0x37, 0x25, 0x30, 0xea, 0x90, 0xe1, 0xb9, 0xcc, 0xa1, 0x85, 0x91, 0x95,
+  0xc9, 0x35, 0xbd, 0x91, 0x95, 0xb1, 0x4d, 0x09, 0x92, 0x32, 0x64, 0x78,
+  0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x82,
+  0xaa, 0x12, 0x19, 0x9e, 0x0b, 0x5d, 0x1e, 0x5c, 0x59, 0x90, 0x9b, 0xdb,
+  0x1b, 0x5d, 0x18, 0x5d, 0xda, 0x9b, 0xdb, 0xdc, 0x94, 0x40, 0xab, 0x43,
+  0x86, 0xe7, 0x52, 0xe6, 0x46, 0x27, 0x97, 0x07, 0xf5, 0x96, 0xe6, 0x46,
+  0x37, 0x37, 0x45, 0xf0, 0xca, 0xa0, 0x0b, 0x19, 0x9e, 0xcb, 0xd8, 0x5b,
+  0x9d, 0x1b, 0x5d, 0x99, 0xdc, 0xdc, 0x94, 0x80, 0x0d, 0x00, 0x00, 0x00,
+  0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c,
+  0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3,
+  0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6,
+  0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e,
+  0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43,
+  0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03,
+  0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48,
+  0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20,
+  0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e,
+  0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d,
+  0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89,
+  0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83,
+  0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68,
+  0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90,
+  0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78,
+  0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98,
+  0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5,
+  0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c,
+  0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c,
+  0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43,
+  0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43,
+  0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82,
+  0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8, 0x21, 0x07, 0x7c, 0x70,
+  0x03, 0x72, 0x10, 0x87, 0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60,
+  0x87, 0x70, 0xc8, 0x87, 0x77, 0xa8, 0x07, 0x7a, 0x98, 0x81, 0x3c, 0xe4,
+  0x80, 0x0f, 0x6e, 0x40, 0x0f, 0xe5, 0xd0, 0x0e, 0xf0, 0x00, 0x00, 0x00,
+  0x71, 0x20, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x35, 0xf0, 0x04, 0x7e,
+  0xd2, 0x70, 0xfe, 0x58, 0x76, 0x03, 0x81, 0xd9, 0x20, 0x16, 0xab, 0x2d,
+  0x00, 0x37, 0x08, 0xfc, 0xce, 0xcf, 0x3a, 0x1d, 0x5e, 0xa7, 0x03, 0x81,
+  0x33, 0xeb, 0x8f, 0x24, 0xbd, 0x52, 0xcb, 0x78, 0x7a, 0x5d, 0x5e, 0x96,
+  0x11, 0x81, 0xd6, 0x1f, 0xc9, 0x5e, 0x1e, 0xd3, 0xdf, 0x72, 0x60, 0x93,
+  0x04, 0x9b, 0x01, 0x81, 0x40, 0x60, 0xb0, 0x02, 0xe2, 0x20, 0xf0, 0x3b,
+  0xd7, 0xd3, 0xd4, 0x32, 0x9e, 0x5e, 0x97, 0x97, 0x81, 0xc0, 0x99, 0xf5,
+  0x47, 0x92, 0x5e, 0xa9, 0x65, 0x3c, 0xbd, 0x2e, 0x2f, 0xcb, 0x88, 0x40,
+  0xeb, 0x8f, 0x64, 0x2f, 0x8f, 0xe9, 0x6f, 0x39, 0xb0, 0x49, 0x82, 0xcd,
+  0x80, 0x40, 0x20, 0x30, 0x68, 0x02, 0xcc, 0x70, 0xf9, 0x8d, 0x33, 0x1d,
+  0x48, 0x63, 0xf8, 0x40, 0x1d, 0xf4, 0x01, 0x19, 0xef, 0x7a, 0xc3, 0x5d,
+  0x63, 0x79, 0x39, 0x4c, 0x2f, 0x23, 0xc3, 0x6e, 0x32, 0xbb, 0x6c, 0x7c,
+  0xcb, 0x99, 0x69, 0xb1, 0x6b, 0xcc, 0x0e, 0xcf, 0xe7, 0x2e, 0xe9, 0x95,
+  0x5a, 0xc6, 0xd3, 0xeb, 0xf2, 0xb2, 0x8c, 0xc8, 0xb3, 0x97, 0xc7, 0xf4,
+  0xb7, 0x9c, 0x67, 0x66, 0xbf, 0xc3, 0x74, 0x16, 0x88, 0xe6, 0x03, 0xf9,
+  0x8c, 0x60, 0x1b, 0x2e, 0xdf, 0x79, 0xfc, 0x01, 0x91, 0x1e, 0x60, 0x12,
+  0x8e, 0x15, 0xc0, 0x24, 0xb1, 0x19, 0x88, 0xcb, 0x47, 0x6e, 0xdb, 0x0a,
+  0xaa, 0xe1, 0xf2, 0x9d, 0xc7, 0x9f, 0x88, 0x6b, 0xa2, 0x22, 0xa2, 0x74,
+  0x80, 0xc1, 0x2f, 0x6e, 0xdb, 0x0c, 0xac, 0xe1, 0xf2, 0x9d, 0xc7, 0x9f,
+  0x88, 0x6b, 0xa2, 0x22, 0x82, 0x9d, 0x9c, 0x88, 0xf0, 0x8b, 0xdb, 0x06,
+  0x00, 0x00, 0x00, 0x00, 0x49, 0x4c, 0x44, 0x4e, 0x24, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x1e, 0x00, 0x78, 0x36, 0x34, 0x5c, 0x44, 0x65, 0x62, 0x75,
+  0x67, 0x5c, 0x44, 0x58, 0x31, 0x32, 0x52, 0x61, 0x79, 0x47, 0x65, 0x6e,
+  0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x64, 0x62, 0x00, 0x00,
+  0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x2f, 0x0f, 0xc4, 0x47, 0x7c, 0x86, 0x6a, 0x8b, 0x51, 0x49, 0x63, 0xc2,
+  0x68, 0x0d, 0x6c, 0xd2, 0x44, 0x58, 0x49, 0x4c, 0xe0, 0x06, 0x00, 0x00,
+  0x63, 0x00, 0x06, 0x00, 0xb8, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c,
+  0x03, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xc8, 0x06, 0x00, 0x00,
+  0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xaf, 0x01, 0x00, 0x00,
+  0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
+  0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39,
+  0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62,
+  0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14,
+  0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20,
+  0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90,
+  0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a,
+  0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+  0x1b, 0x88, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0xda, 0x60, 0x08,
+  0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x12, 0x40, 0x6d, 0x30, 0x86, 0xff,
+  0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00,
+  0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06,
+  0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00,
+  0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84,
+  0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c,
+  0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x68, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30,
+  0x13, 0x19, 0x8c, 0x03, 0x3b, 0x84, 0xc3, 0x3c, 0xcc, 0x83, 0x1b, 0xc8,
+  0xc2, 0x2d, 0xd0, 0x42, 0x39, 0xe0, 0x03, 0x3d, 0xd4, 0x83, 0x3c, 0x94,
+  0x83, 0x1c, 0x90, 0x02, 0x1f, 0xd8, 0x43, 0x39, 0x8c, 0x03, 0x3d, 0xbc,
+  0x83, 0x3c, 0xf0, 0x81, 0x39, 0xb0, 0xc3, 0x3b, 0x84, 0x03, 0x3d, 0xb0,
+  0x01, 0x18, 0xd0, 0x81, 0x1f, 0x80, 0x81, 0x1f, 0xa0, 0x20, 0x90, 0x98,
+  0x23, 0x00, 0x83, 0x0c, 0x20, 0x54, 0x46, 0x00, 0x4a, 0x70, 0x08, 0xcd,
+  0x11, 0x20, 0x65, 0x20, 0x44, 0xd1, 0xba, 0x69, 0xb8, 0xfc, 0x09, 0x7b,
+  0x08, 0xc9, 0x5f, 0x09, 0x69, 0x25, 0x26, 0xbf, 0xb8, 0x6d, 0x54, 0x00,
+  0x00, 0x00, 0x21, 0x75, 0xcf, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0x1f,
+  0x02, 0xcd, 0xb0, 0x10, 0x28, 0x70, 0x45, 0x69, 0xe4, 0x11, 0x42, 0x08,
+  0x21, 0x84, 0x60, 0x59, 0x0e, 0x79, 0x84, 0x10, 0x00, 0x00, 0x50, 0x24,
+  0xcb, 0xf0, 0x88, 0x20, 0x3a, 0x10, 0x30, 0x47, 0x10, 0xcc, 0x11, 0x80,
+  0x02, 0x11, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87,
+  0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50,
+  0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30,
+  0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0,
+  0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20,
+  0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0,
+  0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90,
+  0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10,
+  0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20,
+  0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0,
+  0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60,
+  0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f,
+  0x64, 0x90, 0x21, 0x23, 0x45, 0x44, 0x00, 0x6a, 0x00, 0xc0, 0xd4, 0x00,
+  0x80, 0xd9, 0x81, 0x1a, 0x0c, 0x79, 0x10, 0x00, 0x00, 0x02, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x2c, 0x40, 0x00, 0x08, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x81, 0x80, 0x00, 0x18,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01,
+  0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0x87, 0x02,
+  0x02, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2c, 0x10,
+  0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90,
+  0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x50, 0x06, 0x05,
+  0x51, 0x0c, 0x23, 0x00, 0x45, 0x50, 0x12, 0xe5, 0x50, 0x0a, 0x84, 0x4b,
+  0x10, 0x30, 0x80, 0xee, 0x08, 0x00, 0x95, 0x11, 0x00, 0x00, 0x00, 0x00,
+  0x79, 0x18, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90,
+  0x46, 0x02, 0x13, 0x44, 0x8f, 0x0c, 0x6f, 0xec, 0xed, 0x4d, 0x0c, 0x24,
+  0xc6, 0x05, 0xc7, 0x45, 0xa6, 0x06, 0x46, 0xc6, 0x25, 0x26, 0x06, 0x04,
+  0x45, 0x66, 0x26, 0x27, 0x47, 0x26, 0xa6, 0x46, 0x46, 0x26, 0x65, 0x43,
+  0x10, 0x4c, 0x10, 0x08, 0x64, 0x82, 0x40, 0x24, 0x1b, 0x84, 0x81, 0x98,
+  0x20, 0x10, 0xca, 0x06, 0x61, 0x30, 0x38, 0xb0, 0xa5, 0x89, 0x4d, 0x10,
+  0x88, 0x65, 0xc3, 0x80, 0x24, 0xc4, 0x04, 0x81, 0x60, 0x26, 0x08, 0x03,
+  0xc0, 0xe3, 0xec, 0xa9, 0x8e, 0x0e, 0xae, 0x8e, 0x6e, 0x82, 0x40, 0x34,
+  0x13, 0x84, 0x4b, 0x9a, 0x20, 0x10, 0xce, 0x06, 0x61, 0x81, 0x36, 0x2c,
+  0x0b, 0xd3, 0x2c, 0xcb, 0xe0, 0x3c, 0xcf, 0x13, 0x4d, 0x10, 0x86, 0x80,
+  0xca, 0x59, 0x5d, 0x1a, 0x55, 0x19, 0x1e, 0x5d, 0x9d, 0x5c, 0xd9, 0x86,
+  0x65, 0x98, 0xa8, 0x65, 0x18, 0x9c, 0xe7, 0x79, 0xa2, 0x0d, 0x82, 0x54,
+  0x6d, 0x20, 0x00, 0x0b, 0x00, 0x26, 0x08, 0xc9, 0xb0, 0x01, 0xd8, 0x30,
+  0x0c, 0x59, 0xb6, 0x21, 0xd0, 0x36, 0x0c, 0x03, 0xb6, 0x11, 0x98, 0x20,
+  0x60, 0xd1, 0x06, 0x61, 0xf1, 0x36, 0x14, 0x40, 0x07, 0x5c, 0x1f, 0x9f,
+  0x80, 0x1f, 0xa9, 0xb0, 0xbc, 0xa3, 0x32, 0x37, 0x20, 0xa0, 0xac, 0x20,
+  0x2c, 0x2c, 0xad, 0x09, 0x02, 0xf1, 0x4c, 0x10, 0x08, 0x68, 0x43, 0xb0,
+  0x6c, 0x20, 0x0c, 0x31, 0x18, 0x03, 0x32, 0xd8, 0x50, 0x60, 0x61, 0x00,
+  0x00, 0x65, 0x50, 0x85, 0x8d, 0xcd, 0xae, 0xcd, 0x25, 0x8d, 0xac, 0xcc,
+  0x8d, 0x6e, 0x4a, 0x10, 0x54, 0x21, 0xc3, 0x73, 0xb1, 0x2b, 0x93, 0x9b,
+  0x4b, 0x7b, 0x73, 0x9b, 0x12, 0x10, 0x4d, 0xc8, 0xf0, 0x5c, 0xec, 0xc2,
+  0xd8, 0xec, 0xca, 0xe4, 0xa6, 0x04, 0x46, 0x1d, 0x32, 0x3c, 0x97, 0x39,
+  0xb4, 0x30, 0xb2, 0x32, 0xb9, 0xa6, 0x37, 0xb2, 0x32, 0xb6, 0x29, 0x41,
+  0x52, 0x86, 0x0c, 0xcf, 0x45, 0xae, 0x6c, 0xee, 0xad, 0x4e, 0x6e, 0xac,
+  0x6c, 0x6e, 0x4a, 0x60, 0x55, 0x22, 0xc3, 0x73, 0xa1, 0xcb, 0x83, 0x2b,
+  0x0b, 0x72, 0x73, 0x7b, 0xa3, 0x0b, 0xa3, 0x4b, 0x7b, 0x73, 0x9b, 0x9b,
+  0x12, 0x6c, 0x75, 0xc8, 0xf0, 0x5c, 0xca, 0xdc, 0xe8, 0xe4, 0xf2, 0xa0,
+  0xde, 0xd2, 0xdc, 0xe8, 0xe6, 0xa6, 0x08, 0x5f, 0x19, 0x00, 0x00, 0x00,
+  0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c,
+  0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3,
+  0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6,
+  0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e,
+  0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43,
+  0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03,
+  0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48,
+  0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20,
+  0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e,
+  0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d,
+  0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89,
+  0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83,
+  0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68,
+  0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90,
+  0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78,
+  0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98,
+  0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5,
+  0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c,
+  0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c,
+  0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43,
+  0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43,
+  0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82,
+  0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8, 0x21, 0x07, 0x7c, 0x70,
+  0x03, 0x72, 0x10, 0x87, 0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60,
+  0x87, 0x70, 0xc8, 0x87, 0x77, 0xa8, 0x07, 0x7a, 0x98, 0x81, 0x3c, 0xe4,
+  0x80, 0x0f, 0x6e, 0x40, 0x0f, 0xe5, 0xd0, 0x0e, 0xf0, 0x00, 0x00, 0x00,
+  0x71, 0x20, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x35, 0xf0, 0x04, 0x7e,
+  0xd2, 0x70, 0xfe, 0x58, 0x76, 0x03, 0x81, 0xd9, 0x20, 0x16, 0xab, 0x2d,
+  0x00, 0x37, 0x08, 0xfc, 0xce, 0xcf, 0x3a, 0x1d, 0x5e, 0xa7, 0x03, 0x81,
+  0x33, 0xeb, 0x8f, 0x24, 0xbd, 0x52, 0xcb, 0x78, 0x7a, 0x5d, 0x5e, 0x96,
+  0x11, 0x81, 0xd6, 0x1f, 0xc9, 0x5e, 0x1e, 0xd3, 0xdf, 0x72, 0x60, 0x93,
+  0x04, 0x9b, 0x01, 0x81, 0x40, 0x60, 0xb0, 0x02, 0xe2, 0x20, 0xf0, 0x3b,
+  0xd7, 0xd3, 0xd4, 0x32, 0x9e, 0x5e, 0x97, 0x97, 0x81, 0xc0, 0x99, 0xf5,
+  0x47, 0x92, 0x5e, 0xa9, 0x65, 0x3c, 0xbd, 0x2e, 0x2f, 0xcb, 0x88, 0x40,
+  0xeb, 0x8f, 0x64, 0x2f, 0x8f, 0xe9, 0x6f, 0x39, 0xb0, 0x49, 0x82, 0xcd,
+  0x80, 0x40, 0x20, 0x30, 0x68, 0x02, 0xcc, 0x70, 0xf9, 0x8d, 0x33, 0x1d,
+  0x48, 0x63, 0xf8, 0x40, 0x1d, 0xf4, 0x01, 0x19, 0xef, 0x7a, 0xc3, 0x5d,
+  0x63, 0x79, 0x39, 0x4c, 0x2f, 0x23, 0xc3, 0x6e, 0x32, 0xbb, 0x6c, 0x7c,
+  0xcb, 0x99, 0x69, 0xb1, 0x6b, 0xcc, 0x0e, 0xcf, 0xe7, 0x2e, 0xe9, 0x95,
+  0x5a, 0xc6, 0xd3, 0xeb, 0xf2, 0xb2, 0x8c, 0xc8, 0xb3, 0x97, 0xc7, 0xf4,
+  0xb7, 0x9c, 0x67, 0x66, 0xbf, 0xc3, 0x74, 0x16, 0x88, 0xe6, 0x03, 0xf9,
+  0x8c, 0x60, 0x1b, 0x2e, 0xdf, 0x79, 0xfc, 0x01, 0x91, 0x1e, 0x60, 0x12,
+  0x8e, 0x15, 0xc0, 0x24, 0xb1, 0x19, 0x88, 0xcb, 0x47, 0x6e, 0xdb, 0x0a,
+  0xaa, 0xe1, 0xf2, 0x9d, 0xc7, 0x9f, 0x88, 0x6b, 0xa2, 0x22, 0xa2, 0x74,
+  0x80, 0xc1, 0x2f, 0x6e, 0xdb, 0x0c, 0xac, 0xe1, 0xf2, 0x9d, 0xc7, 0x9f,
+  0x88, 0x6b, 0xa2, 0x22, 0x82, 0x9d, 0x9c, 0x88, 0xf0, 0x8b, 0xdb, 0x06,
+  0x61, 0x20, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c,
+  0x10, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xa4, 0xca, 0xa3, 0x04,
+  0x46, 0x00, 0x88, 0x94, 0x61, 0xc0, 0x0c, 0x40, 0x89, 0x0a, 0x14, 0xb0,
+  0x40, 0x11, 0x06, 0x10, 0x18, 0x23, 0x68, 0xcd, 0x39, 0x27, 0xbf, 0x31,
+  0x02, 0x9d, 0x35, 0xe7, 0xf8, 0x1b, 0x23, 0x30, 0xe7, 0x9c, 0xb5, 0xbf,
+  0x31, 0x02, 0x10, 0x04, 0x41, 0xfc, 0xa3, 0x3c, 0xd4, 0x51, 0x18, 0x02,
+  0xc1, 0x10, 0x0c, 0x00, 0x04, 0x06, 0x02, 0x90, 0x18, 0x08, 0x40, 0x03,
+  0x01, 0x23, 0x06, 0x06, 0x00, 0x82, 0x60, 0xb0, 0x80, 0xc1, 0xe2, 0x8c,
+  0x18, 0x18, 0x00, 0x08, 0x82, 0xc1, 0x12, 0x06, 0x0c, 0x44, 0x06, 0x01,
+  0x74, 0x10, 0x30, 0x62, 0x60, 0x00, 0x20, 0x08, 0x06, 0x54, 0x18, 0x38,
+  0xc7, 0x88, 0x41, 0x03, 0x80, 0x20, 0x18, 0x40, 0x64, 0xe0, 0x04, 0x51,
+  0x41, 0x44, 0x51, 0x14, 0x8d, 0x26, 0x04, 0xc0, 0x68, 0x82, 0x10, 0x8c,
+  0x26, 0x0c, 0xc2, 0x68, 0x02, 0x31, 0x90, 0x43, 0x80, 0x41, 0x42, 0x7c,
+  0x4c, 0x0a, 0xe4, 0x63, 0x94, 0x20, 0x1f, 0xb3, 0x06, 0xf9, 0x58, 0x62,
+  0xc8, 0xc7, 0x92, 0x43, 0x3e, 0x96, 0x20, 0xf2, 0x31, 0x63, 0x80, 0x8f,
+  0x19, 0x03, 0x7c, 0xcc, 0x18, 0xe0, 0x33, 0x62, 0x60, 0x00, 0x20, 0x08,
+  0x06, 0x94, 0x1c, 0x7c, 0xd7, 0x88, 0x81, 0x03, 0x80, 0x20, 0x18, 0x48,
+  0x74, 0x30, 0x06, 0x81, 0x55, 0x89, 0x01, 0x31, 0x08, 0x9b, 0x19, 0x90,
+  0x46, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00
+};

+ 91 - 68
DX12Shader.cpp

@@ -1,88 +1,111 @@
 #include "DX12Shader.h"
 
-#include "d3dx12.h"
-#include "DX12CommandQueue.h"
+#include "Logging.h"
 
 using namespace Framework;
 
-DX12Shader::DX12Shader(ID3D12Device5* device,
-    DX12CopyCommandQueue* copy,
-    DX12DirectCommandQueue* direct)
-    : Shader()
-{
-    shaderByteBuffer = 0;
-    byteBufferSize = 0;
-    this->device = device;
-    this->copy = copy;
-    this->direct = direct;
-}
+Framework::DX12ShaderSignature::DX12ShaderSignature(ID3D12Device5* zDevice,
+    PFN_D3D12_SERIALIZE_ROOT_SIGNATURE pfnD3D12SerializeRootSignature)
+    : ReferenceCounter(),
+      signature(0),
+      zDevice(zDevice),
+      pfnD3D12SerializeRootSignature(pfnD3D12SerializeRootSignature)
+{}
 
-DX12Shader::~DX12Shader()
+Framework::DX12ShaderSignature::~DX12ShaderSignature()
 {
-    delete[] shaderByteBuffer;
+    if (signature)
+    {
+        signature->Release();
+    }
 }
 
-// Creates a constant buffer that passes constant data to the shader
-// A maximum of 14 buffers can be created
-//  zD3d11Device: The device used to create the buffer
-//  size: The size of the buffer in bytes
-//  index: The position of the buffer in the buffer array. Existing buffer
-//  is replaced. Buffer 1 cannot be created if buffer 0 has not yet
-//  been created, etc.
-bool DX12Shader::createConstBuffer(int size, int index)
+void Framework::DX12ShaderSignature::addRegisterUsage(
+    DX12ShaderRegister registerType, int registerIndex)
 {
-    if (index < 0 || index >= 14) return 0;
-    while ((size / 256) * 256 != size)
-        size++;
-    while (!constBuffers->has(index))
-        constBuffers->add(0);
-    constBuffers->set(
-        new Framework::DX12Buffer(1, device, D3D12_HEAP_FLAG_NONE), index);
-    constBuffers->z(index)->setLength(size);
-    constBuffers->z(index)->copyToGPU();
-    return 1;
+    addRegisterUsage(registerType, registerIndex, 0);
 }
 
-// Sets the compiled shader
-//  zD3d11Device: The device used to create the shader
-//  bytes: The bytes of the compiled code
-//  length: the length of the byte array
-//  return: true if bytes is valid, false otherwise
-bool DX12Shader::setCompiledByteArray(unsigned char* bytes, int length)
+void Framework::DX12ShaderSignature::addRegisterUsage(
+    DX12ShaderRegister registerType, int registerIndex, int spaceIndex)
 {
-    delete[] shaderByteBuffer;
-    shaderByteBuffer = new unsigned char[length];
-    memcpy(shaderByteBuffer, bytes, length);
-    byteBufferSize = length;
-    return 1;
+    registerUsages.add({registerType, registerIndex, spaceIndex});
 }
 
-// After calling this function, this shader is used as pixel shader
-//  zD3d11Context: The context object used with the shader
-void DX12Shader::useShader()
+void Framework::DX12ShaderSignature::createSignature()
 {
-    // not needet in DirectX 12
+    if (signature)
+    {
+        signature->Release();
+        signature = 0;
+    }
+    D3D12_ROOT_PARAMETER descriptorTable;
+    descriptorTable.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
+    descriptorTable.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL;
+    descriptorTable.DescriptorTable.NumDescriptorRanges
+        = registerUsages.getEntryCount();
+    D3D12_DESCRIPTOR_RANGE* descriptorRanges
+        = new D3D12_DESCRIPTOR_RANGE[registerUsages.getEntryCount()];
+    int index = 0;
+    for (const auto& usage : registerUsages)
+    {
+        D3D12_DESCRIPTOR_RANGE* range = &descriptorRanges[index];
+        switch (usage.registerType)
+        {
+        case DX12_SHADER_REGISTER_B_CONST_BUFFER:
+            range->RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_CBV;
+            break;
+        case DX12_SHADER_REGISTER_T_SHADER_RESOURCE:
+            range->RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
+            break;
+        case DX12_SHADER_REGISTER_U_UNORDERED_ACCESS:
+            range->RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_UAV;
+            break;
+        default:
+            Logging::error() << "Unknown register type for root signature: "
+                             << usage.registerType;
+            range->RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
+        }
+        range->NumDescriptors
+            = 1; // TODO: optimize when multiple descriptors are used in a row
+                 // e.g. u0, u1, u2 with the same range then NumDescriptors can
+                 // be 3 for u0 and u1 and u2 would not be needed in this array
+        range->BaseShaderRegister = usage.registerIndex;
+        range->RegisterSpace = usage.spaceIndex;
+        range->OffsetInDescriptorsFromTableStart = index;
+        index++;
+    }
+    descriptorTable.DescriptorTable.pDescriptorRanges = descriptorRanges;
+    D3D12_ROOT_SIGNATURE_DESC rootDesc = {};
+    rootDesc.NumParameters = 1;
+    rootDesc.pParameters = &descriptorTable;
+    rootDesc.Flags = D3D12_ROOT_SIGNATURE_FLAG_LOCAL_ROOT_SIGNATURE;
+    ID3DBlob* pSigBlob = 0;
+    ID3DBlob* pErrorBlob = 0;
+    HRESULT hr = pfnD3D12SerializeRootSignature(
+        &rootDesc, D3D_ROOT_SIGNATURE_VERSION_1_0, &pSigBlob, &pErrorBlob);
+    if (pSigBlob)
+    {
+        zDevice->CreateRootSignature(0,
+            pSigBlob->GetBufferPointer(),
+            pSigBlob->GetBufferSize(),
+            __uuidof(ID3D12RootSignature),
+            (void**)&signature);
+        pSigBlob->Release();
+    }
+    if (pErrorBlob)
+    {
+        std::string errorMessage(
+            static_cast<const char*>(pErrorBlob->GetBufferPointer()),
+            pErrorBlob->GetBufferSize());
+        Logging::error() << "Failed to serialize root signature: "
+                         << errorMessage;
+        pErrorBlob->Release();
+    }
+    delete[] descriptorRanges;
 }
 
-// returns the compiled bytes
-unsigned char* DX12Shader::getCompiledShader() const
+ID3D12RootSignature* Framework::DX12ShaderSignature::zSignature() const
 {
-    return shaderByteBuffer;
+    return signature;
 }
-
-// returns the number of compiled bytes
-int DX12Shader::getCompiledLength() const
-{
-    return byteBufferSize;
-}
-
-// Creates the root parameter for a constant buffer
-//  index: The index of the buffer
-//  view: contains the position and size of the buffer in memory after the call
-void DX12Shader::getViewDesc(int index, D3D12_CONSTANT_BUFFER_VIEW_DESC& view)
-{
-    DX12Buffer* zB = (DX12Buffer*)constBuffers->z(index);
-    if (!zB) return;
-    view.SizeInBytes = (unsigned)zB->getElementCount() * zB->getElementLength();
-    view.BufferLocation = zB->zBuffer()->GetGPUVirtualAddress();
-}

+ 85 - 41
DX12Shader.h

@@ -1,7 +1,7 @@
 #pragma once
 
+#include "Array.h"
 #include "DX12Buffer.h"
-#include "Shader.h"
 
 struct ID3D12Device5;
 struct ID3D12GraphicsCommandList;
@@ -11,47 +11,91 @@ struct D3D12_CONSTANT_BUFFER_VIEW_DESC;
 
 namespace Framework
 {
-    class DX12Shader : public Shader
+    enum DX12ShaderRegister
     {
-    protected:
-        ID3D12Device5* device;
-        DX12CopyCommandQueue* copy;
-        DX12DirectCommandQueue* direct;
-        unsigned char* shaderByteBuffer;
-        int byteBufferSize;
+        DX12_SHADER_REGISTER_B_CONST_BUFFER = 0,
+        DX12_SHADER_REGISTER_T_SHADER_RESOURCE = 1,
+        DX12_SHADER_REGISTER_U_UNORDERED_ACCESS = 2,
+        // TODO: Do we need Sampler?
+    };
+
+    struct DX12ShaderRegisterUsage
+    {
+        DX12ShaderRegister registerType;
+        int registerIndex;
+        int spaceIndex;
+    };
+
+    class DX12ShaderSignature : public ReferenceCounter
+    {
+    private:
+        ID3D12RootSignature* signature;
+        ID3D12Device5* zDevice;
+        Array<DX12ShaderRegisterUsage> registerUsages;
+        PFN_D3D12_SERIALIZE_ROOT_SIGNATURE pfnD3D12SerializeRootSignature;
 
     public:
-        DX12Shader(ID3D12Device5* device,
-            DX12CopyCommandQueue* copy,
-            DX12DirectCommandQueue* direct);
-        virtual ~DX12Shader();
-        //! Creates a constant buffer that passes constant data to the shader.
-        //! A maximum of 14 buffers can be created.
-        //!  zD3d11Device: The device with which the buffer should be created
-        //! \param size The size of the buffer in bytes
-        //! \param index The position of the buffer in the buffer array. An
-        //! existing buffer will be replaced. Buffer 1 cannot be created
-        //! if buffer 0 has not been created yet, etc.
-        virtual bool createConstBuffer(int size, int index) override;
-        //! Sets the compiled shader
-        //!  zD3d11Device: The device with which the shader should be created
-        //! \param bytes The bytes of the compiled code
-        //! \param length The length of the byte array
-        //! \return true if bytes is valid, false otherwise
-        bool setCompiledByteArray(unsigned char* bytes, int length) override;
-        //! After calling this function, this shader is used as a pixel shader
-        //!  zD3d11Context: The context object with which the shader should
-        //!  be used
-        void useShader() override;
-        //! Returns the compiled bytes
-        unsigned char* getCompiledShader() const;
-        //! Returns the number of compiled bytes
-        int getCompiledLength() const;
-        //! Creates the RootParameter for a constant buffer
-        //! \param index The index of the buffer
-        //! \param view Contains the position and size of the buffer
-        //! in memory after the call
-        virtual void getViewDesc(
-            int index, D3D12_CONSTANT_BUFFER_VIEW_DESC& view);
+        DX12ShaderSignature(ID3D12Device5* zDevice,
+            PFN_D3D12_SERIALIZE_ROOT_SIGNATURE pfnD3D12SerializeRootSignature);
+        ~DX12ShaderSignature();
+        /**
+         * needs to be called for each datastructure with : register(...)
+         *
+         * \param registerType the register type e.g.
+         * DX12_SHADER_REGISTER_B_CONST_BUFFER for : register(b0)
+         * \param registerIndex the register index e.g. 1 for : register(b1)
+         */
+        void addRegisterUsage(
+            DX12ShaderRegister registerType, int registerIndex);
+        /**
+         * needs to be called for each datastructure with : register(...)
+         *
+         * \param registerType the register type e.g.
+         * DX12_SHADER_REGISTER_B_CONST_BUFFER for : register(b0, space1)
+         * \param registerIndex the register index e.g. 1 for : register(b1,
+         * space2)
+         * \param spaceIndex the space index e.g. 3 for : register(b1, space3)
+         */
+        void addRegisterUsage(
+            DX12ShaderRegister registerType, int registerIndex, int spaceIndex);
+        /**
+         * Creates the root signature.
+         */
+        void createSignature();
+        ID3D12RootSignature* zSignature() const;
+    };
+
+    class DX12ShaderFunction : public ReferenceCounter
+    {
+    private:
+        Text functionName;
+        DX12ShaderSignature* signature;
     };
-} // namespace Framework
+
+    class DX12Shader : public ReferenceCounter
+    {
+    private:
+        RCArray<DX12ShaderFunction> functions;
+        const char* shaderBytes;
+        int shaderBytesSize;
+    };
+
+    class ShaderHitGroup : public ReferenceCounter
+    {
+    private:
+        Text name;
+        DX12ShaderFunction* closestHitShaderFunctionName;
+        DX12ShaderFunction* anyHitShaderFunctionName;
+        DX12ShaderFunction* intersectionShaderFunctionName;
+        int payloadSize;
+        int attributeSize;
+    };
+
+    class DX12Pipeline : public ReferenceCounter
+    {
+    private:
+        RCArray<DX12Shader> shaders;
+        RCArray<ShaderHitGroup> hitGroups;
+        int maxRecursionDepth;
+    }; // namespace Framework
+} // namespace Framework

+ 48 - 0
Framework.vcxproj

@@ -416,6 +416,15 @@ copy "x64\Release\Framework.dll" "..\..\Spiele Platform\SMP\Fertig\x64\framework
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <None Include="Common.hlsl">
+      <EntryPointName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+      </EntryPointName>
+      <FileType>Document</FileType>
+      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">6.8</ShaderModel>
+      <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+      </ObjectFileOutput>
+      <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/T lib_6_8 %(AdditionalOptions)</AdditionalOptions>
+    </None>
     <FxCompile Include="DX11PixelShader.hlsl">
       <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType>
       <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
@@ -460,6 +469,45 @@ copy "x64\Release\Framework.dll" "..\..\Spiele Platform\SMP\Fertig\x64\framework
       <VariableName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">UIVertexShader</VariableName>
       <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='Release|x64'">UIVertexShader.h</HeaderFileOutput>
     </FxCompile>
+    <FxCompile Include="Hit.hlsl">
+      <EntryPointName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+      </EntryPointName>
+      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">6.3</ShaderModel>
+      <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">DX12HitShader.h</HeaderFileOutput>
+      <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+      </ObjectFileOutput>
+      <FileType>Document</FileType>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">dxc.exe /T lib_5_0 /Zi /E"closesthit" /Od /Fh"DX12HitShader.h" /nologo "%(FullPath)"</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">DX12HitShader.h</Outputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Common.hlsl</AdditionalInputs>
+      <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/T lib_6_3  -Fd "x64\Debug\DX12HitShader.pdb" %(AdditionalOptions)</AdditionalOptions>
+    </FxCompile>
+    <FxCompile Include="Miss.hlsl">
+      <EntryPointName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+      </EntryPointName>
+      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">6.3</ShaderModel>
+      <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/T lib_6_3 -Fd "x64\Debug\DX12MissShader.pdb" %(AdditionalOptions)</AdditionalOptions>
+      <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">DX12MissShader.h</HeaderFileOutput>
+      <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+      </ObjectFileOutput>
+      <FileType>Document</FileType>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">dxc.exe /T lib_5_0 /Zi /E"miss" /Od /Fh"DX12MissShader.h" /nologo "%(FullPath)"</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">DX12MissShader.h</Outputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Common.hlsl</AdditionalInputs>
+    </FxCompile>
+    <FxCompile Include="RayGen.hlsl">
+      <EntryPointName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+      </EntryPointName>
+      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">6.3</ShaderModel>
+      <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/T lib_6_3 -Fd "x64\Debug\DX12RayGenShader.pdb" %(AdditionalOptions)</AdditionalOptions>
+      <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">DX12RayGenShader.h</HeaderFileOutput>
+      <ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+      </ObjectFileOutput>
+      <FileType>Document</FileType>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">dxc.exe /T lib_5_0 /Zi /E"raygen" /Od /Fh"DX12RayGenShader.h" /nologo "%(FullPath)"</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">DX12RayGenShader.h</Outputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Common.hlsl</AdditionalInputs>
+    </FxCompile>
   </ItemGroup>
   <ItemGroup>
     <None Include="ClassDiagram.cd" />

+ 12 - 0
Framework.vcxproj.filters

@@ -707,10 +707,22 @@
     <FxCompile Include="DX11PixelShader.hlsl">
       <Filter>Framework\Graphics\DX\DX11\Shader</Filter>
     </FxCompile>
+    <FxCompile Include="Hit.hlsl">
+      <Filter>Framework\Graphics\DX\DX12\Shader</Filter>
+    </FxCompile>
+    <FxCompile Include="Miss.hlsl">
+      <Filter>Framework\Graphics\DX\DX12\Shader</Filter>
+    </FxCompile>
+    <FxCompile Include="RayGen.hlsl">
+      <Filter>Framework\Graphics\DX\DX12\Shader</Filter>
+    </FxCompile>
   </ItemGroup>
   <ItemGroup>
     <None Include="ClassDiagram.cd" />
     <None Include="cpp.hint" />
     <None Include="rename-plan.md" />
+    <None Include="Common.hlsl">
+      <Filter>Framework\Graphics\DX\DX12\Shader</Filter>
+    </None>
   </ItemGroup>
 </Project>

+ 7 - 0
Hit.hlsl

@@ -0,0 +1,7 @@
+#include "Common.hlsl"
+
+[shader("closesthit")]
+void ClosestHit(inout HitInfo payload, Attributes attrib)
+{
+    payload.colorAndDistance = float4(1, 1, 0, RayTCurrent());
+}

+ 7 - 0
Miss.hlsl

@@ -0,0 +1,7 @@
+#include "Common.hlsl"
+
+[shader("miss")]
+void Miss(inout HitInfo payload : SV_RayPayload)
+{
+    payload.colorAndDistance = float4(0.2f, 0.2f, 0.8f, -1.f);
+}

+ 24 - 0
RayGen.hlsl

@@ -0,0 +1,24 @@
+#include "Common.hlsl"
+
+// Raytracing output texture, accessed as a UAV
+RWTexture2D<float4> gOutput : register(u0);
+
+RWTexture2D<float4> guiTexture : register(u1);
+
+// Raytracing acceleration structure, accessed as a SRV
+RaytracingAccelerationStructure SceneBVH : register(t0);
+
+[shader("raygeneration")]
+void RayGen()
+{
+  // Initialize the ray payload
+    HitInfo payload;
+    payload.colorAndDistance = float4(0.9, 0.6, 0.2, 1.0);
+
+  // Get the location within the dispatched 2D grid of work items
+  // (often maps to pixels, so this could represent a pixel coordinate).
+    uint2 launchIndex = DispatchRaysIndex().xy;
+  
+    float4 guiColor = guiTexture[launchIndex];
+    gOutput[launchIndex] = float4(payload.colorAndDistance.rgb * (1 - guiColor.a) + guiColor.rgb * guiColor.a, 1.f);
+}

+ 7 - 1
Shader.h

@@ -11,7 +11,13 @@ namespace Framework
     {
         UNBEKANNT,
         VERTEX,
-        PIXEL
+        PIXEL,
+        RAY_GENERATION,
+        RAY_MISS,
+        RAY_CLOSEST_HIT,
+        RAY_ANY_HIT,
+        RAY_INTERSECTION,
+        RAY_CALLABLE
     };
 
     //! A Shader class that manages all constant buffers of a shader