Project
Loading...
Searching...
No Matches
o2::gpu::GPUDisplayBackendVulkan Class Reference

#include <GPUDisplayBackendVulkan.h>

Inherits o2::gpu::GPUDisplayBackend.

Classes

struct  FontSymbolVulkan
 
struct  SwapChainSupportDetails
 
struct  TextDrawCommand
 
struct  VulkanBuffer
 
struct  VulkanImage
 

Public Member Functions

 GPUDisplayBackendVulkan ()
 
 ~GPUDisplayBackendVulkan () override
 
uint32_t DepthBits () override
 
- Public Member Functions inherited from o2::gpu::GPUDisplayBackend
 GPUDisplayBackend ()
 
virtual ~GPUDisplayBackend ()
 
virtual int32_t ExtInit ()
 
virtual bool CoreProfile ()
 
virtual uint32_t drawField ()
 
virtual void setQuality ()
 
int32_t fpsLimitMode () const
 
int32_t InitBackend ()
 
void updateFontScale (float scale)
 
void ExitBackend ()
 
backendTypes backendType () const
 
const char * backendName () const
 
virtual size_t needMultiVBO ()
 
std::vector< char > getPixels ()
 

Protected Types

using FeatureChain = vk::StructureChain< vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceVulkan11Features, vk::PhysicalDeviceVulkan12Features, vk::PhysicalDeviceVulkan13Features, vk::PhysicalDeviceVulkan14Features, vk::PhysicalDeviceSwapchainMaintenance1FeaturesKHR, vk::PhysicalDevicePresentIdFeaturesKHR, vk::PhysicalDevicePresentWaitFeaturesKHR >
 

Protected Member Functions

uint32_t drawVertices (const vboList &v, const drawType t) override
 
void ActivateColor (std::array< float, 4 > &color) override
 
void SetVSync (bool enable) override
 
void setDepthBuffer () override
 
bool backendNeedRedraw () override
 
int32_t InitBackendA () override
 
void ExitBackendA () override
 
void loadDataToGPU (size_t totalVertizes) override
 
bool prepareDraw (const hmm_mat4 &proj, const hmm_mat4 &view, bool requestScreenshot, bool toMixBuffer, float includeMixImage) override
 
void finishDraw (bool doScreenshot, bool toMixBuffer, float includeMixImage) override
 
void finishFrame (bool doScreenshot, bool toMixBuffer, float includeMixImage) override
 
void prepareText () override
 
void finishText () override
 
void mixImages (vk::CommandBuffer cmdBuffer, float mixSlaveImage)
 
void cmdPushDescriptors (vk::CommandBuffer commandBuffer, vk::PipelineLayout layout, const VulkanBuffer &ubo, vk::ImageView textureView={})
 
void pointSizeFactor (float factor) override
 
void lineWidthFactor (float factor) override
 
bool useNativeSmoothLines () const
 
bool useSmoothLineShader () const
 
bool canLimitToVSync () const override
 
void waitPresentFences ()
 
void resizeScene (uint32_t width, uint32_t height) override
 
float getYFactor () const override
 
int32_t getMaxMSAA () const override
 
double checkDevice (vk::PhysicalDevice device, const std::vector< const char * > &reqDeviceExtensions, const FeatureChain &reqDeviceFeatures, bool silent=false)
 
vk::Extent2D chooseSwapExtent (const vk::SurfaceCapabilitiesKHR &capabilities)
 
vk::PresentModeKHR chooseSwapPresentMode ()
 
VulkanBuffer createBuffer (size_t size, const void *srcData=nullptr, vk::BufferUsageFlags type=vk::BufferUsageFlagBits::eVertexBuffer, int32_t deviceMemory=1)
 
void writeToBuffer (VulkanBuffer &buffer, size_t size, const void *srcData)
 
void clearBuffer (VulkanBuffer &buffer)
 
VulkanImage createImage (uint32_t sizex, uint32_t sizey, const void *srcData=nullptr, size_t srcSize=0, vk::Format format=vk::Format::eR8G8B8A8Srgb)
 
void writeToImage (VulkanImage &image, const void *srcData, size_t srcSize)
 
void clearImage (VulkanImage &image)
 
void clearVertexBuffers ()
 
void startFillCommandBuffer (vk::CommandBuffer &commandBuffer, uint32_t imageIndex, bool toMixBuffer=false)
 
void endFillCommandBuffer (vk::CommandBuffer &commandBuffer)
 
vk::CommandBuffer getSingleTimeCommandBuffer ()
 
void waitTimeline (uint64_t value)
 
template<class... Args>
uint64_t queueSubmit (uint64_t *timelineSignalValue, Args &&... args)
 
void submitSingleTimeCommandBuffer (vk::CommandBuffer commandBuffer)
 
void readImageToPixels (vk::Image image, vk::ImageView view, vk::ImageLayout layout, std::vector< char > &pixels)
 
void downsampleToFramebuffer (vk::CommandBuffer &commandBuffer)
 
void cmdDownsample (vk::CommandBuffer commandBuffer, vk::ImageView src, vk::ImageView dst, uint32_t width, uint32_t height, int32_t factor)
 
void updateSwapChainDetails (const vk::PhysicalDevice &device)
 
void createDevice ()
 
void loadShaders ()
 
void createTextureSampler ()
 
void createCommandBuffers ()
 
void createSemaphores ()
 
void createUniformLayoutsAndBuffers ()
 
void createSwapChain (vk::SwapchainKHR oldSwapChain={})
 
void createOffscreenBuffers (bool forScreenshot=false, bool forMixing=false)
 
void createPipeline ()
 
void clearDevice ()
 
void clearTextureSampler ()
 
void clearCommandBuffers ()
 
void clearSemaphores ()
 
void clearUniformLayoutsAndBuffers ()
 
void clearOffscreenBuffers ()
 
void clearSwapChain (bool keepSwapChain=false)
 
void clearPipeline ()
 
void recreateRendering (bool forScreenshot=false, bool forMixing=false)
 
void needRecordCommandBuffers ()
 
void addFontSymbol (int32_t symbol, int32_t sizex, int32_t sizey, int32_t offsetx, int32_t offsety, int32_t advance, void *data) override
 
void initializeTextDrawing () override
 
void clearFontSymbols () override
 
void OpenGLPrint (const char *s, float x, float y, float *color, float scale) override
 
void handleSwapChainResult (vk::Result retVal, uint8_t suboptimalBit)
 
- Protected Member Functions inherited from o2::gpu::GPUDisplayBackend
void loadFont ()
 
float getDownsampleFactor (bool screenshot=false)
 
void fillIndirectCmdBuffer ()
 
bool smoothFont ()
 

Protected Attributes

uint32_t mGraphicsFamily
 
SwapChainSupportDetails mSwapChainDetails
 
bool mEnableValidationLayers = false
 
vk::Instance mInstance
 
vk::DebugUtilsMessengerEXT mDebugMessenger
 
vk::PhysicalDevice mPhysicalDevice
 
vk::Device mDevice
 
vk::Queue mGraphicsQueue
 
vk::SurfaceKHR mSurface
 
vk::SurfaceFormatKHR mSurfaceFormat
 
vk::PresentModeKHR mPresentMode
 
vk::SwapchainKHR mSwapChain
 
bool mMustUpdateSwapChain = false
 
uint8_t mSwapChainSuboptimal = 0
 
bool mFrameSkipped = false
 
std::vector< vk::Image > mSwapChainImages
 
std::vector< vk::ImageView > mSwapChainImageViews
 
std::vector< vk::ImageView * > mRenderTargetView
 
std::vector< vk::Image > mRenderTargetImage
 
std::vector< VulkanImage > mMSAAImages
 
std::vector< VulkanImage > mDownsampleImages
 
std::vector< VulkanImage > mZImages
 
std::vector< VulkanImage > mMixImages
 
std::unordered_map< std::string, vk::ShaderModuleCreateInfo > mShaders
 
vk::PipelineLayout mPipelineLayout
 
vk::PipelineLayout mPipelineLayoutTexture
 
std::vector< vk::Pipeline > mPipelines
 
vk::CommandPool mCommandPool
 
vk::PipelineCache mPipelineCache
 
bool mCommandInfrastructureCreated = false
 
uint32_t mImageCount = 0
 
uint32_t mFramesInFlight = 0
 
int32_t mCurrentFrame = 0
 
uint32_t mCurrentImageIndex = 0
 
vk::CommandBuffer mCurrentCommandBuffer
 
int32_t mCurrentCommandBufferLastPipeline = -1
 
std::vector< vk::CommandBuffer > mCommandBuffers
 
std::vector< vk::CommandBuffer > mCommandBuffersDownsample
 
std::vector< vk::CommandBuffer > mCommandBuffersText
 
std::vector< vk::CommandBuffer > mCommandBuffersTexture
 
std::vector< vk::CommandBuffer > mCommandBuffersMix
 
std::vector< vk::CommandBuffer > mCommandBuffersPresent
 
std::vector< vk::CommandBufferSubmitInfo > mFrameCommandBuffers
 
std::vector< bool > mCommandBufferUpToDate
 
std::vector< vk::Semaphore > mImageAvailableSemaphore
 
std::vector< vk::Semaphore > mPresentSemaphore
 
vk::Semaphore mTimelineSemaphore
 
uint64_t mTimelineValue = 0
 
std::vector< uint64_t > mFrameTimelineValue
 
std::vector< uint64_t > mImageTimelineValue
 
std::mutex mQueueMutex
 
std::vector< VulkanBuffer > mUniformBuffersMat [3]
 
uint32_t mUpdateUBOdrawMatrix = -1
 
uint32_t mUpdateUBOtextMatrix = -1
 
uint32_t mUpdateUBOmixMatrix = -1
 
float mLastMVP [16] = {}
 
vk::DescriptorSetLayout mUniformDescriptor
 
vk::DescriptorSetLayout mUniformDescriptorTexture
 
VulkanBuffer mVBO
 
VulkanBuffer mIndirectCommandBuffer
 
std::vector< FontSymbolVulkan > mFontSymbols
 
VulkanImage mFontImage
 
std::vector< VulkanBuffer > mFontVertexBuffer
 
std::vector< TextDrawCommand > mTextDrawCommands
 
vk::Sampler mTextureSampler
 
vecpod< float > mFontVertexBufferHost
 
bool mHasDrawnText = false
 
uint32_t mMaxMSAAsupported = 0
 
bool mZSupported = false
 
bool mStencilSupported = false
 
float mMaxLineWidth = 1.f
 
float mMaxPointSize = 1.f
 
bool mStrictLines = false
 
bool mSmoothLinesSupported = false
 
bool mFifoLatestReadySupported = false
 
vk::SampleCountFlagBits mMSAASampleCount = vk::SampleCountFlagBits::e16
 
bool mZActive = false
 
bool mSmoothLines = false
 
bool mPresentModeErrorShown = false
 
bool mPresentModeForVSyncLimit = false
 
std::vector< vk::Fence > mPresentFences
 
uint64_t mLastPresentId = 0
 
bool mDownsampleFSAA = false
 
bool mMixingSupported = 0
 
VulkanBuffer mMixingTextureVertexArray
 
- Protected Attributes inherited from o2::gpu::GPUDisplayBackend
GPUDisplay * mDisplay = nullptr
 
std::vector< int32_t > mIndirectSectorOffset
 
vecpod< DrawArraysIndirectCommand > mCmdBuffer
 
bool mFreetypeInitialized = false
 
float mFontRasterScale = 1.f
 
bool mFrontendCompatTextDraw = false
 
std::vector< char > mScreenshotPixels
 
int32_t mDownsampleFactor = 1
 
uint32_t mRenderWidth = 0
 
uint32_t mRenderHeight = 0
 
uint32_t mMaxRenderSize = UINT32_MAX
 
uint32_t mScreenWidth = 0
 
uint32_t mScreenHeight = 0
 
backendTypes mBackendType = TYPE_INVALID
 
const char * mBackendName = nullptr
 
std::unique_ptr< GPUDisplayMagneticField > mMagneticFieldVisualization
 

Additional Inherited Members

- Public Types inherited from o2::gpu::GPUDisplayBackend
enum  drawType { POINTS = 0 , LINES = 1 , LINE_STRIP = 2 }
 
enum  backendTypes { TYPE_INVALID = -1 , TYPE_OPENGL = 0 , TYPE_VULKAN = 1 , TYPE_NONE = 2 }
 
enum  fpsLimitModes : int32_t { FPS_LIMIT_NONE = 0 , FPS_LIMIT_VSYNC = 1 , FPS_LIMIT_RATE = 2 }
 
typedef std::tuple< uint32_t, uint32_t, int32_t > vboList
 
- Static Public Member Functions inherited from o2::gpu::GPUDisplayBackend
static GPUDisplayBackend * getBackend (const char *type)
 
- Static Protected Attributes inherited from o2::gpu::GPUDisplayBackend
static constexpr float SMOOTH_POINT_EXTRA_SIZE = 0.6f
 
static constexpr float SMOOTH_LINE_EXTRA_WIDTH = 0.8f
 

Detailed Description

Definition at line 29 of file GPUDisplayBackendVulkan.h.

Member Typedef Documentation

◆ FeatureChain

using o2::gpu::GPUDisplayBackendVulkan::FeatureChain = vk::StructureChain<vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceVulkan11Features, vk::PhysicalDeviceVulkan12Features, vk::PhysicalDeviceVulkan13Features, vk::PhysicalDeviceVulkan14Features, vk::PhysicalDeviceSwapchainMaintenance1FeaturesKHR, vk::PhysicalDevicePresentIdFeaturesKHR, vk::PhysicalDevicePresentWaitFeaturesKHR>
protected

Definition at line 92 of file GPUDisplayBackendVulkan.h.

Constructor & Destructor Documentation

◆ GPUDisplayBackendVulkan()

GPUDisplayBackendVulkan::GPUDisplayBackendVulkan ( )

Definition at line 44 of file GPUDisplayBackendVulkan.cxx.

◆ ~GPUDisplayBackendVulkan()

GPUDisplayBackendVulkan::~GPUDisplayBackendVulkan ( )
overridedefault

Member Function Documentation

◆ ActivateColor()

void GPUDisplayBackendVulkan::ActivateColor ( std::array< float, 4 > &  color)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 1767 of file GPUDisplayBackendVulkan.cxx.

◆ addFontSymbol()

void GPUDisplayBackendVulkan::addFontSymbol ( int32_t  symbol,
int32_t  sizex,
int32_t  sizey,
int32_t  offsetx,
int32_t  offsety,
int32_t  advance,
void *  data 
)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 1814 of file GPUDisplayBackendVulkan.cxx.

◆ backendNeedRedraw()

bool GPUDisplayBackendVulkan::backendNeedRedraw ( )
overrideprotectedvirtual

Reimplemented from o2::gpu::GPUDisplayBackend.

Definition at line 2032 of file GPUDisplayBackendVulkan.cxx.

◆ canLimitToVSync()

bool o2::gpu::GPUDisplayBackendVulkan::canLimitToVSync ( ) const
inlineoverrideprotectedvirtual

Reimplemented from o2::gpu::GPUDisplayBackend.

Definition at line 86 of file GPUDisplayBackendVulkan.h.

◆ checkDevice()

double GPUDisplayBackendVulkan::checkDevice ( vk::PhysicalDevice  device,
const std::vector< const char * > &  reqDeviceExtensions,
const FeatureChain &  reqDeviceFeatures,
bool  silent = false 
)
protected

Definition at line 345 of file GPUDisplayBackendVulkan.cxx.

◆ chooseSwapExtent()

vk::Extent2D GPUDisplayBackendVulkan::chooseSwapExtent ( const vk::SurfaceCapabilitiesKHR &  capabilities)
protected

Definition at line 121 of file GPUDisplayBackendVulkan.cxx.

◆ chooseSwapPresentMode()

vk::PresentModeKHR GPUDisplayBackendVulkan::chooseSwapPresentMode ( )
protected

Definition at line 99 of file GPUDisplayBackendVulkan.cxx.

◆ clearBuffer()

void GPUDisplayBackendVulkan::clearBuffer ( VulkanBuffer &  buffer)
protected

Definition at line 1304 of file GPUDisplayBackendVulkan.cxx.

◆ clearCommandBuffers()

void GPUDisplayBackendVulkan::clearCommandBuffers ( )
protected

Definition at line 635 of file GPUDisplayBackendVulkan.cxx.

◆ clearDevice()

void GPUDisplayBackendVulkan::clearDevice ( )
protected

Definition at line 607 of file GPUDisplayBackendVulkan.cxx.

◆ clearFontSymbols()

void GPUDisplayBackendVulkan::clearFontSymbols ( )
overrideprotectedvirtual

Reimplemented from o2::gpu::GPUDisplayBackend.

Definition at line 1886 of file GPUDisplayBackendVulkan.cxx.

◆ clearImage()

void GPUDisplayBackendVulkan::clearImage ( VulkanImage &  image)
protected

Definition at line 1364 of file GPUDisplayBackendVulkan.cxx.

◆ clearOffscreenBuffers()

void GPUDisplayBackendVulkan::clearOffscreenBuffers ( )
protected

Definition at line 962 of file GPUDisplayBackendVulkan.cxx.

◆ clearPipeline()

void GPUDisplayBackendVulkan::clearPipeline ( )
protected

Definition at line 1215 of file GPUDisplayBackendVulkan.cxx.

◆ clearSemaphores()

void GPUDisplayBackendVulkan::clearSemaphores ( )
protected

Definition at line 679 of file GPUDisplayBackendVulkan.cxx.

◆ clearSwapChain()

void GPUDisplayBackendVulkan::clearSwapChain ( bool  keepSwapChain = false)
protected

Definition at line 850 of file GPUDisplayBackendVulkan.cxx.

◆ clearTextureSampler()

void GPUDisplayBackendVulkan::clearTextureSampler ( )
protected

