diff options
Diffstat (limited to 'src/video_core/shader_environment.cpp')
-rw-r--r-- | src/video_core/shader_environment.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/video_core/shader_environment.cpp b/src/video_core/shader_environment.cpp index fbabb3219..63bcf9337 100644 --- a/src/video_core/shader_environment.cpp +++ b/src/video_core/shader_environment.cpp @@ -188,6 +188,8 @@ void GenericEnvironment::Serialize(std::ofstream& file) const { .write(reinterpret_cast<const char*>(&start_address), sizeof(start_address)) .write(reinterpret_cast<const char*>(&cached_lowest), sizeof(cached_lowest)) .write(reinterpret_cast<const char*>(&cached_highest), sizeof(cached_highest)) + .write(reinterpret_cast<const char*>(&viewport_transform_state), + sizeof(viewport_transform_state)) .write(reinterpret_cast<const char*>(&stage), sizeof(stage)) .write(reinterpret_cast<const char*>(code.data()), code_size); for (const auto& [key, type] : texture_types) { @@ -309,6 +311,12 @@ Shader::TextureType GraphicsEnvironment::ReadTextureType(u32 handle) { handle); } +u32 GraphicsEnvironment::ReadViewportTransformState() { + const auto& regs{maxwell3d->regs}; + viewport_transform_state = regs.viewport_transform_enabled; + return viewport_transform_state; +} + ComputeEnvironment::ComputeEnvironment(Tegra::Engines::KeplerCompute& kepler_compute_, Tegra::MemoryManager& gpu_memory_, GPUVAddr program_base_, u32 start_address_) @@ -340,6 +348,10 @@ Shader::TextureType ComputeEnvironment::ReadTextureType(u32 handle) { return ReadTextureTypeImpl(regs.tic.Address(), regs.tic.limit, qmd.linked_tsc != 0, handle); } +u32 ComputeEnvironment::ReadViewportTransformState() { + return viewport_transform_state; +} + void FileEnvironment::Deserialize(std::ifstream& file) { u64 code_size{}; u64 num_texture_types{}; @@ -352,6 +364,7 @@ void FileEnvironment::Deserialize(std::ifstream& file) { .read(reinterpret_cast<char*>(&start_address), sizeof(start_address)) .read(reinterpret_cast<char*>(&read_lowest), sizeof(read_lowest)) .read(reinterpret_cast<char*>(&read_highest), sizeof(read_highest)) + .read(reinterpret_cast<char*>(&viewport_transform_state), sizeof(viewport_transform_state)) .read(reinterpret_cast<char*>(&stage), sizeof(stage)); code = std::make_unique<u64[]>(Common::DivCeil(code_size, sizeof(u64))); file.read(reinterpret_cast<char*>(code.get()), code_size); @@ -409,6 +422,10 @@ Shader::TextureType FileEnvironment::ReadTextureType(u32 handle) { return it->second; } +u32 FileEnvironment::ReadViewportTransformState() { + return viewport_transform_state; +} + u32 FileEnvironment::LocalMemorySize() const { return local_memory_size; } |