Make active Vulkan pipeline public

This commit is contained in:
Billy Laws 2022-09-29 21:40:00 +01:00
parent 2556966ec5
commit 3e12cde4d5
3 changed files with 9 additions and 2 deletions

View File

@ -88,7 +88,6 @@ namespace skyline::gpu::interconnect::maxwell3d {
u32 lastExecutionNumber{}; //!< The last execution number this pipeline was used at
std::array<ShaderStage, engine::ShaderStageCount> shaderStages;
DescriptorInfo descriptorInfo;
cache::GraphicsPipelineCache::CompiledPipeline compiledPipeline;
std::array<Pipeline *, 4> transitionCache{};
size_t transitionCacheNextIdx{};
@ -98,6 +97,8 @@ namespace skyline::gpu::interconnect::maxwell3d {
void SyncCachedStorageBufferViews(u32 executionNumber);
public:
cache::GraphicsPipelineCache::CompiledPipeline compiledPipeline;
PackedPipelineState sourcePackedState;
Pipeline(InterconnectContext &ctx, const PackedPipelineState &packedState, const std::array<ShaderBinary, engine::PipelineCount> &shaderBinaries, span<TextureView *> colorAttachments, TextureView *depthAttachment);

View File

@ -535,6 +535,10 @@ namespace skyline::gpu::interconnect::maxwell3d {
pipeline = newPipeline;
}
void PipelineState::PurgeCaches() {
pipeline = nullptr;
}
std::shared_ptr<TextureView> PipelineState::GetColorRenderTargetForClear(InterconnectContext &ctx, size_t index) {
return colorRenderTargets[index].UpdateGet(ctx, packedState).view;
}

View File

@ -271,7 +271,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
/**
* @brief Holds all GPU state for a pipeline, any changes to this will result in a pipeline cache lookup
*/
class PipelineState : dirty::ManualDirty {
class PipelineState : dirty::CachedManualDirty {
public:
struct EngineRegisters {
std::array<PipelineStageState::EngineRegisters, engine::PipelineCount> pipelineStageRegisters;
@ -317,6 +317,8 @@ namespace skyline::gpu::interconnect::maxwell3d {
void Flush(InterconnectContext &ctx, StateUpdateBuilder &builder);
void PurgeCaches();
std::shared_ptr<TextureView> GetColorRenderTargetForClear(InterconnectContext &ctx, size_t index);
std::shared_ptr<TextureView> GetDepthRenderTargetForClear(InterconnectContext &ctx);