Definition at line 759 of file GPUDisplayBackendVulkan.cxx.

◆ clearUniformLayoutsAndBuffers()

void GPUDisplayBackendVulkan::clearUniformLayoutsAndBuffers ( )
protected

Definition at line 721 of file GPUDisplayBackendVulkan.cxx.

◆ clearVertexBuffers()

void GPUDisplayBackendVulkan::clearVertexBuffers ( )
protected

Definition at line 1310 of file GPUDisplayBackendVulkan.cxx.

◆ cmdDownsample()

void GPUDisplayBackendVulkan::cmdDownsample ( vk::CommandBuffer  commandBuffer,
vk::ImageView  src,
vk::ImageView  dst,
uint32_t  width,
uint32_t  height,
int32_t  factor 
)
protected

Definition at line 1676 of file GPUDisplayBackendVulkan.cxx.

◆ cmdPushDescriptors()

void GPUDisplayBackendVulkan::cmdPushDescriptors ( vk::CommandBuffer  commandBuffer,
vk::PipelineLayout  layout,
const VulkanBuffer &  ubo,
vk::ImageView  textureView = {} 
)
protected

Definition at line 730 of file GPUDisplayBackendVulkan.cxx.

◆ createBuffer()

GPUDisplayBackendVulkan::VulkanBuffer GPUDisplayBackendVulkan::createBuffer ( size_t  size,
const void *  srcData = nullptr,
vk::BufferUsageFlags  type = vk::BufferUsageFlagBits::eVertexBuffer,
int32_t  deviceMemory = 1 
)
protected

Definition at line 1262 of file GPUDisplayBackendVulkan.cxx.

◆ createCommandBuffers()

void GPUDisplayBackendVulkan::createCommandBuffers ( )
protected

Definition at line 620 of file GPUDisplayBackendVulkan.cxx.

◆ createDevice()

void GPUDisplayBackendVulkan::createDevice ( )
protected

Definition at line 426 of file GPUDisplayBackendVulkan.cxx.

◆ createImage()

GPUDisplayBackendVulkan::VulkanImage GPUDisplayBackendVulkan::createImage ( uint32_t  sizex,
uint32_t  sizey,
const void *  srcData = nullptr,
size_t  srcSize = 0,
vk::Format  format = vk::Format::eR8G8B8A8Srgb 
)
protected

Definition at line 1347 of file GPUDisplayBackendVulkan.cxx.

◆ createOffscreenBuffers()

void GPUDisplayBackendVulkan::createOffscreenBuffers ( bool  forScreenshot = false,
bool  forMixing = false 
)
protected

Definition at line 889 of file GPUDisplayBackendVulkan.cxx.

◆ createPipeline()

void GPUDisplayBackendVulkan::createPipeline ( )
protected

Definition at line 976 of file GPUDisplayBackendVulkan.cxx.

◆ createSemaphores()

void GPUDisplayBackendVulkan::createSemaphores ( )
protected

Definition at line 647 of file GPUDisplayBackendVulkan.cxx.

◆ createSwapChain()

void GPUDisplayBackendVulkan::createSwapChain ( vk::SwapchainKHR  oldSwapChain = {})
protected

Definition at line 766 of file GPUDisplayBackendVulkan.cxx.

◆ createTextureSampler()

void GPUDisplayBackendVulkan::createTextureSampler ( )
protected

Definition at line 740 of file GPUDisplayBackendVulkan.cxx.

◆ createUniformLayoutsAndBuffers()

void GPUDisplayBackendVulkan::createUniformLayoutsAndBuffers ( )
protected

Definition at line 689 of file GPUDisplayBackendVulkan.cxx.

◆ DepthBits()

uint32_t GPUDisplayBackendVulkan::DepthBits ( )
overridevirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 2027 of file GPUDisplayBackendVulkan.cxx.

◆ downsampleToFramebuffer()

void GPUDisplayBackendVulkan::downsampleToFramebuffer ( vk::CommandBuffer &  commandBuffer)
protected

Definition at line 1637 of file GPUDisplayBackendVulkan.cxx.

◆ drawVertices()

uint32_t GPUDisplayBackendVulkan::drawVertices ( const vboList &  v,
const drawType  t 
)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 1444 of file GPUDisplayBackendVulkan.cxx.

◆ endFillCommandBuffer()

void GPUDisplayBackendVulkan::endFillCommandBuffer ( vk::CommandBuffer &  commandBuffer)
protected

Definition at line 1209 of file GPUDisplayBackendVulkan.cxx.

◆ ExitBackendA()

void GPUDisplayBackendVulkan::ExitBackendA ( )
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 1388 of file GPUDisplayBackendVulkan.cxx.

◆ finishDraw()

void GPUDisplayBackendVulkan::finishDraw ( bool  doScreenshot,
bool  toMixBuffer,
float  includeMixImage 
)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 1558 of file GPUDisplayBackendVulkan.cxx.

◆ finishFrame()

void GPUDisplayBackendVulkan::finishFrame ( bool  doScreenshot,
bool  toMixBuffer,
float  includeMixImage 
)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 1568 of file GPUDisplayBackendVulkan.cxx.

◆ finishText()

void GPUDisplayBackendVulkan::finishText ( )
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 1699 of file GPUDisplayBackendVulkan.cxx.

◆ getMaxMSAA()

int32_t o2::gpu::GPUDisplayBackendVulkan::getMaxMSAA ( ) const
inlineoverrideprotectedvirtual

Reimplemented from o2::gpu::GPUDisplayBackend.

Definition at line 90 of file GPUDisplayBackendVulkan.h.

◆ getSingleTimeCommandBuffer()

vk::CommandBuffer GPUDisplayBackendVulkan::getSingleTimeCommandBuffer ( )
protected

Definition at line 163 of file GPUDisplayBackendVulkan.cxx.

◆ getYFactor()

float o2::gpu::GPUDisplayBackendVulkan::getYFactor ( ) const
inlineoverrideprotectedvirtual

Reimplemented from o2::gpu::GPUDisplayBackend.

Definition at line 89 of file GPUDisplayBackendVulkan.h.

