video_core: Refactor GPU interface (#7272)

* video_core: Refactor GPU interface

* citra_qt: Better debug widget lifetime
This commit is contained in:
GPUCode 2023-12-28 12:46:57 +02:00 committed by GitHub
parent 602f4f60d8
commit 2bb7f89c30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
167 changed files with 4172 additions and 4866 deletions

View file

@ -37,16 +37,14 @@ add_custom_command(OUTPUT scm_rev.cpp
"${VIDEO_CORE}/shader/generator/spv_fs_shader_gen.h"
"${VIDEO_CORE}/shader/shader.cpp"
"${VIDEO_CORE}/shader/shader.h"
"${VIDEO_CORE}/pica.cpp"
"${VIDEO_CORE}/pica.h"
"${VIDEO_CORE}/regs_framebuffer.h"
"${VIDEO_CORE}/regs_lighting.h"
"${VIDEO_CORE}/regs_pipeline.h"
"${VIDEO_CORE}/regs_rasterizer.h"
"${VIDEO_CORE}/regs_shader.h"
"${VIDEO_CORE}/regs_texturing.h"
"${VIDEO_CORE}/regs.cpp"
"${VIDEO_CORE}/regs.h"
"${VIDEO_CORE}/pica/regs_framebuffer.h"
"${VIDEO_CORE}/pica/regs_lighting.h"
"${VIDEO_CORE}/pica/regs_pipeline.h"
"${VIDEO_CORE}/pica/regs_rasterizer.h"
"${VIDEO_CORE}/pica/regs_shader.h"
"${VIDEO_CORE}/pica/regs_texturing.h"
"${VIDEO_CORE}/pica/regs_internal.cpp"
"${VIDEO_CORE}/pica/regs_internal.h"
# and also check that the scm_rev files haven't changed
"${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp.in"
"${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.h"

View file

@ -110,8 +110,10 @@ public:
return std::span{cptr, std::min(size, csize)};
}
std::span<const u8> GetReadBytes(std::size_t size) const {
return std::span{cptr, std::min(size, csize)};
template <typename T>
std::span<const T> GetReadBytes(std::size_t size) const {
const auto* cptr_t = reinterpret_cast<T*>(cptr);
return std::span{cptr_t, std::min(size, csize) / sizeof(T)};
}
std::size_t GetSize() const {