Fix creating multisampled pipeline on dx12 backend
Use the depthStencil format to check multisample support when the pipeline doesn't have color attachments. Fixes: QTBUG-131505 Change-Id: I8fec8383ed854a581586213e3dbd401bb457cefc Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit f6d67ed9b760e87af3e032ea49e5babc6951ef91) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
f2b7d064b0
commit
f60fd291b5
@ -5668,7 +5668,16 @@ bool QD3D12GraphicsPipeline::create()
|
||||
}
|
||||
|
||||
QD3D12RenderPassDescriptor *rpD = QRHI_RES(QD3D12RenderPassDescriptor, m_renderPassDesc);
|
||||
const DXGI_SAMPLE_DESC sampleDesc = rhiD->effectiveSampleDesc(m_sampleCount, DXGI_FORMAT(rpD->colorFormat[0]));
|
||||
DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN;
|
||||
if (rpD->colorAttachmentCount > 0) {
|
||||
format = DXGI_FORMAT(rpD->colorFormat[0]);
|
||||
} else if (rpD->hasDepthStencil) {
|
||||
format = DXGI_FORMAT(rpD->dsFormat);
|
||||
} else {
|
||||
qWarning("Cannot create graphics pipeline state without color or depthStencil format");
|
||||
return false;
|
||||
}
|
||||
const DXGI_SAMPLE_DESC sampleDesc = rhiD->effectiveSampleDesc(m_sampleCount, format);
|
||||
|
||||
struct {
|
||||
QD3D12PipelineStateSubObject<ID3D12RootSignature *, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_ROOT_SIGNATURE> rootSig;
|
||||
|
Loading…
x
Reference in New Issue
Block a user