pan/genxml: Get rid of the Plane descriptor

We use specialized plane descriptors now almost everywhere except when
we want to get the plane descriptor size, and we can use a null plane in
that case, so let's get rid of the old definitions.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
This commit is contained in:
Boris Brezillon 2025-06-16 12:36:02 +02:00
parent 4b3be4a4a6
commit d4f89986ff
7 changed files with 3 additions and 263 deletions

View file

@ -1730,7 +1730,7 @@ panfrost_create_sampler_view_bo(struct panfrost_sampler_view *so,
}
#if PAN_ARCH >= 9
unsigned payload_size = pan_size(PLANE);
unsigned payload_size = pan_size(NULL_PLANE);
#elif PAN_ARCH >= 6
unsigned payload_size = pan_size(SURFACE_WITH_STRIDE);
#else

View file

@ -1285,74 +1285,6 @@
<value name="INVALID" value="256"/>
</enum>
<struct name="Plane AFBC Overlay" size="8">
<field name="Superblock size" size="3" start="0:8" type="AFBC Superblock Size"/>
<field name="YTR" size="1" start="0:16" type="bool"/>
<field name="Split block" size="1" start="0:17" type="bool"/>
<field name="Alpha hint" size="1" start="0:18" type="bool"/>
<field name="Tiled header" size="1" start="0:19" type="bool"/>
<field name="Prefetch" size="1" start="0:20" type="bool"/>
<field name="Compression mode" size="6" start="0:26" type="AFBC Compression Mode"/>
<field name="Header stride" size="32" start="5:0" type="uint"/>
</struct>
<struct name="Plane ASTC 2D Overlay" size="8">
<field name="Block width" size="3" start="26" type="ASTC 2D Dimension"/>
<field name="Block height" size="3" start="29" type="ASTC 2D Dimension"/>
</struct>
<struct name="Plane ASTC 3D Overlay" size="8">
<field name="Block width" size="2" start="26" type="ASTC 3D Dimension"/>
<field name="Block height" size="2" start="28" type="ASTC 3D Dimension"/>
<field name="Block depth" size="2" start="30" type="ASTC 3D Dimension"/>
</struct>
<struct name="Plane ASTC Overlay" size="8">
<field name="Decode HDR" size="1" start="24" type="bool"/>
<field name="Decode Wide" size="1" start="25" type="bool"/>
<field name="2D" size="32" start="0" type="Plane ASTC 2D Overlay"/>
<field name="3D" size="32" start="0" type="Plane ASTC 3D Overlay"/>
</struct>
<struct name="Two-Plane YUV Chroma Overlay" size="8">
<field name="Width" size="16" start="5:0" type="uint" modifier="minus(1)" default="1"/>
<field name="Height" size="16" start="5:16" type="uint" modifier="minus(1)" default="1"/>
<field name="Secondary Pointer" size="64" start="6:0" type="address"/>
</struct>
<struct name="Plane AFRC Overlay" size="8">
<field name="Codec arguments" size="8" start="0:8" type="uint"/>
<field name="Block size" size="4" start="0:20" type="AFRC Block Size"/>
<field name="Format" size="8" start="0:24" type="AFRC Format"/>
</struct>
<struct name="Plane" size="8" align="32">
<field name="Type" size="4" start="0:0" type="Descriptor Type" default="Plane"/>
<field name="Plane type" size="4" start="0:4" type="Plane Type"/>
<field name="AFBC" size="32" start="0:0" type="Plane AFBC Overlay"/>
<field name="ASTC" size="32" start="0:0" type="Plane ASTC Overlay"/>
<field name="AFRC" size="32" start="0:0" type="Plane AFRC Overlay"/>
<field name="Two-Plane YUV Chroma" size="256" start="0:0" type="Two-Plane YUV Chroma Overlay"/>
<!-- Not AFBC nor AFRC -->
<field name="Clump ordering" size="4" start="0:8" type="Clump Ordering"/>
<!-- Generic, Chroma 2p -->
<field name="Clump format" size="8" start="24" type="Clump Format"/>
<field name="Size" size="32" start="1:0" type="uint"/>
<field name="Pointer" size="64" start="2:0" type="address"/>
<field name="Row stride" size="32" start="4:0" type="uint"/>
<field name="Slice stride" size="32" start="6:0" type="int"/>
<field name="Width" size="16" start="7:0" type="uint" modifier="minus(1)" default="1"/>
<field name="Height" size="16" start="7:16" type="uint" modifier="minus(1)" default="1"/>
</struct>
<struct name="Texture" size="8" align="32">
<field name="Type" size="4" start="0:0" type="Descriptor Type" default="Texture"/>
<field name="Dimension" size="2" start="0:4" type="Texture Dimension"/>

