Jetson Linux API Reference

39.2 Release
NvVulkanRenderer Class Reference

Detailed Description

Definition at line 91 of file NvVulkanRenderer.h.

Inheritance diagram for NvVulkanRenderer:
Collaboration diagram for NvVulkanRenderer:

Public Member Functions

 ~NvVulkanRenderer ()
 
void initVulkan ()
 
void createInstance ()
 
void createSurface ()
 
void getPhysicalDevice ()
 
void getQueueFamilies ()
 
void createDevice ()
 
void createSwapChain ()
 
void createCommandPool ()
 
void createCommandBuffer ()
 
void createSyncObjects ()
 
void displayFrame (VkImage image)
 
void recordCommandBuffer (VkImage image, uint32_t imageIndex)
 
void createVkImageFromFd (int fd)
 
void render (int fd)
 
void setSize (uint32_t width, uint32_t height)
 
PFN_vkVoidFunction getInstanceFunction (VkInstance instance, const char *name)
 
virtual int isInError ()
 Indicates whether the element encountered an error during its operation. More...
 
void getProfilingData (NvElementProfiler::NvElementProfilerData &data)
 Gets profiling data for the element. More...
 
void printProfilingStats (std::ostream &out_stream=std::cout)
 Prints profiling data for the element to an output stream. More...
 
virtual void enableProfiling ()
 Enables profiling for the element. More...
 
bool isProfilingEnabled ()
 Checks whether profiling is enabled for the element. More...
 

Static Public Member Functions

static NvVulkanRenderer * createVulkanRenderer (const char *name, uint32_t width, uint32_t height, uint32_t x_offset, uint32_t y_offset)
 Creates a new Vulkan-based renderer named name. More...
 

Data Fields

uint32_t m_windowWidth
 
uint32_t m_windowHeight
 

Protected Attributes

int is_in_error
 Indicates if an error was encountered during the operation of the element. More...
 
const char * comp_name
 Specifies the name of the component, for debugging. More...
 
NvElementProfiler profiler
 Profiler for the element. More...
 

Constructor & Destructor Documentation

◆ ~NvVulkanRenderer()

NvVulkanRenderer::~NvVulkanRenderer ( )

Member Function Documentation

◆ createCommandBuffer()

void NvVulkanRenderer::createCommandBuffer ( )

◆ createCommandPool()

void NvVulkanRenderer::createCommandPool ( )

◆ createDevice()

void NvVulkanRenderer::createDevice ( )

◆ createInstance()

void NvVulkanRenderer::createInstance ( )

◆ createSurface()

void NvVulkanRenderer::createSurface ( )

◆ createSwapChain()

void NvVulkanRenderer::createSwapChain ( )

◆ createSyncObjects()

void NvVulkanRenderer::createSyncObjects ( )

◆ createVkImageFromFd()

void NvVulkanRenderer::createVkImageFromFd ( int  fd)

◆ createVulkanRenderer()

static NvVulkanRenderer* NvVulkanRenderer::createVulkanRenderer ( const char *  name,
uint32_t  width,
uint32_t  height,
uint32_t  x_offset,
uint32_t  y_offset 
)
static

Creates a new Vulkan-based renderer named name.

This method creates a new X window for rendering, of size width and height, that is offset by x_offset and y_offset. If width or height is zero, a full screen window is created with x_offset and y_offset set to zero.

Parameters
[in]nameSpecifies a pointer to a unique name to identity the element instance.
[in]widthSpecifies the width of the window in pixels.
[in]heightSpecifies the height of the window in pixels.
[in]x_offsetSpecifies the horizontal offset of the window in pixels.
[in]y_offsetSpecifies the vertical offset of the window in pixels.
Returns
A reference to the newly created renderer object, otherwise NULL in case of failure during initialization.

◆ displayFrame()

void NvVulkanRenderer::displayFrame ( VkImage  image)

◆ enableProfiling()

virtual void NvElement::enableProfiling ( )
virtualinherited

Enables profiling for the element.

Reimplemented in NvV4l2Element.

◆ getInstanceFunction()

PFN_vkVoidFunction NvVulkanRenderer::getInstanceFunction ( VkInstance  instance,
const char *  name 
)

◆ getPhysicalDevice()

void NvVulkanRenderer::getPhysicalDevice ( )

◆ getProfilingData()

void NvElement::getProfilingData ( NvElementProfiler::NvElementProfilerData &  data)
inherited

Gets profiling data for the element.

Returns
A constant reference to the element's profiling data.

◆ getQueueFamilies()

void NvVulkanRenderer::getQueueFamilies ( )

◆ initVulkan()

void NvVulkanRenderer::initVulkan ( )

◆ isInError()

virtual int NvElement::isInError ( )
inlinevirtualinherited

Indicates whether the element encountered an error during its operation.

Returns
0 if no error was encountered, a non-zero value if an error was encountered.

Reimplemented in NvV4l2Element.

Definition at line 72 of file NvElement.h.

References NvElement::is_in_error.

◆ isProfilingEnabled()

bool NvElement::isProfilingEnabled ( )
inherited

Checks whether profiling is enabled for the element.

Returns
Boolean value indicating if profiling is enabled.

◆ printProfilingStats()

void NvElement::printProfilingStats ( std::ostream &  out_stream = std::cout)
inherited

Prints profiling data for the element to an output stream.

Parameters
[in]out_streamOutput stream of type std::ostream to print the data to. It takes the default value std::cout if not specified.

◆ recordCommandBuffer()

void NvVulkanRenderer::recordCommandBuffer ( VkImage  image,
uint32_t  imageIndex 
)

◆ render()

void NvVulkanRenderer::render ( int  fd)

◆ setSize()

void NvVulkanRenderer::setSize ( uint32_t  width,
uint32_t  height 
)

Field Documentation

◆ comp_name

const char* NvElement::comp_name
protectedinherited

Specifies the name of the component, for debugging.

Definition at line 122 of file NvElement.h.

◆ is_in_error

int NvElement::is_in_error
protectedinherited

Indicates if an error was encountered during the operation of the element.

Definition at line 120 of file NvElement.h.

Referenced by NvElement::isInError().

◆ m_windowHeight

uint32_t NvVulkanRenderer::m_windowHeight

Definition at line 204 of file NvVulkanRenderer.h.

◆ m_windowWidth

uint32_t NvVulkanRenderer::m_windowWidth

Definition at line 203 of file NvVulkanRenderer.h.

◆ profiler

NvElementProfiler NvElement::profiler
protectedinherited

Profiler for the element.

Definition at line 124 of file NvElement.h.


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