◆ handleSwapChainResult()

void GPUDisplayBackendVulkan::handleSwapChainResult ( vk::Result  retVal,
uint8_t  suboptimalBit 
)
protected

Definition at line 1545 of file GPUDisplayBackendVulkan.cxx.

◆ InitBackendA()

int32_t GPUDisplayBackendVulkan::InitBackendA ( )
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 1373 of file GPUDisplayBackendVulkan.cxx.

◆ initializeTextDrawing()

void GPUDisplayBackendVulkan::initializeTextDrawing ( )
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 1827 of file GPUDisplayBackendVulkan.cxx.

◆ lineWidthFactor()

void GPUDisplayBackendVulkan::lineWidthFactor ( float  factor)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 1794 of file GPUDisplayBackendVulkan.cxx.

◆ loadDataToGPU()

void GPUDisplayBackendVulkan::loadDataToGPU ( size_t  totalVertizes)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 1427 of file GPUDisplayBackendVulkan.cxx.

◆ loadShaders()

void GPUDisplayBackendVulkan::loadShaders ( )
protected

Definition at line 1227 of file GPUDisplayBackendVulkan.cxx.

◆ mixImages()

void GPUDisplayBackendVulkan::mixImages ( vk::CommandBuffer  cmdBuffer,
float  mixSlaveImage 
)
protected

Definition at line 1739 of file GPUDisplayBackendVulkan.cxx.

◆ needRecordCommandBuffers()

void GPUDisplayBackendVulkan::needRecordCommandBuffers ( )
protected

Definition at line 1809 of file GPUDisplayBackendVulkan.cxx.

◆ OpenGLPrint()

void GPUDisplayBackendVulkan::OpenGLPrint ( const char *  s,
float  x,
float  y,
float *  color,
float  scale 
)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 1896 of file GPUDisplayBackendVulkan.cxx.

◆ pointSizeFactor()

void GPUDisplayBackendVulkan::pointSizeFactor ( float  factor)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 1775 of file GPUDisplayBackendVulkan.cxx.

◆ prepareDraw()

bool GPUDisplayBackendVulkan::prepareDraw ( const hmm_mat4 &  proj,
const hmm_mat4 &  view,
bool  requestScreenshot,
bool  toMixBuffer,
float  includeMixImage 
)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 1472 of file GPUDisplayBackendVulkan.cxx.

◆ prepareText()

void GPUDisplayBackendVulkan::prepareText ( )
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 1688 of file GPUDisplayBackendVulkan.cxx.

◆ queueSubmit()

template<class... Args>
uint64_t GPUDisplayBackendVulkan::queueSubmit ( uint64_t *  timelineSignalValue,
Args &&...  args 
)
protected

Definition at line 177 of file GPUDisplayBackendVulkan.cxx.

◆ readImageToPixels()

void GPUDisplayBackendVulkan::readImageToPixels ( vk::Image  image,
vk::ImageView  view,
vk::ImageLayout  layout,
std::vector< char > &  pixels 
)
protected

Definition at line 1945 of file GPUDisplayBackendVulkan.cxx.

◆ recreateRendering()

void GPUDisplayBackendVulkan::recreateRendering ( bool  forScreenshot = false,
bool  forMixing = false 
)
protected

Definition at line 859 of file GPUDisplayBackendVulkan.cxx.

◆ resizeScene()

void GPUDisplayBackendVulkan::resizeScene ( uint32_t  width,
uint32_t  height 
)
overrideprotectedvirtual

Reimplemented from o2::gpu::GPUDisplayBackend.

Definition at line 1415 of file GPUDisplayBackendVulkan.cxx.

◆ setDepthBuffer()

void o2::gpu::GPUDisplayBackendVulkan::setDepthBuffer ( )
inlineoverrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 70 of file GPUDisplayBackendVulkan.h.

◆ SetVSync()

void o2::gpu::GPUDisplayBackendVulkan::SetVSync ( bool  enable)
inlineoverrideprotectedvirtual

Reimplemented from o2::gpu::GPUDisplayBackend.

Definition at line 69 of file GPUDisplayBackendVulkan.h.

◆ startFillCommandBuffer()

void GPUDisplayBackendVulkan::startFillCommandBuffer ( vk::CommandBuffer &  commandBuffer,
uint32_t  imageIndex,
bool  toMixBuffer = false 
)
protected

Definition at line 1165 of file GPUDisplayBackendVulkan.cxx.

◆ submitSingleTimeCommandBuffer()

void GPUDisplayBackendVulkan::submitSingleTimeCommandBuffer ( vk::CommandBuffer  commandBuffer)
protected

Definition at line 187 of file GPUDisplayBackendVulkan.cxx.

◆ updateSwapChainDetails()

void GPUDisplayBackendVulkan::updateSwapChainDetails ( const vk::PhysicalDevice &  device)
protected

Definition at line 156 of file GPUDisplayBackendVulkan.cxx.

◆ useNativeSmoothLines()

bool GPUDisplayBackendVulkan::useNativeSmoothLines ( ) const
protected

Definition at line 1784 of file GPUDisplayBackendVulkan.cxx.

◆ useSmoothLineShader()

bool GPUDisplayBackendVulkan::useSmoothLineShader ( ) const
protected

Definition at line 1789 of file GPUDisplayBackendVulkan.cxx.

◆ waitPresentFences()

void GPUDisplayBackendVulkan::waitPresentFences ( )
protected

Definition at line 669 of file GPUDisplayBackendVulkan.cxx.

◆ waitTimeline()

void GPUDisplayBackendVulkan::waitTimeline ( uint64_t  value)
protected

Definition at line 197 of file GPUDisplayBackendVulkan.cxx.

◆ writeToBuffer()

void GPUDisplayBackendVulkan::writeToBuffer ( VulkanBuffer &  buffer,
size_t  size,
const void *  srcData 
)
protected

Definition at line 1245 of file GPUDisplayBackendVulkan.cxx.

◆ writeToImage()

void GPUDisplayBackendVulkan::writeToImage ( VulkanImage &  image,
const void *  srcData,
size_t  srcSize 
)
protected