View file

@ -1546,74 +1546,6 @@
<value name="INVALID" value="256"/>
</enum>
<struct name="Plane AFBC Overlay" size="8">
<field name="Superblock size" size="3" start="0:8" type="AFBC Superblock Size"/>
<field name="YTR" size="1" start="0:16" type="bool"/>
<field name="Split block" size="1" start="0:17" type="bool"/>
<field name="Alpha hint" size="1" start="0:18" type="bool"/>
<field name="Tiled header" size="1" start="0:19" type="bool"/>
<field name="Prefetch" size="1" start="0:20" type="bool"/>
<field name="Compression mode" size="6" start="0:26" type="AFBC Compression Mode"/>
<field name="Header stride" size="32" start="5:0" type="uint"/>
</struct>
<struct name="Plane ASTC 2D Overlay" size="8">
<field name="Block width" size="3" start="26" type="ASTC 2D Dimension"/>
<field name="Block height" size="3" start="29" type="ASTC 2D Dimension"/>
</struct>
<struct name="Plane ASTC 3D Overlay" size="8">
<field name="Block width" size="2" start="26" type="ASTC 3D Dimension"/>
<field name="Block height" size="2" start="28" type="ASTC 3D Dimension"/>
<field name="Block depth" size="2" start="30" type="ASTC 3D Dimension"/>
</struct>
<struct name="Plane ASTC Overlay" size="8">
<field name="Decode HDR" size="1" start="24" type="bool"/>
<field name="Decode Wide" size="1" start="25" type="bool"/>
<field name="2D" size="32" start="0" type="Plane ASTC 2D Overlay"/>
<field name="3D" size="32" start="0" type="Plane ASTC 3D Overlay"/>
</struct>
<struct name="Two-Plane YUV Chroma Overlay" size="8">
<field name="Width" size="16" start="5:0" type="uint" modifier="minus(1)" default="1"/>
<field name="Height" size="16" start="5:16" type="uint" modifier="minus(1)" default="1"/>
<field name="Secondary Pointer" size="64" start="6:0" type="address"/>
</struct>
<struct name="Plane AFRC Overlay" size="8">
<field name="Codec arguments" size="8" start="0:8" type="uint"/>
<field name="Block size" size="4" start="0:20" type="AFRC Block Size"/>
<field name="Format" size="8" start="0:24" type="AFRC Format"/>
</struct>
<struct name="Plane" size="8" align="32">
<field name="Type" size="4" start="0:0" type="Descriptor Type" default="Plane"/>
<field name="Plane type" size="4" start="0:4" type="Plane Type"/>
<field name="AFBC" size="32" start="0:0" type="Plane AFBC Overlay"/>
<field name="ASTC" size="32" start="0:0" type="Plane ASTC Overlay"/>
<field name="AFRC" size="32" start="0:0" type="Plane AFRC Overlay"/>
<field name="Two-Plane YUV Chroma" size="256" start="0:0" type="Two-Plane YUV Chroma Overlay"/>
<!-- Not AFBC nor AFRC -->
<field name="Clump ordering" size="4" start="0:8" type="Clump Ordering"/>
<!-- Generic, Chroma 2p -->
<field name="Clump format" size="8" start="24" type="Clump Format"/>
<field name="Size" size="32" start="1:0" type="uint"/>
<field name="Pointer" size="64" start="2:0" type="address"/>
<field name="Row stride" size="32" start="4:0" type="uint"/>
<field name="Slice stride" size="32" start="6:0" type="int"/>
<field name="Width" size="16" start="7:0" type="uint" modifier="minus(1)" default="1"/>
<field name="Height" size="16" start="7:16" type="uint" modifier="minus(1)" default="1"/>
</struct>
<struct name="Texture" size="8" align="32">
<field name="Type" size="4" start="0:0" type="Descriptor Type" default="Texture"/>
<field name="Dimension" size="2" start="0:4" type="Texture Dimension"/>

