texture_cache/surface_base: Address feedback

This commit is contained in:
ReinUsesLisp 2019-06-24 02:08:52 -03:00
parent 75de730e28
commit 0837290992
2 changed files with 10 additions and 2 deletions

View file

@ -19,6 +19,10 @@ using Tegra::Texture::ConvertFromGuestToHost;
using VideoCore::MortonSwizzleMode; using VideoCore::MortonSwizzleMode;
using VideoCore::Surface::SurfaceCompression; using VideoCore::Surface::SurfaceCompression;
StagingCache::StagingCache() = default;
StagingCache::~StagingCache() = default;
SurfaceBaseImpl::SurfaceBaseImpl(GPUVAddr gpu_addr, const SurfaceParams& params) SurfaceBaseImpl::SurfaceBaseImpl(GPUVAddr gpu_addr, const SurfaceParams& params)
: params{params}, mipmap_sizes(params.num_levels), : params{params}, mipmap_sizes(params.num_levels),
mipmap_offsets(params.num_levels), gpu_addr{gpu_addr}, host_memory_size{ mipmap_offsets(params.num_levels), gpu_addr{gpu_addr}, host_memory_size{

View file

@ -40,13 +40,17 @@ enum class MatchTopologyResult : u32 {
class StagingCache { class StagingCache {
public: public:
StagingCache() {} explicit StagingCache();
~StagingCache() = default; ~StagingCache();
std::vector<u8>& GetBuffer(std::size_t index) { std::vector<u8>& GetBuffer(std::size_t index) {
return staging_buffer[index]; return staging_buffer[index];
} }
const std::vector<u8>& GetBuffer(std::size_t index) const {
return staging_buffer[index];
}
void SetSize(std::size_t size) { void SetSize(std::size_t size) {
staging_buffer.resize(size); staging_buffer.resize(size);
} }