Tidy up Maxwell 3D regs a bit

This commit is contained in:
Billy Laws
2022-09-10 20:29:47 +01:00
parent 405d26fc22
commit e77e4891dc
8 changed files with 18 additions and 52 deletions

View File

@ -19,19 +19,19 @@ namespace skyline::gpu {
using DescriptorSizes = std::array<vk::DescriptorPoolSize, 5>;
constexpr DescriptorSizes BaseDescriptorSizes{
vk::DescriptorPoolSize{
.descriptorCount = maxwell3d::PipelineStageConstantBufferCount,
.descriptorCount = maxwell3d::ShaderStageConstantBufferCount,
.type = vk::DescriptorType::eUniformBuffer,
},
vk::DescriptorPoolSize{
.descriptorCount = maxwell3d::PipelineStageCount * 5,
.descriptorCount = maxwell3d::ShaderStageCount * 5,
.type = vk::DescriptorType::eStorageBuffer,
},
vk::DescriptorPoolSize{
.descriptorCount = maxwell3d::PipelineStageCount * 5,
.descriptorCount = maxwell3d::ShaderStageCount * 5,
.type = vk::DescriptorType::eCombinedImageSampler,
},
vk::DescriptorPoolSize{
.descriptorCount = maxwell3d::PipelineStageCount,
.descriptorCount = maxwell3d::ShaderStageCount,
.type = vk::DescriptorType::eStorageImage,
},
vk::DescriptorPoolSize{

View File

@ -70,12 +70,12 @@ namespace skyline::gpu::interconnect::maxwell3d {
}
}
void ConstantBuffers::Bind(InterconnectContext &ctx, engine::PipelineStage stage, size_t index) {
void ConstantBuffers::Bind(InterconnectContext &ctx, engine::ShaderStage stage, size_t index) {
auto &view{*selectorState.UpdateGet(ctx).view};
boundConstantBuffers[static_cast<size_t>(stage)][index] = {view};
}
void ConstantBuffers::Unbind(engine::PipelineStage stage, size_t index) {
void ConstantBuffers::Unbind(engine::ShaderStage stage, size_t index) {
boundConstantBuffers[static_cast<size_t>(stage)][index] = {};
}
}

View File

@ -48,7 +48,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
dirty::ManualDirtyState<ConstantBufferSelectorState> selectorState;
public:
std::array<std::array<ConstantBuffer, engine::PipelineStageConstantBufferCount>, engine::PipelineStageCount> boundConstantBuffers;
std::array<std::array<ConstantBuffer, engine::ShaderStageConstantBufferCount>, engine::ShaderStageCount> boundConstantBuffers;
ConstantBuffers(DirtyManager &manager, const ConstantBufferSelectorState::EngineRegisters &constantBufferSelectorRegisters);
@ -56,8 +56,8 @@ namespace skyline::gpu::interconnect::maxwell3d {
void Load(InterconnectContext &ctx, span<u32> data, u32 offset);
void Bind(InterconnectContext &ctx, engine::PipelineStage stage, size_t index);
void Bind(InterconnectContext &ctx, engine::ShaderStage stage, size_t index);
void Unbind(engine::PipelineStage stage, size_t index);
void Unbind(engine::ShaderStage stage, size_t index);
};
}

View File

@ -79,7 +79,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
constantBuffers.Load(ctx, data, offset);
}
void Maxwell3D::BindConstantBuffer(engine::PipelineStage stage, u32 index, bool enable) {
void Maxwell3D::BindConstantBuffer(engine::ShaderStage stage, u32 index, bool enable) {
if (enable)
constantBuffers.Bind(ctx, stage, index);
else

View File

@ -58,7 +58,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
/**
* @brief Binds the constant buffer selector to the given pipeline stage
*/
void BindConstantBuffer(engine::PipelineStage stage, u32 index, bool enable);
void BindConstantBuffer(engine::ShaderStage stage, u32 index, bool enable);
void Clear(engine::ClearSurface &clearSurface);