|
| MetalTextureGpuWindow (GpuPageOutStrategy::GpuPageOutStrategy pageOutStrategy, VaoManager *vaoManager, IdString name, uint32 textureFlags, TextureTypes::TextureTypes initialType, TextureGpuManager *textureManager, MetalWindow *window) |
|
virtual | ~MetalTextureGpuWindow () |
|
void | _addPendingResidencyChanges (uint32 value) |
|
virtual void | _autogenerateMipmaps (CopyEncTransitionMode::CopyEncTransitionMode transitionMode=CopyEncTransitionMode::Auto) |
| Tells the API to let the HW autogenerate mipmaps.
|
|
uint8 * | _getSysRamCopy (uint8 mipLevel) |
|
TextureBox | _getSysRamCopyAsBox (uint8 mipLevel) |
|
size_t | _getSysRamCopyBytesPerImage (uint8 mipLevel) |
| Note: Returns non-zero even if there is no system ram copy.
|
|
size_t | _getSysRamCopyBytesPerRow (uint8 mipLevel) |
| Note: Returns non-zero even if there is no system ram copy.
|
|
virtual bool | _isDataReadyImpl (void) const |
| For internal use.
|
|
bool | _isManualTextureFlagPresent (void) const |
|
void | _notifySysRamDownloadIsReady (uint8 *sysRamPtr, bool resyncOnly) |
| Do not call directly.
|
|
virtual void | _notifyTextureSlotChanged (const TexturePool *newPool, uint16 slice) |
|
void | _resetTextureManager (void) |
|
void | _resolveTo (TextureGpu *resolveTexture) |
| Immediately resolves this texture to the resolveTexture argument.
|
|
void | _setBackbuffer (id< MTLTexture > backbuffer) |
|
virtual void | _setDepthBufferDefaults (uint16 depthBufferPoolId, bool preferDepthTexture, PixelFormatGpu desiredDepthBufferFormat) |
| These 3 values are used as defaults for the compositor to use, but they may be explicitly overriden by a RenderPassDescriptor.
|
|
void | _setMsaaBackbuffer (id< MTLTexture > msaaTex) |
|
virtual void | _setNextLayout (ResourceLayout::Layout layout) |
| Sets the layout the texture should be transitioned to after the next copy operation (once the copy encoder gets closed)
|
|
void | _setNextResidencyStatus (GpuResidency::GpuResidency nextResidency) |
|
void | _setSampleDescription (SampleDescription desc, SampleDescription validatedSampleDesc) |
| For internal use.
|
|
void | _setSourceType (uint8 type) |
|
virtual void | _setToDisplayDummyTexture (void) |
|
void | _syncGpuResidentToSystemRam (void) |
| Forces downloading data from GPU to CPU, usually because the data on GPU changed and we're in strategy AlwaysKeepSystemRamCopy.
|
|
void | _transitionTo (GpuResidency::GpuResidency newResidency, uint8 *sysRamCopy, bool autoDeleteSysRamCopy=true) |
| This function may be called manually (if user is manually managing a texture) or automatically (e.g.
|
|
void | addListener (TextureGpuListener *listener) |
|
bool | allowsAutoMipmaps (void) const |
|
void | copyContentsToMemory (TextureBox src, TextureBox dst, PixelFormatGpu dstFormat, bool automaticResolve=true) |
| Writes the current contents of the render target to the memory.
|
|
void | copyParametersFrom (TextureGpu *src) |
|
virtual void | copyTo (TextureGpu *dst, const TextureBox &dstBox, uint8 dstMipLevel, const TextureBox &srcBox, uint8 srcMipLevel, bool keepResolvedTexSynced=true, CopyEncTransitionMode::CopyEncTransitionMode srcTransitionMode=CopyEncTransitionMode::Auto, CopyEncTransitionMode::CopyEncTransitionMode dstTransitionMode=CopyEncTransitionMode::Auto) |
|
virtual ResourceLayout::Layout | getCurrentLayout (void) const |
|
virtual void | getCustomAttribute (IdString name, void *pData) |
|
ResourceLayout::Layout | getDefaultLayout (bool bIgnoreDiscardableFlag=false) const |
|
uint32 | getDepth (void) const |
| For TypeCube & TypeCubeArray, this value returns 1.
|
|
virtual uint16 | getDepthBufferPoolId (void) const |
|
uint32 | getDepthOrSlices (void) const |
|
virtual PixelFormatGpu | getDesiredDepthBufferFormat (void) const |
|
id< MTLTexture > | getDisplayTextureName (void) const |
|
TextureBox | getEmptyBox (uint8 mipLevel) |
|
id< MTLTexture > | getFinalTextureName (void) const |
|
GpuPageOutStrategy::GpuPageOutStrategy | getGpuPageOutStrategy (void) const |
|
uint32 | getHeight (void) const |
|
uint32 | getInternalHeight (void) const |
| Real API height accounting for TextureGpu::getOrientationMode. See getInternalWidth.
|
|
uint32 | getInternalSliceStart (void) const |
|
TextureTypes::TextureTypes | getInternalTextureType (void) const |
|
uint32 | getInternalWidth (void) const |
| Real API width accounting for TextureGpu::getOrientationMode If orientation mode is 90° or 270° then getInternalWidth returns the height and getInternalHeight returns the width.
|
|
const vector< TextureGpuListener * >::type & | getListeners (void) const |
|
id< MTLTexture > | getMsaaFramebufferName (void) const |
|
IdString | getName (void) const |
|
virtual String | getNameStr (void) const |
| Note: This returns the alias name of the texture.
|
|
GpuResidency::GpuResidency | getNextResidencyStatus (void) const |
| When getResidencyStatus() != getNextResidencyStatus(), residency changes happen in the main thread, while some preparation may be happening in the background.
|
|
uint8 | getNumMipmaps (void) const |
|
uint32 | getNumSlices (void) const |
| For TypeCube this value returns 6.
|
|
virtual OrientationMode | getOrientationMode (void) const |
|
uint32 | getPendingResidencyChanges (void) const |
| Returns the number of pending residency changes.
|
|
PixelFormatGpu | getPixelFormat (void) const |
|
virtual bool | getPreferDepthTexture (void) const |
|
virtual String | getRealResourceNameStr (void) const |
| Returns the real name (e.g. disk in file) of the resource.
|
|
SampleDescription | getRequestedSampleDescription (void) const |
| Returns original requested sample description, i.e. the raw input to setSampleDescription.
|
|
GpuResidency::GpuResidency | getResidencyStatus (void) const |
|
virtual String | getResourceGroupStr (void) const |
|
SampleDescription | getSampleDescription (void) const |
| Returns effective sample description supported by the API.
|
|
String | getSettingsDesc (void) const |
|
size_t | getSizeBytes (void) const |
| Returns total size in bytes used in GPU by this texture (not by its pool) including mipmaps.
|
|
uint8 | getSourceType (void) const |
| This setting is for where the texture is created, e.g.
|
|
virtual void | getSubsampleLocations (vector< Vector2 >::type locations) |
| Get the MSAA subsample locations.
|
|
TextureGpuManager * | getTextureManager (void) const |
|
const TexturePool * | getTexturePool (void) const |
|
uint32 | getTexturePoolId (void) const |
|
TextureTypes::TextureTypes | getTextureType (void) const |
|
id< MTLTexture > | getView (DescriptorSetTexture2::TextureSlot texSlot) |
|
id< MTLTexture > | getView (DescriptorSetUav::TextureSlot uavSlot) |
|
id< MTLTexture > | getView (PixelFormatGpu pixelFormat, uint8 mipLevel, uint8 numMipmaps, uint16 arraySlice, bool cubemapsAs2DArrays, bool forUav) |
|
uint32 | getWidth (void) const |
|
bool | hasAutomaticBatching (void) const |
|
bool | hasAutoMipmapAuto (void) const |
|
bool | hasEquivalentParameters (TextureGpu *other) const |
|
bool | hasMsaaExplicitResolves (void) const |
|
bool | isDataReady (void) const |
| True if this texture is fully ready to be used for displaying.
|
|
bool | isDiscardableContent (void) const |
|
bool | isManualTexture (void) const |
|
bool | isMetadataReady (void) const |
| It is threadsafe to call this function from main thread.
|
|
virtual bool | isMsaaPatternSupported (MsaaPatterns::MsaaPatterns pattern) |
|
bool | isMultisample (void) const |
|
virtual bool | isOpenGLRenderWindow (void) const |
| OpenGL RenderWindows are a bit specific:
|
|
bool | isPoolOwner (void) const |
|
bool | isReinterpretable (void) const |
|
bool | isRenderToTexture (void) const |
|
bool | isRenderWindowSpecific (void) const |
|
bool | isTexture (void) const |
|
virtual bool | isTextureGpu (void) const |
|
bool | isUav (void) const |
|
void | nextDrawable (void) |
|
void | notifyAllListenersTextureChanged (uint32 reason, void *extraData=0) |
|
virtual void | notifyDataIsReady (void) |
| Notifies it is safe to use the real data. Everything has been uploaded.
|
|
void | operator delete (void *ptr) |
|
void | operator delete (void *ptr, const char *, int, const char *) |
|
void | operator delete (void *ptr, void *) |
|
void | operator delete[] (void *ptr) |
|
void | operator delete[] (void *ptr, const char *, int, const char *) |
|
void * | operator new (size_t sz) |
|
void * | operator new (size_t sz, const char *file, int line, const char *func) |
| operator new, with debug line info
|
|
void * | operator new (size_t sz, void *ptr) |
| placement operator new
|
|
void * | operator new[] (size_t sz) |
|
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
| array operator new, with debug line info
|
|
bool | prefersLoadingFromFileAsSRGB (void) const |
|
void | removeListener (TextureGpuListener *listener) |
|
bool | requiresTextureFlipping (void) const |
|
void | scheduleReupload (Image2 *image=0, bool autoDeleteImage=true) |
| There are times where you want to reload a texture again (e.g.
|
|
void | scheduleTransitionTo (GpuResidency::GpuResidency nextResidency, Image2 *image=0, bool autoDeleteImage=true) |
| Same as unsafeScheduleTransitionTo, but first checks if we're already in the residency state we want to go to, or if it has already been scheduled; thus it can be called multiple times.
|
|
void | setNumMipmaps (uint8 numMipmaps) |
|
virtual void | setOrientationMode (OrientationMode orientationMode) |
| Sets the given orientation.
|
|
void | setPixelFormat (PixelFormatGpu pixelFormat) |
| Sets the pixel format.
|
|
void | setResolution (uint32 width, uint32 height, uint32 depthOrSlices=1u) |
|
void | setSampleDescription (SampleDescription desc) |
|
void | setTexturePoolId (uint32 poolId) |
| 2D Texture with automatic batching will be merged with other textures into the same pool as one big 2D Array texture behind the scenes.
|
|
virtual void | setTextureType (TextureTypes::TextureTypes textureType) |
|
virtual bool | supportsAsDepthBufferFor (TextureGpu *colourTarget) const |
|
virtual void | swapBuffers (void) |
| Only valid for TextureGpu classes.
|
|
void | unsafeScheduleTransitionTo (GpuResidency::GpuResidency nextResidency, Image2 *image=0, bool autoDeleteImage=true) |
| Schedules an async transition in residency.
|
|
void | waitForData (void) |
| Blocks main thread until data is ready.
|
|
void | waitForMetadata (void) |
| Blocks main thread until metadata is ready.
|
|
void | writeContentsToFile (const String &filename, uint8 minMip, uint8 maxMip, bool automaticResolve=true) |
| Writes the current contents of the render target to the named file.
|
|
void Ogre::TextureGpu::waitForData |
( |
void |
| ) |
|
|
inherited |
Blocks main thread until data is ready.
Afterwards isDataReady should return true. If it doesn't, then there was a problem loading the texture. See isMetadataReady remarks.
Q: What's the penalty for calling this function?
A: We need to wait for the worker thread to finish all previous textures until it processes this one. The manager only has broad resolution so it may be also possible that we even have to wait the worker thread to process a few textures that came after this one too.
Thus the cost can be anywhere from "very little" to "a lot" depending on the order in which other textures have been loaded.
The real cost is that you lose valuable ability to hide loading times. If you must call this function, you can mitigate the problem:
1. All textures you need to wait for, load them *first* together, then
call TextureGpuManager::waitForStreamingCompletion (preferred) or
this function. Then proceed to load the rest of the textures.
2. If you can't do the above, call this function as late as possible