Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QRhiBufferCopyDescription Class Reference

\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h More...

#include <qrhi.h>

Collaboration diagram for QRhiBufferCopyDescription:

Public Member Functions

 QRhiBufferCopyDescription ()=default
 Constructs an empty buffer copy description.
quint32 size () const
void setSize (quint32 sz)
 Sets the number of bytes to copy to sz.
quint32 sourceOffset () const
void setSourceOffset (quint32 offset)
 Sets the source offset in bytes.
quint32 destinationOffset () const
void setDestinationOffset (quint32 offset)
 Sets the destination offset in bytes.

Detailed Description

\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h

Since
6.13

Describes a buffer-to-buffer copy operation.

A size() of 0 indicates that the entire source buffer is to be copied. A default constructed copy description therefore leads to copying the whole of the source buffer to the beginning of the destination buffer.

Note
The copied region must fit both the source and the destination buffer. When it does not, QRhiResourceUpdateBatch::copyBuffer() prints a warning and drops the operation.
size(), sourceOffset(), and destinationOffset() should all be multiples of 4. This is a requirement of the blit encoder in Metal, and it applies on macOS on Intel-based devices. Other platforms and 3D APIs, including Metal on Apple Silicon and on iOS, have no such restriction, but portable code has to assume the strictest of these. Note that a size() of 0 implies the full size of the source buffer, which is not necessarily a multiple of 4 either.
This is a RHI API with limited compatibility guarantees, see \l QRhi for details.
See also
QRhiResourceUpdateBatch::copyBuffer()

Definition at line 748 of file qrhi.h.

Constructor & Destructor Documentation

◆ QRhiBufferCopyDescription()

QRhiBufferCopyDescription::QRhiBufferCopyDescription ( )
default

Constructs an empty buffer copy description.

Member Function Documentation

◆ destinationOffset()

quint32 QRhiBufferCopyDescription::destinationOffset ( ) const
inline
Returns
the offset in bytes into the destination buffer. Defaults to 0.

Definition at line 759 of file qrhi.h.

◆ setDestinationOffset()

void QRhiBufferCopyDescription::setDestinationOffset ( quint32 offset)
inline

Sets the destination offset in bytes.

Definition at line 760 of file qrhi.h.

◆ setSize()

void QRhiBufferCopyDescription::setSize ( quint32 sz)
inline

Sets the number of bytes to copy to sz.

Definition at line 754 of file qrhi.h.

◆ setSourceOffset()

void QRhiBufferCopyDescription::setSourceOffset ( quint32 offset)
inline

Sets the source offset in bytes.

Definition at line 757 of file qrhi.h.

◆ size()

quint32 QRhiBufferCopyDescription::size ( ) const
inline
Returns
the number of bytes to copy.
Note
A size() of 0 indicates that the entire source buffer is to be copied.

Definition at line 753 of file qrhi.h.

◆ sourceOffset()

quint32 QRhiBufferCopyDescription::sourceOffset ( ) const
inline
Returns
the offset in bytes into the source buffer. Defaults to 0.

Definition at line 756 of file qrhi.h.


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