mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-12 22:08:59 +01:00
[dxvk] Don't use pipeline libraries for VS that doesn't export position
This commit is contained in:
parent
3aa786fb6f
commit
4d9c09b5e7
@ -89,6 +89,11 @@ namespace dxvk {
|
|||||||
varIds.push_back(varId);
|
varIds.push_back(varId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ins.arg(2) == spv::DecorationBuiltIn) {
|
||||||
|
if (ins.arg(3) == spv::BuiltInPosition)
|
||||||
|
m_flags.set(DxvkShaderFlag::ExportsPosition);
|
||||||
|
}
|
||||||
|
|
||||||
if (ins.arg(2) == spv::DecorationDescriptorSet) {
|
if (ins.arg(2) == spv::DecorationDescriptorSet) {
|
||||||
uint32_t varId = ins.arg(1);
|
uint32_t varId = ins.arg(1);
|
||||||
bindingOffsets.resize(std::max(bindingOffsets.size(), size_t(varId + 1)));
|
bindingOffsets.resize(std::max(bindingOffsets.size(), size_t(varId + 1)));
|
||||||
@ -190,6 +195,11 @@ namespace dxvk {
|
|||||||
&& m_info.stage != VK_SHADER_STAGE_COMPUTE_BIT)
|
&& m_info.stage != VK_SHADER_STAGE_COMPUTE_BIT)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Standalone vertex shaders must export vertex position
|
||||||
|
if (m_info.stage == VK_SHADER_STAGE_VERTEX_BIT
|
||||||
|
&& !m_flags.test(DxvkShaderFlag::ExportsPosition))
|
||||||
|
return false;
|
||||||
|
|
||||||
// Ignore shaders that have user-defined spec constants
|
// Ignore shaders that have user-defined spec constants
|
||||||
// and no selector to read their contents from elsewhere
|
// and no selector to read their contents from elsewhere
|
||||||
return !m_specConstantMask || (m_specConstantMask & (1u << MaxNumSpecConstants));
|
return !m_specConstantMask || (m_specConstantMask & (1u << MaxNumSpecConstants));
|
||||||
|
@ -27,6 +27,7 @@ namespace dxvk {
|
|||||||
enum DxvkShaderFlag : uint64_t {
|
enum DxvkShaderFlag : uint64_t {
|
||||||
HasSampleRateShading,
|
HasSampleRateShading,
|
||||||
HasTransformFeedback,
|
HasTransformFeedback,
|
||||||
|
ExportsPosition,
|
||||||
ExportsStencilRef,
|
ExportsStencilRef,
|
||||||
ExportsViewportIndexLayerFromVertexStage,
|
ExportsViewportIndexLayerFromVertexStage,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user