Move maxwell3d to common constant buffer code

This commit is contained in:
Billy Laws 2022-11-18 21:31:37 +00:00
parent 8f0a6e78c5
commit 62c86b7690
2 changed files with 0 additions and 23 deletions

View File

@ -33,16 +33,6 @@ namespace skyline::gpu::interconnect::maxwell3d {
view.PurgeCaches();
}
static void FlushHostCallback() {
// TODO: here we should trigger `Execute()`, however that doesn't currently work due to Read being called mid-draw and attached objects not handling this case
Logger::Warn("GPU dirty buffer reads for attached buffers are unimplemented");
}
void ConstantBuffer::Read(CommandExecutor &executor, span<u8> dstBuffer, size_t srcOffset) {
ContextLock lock{executor.tag, view};
view.Read(lock.IsFirstUsage(), FlushHostCallback, dstBuffer, srcOffset);
}
ConstantBuffers::ConstantBuffers(DirtyManager &manager, const ConstantBufferSelectorState::EngineRegisters &constantBufferSelectorRegisters) : selectorState{manager, constantBufferSelectorRegisters} {}
void ConstantBuffers::MarkAllDirty() {

View File

@ -29,19 +29,6 @@ namespace skyline::gpu::interconnect::maxwell3d {
void PurgeCaches();
};
struct ConstantBuffer {
BufferView view;
void Read(CommandExecutor &executor, span <u8> dstBuffer, size_t srcOffset);
template<typename T>
T Read(CommandExecutor &executor, size_t srcOffset) {
T object;
Read(executor, span<T>{object}.template cast<u8>(), srcOffset);
return object;
}
};
using ConstantBufferSet = std::array<std::array<ConstantBuffer, engine::ShaderStageConstantBufferCount>, engine::ShaderStageCount>;
/**