From 390721a561c2995d2a444b5697869476b48ba6c1 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Tue, 22 Jan 2019 00:57:30 -0300 Subject: maxwell_3d: Allow texture handles with TIC id zero Also remove "enabled" field from Tegra::Texture::FullTextureInfo because it would become unused. --- src/video_core/engines/maxwell_3d.cpp | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'src/video_core/engines') diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index a388b3944..cda9b0da5 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -462,13 +462,9 @@ std::vector Maxwell3D::GetStageTextures(Regs::ShaderSt sizeof(Texture::TextureHandle); // Load the TIC data. - if (tex_handle.tic_id != 0) { - tex_info.enabled = true; - - auto tic_entry = GetTICEntry(tex_handle.tic_id); - // TODO(Subv): Workaround for BitField's move constructor being deleted. - std::memcpy(&tex_info.tic, &tic_entry, sizeof(tic_entry)); - } + auto tic_entry = GetTICEntry(tex_handle.tic_id); + // TODO(Subv): Workaround for BitField's move constructor being deleted. + std::memcpy(&tex_info.tic, &tic_entry, sizeof(tic_entry)); // Load the TSC data if (tex_handle.tsc_id != 0) { @@ -477,8 +473,7 @@ std::vector Maxwell3D::GetStageTextures(Regs::ShaderSt std::memcpy(&tex_info.tsc, &tsc_entry, sizeof(tsc_entry)); } - if (tex_info.enabled) - textures.push_back(tex_info); + textures.push_back(tex_info); } return textures; @@ -501,13 +496,9 @@ Texture::FullTextureInfo Maxwell3D::GetStageTexture(Regs::ShaderStage stage, tex_info.index = static_cast(offset); // Load the TIC data. - if (tex_handle.tic_id != 0) { - tex_info.enabled = true; - - auto tic_entry = GetTICEntry(tex_handle.tic_id); - // TODO(Subv): Workaround for BitField's move constructor being deleted. - std::memcpy(&tex_info.tic, &tic_entry, sizeof(tic_entry)); - } + auto tic_entry = GetTICEntry(tex_handle.tic_id); + // TODO(Subv): Workaround for BitField's move constructor being deleted. + std::memcpy(&tex_info.tic, &tic_entry, sizeof(tic_entry)); // Load the TSC data if (tex_handle.tsc_id != 0) { -- cgit v1.2.3