Add feature for per render target blending
Task-number: QTBUG-130334 Change-Id: I30ae0023ce8b5c26360e4255d64c209ebe404ede Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
36dca3c04f
commit
c06c8eba50
@ -1069,6 +1069,11 @@ Q_STATIC_LOGGING_CATEGORY(QRHI_LOG_RUB, "qt.rhi.rub")
|
|||||||
specification of the shading rate is supported via regular textures. In
|
specification of the shading rate is supported via regular textures. In
|
||||||
practice this may be supported with Direct 3D 12 and Vulkan. This enum value
|
practice this may be supported with Direct 3D 12 and Vulkan. This enum value
|
||||||
has been introduced in Qt 6.9.
|
has been introduced in Qt 6.9.
|
||||||
|
|
||||||
|
\value PerRenderTargetBlending Indicates that per rendertarget blending is
|
||||||
|
supported i.e. different render targets in MRT framebuffer can have different
|
||||||
|
blending modes. Currently always returns false for OpenGL.
|
||||||
|
This enum value has been introduced in Qt 6.9.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -1907,7 +1907,8 @@ public:
|
|||||||
ResolveDepthStencil,
|
ResolveDepthStencil,
|
||||||
VariableRateShading,
|
VariableRateShading,
|
||||||
VariableRateShadingMap,
|
VariableRateShadingMap,
|
||||||
VariableRateShadingMapWithTexture
|
VariableRateShadingMapWithTexture,
|
||||||
|
PerRenderTargetBlending,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum BeginFrameFlag {
|
enum BeginFrameFlag {
|
||||||
|
@ -656,6 +656,8 @@ bool QRhiD3D11::isFeatureSupported(QRhi::Feature feature) const
|
|||||||
case QRhi::VariableRateShadingMap:
|
case QRhi::VariableRateShadingMap:
|
||||||
case QRhi::VariableRateShadingMapWithTexture:
|
case QRhi::VariableRateShadingMapWithTexture:
|
||||||
return false;
|
return false;
|
||||||
|
case QRhi::PerRenderTargetBlending:
|
||||||
|
return true;
|
||||||
default:
|
default:
|
||||||
Q_UNREACHABLE();
|
Q_UNREACHABLE();
|
||||||
return false;
|
return false;
|
||||||
|
@ -807,6 +807,8 @@ bool QRhiD3D12::isFeatureSupported(QRhi::Feature feature) const
|
|||||||
case QRhi::VariableRateShadingMap:
|
case QRhi::VariableRateShadingMap:
|
||||||
case QRhi::VariableRateShadingMapWithTexture:
|
case QRhi::VariableRateShadingMapWithTexture:
|
||||||
return caps.vrsMap;
|
return caps.vrsMap;
|
||||||
|
case QRhi::PerRenderTargetBlending:
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1117,6 +1117,7 @@ bool QRhiGles2::create(QRhi::Flags flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
caps.unpackRowLength = !caps.gles || caps.ctxMajor >= 3;
|
caps.unpackRowLength = !caps.gles || caps.ctxMajor >= 3;
|
||||||
|
caps.perRenderTargetBlending = false;
|
||||||
|
|
||||||
nativeHandlesStruct.context = ctx;
|
nativeHandlesStruct.context = ctx;
|
||||||
|
|
||||||
@ -1507,6 +1508,8 @@ bool QRhiGles2::isFeatureSupported(QRhi::Feature feature) const
|
|||||||
case QRhi::VariableRateShadingMap:
|
case QRhi::VariableRateShadingMap:
|
||||||
case QRhi::VariableRateShadingMapWithTexture:
|
case QRhi::VariableRateShadingMapWithTexture:
|
||||||
return false;
|
return false;
|
||||||
|
case QRhi::PerRenderTargetBlending:
|
||||||
|
return caps.perRenderTargetBlending;
|
||||||
default:
|
default:
|
||||||
Q_UNREACHABLE_RETURN(false);
|
Q_UNREACHABLE_RETURN(false);
|
||||||
}
|
}
|
||||||
|
@ -1025,7 +1025,8 @@ public:
|
|||||||
objectLabel(false),
|
objectLabel(false),
|
||||||
glesMultisampleRenderToTexture(false),
|
glesMultisampleRenderToTexture(false),
|
||||||
glesMultiviewMultisampleRenderToTexture(false),
|
glesMultiviewMultisampleRenderToTexture(false),
|
||||||
unpackRowLength(false)
|
unpackRowLength(false),
|
||||||
|
perRenderTargetBlending(false)
|
||||||
{ }
|
{ }
|
||||||
int ctxMajor;
|
int ctxMajor;
|
||||||
int ctxMinor;
|
int ctxMinor;
|
||||||
@ -1085,6 +1086,7 @@ public:
|
|||||||
uint glesMultisampleRenderToTexture : 1;
|
uint glesMultisampleRenderToTexture : 1;
|
||||||
uint glesMultiviewMultisampleRenderToTexture : 1;
|
uint glesMultiviewMultisampleRenderToTexture : 1;
|
||||||
uint unpackRowLength : 1;
|
uint unpackRowLength : 1;
|
||||||
|
uint perRenderTargetBlending : 1;
|
||||||
} caps;
|
} caps;
|
||||||
QGles2SwapChain *currentSwapChain = nullptr;
|
QGles2SwapChain *currentSwapChain = nullptr;
|
||||||
QSet<GLint> supportedCompressedFormats;
|
QSet<GLint> supportedCompressedFormats;
|
||||||
|
@ -867,6 +867,8 @@ bool QRhiMetal::isFeatureSupported(QRhi::Feature feature) const
|
|||||||
return caps.shadingRateMap;
|
return caps.shadingRateMap;
|
||||||
case QRhi::VariableRateShadingMapWithTexture:
|
case QRhi::VariableRateShadingMapWithTexture:
|
||||||
return false;
|
return false;
|
||||||
|
case QRhi::PerRenderTargetBlending:
|
||||||
|
return true;
|
||||||
default:
|
default:
|
||||||
Q_UNREACHABLE();
|
Q_UNREACHABLE();
|
||||||
return false;
|
return false;
|
||||||
|
@ -5202,6 +5202,8 @@ bool QRhiVulkan::isFeatureSupported(QRhi::Feature feature) const
|
|||||||
case QRhi::VariableRateShadingMap:
|
case QRhi::VariableRateShadingMap:
|
||||||
case QRhi::VariableRateShadingMapWithTexture:
|
case QRhi::VariableRateShadingMapWithTexture:
|
||||||
return caps.renderPass2KHR && caps.imageBasedShadingRate;
|
return caps.renderPass2KHR && caps.imageBasedShadingRate;
|
||||||
|
case QRhi::PerRenderTargetBlending:
|
||||||
|
return true;
|
||||||
default:
|
default:
|
||||||
Q_UNREACHABLE_RETURN(false);
|
Q_UNREACHABLE_RETURN(false);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user