Definition at line 1324 of file GPUDisplayBackendVulkan.cxx.

Member Data Documentation

◆ mCommandBuffers

std::vector<vk::CommandBuffer> o2::gpu::GPUDisplayBackendVulkan::mCommandBuffers
protected

Definition at line 181 of file GPUDisplayBackendVulkan.h.

◆ mCommandBuffersDownsample

std::vector<vk::CommandBuffer> o2::gpu::GPUDisplayBackendVulkan::mCommandBuffersDownsample
protected

Definition at line 182 of file GPUDisplayBackendVulkan.h.

◆ mCommandBuffersMix

std::vector<vk::CommandBuffer> o2::gpu::GPUDisplayBackendVulkan::mCommandBuffersMix
protected

Definition at line 185 of file GPUDisplayBackendVulkan.h.

◆ mCommandBuffersPresent

std::vector<vk::CommandBuffer> o2::gpu::GPUDisplayBackendVulkan::mCommandBuffersPresent
protected

Definition at line 186 of file GPUDisplayBackendVulkan.h.

◆ mCommandBuffersText

std::vector<vk::CommandBuffer> o2::gpu::GPUDisplayBackendVulkan::mCommandBuffersText
protected

Definition at line 183 of file GPUDisplayBackendVulkan.h.

◆ mCommandBuffersTexture

std::vector<vk::CommandBuffer> o2::gpu::GPUDisplayBackendVulkan::mCommandBuffersTexture
protected

Definition at line 184 of file GPUDisplayBackendVulkan.h.

◆ mCommandBufferUpToDate

std::vector<bool> o2::gpu::GPUDisplayBackendVulkan::mCommandBufferUpToDate
protected

Definition at line 188 of file GPUDisplayBackendVulkan.h.

◆ mCommandInfrastructureCreated

bool o2::gpu::GPUDisplayBackendVulkan::mCommandInfrastructureCreated = false
protected

Definition at line 173 of file GPUDisplayBackendVulkan.h.

◆ mCommandPool

vk::CommandPool o2::gpu::GPUDisplayBackendVulkan::mCommandPool
protected

Definition at line 170 of file GPUDisplayBackendVulkan.h.

◆ mCurrentCommandBuffer

vk::CommandBuffer o2::gpu::GPUDisplayBackendVulkan::mCurrentCommandBuffer
protected

Definition at line 178 of file GPUDisplayBackendVulkan.h.

◆ mCurrentCommandBufferLastPipeline

int32_t o2::gpu::GPUDisplayBackendVulkan::mCurrentCommandBufferLastPipeline = -1
protected

Definition at line 179 of file GPUDisplayBackendVulkan.h.

◆ mCurrentFrame

int32_t o2::gpu::GPUDisplayBackendVulkan::mCurrentFrame = 0
protected

Definition at line 176 of file GPUDisplayBackendVulkan.h.

◆ mCurrentImageIndex

uint32_t o2::gpu::GPUDisplayBackendVulkan::mCurrentImageIndex = 0
protected

Definition at line 177 of file GPUDisplayBackendVulkan.h.

◆ mDebugMessenger

vk::DebugUtilsMessengerEXT o2::gpu::GPUDisplayBackendVulkan::mDebugMessenger
protected

Definition at line 146 of file GPUDisplayBackendVulkan.h.

◆ mDevice

vk::Device o2::gpu::GPUDisplayBackendVulkan::mDevice
protected

Definition at line 148 of file GPUDisplayBackendVulkan.h.

◆ mDownsampleFSAA

bool o2::gpu::GPUDisplayBackendVulkan::mDownsampleFSAA = false
protected

Definition at line 231 of file GPUDisplayBackendVulkan.h.

◆ mDownsampleImages

std::vector<VulkanImage> o2::gpu::GPUDisplayBackendVulkan::mDownsampleImages
protected

Definition at line 163 of file GPUDisplayBackendVulkan.h.

◆ mEnableValidationLayers

bool o2::gpu::GPUDisplayBackendVulkan::mEnableValidationLayers = false
protected

Definition at line 143 of file GPUDisplayBackendVulkan.h.

◆ mFifoLatestReadySupported

bool o2::gpu::GPUDisplayBackendVulkan::mFifoLatestReadySupported = false
protected

Definition at line 222 of file GPUDisplayBackendVulkan.h.

◆ mFontImage

VulkanImage o2::gpu::GPUDisplayBackendVulkan::mFontImage
protected

Definition at line 208 of file GPUDisplayBackendVulkan.h.

◆ mFontSymbols

std::vector<FontSymbolVulkan> o2::gpu::GPUDisplayBackendVulkan::mFontSymbols
protected

Definition at line 207 of file GPUDisplayBackendVulkan.h.

◆ mFontVertexBuffer

std::vector<VulkanBuffer> o2::gpu::GPUDisplayBackendVulkan::mFontVertexBuffer
protected

Definition at line 209 of file GPUDisplayBackendVulkan.h.

◆ mFontVertexBufferHost

vecpod<float> o2::gpu::GPUDisplayBackendVulkan::mFontVertexBufferHost
protected

Definition at line 212 of file GPUDisplayBackendVulkan.h.

◆ mFrameCommandBuffers

std::vector<vk::CommandBufferSubmitInfo> o2::gpu::GPUDisplayBackendVulkan::mFrameCommandBuffers
protected

Definition at line 187 of file GPUDisplayBackendVulkan.h.

◆ mFramesInFlight

uint32_t o2::gpu::GPUDisplayBackendVulkan::mFramesInFlight = 0
protected

Definition at line 175 of file GPUDisplayBackendVulkan.h.

◆ mFrameSkipped

bool o2::gpu::GPUDisplayBackendVulkan::mFrameSkipped = false
protected

Definition at line 156 of file GPUDisplayBackendVulkan.h.

◆ mFrameTimelineValue

std::vector<uint64_t> o2::gpu::GPUDisplayBackendVulkan::mFrameTimelineValue
protected

Definition at line 193 of file GPUDisplayBackendVulkan.h.

◆ mGraphicsFamily

