Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::GFXDevice Class Referencefinal

Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU. More...

#include <GFXDevice.h>

+ Inheritance diagram for Divide::GFXDevice:

Classes

struct  GFXBuffers
 
struct  GFXDescriptorSet
 
struct  ScreenTargets
 

Public Types

using GFXDescriptorSets = std::array< GFXDescriptorSet, to_base(DescriptorSetUsage::COUNT)>
 

Public Member Functions

 GFXDevice (PlatformContext &context)
 
 ~GFXDevice () override
 
ErrorCode initRenderingAPI (I32 argc, char **argv, RenderAPI API)
 
ErrorCode postInitRenderingAPI (vec2< U16 > renderResolution)
 
void closeRenderingAPI ()
 Revert everything that was set up in initRenderingAPI()
 
void idle (bool fast, U64 deltaTimeUSGame, U64 deltaTimeUSApp)
 After a swap buffer call, the CPU may be idle waiting for the GPU to draw to the screen, so we try to do some processing.
 
void flushCommandBuffer (Handle< GFX::CommandBuffer > &&commandBuffer)
 
void debugDraw (const SceneRenderState &sceneRenderState, GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut)
 Render all of our immediate mode primitives. This isn't very optimised and most are recreated per frame!
 
void debugDrawLines (const I64 ID, IM::LineDescriptor descriptor) noexcept
 
void debugDrawBox (const I64 ID, IM::BoxDescriptor descriptor) noexcept
 
void debugDrawOBB (const I64 ID, IM::OBBDescriptor descriptor) noexcept
 
void debugDrawSphere (const I64 ID, IM::SphereDescriptor descriptor) noexcept
 
void debugDrawCone (const I64 ID, IM::ConeDescriptor descriptor) noexcept
 
void debugDrawFrustum (const I64 ID, IM::FrustumDescriptor descriptor) noexcept
 
void validateAndUploadDescriptorSets ()
 
void generateCubeMap (RenderPassParams &params, U16 arrayOffset, const vec3< F32 > &pos, vec2< F32 > zPlanes, GFX::CommandBuffer &commandsInOut, GFX::MemoryBarrierCommand &memCmdInOut, mat4< F32 > *viewProjectionOut=nullptr)
 Generate a cube texture and store it in the provided RenderTarget.
 
void generateDualParaboloidMap (RenderPassParams &params, U16 arrayOffset, const vec3< F32 > &pos, vec2< F32 > zPlanes, GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut, mat4< F32 > *viewProjectionOut=nullptr)
 
const GFXShaderData::CamDatacameraData () const noexcept
 
const GFXShaderData::PrevFrameDatapreviousFrameData (PlayerIndex player) const noexcept
 
bool setViewport (const Rect< I32 > &viewport)
 Returns true if the viewport was changed.
 
bool setViewport (I32 x, I32 y, I32 width, I32 height)
 
bool setScissor (const Rect< I32 > &scissor)
 
bool setScissor (I32 x, I32 y, I32 width, I32 height)
 
void setDepthRange (vec2< F32 > depthRange)
 
void setPreviousViewProjectionMatrix (PlayerIndex player, const mat4< F32 > &prevViewMatrix, const mat4< F32 > prevProjectionMatrix)
 
void setCameraSnapshot (PlayerIndex index, const CameraSnapshot &snapshot) noexcept
 
CameraSnapshotgetCameraSnapshot (PlayerIndex index) noexcept
 
const CameraSnapshotgetCameraSnapshot (PlayerIndex index) const noexcept
 
F32 renderingAspectRatio () const noexcept
 
vec2< U16renderingResolution () const noexcept
 
void setScreenMSAASampleCount (U8 sampleCount)
 
void setShadowMSAASampleCount (ShadowType type, U8 sampleCount)
 
void screenshot (std::string_view fileName, GFX::CommandBuffer &bufferInOut) const
 Save a screenshot in TGA format.
 
ShaderComputeQueueshaderComputeQueue () noexcept
 
const ShaderComputeQueueshaderComputeQueue () const noexcept
 
RenderergetRenderer () const
 
const RenderStateBlockgetNoDepthTestBlock () const noexcept
 returns the standard state block
 
const RenderStateBlockget2DStateBlock () const noexcept
 
GFXRTPoolrenderTargetPool () noexcept
 
const GFXRTPoolrenderTargetPool () const noexcept
 
Handle< ShaderProgramgetRTPreviewShader (bool depthOnly) const noexcept
 
void registerDrawCall () noexcept
 
void registerDrawCalls (U32 count) noexcept
 
DebugViewaddDebugView (const std::shared_ptr< DebugView > &view)
 
bool removeDebugView (DebugView *view)
 
void toggleDebugView (I16 index, bool state)
 
void toggleDebugGroup (I16 groupID, bool state)
 
void getDebugViewNames (vector< std::tuple< string, I16, I16, bool > > &namesOut)
 
bool getDebugGroupState (I16 groupID) const
 
PerformanceMetricsgetPerformanceMetrics () noexcept
 
const PerformanceMetricsgetPerformanceMetrics () const noexcept
 
void onThreadCreated (const std::thread::id &threadID, bool isMainRenderThread) const
 
RenderTarget_uptr newRT (const RenderTargetDescriptor &descriptor)
 Create and return a new framebuffer.
 
IMPrimitivenewIMP (std::string_view name)
 Create and return a new immediate mode emulation primitive.
 
bool destroyIMP (IMPrimitive *&primitive)
 
VertexBuffer_ptr newVB (const VertexBuffer::Descriptor &descriptor)
 Create and return a new vertex array (VAO + VB + IB).
 
GenericVertexData_ptr newGVD (U32 ringBufferLength, std::string_view name)
 
ShaderBuffer_uptr newSB (const ShaderBufferDescriptor &descriptor)
 
PipelinenewPipeline (const PipelineDescriptor &descriptor)
 Create and return a new graphics pipeline. This is only used for caching and doesn't use the object arena.
 
void drawTextureInViewport (const ImageView &texture, SamplerDescriptor sampler, const Rect< I32 > &viewport, bool convertToSrgb, bool drawToDepthOnly, bool drawBlend, GFX::CommandBuffer &bufferInOut)
 
void blurTarget (RenderTargetHandle &blurSource, RenderTargetHandle &blurBuffer, const RenderTargetHandle &blurTarget, RTAttachmentType att, RTColourAttachmentSlot slot, I32 kernelSize, bool gaussian, U8 layerCount, GFX::CommandBuffer &bufferInOut)
 
void updateSceneDescriptorSet (GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut) const
 
GFXDescriptorSetdescriptorSet (DescriptorSetUsage usage) noexcept
 
const GFXDescriptorSetdescriptorSet (DescriptorSetUsage usage) const noexcept
 
 PROPERTY_RW (MaterialDebugFlag, materialDebugFlag, MaterialDebugFlag::COUNT)
 
 PROPERTY_RW (RenderAPI, renderAPI, RenderAPI::COUNT)
 
 PROPERTY_RW (bool, queryPerformanceStats, false)
 
 PROPERTY_RW (bool, enableOcclusionCulling, true)
 
 PROPERTY_R_IW (U32, frameDrawCalls, 0u)
 
 PROPERTY_R_IW (U32, frameDrawCallsPrev, 0u)
 
 PROPERTY_R_IW (vec4< U32 >, lastCullCount, VECTOR4_ZERO)
 X = culled items HiZ, Y = culled items overflow, Z = baseInstance == 0 count, W = skipped cull count.
 
 PROPERTY_R_IW (Rect< I32 >, activeViewport, UNIT_VIEWPORT)
 
 PROPERTY_R_IW (Rect< I32 >, activeScissor, UNIT_VIEWPORT)
 
 PROPERTY_R (std::unique_ptr< SceneShaderData >, sceneData)
 
 PROPERTY_R (ImShaders_uptr, imShaders)
 
