![]() |
Qt 6.x
The Qt SDK
|
#include <qrhid3d11_p.h>
Public Member Functions | |
QD3D11GraphicsPipeline (QRhiImplementation *rhi) | |
~QD3D11GraphicsPipeline () | |
void | destroy () override |
Releases (or requests deferred releasing of) the underlying native graphics resources. | |
bool | create () override |
Creates the corresponding native graphics resources. | |
![]() | |
QRhiResource::Type | resourceType () const override |
Flags | flags () const |
void | setFlags (Flags f) |
Sets the flags f. | |
Topology | topology () const |
void | setTopology (Topology t) |
Sets the primitive topology t. | |
CullMode | cullMode () const |
void | setCullMode (CullMode mode) |
Sets the specified face culling mode. | |
FrontFace | frontFace () const |
void | setFrontFace (FrontFace f) |
Sets the front face mode f. | |
void | setTargetBlends (std::initializer_list< TargetBlend > list) |
Sets the list of render target blend settings. | |
template<typename InputIterator > | |
void | setTargetBlends (InputIterator first, InputIterator last) |
Sets the list of render target blend settings from the iterators first and last. | |
const TargetBlend * | cbeginTargetBlends () const |
const TargetBlend * | cendTargetBlends () const |
const TargetBlend * | targetBlendAt (qsizetype index) const |
qsizetype | targetBlendCount () const |
bool | hasDepthTest () const |
void | setDepthTest (bool enable) |
Enables or disables depth testing based on enable. | |
bool | hasDepthWrite () const |
void | setDepthWrite (bool enable) |
Controls the writing out of depth data into the depth buffer based on enable. | |
CompareOp | depthOp () const |
void | setDepthOp (CompareOp op) |
Sets the depth comparison function op. | |
bool | hasStencilTest () const |
void | setStencilTest (bool enable) |
Enables or disables stencil tests based on enable. | |
StencilOpState | stencilFront () const |
void | setStencilFront (const StencilOpState &state) |
Sets the stencil test state for front faces. | |
StencilOpState | stencilBack () const |
void | setStencilBack (const StencilOpState &state) |
Sets the stencil test state for back faces. | |
quint32 | stencilReadMask () const |
void | setStencilReadMask (quint32 mask) |
Sets the stencil read mask. | |
quint32 | stencilWriteMask () const |
void | setStencilWriteMask (quint32 mask) |
Sets the stencil write mask. | |
int | sampleCount () const |
void | setSampleCount (int s) |
Sets the sample count. | |
float | lineWidth () const |
void | setLineWidth (float width) |
Sets the line width. | |
int | depthBias () const |
void | setDepthBias (int bias) |
Sets the depth bias. | |
float | slopeScaledDepthBias () const |
void | setSlopeScaledDepthBias (float bias) |
Sets the slope scaled depth bias. | |
void | setShaderStages (std::initializer_list< QRhiShaderStage > list) |
Sets the list of shader stages. | |
template<typename InputIterator > | |
void | setShaderStages (InputIterator first, InputIterator last) |
Sets the list of shader stages from the iterators first and last. | |
const QRhiShaderStage * | cbeginShaderStages () const |
const QRhiShaderStage * | cendShaderStages () const |
const QRhiShaderStage * | shaderStageAt (qsizetype index) const |
qsizetype | shaderStageCount () const |
QRhiVertexInputLayout | vertexInputLayout () const |
void | setVertexInputLayout (const QRhiVertexInputLayout &layout) |
Specifies the vertex input layout. | |
QRhiShaderResourceBindings * | shaderResourceBindings () const |
void | setShaderResourceBindings (QRhiShaderResourceBindings *srb) |
Associates with srb describing the resource binding layout and the resources (QRhiBuffer, QRhiTexture) themselves. | |
QRhiRenderPassDescriptor * | renderPassDescriptor () const |
void | setRenderPassDescriptor (QRhiRenderPassDescriptor *desc) |
Associates with the specified QRhiRenderPassDescriptor desc. | |
int | patchControlPointCount () const |
void | setPatchControlPointCount (int count) |
Sets the number of patch control points to count. | |
PolygonMode | polygonMode () const |
void | setPolygonMode (PolygonMode mode) |
Sets the polygon mode. | |
int | multiViewCount () const |
void | setMultiViewCount (int count) |
Sets the view count for multiview rendering. | |
virtual bool | create ()=0 |
Creates the corresponding native graphics resources. | |
![]() | |
virtual | ~QRhiResource () |
Destructor. | |
virtual Type | resourceType () const =0 |
virtual void | destroy ()=0 |
Releases (or requests deferred releasing of) the underlying native graphics resources. | |
void | deleteLater () |
When called without a frame being recorded, this function is equivalent to deleting the object. | |
QByteArray | name () const |
void | setName (const QByteArray &name) |
Sets a name for the object. | |
quint64 | globalResourceId () const |
QRhi * | rhi () const |
Public Attributes | ||
ID3D11DepthStencilState * | dsState = nullptr | |
ID3D11BlendState * | blendState = nullptr | |
struct { | ||
ID3D11VertexShader * shader = nullptr | ||
QShader::NativeResourceBindingMap nativeResourceBindingMap | ||
} | vs | |
struct { | ||
ID3D11HullShader * shader = nullptr | ||
QShader::NativeResourceBindingMap nativeResourceBindingMap | ||
} | hs | |
struct { | ||
ID3D11DomainShader * shader = nullptr | ||
QShader::NativeResourceBindingMap nativeResourceBindingMap | ||
} | ds | |
struct { | ||
ID3D11GeometryShader * shader = nullptr | ||
QShader::NativeResourceBindingMap nativeResourceBindingMap | ||
} | gs | |
struct { | ||
ID3D11PixelShader * shader = nullptr | ||
QShader::NativeResourceBindingMap nativeResourceBindingMap | ||
} | fs | |
ID3D11InputLayout * | inputLayout = nullptr | |
D3D11_PRIMITIVE_TOPOLOGY | d3dTopology = D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST | |
ID3D11RasterizerState * | rastState = nullptr | |
uint | generation = 0 | |
Friends | |
class | QRhiD3D11 |
Definition at line 294 of file qrhid3d11_p.h.
QD3D11GraphicsPipeline::QD3D11GraphicsPipeline | ( | QRhiImplementation * | rhi | ) |
Definition at line 3979 of file qrhid3d11.cpp.
QD3D11GraphicsPipeline::~QD3D11GraphicsPipeline | ( | ) |
Definition at line 3984 of file qrhid3d11.cpp.
References destroy().
|
overridevirtual |
Creates the corresponding native graphics resources.
If there are already resources present due to an earlier create() with no corresponding destroy(), then destroy() is called implicitly first.
true
when successful, false
when a graphics operation failed. Regardless of the return value, calling destroy() is always safe.VkPipelineCache
to improve data reuse during the lifetime of the application.Implements QRhiGraphicsPipeline.
Definition at line 4361 of file qrhid3d11.cpp.
References QVarLengthArray< T, Prealloc >::append(), QRhiVertexInputLayout::bindingAt(), blendState, QRhiVertexInputLayout::cbeginAttributes(), QRhiGraphicsPipeline::CCW, QRhiVertexInputLayout::cendAttributes(), QRhiVertexInputBinding::classification(), QRhiGraphicsPipeline::StencilOpState::compareOp, QRhiGraphicsPipeline::CompileShadersWithDebugInfo, QVarLengthArray< T, Prealloc >::constData(), QByteArray::constData(), QVarLengthArray< T, Prealloc >::count(), d3dTopology, QRhiGraphicsPipeline::StencilOpState::depthFailOp, desc, destroy(), ds, dsState, error, QRhiGraphicsPipeline::StencilOpState::failOp, QRhiShaderStage::Fragment, fs, generation, QRhiShaderStage::Geometry, gs, hs, i, inputLayout, QRhiVertexInputBinding::instanceStepRate(), QVarLengthArray< T, Prealloc >::isEmpty(), QByteArray::isEmpty(), it, QRhiGraphicsPipeline::m_cullMode, QRhiGraphicsPipeline::m_depthBias, QRhiGraphicsPipeline::m_depthOp, QRhiGraphicsPipeline::m_depthTest, QRhiGraphicsPipeline::m_depthWrite, QRhiGraphicsPipeline::m_flags, QRhiGraphicsPipeline::m_frontFace, QRhiGraphicsPipeline::m_patchControlPointCount, QRhiGraphicsPipeline::m_polygonMode, QRhiGraphicsPipeline::m_sampleCount, QRhiGraphicsPipeline::m_shaderStages, QRhiGraphicsPipeline::m_slopeScaledDepthBias, QRhiGraphicsPipeline::m_stencilBack, QRhiGraphicsPipeline::m_stencilFront, QRhiGraphicsPipeline::m_stencilReadMask, QRhiGraphicsPipeline::m_stencilTest, QRhiGraphicsPipeline::m_stencilWriteMask, QRhiGraphicsPipeline::m_targetBlends, QRhiGraphicsPipeline::m_topology, QRhiGraphicsPipeline::m_vertexInputLayout, QRhiImplementation::MAX_SHADER_CACHE_ENTRIES, QRhiGraphicsPipeline::StencilOpState::passOp, QRhiVertexInputBinding::PerInstance, qPrintable, QRHI_RES_RHI, qsnprintf(), qWarning, rastState, sem, QByteArray::size(), QRhiShaderStage::TessellationControl, QRhiShaderStage::TessellationEvaluation, toD3DAttributeFormat(), toD3DBlendFactor(), toD3DBlendOp(), toD3DColorWriteMask(), toD3DCompareOp(), toD3DCullMode(), toD3DFillMode(), toD3DStencilOp(), toD3DTopology(), QRhiGraphicsPipeline::UsesScissor, QRhiShaderStage::Vertex, and vs.
|
overridevirtual |
Releases (or requests deferred releasing of) the underlying native graphics resources.
Safe to call multiple times, subsequent invocations will be a no-op then.
Once destroy() is called, the QRhiResource instance can be reused, by calling create()
again. That will then result in creating new native graphics resources underneath.
The QRhiResource destructor also performs the same task, so calling this function is not necessary before deleting a QRhiResource.
Implements QRhiResource.
Definition at line 3999 of file qrhid3d11.cpp.
References blendState, ds, dsState, fs, gs, hs, inputLayout, QRHI_RES_RHI, rastState, releasePipelineShader(), and vs.
Referenced by ~QD3D11GraphicsPipeline(), and create().
|
friend |
Definition at line 327 of file qrhid3d11_p.h.
ID3D11BlendState* QD3D11GraphicsPipeline::blendState = nullptr |
Definition at line 302 of file qrhid3d11_p.h.
Referenced by create(), destroy(), and QRhiD3D11::executeCommandBuffer().
D3D11_PRIMITIVE_TOPOLOGY QD3D11GraphicsPipeline::d3dTopology = D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST |
Definition at line 324 of file qrhid3d11_p.h.
Referenced by create(), and QRhiD3D11::executeCommandBuffer().
struct { ... } QD3D11GraphicsPipeline::ds |
Referenced by create(), destroy(), and QRhiD3D11::setShaderResources().
ID3D11DepthStencilState* QD3D11GraphicsPipeline::dsState = nullptr |
Definition at line 301 of file qrhid3d11_p.h.
Referenced by create(), destroy(), and QRhiD3D11::executeCommandBuffer().
struct { ... } QD3D11GraphicsPipeline::fs |
Referenced by create(), destroy(), and QRhiD3D11::setShaderResources().
uint QD3D11GraphicsPipeline::generation = 0 |
Definition at line 326 of file qrhid3d11_p.h.
Referenced by create(), and QRhiD3D11::setGraphicsPipeline().
struct { ... } QD3D11GraphicsPipeline::gs |
Referenced by create(), destroy(), and QRhiD3D11::setShaderResources().
struct { ... } QD3D11GraphicsPipeline::hs |
Referenced by create(), destroy(), and QRhiD3D11::setShaderResources().
ID3D11InputLayout* QD3D11GraphicsPipeline::inputLayout = nullptr |
Definition at line 323 of file qrhid3d11_p.h.
Referenced by create(), destroy(), and QRhiD3D11::executeCommandBuffer().
QShader::NativeResourceBindingMap QD3D11GraphicsPipeline::nativeResourceBindingMap |
Definition at line 305 of file qrhid3d11_p.h.
Referenced by QRhiD3D11::setShaderResources().
ID3D11RasterizerState* QD3D11GraphicsPipeline::rastState = nullptr |
Definition at line 325 of file qrhid3d11_p.h.
Referenced by create(), destroy(), and QRhiD3D11::executeCommandBuffer().
ID3D11VertexShader* QD3D11GraphicsPipeline::shader = nullptr |
Definition at line 304 of file qrhid3d11_p.h.
Referenced by QRhiD3D11::executeCommandBuffer().
ID3D11HullShader* QD3D11GraphicsPipeline::shader = nullptr |
Definition at line 308 of file qrhid3d11_p.h.
ID3D11DomainShader* QD3D11GraphicsPipeline::shader = nullptr |
Definition at line 312 of file qrhid3d11_p.h.
ID3D11GeometryShader* QD3D11GraphicsPipeline::shader = nullptr |
Definition at line 316 of file qrhid3d11_p.h.
ID3D11PixelShader* QD3D11GraphicsPipeline::shader = nullptr |
Definition at line 320 of file qrhid3d11_p.h.
struct { ... } QD3D11GraphicsPipeline::vs |
Referenced by create(), destroy(), and QRhiD3D11::setShaderResources().