uint32_t o2::gpu::GPUDisplayBackendVulkan::mGraphicsFamily
protected

Definition at line 141 of file GPUDisplayBackendVulkan.h.

◆ mGraphicsQueue

vk::Queue o2::gpu::GPUDisplayBackendVulkan::mGraphicsQueue
protected

Definition at line 149 of file GPUDisplayBackendVulkan.h.

◆ mHasDrawnText

bool o2::gpu::GPUDisplayBackendVulkan::mHasDrawnText = false
protected

Definition at line 213 of file GPUDisplayBackendVulkan.h.

◆ mImageAvailableSemaphore

std::vector<vk::Semaphore> o2::gpu::GPUDisplayBackendVulkan::mImageAvailableSemaphore
protected

Definition at line 189 of file GPUDisplayBackendVulkan.h.

◆ mImageCount

uint32_t o2::gpu::GPUDisplayBackendVulkan::mImageCount = 0
protected

Definition at line 174 of file GPUDisplayBackendVulkan.h.

◆ mImageTimelineValue

std::vector<uint64_t> o2::gpu::GPUDisplayBackendVulkan::mImageTimelineValue
protected

Definition at line 194 of file GPUDisplayBackendVulkan.h.

◆ mIndirectCommandBuffer

VulkanBuffer o2::gpu::GPUDisplayBackendVulkan::mIndirectCommandBuffer
protected

Definition at line 205 of file GPUDisplayBackendVulkan.h.

◆ mInstance

vk::Instance o2::gpu::GPUDisplayBackendVulkan::mInstance
protected

Definition at line 145 of file GPUDisplayBackendVulkan.h.

◆ mLastMVP

float o2::gpu::GPUDisplayBackendVulkan::mLastMVP[16] = {}
protected

Definition at line 200 of file GPUDisplayBackendVulkan.h.

◆ mLastPresentId

uint64_t o2::gpu::GPUDisplayBackendVulkan::mLastPresentId = 0
protected

Definition at line 230 of file GPUDisplayBackendVulkan.h.

◆ mMaxLineWidth

float o2::gpu::GPUDisplayBackendVulkan::mMaxLineWidth = 1.f
protected

Definition at line 219 of file GPUDisplayBackendVulkan.h.

◆ mMaxMSAAsupported

uint32_t o2::gpu::GPUDisplayBackendVulkan::mMaxMSAAsupported = 0
protected

Definition at line 216 of file GPUDisplayBackendVulkan.h.

◆ mMaxPointSize

float o2::gpu::GPUDisplayBackendVulkan::mMaxPointSize = 1.f
protected

Definition at line 219 of file GPUDisplayBackendVulkan.h.

◆ mMixImages

std::vector<VulkanImage> o2::gpu::GPUDisplayBackendVulkan::mMixImages
protected

Definition at line 165 of file GPUDisplayBackendVulkan.h.

◆ mMixingSupported

bool o2::gpu::GPUDisplayBackendVulkan::mMixingSupported = 0
protected

Definition at line 232 of file GPUDisplayBackendVulkan.h.

◆ mMixingTextureVertexArray

VulkanBuffer o2::gpu::GPUDisplayBackendVulkan::mMixingTextureVertexArray
protected

Definition at line 234 of file GPUDisplayBackendVulkan.h.

◆ mMSAAImages

std::vector<VulkanImage> o2::gpu::GPUDisplayBackendVulkan::mMSAAImages
protected

Definition at line 162 of file GPUDisplayBackendVulkan.h.

◆ mMSAASampleCount

vk::SampleCountFlagBits o2::gpu::GPUDisplayBackendVulkan::mMSAASampleCount = vk::SampleCountFlagBits::e16
protected

Definition at line 224 of file GPUDisplayBackendVulkan.h.

◆ mMustUpdateSwapChain

bool o2::gpu::GPUDisplayBackendVulkan::mMustUpdateSwapChain = false
protected

Definition at line 154 of file GPUDisplayBackendVulkan.h.

◆ mPhysicalDevice

vk::PhysicalDevice o2::gpu::GPUDisplayBackendVulkan::mPhysicalDevice
protected

Definition at line 147 of file GPUDisplayBackendVulkan.h.

◆ mPipelineCache

vk::PipelineCache o2::gpu::GPUDisplayBackendVulkan::mPipelineCache
protected

Definition at line 171 of file GPUDisplayBackendVulkan.h.

◆ mPipelineLayout

vk::PipelineLayout o2::gpu::GPUDisplayBackendVulkan::mPipelineLayout
protected

Definition at line 167 of file GPUDisplayBackendVulkan.h.

◆ mPipelineLayoutTexture

vk::PipelineLayout o2::gpu::GPUDisplayBackendVulkan::mPipelineLayoutTexture
protected

Definition at line 168 of file GPUDisplayBackendVulkan.h.

◆ mPipelines

std::vector<vk::Pipeline> o2::gpu::GPUDisplayBackendVulkan::mPipelines
protected

Definition at line 169 of file GPUDisplayBackendVulkan.h.

◆ mPresentFences

std::vector<vk::Fence> o2::gpu::GPUDisplayBackendVulkan::mPresentFences
protected

Definition at line 229 of file GPUDisplayBackendVulkan.h.

◆ mPresentMode

vk::PresentModeKHR o2::gpu::GPUDisplayBackendVulkan::mPresentMode
protected

Definition at line 152 of file GPUDisplayBackendVulkan.h.

◆ mPresentModeErrorShown

bool o2::gpu::GPUDisplayBackendVulkan::mPresentModeErrorShown = false
protected

Definition at line 227 of file GPUDisplayBackendVulkan.h.

◆ mPresentModeForVSyncLimit

bool o2::gpu::GPUDisplayBackendVulkan::mPresentModeForVSyncLimit = false
protected

Definition at line 228 of file GPUDisplayBackendVulkan.h.

◆ mPresentSemaphore

std::vector<vk::Semaphore> o2::gpu::GPUDisplayBackendVulkan::mPresentSemaphore
protected

Definition at line 190 of file GPUDisplayBackendVulkan.h.

◆ mQueueMutex

