Skip to content

Commit c547d7c

Browse files
committed
DXIL Disassembly show resource type as "half" for 16-bit floats
1 parent e7d0566 commit c547d7c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

renderdoc/driver/shaders/dxil/dxil_disassemble.cpp

+12-1
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,16 @@ static rdcstr GetResourceTypeName(const Type *type)
10531053
{
10541054
rdcstr compType = "int";
10551055
if(resType->scalarType == Type::Float)
1056-
compType = resType->bitWidth > 32 ? "double" : "float";
1056+
{
1057+
if(resType->bitWidth == 64)
1058+
compType = "double";
1059+
else if(resType->bitWidth == 32)
1060+
compType = "float";
1061+
else if(resType->bitWidth == 16)
1062+
compType = "half";
1063+
else
1064+
compType = "UNKNOWN FLOAT BITSIZE";
1065+
}
10571066
else if(resType->scalarType == Type::Int)
10581067
{
10591068
if(resType->bitWidth == 64)
@@ -1064,6 +1073,8 @@ static rdcstr GetResourceTypeName(const Type *type)
10641073
compType = "short";
10651074
else if(resType->bitWidth == 8)
10661075
compType = "int8";
1076+
else
1077+
compType = "UNKNOWN INT BITSIZE";
10671078
}
10681079

10691080
if(compCount > 1)

0 commit comments

Comments
 (0)