bool framePreRender (const FrameEvent &evt) override
 framePreRenderStarted is called when we need to start processing the visual aspect of a scene
 
bool frameStarted (const FrameEvent &evt) override
 
bool frameEnded (const FrameEvent &evt) noexcept override
 frameEnded is called after the buffers have been swapped
 
- Public Member Functions inherited from Divide::PlatformContextComponent
 PlatformContextComponent (PlatformContext &context) noexcept
 
virtual ~PlatformContextComponent ()=default
 
PlatformContextcontext () noexcept
 
const PlatformContextcontext () const noexcept
 
- Public Member Functions inherited from Divide::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=default
 
NonCopyableoperator= (NonCopyable &&)=default
 
- Public Member Functions inherited from Divide::FrameListener
 FrameListener (const Str< 64 > &name, FrameListenerManager &parent, U32 callOrder)
 Either give it a name.
 
virtual ~FrameListener () override
 
bool operator< (FrameListener &that) const noexcept
 
- Public Member Functions inherited from Divide::GUIDWrapper
 GUIDWrapper () noexcept
 
 GUIDWrapper (const GUIDWrapper &old) noexcept
 
 GUIDWrapper (GUIDWrapper &&old) noexcept
 
virtual ~GUIDWrapper ()=default
 
FORCE_INLINE I64 getGUID () const noexcept
 
GUIDWrapperoperator= (const GUIDWrapper &old)=delete
 
GUIDWrapperoperator= (GUIDWrapper &&other)=delete
 

Static Public Member Functions

static void FrameInterpolationFactor (const D64 interpolation) noexcept
 
static D64 FrameInterpolationFactor () noexcept
 
static U64 FrameCount () noexcept
 
static const DeviceInformationGetDeviceInformation () noexcept
 
static void OverrideDeviceInformation (const DeviceInformation &info) noexcept
 
static bool IsSubmitCommand (GFX::CommandType type) noexcept
 
- Static Public Member Functions inherited from Divide::GUIDWrapper
static I64 generateGUID () noexcept
 

Protected Member Functions

void update (U64 deltaTimeUSFixed, U64 deltaTimeUSApp)
 
ErrorCode initDescriptorSets ()
 
void setScreenMSAASampleCountInternal (U8 sampleCount)
 
void setShadowMSAASampleCountInternal (ShadowType type, U8 sampleCount)
 
bool fitViewportInWindow (U16 w, U16 h)
 
void drawToWindow (DisplayWindow &window)
 
void flushWindow (DisplayWindow &window)
 
void onWindowSizeChange (const SizeChangeParams &params)
 The main entry point for any resolution change request.
 
void onResolutionChange (const SizeChangeParams &params)
 
void initDebugViews ()
 
void renderDebugViews (Rect< I32 > targetViewport, I32 padding, GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut)
 
void flushCommandBufferInternal (Handle< GFX::CommandBuffer > commandBuffer)
 
PipelineDescriptorgetDebugPipeline (const IM::BaseDescriptor &descriptor) noexcept
 
void debugDrawLines (GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut)
 
void debugDrawBoxes (GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut)
 
void debugDrawOBBs (GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut)
 
void debugDrawCones (GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut)
 
void debugDrawSpheres (GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut)
 
void debugDrawFrustums (GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut)
 
void renderDebugUI (const Rect< I32 > &targetViewport, GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut)
 
void occlusionCull (const RenderPass::PassData &passData, Handle< Texture > hizBuffer, SamplerDescriptor sampler, const CameraSnapshot &cameraSnapshot, bool countCulledNodes, GFX::CommandBuffer &bufferInOut)
 
std::pair< Handle< Texture >, SamplerDescriptorconstructHIZ (RenderTargetID depthBuffer, RenderTargetID HiZTarget, GFX::CommandBuffer &cmdBufferInOut)
 
RenderAPIWrappergetAPIImpl ()
 
const RenderAPIWrappergetAPIImpl () const
 
- Protected Member Functions inherited from Divide::NonCopyable
 NonCopyable ()=default
 
 ~NonCopyable ()=default
 
- Protected Member Functions inherited from Divide::FrameListener
void setCallOrder (const U32 order) noexcept
 
virtual bool frameStarted (const FrameEvent &evt)
 
virtual bool framePreRender (const FrameEvent &evt)
 framePreRenderStarted is called when we need to start processing the visual aspect of a scene
 
virtual bool frameSceneRenderStarted (const FrameEvent &evt)
 frameSceneRenderStarted is called right before rendering the scene for the current player starts
 
virtual bool frameSceneRenderEnded (const FrameEvent &evt)
 frameSceneRenderEnded is called immediately after scene rendering for the current player has ended but before any blitting operations
 
virtual bool frameRenderingQueued (const FrameEvent &evt)
 
virtual bool framePostRender (const FrameEvent &evt)
 
virtual bool frameEnded (const FrameEvent &evt)
 frameEnded is called after the buffers have been swapped
 
 PROPERTY_R_IW (bool, enabled, false)
 
 PROPERTY_RW (Str< 64 >, name)
 

Private Types

using IMPrimitivePool = MemoryPool< IMPrimitive, 1<< 15 >
 

Private Member Functions

bool uploadGPUBlock ()
 Upload draw related data to the GPU (view & projection matrices, viewport settings, etc)
 
void resizeGPUBlocks (size_t targetSizeCam, size_t targetSizeCullCounter)
 
void setClipPlanes (const FrustumClipPlanes &clipPlanes)
 set a new list of clipping planes. The old one is discarded
 
void renderFromCamera (const CameraSnapshot &cameraSnapshot)
 
void shadowingSettings (const F32 lightBleedBias, const F32 minShadowVariance) noexcept
 
void worldAOViewProjectionMatrix (const mat4< F32 > &vpMatrix) noexcept
 
ErrorCode createAPIInstance (RenderAPI api)
 
void renderThread ()
 
void addRenderWork (DELEGATE< void > &&work)
 

Private Attributes

RenderAPIWrapper_uptr _api
 
Renderer_uptr _renderer
 
std::unique_ptr< ShaderComputeQueue_shaderComputeQueue
 
DebugPrimitiveHandler< IM::LineDescriptor, 16u > _debugLines
 
DebugPrimitiveHandler< IM::BoxDescriptor, 16u > _debugBoxes
 
DebugPrimitiveHandler< IM::OBBDescriptor, 16u > _debugOBBs
 
DebugPrimitiveHandler< IM::SphereDescriptor, 16u > _debugSpheres
 
DebugPrimitiveHandler< IM::ConeDescriptor, 16u > _debugCones
 
DebugPrimitiveHandler< IM::FrustumDescriptor, 8u > _debugFrustums
 
CameraSnapshot _activeCameraSnapshot
 
std::unique_ptr< GFXRTPool_rtPool
 
U8 _queuedScreenSampleChange = s_invalidQueueSampleCount
 
std::array< U8, to_base(ShadowType::COUNT)> _queuedShadowSampleChange
 
RenderStateBlock _defaultStateNoDepthTest {}
 The default render state but with depth testing disabled.
 
RenderStateBlock _state2DRendering {}
 Special render state for 2D rendering.
 
RenderStateBlock _stateDepthOnlyRendering {}
 
FrustumClipPlanes _clippingPlanes
 The interpolation factor between the current and the last frame.
 
Handle< ShaderProgram_previewDepthMapShader = INVALID_HANDLE<ShaderProgram>
 shader used to preview the depth buffer
 
