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

Public Member Functions

 QRhiD3D11 (QRhiD3D11InitParams *params, QRhiD3D11NativeHandles *importDevice=nullptr)
bool create (QRhi::Flags flags) override
void destroy () override
QRhi::AdapterList enumerateAdaptersBeforeCreate (QRhiNativeHandles *nativeHandles) const override
QRhiGraphicsPipelinecreateGraphicsPipeline () override
QRhiComputePipelinecreateComputePipeline () override
QRhiShaderResourceBindingscreateShaderResourceBindings () override
QRhiBuffercreateBuffer (QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, quint32 size) override
QRhiRenderBuffercreateRenderBuffer (QRhiRenderBuffer::Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint) override
QRhiTexturecreateTexture (QRhiTexture::Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, QRhiTexture::Flags flags) override
QRhiSamplercreateSampler (QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w) override
QRhiTextureRenderTargetcreateTextureRenderTarget (const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flags) override
QRhiShadingRateMapcreateShadingRateMap () override
QRhiSwapChaincreateSwapChain () override
QRhi::FrameOpResult beginFrame (QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flags) override
QRhi::FrameOpResult endFrame (QRhiSwapChain *swapChain, QRhi::EndFrameFlags flags) override
QRhi::FrameOpResult beginOffscreenFrame (QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flags) override
QRhi::FrameOpResult endOffscreenFrame (QRhi::EndFrameFlags flags) 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 flags) 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 &c) override
void setStencilRef (QRhiCommandBuffer *cb, quint32 refValue) override
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 drawCount, quint32 stride) override
void drawIndexedIndirect (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCount, quint32 stride) override
void debugMarkBegin (QRhiCommandBuffer *cb, const QByteArray &name) override
void debugMarkEnd (QRhiCommandBuffer *cb) override
void debugMarkMsg (QRhiCommandBuffer *cb, const QByteArray &msg) override
void beginComputePass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
void endComputePass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void setComputePipeline (QRhiCommandBuffer *cb, QRhiComputePipeline *ps) override
void dispatch (QRhiCommandBuffer *cb, int x, int y, int z) override
const QRhiNativeHandlesnativeHandles (QRhiCommandBuffer *cb) override
void beginExternal (QRhiCommandBuffer *cb) override
void endExternal (QRhiCommandBuffer *cb) override
double lastCompletedGpuTime (QRhiCommandBuffer *cb) override
QList< int > supportedSampleCounts () const override
QList< QSizesupportedShadingRates (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 format, QRhiTexture::Flags flags) const override
bool isFeatureSupported (QRhi::Feature feature) const override
int resourceLimit (QRhi::ResourceLimit limit) const override
const QRhiNativeHandlesnativeHandles () override
QRhiDriverInfo driverInfo () const override
QRhiStats statistics () override
bool makeThreadLocalNativeContextCurrent () override
void setQueueSubmitParams (QRhiNativeHandles *params) override
void releaseCachedResources () override
bool isDeviceLost () const override
QByteArray pipelineCacheData () override
void setPipelineCacheData (const QByteArray &data) override
void enqueueSubresUpload (QD3D11Texture *texD, QD3D11CommandBuffer *cbD, int layer, int level, const QRhiTextureSubresourceUploadDescription &subresDesc)
void enqueueResourceUpdates (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
void updateShaderResourceBindings (QD3D11ShaderResourceBindings *srbD, const QShader::NativeResourceBindingMap *nativeResourceBindingMaps[])
void executeBufferHostWrites (QD3D11Buffer *bufD)
void bindShaderResources (const QD3D11ShaderResourceBindings::ResourceBatches &allResourceBatches, const uint *dynOfsPairs, int dynOfsPairCount, bool offsetOnlyChange, QD3D11RenderTargetData *rtD, RenderTargetUavUpdateState &rtUavState)
void resetShaderResources (QD3D11RenderTargetData *rtD, RenderTargetUavUpdateState &rtUavState)
void executeCommandBuffer (QD3D11CommandBuffer *cbD)
DXGI_SAMPLE_DESC effectiveSampleDesc (int sampleCount) const
void finishActiveReadbacks ()
void reportLiveObjects (ID3D11Device *device)
void clearShaderCache ()
QByteArray compileHlslShaderSource (const QShader &shader, QShader::Variant shaderVariant, uint flags, QString *error, QShaderKey *usedShaderKey)
bool ensureDirectCompositionDevice ()
Public Member Functions inherited from QRhiImplementation
virtual ~QRhiImplementation ()
void prepareForCreate (QRhi *rhi, QRhi::Implementation impl, QRhi::Flags flags, QRhiAdapter *adapter)
bool isCompressedFormat (QRhiTexture::Format format) const
void compressedFormatInfo (QRhiTexture::Format format, const QSize &size, quint32 *bpl, quint32 *byteSize, QSize *blockDim) const
void textureFormatInfo (QRhiTexture::Format format, const QSize &size, quint32 *bpl, quint32 *byteSize, quint32 *bytesPerPixel) const
bool isStencilSupportingFormat (QRhiTexture::Format format) const
void registerResource (QRhiResource *res, bool ownsNativeResources=true)
void unregisterResource (QRhiResource *res)
void addDeleteLater (QRhiResource *res)
void addCleanupCallback (const QRhi::CleanupCallback &callback)
void addCleanupCallback (const void *key, const QRhi::CleanupCallback &callback)
void removeCleanupCallback (const void *key)
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 type) const
quint32 byteSizePerVertexForVertexInputFormat (QRhiVertexInputAttribute::Format format) const
int effectiveSampleCount (int sampleCount) const
QSize clampedSubResourceUploadSize (QSize size, QPoint dstPos, int level, QSize textureSizeAtLevelZero, 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 { 
   int   vsHighestActiveVertexBufferBinding = -1 
   bool   vsHasIndexBufferBound = false 
   int   vsHighestActiveSrvBinding = -1 
   int   hsHighestActiveSrvBinding = -1 
   int   dsHighestActiveSrvBinding = -1 
   int   gsHighestActiveSrvBinding = -1 
   int   fsHighestActiveSrvBinding = -1 
   int   csHighestActiveSrvBinding = -1 
   int   csHighestActiveUavBinding = -1 
   int   fsHighestActiveUavBinding = -1 
   QD3D11SwapChain *   currentSwapChain = nullptr 
contextState
struct QRhiD3D11::OffscreenFrame ofr
QVarLengthArray< TextureReadback, 2 > activeTextureReadbacks
QVarLengthArray< BufferReadback, 2 > activeBufferReadbacks
QHash< QRhiShaderStage, Shaderm_shaderCache
QHash< BytecodeCacheKey, QByteArraym_bytecodeCache
Public Attributes inherited from QRhiImplementation
QRhiq
bool debugMarkers = false
int currentFrameSlot = 0
bool inFrame = false
QRhiAdapterrequestedRhiAdapter = nullptr

Additional Inherited Members

Static Public Member Functions inherited from QRhiImplementation
static QRhiImplementationnewInstance (QRhi::Implementation impl, QRhiInitParams *params, QRhiNativeHandles *importDevice)
static const QRhiShaderResourceBinding::DatashaderResourceBindingData (const QRhiShaderResourceBinding &binding)
static QRhiShaderResourceBinding::DatashaderResourceBindingData (QRhiShaderResourceBinding &binding)
static bool sortedBindingLessThan (const QRhiShaderResourceBinding &a, const QRhiShaderResourceBinding &b)
Static Public Attributes inherited from QRhiImplementation
static const int MAX_SHADER_CACHE_ENTRIES = 128

Detailed Description

Definition at line 702 of file qrhid3d11_p.h.

Constructor & Destructor Documentation

◆ QRhiD3D11()

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

Definition at line 157 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 2355 of file qrhid3d11.cpp.

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

Here is the call graph for this function:

◆ beginExternal()

void QRhiD3D11::beginExternal ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 1453 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 1491 of file qrhid3d11.cpp.

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

Here is the call graph for this function:

◆ beginOffscreenFrame()

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

◆ beginPass()

◆ bindShaderResources()

void QRhiD3D11::bindShaderResources ( const QD3D11ShaderResourceBindings::ResourceBatches & allResourceBatches,
const uint * dynOfsPairs,
int dynOfsPairCount,
bool offsetOnlyChange,
QD3D11RenderTargetData * rtD,
RenderTargetUavUpdateState & rtUavState )

Definition at line 2821 of file qrhid3d11.cpp.

References QD3D11CommandBuffer::MAX_DYNAMIC_OFFSET_COUNT.

◆ clearShaderCache()

void QRhiD3D11::clearShaderCache ( )

Definition at line 422 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 594 of file qrhid3d11.cpp.

◆ compileHlslShaderSource()

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

Definition at line 4648 of file qrhid3d11.cpp.

◆ create()

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

Implements QRhiImplementation.

Definition at line 198 of file qrhid3d11.cpp.

References 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 569 of file qrhid3d11.cpp.

◆ createComputePipeline()

QRhiComputePipeline * QRhiD3D11::createComputePipeline ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1004 of file qrhid3d11.cpp.

◆ createGraphicsPipeline()

QRhiGraphicsPipeline * QRhiD3D11::createGraphicsPipeline ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 999 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 967 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 981 of file qrhid3d11.cpp.

◆ createShaderResourceBindings()

QRhiShaderResourceBindings * QRhiD3D11::createShaderResourceBindings ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1009 of file qrhid3d11.cpp.

◆ createShadingRateMap()

QRhiShadingRateMap * QRhiD3D11::createShadingRateMap ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 994 of file qrhid3d11.cpp.

◆ createSwapChain()

QRhiSwapChain * QRhiD3D11::createSwapChain ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 564 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 974 of file qrhid3d11.cpp.

◆ createTextureRenderTarget()

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

Implements QRhiImplementation.

Definition at line 988 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 430 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

◆ 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

◆ drawIndirect()

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

◆ driverInfo()

QRhiDriverInfo QRhiD3D11::driverInfo ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 778 of file qrhid3d11.cpp.

◆ effectiveSampleDesc()

DXGI_SAMPLE_DESC QRhiD3D11::effectiveSampleDesc ( int sampleCount) const

Definition at line 547 of file qrhid3d11.cpp.

◆ endComputePass()

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

Implements QRhiImplementation.

Definition at line 2373 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 1460 of file qrhid3d11.cpp.

References QD3D11CommandBuffer::Command::cmd, QD3D11CommandBuffer::resetCachedState(), 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 1537 of file qrhid3d11.cpp.

References QD3D11SwapChain::BUFFER_COUNT, QD3D11CommandBuffer::Command::cmd, QD3D11SwapChain::currentFrameSlot, currentSwapChain, 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 1643 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 2285 of file qrhid3d11.cpp.

References QD3D11CommandBuffer::Command::cmd, enqueueResourceUpdates(), 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 1935 of file qrhid3d11.cpp.

References QRhiResourceUpdateBatchPrivate::activeBufferOpCount, QRhiResourceUpdateBatchPrivate::activeTextureOpCount, QD3D11CommandBuffer::Command::cmd, QRhiBufferData::constData(), QRhiResourceUpdateBatchPrivate::TextureOp::Copy, QD3D11CommandBuffer::Command::CopySubRes, QD3D11SwapChain::currentFrameSlot, currentSwapChain, QRhiResourceUpdateBatchPrivate::BufferOp::data, QRhiResourceUpdateBatchPrivate::TextureOp::dst, QRhiResourceUpdateBatchPrivate::BufferOp::DynamicUpdate, QD3D11Buffer::dynBuf, QRhiResourceUpdateBatchPrivate::free(), QD3D11CommandBuffer::Command::GenMip, QRhiResourceUpdateBatchPrivate::TextureOp::GenMips, QRhiResourceUpdateBatchPrivate::get(), QD3D11Buffer::hasPendingDynamicUpdates, 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 5325 of file qrhid3d11.cpp.

Referenced by QD3D11SwapChain::createOrResize().

Here is the caller graph for this function:

◆ enumerateAdaptersBeforeCreate()

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

Reimplemented from QRhiImplementation.

Definition at line 494 of file qrhid3d11.cpp.

◆ executeBufferHostWrites()

void QRhiD3D11::executeBufferHostWrites ( QD3D11Buffer * bufD)

Definition at line 2705 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 1832 of file qrhid3d11.cpp.

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

Here is the call graph for this function:

◆ finishActiveReadbacks()

void QRhiD3D11::finishActiveReadbacks ( )

Definition at line 2164 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 589 of file qrhid3d11.cpp.

◆ isDeviceLost()

bool QRhiD3D11::isDeviceLost ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 807 of file qrhid3d11.cpp.

References deviceLost.

◆ isFeatureSupported()

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

Implements QRhiImplementation.

Definition at line 619 of file qrhid3d11.cpp.

◆ isTextureFormatSupported()

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

Implements QRhiImplementation.

Definition at line 609 of file qrhid3d11.cpp.

◆ isYUpInFramebuffer()

bool QRhiD3D11::isYUpInFramebuffer ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 579 of file qrhid3d11.cpp.

◆ isYUpInNDC()

bool QRhiD3D11::isYUpInNDC ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 584 of file qrhid3d11.cpp.

◆ lastCompletedGpuTime()

double QRhiD3D11::lastCompletedGpuTime ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 1472 of file qrhid3d11.cpp.

References QD3D11CommandBuffer::lastGpuTime.

◆ makeThreadLocalNativeContextCurrent()

bool QRhiD3D11::makeThreadLocalNativeContextCurrent ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 790 of file qrhid3d11.cpp.

◆ nativeHandles() [1/2]

const QRhiNativeHandles * QRhiD3D11::nativeHandles ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 773 of file qrhid3d11.cpp.

◆ nativeHandles() [2/2]

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

Implements QRhiImplementation.

Definition at line 1447 of file qrhid3d11.cpp.

◆ pipelineCacheData()

QByteArray QRhiD3D11::pipelineCacheData ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 821 of file qrhid3d11.cpp.

◆ releaseCachedResources()

void QRhiD3D11::releaseCachedResources ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 801 of file qrhid3d11.cpp.

References clearShaderCache().

Here is the call graph for this function:

◆ reportLiveObjects()

void QRhiD3D11::reportLiveObjects ( ID3D11Device * device)

Definition at line 484 of file qrhid3d11.cpp.

◆ resetShaderResources()

void QRhiD3D11::resetShaderResources ( QD3D11RenderTargetData * rtD,
RenderTargetUavUpdateState & rtUavState )

Definition at line 2864 of file qrhid3d11.cpp.

References csHighestActiveSrvBinding, csHighestActiveUavBinding, dsHighestActiveSrvBinding, fsHighestActiveSrvBinding, fsHighestActiveUavBinding, gsHighestActiveSrvBinding, hsHighestActiveSrvBinding, vsHasIndexBufferBound, vsHighestActiveSrvBinding, and vsHighestActiveVertexBufferBinding.

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 730 of file qrhid3d11.cpp.

◆ resourceUpdate()

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

Implements QRhiImplementation.

Definition at line 2226 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 888 of file qrhid3d11.cpp.

◆ setQueueSubmitParams()

void QRhiD3D11::setQueueSubmitParams ( QRhiNativeHandles * params)
overridevirtual

Implements QRhiImplementation.

Definition at line 796 of file qrhid3d11.cpp.

◆ setScissor()

◆ setShaderResources()

◆ setShadingRate()

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

Implements QRhiImplementation.

Definition at line 1348 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 1211 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 783 of file qrhid3d11.cpp.

◆ supportedSampleCounts()

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

Implements QRhiImplementation.

Definition at line 536 of file qrhid3d11.cpp.

◆ supportedShadingRates()

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

Implements QRhiImplementation.

Definition at line 541 of file qrhid3d11.cpp.

◆ ubufAlignment()

int QRhiD3D11::ubufAlignment ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 574 of file qrhid3d11.cpp.

◆ updateShaderResourceBindings()

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

Definition at line 2432 of file qrhid3d11.cpp.

References QD3D11ShaderResourceBindings::StageSamplerBatches::finish(), QD3D11ShaderResourceBindings::StageUavBatches::finish(), QD3D11ShaderResourceBindings::StageUniformBufferBatches::finish(), RBM_COMPUTE, RBM_DOMAIN, RBM_FRAGMENT, RBM_GEOMETRY, RBM_HULL, RBM_SUPPORTED_STAGES, and RBM_VERTEX.

Here is the call graph for this function:

Member Data Documentation

◆ activeAdapter

IDXGIAdapter1* QRhiD3D11::activeAdapter = nullptr

Definition at line 855 of file qrhid3d11_p.h.

◆ activeBufferReadbacks

QVarLengthArray<BufferReadback, 2> QRhiD3D11::activeBufferReadbacks

Definition at line 901 of file qrhid3d11_p.h.

◆ activeTextureReadbacks

QVarLengthArray<TextureReadback, 2> QRhiD3D11::activeTextureReadbacks

Definition at line 895 of file qrhid3d11_p.h.

◆ adapterLuid

LUID QRhiD3D11::adapterLuid = {}

Definition at line 853 of file qrhid3d11_p.h.

◆ annotations

ID3DUserDefinedAnnotation* QRhiD3D11::annotations = nullptr

Definition at line 854 of file qrhid3d11_p.h.

◆ context

◆ [struct]

struct { ... } QRhiD3D11::contextState

◆ csHighestActiveSrvBinding

int QRhiD3D11::csHighestActiveSrvBinding = -1

Definition at line 872 of file qrhid3d11_p.h.

Referenced by resetShaderResources().

◆ csHighestActiveUavBinding

int QRhiD3D11::csHighestActiveUavBinding = -1

Definition at line 873 of file qrhid3d11_p.h.

Referenced by resetShaderResources().

◆ currentSwapChain

QD3D11SwapChain* QRhiD3D11::currentSwapChain = nullptr

Definition at line 875 of file qrhid3d11_p.h.

Referenced by beginFrame(), endFrame(), enqueueResourceUpdates(), and finish().

◆ dcompDevice

IDCompositionDevice* QRhiD3D11::dcompDevice = nullptr

Definition at line 857 of file qrhid3d11_p.h.

◆ debugLayer

bool QRhiD3D11::debugLayer = false

Definition at line 847 of file qrhid3d11_p.h.

Referenced by QRhiD3D11().

◆ dev

ID3D11Device* QRhiD3D11::dev = nullptr

Definition at line 850 of file qrhid3d11_p.h.

◆ deviceLost

bool QRhiD3D11::deviceLost = false

Definition at line 860 of file qrhid3d11_p.h.

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

◆ driverInfoStruct

QRhiDriverInfo QRhiD3D11::driverInfoStruct

Definition at line 862 of file qrhid3d11_p.h.

◆ dsHighestActiveSrvBinding

int QRhiD3D11::dsHighestActiveSrvBinding = -1

Definition at line 869 of file qrhid3d11_p.h.

Referenced by resetShaderResources().

◆ dxgiFactory

IDXGIFactory1* QRhiD3D11::dxgiFactory = nullptr

Definition at line 856 of file qrhid3d11_p.h.

◆ featureLevel

D3D_FEATURE_LEVEL QRhiD3D11::featureLevel = D3D_FEATURE_LEVEL(0)

Definition at line 852 of file qrhid3d11_p.h.

◆ fsHighestActiveSrvBinding

int QRhiD3D11::fsHighestActiveSrvBinding = -1

Definition at line 871 of file qrhid3d11_p.h.

Referenced by resetShaderResources().

◆ fsHighestActiveUavBinding

int QRhiD3D11::fsHighestActiveUavBinding = -1

Definition at line 874 of file qrhid3d11_p.h.

Referenced by resetShaderResources().

◆ gsHighestActiveSrvBinding

int QRhiD3D11::gsHighestActiveSrvBinding = -1

Definition at line 870 of file qrhid3d11_p.h.

Referenced by resetShaderResources().

◆ hsHighestActiveSrvBinding

int QRhiD3D11::hsHighestActiveSrvBinding = -1

Definition at line 868 of file qrhid3d11_p.h.

Referenced by resetShaderResources().

◆ importedDeviceAndContext

bool QRhiD3D11::importedDeviceAndContext = false

Definition at line 849 of file qrhid3d11_p.h.

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

◆ m_bytecodeCache

QHash<BytecodeCacheKey, QByteArray> QRhiD3D11::m_bytecodeCache

Definition at line 927 of file qrhid3d11_p.h.

◆ m_shaderCache

QHash<QRhiShaderStage, Shader> QRhiD3D11::m_shaderCache

Definition at line 911 of file qrhid3d11_p.h.

◆ maxFrameLatency

UINT QRhiD3D11::maxFrameLatency = 2

Definition at line 848 of file qrhid3d11_p.h.

◆ nativeHandlesStruct

QRhiD3D11NativeHandles QRhiD3D11::nativeHandlesStruct

Definition at line 861 of file qrhid3d11_p.h.

◆ ofr

struct QRhiD3D11::OffscreenFrame QRhiD3D11::ofr

◆ rhiFlags

QRhi::Flags QRhiD3D11::rhiFlags

Definition at line 846 of file qrhid3d11_p.h.

◆ supportsAllowTearing

bool QRhiD3D11::supportsAllowTearing = false

Definition at line 858 of file qrhid3d11_p.h.

Referenced by create().

◆ useLegacySwapchainModel

bool QRhiD3D11::useLegacySwapchainModel = false

Definition at line 859 of file qrhid3d11_p.h.

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

◆ vsHasIndexBufferBound

bool QRhiD3D11::vsHasIndexBufferBound = false

Definition at line 866 of file qrhid3d11_p.h.

Referenced by executeCommandBuffer(), and resetShaderResources().

◆ vsHighestActiveSrvBinding

int QRhiD3D11::vsHighestActiveSrvBinding = -1

Definition at line 867 of file qrhid3d11_p.h.

Referenced by resetShaderResources().

◆ vsHighestActiveVertexBufferBinding

int QRhiD3D11::vsHighestActiveVertexBufferBinding = -1

Definition at line 865 of file qrhid3d11_p.h.

Referenced by executeCommandBuffer(), and resetShaderResources().


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