1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 14:52:11 +01:00

[dxvk] Add pipeline flag for rasterizer discard

This commit is contained in:
Philip Rebohle 2022-07-12 11:42:24 +02:00
parent 77891d71db
commit 18d4a87333
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 13 additions and 7 deletions

View File

@ -475,7 +475,8 @@ namespace dxvk {
m_vsIn = m_shaders.vs != nullptr ? m_shaders.vs->info().inputMask : 0;
m_fsOut = m_shaders.fs != nullptr ? m_shaders.fs->info().outputMask : 0;
if (m_shaders.gs != nullptr && m_shaders.gs->flags().test(DxvkShaderFlag::HasTransformFeedback)) {
if (m_shaders.gs != nullptr) {
if (m_shaders.gs->flags().test(DxvkShaderFlag::HasTransformFeedback)) {
m_flags.set(DxvkGraphicsPipelineFlag::HasTransformFeedback);
m_barrier.stages |= VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT
@ -485,6 +486,10 @@ namespace dxvk {
| VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT;
}
if (m_shaders.gs->info().xfbRasterizedStream < 0)
m_flags.set(DxvkGraphicsPipelineFlag::HasRasterizerDiscard);
}
if (m_barrier.access & VK_ACCESS_SHADER_WRITE_BIT)
m_flags.set(DxvkGraphicsPipelineFlag::HasStorageDescriptors);
}

View File

@ -180,6 +180,7 @@ namespace dxvk {
* \brief Flags that describe pipeline properties
*/
enum class DxvkGraphicsPipelineFlag {
HasRasterizerDiscard,
HasTransformFeedback,
HasStorageDescriptors,
};