1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-13 07:08:50 +01:00

[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:
Philip Rebohle 2022-07-05 18:59:40 +02:00
parent a6b0783a51
commit a49333cd87
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 4 additions and 0 deletions

View File

@ -115,6 +115,9 @@ namespace dxvk {
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) {
m_o1LocOffset = ins.offset() + 3;
o1VarId = ins.arg(1);

View File

@ -39,6 +39,7 @@ namespace dxvk {
enum DxvkShaderFlag : uint64_t {
HasSampleRateShading,
HasTransformFeedback,
HasSpecConstants,
ExportsStencilRef,
ExportsViewportIndexLayerFromVertexStage,
};