Package icyllis.arc3d.engine
Interface ISurface
public interface ISurface
Defines Surface-hierarchy constants. Do NOT directly this class as type.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Indicates whether a backing store needs to be an exact match or can be larger than is strictly necessary.static final int
Indicates whether an allocation should count against a cache budget.static final int
ForImageViewProxy
created in a deferred list recording thread it is possible for the unique key to be cleared on the backingImage
while the unique key remains on the proxy.static final int
Used to create memoryless images, especially for MSAA attachments.static final int
Used to say whether an image has or should have mip levels allocated or not.static final int
Surface flags shared between the Surface invalid input: '&' SurfaceProxy class hierarchies.static final int
Used to say whether image is backed by protected memory.static final int
Means the pixels in the image are read-only.static final int
Used to say whether a surface can be rendered to, whether an image can be used as color or depth/stencil attachments.static final int
Used to say whether an image can be a sampled image (i.e.static final int
When set, the proxy will be instantiated outside the allocator (e.g.static final int
Used to say whether an image can be a storage image. -
Method Summary
Modifier and TypeMethodDescriptionstatic int
getApproxSize
(int size) Mapsize
to a larger multiple of 2.
-
Field Details
-
FLAG_NONE
static final int FLAG_NONESurface flags shared between the Surface invalid input: '&' SurfaceProxy class hierarchies. These flags can be used to create a surface or represent the state of the created surface. An arbitrary combination of flags may result in unexpected behaviors.- See Also:
-
FLAG_BUDGETED
static final int FLAG_BUDGETEDIndicates whether an allocation should count against a cache budget. Budgeted when set, otherwise not budgeted. This can be used forSurfaceProxy
andGpuSurface
at creation-time. Since a single budgeted GPU surface can be used by multipleSurfaceProxy
at different times, its budgeted state may alter (SurfaceProxy can make a budgeted GPU surface become un-budgeted).- See Also:
-
FLAG_APPROX_FIT
static final int FLAG_APPROX_FITIndicates whether a backing store needs to be an exact match or can be larger than is strictly necessary. Approx fit when set, otherwise exact fit. This is aSurfaceProxy
flag and aGpuSurface
at creation-time flag.- See Also:
-
FLAG_MIPMAPPED
static final int FLAG_MIPMAPPEDUsed to say whether an image has or should have mip levels allocated or not. Mipmaps are allocated when set, otherwise mipmaps are not allocated.- See Also:
-
FLAG_SAMPLED_IMAGE
static final int FLAG_SAMPLED_IMAGEUsed to say whether an image can be a sampled image (i.e. a texture). This is not compatible withFLAG_MEMORYLESS
.A valid SurfaceFlags should have at least one of
FLAG_SAMPLED_IMAGE
,FLAG_STORAGE_IMAGE
andFLAG_RENDERABLE
set.- See Also:
-
FLAG_STORAGE_IMAGE
static final int FLAG_STORAGE_IMAGEUsed to say whether an image can be a storage image. This is not compatible withFLAG_MEMORYLESS
.- See Also:
-
FLAG_RENDERABLE
static final int FLAG_RENDERABLEUsed to say whether a surface can be rendered to, whether an image can be used as color or depth/stencil attachments. Renderable when set, otherwise not renderable.- See Also:
-
FLAG_MEMORYLESS
static final int FLAG_MEMORYLESSUsed to create memoryless images, especially for MSAA attachments. If so, load op must NOT beEngine.LoadOp.kLoad
and store op must NOT beEngine.StoreOp.kStore
, and rendering may be efficient on TBDR GPU. This is also known as discardable and transient attachments.Note: Memoryless must be
FLAG_RENDERABLE
and must NOT be eitherFLAG_SAMPLED_IMAGE
orFLAG_STORAGE_IMAGE
.- See Also:
-
FLAG_PROTECTED
static final int FLAG_PROTECTEDUsed to say whether image is backed by protected memory. Protected when set, otherwise not protected. Vulkan only.- See Also:
-
FLAG_READ_ONLY
@Internal static final int FLAG_READ_ONLYMeans the pixels in the image are read-only.Image
andImageViewProxy
only, typically for wrapped images. Read-only images cannot be renderable.- See Also:
-
FLAG_SKIP_ALLOCATOR
@Internal static final int FLAG_SKIP_ALLOCATORWhen set, the proxy will be instantiated outside the allocator (e.g. for proxies that are instantiated in on-flush callbacks). Otherwise,SurfaceAllocator
should instantiate the proxy.SurfaceProxy
only.- See Also:
-
FLAG_DEFERRED_PROVIDER
@Internal static final int FLAG_DEFERRED_PROVIDERForImageViewProxy
created in a deferred list recording thread it is possible for the unique key to be cleared on the backingImage
while the unique key remains on the proxy. When set, it loosens up asserts that the key of an instantiated uniquely-keyed texture proxy is also always set on the backingImage
.ImageViewProxy
only.- See Also:
-
-
Method Details
-
getApproxSize
static int getApproxSize(int size) Mapsize
to a larger multiple of 2. Values invalid input: '<'= 1024 will pop up to the next power of 2. Those above 1024 will only go up half the floor power of 2.Possible values: 16, 32, 64, 128, 256, 512, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384
- See Also:
-