blob: f7da6f14bc416db4aa69b59e3a3a8fa3835622d4 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.sysmem;
/// This type is deprecated for new code, but is still used by some camera code.
type FormatModifier = struct {
/// The upper 8 bits are a vendor code as allocated in FormatModifierVendor
/// enum. The lower 56 bits are vendor-defined.
///
/// This field and the values that go in this field are defined this way for
/// compatibility reasons.
value uint64;
};
@available(added=7, deprecated=23, note="use fuchsia.images2.PixelFormatModifier.LINEAR")
const FORMAT_MODIFIER_NONE uint64 = 0x0000000000000000;
@available(added=7, deprecated=23, note="no replacement; use 0 in client code")
const FORMAT_MODIFIER_VENDOR_NONE uint64 = 0x0000000000000000;
@available(added=7, deprecated=23, note="use fuchsia.images2.FORMAT_MODIFIER_VENDOR_INTEL")
const FORMAT_MODIFIER_VENDOR_INTEL uint64 = 0x0100000000000000;
@available(added=7, deprecated=23, note="use fuchsia.images2.FORMAT_MODIFIER_VENDOR_AMD")
const FORMAT_MODIFIER_VENDOR_AMD uint64 = 0x0200000000000000;
@available(added=7, deprecated=23, note="use fuchsia.images2.FORMAT_MODIFIER_VENDOR_NVIDIA")
const FORMAT_MODIFIER_VENDOR_NVIDIA uint64 = 0x0300000000000000;
@available(added=7, deprecated=23, note="use fuchsia.images2.FORMAT_MODIFIER_VENDOR_SAMSUNG")
const FORMAT_MODIFIER_VENDOR_SAMSUNG uint64 = 0x0400000000000000;
@available(added=7, deprecated=23, note="use fuchsia.images2.FORMAT_MODIFIER_VENDOR_QCOM")
const FORMAT_MODIFIER_VENDOR_QCOM uint64 = 0x0500000000000000;
@available(added=7, deprecated=23, note="use fuchsia.images2.FORMAT_MODIFIER_VENDOR_VIVANTE")
const FORMAT_MODIFIER_VENDOR_VIVANTE uint64 = 0x0600000000000000;
@available(added=7, deprecated=23, note="use fuchsia.images2.FORMAT_MODIFIER_VENDOR_BROADCOM")
const FORMAT_MODIFIER_VENDOR_BROADCOM uint64 = 0x0700000000000000;
@available(added=7, deprecated=23, note="use fuchsia.images2.FORMAT_MODIFIER_VENDOR_ARM")
const FORMAT_MODIFIER_VENDOR_ARM uint64 = 0x0800000000000000;
/// This meaning of this value is deprecated. Use fuchsia.images2.FORMAT_MODIFIER_VENDOR_GOOGLE
/// instead which has a different value.
@available(added=7, deprecated=23, note="use fuchsia.images2.FORMAT_MODIFIER_VENDOR_GOOGLE")
const FORMAT_MODIFIER_VENDOR_GOOGLE uint64 = 0x0900000000000000;
@available(added=7, deprecated=23, note="use fuchsia.images2.PixelFormatModifier.INVALID")
const FORMAT_MODIFIER_VALUE_RESERVED uint64 = 0x00FFFFFFFFFFFFFF;
@available(added=7, deprecated=23, note="use fuchsia.images2.PixelFormatModifier.INVALID")
const FORMAT_MODIFIER_INVALID uint64 = FORMAT_MODIFIER_VALUE_RESERVED;
@available(added=7, deprecated=23, note="use fuchsia.images2.PixelFormatModifier.LINEAR")
const FORMAT_MODIFIER_LINEAR uint64 = 0x0000000000000000;
//
// Fill in (compatible) values below as needed.
//
// Intel format modifier values
// Format has a color control surface after the tile data
@available(added=7, deprecated=23, note="use fuchsia.images2.FORMAT_MODIFIER_INTEL_CCS_BIT")
const FORMAT_MODIFIER_INTEL_CCS_BIT uint64 = 0x1000000;
@available(
added=7,
deprecated=23,
note="use fuchsia.images2.PixelFormatModifier.INTEL_I915_X_TILED")
const FORMAT_MODIFIER_INTEL_I915_X_TILED uint64 = 0x0100000000000001;
@available(
added=7,
deprecated=23,
note="use fuchsia.images2.PixelFormatModifier.INTEL_I915_Y_TILED")
const FORMAT_MODIFIER_INTEL_I915_Y_TILED uint64 = 0x0100000000000002;
@available(
added=7,
deprecated=23,
note="use fuchsia.images2.PixelFormatModifier.INTEL_I915_YF_TILED")
const FORMAT_MODIFIER_INTEL_I915_YF_TILED uint64 = 0x0100000000000003;
@available(
added=7,
deprecated=23,
note="use fuchsia.images2.PixelFormatModifier.INTEL_I915_Y_TILED_CCS")
const FORMAT_MODIFIER_INTEL_I915_Y_TILED_CCS uint64 = 0x0100000001000002;
@available(
added=7,
deprecated=23,
note="use fuchsia.images2.PixelFormatModifier.INTEL_I915_YF_TILED_CCS")
const FORMAT_MODIFIER_INTEL_I915_YF_TILED_CCS uint64 = 0x0100000001000003;
// AMD format modifier values
// NVIDIA format modifier values
// SAMSUNG format modifier values
// QCOM format modifier values
// VIVANTE format modifier values
// BROADCOM format modifier values
// ARM format modifier values
// bit 0x10 is for using the YUV transform.
@available(added=7, deprecated=23, note="use fuchsia.images2.FORMAT_MODIFIER_ARM_YUV_BIT")
const FORMAT_MODIFIER_ARM_YUV_BIT uint64 = 0x10;
// bit 0x20 is for split-block formats.
@available(added=7, deprecated=23, note="use fuchsia.images2.FORMAT_MODIFIER_ARM_SPLIT_BLOCK_BIT")
const FORMAT_MODIFIER_ARM_SPLIT_BLOCK_BIT uint64 = 0x20;
// bit 0x40 is for sparse formats.
@available(added=7, deprecated=23, note="use fuchsia.images2.FORMAT_MODIFIER_ARM_SPARSE_BIT")
const FORMAT_MODIFIER_ARM_SPARSE_BIT uint64 = 0x40;
// bit 0x800 is for variants with buffer content hints.
@available(added=7, deprecated=23, note="use fuchsia.images2.FORMAT_MODIFIER_ARM_BCH_BIT")
const FORMAT_MODIFIER_ARM_BCH_BIT uint64 = 0x800;
// bit 0x1000 is for variants with a transaction elimination buffer allocated.
@available(added=7, deprecated=23, note="use fuchsia.images2.FORMAT_MODIFIER_ARM_TE_BIT")
const FORMAT_MODIFIER_ARM_TE_BIT uint64 = 0x1000;
// bit 0x2000 is for variants with tiled headers.
@available(added=7, deprecated=23, note="use fuchsia.images2.FORMAT_MODIFIER_ARM_TILED_HEADER_BIT")
const FORMAT_MODIFIER_ARM_TILED_HEADER_BIT uint64 = 0x2000;
// Not all values are equally useful, so we only have format modifiers for some particularly interesting ones.
// To make the variants with bits set more consistent 0x0800000000000000 is reserved for linear.
@available(added=7, deprecated=23, note="use fuchsia.images2.PixelFormatModifier.ARM_AFBC_16X16")
const FORMAT_MODIFIER_ARM_AFBC_16X16 uint64 = 0x0800000000000001;
@available(added=7, deprecated=23, note="use fuchsia.images2.PixelFormatModifier.ARM_AFBC_32X8")
const FORMAT_MODIFIER_ARM_AFBC_32X8 uint64 = 0x0800000000000002;
// Variations with transaction elimination support 0x1000 should be set for these formats.
@available(added=7, deprecated=23, note="use fuchsia.images2.PixelFormatModifier.ARM_LINEAR_TE")
const FORMAT_MODIFIER_ARM_LINEAR_TE uint64 = 0x0800000000001000;
@available(added=7, deprecated=23, note="use fuchsia.images2.PixelFormatModifier.ARM_AFBC_16X16_TE")
const FORMAT_MODIFIER_ARM_AFBC_16X16_TE uint64 = 0x0800000000001001;
@available(added=7, deprecated=23, note="use fuchsia.images2.PixelFormatModifier.ARM_AFBC_32X8_TE")
const FORMAT_MODIFIER_ARM_AFBC_32X8_TE uint64 = 0x0800000000001002;
@available(
added=7,
deprecated=23,
note="use fuchsia.images2.PixelFormatModifier.ARM_AFBC_16X16_YUV_TILED_HEADER")
const FORMAT_MODIFIER_ARM_AFBC_16X16_YUV_TILED_HEADER uint64 = 0x0800000000002011;
@available(
added=7,
deprecated=23,
note="use fuchsia.images2.PixelFormatModifier.ARM_AFBC_16X16_SPLIT_BLOCK_SPARSE_YUV")
const FORMAT_MODIFIER_ARM_AFBC_16X16_SPLIT_BLOCK_SPARSE_YUV uint64 = 0x0800000000000071;
@available(
added=7,
deprecated=23,
note="use fuchsia.images2.PixelFormatModifier.ARM_AFBC_16X16_SPLIT_BLOCK_SPARSE_YUV_TE")
const FORMAT_MODIFIER_ARM_AFBC_16X16_SPLIT_BLOCK_SPARSE_YUV_TE uint64 = 0x0800000000001071;
@available(
added=7,
deprecated=23,
note="use fuchsia.images2.PixelFormatModifier.ARM_AFBC_16X16_SPLIT_BLOCK_SPARSE_YUV_TILED_HEADER")
const FORMAT_MODIFIER_ARM_AFBC_16X16_SPLIT_BLOCK_SPARSE_YUV_TILED_HEADER uint64
= 0x0800000000002071;
@available(
added=7,
deprecated=23,
note="use fuchsia.images2.PixelFormatModifier.ARM_AFBC_16X16_SPLIT_BLOCK_SPARSE_YUV_TE_TILED_HEADER")
const FORMAT_MODIFIER_ARM_AFBC_16X16_SPLIT_BLOCK_SPARSE_YUV_TE_TILED_HEADER uint64
= 0x0800000000003071;
// GOOGLE format modifier values
// This value for this purpose is deprecated, and is replaced with
// fuchsia.images2.PixelFormatModifier.GOOGLE_GOLDFISH_OPTIMAL which has a different value.
@available(
added=7,
deprecated=23,
note="use fuchsia.images2.PixelFormatModifier.GOOGLE_GOLDFISH_OPTIMAL")
const FORMAT_MODIFIER_GOOGLE_GOLDFISH_OPTIMAL uint64 = 0x0900000000000001;