Handle< ShaderProgram_previewRenderTargetColour = INVALID_HANDLE<ShaderProgram>
 
Handle< ShaderProgram_previewRenderTargetDepth = INVALID_HANDLE<ShaderProgram>
 
Handle< ShaderProgram_renderTargetDraw = INVALID_HANDLE<ShaderProgram>
 
Handle< ShaderProgram_hIZConstructProgram = INVALID_HANDLE<ShaderProgram>
 
Handle< ShaderProgram_hIZCullProgram = INVALID_HANDLE<ShaderProgram>
 
Handle< ShaderProgram_displayShader = INVALID_HANDLE<ShaderProgram>
 
Handle< ShaderProgram_depthShader = INVALID_HANDLE<ShaderProgram>
 
Handle< ShaderProgram_blurBoxShaderSingle = INVALID_HANDLE<ShaderProgram>
 
Handle< ShaderProgram_blurBoxShaderLayered = INVALID_HANDLE<ShaderProgram>
 
Handle< ShaderProgram_blurGaussianShaderSingle = INVALID_HANDLE<ShaderProgram>
 
Handle< ShaderProgram_blurGaussianShaderLayered = INVALID_HANDLE<ShaderProgram>
 
Pipeline_hIZPipeline = nullptr
 
Pipeline_hIZCullPipeline = nullptr
 
PipelineDescriptor _debugGizmoPipeline
 
PipelineDescriptor _debugGizmoPipelineNoDepth
 
PipelineDescriptor _debugGizmoPipelineNoCull
 
PipelineDescriptor _debugGizmoPipelineNoCullNoDepth
 
GFX::BindPipelineCommand _drawFSTexturePipelineCmd
 
GFX::BindPipelineCommand _drawFSTexturePipelineBlendCmd
 
GFX::BindPipelineCommand _drawFSDepthPipelineCmd
 
GFX::BindPipelineCommand _blurBoxPipelineSingleCmd
 
GFX::BindPipelineCommand _blurBoxPipelineLayeredCmd
 
GFX::BindPipelineCommand _blurGaussianPipelineSingleCmd
 
GFX::BindPipelineCommand _blurGaussianPipelineLayeredCmd
 
GFXDescriptorSets _descriptorSets
 
Mutex _graphicsResourceMutex
 
vector< std::tuple< GraphicsResource::Type, I64, U64 > > _graphicResources
 
vec2< U16_renderingResolution
 
GFXShaderData _gpuBlock
 
Mutex _debugViewLock
 
vector< DebugView_ptr > _debugViews
 
Mutex _queuedCommandbufferLock
 
struct Divide::GFXDevice::GFXBuffers _gfxBuffers
 
Mutex _pipelineCacheLock
 
hashMap< size_t, Pipeline, NoHash< size_t > > _pipelineCache
 
std::stack< CameraSnapshot, eastl::fixed_vector< CameraSnapshot, MAX_CAMERA_SNAPSHOTS, false > > _cameraSnapshots
 
std::array< CameraSnapshot, Config::MAX_LOCAL_PLAYER_COUNT_cameraSnapshotHistory
 
std::stack< Rect< I32 > > _viewportStack
 
Mutex _imprimitiveMutex
 
PerformanceMetrics _performanceMetrics {}
 

Static Private Attributes

static constexpr U8 s_invalidQueueSampleCount = 255u
 
static constexpr U8 MAX_CAMERA_SNAPSHOTS = 32u
 
static IMPrimitivePool s_IMPrimitivePool {}
 
static D64 s_interpolationFactor = 1.0
 
static U64 s_frameCount = 0u
 
static DeviceInformation s_deviceInformation {}
 

Friends

class Attorney::GFXDeviceAPI
 
class Attorney::GFXDeviceKernel
 
class Attorney::GFXDeviceGraphicsResource
 
class Attorney::GFXDeviceGFXRTPool
 
class Attorney::GFXDeviceShaderProgram
 
class Attorney::GFXDeviceShadowMap
 
class Attorney::GFXDeviceWindowManager
 
class Attorney::GFXDeviceProjectManager
 
class RenderPassManager
 
class RenderPass
 
class RenderPassExecutor
 

Additional Inherited Members

- Protected Attributes inherited from Divide::PlatformContextComponent
PlatformContext_context
 
- Protected Attributes inherited from Divide::GUIDWrapper
const I64 _guid
 

Detailed Description

Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU.

Definition at line 214 of file GFXDevice.h.

Member Typedef Documentation

◆ GFXDescriptorSets

◆ IMPrimitivePool

using Divide::GFXDevice::IMPrimitivePool = MemoryPool<IMPrimitive, 1 << 15>
private

Definition at line 574 of file GFXDevice.h.

Constructor & Destructor Documentation

◆ GFXDevice()

Divide::GFXDevice::GFXDevice ( PlatformContext context)
explicit

Definition at line 320 of file GFXDevice.cpp.

◆ ~GFXDevice()

Divide::GFXDevice::~GFXDevice ( )
override

Definition at line 327 of file GFXDevice.cpp.

Member Function Documentation

◆ addDebugView()

DebugView * Divide::GFXDevice::addDebugView ( const std::shared_ptr< DebugView > &  view)

Definition at line 2740 of file GFXDevice.cpp.

◆ addRenderWork()

void Divide::GFXDevice::addRenderWork ( DELEGATE< void > &&  work)
private

Definition at line 515 of file GFXDevice.cpp.

◆ blurTarget()

void Divide::GFXDevice::blurTarget ( RenderTargetHandle blurSource,
RenderTargetHandle blurBuffer,
const RenderTargetHandle blurTarget,
RTAttachmentType  att,
RTColourAttachmentSlot  slot,
I32  kernelSize,
bool  gaussian,
U8  layerCount,
GFX::CommandBuffer bufferInOut 
)
Parameters
blurTargetcan be the same as source

Definition at line 1642 of file GFXDevice.cpp.

◆ cameraData()

const GFXShaderData::CamData & Divide::GFXDevice::cameraData ( ) const
noexcept

Definition at line 2078 of file GFXDevice.cpp.

◆ closeRenderingAPI()

void Divide::GFXDevice::closeRenderingAPI ( )

Revert everything that was set up in initRenderingAPI()

Definition at line 1228 of file GFXDevice.cpp.

◆ constructHIZ()

std::pair< Handle< Texture >, SamplerDescriptor > Divide::GFXDevice::constructHIZ ( RenderTargetID  depthBuffer,
RenderTargetID  HiZTarget,
GFX::CommandBuffer cmdBufferInOut 
)
protected

Transform our depth buffer to a HierarchicalZ buffer (for occlusion queries and screen space reflections) Based on RasterGrid implementation: http://rastergrid.com/blog/2010/10/hierarchical-z-map-based-occlusion-culling/ Modified with nVidia sample code: https://github.com/nvpro-samples/gl_occlusion_culling

Definition at line 2272 of file GFXDevice.cpp.

◆ createAPIInstance()

ErrorCode Divide::GFXDevice::createAPIInstance ( RenderAPI  api)
private

Definition at line 332 of file GFXDevice.cpp.

◆ debugDraw()

void Divide::GFXDevice::debugDraw ( const SceneRenderState sceneRenderState,
GFX::CommandBuffer bufferInOut,
GFX::MemoryBarrierCommand memCmdInOut 
)

Render all of our immediate mode primitives. This isn't very optimised and most are recreated per frame!

Definition at line 3029 of file GFXDevice.cpp.

◆ debugDrawBox()

void Divide::GFXDevice::debugDrawBox ( const I64  ID,
IM::BoxDescriptor  descriptor 
)
noexcept

