OGRE-Next
4.0.0unstable
Object-Oriented Graphics Rendering Engine
|
Implementation of Vulkan as a rendering system. More...
#include <OgreVulkanRenderSystem.h>
Public Member Functions | |
VulkanRenderSystem (const NameValuePairList *options) | |
~VulkanRenderSystem () override | |
void | _beginFrame () override |
Signifies the beginning of a frame, i.e. More... | |
Window * | _createRenderWindow (const String &name, uint32 width, uint32 height, bool fullScreen, const NameValuePairList *miscParams=0) override |
Creates a new rendering window. More... | |
void | _descriptorSetSamplerCreated (DescriptorSetSampler *newSet) override |
void | _descriptorSetSamplerDestroyed (DescriptorSetSampler *set) override |
void | _descriptorSetTexture2Created (DescriptorSetTexture2 *newSet) override |
void | _descriptorSetTexture2Destroyed (DescriptorSetTexture2 *set) override |
void | _descriptorSetTextureCreated (DescriptorSetTexture *newSet) override |
void | _descriptorSetTextureDestroyed (DescriptorSetTexture *set) override |
void | _descriptorSetUavCreated (DescriptorSetUav *newSet) override |
void | _descriptorSetUavDestroyed (DescriptorSetUav *set) override |
void | _dispatch (const HlmsComputePso &pso) override |
void | _endFrame () override |
Ends rendering of a frame to the current viewport. More... | |
void | _endFrameOnce () override |
Called once per frame, regardless of how many active workspaces there are. More... | |
VulkanFlushOnlyDescMap & | _getFlushOnlyDescMap () |
VulkanFrameBufferDescMap & | _getFrameBufferDescMap () |
void | _hlmsBlendblockCreated (HlmsBlendblock *newBlock) override |
void | _hlmsBlendblockDestroyed (HlmsBlendblock *block) override |
void | _hlmsComputePipelineStateObjectCreated (HlmsComputePso *newPso) override |
void | _hlmsComputePipelineStateObjectDestroyed (HlmsComputePso *newPso) override |
void | _hlmsMacroblockCreated (HlmsMacroblock *newBlock) override |
void | _hlmsMacroblockDestroyed (HlmsMacroblock *block) override |
void | _hlmsPipelineStateObjectCreated (HlmsPso *newPso) override |
void | _hlmsPipelineStateObjectDestroyed (HlmsPso *pos) override |
void | _hlmsSamplerblockCreated (HlmsSamplerblock *newBlock) override |
void | _hlmsSamplerblockDestroyed (HlmsSamplerblock *block) override |
Window * | _initialise (bool autoCreateWindow, const String &windowTitle="OGRE Render Window") override |
Start up the renderer using the settings selected (Or the defaults if none have been selected). More... | |
void | _notifyActiveComputeEnded () |
void | _notifyActiveEncoderEnded (bool callEndRenderPassDesc) |
void | _notifyDeviceStalled () |
void | _render (const CbDrawCallIndexed *cmd) override |
Renders the VAO. Assumes _setVertexArrayObject has already been called. More... | |
void | _render (const CbDrawCallStrip *cmd) override |
void | _render (const v1::CbDrawCallIndexed *cmd) override |
Renders a V1 RenderOperation. Assumes _setRenderOperation has already been called. More... | |
void | _render (const v1::CbDrawCallStrip *cmd) override |
void | _render (const v1::RenderOperation &op) override |
Render something to the active viewport. More... | |
void | _renderEmulated (const CbDrawCallIndexed *cmd) override |
void | _renderEmulated (const CbDrawCallStrip *cmd) override |
void | _setComputePso (const HlmsComputePso *pso) override |
Unlike _setPipelineStateObject, the RenderSystem will check if the PSO has changed to avoid redundant state changes (since it's hard to do it at Hlms level) More... | |
void | _setConstBuffer (size_t slot, const VkDescriptorBufferInfo &bufferInfo) |
void | _setConstBufferCS (size_t slot, const VkDescriptorBufferInfo &bufferInfo) |
void | _setCurrentDeviceFromTexture (TextureGpu *texture) override |
Because Ogre doesn't (yet) have the notion of a 'device' or 'GL context', this function lets Ogre know which device should be used by providing a texture. More... | |
void | _setHlmsSamplerblock (uint8 texUnit, const HlmsSamplerblock *Samplerblock) override |
See HlmsSamplerblock. More... | |
void | _setIndirectBuffer (IndirectBufferPacked *indirectBuffer) override |
void | _setParamBuffer (GpuProgramType shaderStage, const VkDescriptorBufferInfo &bufferInfo) |
void | _setPipelineStateObject (const HlmsPso *pso) override |
void | _setPointParameters (Real size, bool attenuationEnabled, Real constant, Real linear, Real quadratic, Real minSize, Real maxSize) override |
Sets the size of points and how they are attenuated with distance. More... | |
void | _setPointSpritesEnabled (bool enabled) override |
Sets whether or not rendering points using OT_POINT_LIST will render point sprites (textured quads) or plain points. More... | |
void | _setProjectionMatrix (const Matrix4 &m) override |
Sets the projection transform matrix. More... | |
void | _setReadOnlyBuffer (size_t slot, const VkDescriptorBufferInfo &bufferInfo) |
void | _setRenderOperation (const v1::CbRenderOp *cmd) override |
void | _setSamplers (uint32 slotStart, const DescriptorSetSampler *set) override |
void | _setSamplersCS (uint32 slotStart, const DescriptorSetSampler *set) override |
void | _setSurfaceParams (const ColourValue &ambient, const ColourValue &diffuse, const ColourValue &specular, const ColourValue &emissive, Real shininess, TrackVertexColourType tracking=TVC_NONE) override |
Sets the surface properties to be used for future rendering. More... | |
void | _setTexBuffer (size_t slot, VkBufferView bufferView) |
void | _setTexBufferCS (size_t slot, VkBufferView bufferView) |
void | _setTexture (size_t unit, TextureGpu *texPtr, bool bDepthReadOnly) override |
Sets the texture to bind to a given texture unit. More... | |
void | _setTextureBlendMode (size_t unit, const LayerBlendModeEx &bm) override |
Sets the texture blend modes from a TextureUnitState record. More... | |
void | _setTextureCoordCalculation (size_t unit, TexCoordCalcMethod m, const Frustum *frustum=0) override |
Sets a method for automatically calculating texture coordinates for a stage. More... | |
void | _setTextureMatrix (size_t unit, const Matrix4 &xform) override |
Sets the texture coordinate transformation matrix for a texture unit. More... | |
void | _setTextures (uint32 slotStart, const DescriptorSetTexture *set, uint32 hazardousTexIdx) override |
void | _setTextures (uint32 slotStart, const DescriptorSetTexture2 *set) override |
void | _setTexturesCS (uint32 slotStart, const DescriptorSetTexture *set) override |
void | _setTexturesCS (uint32 slotStart, const DescriptorSetTexture2 *set) override |
void | _setUavCS (uint32 slotStart, const DescriptorSetUav *set) override |
void | _setVertexArrayObject (const VertexArrayObject *vao) override |
Part of the low level rendering interface. More... | |
void | _setViewMatrix (const Matrix4 &m) override |
Sets the view transform matrix. More... | |
void | _setWorldMatrix (const Matrix4 &m) override |
Sets the world transform matrix. More... | |
void | _useLights (const LightList &lights, unsigned short limit) override |
Tells the rendersystem to use the attached set of lights (and no others) up to the number specified (this allows the same list to be used with different count limits) More... | |
void | beginGPUSampleProfile (const String &name, uint32 *hashCache) override |
void | beginProfileEvent (const String &eventName) override |
This marks the beginning of an event for GPU profiling. More... | |
void | beginRenderPassDescriptor (RenderPassDescriptor *desc, TextureGpu *anyTarget, uint8 mipLevel, const Vector4 *viewportSizes, const Vector4 *scissors, uint32 numViewports, bool overlaysEnabled, bool warnIfRtvWasFlushed) override |
When the descriptor is set to Load clear, two possible things may happen: More... | |
void | bindGpuProgramParameters (GpuProgramType gptype, GpuProgramParametersSharedPtr params, uint16 variabilityMask) override |
Bind Gpu program parameters. More... | |
void | bindGpuProgramPassIterationParameters (GpuProgramType gptype) override |
Only binds Gpu program parameters used for passes that have more than one iteration rendering. More... | |
void | clearFrameBuffer (RenderPassDescriptor *renderPassDesc, TextureGpu *anyTarget, uint8 mipLevel) override |
Immediately clears the whole frame buffer on the selected RenderPassDescriptor. More... | |
TextureGpu * | createDepthBufferFor (TextureGpu *colourTexture, bool preferDepthTexture, PixelFormatGpu depthBufferFormat, uint16 poolId) override |
HardwareOcclusionQuery * | createHardwareOcclusionQuery () override |
Create an object for performing hardware occlusion queries. More... | |
RenderPassDescriptor * | createRenderPassDescriptor () override |
RenderSystemCapabilities * | createRenderSystemCapabilities () const override |
Query the real capabilities of the GPU and driver in the RenderSystem. More... | |
void | debugAnnotationPop () override |
void | debugAnnotationPush (const String &event) override |
Specifically meant to mark passes in RenderDoc. More... | |
void | debugCallback () |
void | deinitGPUProfiling () override |
void | endCopyEncoder () override |
Required when caller will soon start analyzing barriers (e.g. More... | |
void | endGpuDebuggerFrameCapture (Window *window, const bool bDiscard=false) override |
See RenderSystem::startGpuDebuggerFrameCapture Call this function when you're done capturing a frame. More... | |
void | endGPUSampleProfile (const String &name) override |
void | endProfileEvent () override |
Ends the currently active GPU profiling event. More... | |
void | endRenderPassDescriptor () override |
void | endRenderPassDescriptor (bool isInterruptingRender) |
void | executeRenderPassDescriptorDelayedActions () override |
Metal needs to delay RenderCommand creation to the last minute, because we can't issue blit operations (e.g. More... | |
void | executeRenderPassDescriptorDelayedActions (bool officialCall) |
void | executeResourceTransition (const ResourceTransitionArray &rstCollection) override |
void | flushBoundGpuProgramParameters (const SubmissionType::SubmissionType submissionType) |
Low Level Materials use a params buffer to pass all uniforms. More... | |
void | flushCommands () override |
void | flushPendingNonCoherentFlushes (const SubmissionType::SubmissionType submissionType) |
All pending or queued buffer flushes (i.e. More... | |
void | flushUAVs () |
const VulkanPhysicalDevice & | getActiveVulkanPhysicalDevice () const |
VertexElementType | getColourVertexElementType () const override |
Get the native VertexElementType for a compact 32-bit colour value for this rendersystem. More... | |
ConfigOptionMap & | getConfigOptions () override |
Returns the details of this API's configuration options. More... | |
void | getCustomAttribute (const String &name, void *pData) override |
Gets a custom (maybe platform-specific) attribute. More... | |
unsigned int | getDisplayMonitorCount () const override |
Gets the number of display monitors. More... | |
String | getErrorDescription (long errorNumber) const override |
Returns a description of an error code. More... | |
const String & | getFriendlyName () const override |
Returns the friendly name of the render system. More... | |
Real | getHorizontalTexelOffset () override |
Returns the horizontal texel offset value required for mapping texel origins to pixel origins in this rendersystem. More... | |
Real | getMaximumDepthInputValue () override |
Gets the maximum (farthest) depth value to be used when rendering using identity transforms. More... | |
Real | getMinimumDepthInputValue () override |
Gets the minimum (closest) depth value to be used when rendering using identity transforms. More... | |
const String & | getName () const override |
Returns the name of the rendering system. More... | |
size_t | getNumPriorityConfigOptions () const override |
Number of priority config options in RenderSystem::getPriorityConfigOption. More... | |
const PixelFormatToShaderType * | getPixelFormatToShaderType () const override |
const char * | getPriorityConfigOption (size_t idx) const override |
Some options depend on other options. More... | |
bool | getSwappyFramePacing () const |
ANDROID ONLY: Whether Swappy is enabled. See setSwappyFramePacing(). More... | |
Real | getVerticalTexelOffset () override |
Returns the vertical texel offset value required for mapping texel origins to pixel origins in this rendersystem. More... | |
VulkanDevice * | getVulkanDevice () const |
const FastArray< VulkanPhysicalDevice > & | getVulkanPhysicalDevices () const |
void | handleDeviceLost () |
bool | hasAnisotropicMipMapFilter () const override |
Determines if the system has anisotropic mip map filter support. More... | |
void | initConfigOptions () |
void | initGPUProfiling () override |
void | initialiseFromRenderSystemCapabilities (RenderSystemCapabilities *caps, Window *primary) override |
Initialize the render system from the capabilities. More... | |
bool | isSameLayout (ResourceLayout::Layout a, ResourceLayout::Layout b, const TextureGpu *texture, bool bIsDebugCheck) const override |
Returns true if 'a' and 'b' internally map to the same layout and should be considered equivalent for a given texture. More... | |
void | loadPipelineCache (DataStreamPtr stream) override |
Loads the pipeline cache from disk. More... | |
void | markProfileEvent (const String &event) override |
Marks an instantaneous event for graphics profilers. More... | |
void | notifyRenderTextureNonResident (VulkanTextureGpu *texture) |
void | notifySwapchainCreated (VulkanWindow *window) |
void | notifySwapchainDestroyed (VulkanWindow *window) |
void | postExtraThreadsStarted () override |
void | preExtraThreadsStarted () override |
Tell the rendersystem to perform any prep tasks it needs to directly before other threads which might access the rendering API are registered. More... | |
void | registerThread () override |
Register the an additional thread which may make calls to rendersystem-related objects. More... | |
void | reinitialise () override |
Restart the renderer (normally following a change in settings). More... | |
void | resetAllBindings () |
void | savePipelineCache (DataStreamPtr stream) const override |
Saves the pipeline cache to disk. More... | |
void | setClipPlanesImpl (const PlaneList &clipPlanes) override |
Internal method used to set the underlying clip planes when needed. More... | |
void | setConfigOption (const String &name, const String &value) override |
Sets an option for this API. More... | |
void | setStencilBufferParams (uint32 refValue, const StencilParams &stencilParams) override |
This method allows you to set all the stencil buffer parameters in one call. More... | |
void | setSwappyFramePacing (bool bEnable, Window *callingWindow=0) |
ANDROID ONLY: Whether to enable/disable Swappy frame pacing. More... | |
void | shutdown () override |
Shutdown the renderer and cleanup resources. More... | |
bool | supportsMultithreadedShaderCompilation () const override |
Returns true if RenderSystem supports multithreaded shader and PSO compilation. More... | |
void | unregisterThread () override |
Unregister an additional thread which may make calls to rendersystem-related objects. More... | |
String | validateConfigOptions () override |
Validates the options set for the rendering system, returning a message if there are problems. More... | |
bool | validateDevice (bool forceDeviceElection=false) override |
Some render systems have moments when GPU device is temporarily unavailable, for example when D3D11 device is lost, or when iOS app is in background, etc. More... | |
SampleDescription | validateSampleDescription (const SampleDescription &sampleDesc, PixelFormatGpu format, uint32 textureFlags) override |
Returns supported sample description for requested FSAA mode, with graceful downgrading. More... | |
Public Member Functions inherited from Ogre::RenderSystem | |
RenderSystem () | |
Default Constructor. More... | |
virtual | ~RenderSystem () |
Destructor. More... | |
void | _addMetrics (const RenderingMetrics &newMetrics) |
virtual void | _beginFrameOnce () |
Signifies the beginning of the main frame. More... | |
void | _cleanupDepthBuffers () |
virtual void | _clearStateAndFlushCommandBuffer () |
On D3D11 calls ClearState followed by Flush(). More... | |
virtual void | _convertOpenVrProjectionMatrix (const Matrix4 &matrix, Matrix4 &dest) |
Converts an OpenVR projection matrix to have the proper depth range and reverse Z settings. More... | |
virtual void | _convertProjectionMatrix (const Matrix4 &matrix, Matrix4 &dest) |
Converts a uniform projection matrix to suitable for this render system. More... | |
virtual bool | _createRenderWindows (const RenderWindowDescriptionList &renderWindowDescriptions, WindowList &createdWindows) |
Creates multiple rendering windows. More... | |
void | _dereferenceSharedDepthBuffer (TextureGpu *depthBuffer) |
Releases the reference count on a shared depth buffer. More... | |
Viewport & | _getCurrentRenderViewport () |
virtual const String & | _getDefaultViewportMaterialScheme () const |
Returns the default material scheme used by the render system. More... | |
virtual void | _makeRsProjectionMatrix (const Matrix4 &matrix, Matrix4 &dest, Real nearPlane, Real farPlane, ProjectionType projectionType) |
Takes a regular source projection matrix in range [-1; 1] and converts it to a projection matrix in 'dest' with reverse Z range [1; 0]. More... | |
virtual RenderSystemContext * | _pauseFrame () |
Pause rendering for a frame. More... | |
virtual void | _renderEmulatedNoBaseInstance (const CbDrawCallIndexed *cmd) |
virtual void | _renderEmulatedNoBaseInstance (const CbDrawCallStrip *cmd) |
virtual void | _renderNoBaseInstance (const v1::CbDrawCallIndexed *cmd) |
virtual void | _renderNoBaseInstance (const v1::CbDrawCallStrip *cmd) |
void | _resetMetrics () |
virtual void | _resumeFrame (RenderSystemContext *context) |
Resume rendering for a frame. More... | |
virtual void | _setBindingType (TextureUnitState::BindingType bindigType) |
Set texture unit binding type. More... | |
virtual void | _setGeometryTexture (size_t unit, TextureGpu *tex) |
virtual void | _setTessellationDomainTexture (size_t unit, TextureGpu *tex) |
virtual void | _setTessellationHullTexture (size_t unit, TextureGpu *tex) |
virtual void | _setTextureProjectionRelativeTo (bool enabled, const Vector3 &pos) |
Notify the rendersystem that it should adjust texture projection to be relative to a different origin. More... | |
virtual void | _setTextureUnitSettings (size_t texUnit, TextureUnitState &tl) |
Utility function for setting all the properties of a texture unit at once. More... | |
virtual void | _setVertexTexture (size_t unit, TextureGpu *tex) |
Binds a texture to a vertex, geometry, compute, tessellation hull or tessellation domain sampler. More... | |
virtual void | _setWorldMatrices (const Matrix4 *m, unsigned short count) |
Sets multiple world matrices (vertex blending). More... | |
virtual void | _startLegacyV1Rendering () |
May override the current VertexArrayObject! More... | |
void | _update () |
Called once per frame, regardless of how many active workspaces there are. More... | |
virtual void | addClipPlane (const Plane &p) |
Add a user clipping plane. More... | |
virtual void | addClipPlane (Real A, Real B, Real C, Real D) |
Add a user clipping plane. More... | |
virtual void | addListener (Listener *l) |
Adds a listener to the custom events that this render system can raise. More... | |
virtual bool | areFixedFunctionLightsInViewSpace () const |
Are fixed-function lights provided in view space? Affects optimisation. More... | |
virtual bool | checkExtension (const String &ext) const |
Checks for the presense of an API-specific extension (eg. Vulkan, GL) More... | |
virtual void | compositorWorkspaceBegin (CompositorWorkspace *workspace, const bool forceBeginFrame) |
See RenderSystem::updateCompositorManager. More... | |
virtual void | compositorWorkspaceEnd (CompositorWorkspace *workspace, const bool forceEndFrame) |
See RenderSystem::updateCompositorManager. More... | |
virtual void | compositorWorkspaceUpdate (CompositorWorkspace *workspace) |
See RenderSystem::updateCompositorManager. More... | |
virtual void | convertColourValue (const ColourValue &colour, uint32 *pDest) |
Generates a packed data version of the passed in ColourValue suitable for use as with this RenderSystem. More... | |
virtual void | destroyHardwareOcclusionQuery (HardwareOcclusionQuery *hq) |
Destroy a hardware occlusion query object. More... | |
void | destroyRenderPassDescriptor (RenderPassDescriptor *renderPassDesc) |
virtual void | destroyRenderWindow (Window *window) |
Destroys a render window. More... | |
BarrierSolver & | getBarrierSolver () |
BoundUav | getBoundUav (size_t slot) const |
const RenderSystemCapabilities * | getCapabilities () const |
Gets the capabilities of the render system. More... | |
RenderPassDescriptor * | getCurrentPassDescriptor () |
Viewport * | getCurrentRenderViewports () |
bool | getDebugShaders () const |
virtual TextureGpu * | getDepthBufferFor (TextureGpu *colourTexture, uint16 poolId, bool preferDepthTexture, PixelFormatGpu depthBufferFormat) |
virtual const DriverVersion & | getDriverVersion () const |
Returns the driver version. More... | |
v1::HardwareVertexBufferSharedPtr | getGlobalInstanceVertexBuffer () const |
Returns the global instance vertex buffer. More... | |
v1::VertexDeclaration * | getGlobalInstanceVertexBufferVertexDeclaration () const |
Gets vertex declaration for the global vertex buffer for the global instancing. More... | |
size_t | getGlobalNumberOfInstances () const |
Gets the global number of instances. More... | |
bool | getInvertedClipSpaceY () const |
+Y is downwards in NDC (Normalized Device Coordinates). Only Vulkan has this problem. More... | |
virtual bool | getInvertVertexWinding () const |
Indicates whether or not the vertex windings set will be inverted for the current render (e.g. More... | |
uint32 | getMaxBoundViewports () |
const RenderingMetrics & | getMetrics () const |
RenderSystemCapabilities * | getMutableCapabilities () |
Get a pointer to the current capabilities being used by the RenderSystem. More... | |
uint16 | getNativeShadingLanguageVersion () const |
Gets the native shading language version for this render system. More... | |
RENDERDOC_API_1_4_1 * | getRenderDocApi () |
Returns the RenderDoc API handle in case you want to do more advanced functionality than what we expose. More... | |
virtual const StringVector & | getRenderSystemEvents () const |
Gets a list of the rendersystem specific events that this rendersystem can raise. More... | |
virtual Real | getRSDepthRange () const |
OpenGL depth is in range [-1;1] so it returns 2.0f; D3D11 & Metal are in range [0;1] so it returns 1.0f;. More... | |
const StencilParams & | getStencilBufferParams () const |
TextureGpuManager * | getTextureGpuManager () const |
VaoManager * | getVaoManager () const |
bool | getWBufferEnabled () const |
Returns true if the renderer will try to use W-buffers when available. More... | |
virtual bool | isGpuProgramBound (GpuProgramType gptype) |
Returns whether or not a Gpu program of the given type is currently bound. More... | |
bool | isReverseDepth () const |
virtual bool | isStaticBufferLockable () const |
bool | loadRenderDocApi () |
Explicitly loads RenderDoc. More... | |
void | queueBindUAVs (const DescriptorSetUav *descSetUav) |
Queues the binding of an UAV to the binding point/slot. More... | |
virtual void | removeListener (Listener *l) |
Remove a listener to the custom events that this render system can raise. More... | |
virtual void | resetClipPlanes () |
Clears the user clipping region. More... | |
virtual void | setClipPlanes (const PlaneList &clipPlanes) |
Sets the user clipping region. More... | |
virtual void | setCurrentPassIterationCount (const size_t count) |
set the current multi pass count value. More... | |
void | setDebugShaders (bool bDebugShaders) |
Instructs the RenderSystem to compile shaders without optimizations and with debug information, for easier debugging on APIs that support it. More... | |
virtual void | setDeriveDepthBias (bool derive, float baseValue=0.0f, float multiplier=0.0f, float slopeScale=0.0f) |
Tell the render system whether to derive a depth bias on its own based on the values passed to it in setCurrentPassIterationCount. More... | |
virtual bool | setDrawBuffer (ColourBufferType colourBuffer) |
Sets the colour buffer that the render system will to draw. More... | |
void | setGlobalInstanceVertexBuffer (const v1::HardwareVertexBufferSharedPtr &val) |
Sets the global instance vertex buffer. More... | |
void | setGlobalInstanceVertexBufferVertexDeclaration (v1::VertexDeclaration *val) |
Sets vertex declaration for the global vertex buffer for the global instancing. More... | |
void | setGlobalNumberOfInstances (const size_t val) |
Sets the global number of instances. More... | |
void | setInvertVertexWinding (bool invert) |
Sets whether or not vertex windings set should be inverted; this can be important for rendering reflections. More... | |
void | setMetricsRecordingEnabled (bool bEnable) |
void | setUavStartingSlot (uint32 startingSlot) |
In Direct3D11, UAV & RenderTargets share the same slots. More... | |
void | setWBufferEnabled (bool enabled) |
Sets whether or not W-buffers are enabled if they are available for this renderer. More... | |
virtual bool | startGpuDebuggerFrameCapture (Window *window) |
Programmatically performs a GPU capture when attached to a GPU debugger like RenderDoc or Metal Graphics Debugger. More... | |
virtual void | updateCompositorManager (CompositorManager2 *compositorManager) |
This gives the renderer a chance to perform the compositor update in a special way. More... | |
virtual void | useCustomRenderSystemCapabilities (RenderSystemCapabilities *capabilities) |
Force the render system to use the special capabilities. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Ogre::RenderSystem | |
static void | addSharedListener (Listener *listener) |
Sets shared listener. More... | |
static void | fireSharedEvent (const String &name, const NameValuePairList *params=0) |
static void | removeSharedListener (Listener *listener) |
Remove shared listener to the custom events that this render system can raise. More... | |
static CompareFunction | reverseCompareFunction (CompareFunction depthFunc) |
Reverts the compare order e.g. More... | |
Implementation of Vulkan as a rendering system.
Ogre::VulkanRenderSystem::VulkanRenderSystem | ( | const NameValuePairList * | options | ) |
|
override |
|
overridevirtual |
Signifies the beginning of a frame, i.e.
the start of rendering on a single viewport. Will occur several times per complete frame if multiple viewports exist.
Implements Ogre::RenderSystem.
|
overridevirtual |
Creates a new rendering window.
name | The name of the window. Used in other methods later like setRenderTarget and getRenderTarget. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
width | The width of the new window. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
height | The height of the new window. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fullScreen | Specify true to make the window full screen without borders, title bar or menu bar. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
miscParams | A NameValuePairList describing the other parameters for the new rendering window. Options are case sensitive. Unrecognised parameters will be ignored silently. These values might be platform dependent, but these are present for all platforms unless indicated otherwise:
|
Implements Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Ends rendering of a frame to the current viewport.
Implements Ogre::RenderSystem.
|
overridevirtual |
Called once per frame, regardless of how many active workspaces there are.
Gets called AFTER all RenderWindows have been swapped.
Reimplemented from Ogre::RenderSystem.
|
inline |
|
inline |
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Start up the renderer using the settings selected (Or the defaults if none have been selected).
autoCreateWindow | If true, creates a render window automatically, based on settings chosen so far. This saves an extra call to _createRenderWindow for the main render window. |
windowTitle | Sets the app window title |
Reimplemented from Ogre::RenderSystem.
void Ogre::VulkanRenderSystem::_notifyActiveComputeEnded | ( | ) |
void Ogre::VulkanRenderSystem::_notifyActiveEncoderEnded | ( | bool | callEndRenderPassDesc | ) |
void Ogre::VulkanRenderSystem::_notifyDeviceStalled | ( | ) |
|
overridevirtual |
Renders the VAO. Assumes _setVertexArrayObject has already been called.
Implements Ogre::RenderSystem.
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Renders a V1 RenderOperation. Assumes _setRenderOperation has already been called.
Implements Ogre::RenderSystem.
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Render something to the active viewport.
Low-level rendering interface to perform rendering operations. Unlikely to be used directly by client applications, since the SceneManager and various support classes will be responsible for calling this method. Can only be called between _beginScene and _endScene
op | A rendering operation instance, which contains details of the operation to be performed. |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Unlike _setPipelineStateObject, the RenderSystem will check if the PSO has changed to avoid redundant state changes (since it's hard to do it at Hlms level)
Implements Ogre::RenderSystem.
void Ogre::VulkanRenderSystem::_setConstBuffer | ( | size_t | slot, |
const VkDescriptorBufferInfo & | bufferInfo | ||
) |
void Ogre::VulkanRenderSystem::_setConstBufferCS | ( | size_t | slot, |
const VkDescriptorBufferInfo & | bufferInfo | ||
) |
|
overridevirtual |
Because Ogre doesn't (yet) have the notion of a 'device' or 'GL context', this function lets Ogre know which device should be used by providing a texture.
texture | Cannot be null. |
Implements Ogre::RenderSystem.
|
overridevirtual |
See HlmsSamplerblock.
This function MUST be called after _setTexture, not before. Otherwise not all APIs may see the change.
Implements Ogre::RenderSystem.
|
overridevirtual |
Implements Ogre::RenderSystem.
void Ogre::VulkanRenderSystem::_setParamBuffer | ( | GpuProgramType | shaderStage, |
const VkDescriptorBufferInfo & | bufferInfo | ||
) |
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Sets the size of points and how they are attenuated with distance.
Implements Ogre::RenderSystem.
|
overridevirtual |
Sets whether or not rendering points using OT_POINT_LIST will render point sprites (textured quads) or plain points.
enabled | True enables point sprites, false returns to normal point rendering. |
Implements Ogre::RenderSystem.
|
overridevirtual |
Sets the projection transform matrix.
Implements Ogre::RenderSystem.
void Ogre::VulkanRenderSystem::_setReadOnlyBuffer | ( | size_t | slot, |
const VkDescriptorBufferInfo & | bufferInfo | ||
) |
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Sets the surface properties to be used for future rendering.
This method sets the the properties of the surfaces of objects to be rendered after it. In this context these surface properties are the amount of each type of light the object reflects (determining it's colour under different types of light), whether it emits light itself, and how shiny it is. Textures are not dealt with here, see the _setTetxure method for details. This method is used by _setMaterial so does not need to be called direct if that method is being used.
ambient | The amount of ambient (sourceless and directionless) light an object reflects. Affected by the colour/amount of ambient light in the scene. |
diffuse | The amount of light from directed sources that is reflected (affected by colour/amount of point, directed and spot light sources) |
specular | The amount of specular light reflected. This is also affected by directed light sources but represents the colour at the highlights of the object. |
emissive | The colour of light emitted from the object. Note that this will make an object seem brighter and not dependent on lights in the scene, but it will not act as a light, so will not illuminate other objects. Use a light attached to the same SceneNode as the object for this purpose. |
shininess | A value which only has an effect on specular highlights (so specular must be non-black). The higher this value, the smaller and crisper the specular highlights will be, imitating a more highly polished surface. This value is not constrained to 0.0-1.0, in fact it is likely to be more (10.0 gives a modest sheen to an object). |
tracking | A bit field that describes which of the ambient, diffuse, specular and emissive colours follow the vertex colour of the primitive. When a bit in this field is set its ColourValue is ignored. This is a combination of TVC_AMBIENT, TVC_DIFFUSE, TVC_SPECULAR(note that the shininess value is still taken from shininess) and TVC_EMISSIVE. TVC_NONE means that there will be no material property tracking the vertex colours. |
Implements Ogre::RenderSystem.
void Ogre::VulkanRenderSystem::_setTexBuffer | ( | size_t | slot, |
VkBufferView | bufferView | ||
) |
void Ogre::VulkanRenderSystem::_setTexBufferCS | ( | size_t | slot, |
VkBufferView | bufferView | ||
) |
|
overridevirtual |
Sets the texture to bind to a given texture unit.
User processes would not normally call this direct unless rendering primitives themselves.
unit | The index of the texture unit to modify. Multitexturing hardware can support multiple units (see RenderSystemCapabilites::getNumTextureUnits) |
enabled | Boolean to turn the unit on/off |
texPtr | Pointer to the texture to use. |
bDepthReadOnly | true if the texture is also attached as a depth buffer but is read only |
Implements Ogre::RenderSystem.
|
overridevirtual |
Sets the texture blend modes from a TextureUnitState record.
Meant for use internally only - apps should use the Material and TextureUnitState classes.
unit | Texture unit as above |
bm | Details of the blending mode |
Implements Ogre::RenderSystem.
|
overridevirtual |
Sets a method for automatically calculating texture coordinates for a stage.
Should not be used by apps - for use by Ogre only.
unit | Texture unit as above |
m | Calculation method to use |
frustum | Optional Frustum param, only used for projective effects |
Implements Ogre::RenderSystem.
|
overridevirtual |
Sets the texture coordinate transformation matrix for a texture unit.
unit | Texture unit to affect |
xform | The 4x4 matrix |
Implements Ogre::RenderSystem.
|
overridevirtual |
slotStart | |
set | |
hazardousTexIdx | When hazardousTexIdx < set->mTextures.size(); it means that we need to check if set->mTextures[hazardousTexIdx] is not the same as the currently bound RTT. |
Implements Ogre::RenderSystem.
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Part of the low level rendering interface.
Tells the RS which VAO will be bound now. (i.e. Vertex Formats, buffers being bound, etc.) You don't need to rebind if the VAO's mRenderQueueId is the same as previous call.
Implements Ogre::RenderSystem.
|
overridevirtual |
Sets the view transform matrix.
Implements Ogre::RenderSystem.
|
overridevirtual |
Sets the world transform matrix.
Implements Ogre::RenderSystem.
|
overridevirtual |
Tells the rendersystem to use the attached set of lights (and no others) up to the number specified (this allows the same list to be used with different count limits)
Implements Ogre::RenderSystem.
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
This marks the beginning of an event for GPU profiling.
Implements Ogre::RenderSystem.
|
overridevirtual |
When the descriptor is set to Load clear, two possible things may happen:
desc | |
anyTarget | Contains the first valid texture in mRenderPassDesc, to be used for reference (e.g. width, height, etc). Could be colour, depth, stencil, or nullptr. |
mipLevel | Mip at which anyTarget is bound |
viewportSize | |
warnIfRtvWasFlushed | See CompositorPassDef::mWarnIfRtvWasFlushed |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Bind Gpu program parameters.
gptype | The type of program to bind the parameters to |
params | The parameters to bind |
variabilityMask | A mask of GpuParamVariability identifying which params need binding |
Implements Ogre::RenderSystem.
|
overridevirtual |
Only binds Gpu program parameters used for passes that have more than one iteration rendering.
Implements Ogre::RenderSystem.
|
overridevirtual |
Immediately clears the whole frame buffer on the selected RenderPassDescriptor.
Prefer clearing using the LoadAction semantics in the RenderPassDescriptor. This function is provided for two reasons:
renderPassDesc | RenderPassDescriptor filled with LoadActions set to clear and StoreActions set to Store. |
Implements Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Create an object for performing hardware occlusion queries.
Implements Ogre::RenderSystem.
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Query the real capabilities of the GPU and driver in the RenderSystem.
Implements Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Specifically meant to mark passes in RenderDoc.
See https://renderdoc.org/docs/how/how_annotate_capture.html
In many cases it will use the same interface as beginProfileEvent / endProfileEvent
Note: For security & performance reasons this feature is only enabled when OGRE_DEBUG_MODE >= OGRE_DEBUG_MEDIUM
Reimplemented from Ogre::RenderSystem.
void Ogre::VulkanRenderSystem::debugCallback | ( | ) |
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Required when caller will soon start analyzing barriers (e.g.
use BarrierSolver) Ogre will flush any pending resource transitions.
Otherwise BarrierSolver will see that a Resource is in a particular state or layout, then when calling executeResourceTransition, the pending resource layout will be flushed, and now the resource transition resolved by BarrierSolver will have the wrong 'old' layout
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
See RenderSystem::startGpuDebuggerFrameCapture Call this function when you're done capturing a frame.
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Ends the currently active GPU profiling event.
Implements Ogre::RenderSystem.
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
|
inline |
|
overridevirtual |
Metal needs to delay RenderCommand creation to the last minute, because we can't issue blit operations (e.g.
buffer copies) which a lot of v1 code relies on otherwise the RenderCommand gets canceled. Even if we were to get rid of v1 operations, the user may want to hook listeners for _renderPhase02 and perform forbidden operations. Therefore it's easier to split the process done in beginRenderPassDescriptor in two steps (beginRenderPassDescriptor and executeRenderPassDescriptorDelayedActions) for Metal.
Reimplemented from Ogre::RenderSystem.
void Ogre::VulkanRenderSystem::executeRenderPassDescriptorDelayedActions | ( | bool | officialCall | ) |
|
overridevirtual |
Reimplemented from Ogre::RenderSystem.
void Ogre::VulkanRenderSystem::flushBoundGpuProgramParameters | ( | const SubmissionType::SubmissionType | submissionType | ) |
Low Level Materials use a params buffer to pass all uniforms.
We emulate this using a large const buffer to which we write to and bind the regions we need. This is done in bindGpuProgramParameters().
When it runs out of space, we create another one (see mAutoParamsBuffer).
However:
submissionType | See SubmissionType::SubmissionType. |
|
overridevirtual |
Implements Ogre::RenderSystem.
void Ogre::VulkanRenderSystem::flushPendingNonCoherentFlushes | ( | const SubmissionType::SubmissionType | submissionType | ) |
All pending or queued buffer flushes (i.e.
calls to vkFlushMappedMemoryRanges) must be done now because we're about to submit commands for execution; and they need to see those regions flushed.
submissionType | See SubmissionType::SubmissionType. |
void Ogre::VulkanRenderSystem::flushUAVs | ( | ) |
|
inline |
|
overridevirtual |
Get the native VertexElementType for a compact 32-bit colour value for this rendersystem.
Implements Ogre::RenderSystem.
|
overridevirtual |
Returns the details of this API's configuration options.
Implements Ogre::RenderSystem.
|
overridevirtual |
Gets a custom (maybe platform-specific) attribute.
name | The name of the attribute. |
pData | Pointer to memory of the right kind of structure to receive the info. |
Reimplemented from Ogre::RenderSystem.
|
inlineoverridevirtual |
Gets the number of display monitors.
Implements Ogre::RenderSystem.
|
overridevirtual |
Returns a description of an error code.
Implements Ogre::RenderSystem.
|
overridevirtual |
Returns the friendly name of the render system.
Implements Ogre::RenderSystem.
|
overridevirtual |
Returns the horizontal texel offset value required for mapping texel origins to pixel origins in this rendersystem.
Implements Ogre::RenderSystem.
|
overridevirtual |
Gets the maximum (farthest) depth value to be used when rendering using identity transforms.
Implements Ogre::RenderSystem.
|
overridevirtual |
Gets the minimum (closest) depth value to be used when rendering using identity transforms.
Implements Ogre::RenderSystem.
|
overridevirtual |
Returns the name of the rendering system.
Implements Ogre::RenderSystem.
|
overridevirtual |
Number of priority config options in RenderSystem::getPriorityConfigOption.
Therefore a proper loop would call getNumPriorityConfigOptions on every iteration:
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Some options depend on other options.
Therefore it's best to call RenderSystem::setConfigOption in order
idx | Value must be in range [0; getNumPriorityConfigOptions) |
Options must be set in ascending order, i.e. idx = 0 must be called before idx = 1
Reimplemented from Ogre::RenderSystem.
bool Ogre::VulkanRenderSystem::getSwappyFramePacing | ( | ) | const |
ANDROID ONLY: Whether Swappy is enabled. See setSwappyFramePacing().
|
overridevirtual |
Returns the vertical texel offset value required for mapping texel origins to pixel origins in this rendersystem.
Implements Ogre::RenderSystem.
|
inline |
const FastArray<VulkanPhysicalDevice>& Ogre::VulkanRenderSystem::getVulkanPhysicalDevices | ( | ) | const |
void Ogre::VulkanRenderSystem::handleDeviceLost | ( | ) |
|
inlineoverridevirtual |
Determines if the system has anisotropic mip map filter support.
Implements Ogre::RenderSystem.
void Ogre::VulkanRenderSystem::initConfigOptions | ( | ) |
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Initialize the render system from the capabilities.
Implements Ogre::RenderSystem.
|
overridevirtual |
Returns true if 'a' and 'b' internally map to the same layout and should be considered equivalent for a given texture.
bIsDebugCheck | When true, we're calling this as a consistency check (e.g. asserts if layouts changed externally outside the BarrierSolver). Non-explicit APIs may return too many false negatives triggering the assert, thus this flag prevents false crashes |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Loads the pipeline cache from disk.
stream | The source stream, optional, starts with struct PipelineCachePrefixHeader |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Marks an instantaneous event for graphics profilers.
This is equivalent to calling beginProfileEvent() and endProfileEvent() back to back.
Implements Ogre::RenderSystem.
void Ogre::VulkanRenderSystem::notifyRenderTextureNonResident | ( | VulkanTextureGpu * | texture | ) |
void Ogre::VulkanRenderSystem::notifySwapchainCreated | ( | VulkanWindow * | window | ) |
void Ogre::VulkanRenderSystem::notifySwapchainDestroyed | ( | VulkanWindow * | window | ) |
|
overridevirtual |
Implements Ogre::RenderSystem.
|
overridevirtual |
Tell the rendersystem to perform any prep tasks it needs to directly before other threads which might access the rendering API are registered.
Implements Ogre::RenderSystem.
|
overridevirtual |
Register the an additional thread which may make calls to rendersystem-related objects.
Implements Ogre::RenderSystem.
|
overridevirtual |
Restart the renderer (normally following a change in settings).
Implements Ogre::RenderSystem.
void Ogre::VulkanRenderSystem::resetAllBindings | ( | ) |
|
overridevirtual |
Saves the pipeline cache to disk.
stream | The destination stream |
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Internal method used to set the underlying clip planes when needed.
Implements Ogre::RenderSystem.
|
overridevirtual |
Sets an option for this API.
name | The name of the option to alter. |
value | The value to set the option to. |
Implements Ogre::RenderSystem.
|
overridevirtual |
This method allows you to set all the stencil buffer parameters in one call.
(Reference Value & Mask) CompareFunction (Stencil Buffer Value & Mask)The result of this will cause one of 3 actions depending on whether the test fails, succeeds but with the depth buffer check still failing, or succeeds with the depth buffer check passing too.
refValue | The reference value used in the comparison (dynamic) |
stencilParams | The static parameters that involve more expensive state changes. Ogre dev implementors note: Should check if the stencilParams are different from before |
Reimplemented from Ogre::RenderSystem.
void Ogre::VulkanRenderSystem::setSwappyFramePacing | ( | bool | bEnable, |
Window * | callingWindow = 0 |
||
) |
ANDROID ONLY: Whether to enable/disable Swappy frame pacing.
It may be disabled by OgreNext if Swappy is causing bugs on the current device.
Users can cache the value of getSwappyFramePacing() on shutdown to force-disable on the next run.
This call is ignored in other platforms.
bEnable | Whether to enable or disable. |
callingWindow | For internal use. Leave this set as nullptr. |
|
overridevirtual |
Shutdown the renderer and cleanup resources.
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Returns true if RenderSystem supports multithreaded shader and PSO compilation.
Support depends on the API, our implementation, and CMake setting OGRE_SHADER_COMPILATION_THREADING_MODE with which OgreNext was built.
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Unregister an additional thread which may make calls to rendersystem-related objects.
Implements Ogre::RenderSystem.
|
overridevirtual |
Validates the options set for the rendering system, returning a message if there are problems.
Implements Ogre::RenderSystem.
|
overridevirtual |
Some render systems have moments when GPU device is temporarily unavailable, for example when D3D11 device is lost, or when iOS app is in background, etc.
Reimplemented from Ogre::RenderSystem.
|
overridevirtual |
Returns supported sample description for requested FSAA mode, with graceful downgrading.
sampleDesc | Reqiested sample description. |
format | Use PF_NULL returns to query support for framebuffer-less rendering. |
textureFlags | See TextureFlags::TextureFlags. Relevant flags are: NotTexture RenderToTexture Uav RenderWindowSpecific |
Reimplemented from Ogre::RenderSystem.