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

Method data

qrenderdoc/Windows/DescriptorViewer.cpp:522–713  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

520 }
521
522 QVariant data(const Descriptor &desc, int row, int col) const
523 {
524 if(row == 0)
525 {
526 if(col == 0)
527 return lit("Type");
528
529 if(m_API == GraphicsAPI::Vulkan)
530 {
531 switch(desc.type)
532 {
533 case DescriptorType::ConstantBuffer: return lit("Uniform Buffer");
534 case DescriptorType::Buffer: // no such type on vulkan
535 case DescriptorType::ReadWriteBuffer: return lit("Storage Buffer");
536 case DescriptorType::TypedBuffer: return lit("Texel Buffer");
537 case DescriptorType::ReadWriteTypedBuffer: return lit("Storage Texel Buffer");
538 case DescriptorType::AccelerationStructure: return lit("Acceleration Structure");
539 case DescriptorType::Image: return lit("Sampled Image");
540 case DescriptorType::ImageSampler: return lit("Combined Image/Sampler");
541 case DescriptorType::ReadWriteImage: return lit("Storage Image");
542 case DescriptorType::Sampler: return lit("Sampler");
543 case DescriptorType::Unknown: return lit("Uninitialised");
544 }
545 }
546 else
547 {
548 switch(desc.type)
549 {
550 case DescriptorType::ConstantBuffer: return lit("Constant Buffer");
551 case DescriptorType::ImageSampler: // no such type on D3D12
552 case DescriptorType::Buffer:
553 case DescriptorType::Image:
554 case DescriptorType::TypedBuffer:
555 case DescriptorType::AccelerationStructure: return lit("Shader Resource View");
556 case DescriptorType::ReadWriteBuffer:
557 case DescriptorType::ReadWriteTypedBuffer:
558 case DescriptorType::ReadWriteImage: return lit("Unordered Resource View");
559 case DescriptorType::Sampler: return lit("Sampler");
560 case DescriptorType::Unknown: return lit("Uninitialised");
561 }
562 }
563
564 return QVariant();
565 }
566
567 switch(desc.type)
568 {
569 case DescriptorType::ConstantBuffer:
570 case DescriptorType::Buffer:
571 case DescriptorType::ReadWriteBuffer:
572 case DescriptorType::TypedBuffer:
573 case DescriptorType::ReadWriteTypedBuffer:
574 {
575 if(row == 1)
576 return col == 0 ? lit("Buffer") : QVariant::fromValue(desc.resource);
577
578 if(row == 2)
579 return col == 0 ? lit("Byte Offset")

Callers 1

DescriptorViewerMethod · 0.45

Calls 15

fromValueFunction · 0.85
ButtonTagClass · 0.85
QLatin1CharClass · 0.85
NameMethod · 0.80
QVariantClass · 0.50
ToQStrFunction · 0.50
QStringFunction · 0.50
ResourceIdFunction · 0.50
FormatEnum · 0.50
filterFunction · 0.50
trFunction · 0.50

Tested by

no test coverage detected