mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-21 13:15:57 +00:00
Expose buffer interpretation helpers to python
This commit is contained in:
@@ -1148,13 +1148,13 @@ bool RichResourceTextMouseEvent(const QWidget *owner, const QVariant &var, QRect
|
||||
|
||||
if(!ptrType.members.isEmpty())
|
||||
{
|
||||
Packing::Rules pack = BufferFormatter::EstimatePackingRules(ResourceId(), ptrType);
|
||||
PackingRules pack = BufferFormatter::EstimatePackingRules(ResourceId(), ptrType);
|
||||
|
||||
// for scalar-wrapped structs (generated by 'float *foo' type declarations) use scalar
|
||||
// packing by default as that's probably what people will want most often and if we
|
||||
// guess we're going to guess very conservatively.
|
||||
if(ptrType.name.isEmpty() && ptrType.members.size() == 1)
|
||||
pack = Packing::Scalar;
|
||||
pack = PackingRules::Scalar();
|
||||
|
||||
formatter = BufferFormatter::DeclareStruct(pack, ResourceId(), ptrType.name,
|
||||
ptrType.members, ptrType.arrayByteStride);
|
||||
|
||||
Reference in New Issue
Block a user