Remove the tailing '\0' from the disassemble results
This commit is contained in:
Родитель
063c0ea6c3
Коммит
a8580b8166
|
@ -1177,7 +1177,8 @@ namespace ShaderConductor
|
|||
|
||||
if (disassembly != nullptr)
|
||||
{
|
||||
ret.target = CreateBlob(disassembly->GetBufferPointer(), static_cast<uint32_t>(disassembly->GetBufferSize()));
|
||||
// Remove the tailing \0
|
||||
ret.target = CreateBlob(disassembly->GetBufferPointer(), static_cast<uint32_t>(disassembly->GetBufferSize() - 1));
|
||||
ret.hasError = false;
|
||||
}
|
||||
else
|
||||
|
|
Двоичные данные
Source/Tests/Data/Expected/CalcLight+Diffuse.Debug.dxilasm
Двоичные данные
Source/Tests/Data/Expected/CalcLight+Diffuse.Debug.dxilasm
Двоичный файл не отображается.
Двоичные данные
Source/Tests/Data/Expected/CalcLight+Diffuse.Release.dxilasm
Двоичные данные
Source/Tests/Data/Expected/CalcLight+Diffuse.Release.dxilasm
Двоичный файл не отображается.
|
@ -1,218 +1,217 @@
|
|||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; SV_Position 0 xyzw 0 POS float
|
||||
; NORMAL 0 xyz 1 NONE float xyz
|
||||
; TEXCOORD 0 xyz 2 NONE float xyz
|
||||
; TEXCOORD 1 xyz 3 NONE float xyz
|
||||
;
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; SV_Target 0 xyzw 0 TARGET float xyzw
|
||||
;
|
||||
; shader debug name: 65620ef187dc1e38cb91d8208665ef7d.pdb
|
||||
; shader hash: 65620ef187dc1e38cb91d8208665ef7d
|
||||
;
|
||||
; Pipeline Runtime Information:
|
||||
;
|
||||
; Pixel Shader
|
||||
; DepthOutput=0
|
||||
; SampleFrequency=0
|
||||
;
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index InterpMode DynIdx
|
||||
; -------------------- ----- ---------------------- ------
|
||||
; SV_Position 0 noperspective
|
||||
; NORMAL 0 linear
|
||||
; TEXCOORD 0 linear
|
||||
; TEXCOORD 1 linear
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index InterpMode DynIdx
|
||||
; -------------------- ----- ---------------------- ------
|
||||
; SV_Target 0
|
||||
;
|
||||
; Buffer Definitions:
|
||||
;
|
||||
; cbuffer cbPS
|
||||
; {
|
||||
;
|
||||
; struct cbPS
|
||||
; {
|
||||
;
|
||||
; float3 diffColor; ; Offset: 0
|
||||
; float3 specColor; ; Offset: 16
|
||||
; float shininess; ; Offset: 28
|
||||
;
|
||||
; } cbPS; ; Offset: 0 Size: 32
|
||||
;
|
||||
; }
|
||||
;
|
||||
;
|
||||
; Resource Bindings:
|
||||
;
|
||||
; Name Type Format Dim ID HLSL Bind Count
|
||||
; ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||
; cbPS cbuffer NA NA CB0 cb0 1
|
||||
;
|
||||
;
|
||||
; ViewId state:
|
||||
;
|
||||
; Number of inputs: 15, outputs: 4
|
||||
; Outputs dependent on ViewId: { }
|
||||
; Inputs contributing to computation of Outputs:
|
||||
; output 0 depends on inputs: { 4, 5, 6, 8, 9, 10, 12, 13, 14 }
|
||||
; output 1 depends on inputs: { 4, 5, 6, 8, 9, 10, 12, 13, 14 }
|
||||
; output 2 depends on inputs: { 4, 5, 6, 8, 9, 10, 12, 13, 14 }
|
||||
;
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%cbPS = type { <3 x float>, <3 x float>, float }
|
||||
%dx.types.CBufRet.f32 = type { float, float, float, float }
|
||||
%dx.types.Handle = type { i8* }
|
||||
|
||||
@cbPS = external constant %cbPS
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #0
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32, %dx.types.Handle, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #2
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.dot3.f32(i32, float, float, float, float, float, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.binary.f32(i32, float, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.unary.f32(i32, float) #0
|
||||
|
||||
define void @main() {
|
||||
entry:
|
||||
%cbPS_cbuffer = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 2, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%0 = call float @dx.op.loadInput.f32(i32 4, i32 3, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%1 = call float @dx.op.loadInput.f32(i32 4, i32 3, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%2 = call float @dx.op.loadInput.f32(i32 4, i32 3, i32 0, i8 2, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%3 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%4 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%5 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 2, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%6 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%7 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%8 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 2, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%9 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %cbPS_cbuffer, i32 1) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%10 = extractvalue %dx.types.CBufRet.f32 %9, 3
|
||||
%11 = extractvalue %dx.types.CBufRet.f32 %9, 0
|
||||
%12 = extractvalue %dx.types.CBufRet.f32 %9, 1
|
||||
%13 = extractvalue %dx.types.CBufRet.f32 %9, 2
|
||||
%14 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %cbPS_cbuffer, i32 0) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%15 = extractvalue %dx.types.CBufRet.f32 %14, 0
|
||||
%16 = extractvalue %dx.types.CBufRet.f32 %14, 1
|
||||
%17 = extractvalue %dx.types.CBufRet.f32 %14, 2
|
||||
%add.i.i.i = fadd fast float %10, 2.000000e+00
|
||||
%div.i.i.i = fmul fast float %add.i.i.i, 1.250000e-01
|
||||
%18 = call float @dx.op.dot3.f32(i32 55, float %0, float %1, float %2, float %6, float %7, float %8) #2 ; Dot3(ax,ay,az,bx,by,bz)
|
||||
%FMax.i = call float @dx.op.binary.f32(i32 35, float %18, float 0.000000e+00) #2 ; FMax(a,b)
|
||||
%Log3.i = call float @dx.op.unary.f32(i32 23, float %FMax.i) #2 ; Log(value)
|
||||
%19 = fmul fast float %Log3.i, %10
|
||||
%Exp4.i = call float @dx.op.unary.f32(i32 21, float %19) #2 ; Exp(value)
|
||||
%mul.i.i0.i = fmul fast float %Exp4.i, %div.i.i.i
|
||||
%20 = call float @dx.op.dot3.f32(i32 55, float %3, float %4, float %5, float %0, float %1, float %2) #2 ; Dot3(ax,ay,az,bx,by,bz)
|
||||
%Saturate.i = call float @dx.op.unary.f32(i32 7, float %20) #2 ; Saturate(value)
|
||||
%cmp.i.i.i0.i = fcmp fast ogt float %11, 0.000000e+00
|
||||
%cmp.i.i.i1.i = fcmp fast ogt float %12, 0.000000e+00
|
||||
%cmp.i.i.i2.i = fcmp fast ogt float %13, 0.000000e+00
|
||||
%sub.i.i.i0.i = fsub fast float 1.000000e+00, %11
|
||||
%sub.i.i.i1.i = fsub fast float 1.000000e+00, %12
|
||||
%sub.i.i.i2.i = fsub fast float 1.000000e+00, %13
|
||||
%sub2.i.i.i = fsub fast float 1.000000e+00, %Saturate.i
|
||||
%Log.i = call float @dx.op.unary.f32(i32 23, float %sub2.i.i.i) #2 ; Log(value)
|
||||
%21 = fmul fast float %Log.i, 5.000000e+00
|
||||
%Exp.i = call float @dx.op.unary.f32(i32 21, float %21) #2 ; Exp(value)
|
||||
%mul.i.i.i0.i = fmul fast float %Exp.i, %sub.i.i.i0.i
|
||||
%mul.i.i.i1.i = fmul fast float %Exp.i, %sub.i.i.i1.i
|
||||
%mul.i.i.i2.i = fmul fast float %Exp.i, %sub.i.i.i2.i
|
||||
%add.i.4.i.i0.i = fadd fast float %mul.i.i.i0.i, %11
|
||||
%add.i.4.i.i1.i = fadd fast float %mul.i.i.i1.i, %12
|
||||
%add.i.4.i.i2.i = fadd fast float %mul.i.i.i2.i, %13
|
||||
%22 = select i1 %cmp.i.i.i0.i, float %add.i.4.i.i0.i, float 0.000000e+00
|
||||
%23 = select i1 %cmp.i.i.i1.i, float %add.i.4.i.i1.i, float 0.000000e+00
|
||||
%24 = select i1 %cmp.i.i.i2.i, float %add.i.4.i.i2.i, float 0.000000e+00
|
||||
%mul3.i.i0.i = fmul fast float %mul.i.i0.i, %22
|
||||
%mul3.i.i1.i = fmul fast float %mul.i.i0.i, %23
|
||||
%mul3.i.i2.i = fmul fast float %mul.i.i0.i, %24
|
||||
%add.i0.i = fadd fast float %mul3.i.i0.i, %15
|
||||
%add.i1.i = fadd fast float %mul3.i.i1.i, %16
|
||||
%add.i2.i = fadd fast float %mul3.i.i2.i, %17
|
||||
%25 = call float @dx.op.dot3.f32(i32 55, float %6, float %7, float %8, float %3, float %4, float %5) #2 ; Dot3(ax,ay,az,bx,by,bz)
|
||||
%mul.i0.i = fmul fast float %add.i0.i, %25
|
||||
%mul.i1.i = fmul fast float %add.i1.i, %25
|
||||
%mul.i2.i = fmul fast float %add.i2.i, %25
|
||||
%FMax5.i = call float @dx.op.binary.f32(i32 35, float %mul.i0.i, float 0.000000e+00) #2 ; FMax(a,b)
|
||||
%FMax6.i = call float @dx.op.binary.f32(i32 35, float %mul.i1.i, float 0.000000e+00) #2 ; FMax(a,b)
|
||||
%FMax7.i = call float @dx.op.binary.f32(i32 35, float %mul.i2.i, float 0.000000e+00) #2 ; FMax(a,b)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %FMax5.i) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %FMax6.i) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %FMax7.i) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float 1.000000e+00) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #1
|
||||
|
||||
attributes #0 = { nounwind readnone }
|
||||
attributes #1 = { nounwind readonly }
|
||||
attributes #2 = { nounwind }
|
||||
|
||||
!llvm.ident = !{!0, !0}
|
||||
!dx.version = !{!1}
|
||||
!dx.valver = !{!2}
|
||||
!dx.shaderModel = !{!3}
|
||||
!dx.resources = !{!4}
|
||||
!dx.typeAnnotations = !{!7, !12}
|
||||
!dx.viewIdState = !{!16}
|
||||
!dx.entryPoints = !{!17}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{i32 1, i32 6}
|
||||
!3 = !{!"ps", i32 6, i32 0}
|
||||
!4 = !{null, null, !5, null}
|
||||
!5 = !{!6}
|
||||
!6 = !{i32 0, %cbPS* undef, !"cbPS", i32 0, i32 0, i32 1, i32 32, null}
|
||||
!7 = !{i32 0, %cbPS undef, !8}
|
||||
!8 = !{i32 32, !9, !10, !11}
|
||||
!9 = !{i32 6, !"diffColor", i32 3, i32 0, i32 7, i32 9}
|
||||
!10 = !{i32 6, !"specColor", i32 3, i32 16, i32 7, i32 9}
|
||||
!11 = !{i32 6, !"shininess", i32 3, i32 28, i32 7, i32 9}
|
||||
!12 = !{i32 1, void ()* @main, !13}
|
||||
!13 = !{!14}
|
||||
!14 = !{i32 0, !15, !15}
|
||||
!15 = !{}
|
||||
!16 = !{[17 x i32] [i32 15, i32 4, i32 0, i32 0, i32 0, i32 0, i32 7, i32 7, i32 7, i32 0, i32 7, i32 7, i32 7, i32 0, i32 7, i32 7, i32 7]}
|
||||
!17 = !{void ()* @main, !"main", !18, !4, null}
|
||||
!18 = !{!19, !27, null}
|
||||
!19 = !{!20, !22, !24, !25}
|
||||
!20 = !{i32 0, !"SV_Position", i8 9, i8 3, !21, i8 4, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!21 = !{i32 0}
|
||||
!22 = !{i32 1, !"NORMAL", i8 9, i8 0, !21, i8 2, i32 1, i8 3, i32 1, i8 0, !23}
|
||||
!23 = !{i32 3, i32 7}
|
||||
!24 = !{i32 2, !"TEXCOORD", i8 9, i8 0, !21, i8 2, i32 1, i8 3, i32 2, i8 0, !23}
|
||||
!25 = !{i32 3, !"TEXCOORD", i8 9, i8 0, !26, i8 2, i32 1, i8 3, i32 3, i8 0, !23}
|
||||
!26 = !{i32 1}
|
||||
!27 = !{!28}
|
||||
!28 = !{i32 0, !"SV_Target", i8 9, i8 16, !21, i8 0, i32 1, i8 4, i32 0, i8 0, !29}
|
||||
!29 = !{i32 3, i32 15}
|
||||
|