Definition at line 2877 of file GFXDevice.cpp.

◆ debugDrawBoxes()

void Divide::GFXDevice::debugDrawBoxes ( GFX::CommandBuffer bufferInOut,
GFX::MemoryBarrierCommand memCmdInOut 
)
protected

Definition at line 2882 of file GFXDevice.cpp.

◆ debugDrawCone()

void Divide::GFXDevice::debugDrawCone ( const I64  ID,
IM::ConeDescriptor  descriptor 
)
noexcept

Definition at line 2966 of file GFXDevice.cpp.

◆ debugDrawCones()

void Divide::GFXDevice::debugDrawCones ( GFX::CommandBuffer bufferInOut,
GFX::MemoryBarrierCommand memCmdInOut 
)
protected

Definition at line 2971 of file GFXDevice.cpp.

◆ debugDrawFrustum()

void Divide::GFXDevice::debugDrawFrustum ( const I64  ID,
IM::FrustumDescriptor  descriptor 
)
noexcept

Definition at line 2997 of file GFXDevice.cpp.

◆ debugDrawFrustums()

void Divide::GFXDevice::debugDrawFrustums ( GFX::CommandBuffer bufferInOut,
GFX::MemoryBarrierCommand memCmdInOut 
)
protected

Definition at line 3002 of file GFXDevice.cpp.

◆ debugDrawLines() [1/2]

void Divide::GFXDevice::debugDrawLines ( const I64  ID,
IM::LineDescriptor  descriptor 
)
noexcept

Definition at line 2846 of file GFXDevice.cpp.

◆ debugDrawLines() [2/2]

void Divide::GFXDevice::debugDrawLines ( GFX::CommandBuffer bufferInOut,
GFX::MemoryBarrierCommand memCmdInOut 
)
protected

Definition at line 2851 of file GFXDevice.cpp.

◆ debugDrawOBB()

void Divide::GFXDevice::debugDrawOBB ( const I64  ID,
IM::OBBDescriptor  descriptor 
)
noexcept

Definition at line 2907 of file GFXDevice.cpp.

◆ debugDrawOBBs()

void Divide::GFXDevice::debugDrawOBBs ( GFX::CommandBuffer bufferInOut,
GFX::MemoryBarrierCommand memCmdInOut 
)
protected

Definition at line 2912 of file GFXDevice.cpp.

◆ debugDrawSphere()

void Divide::GFXDevice::debugDrawSphere ( const I64  ID,
IM::SphereDescriptor  descriptor 
)
noexcept

Definition at line 2936 of file GFXDevice.cpp.

◆ debugDrawSpheres()

void Divide::GFXDevice::debugDrawSpheres ( GFX::CommandBuffer bufferInOut,
GFX::MemoryBarrierCommand memCmdInOut 
)
protected

Definition at line 2941 of file GFXDevice.cpp.

◆ descriptorSet() [1/2]

const GFXDevice::GFXDescriptorSet & Divide::GFXDevice::descriptorSet ( DescriptorSetUsage  usage) const
inlinenoexcept

Definition at line 209 of file GFXDevice.inl.

◆ descriptorSet() [2/2]

GFXDevice::GFXDescriptorSet & Divide::GFXDevice::descriptorSet ( DescriptorSetUsage  usage)
inlinenoexcept

Definition at line 204 of file GFXDevice.inl.

◆ destroyIMP()

bool Divide::GFXDevice::destroyIMP ( IMPrimitive *&  primitive)

Definition at line 3061 of file GFXDevice.cpp.

◆ drawTextureInViewport()

void Divide::GFXDevice::drawTextureInViewport ( const ImageView texture,
SamplerDescriptor  sampler,
const Rect< I32 > &  viewport,
bool  convertToSrgb,
bool  drawToDepthOnly,
bool  drawBlend,
GFX::CommandBuffer bufferInOut 
)

Definition at line 2435 of file GFXDevice.cpp.

◆ drawToWindow()

void Divide::GFXDevice::drawToWindow ( DisplayWindow window)
protected

Definition at line 1336 of file GFXDevice.cpp.

◆ fitViewportInWindow()

bool Divide::GFXDevice::fitViewportInWindow ( U16  w,
U16  h 
)
protected

Definition at line 1832 of file GFXDevice.cpp.

◆ flushCommandBuffer()

void Divide::GFXDevice::flushCommandBuffer ( Handle< GFX::CommandBuffer > &&  commandBuffer)

Definition at line 2120 of file GFXDevice.cpp.

◆ flushCommandBufferInternal()

void Divide::GFXDevice::flushCommandBufferInternal ( Handle< GFX::CommandBuffer commandBuffer)
protected

Definition at line 2129 of file GFXDevice.cpp.

◆ flushWindow()

void Divide::GFXDevice::flushWindow ( DisplayWindow window)
protected

Definition at line 1345 of file GFXDevice.cpp.

◆ FrameCount()

static U64 Divide::GFXDevice::FrameCount ( )
inlinestaticnoexcept

Definition at line 340 of file GFXDevice.h.

◆ frameEnded()

bool Divide::GFXDevice::frameEnded ( const FrameEvent evt)
overridevirtualnoexcept

frameEnded is called after the buffers have been swapped

Reimplemented from Divide::FrameListener.

Definition at line 1403 of file GFXDevice.cpp.

◆ FrameInterpolationFactor() [1/2]

static D64 Divide::GFXDevice::FrameInterpolationFactor ( )
inlinestaticnoexcept

Definition at line 339 of file GFXDevice.h.

◆ FrameInterpolationFactor() [2/2]

static void Divide::GFXDevice::FrameInterpolationFactor ( const D64  interpolation)
inlinestaticnoexcept

Definition at line 338 of file GFXDevice.h.

◆ framePreRender()

bool Divide::GFXDevice::framePreRender ( const FrameEvent evt)
overridevirtual

framePreRenderStarted is called when we need to start processing the visual aspect of a scene

Reimplemented from Divide::FrameListener.

Definition at line 1366 of file GFXDevice.cpp.

◆ frameStarted()

bool Divide::GFXDevice::frameStarted ( const FrameEvent evt)
overridevirtual

Adapter patern instead of pure interface for the same reason as the Ogre boys pointed out: Implement what you need without filling classes with dummy functions frameStarted is calld at the beggining of a new frame before processing the logic aspect of a scene

Reimplemented from Divide::FrameListener.

Definition at line 1371 of file GFXDevice.cpp.

◆ generateCubeMap()

void Divide::GFXDevice::generateCubeMap ( RenderPassParams params,
U16  arrayOffset,
const vec3< F32 > &  pos,
vec2< F32 zPlanes,
GFX::CommandBuffer commandsInOut,
GFX::MemoryBarrierCommand memCmdInOut,
mat4< F32 > *  viewProjectionOut = nullptr 
)

Generate a cube texture and store it in the provided RenderTarget.

Generate a cubemap from the given position It renders the entire scene graph (with culling) as default use the callback param to override the draw function

Definition at line 1501 of file GFXDevice.cpp.

◆ generateDualParaboloidMap()

void Divide::GFXDevice::generateDualParaboloidMap ( RenderPassParams params,
U16  arrayOffset,
const vec3< F32 > &  pos,
vec2< F32 zPlanes,
GFX::CommandBuffer bufferInOut,
GFX::MemoryBarrierCommand memCmdInOut,
mat4< F32 > *  viewProjectionOut = nullptr 
)

Definition at line 1573 of file GFXDevice.cpp.

◆ get2DStateBlock()

const RenderStateBlock & Divide::GFXDevice::get2DStateBlock ( ) const
inlinenoexcept

