nil: Add a nil_image::compressed bit
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
This commit is contained in:
@@ -104,6 +104,7 @@ pub struct Image {
|
||||
pub array_stride_B: u64,
|
||||
pub align_B: u32,
|
||||
pub size_B: u64,
|
||||
pub compressed: bool,
|
||||
pub tile_mode: u16,
|
||||
pub pte_kind: u8,
|
||||
}
|
||||
@@ -159,6 +160,7 @@ impl Image {
|
||||
array_stride_B: 0,
|
||||
align_B: 0,
|
||||
size_B: 0,
|
||||
compressed: false,
|
||||
tile_mode: 0,
|
||||
pte_kind: 0,
|
||||
mip_tail_first_lod: 0,
|
||||
@@ -235,9 +237,12 @@ impl Image {
|
||||
image.tile_mode = u16::from(image.levels[0].tiling.y_log2) << 4
|
||||
| u16::from(image.levels[0].tiling.z_log2) << 8;
|
||||
|
||||
// TODO: compressed
|
||||
image.pte_kind =
|
||||
Self::choose_pte_kind(dev, info.format, info.samples, false);
|
||||
image.pte_kind = Self::choose_pte_kind(
|
||||
dev,
|
||||
info.format,
|
||||
info.samples,
|
||||
image.compressed,
|
||||
);
|
||||
|
||||
image.align_B = std::cmp::max(image.align_B, 4096);
|
||||
if image.pte_kind >= 0xb && image.pte_kind <= 0xe {
|
||||
|
||||
Reference in New Issue
Block a user