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
QRhiD3D11 Class Reference

#include <qrhid3d11_p.h>

Inheritance diagram for QRhiD3D11:
Collaboration diagram for QRhiD3D11:

Classes

struct  OffscreenFrame
struct  TextureReadback
struct  BufferReadback
struct  Shader
struct  BytecodeCacheKey
struct  [struct].contextState

Public Member Functions

 QRhiD3D11 (QRhiD3D11InitParams *paramsparams, QRhiD3D11NativeHandles *importDevice=nullptr)
bool create (QRhi::Flags flagsflags) override
void destroy () override
QRhi::AdapterList enumerateAdaptersBeforeCreate (QRhiNativeHandles *nativeHandles) const override
QRhiGraphicsPipeline * createGraphicsPipeline () override
QRhiComputePipeline * createComputePipeline () override
QRhiShaderResourceBindings * createShaderResourceBindings () override
QRhiBuffer * createBuffer (QRhiBuffer::Type typetype, QRhiBuffer::UsageFlags usageusage, quint32 sizesize) override
QRhiRenderBuffer * createRenderBuffer (QRhiRenderBuffer::Type typetype, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flagsflags, QRhiTexture::Format backingFormatHint) override
QRhiTexture * createTexture (QRhiTexture::Format formatformat, const QSize &pixelSize, int depthdepth, int arraySize, int sampleCount, QRhiTexture::Flags flagsflags) override
QRhiSampler * createSampler (QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode u, QRhiSampler::AddressMode vv, QRhiSampler::AddressMode ww) override
QRhiTextureRenderTarget * createTextureRenderTarget (const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flagsflags) override
QRhiShadingRateMap * createShadingRateMap () override
QRhiSwapChain * createSwapChain () override
QRhi::FrameOpResult beginFrame (QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flagsflags) override
QRhi::FrameOpResult endFrame (QRhiSwapChain *swapChain, QRhi::EndFrameFlags flagsflags) override
QRhi::FrameOpResult beginOffscreenFrame (QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flagsflags) override
QRhi::FrameOpResult endOffscreenFrame (QRhi::EndFrameFlags flagsflags) override
QRhi::FrameOpResult finish () override
void resourceUpdate (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void beginPass (QRhiCommandBuffer *cb, QRhiRenderTarget *rt, const QColor &colorClearValue, const QRhiDepthStencilClearValue &depthStencilClearValue, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flagsflags) override
void endPass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void setGraphicsPipeline (QRhiCommandBuffer *cb, QRhiGraphicsPipeline *ps) override
void setShaderResources (QRhiCommandBuffer *cb, QRhiShaderResourceBindings *srb, int dynamicOffsetCount, const QRhiCommandBuffer::DynamicOffset *dynamicOffsets) override
void setVertexInput (QRhiCommandBuffer *cb, int startBinding, int bindingCount, const QRhiCommandBuffer::VertexInput *bindings, QRhiBuffer *indexBuf, quint32 indexOffset, QRhiCommandBuffer::IndexFormat indexFormat) override
void setViewport (QRhiCommandBuffer *cb, const QRhiViewport &viewport) override
void setScissor (QRhiCommandBuffer *cb, const QRhiScissor &scissor) override
void setBlendConstants (QRhiCommandBuffer *cb, const QColor &cc) override
void setStencilRef (QRhiCommandBuffer *cb, quint32 refValue) override
void setPushConstants (QRhiCommandBuffer *cb, quint32 offsetoffset, quint32 sizesize, const void *datadata) override
bool ensurePushConstantBuffer ()
void setShadingRate (QRhiCommandBuffer *cb, const QSize &coarsePixelSize) override
void draw (QRhiCommandBuffer *cb, quint32 vertexCount, quint32 instanceCount, quint32 firstVertex, quint32 firstInstance) override
void drawIndexed (QRhiCommandBuffer *cb, quint32 indexCount, quint32 instanceCount, quint32 firstIndex, qint32 vertexOffset, quint32 firstInstance) override
void drawIndirect (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCountdrawCount, quint32 stridestride) override
void drawIndexedIndirect (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCountdrawCount, quint32 stridestride) override
void debugMarkBegin (QRhiCommandBuffer *cb, const QByteArray &namename) override
void debugMarkEnd (QRhiCommandBuffer *cb) override
void debugMarkMsg (QRhiCommandBuffer *cb, const QByteArray &msg) override
void beginComputePass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flagsflags) override
void endComputePass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void setComputePipeline (QRhiCommandBuffer *cb, QRhiComputePipeline *ps) override
void dispatch (QRhiCommandBuffer *cb, int xx, int yy, int zz) override
void dispatchIndirect (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset) override
void drawIndirectCount (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, QRhiBuffer *countBuffer, quint32 countBufferOffset, quint32 maxDrawCountmaxDrawCount, quint32 stridestride) override
void drawIndexedIndirectCount (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, QRhiBuffer *countBuffer, quint32 countBufferOffset, quint32 maxDrawCountmaxDrawCount, quint32 stridestride) override
const QRhiNativeHandles * nativeHandles (QRhiCommandBuffer *cb) override
void beginExternal (QRhiCommandBuffer *cb) override
void endExternal (QRhiCommandBuffer *cb) override
double lastCompletedGpuTime (QRhiCommandBuffer *cb) override
QList< int > supportedSampleCounts () const override
QList< QSize > supportedShadingRates (int sampleCount) const override
int ubufAlignment () const override
bool isYUpInFramebuffer () const override
bool isYUpInNDC () const override
bool isClipDepthZeroToOne () const override
QMatrix4x4 clipSpaceCorrMatrix () const override
bool isTextureFormatSupported (QRhiTexture::Format formatformat, QRhiTexture::Flags flagsflags) const override
bool isFeatureSupported (QRhi::Feature feature) const override
int resourceLimit (QRhi::ResourceLimit limitlimit) const override
const QRhiNativeHandles * nativeHandles () override
QRhiDriverInfo driverInfo () const override
QRhiStats statistics () override
bool makeThreadLocalNativeContextCurrent () override
void setQueueSubmitParams (QRhiNativeHandles *paramsparams) override
void releaseCachedResources () override
bool isDeviceLost () const override
QByteArray pipelineCacheData () override
void setPipelineCacheData (const QByteArray &datadata) override
void enqueueSubresUpload (QD3D11Texture *texD, QD3D11CommandBuffer *cbD, int layerlayer, int levellevel, const QRhiTextureSubresourceUploadDescription &subresDesc)
void enqueueResourceUpdates (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
void updateShaderResourceBindings (QD3D11ShaderResourceBindings *srbD, const QShader::NativeResourceBindingMap *nativeResourceBindingMaps[], uint pushConstantStages)
void executeBufferHostWrites (QD3D11Buffer *bufD)
void bindShaderResources (QD3D11CommandBuffer *cbD, const QD3D11ShaderResourceBindings::ResourceBatches &allResourceBatches, const uint *dynOfsPairs, int dynOfsPairCount, bool offsetOnlyChange, QD3D11RenderTargetUavUpdateState *rtUavState)
void resetShaderResources (QD3D11CommandBuffer *cbD, QD3D11RenderTargetUavUpdateState *rtUavState)
void executeCommandBuffer (QD3D11CommandBuffer *cbD)
DXGI_SAMPLE_DESC effectiveSampleDesc (int sampleCount) const
void finishActiveReadbacks ()
void reportLiveObjects (ID3D11Device *device)
void clearShaderCache ()
QByteArray compileHlslShaderSource (const QShader &shadershader, QShader::Variant shaderVariant, uint flagsflags, QString *error, QShaderKey *usedShaderKey)
bool ensureDirectCompositionDevice ()
Public Member Functions inherited from QRhiImplementation
virtual ~QRhiImplementation ()
virtual QRhiIndirectCommandBuffer * createIndirectCommandBuffer (QRhiIndirectCommandBuffer::Type typetype, quint32 maxCommandCount)
virtual void buildIndirect (QRhiCommandBuffer *cb, QRhiIndirectCommandBuffer *icb, const QRhiIndirectCommandBufferBuildInfo &info)
virtual void executeIndirect (QRhiCommandBuffer *cb, QRhiIndirectCommandBuffer *icb, quint32 firstCommand, quint32 commandCount)
virtual void commitIndirectCommandBuffer (QRhiResourceUpdateBatch *u, QRhiIndirectCommandBuffer *icb)
void prepareForCreate (QRhi *rhi, QRhi::Implementation impl, QRhi::Flags flagsflags, QRhiAdapter *adapter)
bool isCompressedFormat (QRhiTexture::Format formatformat) const
bool compressedFormatInfo (QRhiTexture::Format formatformat, const QSize &sizesize, quint32 *bpl, quint32 *byteSize, QSize *blockDim) const
bool textureFormatInfo (QRhiTexture::Format formatformat, const QSize &sizesize, quint32 *bpl, quint32 *byteSize, quint32 *bytesPerPixel) const
bool isStencilSupportingFormat (QRhiTexture::Format formatformat) const
void registerResource (QRhiResource *resres, bool ownsNativeResources=true)
void unregisterResource (QRhiResource *resres)
void addDeleteLater (QRhiResource *resres)
void addCleanupCallback (const QRhi::CleanupCallback &callback)
void addCleanupCallback (const void *keykey, const QRhi::CleanupCallback &callback)
void removeCleanupCallback (const void *keykey)
bool sanityCheckGraphicsPipeline (QRhiGraphicsPipeline *ps)
bool sanityCheckShaderResourceBindings (QRhiShaderResourceBindings *srb)
bool sanityCheckResourceOwnership (QRhiResource *maybeResource)
void updateLayoutDesc (QRhiShaderResourceBindings *srb)
quint32 pipelineCacheRhiId () const
void pipelineCreationStart ()
void pipelineCreationEnd ()
qint64 totalPipelineCreationTime () const
QRhiVertexInputAttribute::Format shaderDescVariableFormatToVertexInputFormat (QShaderDescription::VariableType typetype) const
quint32 byteSizePerVertexForVertexInputFormat (QRhiVertexInputAttribute::Format formatformat) const
int effectiveSampleCount (int sampleCount) const
QSize clampedSubResourceUploadSize (QSize sizesize, QPoint dstPos, int levellevel, QSize textureSizeAtLevelZero, bool warn=true)
QSize clampedSubResourceUploadSizeForSourceData (QSize sizesize, quint32 bpl, quint32 bytesPerPixel, qsizetype dataSizedataSize, bool warn=true)
void runCleanup ()

Public Attributes

QRhi::Flags rhiFlags
bool debugLayer = false
UINT maxFrameLatency = 2
bool importedDeviceAndContext = false
ID3D11Device * dev = nullptr
ID3D11DeviceContext1 * context = nullptr
D3D_FEATURE_LEVEL featureLevel = D3D_FEATURE_LEVEL(0)
LUID adapterLuid = {}
ID3DUserDefinedAnnotation * annotations = nullptr
IDXGIAdapter1 * activeAdapter = nullptr
IDXGIFactory1 * dxgiFactory = nullptr
IDCompositionDevice * dcompDevice = nullptr
bool supportsAllowTearing = false
bool useLegacySwapchainModel = false
bool deviceLost = false
QRhiD3D11NativeHandles nativeHandlesStruct
QRhiDriverInfo driverInfoStruct
struct  contextState
ID3D11Buffer * pushConstantBuffer = nullptr
struct QRhiD3D11::OffscreenFrame ofr
QVarLengthArray< TextureReadback, 2 > activeTextureReadbacks
QVarLengthArray< BufferReadback, 2 > activeBufferReadbacks
QHash< QRhiShaderStage, Shader > m_shaderCache
QRhiBinaryCache< BytecodeCacheKey, QByteArray > m_bytecodeCache { "Bytecode cache" }
Public Attributes inherited from QRhiImplementation
QRhi * q
bool debugMarkers = false
bool timestamps = false
int currentFrameSlot = 0
bool inFrame = false
QRhiCommandBuffer * currentOffscreenCb = nullptr
QRhiAdapter * requestedRhiAdapter = nullptr
QHash< QRhiResource *, bool > resources

Static Public Attributes

static constexpr quint32 MAX_PUSH_CONSTANTS_SIZE = 128
Static Public Attributes inherited from QRhiImplementation
static const int MAX_SHADER_CACHE_ENTRIES = 128
static const quint32 MAX_BINARY_CACHE_BYTES = 16 * 1024 * 1024

Additional Inherited Members

Static Public Member Functions inherited from QRhiImplementation
static QRhiImplementation * newInstance (QRhi::Implementation impl, QRhiInitParams *paramsparams, QRhiNativeHandles *importDevice)
static const QRhiShaderResourceBinding::Data * shaderResourceBindingData (const QRhiShaderResourceBinding &binding)
static QRhiShaderResourceBinding::Data * shaderResourceBindingData (QRhiShaderResourceBinding &binding)
static bool sortedBindingLessThan (const QRhiShaderResourceBinding &aa, const QRhiShaderResourceBinding &bb)

Detailed Description

Definition at line 772 of file qrhid3d11_p.h.

Constructor & Destructor Documentation

◆ QRhiD3D11()

QRhiD3D11::QRhiD3D11 ( QRhiD3D11InitParams * params,
QRhiD3D11NativeHandles * importDevice = nullptr )

Definition at line 159 of file qrhid3d11.cpp.

References QRhiD3D11(), debugLayer, and importedDeviceAndContext.

Referenced by QRhiD3D11().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ beginComputePass()

void QRhiD3D11::beginComputePass ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates,
QRhiCommandBuffer::BeginPassFlags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 2566 of file qrhid3d11.cpp.

References QD3D11CommandBuffer::Command::cmd, QD3D11CommandBuffer::ComputePass, enqueueResourceUpdates(), QD3D11CommandBuffer::NoPass, QD3D11CommandBuffer::recordingPass, QD3D11CommandBuffer::resetCachedState(), QD3D11CommandBuffer::Command::ResetShaderResources, and QD3D11CommandBuffer::Command::SetRenderTarget.

Here is the call graph for this function:

◆ beginExternal()

void QRhiD3D11::beginExternal ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 1592 of file qrhid3d11.cpp.

References executeCommandBuffer(), and QD3D11CommandBuffer::resetCommands().

Here is the call graph for this function:

◆ beginFrame()

QRhi::FrameOpResult QRhiD3D11::beginFrame ( QRhiSwapChain * swapChain,
QRhi::BeginFrameFlags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 1618 of file qrhid3d11.cpp.

References QD3D11CommandBuffer::Command::BeginFrame, QD3D11CommandBuffer::Command::cmd, QD3D11SwapChain::currentFrameSlot, QD3D11SwapChain::currentTimestampPairIndex, QD3D11SwapChain::ds, finishActiveReadbacks(), and QD3D11SwapChain::lastFrameLatencyWaitSlot.

Here is the call graph for this function:

◆ beginOffscreenFrame()

QRhi::FrameOpResult QRhiD3D11::beginOffscreenFrame ( QRhiCommandBuffer ** cb,
QRhi::BeginFrameFlags flags )
overridevirtual

◆ beginPass()

void QRhiD3D11::beginPass ( QRhiCommandBuffer * cb,
QRhiRenderTarget * rt,
const QColor & colorClearValue,
const QRhiDepthStencilClearValue & depthStencilClearValue,
QRhiResourceUpdateBatch * resourceUpdates,
QRhiCommandBuffer::BeginPassFlags flags )
overridevirtual

◆ bindShaderResources()

void QRhiD3D11::bindShaderResources ( QD3D11CommandBuffer * cbD,
const QD3D11ShaderResourceBindings::ResourceBatches & allResourceBatches,
const uint * dynOfsPairs,
int dynOfsPairCount,
bool offsetOnlyChange,
QD3D11RenderTargetUavUpdateState * rtUavState )

Definition at line 3118 of file qrhid3d11.cpp.

References QD3D11CommandBuffer::MAX_DYNAMIC_OFFSET_COUNT.

Referenced by executeCommandBuffer().

Here is the caller graph for this function:

◆ clearShaderCache()

void QRhiD3D11::clearShaderCache ( )

Definition at line 424 of file qrhid3d11.cpp.

Referenced by QD3D11ComputePipeline::create(), destroy(), and releaseCachedResources().

Here is the caller graph for this function:

◆ clipSpaceCorrMatrix()

QMatrix4x4 QRhiD3D11::clipSpaceCorrMatrix ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 601 of file qrhid3d11.cpp.

◆ compileHlslShaderSource()

QByteArray QRhiD3D11::compileHlslShaderSource ( const QShader & shader,
QShader::Variant shaderVariant,
uint flags,
QString * error,
QShaderKey * usedShaderKey )

Definition at line 5029 of file qrhid3d11.cpp.

References QRhiD3D11::BytecodeCacheKey::compileFlags.

◆ create()

bool QRhiD3D11::create ( QRhi::Flags flags)
overridevirtual

Implements QRhiImplementation.

Definition at line 200 of file qrhid3d11.cpp.

References debugLayer, deviceLost, QRhiD3D::fillDriverInfo(), importedDeviceAndContext, supportsAllowTearing, and useLegacySwapchainModel.

Here is the call graph for this function:

◆ createBuffer()

QRhiBuffer * QRhiD3D11::createBuffer ( QRhiBuffer::Type type,
QRhiBuffer::UsageFlags usage,
quint32 size )
overridevirtual

Implements QRhiImplementation.

Definition at line 576 of file qrhid3d11.cpp.

◆ createComputePipeline()

QRhiComputePipeline * QRhiD3D11::createComputePipeline ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1011 of file qrhid3d11.cpp.

◆ createGraphicsPipeline()

QRhiGraphicsPipeline * QRhiD3D11::createGraphicsPipeline ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1006 of file qrhid3d11.cpp.

◆ createRenderBuffer()

QRhiRenderBuffer * QRhiD3D11::createRenderBuffer ( QRhiRenderBuffer::Type type,
const QSize & pixelSize,
int sampleCount,
QRhiRenderBuffer::Flags flags,
QRhiTexture::Format backingFormatHint )
overridevirtual

Implements QRhiImplementation.

Definition at line 974 of file qrhid3d11.cpp.

◆ createSampler()

QRhiSampler * QRhiD3D11::createSampler ( QRhiSampler::Filter magFilter,
QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
QRhiSampler::AddressMode u,
QRhiSampler::AddressMode v,
QRhiSampler::AddressMode w )
overridevirtual

Implements QRhiImplementation.

Definition at line 988 of file qrhid3d11.cpp.

◆ createShaderResourceBindings()

QRhiShaderResourceBindings * QRhiD3D11::createShaderResourceBindings ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1016 of file qrhid3d11.cpp.

◆ createShadingRateMap()

QRhiShadingRateMap * QRhiD3D11::createShadingRateMap ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1001 of file qrhid3d11.cpp.

◆ createSwapChain()

QRhiSwapChain * QRhiD3D11::createSwapChain ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 571 of file qrhid3d11.cpp.

◆ createTexture()

QRhiTexture * QRhiD3D11::createTexture ( QRhiTexture::Format format,
const QSize & pixelSize,
int depth,
int arraySize,
int sampleCount,
QRhiTexture::Flags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 981 of file qrhid3d11.cpp.

◆ createTextureRenderTarget()

QRhiTextureRenderTarget * QRhiD3D11::createTextureRenderTarget ( const QRhiTextureRenderTargetDescription & desc,
QRhiTextureRenderTarget::Flags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 995 of file qrhid3d11.cpp.

◆ debugMarkBegin()

void QRhiD3D11::debugMarkBegin ( QRhiCommandBuffer * cb,
const QByteArray & name )
overridevirtual

◆ debugMarkEnd()

void QRhiD3D11::debugMarkEnd ( QRhiCommandBuffer * cb)
overridevirtual

◆ debugMarkMsg()

void QRhiD3D11::debugMarkMsg ( QRhiCommandBuffer * cb,
const QByteArray & msg )
overridevirtual

◆ destroy()

void QRhiD3D11::destroy ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 432 of file qrhid3d11.cpp.

References clearShaderCache(), finishActiveReadbacks(), and importedDeviceAndContext.

Here is the call graph for this function:

◆ dispatch()

void QRhiD3D11::dispatch ( QRhiCommandBuffer * cb,
int x,
int y,
int z )
overridevirtual

◆ dispatchIndirect()

void QRhiD3D11::dispatchIndirect ( QRhiCommandBuffer * cb,
QRhiBuffer * indirectBuffer,
quint32 indirectBufferOffset )
overridevirtual

◆ draw()

void QRhiD3D11::draw ( QRhiCommandBuffer * cb,
quint32 vertexCount,
quint32 instanceCount,
quint32 firstVertex,
quint32 firstInstance )
overridevirtual

◆ drawIndexed()

void QRhiD3D11::drawIndexed ( QRhiCommandBuffer * cb,
quint32 indexCount,
quint32 instanceCount,
quint32 firstIndex,
qint32 vertexOffset,
quint32 firstInstance )
overridevirtual

◆ drawIndexedIndirect()

void QRhiD3D11::drawIndexedIndirect ( QRhiCommandBuffer * cb,
QRhiBuffer * indirectBuffer,
quint32 indirectBufferOffset,
quint32 drawCount,
quint32 stride )
overridevirtual

◆ drawIndexedIndirectCount()

void QRhiD3D11::drawIndexedIndirectCount ( QRhiCommandBuffer * cb,
QRhiBuffer * indirectBuffer,
quint32 indirectBufferOffset,
QRhiBuffer * countBuffer,
quint32 countBufferOffset,
quint32 maxDrawCount,
quint32 stride )
overridevirtual

Implements QRhiImplementation.

Definition at line 2659 of file qrhid3d11.cpp.

◆ drawIndirect()

void QRhiD3D11::drawIndirect ( QRhiCommandBuffer * cb,
QRhiBuffer * indirectBuffer,
quint32 indirectBufferOffset,
quint32 drawCount,
quint32 stride )
overridevirtual

◆ drawIndirectCount()

void QRhiD3D11::drawIndirectCount ( QRhiCommandBuffer * cb,
QRhiBuffer * indirectBuffer,
quint32 indirectBufferOffset,
QRhiBuffer * countBuffer,
quint32 countBufferOffset,
quint32 maxDrawCount,
quint32 stride )
overridevirtual

Implements QRhiImplementation.

Definition at line 2644 of file qrhid3d11.cpp.

◆ driverInfo()

QRhiDriverInfo QRhiD3D11::driverInfo ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 805 of file qrhid3d11.cpp.

◆ effectiveSampleDesc()

DXGI_SAMPLE_DESC QRhiD3D11::effectiveSampleDesc ( int sampleCount) const

Definition at line 554 of file qrhid3d11.cpp.

◆ endComputePass()

void QRhiD3D11::endComputePass ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates )
overridevirtual

Implements QRhiImplementation.

Definition at line 2591 of file qrhid3d11.cpp.

References QD3D11CommandBuffer::ComputePass, enqueueResourceUpdates(), QD3D11CommandBuffer::NoPass, and QD3D11CommandBuffer::recordingPass.

Here is the call graph for this function:

◆ endExternal()

void QRhiD3D11::endExternal ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 1599 of file qrhid3d11.cpp.

References QD3D11CommandBuffer::Command::cmd, QD3D11CommandBuffer::resetCachedState(), rtData(), and QD3D11CommandBuffer::Command::SetRenderTarget.

Here is the call graph for this function:

◆ endFrame()

QRhi::FrameOpResult QRhiD3D11::endFrame ( QRhiSwapChain * swapChain,
QRhi::EndFrameFlags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 1668 of file qrhid3d11.cpp.

References QD3D11SwapChain::BUFFER_COUNT, QD3D11CommandBuffer::Command::cmd, QD3D11SwapChain::currentFrameSlot, QD3D11SwapChain::currentTimestampPairIndex, deviceLost, QD3D11CommandBuffer::Command::EndFrame, executeCommandBuffer(), QD3D11SwapChain::frameCount, and QD3D11SwapChainTimestamps::TIMESTAMP_PAIRS.

Here is the call graph for this function:

◆ endOffscreenFrame()

QRhi::FrameOpResult QRhiD3D11::endOffscreenFrame ( QRhi::EndFrameFlags flags)
overridevirtual

Implements QRhiImplementation.

Definition at line 1775 of file qrhid3d11.cpp.

References QD3D11CommandBuffer::Command::cmd, QD3D11CommandBuffer::Command::EndFrame, executeCommandBuffer(), and finishActiveReadbacks().

Here is the call graph for this function:

◆ endPass()

void QRhiD3D11::endPass ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates )
overridevirtual

Implements QRhiImplementation.

Definition at line 2496 of file qrhid3d11.cpp.

References QD3D11CommandBuffer::Command::cmd, enqueueResourceUpdates(), QD3D11Texture::mipLevelCount, QD3D11CommandBuffer::NoPass, QD3D11CommandBuffer::recordingPass, QD3D11CommandBuffer::RenderPass, and QD3D11CommandBuffer::Command::ResolveSubRes.

Here is the call graph for this function:

◆ enqueueResourceUpdates()

void QRhiD3D11::enqueueResourceUpdates ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates )

Definition at line 2076 of file qrhid3d11.cpp.

References QRhiResourceUpdateBatchPrivate::activeBufferOpCount, QRhiResourceUpdateBatchPrivate::activeTextureOpCount, QRhiResourceUpdateBatchPrivate::BufferOp::Clear, QD3D11CommandBuffer::Command::ClearUav, QD3D11CommandBuffer::Command::cmd, QRhiResourceUpdateBatchPrivate::BufferOp::Copy, QRhiResourceUpdateBatchPrivate::TextureOp::Copy, QD3D11CommandBuffer::Command::CopySubRes, QD3D11SwapChain::currentFrameSlot, QRhiResourceUpdateBatchPrivate::TextureOp::dst, QRhiResourceUpdateBatchPrivate::BufferOp::DynamicUpdate, QD3D11Buffer::dynBuf, QRhiResourceUpdateBatchPrivate::free(), QD3D11CommandBuffer::Command::GenMip, QRhiResourceUpdateBatchPrivate::TextureOp::GenMips, QRhiResourceUpdateBatchPrivate::get(), QD3D11Buffer::hasPendingDynamicUpdates, QD3D11Texture::mipLevelCount, QRhiResourceUpdateBatchPrivate::BufferOp::Read, QRhiResourceUpdateBatchPrivate::TextureOp::Read, QD3D11CommandBuffer::Command::ResolveSubRes, QRhiResourceUpdateBatchPrivate::TextureOp::src, QRhiResourceUpdateBatchPrivate::BufferOp::StaticUpload, QRhiResourceUpdateBatchPrivate::BufferOp::type, QRhiResourceUpdateBatchPrivate::TextureOp::type, QD3D11CommandBuffer::Command::UpdateSubRes, and QRhiResourceUpdateBatchPrivate::TextureOp::Upload.

Referenced by beginComputePass(), beginPass(), endComputePass(), endPass(), and resourceUpdate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enqueueSubresUpload()

void QRhiD3D11::enqueueSubresUpload ( QD3D11Texture * texD,
QD3D11CommandBuffer * cbD,
int layer,
int level,
const QRhiTextureSubresourceUploadDescription & subresDesc )

◆ ensureDirectCompositionDevice()

bool QRhiD3D11::ensureDirectCompositionDevice ( )

Definition at line 5731 of file qrhid3d11.cpp.

Referenced by QD3D11SwapChain::createOrResize().

Here is the caller graph for this function:

◆ ensurePushConstantBuffer()

bool QRhiD3D11::ensurePushConstantBuffer ( )

Definition at line 1458 of file qrhid3d11.cpp.

Referenced by setPushConstants().

Here is the caller graph for this function:

◆ enumerateAdaptersBeforeCreate()

QRhi::AdapterList QRhiD3D11::enumerateAdaptersBeforeCreate ( QRhiNativeHandles * nativeHandles) const
overridevirtual

Reimplemented from QRhiImplementation.

Definition at line 501 of file qrhid3d11.cpp.

◆ executeBufferHostWrites()

void QRhiD3D11::executeBufferHostWrites ( QD3D11Buffer * bufD)

Definition at line 3002 of file qrhid3d11.cpp.

References QD3D11Buffer::dynBuf, and QD3D11Buffer::hasPendingDynamicUpdates.

Referenced by QD3D11Buffer::nativeBuffer(), setShaderResources(), and setVertexInput().

Here is the caller graph for this function:

◆ executeCommandBuffer()

◆ finish()

QRhi::FrameOpResult QRhiD3D11::finish ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1964 of file qrhid3d11.cpp.

References executeCommandBuffer(), finishActiveReadbacks(), and QD3D11CommandBuffer::NoPass.

Here is the call graph for this function:

◆ finishActiveReadbacks()

void QRhiD3D11::finishActiveReadbacks ( )

Definition at line 2353 of file qrhid3d11.cpp.

Referenced by beginFrame(), destroy(), endOffscreenFrame(), and finish().

Here is the caller graph for this function:

◆ isClipDepthZeroToOne()

bool QRhiD3D11::isClipDepthZeroToOne ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 596 of file qrhid3d11.cpp.

◆ isDeviceLost()

bool QRhiD3D11::isDeviceLost ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 834 of file qrhid3d11.cpp.

References deviceLost.

◆ isFeatureSupported()

bool QRhiD3D11::isFeatureSupported ( QRhi::Feature feature) const
overridevirtual

Implements QRhiImplementation.

Definition at line 623 of file qrhid3d11.cpp.

◆ isTextureFormatSupported()

bool QRhiD3D11::isTextureFormatSupported ( QRhiTexture::Format format,
QRhiTexture::Flags flags ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 613 of file qrhid3d11.cpp.

◆ isYUpInFramebuffer()

bool QRhiD3D11::isYUpInFramebuffer ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 586 of file qrhid3d11.cpp.

◆ isYUpInNDC()

bool QRhiD3D11::isYUpInNDC ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 591 of file qrhid3d11.cpp.

◆ lastCompletedGpuTime()

double QRhiD3D11::lastCompletedGpuTime ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 1612 of file qrhid3d11.cpp.

References QD3D11CommandBuffer::lastGpuTime.

◆ makeThreadLocalNativeContextCurrent()

bool QRhiD3D11::makeThreadLocalNativeContextCurrent ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 817 of file qrhid3d11.cpp.

◆ nativeHandles() [1/2]

const QRhiNativeHandles * QRhiD3D11::nativeHandles ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 800 of file qrhid3d11.cpp.

◆ nativeHandles() [2/2]

const QRhiNativeHandles * QRhiD3D11::nativeHandles ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 1586 of file qrhid3d11.cpp.

◆ pipelineCacheData()

QByteArray QRhiD3D11::pipelineCacheData ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 848 of file qrhid3d11.cpp.

References QRhiD3D11::BytecodeCacheKey::compileFlags.

◆ releaseCachedResources()

void QRhiD3D11::releaseCachedResources ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 828 of file qrhid3d11.cpp.

References clearShaderCache().

Here is the call graph for this function:

◆ reportLiveObjects()

void QRhiD3D11::reportLiveObjects ( ID3D11Device * device)

Definition at line 491 of file qrhid3d11.cpp.

◆ resetShaderResources()

void QRhiD3D11::resetShaderResources ( QD3D11CommandBuffer * cbD,
QD3D11RenderTargetUavUpdateState * rtUavState )

Definition at line 3167 of file qrhid3d11.cpp.

Referenced by executeCommandBuffer().

Here is the caller graph for this function:

◆ resourceLimit()

int QRhiD3D11::resourceLimit ( QRhi::ResourceLimit limit) const
overridevirtual

Implements QRhiImplementation.

Definition at line 749 of file qrhid3d11.cpp.

◆ resourceUpdate()

void QRhiD3D11::resourceUpdate ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates )
overridevirtual

Implements QRhiImplementation.

Definition at line 2437 of file qrhid3d11.cpp.

References enqueueResourceUpdates().

Here is the call graph for this function:

◆ setBlendConstants()

void QRhiD3D11::setBlendConstants ( QRhiCommandBuffer * cb,
const QColor & c )
overridevirtual

◆ setComputePipeline()

◆ setGraphicsPipeline()

◆ setPipelineCacheData()

void QRhiD3D11::setPipelineCacheData ( const QByteArray & data)
overridevirtual

Implements QRhiImplementation.

Definition at line 915 of file qrhid3d11.cpp.

References QRhiD3D11::BytecodeCacheKey::compileFlags.

◆ setPushConstants()

void QRhiD3D11::setPushConstants ( QRhiCommandBuffer * cb,
quint32 offset,
quint32 size,
const void * data )
overridevirtual

Implements QRhiImplementation.

Definition at line 1402 of file qrhid3d11.cpp.

References QD3D11CommandBuffer::Command::cmd, QD3D11CommandBuffer::ComputePass, ensurePushConstantBuffer(), QD3D11CommandBuffer::NoPass, RBM_COMPUTE, QD3D11CommandBuffer::recordingPass, and QD3D11CommandBuffer::Command::SetPushConstants.

Here is the call graph for this function:

◆ setQueueSubmitParams()

void QRhiD3D11::setQueueSubmitParams ( QRhiNativeHandles * params)
overridevirtual

Implements QRhiImplementation.

Definition at line 823 of file qrhid3d11.cpp.

◆ setScissor()

◆ setShaderResources()

◆ setShadingRate()

void QRhiD3D11::setShadingRate ( QRhiCommandBuffer * cb,
const QSize & coarsePixelSize )
overridevirtual

Implements QRhiImplementation.

Definition at line 1478 of file qrhid3d11.cpp.

◆ setStencilRef()

◆ setVertexInput()

void QRhiD3D11::setVertexInput ( QRhiCommandBuffer * cb,
int startBinding,
int bindingCount,
const QRhiCommandBuffer::VertexInput * bindings,
QRhiBuffer * indexBuf,
quint32 indexOffset,
QRhiCommandBuffer::IndexFormat indexFormat )
overridevirtual

Implements QRhiImplementation.

Definition at line 1264 of file qrhid3d11.cpp.

References QD3D11CommandBuffer::Command::BindIndexBuffer, QD3D11CommandBuffer::Command::BindVertexBuffers, QD3D11CommandBuffer::Command::cmd, executeBufferHostWrites(), QD3D11CommandBuffer::MAX_VERTEX_BUFFER_BINDING_COUNT, QD3D11CommandBuffer::recordingPass, and QD3D11CommandBuffer::RenderPass.

Here is the call graph for this function:

◆ setViewport()

◆ statistics()

QRhiStats QRhiD3D11::statistics ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 810 of file qrhid3d11.cpp.

◆ supportedSampleCounts()

QList< int > QRhiD3D11::supportedSampleCounts ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 543 of file qrhid3d11.cpp.

◆ supportedShadingRates()

QList< QSize > QRhiD3D11::supportedShadingRates ( int sampleCount) const
overridevirtual

Implements QRhiImplementation.

Definition at line 548 of file qrhid3d11.cpp.

◆ ubufAlignment()

int QRhiD3D11::ubufAlignment ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 581 of file qrhid3d11.cpp.

◆ updateShaderResourceBindings()

void QRhiD3D11::updateShaderResourceBindings ( QD3D11ShaderResourceBindings * srbD,
const QShader::NativeResourceBindingMap * nativeResourceBindingMaps[],
uint pushConstantStages )

Member Data Documentation

◆ activeAdapter

IDXGIAdapter1* QRhiD3D11::activeAdapter = nullptr

Definition at line 941 of file qrhid3d11_p.h.

◆ activeBufferReadbacks

QVarLengthArray<BufferReadback, 2> QRhiD3D11::activeBufferReadbacks

Definition at line 994 of file qrhid3d11_p.h.

◆ activeTextureReadbacks

QVarLengthArray<TextureReadback, 2> QRhiD3D11::activeTextureReadbacks

Definition at line 988 of file qrhid3d11_p.h.

◆ adapterLuid

LUID QRhiD3D11::adapterLuid = {}

Definition at line 939 of file qrhid3d11_p.h.

◆ annotations

ID3DUserDefinedAnnotation* QRhiD3D11::annotations = nullptr

Definition at line 940 of file qrhid3d11_p.h.

◆ context

◆ contextState

struct QRhiD3D11::[struct].contextState QRhiD3D11::contextState

◆ dcompDevice

IDCompositionDevice* QRhiD3D11::dcompDevice = nullptr

Definition at line 943 of file qrhid3d11_p.h.

◆ debugLayer

bool QRhiD3D11::debugLayer = false

Definition at line 933 of file qrhid3d11_p.h.

Referenced by QRhiD3D11(), and create().

◆ dev

ID3D11Device* QRhiD3D11::dev = nullptr

Definition at line 936 of file qrhid3d11_p.h.

◆ deviceLost

bool QRhiD3D11::deviceLost = false

◆ driverInfoStruct

QRhiDriverInfo QRhiD3D11::driverInfoStruct

Definition at line 948 of file qrhid3d11_p.h.

◆ dxgiFactory

IDXGIFactory1* QRhiD3D11::dxgiFactory = nullptr

Definition at line 942 of file qrhid3d11_p.h.

◆ featureLevel

D3D_FEATURE_LEVEL QRhiD3D11::featureLevel = D3D_FEATURE_LEVEL(0)

Definition at line 938 of file qrhid3d11_p.h.

◆ importedDeviceAndContext

bool QRhiD3D11::importedDeviceAndContext = false

Definition at line 935 of file qrhid3d11_p.h.

Referenced by QRhiD3D11(), create(), and destroy().

◆ m_bytecodeCache

QRhiBinaryCache<BytecodeCacheKey, QByteArray> QRhiD3D11::m_bytecodeCache { "Bytecode cache" }

Definition at line 1024 of file qrhid3d11_p.h.

◆ m_shaderCache

QHash<QRhiShaderStage, Shader> QRhiD3D11::m_shaderCache

Definition at line 1008 of file qrhid3d11_p.h.

◆ MAX_PUSH_CONSTANTS_SIZE

quint32 QRhiD3D11::MAX_PUSH_CONSTANTS_SIZE = 128
staticconstexpr

Definition at line 964 of file qrhid3d11_p.h.

◆ maxFrameLatency

UINT QRhiD3D11::maxFrameLatency = 2

Definition at line 934 of file qrhid3d11_p.h.

◆ nativeHandlesStruct

QRhiD3D11NativeHandles QRhiD3D11::nativeHandlesStruct

Definition at line 947 of file qrhid3d11_p.h.

◆ ofr

struct QRhiD3D11::OffscreenFrame QRhiD3D11::ofr

◆ pushConstantBuffer

ID3D11Buffer* QRhiD3D11::pushConstantBuffer = nullptr

Definition at line 965 of file qrhid3d11_p.h.

◆ rhiFlags

QRhi::Flags QRhiD3D11::rhiFlags

Definition at line 932 of file qrhid3d11_p.h.

◆ supportsAllowTearing

bool QRhiD3D11::supportsAllowTearing = false

Definition at line 944 of file qrhid3d11_p.h.

Referenced by create().

◆ useLegacySwapchainModel

bool QRhiD3D11::useLegacySwapchainModel = false

Definition at line 945 of file qrhid3d11_p.h.

Referenced by create(), and QD3D11SwapChain::createOrResize().


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