Definition at line 123 of file GFXDevice.inl.

◆ getAPIImpl() [1/2]

RenderAPIWrapper & Divide::GFXDevice::getAPIImpl ( )
inlineprotected

Definition at line 450 of file GFXDevice.h.

◆ getAPIImpl() [2/2]

const RenderAPIWrapper & Divide::GFXDevice::getAPIImpl ( ) const
inlineprotected

Definition at line 451 of file GFXDevice.h.

◆ getCameraSnapshot() [1/2]

const CameraSnapshot & Divide::GFXDevice::getCameraSnapshot ( PlayerIndex  index) const
noexcept

Definition at line 2073 of file GFXDevice.cpp.

◆ getCameraSnapshot() [2/2]

CameraSnapshot & Divide::GFXDevice::getCameraSnapshot ( PlayerIndex  index)
noexcept

Definition at line 2068 of file GFXDevice.cpp.

◆ getDebugGroupState()

bool Divide::GFXDevice::getDebugGroupState ( I16  groupID) const

Definition at line 2804 of file GFXDevice.cpp.

◆ getDebugPipeline()

PipelineDescriptor & Divide::GFXDevice::getDebugPipeline ( const IM::BaseDescriptor descriptor)
protectednoexcept

Definition at line 2832 of file GFXDevice.cpp.

◆ getDebugViewNames()

void Divide::GFXDevice::getDebugViewNames ( vector< std::tuple< string, I16, I16, bool > > &  namesOut)

Definition at line 2821 of file GFXDevice.cpp.

◆ GetDeviceInformation()

const DeviceInformation & Divide::GFXDevice::GetDeviceInformation ( )
inlinestaticnoexcept

Definition at line 158 of file GFXDevice.inl.

◆ getNoDepthTestBlock()

const RenderStateBlock & Divide::GFXDevice::getNoDepthTestBlock ( ) const
inlinenoexcept

returns the standard state block

Definition at line 128 of file GFXDevice.inl.

◆ getPerformanceMetrics() [1/2]

const PerformanceMetrics & Divide::GFXDevice::getPerformanceMetrics ( ) const
inlinenoexcept

Definition at line 199 of file GFXDevice.inl.

◆ getPerformanceMetrics() [2/2]

PerformanceMetrics & Divide::GFXDevice::getPerformanceMetrics ( )
inlinenoexcept

Definition at line 194 of file GFXDevice.inl.

◆ getRenderer()

Renderer & Divide::GFXDevice::getRenderer ( ) const
inline

Definition at line 117 of file GFXDevice.inl.

◆ getRTPreviewShader()

Handle< ShaderProgram > Divide::GFXDevice::getRTPreviewShader ( bool  depthOnly) const
inlinenoexcept

Definition at line 143 of file GFXDevice.inl.

◆ idle()

void Divide::GFXDevice::idle ( bool  fast,
U64  deltaTimeUSGame,
U64  deltaTimeUSApp 
)

After a swap buffer call, the CPU may be idle waiting for the GPU to draw to the screen, so we try to do some processing.

Definition at line 1318 of file GFXDevice.cpp.

◆ initDebugViews()

void Divide::GFXDevice::initDebugViews ( )
protected

Definition at line 2483 of file GFXDevice.cpp.

◆ initDescriptorSets()

ErrorCode Divide::GFXDevice::initDescriptorSets ( )
protected

Definition at line 222 of file GFXDevice.cpp.

◆ initRenderingAPI()

ErrorCode Divide::GFXDevice::initRenderingAPI ( I32  argc,
char **  argv,
RenderAPI  API 
)

Create a display context using the selected API and create all of the needed primitives needed for frame rendering

Definition at line 364 of file GFXDevice.cpp.

◆ IsSubmitCommand()

bool Divide::GFXDevice::IsSubmitCommand ( GFX::CommandType  type)
inlinestaticnoexcept

Definition at line 168 of file GFXDevice.inl.

◆ newGVD()

GenericVertexData_ptr Divide::GFXDevice::newGVD ( U32  ringBufferLength,
std::string_view  name 
)
inline

Definition at line 219 of file GFXDevice.inl.

◆ newIMP()

IMPrimitive * Divide::GFXDevice::newIMP ( std::string_view  name)

Create and return a new immediate mode emulation primitive.

Definition at line 3055 of file GFXDevice.cpp.

◆ newPipeline()

Pipeline * Divide::GFXDevice::newPipeline ( const PipelineDescriptor descriptor)

Create and return a new graphics pipeline. This is only used for caching and doesn't use the object arena.

Definition at line 3074 of file GFXDevice.cpp.

◆ newRT()

RenderTarget_uptr Divide::GFXDevice::newRT ( const RenderTargetDescriptor descriptor)

Create and return a new framebuffer.

Definition at line 3041 of file GFXDevice.cpp.

◆ newSB()

ShaderBuffer_uptr Divide::GFXDevice::newSB ( const ShaderBufferDescriptor descriptor)
inline

Create and return a new shader buffer. The OpenGL implementation creates either an 'Uniform Buffer Object' if unbound is false or a 'Shader Storage Block Object' otherwise

Definition at line 214 of file GFXDevice.inl.

◆ newVB()

VertexBuffer_ptr Divide::GFXDevice::newVB ( const VertexBuffer::Descriptor descriptor)

Create and return a new vertex array (VAO + VB + IB).

Definition at line 3101 of file GFXDevice.cpp.

◆ occlusionCull()

void Divide::GFXDevice::occlusionCull ( const RenderPass::PassData passData,
Handle< Texture hizBuffer,
SamplerDescriptor  sampler,
const CameraSnapshot cameraSnapshot,
bool  countCulledNodes,
GFX::CommandBuffer bufferInOut 
)
protected

Definition at line 2351 of file GFXDevice.cpp.

◆ onResolutionChange()

void Divide::GFXDevice::onResolutionChange ( const SizeChangeParams params)
protected

Definition at line 1776 of file GFXDevice.cpp.

◆ onThreadCreated()

void Divide::GFXDevice::onThreadCreated ( const std::thread::id &  threadID,
bool  isMainRenderThread 
) const

Definition at line 1309 of file GFXDevice.cpp.

◆ onWindowSizeChange()

void Divide::GFXDevice::onWindowSizeChange ( const SizeChangeParams params)
protected

The main entry point for any resolution change request.

Definition at line 1768 of file GFXDevice.cpp.

◆ OverrideDeviceInformation()

void Divide::GFXDevice::OverrideDeviceInformation ( const DeviceInformation info)
inlinestaticnoexcept

Definition at line 163 of file GFXDevice.inl.

◆ postInitRenderingAPI()

ErrorCode Divide::GFXDevice::postInitRenderingAPI ( vec2< U16 renderResolution)

Definition at line 598 of file GFXDevice.cpp.

◆ previousFrameData()

const GFXShaderData::PrevFrameData & Divide::GFXDevice::previousFrameData ( PlayerIndex  player) const
noexcept

Definition at line 2083 of file GFXDevice.cpp.

◆ PROPERTY_R() [1/2]

Divide::GFXDevice::PROPERTY_R ( ImShaders_uptr  ,
imShaders   
)

◆ PROPERTY_R() [2/2]

Divide::GFXDevice::PROPERTY_R ( std::unique_ptr< SceneShaderData ,
sceneData   
)

◆ PROPERTY_R_IW() [1/5]

Divide::GFXDevice::PROPERTY_R_IW ( Rect< I32 ,
activeScissor  ,
UNIT_VIEWPORT   
)

◆ PROPERTY_R_IW() [2/5]

Divide::GFXDevice::PROPERTY_R_IW ( Rect< I32 ,
activeViewport  ,
UNIT_VIEWPORT   
)