std::mutex o2::gpu::GPUDisplayBackendVulkan::mQueueMutex
protected

Definition at line 195 of file GPUDisplayBackendVulkan.h.

◆ mRenderTargetImage

std::vector<vk::Image> o2::gpu::GPUDisplayBackendVulkan::mRenderTargetImage
protected

Definition at line 161 of file GPUDisplayBackendVulkan.h.

◆ mRenderTargetView

std::vector<vk::ImageView*> o2::gpu::GPUDisplayBackendVulkan::mRenderTargetView
protected

Definition at line 160 of file GPUDisplayBackendVulkan.h.

◆ mShaders

std::unordered_map<std::string, vk::ShaderModuleCreateInfo> o2::gpu::GPUDisplayBackendVulkan::mShaders
protected

Definition at line 166 of file GPUDisplayBackendVulkan.h.

◆ mSmoothLines

bool o2::gpu::GPUDisplayBackendVulkan::mSmoothLines = false
protected

Definition at line 226 of file GPUDisplayBackendVulkan.h.

◆ mSmoothLinesSupported

bool o2::gpu::GPUDisplayBackendVulkan::mSmoothLinesSupported = false
protected

Definition at line 221 of file GPUDisplayBackendVulkan.h.

◆ mStencilSupported

bool o2::gpu::GPUDisplayBackendVulkan::mStencilSupported = false
protected

Definition at line 218 of file GPUDisplayBackendVulkan.h.

◆ mStrictLines

bool o2::gpu::GPUDisplayBackendVulkan::mStrictLines = false
protected

Definition at line 220 of file GPUDisplayBackendVulkan.h.

◆ mSurface

vk::SurfaceKHR o2::gpu::GPUDisplayBackendVulkan::mSurface
protected

Definition at line 150 of file GPUDisplayBackendVulkan.h.

◆ mSurfaceFormat

vk::SurfaceFormatKHR o2::gpu::GPUDisplayBackendVulkan::mSurfaceFormat
protected

Definition at line 151 of file GPUDisplayBackendVulkan.h.

◆ mSwapChain

vk::SwapchainKHR o2::gpu::GPUDisplayBackendVulkan::mSwapChain
protected

Definition at line 153 of file GPUDisplayBackendVulkan.h.

◆ mSwapChainDetails

SwapChainSupportDetails o2::gpu::GPUDisplayBackendVulkan::mSwapChainDetails
protected

Definition at line 142 of file GPUDisplayBackendVulkan.h.

◆ mSwapChainImages

std::vector<vk::Image> o2::gpu::GPUDisplayBackendVulkan::mSwapChainImages
protected

Definition at line 158 of file GPUDisplayBackendVulkan.h.

◆ mSwapChainImageViews

std::vector<vk::ImageView> o2::gpu::GPUDisplayBackendVulkan::mSwapChainImageViews
protected

Definition at line 159 of file GPUDisplayBackendVulkan.h.

◆ mSwapChainSuboptimal

uint8_t o2::gpu::GPUDisplayBackendVulkan::mSwapChainSuboptimal = 0
protected

Definition at line 155 of file GPUDisplayBackendVulkan.h.

◆ mTextDrawCommands

std::vector<TextDrawCommand> o2::gpu::GPUDisplayBackendVulkan::mTextDrawCommands
protected

Definition at line 210 of file GPUDisplayBackendVulkan.h.

◆ mTextureSampler

vk::Sampler o2::gpu::GPUDisplayBackendVulkan::mTextureSampler
protected

Definition at line 211 of file GPUDisplayBackendVulkan.h.

◆ mTimelineSemaphore

vk::Semaphore o2::gpu::GPUDisplayBackendVulkan::mTimelineSemaphore
protected

Definition at line 191 of file GPUDisplayBackendVulkan.h.

◆ mTimelineValue

uint64_t o2::gpu::GPUDisplayBackendVulkan::mTimelineValue = 0
protected

Definition at line 192 of file GPUDisplayBackendVulkan.h.

◆ mUniformBuffersMat

std::vector<VulkanBuffer> o2::gpu::GPUDisplayBackendVulkan::mUniformBuffersMat[3]
protected

Definition at line 196 of file GPUDisplayBackendVulkan.h.

◆ mUniformDescriptor

vk::DescriptorSetLayout o2::gpu::GPUDisplayBackendVulkan::mUniformDescriptor
protected

Definition at line 201 of file GPUDisplayBackendVulkan.h.

◆ mUniformDescriptorTexture

vk::DescriptorSetLayout o2::gpu::GPUDisplayBackendVulkan::mUniformDescriptorTexture
protected

Definition at line 202 of file GPUDisplayBackendVulkan.h.

◆ mUpdateUBOdrawMatrix

uint32_t o2::gpu::GPUDisplayBackendVulkan::mUpdateUBOdrawMatrix = -1
protected

Definition at line 197 of file GPUDisplayBackendVulkan.h.

◆ mUpdateUBOmixMatrix

uint32_t o2::gpu::GPUDisplayBackendVulkan::mUpdateUBOmixMatrix = -1
protected

Definition at line 199 of file GPUDisplayBackendVulkan.h.

◆ mUpdateUBOtextMatrix

uint32_t o2::gpu::GPUDisplayBackendVulkan::mUpdateUBOtextMatrix = -1
protected

Definition at line 198 of file GPUDisplayBackendVulkan.h.

◆ mVBO

VulkanBuffer o2::gpu::GPUDisplayBackendVulkan::mVBO
protected

Definition at line 204 of file GPUDisplayBackendVulkan.h.

◆ mZActive

bool o2::gpu::GPUDisplayBackendVulkan::mZActive = false
protected

Definition at line 225 of file GPUDisplayBackendVulkan.h.

◆ mZImages

std::vector<VulkanImage> o2::gpu::GPUDisplayBackendVulkan::mZImages
protected

Definition at line 164 of file GPUDisplayBackendVulkan.h.

◆ mZSupported

bool o2::gpu::GPUDisplayBackendVulkan::mZSupported = false
protected

Definition at line 217 of file GPUDisplayBackendVulkan.h.


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