View file

@ -1848,74 +1848,6 @@
<value name="INVALID" value="256"/>
</enum>
<struct name="Plane AFBC Overlay" size="8">
<field name="Superblock size" size="3" start="0:8" type="AFBC Superblock Size"/>
<field name="YTR" size="1" start="0:16" type="bool"/>
<field name="Split block" size="1" start="0:17" type="bool"/>
<field name="Alpha hint" size="1" start="0:18" type="bool"/>
<field name="Tiled header" size="1" start="0:19" type="bool"/>
<field name="Prefetch" size="1" start="0:20" type="bool"/>
<field name="Compression mode" size="6" start="0:26" type="AFBC Compression Mode"/>
<field name="Header stride" size="32" start="5:0" type="uint"/>
</struct>
<struct name="Plane ASTC 2D Overlay" size="8">
<field name="Block width" size="3" start="26" type="ASTC 2D Dimension"/>
<field name="Block height" size="3" start="29" type="ASTC 2D Dimension"/>
</struct>
<struct name="Plane ASTC 3D Overlay" size="8">
<field name="Block width" size="2" start="26" type="ASTC 3D Dimension"/>
<field name="Block height" size="2" start="28" type="ASTC 3D Dimension"/>
<field name="Block depth" size="2" start="30" type="ASTC 3D Dimension"/>
</struct>
<struct name="Plane ASTC Overlay" size="8">
<field name="Decode HDR" size="1" start="24" type="bool"/>
<field name="Decode Wide" size="1" start="25" type="bool"/>
<field name="2D" size="32" start="0" type="Plane ASTC 2D Overlay"/>
<field name="3D" size="32" start="0" type="Plane ASTC 3D Overlay"/>
</struct>
<struct name="Two-Plane YUV Chroma Overlay" size="8">
<field name="Width" size="16" start="5:0" type="uint" modifier="minus(1)" default="1"/>
<field name="Height" size="16" start="5:16" type="uint" modifier="minus(1)" default="1"/>
<field name="Secondary Pointer" size="64" start="6:0" type="address"/>
</struct>
<struct name="Plane AFRC Overlay" size="8">
<field name="Codec arguments" size="8" start="0:8" type="uint"/>
<field name="Block size" size="4" start="0:20" type="AFRC Block Size"/>
<field name="Format" size="8" start="0:24" type="AFRC Format"/>
</struct>
<struct name="Plane" size="8" align="32">
<field name="Type" size="4" start="0:0" type="Descriptor Type" default="Plane"/>
<field name="Plane type" size="4" start="0:4" type="Plane Type"/>
<field name="AFBC" size="32" start="0:0" type="Plane AFBC Overlay"/>
<field name="ASTC" size="32" start="0:0" type="Plane ASTC Overlay"/>
<field name="AFRC" size="32" start="0:0" type="Plane AFRC Overlay"/>
<field name="Two-Plane YUV Chroma" size="256" start="0:0" type="Two-Plane YUV Chroma Overlay"/>
<!-- Not AFBC nor AFRC -->
<field name="Clump ordering" size="4" start="0:8" type="Clump Ordering"/>
<!-- Generic, Chroma 2p -->
<field name="Clump format" size="8" start="24" type="Clump Format"/>
<field name="Size" size="32" start="1:0" type="uint"/>
<field name="Pointer" size="64" start="2:0" type="address"/>
<field name="Row stride" size="32" start="4:0" type="uint"/>
<field name="Slice stride" size="32" start="6:0" type="int"/>
<field name="Width" size="16" start="7:0" type="uint" modifier="minus(1)" default="1"/>
<field name="Height" size="16" start="7:16" type="uint" modifier="minus(1)" default="1"/>
</struct>
<struct name="Texture" size="8" align="32">
<field name="Type" size="4" start="0:0" type="Descriptor Type" default="Texture"/>
<field name="Dimension" size="2" start="0:4" type="Texture Dimension"/>

