MCPcopy Create free account
hub / github.com/baldurk/renderdoc / RowString

Function RowString

qrenderdoc/Code/BufferFormatter.cpp:3931–4008  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3929}
3930
3931QString RowString(const ShaderVariable &v, uint32_t row, VarType type)
3932{
3933 if(type == VarType::Unknown)
3934 type = v.type;
3935
3936 if(v.type == VarType::GPUPointer)
3937 return ToQStr(v.GetPointer());
3938
3939 if(v.type == VarType::Struct)
3940 return lit("{ ... }");
3941
3942 if(!v.members.empty())
3943 return lit("{ ... }");
3944
3945 switch(type)
3946 {
3947 case VarType::Float:
3948 return RowValuesToString((int)v.columns, v.flags, v.value.f32v[row * v.columns + 0],
3949 v.value.f32v[row * v.columns + 1], v.value.f32v[row * v.columns + 2],
3950 v.value.f32v[row * v.columns + 3]);
3951 case VarType::Double:
3952 return RowValuesToString((int)v.columns, v.flags, v.value.f64v[row * v.columns + 0],
3953 v.value.f64v[row * v.columns + 1], v.value.f64v[row * v.columns + 2],
3954 v.value.f64v[row * v.columns + 3]);
3955 case VarType::Half:
3956 return RowValuesToString((int)v.columns, v.flags, v.value.f16v[row * v.columns + 0],
3957 v.value.f16v[row * v.columns + 1], v.value.f16v[row * v.columns + 2],
3958 v.value.f16v[row * v.columns + 3]);
3959 case VarType::Bool:
3960 return RowValuesToString((int)v.columns, v.flags,
3961 v.value.u32v[row * v.columns + 0] ? true : false,
3962 v.value.u32v[row * v.columns + 1] ? true : false,
3963 v.value.u32v[row * v.columns + 2] ? true : false,
3964 v.value.u32v[row * v.columns + 3] ? true : false);
3965 case VarType::ULong:
3966 return RowValuesToString((int)v.columns, v.flags, v.value.u64v[row * v.columns + 0],
3967 v.value.u64v[row * v.columns + 1], v.value.u64v[row * v.columns + 2],
3968 v.value.u64v[row * v.columns + 3]);
3969 case VarType::UInt:
3970 return RowValuesToString((int)v.columns, v.flags, v.value.u32v[row * v.columns + 0],
3971 v.value.u32v[row * v.columns + 1], v.value.u32v[row * v.columns + 2],
3972 v.value.u32v[row * v.columns + 3]);
3973 case VarType::UShort:
3974 return RowValuesToString((int)v.columns, v.flags, v.value.u16v[row * v.columns + 0],
3975 v.value.u16v[row * v.columns + 1], v.value.u16v[row * v.columns + 2],
3976 v.value.u16v[row * v.columns + 3]);
3977 case VarType::UByte:
3978 return RowValuesToString((int)v.columns, v.flags, v.value.u8v[row * v.columns + 0],
3979 v.value.u8v[row * v.columns + 1], v.value.u8v[row * v.columns + 2],
3980 v.value.u8v[row * v.columns + 3]);
3981 case VarType::SLong:
3982 return RowValuesToString((int)v.columns, v.flags, v.value.s64v[row * v.columns + 0],
3983 v.value.s64v[row * v.columns + 1], v.value.s64v[row * v.columns + 2],
3984 v.value.s64v[row * v.columns + 3]);
3985 case VarType::SInt:
3986 return RowValuesToString((int)v.columns, v.flags, v.value.s32v[row * v.columns + 0],
3987 v.value.s32v[row * v.columns + 1], v.value.s32v[row * v.columns + 2],
3988 v.value.s32v[row * v.columns + 3]);

Callers 6

DeclareEnumMethod · 0.85
VarStringFunction · 0.85
stringRepMethod · 0.85
updateVariableTooltipMethod · 0.85
UI_FixedAddMatrixRowsMethod · 0.85
TaskAddMatrixRowsFunction · 0.85

Calls 3

RowValuesToStringFunction · 0.85
ToQStrFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected