Avoid redundantly passing executor in ctors when it's already in ChannelCtx

This commit is contained in:
Billy Laws
2022-10-25 20:55:50 +01:00
parent 463394ba72
commit c5ec484d9a
9 changed files with 28 additions and 27 deletions

View File

@ -106,7 +106,10 @@ namespace skyline::gpu::interconnect {
return texture;
}
Fermi2D::Fermi2D(GPU &gpu, soc::gm20b::ChannelContext &channelCtx, gpu::interconnect::CommandExecutor &executor) : gpu(gpu), channelCtx(channelCtx), executor(executor) {}
Fermi2D::Fermi2D(GPU &gpu, soc::gm20b::ChannelContext &channelCtx)
: gpu{gpu},
channelCtx{channelCtx},
executor{channelCtx.executor} {}
void Fermi2D::Blit(const Surface &srcSurface, const Surface &dstSurface, float srcRectX, float srcRectY, u32 dstRectWidth, u32 dstRectHeight, u32 dstRectX, u32 dstRectY, float duDx, float dvDy, SampleModeOrigin sampleOrigin, bool resolve, SampleModeFilter filter) {
// TODO: When we support MSAA perform a resolve operation rather than blit when the `resolve` flag is set.

View File

@ -36,7 +36,7 @@ namespace skyline::gpu::interconnect {
gpu::GuestTexture GetGuestTexture(const Surface &surface);
public:
Fermi2D(GPU &gpu, soc::gm20b::ChannelContext &channelCtx, gpu::interconnect::CommandExecutor &executor);
Fermi2D(GPU &gpu, soc::gm20b::ChannelContext &channelCtx);
void Blit(const Surface &srcSurface, const Surface &dstSurface, float srcRectX, float srcRectY, u32 dstRectWidth, u32 dstRectHeight, u32 dstRectX, u32 dstRectY, float duDx, float dvDy, SampleModeOrigin sampleOrigin, bool resolve, SampleModeFilter filter);
};

View File

@ -4,7 +4,7 @@
#include <gpu/interconnect/command_executor.h>
#include <gpu/interconnect/conversion/quads.h>
#include <vulkan/vulkan_structs.hpp>
#include <soc/gm20b/channel.h>
#include "common/utils.h"
#include "maxwell_3d.h"
#include "common.h"
@ -13,19 +13,18 @@
namespace skyline::gpu::interconnect::maxwell3d {
Maxwell3D::Maxwell3D(GPU &gpu,
soc::gm20b::ChannelContext &channelCtx,
gpu::interconnect::CommandExecutor &executor,
nce::NCE &nce,
skyline::kernel::MemoryManager &memoryManager,
DirtyManager &manager,
const EngineRegisterBundle &registerBundle)
: ctx{channelCtx, executor, gpu, nce, memoryManager},
: ctx{channelCtx, channelCtx.executor, gpu, nce, memoryManager},
activeState{manager, registerBundle.activeStateRegisters},
clearEngineRegisters{registerBundle.clearRegisters},
constantBuffers{manager, registerBundle.constantBufferSelectorRegisters},
samplers{manager, registerBundle.samplerPoolRegisters},
textures{manager, registerBundle.texturePoolRegisters},
directState{activeState.directState} {
executor.AddFlushCallback([this] {
ctx.executor.AddFlushCallback([this] {
if (attachedDescriptorSets) {
ctx.executor.AttachDependency(attachedDescriptorSets);
attachedDescriptorSets = nullptr;
@ -40,7 +39,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
constantBuffers.DisableQuickBind();
});
executor.AddPipelineChangeCallback([this] {
ctx.executor.AddPipelineChangeCallback([this] {
activeState.MarkAllDirty();
activeDescriptorSet = nullptr;
});

View File

@ -61,7 +61,6 @@ namespace skyline::gpu::interconnect::maxwell3d {
Maxwell3D(GPU &gpu,
soc::gm20b::ChannelContext &channelCtx,
gpu::interconnect::CommandExecutor &executor,
nce::NCE &nce,
kernel::MemoryManager &memoryManager,
DirtyManager &manager,