View file

@ -754,62 +754,6 @@
<value name="YUV422 1c10" value="47"/>
</enum>
<struct name="Plane AFBC Overlay" size="8">
<field name="Superblock size" size="3" start="0:8" type="AFBC Superblock Size"/>
<field name="YTR" size="1" start="0:16" type="bool"/>
<field name="Split block" size="1" start="0:17" type="bool"/>
<field name="Alpha hint" size="1" start="0:18" type="bool"/>
<field name="Tiled header" size="1" start="0:19" type="bool"/>
<field name="Prefetch" size="1" start="0:20" type="bool"/>
<field name="Compression mode" size="6" start="0:26" type="AFBC Compression Mode"/>
<field name="Header stride" size="32" start="5:0" type="uint"/>
</struct>
<struct name="Plane ASTC 2D Overlay" size="8">
<field name="Block width" size="3" start="26" type="ASTC 2D Dimension"/>
<field name="Block height" size="3" start="29" type="ASTC 2D Dimension"/>
</struct>
<struct name="Plane ASTC 3D Overlay" size="8">
<field name="Block width" size="2" start="26" type="ASTC 3D Dimension"/>
<field name="Block height" size="2" start="28" type="ASTC 3D Dimension"/>
<field name="Block depth" size="2" start="30" type="ASTC 3D Dimension"/>
</struct>
<struct name="Plane ASTC Overlay" size="8">
<field name="Decode HDR" size="1" start="24" type="bool"/>
<field name="Decode Wide" size="1" start="25" type="bool"/>
<field name="2D" size="32" start="0" type="Plane ASTC 2D Overlay"/>
<field name="3D" size="32" start="0" type="Plane ASTC 3D Overlay"/>
</struct>
<struct name="Two-Plane YUV Chroma Overlay" size="8">
<field name="Secondary Pointer" size="64" start="6:0" type="address"/>
</struct>
<struct name="Plane" size="8" align="32">
<field name="Type" size="4" start="0:0" type="Descriptor Type" default="Plane"/>
<field name="Plane type" size="4" start="0:4" type="Plane Type"/>
<field name="AFBC" size="32" start="0:0" type="Plane AFBC Overlay"/>
<field name="ASTC" size="32" start="0:0" type="Plane ASTC Overlay"/>
<field name="Two-Plane YUV Chroma" size="256" start="0:0" type="Two-Plane YUV Chroma Overlay"/>
<!-- Not AFBC -->
<field name="Clump ordering" size="4" start="0:8" type="Clump Ordering"/>
<!-- Generic, Chroma 2p -->
<field name="Clump format" size="8" start="24" type="Clump Format"/>
<field name="Size" size="32" start="1:0" type="uint"/>
<field name="Pointer" size="64" start="2:0" type="address"/>
<field name="Row stride" size="32" start="4:0" type="uint"/>
<field name="Slice stride" size="32" start="6:0" type="int"/>
</struct>
<struct name="Texture" size="8" align="32">
<field name="Type" size="4" start="0:0" type="Descriptor Type" default="Texture"/>
<field name="Dimension" size="2" start="0:4" type="Texture Dimension"/>

View file

@ -63,7 +63,7 @@ panvk_per_arch(CreateBufferView)(VkDevice _device,
};
#if PAN_ARCH >= 9
view->mem = panvk_pool_alloc_desc(&device->mempools.rw, PLANE);
view->mem = panvk_pool_alloc_desc(&device->mempools.rw, NULL_PLANE);
#else
view->mem =
panvk_pool_alloc_desc(&device->mempools.rw, SURFACE_WITH_STRIDE);

View file

@ -127,7 +127,7 @@ prepare_tex_descs(struct panvk_image_view *view)
? pan_alignment(MULTIPLANAR_SURFACE)
: pan_alignment(SURFACE_WITH_STRIDE),
#else
.alignment = pan_alignment(PLANE) * (plane_count > 1 ? 2 : 1),
.alignment = pan_alignment(NULL_PLANE) * (plane_count > 1 ? 2 : 1),
#endif
.size = tex_payload_size * (can_preload_other_aspect ? 2 : plane_count),