~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/virtio/venus-protocol/vn_protocol_driver_device_memory.h

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
537
537
    vn_encode_VkDeviceMemoryOpaqueCaptureAddressInfo_self(enc, val);
538
538
}
539
539
 
540
 
/* struct VkMemoryResourceAllocationSizeProperties100000MESA chain */
 
540
/* struct VkMemoryResourceAllocationSizePropertiesMESA chain */
541
541
 
542
542
static inline size_t
543
 
vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_pnext(const void *val)
 
543
vn_sizeof_VkMemoryResourceAllocationSizePropertiesMESA_pnext(const void *val)
544
544
{
545
545
    /* no known/supported struct */
546
546
    return vn_sizeof_simple_pointer(NULL);
547
547
}
548
548
 
549
549
static inline size_t
550
 
vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_self(const VkMemoryResourceAllocationSizeProperties100000MESA *val)
 
550
vn_sizeof_VkMemoryResourceAllocationSizePropertiesMESA_self(const VkMemoryResourceAllocationSizePropertiesMESA *val)
551
551
{
552
552
    size_t size = 0;
553
553
    /* skip val->{sType,pNext} */
556
556
}
557
557
 
558
558
static inline size_t
559
 
vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA(const VkMemoryResourceAllocationSizeProperties100000MESA *val)
 
559
vn_sizeof_VkMemoryResourceAllocationSizePropertiesMESA(const VkMemoryResourceAllocationSizePropertiesMESA *val)
560
560
{
561
561
    size_t size = 0;
562
562
 
563
563
    size += vn_sizeof_VkStructureType(&val->sType);
564
 
    size += vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_pnext(val->pNext);
565
 
    size += vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_self(val);
 
564
    size += vn_sizeof_VkMemoryResourceAllocationSizePropertiesMESA_pnext(val->pNext);
 
565
    size += vn_sizeof_VkMemoryResourceAllocationSizePropertiesMESA_self(val);
566
566
 
567
567
    return size;
568
568
}
569
569
 
570
570
static inline void
571
 
vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_pnext(struct vn_cs_decoder *dec, const void *val)
 
571
vn_decode_VkMemoryResourceAllocationSizePropertiesMESA_pnext(struct vn_cs_decoder *dec, const void *val)
572
572
{
573
573
    /* no known/supported struct */
574
574
    if (vn_decode_simple_pointer(dec))
576
576
}
577
577
 
578
578
static inline void
579
 
vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_self(struct vn_cs_decoder *dec, VkMemoryResourceAllocationSizeProperties100000MESA *val)
 
579
vn_decode_VkMemoryResourceAllocationSizePropertiesMESA_self(struct vn_cs_decoder *dec, VkMemoryResourceAllocationSizePropertiesMESA *val)
580
580
{
581
581
    /* skip val->{sType,pNext} */
582
582
    vn_decode_uint64_t(dec, &val->allocationSize);
583
583
}
584
584
 
585
585
static inline void
586
 
vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA(struct vn_cs_decoder *dec, VkMemoryResourceAllocationSizeProperties100000MESA *val)
 
586
vn_decode_VkMemoryResourceAllocationSizePropertiesMESA(struct vn_cs_decoder *dec, VkMemoryResourceAllocationSizePropertiesMESA *val)
587
587
{
588
588
    VkStructureType stype;
589
589
    vn_decode_VkStructureType(dec, &stype);
590
 
    assert(stype == VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA);
 
590
    assert(stype == VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_MESA);
591
591
 
592
592
    assert(val->sType == stype);
593
 
    vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_pnext(dec, val->pNext);
594
 
    vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_self(dec, val);
 
593
    vn_decode_VkMemoryResourceAllocationSizePropertiesMESA_pnext(dec, val->pNext);
 
594
    vn_decode_VkMemoryResourceAllocationSizePropertiesMESA_self(dec, val);
595
595
}
596
596
 
597
597
static inline size_t
598
 
vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_pnext_partial(const void *val)
 
598
vn_sizeof_VkMemoryResourceAllocationSizePropertiesMESA_pnext_partial(const void *val)
599
599
{
600
600
    /* no known/supported struct */
601
601
    return vn_sizeof_simple_pointer(NULL);
602
602
}
603
603
 
604
604
static inline size_t
605
 
vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial(const VkMemoryResourceAllocationSizeProperties100000MESA *val)
 
605
vn_sizeof_VkMemoryResourceAllocationSizePropertiesMESA_self_partial(const VkMemoryResourceAllocationSizePropertiesMESA *val)
606
606
{
607
607
    size_t size = 0;
608
608
    /* skip val->{sType,pNext} */
611
611
}
612
612
 
613
613
static inline size_t
614
 
vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_partial(const VkMemoryResourceAllocationSizeProperties100000MESA *val)
 
614
vn_sizeof_VkMemoryResourceAllocationSizePropertiesMESA_partial(const VkMemoryResourceAllocationSizePropertiesMESA *val)
615
615
{
616
616
    size_t size = 0;
617
617
 
618
618
    size += vn_sizeof_VkStructureType(&val->sType);
619
 
    size += vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_pnext_partial(val->pNext);
620
 
    size += vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial(val);
 
619
    size += vn_sizeof_VkMemoryResourceAllocationSizePropertiesMESA_pnext_partial(val->pNext);
 
620
    size += vn_sizeof_VkMemoryResourceAllocationSizePropertiesMESA_self_partial(val);
621
621
 
622
622
    return size;
623
623
}
624
624
 
