KiCad PCB EDA Suite
Loading...
Searching...
No Matches
rhi_buffer.h File Reference
#include <rhi/rhi_handle.h>
#include <cstddef>

Go to the source code of this file.

Classes

struct  RHI_BUFFER_DESC
 

Enumerations

enum class  RHI_BUFFER_TYPE { VERTEX , INDEX , UNIFORM , STORAGE }
 

Functions

constexpr bool RhiRangeWithinBuffer (size_t aOffset, size_t aSize, size_t aTotal)
 Return true when [aOffset, aOffset + aSize) lies within aTotal bytes.
 

Enumeration Type Documentation

◆ RHI_BUFFER_TYPE

enum class RHI_BUFFER_TYPE
strong
Enumerator
VERTEX 
INDEX 
UNIFORM 
STORAGE 

Definition at line 25 of file rhi_buffer.h.

Function Documentation

◆ RhiRangeWithinBuffer()

bool RhiRangeWithinBuffer ( size_t aOffset,
size_t aSize,
size_t aTotal )
constexpr

Return true when [aOffset, aOffset + aSize) lies within aTotal bytes.

The sum is never formed because a bad range could wrap size_t and admit an out-of-bounds copy.

Definition at line 44 of file rhi_buffer.h.

Referenced by RHI_VULKAN_DEVICE::ExecuteCompute(), and RHI_VULKAN_DEVICE::UpdateBuffer().