#if 0 ; ; Note: shader requires additional functionality: ; Typed UAV Load Additional Formats ; ; shader debug name: x64\Debug\DX12DefaultRayGenShader.pdb ; shader hash: 88547d06513608ba90f100b99ad6d220 ; ; Buffer Definitions: ; ; cbuffer RayGenerationSettings ; { ; ; struct hostlayout.RayGenerationSettings ; { ; ; int renderGui; ; Offset: 0 ; int useRays; ; Offset: 4 ; float minDistance; ; Offset: 8 ; float maxDistance; ; Offset: 12 ; row_major float4x4 inverseView; ; Offset: 16 ; row_major float4x4 inverseProjection; ; Offset: 80 ; ; } RayGenerationSettings; ; Offset: 0 Size: 144 ; ; } ; ; ; Resource Bindings: ; ; Name Type Format Dim ID HLSL Bind Count ; ------------------------------ ---------- ------- ----------- ------- -------------- ------ ; RayGenerationSettings cbuffer NA NA CB0 cb0 1 ; TLAS texture i32 ras T0 t0 1 ; 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" %dx.types.Handle = type { i8* } %hostlayout.RayGenerationSettings = type { i32, i32, float, float, [4 x <4 x float>], [4 x <4 x float>] } %struct.HitInfo = type { [5 x <4 x float>], [5 x float], i32 } %struct.RayDesc = type { <3 x float>, float, <3 x float>, float } %dx.types.ResourceProperties = type { i32, i32 } %dx.types.CBufRet.i32 = type { i32, i32, i32, i32 } %dx.types.CBufRet.f32 = type { float, float, float, float } %dx.types.Dimensions = type { i32, i32, i32, i32 } %dx.types.ResRet.f32 = type { float, float, float, float, i32 } %struct.RaytracingAccelerationStructure = type { i32 } %"class.RWTexture2D >" = type { <4 x float> } @"\01?gOutput@@3V?$RWTexture2D@V?$vector@M$03@@@@A" = external constant %dx.types.Handle, align 4 @"\01?guiTexture@@3V?$RWTexture2D@V?$vector@M$03@@@@A" = external constant %dx.types.Handle, align 4 @"\01?TLAS@@3URaytracingAccelerationStructure@@A" = external constant %dx.types.Handle, align 4 @RayGenerationSettings_legacy = external global %hostlayout.RayGenerationSettings @dx.nothing.a = internal constant [1 x i32] zeroinitializer ; Function Attrs: nounwind define void @"\01?RayGen@@YAXXZ"() #0 { %1 = load %dx.types.Handle, %dx.types.Handle* @"\01?TLAS@@3URaytracingAccelerationStructure@@A" %2 = load %dx.types.Handle, %dx.types.Handle* @"\01?guiTexture@@3V?$RWTexture2D@V?$vector@M$03@@@@A" %3 = load %dx.types.Handle, %dx.types.Handle* @"\01?gOutput@@3V?$RWTexture2D@V?$vector@M$03@@@@A" %4 = load %hostlayout.RayGenerationSettings, %hostlayout.RayGenerationSettings* @RayGenerationSettings_legacy %5 = alloca %struct.HitInfo, align 4 %6 = alloca %struct.RayDesc, align 4 %7 = alloca i32, align 4 %8 = alloca i32, align 4 %9 = alloca i32, align 4 %10 = alloca i32, align 4 %11 = call %dx.types.Handle @dx.op.createHandleForLib.hostlayout.RayGenerationSettings(i32 160, %hostlayout.RayGenerationSettings %4) ; CreateHandleForLib(Resource) %12 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %11, %dx.types.ResourceProperties { i32 13, i32 144 }) ; AnnotateHandle(res,props) resource: CBuffer %13 = getelementptr inbounds %struct.HitInfo, %struct.HitInfo* %5, i32 0, i32 2 %14 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @dx.nothing.a, i32 0, i32 0) store i32 0, i32* %13, align 4 %15 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @dx.nothing.a, i32 0, i32 0) %16 = call i32 @dx.op.dispatchRaysDimensions.i32(i32 146, i8 0) ; DispatchRaysDimensions(col) %17 = call i32 @dx.op.dispatchRaysDimensions.i32(i32 146, i8 1) ; DispatchRaysDimensions(col) %18 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @dx.nothing.a, i32 0, i32 0) %19 = uitofp i32 %16 to float %20 = uitofp i32 %17 to float %21 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @dx.nothing.a, i32 0, i32 0) %22 = call i32 @dx.op.dispatchRaysIndex.i32(i32 145, i8 0) ; DispatchRaysIndex(col) %23 = call i32 @dx.op.dispatchRaysIndex.i32(i32 145, i8 1) ; DispatchRaysIndex(col) %24 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @dx.nothing.a, i32 0, i32 0) %25 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @dx.nothing.a, i32 0, i32 0) %26 = uitofp i32 %22 to float %27 = uitofp i32 %23 to float %28 = fadd fast float %26, 5.000000e-01 %29 = fadd fast float %27, 5.000000e-01 %30 = fdiv fast float %28, %19 %31 = fdiv fast float %29, %20 %32 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @dx.nothing.a, i32 0, i32 0) %33 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 59, %dx.types.Handle %12, i32 0) ; CBufferLoadLegacy(handle,regIndex) %34 = extractvalue %dx.types.CBufRet.i32 %33, 1 %35 = icmp ne i32 %34, 0 br i1 %35, label %36, label %209 ;