◆ PROPERTY_R_IW() [3/5]

Divide::GFXDevice::PROPERTY_R_IW ( U32  ,
frameDrawCalls  ,
0u   
)

◆ PROPERTY_R_IW() [4/5]

Divide::GFXDevice::PROPERTY_R_IW ( U32  ,
frameDrawCallsPrev  ,
0u   
)

◆ PROPERTY_R_IW() [5/5]

Divide::GFXDevice::PROPERTY_R_IW ( vec4< U32 ,
lastCullCount  ,
VECTOR4_ZERO   
)

X = culled items HiZ, Y = culled items overflow, Z = baseInstance == 0 count, W = skipped cull count.

◆ PROPERTY_RW() [1/4]

Divide::GFXDevice::PROPERTY_RW ( bool  ,
enableOcclusionCulling  ,
true   
)

◆ PROPERTY_RW() [2/4]

Divide::GFXDevice::PROPERTY_RW ( bool  ,
queryPerformanceStats  ,
false   
)

◆ PROPERTY_RW() [3/4]

Divide::GFXDevice::PROPERTY_RW ( MaterialDebugFlag  ,
materialDebugFlag  ,
MaterialDebugFlag::COUNT   
)

◆ PROPERTY_RW() [4/4]

Divide::GFXDevice::PROPERTY_RW ( RenderAPI  ,
renderAPI  ,
RenderAPI::COUNT   
)

◆ registerDrawCall()

void Divide::GFXDevice::registerDrawCall ( )
inlinenoexcept

Definition at line 148 of file GFXDevice.inl.

◆ registerDrawCalls()

void Divide::GFXDevice::registerDrawCalls ( U32  count)
inlinenoexcept

Definition at line 153 of file GFXDevice.inl.

◆ removeDebugView()

bool Divide::GFXDevice::removeDebugView ( DebugView view)

Definition at line 2770 of file GFXDevice.cpp.

◆ renderDebugUI()

void Divide::GFXDevice::renderDebugUI ( const Rect< I32 > &  targetViewport,
GFX::CommandBuffer bufferInOut,
GFX::MemoryBarrierCommand memCmdInOut 
)
protected

Definition at line 2461 of file GFXDevice.cpp.

◆ renderDebugViews()

void Divide::GFXDevice::renderDebugViews ( Rect< I32 targetViewport,
I32  padding,
GFX::CommandBuffer bufferInOut,
GFX::MemoryBarrierCommand memCmdInOut 
)
protected

Definition at line 2628 of file GFXDevice.cpp.

◆ renderFromCamera()

void Divide::GFXDevice::renderFromCamera ( const CameraSnapshot cameraSnapshot)
private

Definition at line 1959 of file GFXDevice.cpp.

◆ renderingAspectRatio()

F32 Divide::GFXDevice::renderingAspectRatio ( ) const
inlinenoexcept

Definition at line 179 of file GFXDevice.inl.

◆ renderingResolution()

vec2< U16 > Divide::GFXDevice::renderingResolution ( ) const
inlinenoexcept

Definition at line 174 of file GFXDevice.inl.

◆ renderTargetPool() [1/2]

const GFXRTPool & Divide::GFXDevice::renderTargetPool ( ) const
inlinenoexcept

Definition at line 138 of file GFXDevice.inl.

◆ renderTargetPool() [2/2]

GFXRTPool & Divide::GFXDevice::renderTargetPool ( )
inlinenoexcept

Definition at line 133 of file GFXDevice.inl.

◆ renderThread()

void Divide::GFXDevice::renderThread ( )
private

Definition at line 491 of file GFXDevice.cpp.

◆ resizeGPUBlocks()

void Divide::GFXDevice::resizeGPUBlocks ( size_t  targetSizeCam,
size_t  targetSizeCullCounter 
)
private

Definition at line 532 of file GFXDevice.cpp.

◆ screenshot()

void Divide::GFXDevice::screenshot ( std::string_view  fileName,
GFX::CommandBuffer bufferInOut 
) const

Save a screenshot in TGA format.

Extract the pixel data from the main render target's first colour attachment and save it as a TGA image.

Definition at line 3120 of file GFXDevice.cpp.

◆ setCameraSnapshot()

void Divide::GFXDevice::setCameraSnapshot ( PlayerIndex  index,
const CameraSnapshot snapshot 
)
noexcept

Definition at line 2063 of file GFXDevice.cpp.

◆ setClipPlanes()

void Divide::GFXDevice::setClipPlanes ( const FrustumClipPlanes clipPlanes)
private

set a new list of clipping planes. The old one is discarded

Definition at line 1922 of file GFXDevice.cpp.

◆ setDepthRange()

void Divide::GFXDevice::setDepthRange ( vec2< F32 depthRange)

Definition at line 1949 of file GFXDevice.cpp.

◆ setPreviousViewProjectionMatrix()

void Divide::GFXDevice::setPreviousViewProjectionMatrix ( PlayerIndex  player,
const mat4< F32 > &  prevViewMatrix,
const mat4< F32 prevProjectionMatrix 
)

Definition at line 2025 of file GFXDevice.cpp.

◆ setScissor() [1/2]

bool Divide::GFXDevice::setScissor ( const Rect< I32 > &  scissor)

Definition at line 2057 of file GFXDevice.cpp.

◆ setScissor() [2/2]

bool Divide::GFXDevice::setScissor ( I32  x,
I32  y,
I32  width,
I32  height 
)
inline

Definition at line 189 of file GFXDevice.inl.

◆ setScreenMSAASampleCount()

void Divide::GFXDevice::setScreenMSAASampleCount ( U8  sampleCount)

Definition at line 1739 of file GFXDevice.cpp.

◆ setScreenMSAASampleCountInternal()

void Divide::GFXDevice::setScreenMSAASampleCountInternal ( U8  sampleCount)
protected

Definition at line 1749 of file GFXDevice.cpp.

◆ setShadowMSAASampleCount()

void Divide::GFXDevice::setShadowMSAASampleCount ( ShadowType  type,
U8  sampleCount 
)

Definition at line 1744 of file GFXDevice.cpp.

◆ setShadowMSAASampleCountInternal()

void Divide::GFXDevice::setShadowMSAASampleCountInternal ( ShadowType  type,
U8  sampleCount 
)
protected

Definition at line 1761 of file GFXDevice.cpp.

◆ setViewport() [1/2]

bool Divide::GFXDevice::setViewport ( const Rect< I32 > &  viewport)

Returns true if the viewport was changed.

Definition at line 2051 of file GFXDevice.cpp.

◆ setViewport() [2/2]

bool Divide::GFXDevice::setViewport ( I32  x,
I32  y,
I32  width,
I32  height 
)
inline

Definition at line 184 of file GFXDevice.inl.

◆ shaderComputeQueue() [1/2]

const ShaderComputeQueue & Divide::GFXDevice::shaderComputeQueue ( ) const
noexcept

Definition at line 3113 of file GFXDevice.cpp.

◆ shaderComputeQueue() [2/2]

ShaderComputeQueue & Divide::GFXDevice::shaderComputeQueue ( )
noexcept

Definition at line 3107 of file GFXDevice.cpp.

◆ shadowingSettings()

void Divide::GFXDevice::shadowingSettings ( const F32  lightBleedBias,
const F32  minShadowVariance 
)
privatenoexcept

Definition at line 2006 of file GFXDevice.cpp.

◆ toggleDebugGroup()

void Divide::GFXDevice::toggleDebugGroup ( I16  groupID,
bool  state 
)

Definition at line 2792 of file GFXDevice.cpp.

◆ toggleDebugView()

