mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-26 16:31:50 +01:00
Cleanup helper pipeline cache code
This commit is contained in:
parent
1f99d63a80
commit
a8b32c3cef
@ -258,8 +258,9 @@ namespace skyline::gpu {
|
||||
},
|
||||
GetPipeline(gpu,
|
||||
{dstImageView->format->vkFormat,
|
||||
vk::Format::eUndefined, false, false, 0,
|
||||
VkColorComponentFlags{vk::ColorComponentFlagBits::eR | vk::ColorComponentFlagBits::eG | vk::ColorComponentFlagBits::eB | vk::ColorComponentFlagBits::eA}},
|
||||
vk::Format::eUndefined, 0,
|
||||
VkColorComponentFlags{vk::ColorComponentFlagBits::eR | vk::ColorComponentFlagBits::eG | vk::ColorComponentFlagBits::eB | vk::ColorComponentFlagBits::eA},
|
||||
false, false},
|
||||
{blit::SamplerLayoutBinding}, blit::PushConstantRanges),
|
||||
dstImageDimensions
|
||||
)};
|
||||
@ -358,9 +359,9 @@ namespace skyline::gpu {
|
||||
GetPipeline(gpu,
|
||||
{writeColor ? dstImageView->format->vkFormat : vk::Format::eUndefined,
|
||||
(writeDepth || writeStencil) ? dstImageView->format->vkFormat : vk::Format::eUndefined,
|
||||
writeDepth, writeStencil,
|
||||
value.depthStencil.stencil,
|
||||
VkColorComponentFlags{components}},
|
||||
VkColorComponentFlags{components},
|
||||
writeDepth, writeStencil},
|
||||
{}, clear::PushConstantRanges),
|
||||
dstImageView->texture->dimensions
|
||||
)};
|
||||
|
@ -26,12 +26,14 @@ namespace skyline::gpu {
|
||||
struct PipelineState {
|
||||
vk::Format colorFormat;
|
||||
vk::Format depthFormat;
|
||||
bool depthWrite;
|
||||
bool stencilWrite;
|
||||
u32 stencilValue;
|
||||
VkColorComponentFlags colorWriteMask;
|
||||
bool depthWrite;
|
||||
bool stencilWrite;
|
||||
|
||||
bool operator<=>(const PipelineState &) const = default;
|
||||
bool operator==(const PipelineState &input) const {
|
||||
return std::memcmp(this, &input, sizeof(PipelineState)) == 0;
|
||||
}
|
||||
};
|
||||
|
||||
std::unordered_map<PipelineState, cache::GraphicsPipelineCache::CompiledPipeline, util::ObjectHash<PipelineState>> pipelineCache;
|
||||
|
Loading…
Reference in New Issue
Block a user