mirror of
https://github.com/Takiiiiiiii/strato.git
synced 2025-07-17 08:46:39 +00:00
Tidy up Maxwell 3D regs a bit
This commit is contained in:
@ -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{
|
||||
|
@ -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] = {};
|
||||
}
|
||||
}
|
@ -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);
|
||||
};
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user