void Divide::GFXDevice::toggleDebugView ( I16  index,
bool  state 
)

Definition at line 2779 of file GFXDevice.cpp.

◆ update()

void Divide::GFXDevice::update ( U64  deltaTimeUSFixed,
U64  deltaTimeUSApp 
)
protected

Definition at line 1331 of file GFXDevice.cpp.

◆ updateSceneDescriptorSet()

void Divide::GFXDevice::updateSceneDescriptorSet ( GFX::CommandBuffer bufferInOut,
GFX::MemoryBarrierCommand memCmdInOut 
) const

Definition at line 525 of file GFXDevice.cpp.

◆ uploadGPUBlock()

bool Divide::GFXDevice::uploadGPUBlock ( )
private

Upload draw related data to the GPU (view & projection matrices, viewport settings, etc)

Definition at line 1864 of file GFXDevice.cpp.

◆ validateAndUploadDescriptorSets()

void Divide::GFXDevice::validateAndUploadDescriptorSets ( )

Definition at line 2090 of file GFXDevice.cpp.

◆ worldAOViewProjectionMatrix()

void Divide::GFXDevice::worldAOViewProjectionMatrix ( const mat4< F32 > &  vpMatrix)
privatenoexcept

Definition at line 2018 of file GFXDevice.cpp.

Friends And Related Function Documentation

◆ Attorney::GFXDeviceAPI

friend class Attorney::GFXDeviceAPI
friend

Definition at line 216 of file GFXDevice.h.

◆ Attorney::GFXDeviceGFXRTPool

friend class Attorney::GFXDeviceGFXRTPool
friend

Definition at line 219 of file GFXDevice.h.

◆ Attorney::GFXDeviceGraphicsResource

Definition at line 218 of file GFXDevice.h.

◆ Attorney::GFXDeviceKernel

friend class Attorney::GFXDeviceKernel
friend

Definition at line 217 of file GFXDevice.h.

◆ Attorney::GFXDeviceProjectManager

friend class Attorney::GFXDeviceProjectManager
friend

Definition at line 223 of file GFXDevice.h.

◆ Attorney::GFXDeviceShaderProgram

friend class Attorney::GFXDeviceShaderProgram
friend

Definition at line 220 of file GFXDevice.h.

◆ Attorney::GFXDeviceShadowMap

friend class Attorney::GFXDeviceShadowMap
friend

Definition at line 221 of file GFXDevice.h.

◆ Attorney::GFXDeviceWindowManager

friend class Attorney::GFXDeviceWindowManager
friend

Definition at line 222 of file GFXDevice.h.

◆ RenderPass

friend class RenderPass
friend

Definition at line 437 of file GFXDevice.h.

◆ RenderPassExecutor

friend class RenderPassExecutor
friend

Definition at line 438 of file GFXDevice.h.

◆ RenderPassManager

friend class RenderPassManager
friend

Definition at line 433 of file GFXDevice.h.

Member Data Documentation

◆ _activeCameraSnapshot

CameraSnapshot Divide::GFXDevice::_activeCameraSnapshot
private

Definition at line 480 of file GFXDevice.h.

◆ _api

RenderAPIWrapper_uptr Divide::GFXDevice::_api
private

Definition at line 468 of file GFXDevice.h.

◆ _blurBoxPipelineLayeredCmd

GFX::BindPipelineCommand Divide::GFXDevice::_blurBoxPipelineLayeredCmd
private

Definition at line 520 of file GFXDevice.h.

◆ _blurBoxPipelineSingleCmd

GFX::BindPipelineCommand Divide::GFXDevice::_blurBoxPipelineSingleCmd
private

Definition at line 519 of file GFXDevice.h.

◆ _blurBoxShaderLayered

Handle<ShaderProgram> Divide::GFXDevice::_blurBoxShaderLayered = INVALID_HANDLE<ShaderProgram>
private

Definition at line 505 of file GFXDevice.h.

◆ _blurBoxShaderSingle

Handle<ShaderProgram> Divide::GFXDevice::_blurBoxShaderSingle = INVALID_HANDLE<ShaderProgram>
private

Definition at line 504 of file GFXDevice.h.

◆ _blurGaussianPipelineLayeredCmd

GFX::BindPipelineCommand Divide::GFXDevice::_blurGaussianPipelineLayeredCmd
private

Definition at line 522 of file GFXDevice.h.

◆ _blurGaussianPipelineSingleCmd

GFX::BindPipelineCommand Divide::GFXDevice::_blurGaussianPipelineSingleCmd
private

Definition at line 521 of file GFXDevice.h.

◆ _blurGaussianShaderLayered

Handle<ShaderProgram> Divide::GFXDevice::_blurGaussianShaderLayered = INVALID_HANDLE<ShaderProgram>
private

Definition at line 507 of file GFXDevice.h.

◆ _blurGaussianShaderSingle

Handle<ShaderProgram> Divide::GFXDevice::_blurGaussianShaderSingle = INVALID_HANDLE<ShaderProgram>
private

Definition at line 506 of file GFXDevice.h.

◆ _cameraSnapshotHistory

std::array<CameraSnapshot, Config::MAX_LOCAL_PLAYER_COUNT> Divide::GFXDevice::_cameraSnapshotHistory
private

Definition at line 567 of file GFXDevice.h.

◆ _cameraSnapshots

std::stack<CameraSnapshot, eastl::fixed_vector<CameraSnapshot, MAX_CAMERA_SNAPSHOTS, false> > Divide::GFXDevice::_cameraSnapshots
private

Definition at line 565 of file GFXDevice.h.

◆ _clippingPlanes

FrustumClipPlanes Divide::GFXDevice::_clippingPlanes
private

The interpolation factor between the current and the last frame.

Definition at line 493 of file GFXDevice.h.

◆ _debugBoxes

DebugPrimitiveHandler<IM::BoxDescriptor, 16u> Divide::GFXDevice::_debugBoxes
private

Definition at line 474 of file GFXDevice.h.

◆ _debugCones

DebugPrimitiveHandler<IM::ConeDescriptor, 16u> Divide::GFXDevice::_debugCones
private

Definition at line 477 of file GFXDevice.h.

◆ _debugFrustums

DebugPrimitiveHandler<IM::FrustumDescriptor, 8u> Divide::GFXDevice::_debugFrustums
private

Definition at line 478 of file GFXDevice.h.

◆ _debugGizmoPipeline

PipelineDescriptor Divide::GFXDevice::_debugGizmoPipeline
private

Definition at line 512 of file GFXDevice.h.

◆ _debugGizmoPipelineNoCull

PipelineDescriptor Divide::GFXDevice::_debugGizmoPipelineNoCull
private

Definition at line 514 of file GFXDevice.h.

◆ _debugGizmoPipelineNoCullNoDepth

PipelineDescriptor Divide::GFXDevice::_debugGizmoPipelineNoCullNoDepth
private

Definition at line 515 of file GFXDevice.h.

◆ _debugGizmoPipelineNoDepth

PipelineDescriptor Divide::GFXDevice::_debugGizmoPipelineNoDepth
private

Definition at line 513 of file GFXDevice.h.

◆ _debugLines

DebugPrimitiveHandler<IM::LineDescriptor, 16u> Divide::GFXDevice::_debugLines
private

Definition at line 473 of file GFXDevice.h.

◆ _debugOBBs

DebugPrimitiveHandler<IM::OBBDescriptor, 16u> Divide::GFXDevice::_debugOBBs
private

Definition at line 475 of file GFXDevice.h.

◆ _debugSpheres

DebugPrimitiveHandler<IM::SphereDescriptor, 16u> Divide::GFXDevice::_debugSpheres
private

