diff options
Diffstat (limited to 'runtime/src')
| -rw-r--r-- | runtime/src/vulkan_replay.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/src/vulkan_replay.h b/runtime/src/vulkan_replay.h index 889bb71f7..f7702f128 100644 --- a/runtime/src/vulkan_replay.h +++ b/runtime/src/vulkan_replay.h | |||
| @@ -773,7 +773,10 @@ struct GraphicsPipeline { | |||
| 773 | // unbound (D3D12 allows it; dynamic rendering needs the formats to agree). Bit i: colour slot i, bit 8: depth | 773 | // unbound (D3D12 allows it; dynamic rendering needs the formats to agree). Bit i: colour slot i, bit 8: depth |
| 774 | // and stencil. Null when it cannot be built. | 774 | // and stencil. Null when it cannot be built. |
| 775 | static constexpr std::uint32_t unbound_depth = 1u << 8; | 775 | static constexpr std::uint32_t unbound_depth = 1u << 8; |
| 776 | std::function<VkPipeline(std::uint32_t unbound)> variant; | 776 | static constexpr std::uint32_t rectangle_stage = 1u << 9; |
| 777 | // IA topology requiring a fourth-corner geometry stage. Zero when the PSO already contains the stage. | ||
| 778 | std::uint32_t rectangle_variant_topology = 0; | ||
| 779 | std::function<VkPipeline(std::uint32_t flags)> variant; | ||
| 777 | std::uint32_t samples = 1; // rasterizationSamples; every bound attachment must have this count | 780 | std::uint32_t samples = 1; // rasterizationSamples; every bound attachment must have this count |
| 778 | }; | 781 | }; |
| 779 | 782 | ||
| @@ -2160,6 +2163,8 @@ ReplayResult prepare_draw(const Draw& draw, Resolve&& resolve, const ReplayFunct | |||
| 2160 | // Slots the pipeline has a format for but the draw leaves unbound take a variant whose format there is | 2163 | // Slots the pipeline has a format for but the draw leaves unbound take a variant whose format there is |
| 2161 | // VK_FORMAT_UNDEFINED: D3D12 discards those writes, Vulkan wants the formats to match the attachments. | 2164 | // VK_FORMAT_UNDEFINED: D3D12 discards those writes, Vulkan wants the formats to match the attachments. |
| 2162 | std::uint32_t unbound = 0; | 2165 | std::uint32_t unbound = 0; |
| 2166 | if (pipeline->rectangle_variant_topology && draw.topology == pipeline->rectangle_variant_topology) | ||
| 2167 | unbound |= GraphicsPipeline::rectangle_stage; | ||
| 2163 | for (std::size_t slot = 0; slot < p.colors.size(); ++slot) | 2168 | for (std::size_t slot = 0; slot < p.colors.size(); ++slot) |
| 2164 | if (pipeline->color_formats[slot] != VK_FORMAT_UNDEFINED && !p.colors[slot].id) unbound |= 1u << slot; | 2169 | if (pipeline->color_formats[slot] != VK_FORMAT_UNDEFINED && !p.colors[slot].id) unbound |= 1u << slot; |
| 2165 | if (pipeline->depth_format != VK_FORMAT_UNDEFINED && !p.depth.id) unbound |= GraphicsPipeline::unbound_depth; | 2170 | if (pipeline->depth_format != VK_FORMAT_UNDEFINED && !p.depth.id) unbound |= GraphicsPipeline::unbound_depth; |