625
625
static inline void
626
 
vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_pnext_partial(struct vn_cs_encoder *enc, const void *val)
 
626
vn_encode_VkMemoryResourceAllocationSizePropertiesMESA_pnext_partial(struct vn_cs_encoder *enc, const void *val)
627
627
{
628
628
    /* no known/supported struct */
629
629
    vn_encode_simple_pointer(enc, NULL);
630
630
}
631
631
 
632
632
static inline void
633
 
vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial(struct vn_cs_encoder *enc, const VkMemoryResourceAllocationSizeProperties100000MESA *val)
 
633
vn_encode_VkMemoryResourceAllocationSizePropertiesMESA_self_partial(struct vn_cs_encoder *enc, const VkMemoryResourceAllocationSizePropertiesMESA *val)
634
634
{
635
635
    /* skip val->{sType,pNext} */
636
636
    /* skip val->allocationSize */
637
637
}
638
638
 
639
639
static inline void
640
 
vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_partial(struct vn_cs_encoder *enc, const VkMemoryResourceAllocationSizeProperties100000MESA *val)
 
640
vn_encode_VkMemoryResourceAllocationSizePropertiesMESA_partial(struct vn_cs_encoder *enc, const VkMemoryResourceAllocationSizePropertiesMESA *val)
641
641
{
642
 
    assert(val->sType == VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA);
643
 
    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA });
644
 
    vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_pnext_partial(enc, val->pNext);
645
 
    vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial(enc, val);
 
642
    assert(val->sType == VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_MESA);
 
643
    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_MESA });
 
644
    vn_encode_VkMemoryResourceAllocationSizePropertiesMESA_pnext_partial(enc, val->pNext);
 
645
    vn_encode_VkMemoryResourceAllocationSizePropertiesMESA_self_partial(enc, val);
646
646
}
647
647
 
648
648
/* struct VkMemoryResourcePropertiesMESA chain */
655
655
 
656
656
    while (pnext) {
657
657
        switch ((int32_t)pnext->sType) {
658
 
        case VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA:
 
658
        case VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_MESA:
659
659
            size += vn_sizeof_simple_pointer(pnext);
660
660
            size += vn_sizeof_VkStructureType(&pnext->sType);
661
661
            size += vn_sizeof_VkMemoryResourcePropertiesMESA_pnext(pnext->pNext);
662
 
            size += vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_self((const VkMemoryResourceAllocationSizeProperties100000MESA *)pnext);
 
662
            size += vn_sizeof_VkMemoryResourceAllocationSizePropertiesMESA_self((const VkMemoryResourceAllocationSizePropertiesMESA *)pnext);
663
663
            return size;
664
664
        default:
665
665
            /* ignore unknown/unsupported struct */
711
711
    }
712
712
 
713
713
    switch ((int32_t)pnext->sType) {
714
 
    case VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA:
 
714
    case VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_MESA:
715
715
        vn_decode_VkMemoryResourcePropertiesMESA_pnext(dec, pnext->pNext);
716
 
        vn_decode_VkMemoryResourceAllocationSizeProperties100000MESA_self(dec, (VkMemoryResourceAllocationSizeProperties100000MESA *)pnext);
 
716
        vn_decode_VkMemoryResourceAllocationSizePropertiesMESA_self(dec, (VkMemoryResourceAllocationSizePropertiesMESA *)pnext);
717
717
        break;
718
718
    default:
719
719
        assert(false);
748
748
 
749
749
    while (pnext) {
750
750
        switch ((int32_t)pnext->sType) {
751
 
        case VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA:
 
751
        case VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_MESA:
752
752
            size += vn_sizeof_simple_pointer(pnext);
753
753
            size += vn_sizeof_VkStructureType(&pnext->sType);
754
754
            size += vn_sizeof_VkMemoryResourcePropertiesMESA_pnext_partial(pnext->pNext);
755
 
            size += vn_sizeof_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial((const VkMemoryResourceAllocationSizeProperties100000MESA *)pnext);
 
755
            size += vn_sizeof_VkMemoryResourceAllocationSizePropertiesMESA_self_partial((const VkMemoryResourceAllocationSizePropertiesMESA *)pnext);
756
756
            return size;
757
757
        default:
758
758
            /* ignore unknown/unsupported struct */
792
792
 
793
793
    while (pnext) {
794
794
        switch ((int32_t)pnext->sType) {
795
 
        case VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA:
 
795
        case VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_MESA:
796
796
            vn_encode_simple_pointer(enc, pnext);
797
797
            vn_encode_VkStructureType(enc, &pnext->sType);
798
798
            vn_encode_VkMemoryResourcePropertiesMESA_pnext_partial(enc, pnext->pNext);
799
 
            vn_encode_VkMemoryResourceAllocationSizeProperties100000MESA_self_partial(enc, (const VkMemoryResourceAllocationSizeProperties100000MESA *)pnext);
 
799
            vn_encode_VkMemoryResourceAllocationSizePropertiesMESA_self_partial(enc, (const VkMemoryResourceAllocationSizePropertiesMESA *)pnext);
800
800
            return;
801
801
        default:
802
802
            /* ignore unknown/unsupported struct */