Definition at line 476 of file GFXDevice.h.

◆ _debugViewLock

Mutex Divide::GFXDevice::_debugViewLock
mutableprivate

Definition at line 531 of file GFXDevice.h.

◆ _debugViews

vector<DebugView_ptr> Divide::GFXDevice::_debugViews
private

Definition at line 532 of file GFXDevice.h.

◆ _defaultStateNoDepthTest

RenderStateBlock Divide::GFXDevice::_defaultStateNoDepthTest {}
private

The default render state but with depth testing disabled.

Definition at line 488 of file GFXDevice.h.

◆ _depthShader

Handle<ShaderProgram> Divide::GFXDevice::_depthShader = INVALID_HANDLE<ShaderProgram>
private

Definition at line 503 of file GFXDevice.h.

◆ _descriptorSets

GFXDescriptorSets Divide::GFXDevice::_descriptorSets
private

Definition at line 524 of file GFXDevice.h.

◆ _displayShader

Handle<ShaderProgram> Divide::GFXDevice::_displayShader = INVALID_HANDLE<ShaderProgram>
private

Definition at line 502 of file GFXDevice.h.

◆ _drawFSDepthPipelineCmd

GFX::BindPipelineCommand Divide::GFXDevice::_drawFSDepthPipelineCmd
private

Definition at line 518 of file GFXDevice.h.

◆ _drawFSTexturePipelineBlendCmd

GFX::BindPipelineCommand Divide::GFXDevice::_drawFSTexturePipelineBlendCmd
private

Definition at line 517 of file GFXDevice.h.

◆ _drawFSTexturePipelineCmd

GFX::BindPipelineCommand Divide::GFXDevice::_drawFSTexturePipelineCmd
private

Definition at line 516 of file GFXDevice.h.

◆ _gfxBuffers

struct Divide::GFXDevice::GFXBuffers Divide::GFXDevice::_gfxBuffers
private

◆ _gpuBlock

GFXShaderData Divide::GFXDevice::_gpuBlock
private

Definition at line 529 of file GFXDevice.h.

◆ _graphicResources

vector<std::tuple<GraphicsResource::Type, I64, U64> > Divide::GFXDevice::_graphicResources
private

Definition at line 526 of file GFXDevice.h.

◆ _graphicsResourceMutex

Mutex Divide::GFXDevice::_graphicsResourceMutex
private

Definition at line 525 of file GFXDevice.h.

◆ _hIZConstructProgram

Handle<ShaderProgram> Divide::GFXDevice::_hIZConstructProgram = INVALID_HANDLE<ShaderProgram>
private

Definition at line 500 of file GFXDevice.h.

◆ _hIZCullPipeline

Pipeline* Divide::GFXDevice::_hIZCullPipeline = nullptr
private

Definition at line 511 of file GFXDevice.h.

◆ _hIZCullProgram

Handle<ShaderProgram> Divide::GFXDevice::_hIZCullProgram = INVALID_HANDLE<ShaderProgram>
private

Definition at line 501 of file GFXDevice.h.

◆ _hIZPipeline

Pipeline* Divide::GFXDevice::_hIZPipeline = nullptr
private

Definition at line 510 of file GFXDevice.h.

◆ _imprimitiveMutex

Mutex Divide::GFXDevice::_imprimitiveMutex
private

Definition at line 570 of file GFXDevice.h.

◆ _performanceMetrics

PerformanceMetrics Divide::GFXDevice::_performanceMetrics {}
private

Definition at line 572 of file GFXDevice.h.

◆ _pipelineCache

hashMap<size_t, Pipeline, NoHash<size_t> > Divide::GFXDevice::_pipelineCache
private

Definition at line 562 of file GFXDevice.h.

◆ _pipelineCacheLock

Mutex Divide::GFXDevice::_pipelineCacheLock
private

Definition at line 561 of file GFXDevice.h.

◆ _previewDepthMapShader

Handle<ShaderProgram> Divide::GFXDevice::_previewDepthMapShader = INVALID_HANDLE<ShaderProgram>
private

shader used to preview the depth buffer

Definition at line 496 of file GFXDevice.h.

◆ _previewRenderTargetColour

Handle<ShaderProgram> Divide::GFXDevice::_previewRenderTargetColour = INVALID_HANDLE<ShaderProgram>
private

Definition at line 497 of file GFXDevice.h.

◆ _previewRenderTargetDepth

Handle<ShaderProgram> Divide::GFXDevice::_previewRenderTargetDepth = INVALID_HANDLE<ShaderProgram>
private

Definition at line 498 of file GFXDevice.h.

◆ _queuedCommandbufferLock

Mutex Divide::GFXDevice::_queuedCommandbufferLock
private

Definition at line 534 of file GFXDevice.h.

◆ _queuedScreenSampleChange

U8 Divide::GFXDevice::_queuedScreenSampleChange = s_invalidQueueSampleCount
private

Definition at line 485 of file GFXDevice.h.

◆ _queuedShadowSampleChange

std::array<U8, to_base(ShadowType::COUNT)> Divide::GFXDevice::_queuedShadowSampleChange
private

Definition at line 486 of file GFXDevice.h.

◆ _renderer

Renderer_uptr Divide::GFXDevice::_renderer
private

Definition at line 469 of file GFXDevice.h.

◆ _renderingResolution

vec2<U16> Divide::GFXDevice::_renderingResolution
private

Definition at line 528 of file GFXDevice.h.

◆ _renderTargetDraw

Handle<ShaderProgram> Divide::GFXDevice::_renderTargetDraw = INVALID_HANDLE<ShaderProgram>
private

Definition at line 499 of file GFXDevice.h.

◆ _rtPool

std::unique_ptr<GFXRTPool> Divide::GFXDevice::_rtPool
private

Definition at line 482 of file GFXDevice.h.

◆ _shaderComputeQueue

std::unique_ptr<ShaderComputeQueue> Divide::GFXDevice::_shaderComputeQueue
private

Definition at line 471 of file GFXDevice.h.

◆ _state2DRendering

RenderStateBlock Divide::GFXDevice::_state2DRendering {}
private

Special render state for 2D rendering.

Definition at line 490 of file GFXDevice.h.

◆ _stateDepthOnlyRendering

RenderStateBlock Divide::GFXDevice::_stateDepthOnlyRendering {}
private

Definition at line 491 of file GFXDevice.h.

◆ _viewportStack

std::stack<Rect<I32> > Divide::GFXDevice::_viewportStack
private

Definition at line 569 of file GFXDevice.h.

◆ MAX_CAMERA_SNAPSHOTS

constexpr U8 Divide::GFXDevice::MAX_CAMERA_SNAPSHOTS = 32u
staticconstexprprivate

Definition at line 564 of file GFXDevice.h.

◆ s_deviceInformation

DeviceInformation Divide::GFXDevice::s_deviceInformation {}
staticprivate

Definition at line 580 of file GFXDevice.h.

◆ s_frameCount

U64 Divide::GFXDevice::s_frameCount = 0u
staticprivate

Definition at line 578 of file GFXDevice.h.

◆ s_IMPrimitivePool

GFXDevice::IMPrimitivePool Divide::GFXDevice::s_IMPrimitivePool {}
staticprivate

Definition at line 575 of file GFXDevice.h.

◆ s_interpolationFactor

D64 Divide::GFXDevice::s_interpolationFactor = 1.0
staticprivate

Definition at line 577 of file GFXDevice.h.

◆ s_invalidQueueSampleCount

constexpr U8 Divide::GFXDevice::s_invalidQueueSampleCount = 255u
staticconstexprprivate

Definition at line 484 of file GFXDevice.h.


The documentation for this class was generated from the following files: