mirror of https://github.com/doitsujin/dxvk
[dxvk] Add pass to check whether a shader has spec constants
Pipeline libraries cannot be used for shaders with user spec constants.
This commit is contained in:
parent
a6b0783a51
commit
a49333cd87
|
@ -115,6 +115,9 @@ namespace dxvk {
|
||||||
bindingOffsets[varId].setOffset = ins.offset() + 3;
|
bindingOffsets[varId].setOffset = ins.offset() + 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ins.arg(2) == spv::DecorationSpecId && ins.arg(3) < MaxNumSpecConstants)
|
||||||
|
m_flags.set(DxvkShaderFlag::HasSpecConstants);
|
||||||
|
|
||||||
if (ins.arg(2) == spv::DecorationLocation && ins.arg(3) == 1) {
|
if (ins.arg(2) == spv::DecorationLocation && ins.arg(3) == 1) {
|
||||||
m_o1LocOffset = ins.offset() + 3;
|
m_o1LocOffset = ins.offset() + 3;
|
||||||
o1VarId = ins.arg(1);
|
o1VarId = ins.arg(1);
|
||||||
|
|
|
@ -39,6 +39,7 @@ namespace dxvk {
|
||||||
enum DxvkShaderFlag : uint64_t {
|
enum DxvkShaderFlag : uint64_t {
|
||||||
HasSampleRateShading,
|
HasSampleRateShading,
|
||||||
HasTransformFeedback,
|
HasTransformFeedback,
|
||||||
|
HasSpecConstants,
|
||||||
ExportsStencilRef,
|
ExportsStencilRef,
|
||||||
ExportsViewportIndexLayerFromVertexStage,
|
ExportsViewportIndexLayerFromVertexStage,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue