60 ID3D11Texture2D *
tex =
nullptr;
61 ID3D11DepthStencilView *
dsv =
nullptr;
62 ID3D11RenderTargetView *
rtv =
nullptr;
91 ID3D11Texture2D *
tex =
nullptr;
92 ID3D11Texture3D *
tex3D =
nullptr;
93 ID3D11Texture1D *
tex1D =
nullptr;
95 ID3D11ShaderResourceView *
srv =
nullptr;
144 ID3D11DepthStencilView *
dsv =
nullptr;
179 ID3D11DepthStencilView *
dsv =
nullptr;
324 D3D11_PRIMITIVE_TOPOLOGY
d3dTopology = D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST;
476 ID3D11ShaderResourceView *
srv;
592 ID3D11Texture2D **tex, ID3D11RenderTargetView **rtv)
const;
629 QRhiBuffer::UsageFlags
usage,
632 const QSize &pixelSize,
634 QRhiRenderBuffer::Flags
flags,
637 const QSize &pixelSize,
641 QRhiTexture::Flags
flags)
override;
650 QRhiTextureRenderTarget::Flags
flags)
override;
663 const QColor &colorClearValue,
666 QRhiCommandBuffer::BeginPassFlags
flags)
override;
674 int dynamicOffsetCount,
700 QRhiCommandBuffer::BeginPassFlags
flags)
override;
736 const uint *dynOfsPairs,
int dynOfsPairCount,
737 bool offsetOnlyChange);
751 ID3D11Device *
dev =
nullptr;
834 return a.sourceHash ==
b.sourceHash
835 &&
a.target ==
b.target
836 &&
a.entryPoint ==
b.entryPoint
837 &&
a.compileFlags ==
b.compileFlags;
IOBluetoothDevice * device
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
The QColor class provides colors based on RGB, HSV or CMYK values.
const uchar * constBits() const
Returns a pointer to the first pixel data.
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
const char * constData() const
Type
Specifies storage type of buffer resource.
QPair< QRhiBuffer *, quint32 > VertexInput
Synonym for QPair<QRhiBuffer *, quint32>.
QPair< int, quint32 > DynamicOffset
Synonym for QPair<int, quint32>.
IndexFormat
Specifies the index data type.
\variable QRhiD3D11InitParams::enableDebugLayer
int gsHighestActiveSrvBinding
void setScissor(QRhiCommandBuffer *cb, const QRhiScissor &scissor) override
void debugMarkMsg(QRhiCommandBuffer *cb, const QByteArray &msg) override
int dsHighestActiveSrvBinding
QRhiD3D11NativeHandles nativeHandlesStruct
bool isYUpInNDC() const override
QRhiSwapChain * createSwapChain() override
void enqueueResourceUpdates(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
bool isFeatureSupported(QRhi::Feature feature) const override
QRhi::FrameOpResult endOffscreenFrame(QRhi::EndFrameFlags flags) override
bool isDeviceLost() const override
bool vsHasIndexBufferBound
void executeBufferHostWrites(QD3D11Buffer *bufD)
void resetShaderResources()
void updateShaderResourceBindings(QD3D11ShaderResourceBindings *srbD, const QShader::NativeResourceBindingMap *nativeResourceBindingMaps[])
QRhiStats statistics() override
QHash< BytecodeCacheKey, QByteArray > m_bytecodeCache
QRhiComputePipeline * createComputePipeline() override
void debugMarkBegin(QRhiCommandBuffer *cb, const QByteArray &name) override
QRhi::FrameOpResult finish() override
void setVertexInput(QRhiCommandBuffer *cb, int startBinding, int bindingCount, const QRhiCommandBuffer::VertexInput *bindings, QRhiBuffer *indexBuf, quint32 indexOffset, QRhiCommandBuffer::IndexFormat indexFormat) override
IDXGIAdapter1 * activeAdapter
QRhiGraphicsPipeline * createGraphicsPipeline() override
QRhiShaderResourceBindings * createShaderResourceBindings() override
QVarLengthArray< BufferReadback, 2 > activeBufferReadbacks
QRhi::FrameOpResult beginFrame(QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flags) override
ID3D11DeviceContext1 * context
QList< int > supportedSampleCounts() const override
QRhiTextureRenderTarget * createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flags) override
QByteArray compileHlslShaderSource(const QShader &shader, QShader::Variant shaderVariant, uint flags, QString *error, QShaderKey *usedShaderKey)
void setBlendConstants(QRhiCommandBuffer *cb, const QColor &c) override
int csHighestActiveSrvBinding
bool isClipDepthZeroToOne() const override
IDCompositionDevice * dcompDevice
QRhiDriverInfo driverInfoStruct
QHash< QRhiShaderStage, Shader > m_shaderCache
bool ensureDirectCompositionDevice()
void beginComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
void draw(QRhiCommandBuffer *cb, quint32 vertexCount, quint32 instanceCount, quint32 firstVertex, quint32 firstInstance) override
void enqueueSubresUpload(QD3D11Texture *texD, QD3D11CommandBuffer *cbD, int layer, int level, const QRhiTextureSubresourceUploadDescription &subresDesc)
QD3D11SwapChain * currentSwapChain
void reportLiveObjects(ID3D11Device *device)
void resourceUpdate(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
QMatrix4x4 clipSpaceCorrMatrix() const override
void executeCommandBuffer(QD3D11CommandBuffer *cbD, QD3D11SwapChain *timestampSwapChain=nullptr)
struct QRhiD3D11::OffscreenFrame ofr
bool isYUpInFramebuffer() const override
int resourceLimit(QRhi::ResourceLimit limit) const override
void beginExternal(QRhiCommandBuffer *cb) override
QRhiTexture * createTexture(QRhiTexture::Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, QRhiTexture::Flags flags) override
void setPipelineCacheData(const QByteArray &data) override
void bindShaderResources(QD3D11ShaderResourceBindings *srbD, const uint *dynOfsPairs, int dynOfsPairCount, bool offsetOnlyChange)
void debugMarkEnd(QRhiCommandBuffer *cb) override
DXGI_SAMPLE_DESC effectiveSampleCount(int sampleCount) const
void releaseCachedResources() override
double lastCompletedGpuTime(QRhiCommandBuffer *cb) override
ID3DUserDefinedAnnotation * annotations
bool importedDeviceAndContext
QRhi::FrameOpResult beginOffscreenFrame(QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flags) override
QRhiBuffer * createBuffer(QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, quint32 size) override
bool supportsAllowTearing
void dispatch(QRhiCommandBuffer *cb, int x, int y, int z) override
void endExternal(QRhiCommandBuffer *cb) override
void setViewport(QRhiCommandBuffer *cb, const QRhiViewport &viewport) override
QVarLengthArray< TextureReadback, 2 > activeTextureReadbacks
void setComputePipeline(QRhiCommandBuffer *cb, QRhiComputePipeline *ps) override
QRhi::FrameOpResult endFrame(QRhiSwapChain *swapChain, QRhi::EndFrameFlags flags) override
bool isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture::Flags flags) const override
void setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBindings *srb, int dynamicOffsetCount, const QRhiCommandBuffer::DynamicOffset *dynamicOffsets) override
D3D_FEATURE_LEVEL featureLevel
void endComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
bool makeThreadLocalNativeContextCurrent() override
int csHighestActiveUavBinding
void finishActiveReadbacks()
IDXGIFactory1 * dxgiFactory
int fsHighestActiveSrvBinding
QByteArray pipelineCacheData() override
const QRhiNativeHandles * nativeHandles() override
QRhiDriverInfo driverInfo() const override
void endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
int ubufAlignment() const override
void beginPass(QRhiCommandBuffer *cb, QRhiRenderTarget *rt, const QColor &colorClearValue, const QRhiDepthStencilClearValue &depthStencilClearValue, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
void drawIndexed(QRhiCommandBuffer *cb, quint32 indexCount, quint32 instanceCount, quint32 firstIndex, qint32 vertexOffset, quint32 firstInstance) override
QRhiSampler * createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w) override
int vsHighestActiveSrvBinding
QRhiRenderBuffer * createRenderBuffer(QRhiRenderBuffer::Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint) override
int hsHighestActiveSrvBinding
void setGraphicsPipeline(QRhiCommandBuffer *cb, QRhiGraphicsPipeline *ps) override
void setStencilRef(QRhiCommandBuffer *cb, quint32 refValue) override
int vsHighestActiveVertexBufferBinding
struct QRhiD3D11::@352 contextState
Type
Specifies the type of the renderbuffer.
Filter
Specifies the minification, magnification, or mipmap filtering.
AddressMode
Specifies the addressing mode.
Filter mipmapMode() const
Format
Describes the swapchain format.
Format
Specifies the texture format.
ResourceLimit
Describes the resource limit to query.
Feature
Flag values to indicate what features are supported by the backend currently in use.
static const int MAX_MIP_LEVELS
FrameOpResult
Describes the result of operations that can have a soft failure.
Variant
Describes what kind of shader code an entry contains.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLint GLint GLint GLint GLint x
[0]
GLuint const GLuint * buffers
GLint GLenum GLsizei GLsizei GLsizei depth
GLenum GLuint GLint level
GLfloat GLfloat GLfloat w
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLsizei const GLubyte * commands
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
GLint GLsizei GLsizei GLenum format
GLuint GLsizei const GLuint const GLintptr * offsets
GLsizei const GLuint const GLintptr const GLsizei * strides
GLsizeiptr const void GLenum usage
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
size_t qHash(const QRhiD3D11::BytecodeCacheKey &k, size_t seed=0) noexcept
bool operator!=(const QRhiD3D11::BytecodeCacheKey &a, const QRhiD3D11::BytecodeCacheKey &b) noexcept
static const int QD3D11_SWAPCHAIN_BUFFER_COUNT
bool operator==(const QRhiD3D11::BytecodeCacheKey &a, const QRhiD3D11::BytecodeCacheKey &b) noexcept
SSL_CTX int(* cb)(SSL *ssl, unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg)
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
unsigned long long quint64
view viewport() -> scroll(dx, dy, deviceRect)
bool hasPendingDynamicUpdates
void endFullDynamicBufferUpdateForCurrentFrame() override
To be called when the entire contents of the buffer data has been updated in the memory block returne...
char * beginFullDynamicBufferUpdateForCurrentFrame() override
bool create() override
Creates the corresponding native graphics resources.
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QHash< quint32, ID3D11UnorderedAccessView * > uavs
QRhiBuffer::NativeBuffer nativeBuffer() override
ID3D11UnorderedAccessView * unorderedAccessView(quint32 offset)
union QD3D11CommandBuffer::Command::Args args
QRhiRenderTarget * currentTarget
static const int MAX_DYNAMIC_OFFSET_COUNT
QVarLengthArray< QRhiBufferData, 4 > bufferDataRetainPool
const uchar * retainBufferData(const QRhiBufferData &data)
ID3D11Buffer * currentVertexBuffers[D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT]
QVarLengthArray< QImage, 4 > imageRetainPool
static const int MAX_VERTEX_BUFFER_BINDING_COUNT
QRhiShaderResourceBindings * currentGraphicsSrb
const uchar * retainImage(const QImage &image)
const uchar * retainData(const QByteArray &data)
QRhiShaderResourceBindings * currentComputeSrb
QRhiBackendCommandList< Command > commands
uint currentPipelineGeneration
quint32 currentIndexOffset
QVarLengthArray< QByteArray, 4 > dataRetainPool
uint currentSrbGeneration
QRhiComputePipeline * currentComputePipeline
ID3D11Buffer * currentIndexBuffer
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
DXGI_FORMAT currentIndexFormat
quint32 currentVertexOffsets[D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT]
QRhiGraphicsPipeline * currentGraphicsPipeline
QShader::NativeResourceBindingMap nativeResourceBindingMap
struct QD3D11ComputePipeline::@253 cs
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
ID3D11InputLayout * inputLayout
struct QD3D11GraphicsPipeline::@246 vs
ID3D11BlendState * blendState
ID3D11RasterizerState * rastState
D3D11_PRIMITIVE_TOPOLOGY d3dTopology
struct QD3D11GraphicsPipeline::@249 ds
struct QD3D11GraphicsPipeline::@251 fs
~QD3D11GraphicsPipeline()
bool create() override
Creates the corresponding native graphics resources.
struct QD3D11GraphicsPipeline::@250 gs
ID3D11DepthStencilState * dsState
struct QD3D11GraphicsPipeline::@248 hs
QShader::NativeResourceBindingMap nativeResourceBindingMap
ID3D11RenderTargetView * rtv
ID3D11DepthStencilView * dsv
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
DXGI_SAMPLE_DESC sampleDesc
bool create() override
Creates the corresponding native graphics resources.
QRhiTexture::Format backingFormat() const override
~QD3D11RenderPassDescriptor()
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() const override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool isCompatible(const QRhiRenderPassDescriptor *other) const override
QVector< quint32 > serializedFormat() const override
static const int MAX_COLOR_ATTACHMENTS
ID3D11RenderTargetView * rtv[MAX_COLOR_ATTACHMENTS]
QD3D11RenderTargetData(QRhiImplementation *)
ID3D11DepthStencilView * dsv
QD3D11RenderPassDescriptor * rp
QRhiRenderTargetAttachmentTracker::ResIdList currentResIdList
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
ID3D11SamplerState * samplerState
BoundStorageBufferData sbuf
BoundUniformBufferData ubuf
BoundSampledTextureData stex
BoundStorageImageData simage
struct QD3D11ShaderResourceBindings::BoundSampledTextureData::@242 d[QRhiShaderResourceBinding::Data::MAX_TEX_SAMPLER_ARRAY_SIZE]
QRhiBatchedBindings< ID3D11SamplerState * > samplers
QRhiBatchedBindings< ID3D11ShaderResourceView * > shaderresources
QRhiBatchedBindings< ID3D11UnorderedAccessView * > uavs
QVarLengthArray< BoundResourceData, 8 > boundResourceData
StageSamplerBatches hsSamplerBatches
StageUavBatches csUavBatches
QVarLengthArray< QRhiShaderResourceBinding, 8 > sortedBindings
StageSamplerBatches gsSamplerBatches
~QD3D11ShaderResourceBindings()
StageUniformBufferBatches dsUniformBufferBatches
StageUniformBufferBatches gsUniformBufferBatches
void updateResources(UpdateFlags flags) override
StageSamplerBatches vsSamplerBatches
StageSamplerBatches fsSamplerBatches
StageUniformBufferBatches fsUniformBufferBatches
StageSamplerBatches dsSamplerBatches
StageSamplerBatches csSamplerBatches
StageUniformBufferBatches csUniformBufferBatches
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
StageUniformBufferBatches hsUniformBufferBatches
StageUniformBufferBatches vsUniformBufferBatches
int sampleCount() const override
~QD3D11SwapChainRenderTarget()
float devicePixelRatio() const override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QSize pixelSize() const override
QRhiSwapChainHdrInfo hdrInfo() override
\variable QRhiSwapChainHdrInfo::isHardCodedDefaults
QD3D11Timestamps timestamps
ID3D11RenderTargetView * backBufferRtv
QRhiRenderTarget * currentFrameRenderTarget() override
ID3D11Texture2D * msaaTex[BUFFER_COUNT]
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
IDCompositionTarget * dcompTarget
ID3D11RenderTargetView * msaaRtv[BUFFER_COUNT]
bool createOrResize() override
Creates the swapchain if not already done and resizes the swapchain buffers to match the current size...
QSize surfacePixelSize() override
bool newColorBuffer(const QSize &size, DXGI_FORMAT format, DXGI_SAMPLE_DESC sampleDesc, ID3D11Texture2D **tex, ID3D11RenderTargetView **rtv) const
static const int BUFFER_COUNT
QD3D11SwapChainRenderTarget rt
bool isFormatSupported(Format f) override
DXGI_SAMPLE_DESC sampleDesc
IDCompositionVisual * dcompVisual
QRhiCommandBuffer * currentFrameCommandBuffer() override
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() override
IDXGISwapChain * swapChain
DXGI_FORMAT srgbAdjustedColorFormat
ID3D11Texture2D * backBufferTex
QSize pixelSize() const override
ID3D11DepthStencilView * dsv
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
float devicePixelRatio() const override
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() override
int sampleCount() const override
bool ownsRtv[QD3D11RenderTargetData::MAX_COLOR_ATTACHMENTS]
ID3D11RenderTargetView * rtv[QD3D11RenderTargetData::MAX_COLOR_ATTACHMENTS]
bool create() override
Creates the corresponding native graphics resources.
~QD3D11TextureRenderTarget()
bool create() override
Creates the corresponding native graphics resources.
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool createFrom(NativeTexture src) override
Similar to create(), except that no new native textures are created.
NativeTexture nativeTexture() override
ID3D11UnorderedAccessView * perLevelViews[QRhi::MAX_MIP_LEVELS]
bool prepareCreate(QSize *adjustedSize=nullptr)
ID3D11UnorderedAccessView * unorderedAccessViewForLevel(int level)
DXGI_SAMPLE_DESC sampleDesc
ID3D11ShaderResourceView * srv
ID3D11Resource * textureResource() const
ID3D11Query * disjointQuery[MAX_TIMESTAMP_PAIRS]
bool active[MAX_TIMESTAMP_PAIRS]
bool tryQueryTimestamps(int idx, ID3D11DeviceContext *context, double *elapsedSec)
bool prepare(int pairCount, QRhiD3D11 *rhiD)
static const int MAX_TIMESTAMP_PAIRS
ID3D11Buffer * stagingBuf
QRhiReadbackResult * result
OffscreenFrame(QRhiImplementation *rhi)
QD3D11CommandBuffer cbWrapper
QD3D11Timestamps timestamps
Shader(IUnknown *s, const QByteArray &bytecode, const QShader::NativeResourceBindingMap &rbm)
QShader::NativeResourceBindingMap nativeResourceBindingMap
QRhiReadbackResult * result
QRhiTexture::Format format
QRhiReadbackDescription desc
ID3D11Texture2D * stagingTex
\variable QRhiReadbackResult::completed
static const int MAX_TEX_SAMPLER_ARRAY_SIZE
struct QD3D11CommandBuffer::Command::Args::@327 copySubRes
struct QD3D11CommandBuffer::Command::Args::@320 bindGraphicsPipeline
QD3D11ShaderResourceBindings * srb
struct QD3D11CommandBuffer::Command::Args::@321 bindShaderResources
struct QD3D11CommandBuffer::Command::Args::@334 bindComputePipeline
struct QD3D11CommandBuffer::Command::Args::@322 stencilRef
struct QD3D11CommandBuffer::Command::Args::@314 clear
ID3D11ShaderResourceView * srv
struct QD3D11CommandBuffer::Command::Args::@333 debugMark
struct QD3D11CommandBuffer::Command::Args::@323 blendConstants
struct QD3D11CommandBuffer::Command::Args::@329 resolveSubRes
struct QD3D11CommandBuffer::Command::Args::@326 updateSubRes
struct QD3D11CommandBuffer::Command::Args::@325 drawIndexed
uint dynamicOffsetPairs[MAX_DYNAMIC_OFFSET_COUNT *2]
struct QD3D11CommandBuffer::Command::Args::@315 viewport
QD3D11ComputePipeline * ps
QD3D11GraphicsPipeline * ps
struct QD3D11CommandBuffer::Command::Args::@332 genMip
struct QD3D11CommandBuffer::Command::Args::@319 bindIndexBuffer
struct QD3D11CommandBuffer::Command::Args::@318 bindVertexBuffers
struct QD3D11CommandBuffer::Command::Args::@324 draw
struct QD3D11CommandBuffer::Command::Args::@312 setRenderTarget
struct QD3D11CommandBuffer::Command::Args::@317 scissor
struct QD3D11CommandBuffer::Command::Args::@335 dispatch