mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-26 01:24:16 +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,
|
GetPipeline(gpu,
|
||||||
{dstImageView->format->vkFormat,
|
{dstImageView->format->vkFormat,
|
||||||
vk::Format::eUndefined, false, false, 0,
|
vk::Format::eUndefined, 0,
|
||||||
VkColorComponentFlags{vk::ColorComponentFlagBits::eR | vk::ColorComponentFlagBits::eG | vk::ColorComponentFlagBits::eB | vk::ColorComponentFlagBits::eA}},
|
VkColorComponentFlags{vk::ColorComponentFlagBits::eR | vk::ColorComponentFlagBits::eG | vk::ColorComponentFlagBits::eB | vk::ColorComponentFlagBits::eA},
|
||||||
|
false, false},
|
||||||
{blit::SamplerLayoutBinding}, blit::PushConstantRanges),
|
{blit::SamplerLayoutBinding}, blit::PushConstantRanges),
|
||||||
dstImageDimensions
|
dstImageDimensions
|
||||||
)};
|
)};
|
||||||
@ -358,9 +359,9 @@ namespace skyline::gpu {
|
|||||||
GetPipeline(gpu,
|
GetPipeline(gpu,
|
||||||
{writeColor ? dstImageView->format->vkFormat : vk::Format::eUndefined,
|
{writeColor ? dstImageView->format->vkFormat : vk::Format::eUndefined,
|
||||||
(writeDepth || writeStencil) ? dstImageView->format->vkFormat : vk::Format::eUndefined,
|
(writeDepth || writeStencil) ? dstImageView->format->vkFormat : vk::Format::eUndefined,
|
||||||
writeDepth, writeStencil,
|
|
||||||
value.depthStencil.stencil,
|
value.depthStencil.stencil,
|
||||||
VkColorComponentFlags{components}},
|
VkColorComponentFlags{components},
|
||||||
|
writeDepth, writeStencil},
|
||||||
{}, clear::PushConstantRanges),
|
{}, clear::PushConstantRanges),
|
||||||
dstImageView->texture->dimensions
|
dstImageView->texture->dimensions
|
||||||
)};
|
)};
|
||||||
|
@ -26,12 +26,14 @@ namespace skyline::gpu {
|
|||||||
struct PipelineState {
|
struct PipelineState {
|
||||||
vk::Format colorFormat;
|
vk::Format colorFormat;
|
||||||
vk::Format depthFormat;
|
vk::Format depthFormat;
|
||||||
bool depthWrite;
|
|
||||||
bool stencilWrite;
|
|
||||||
u32 stencilValue;
|
u32 stencilValue;
|
||||||
VkColorComponentFlags colorWriteMask;
|
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;
|
std::unordered_map<PipelineState, cache::GraphicsPipelineCache::CompiledPipeline, util::ObjectHash<PipelineState>> pipelineCache;
|
||||||
|
Loading…
Reference in New Issue
Block a user