video_core: Fix SNORM texture buffer emulating error (#9001)

This commit is contained in:
Feng Chen 2022-11-04 14:39:42 +08:00 committed by GitHub
parent ece22fcbc7
commit 75596c07e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 224 additions and 52 deletions

View file

@ -444,8 +444,8 @@ void GraphicsPipeline::ConfigureImpl(bool is_indexed) {
const auto& info{stage_infos[0]};
if (info.uses_render_area) {
render_area.uses_render_area = true;
render_area.words = {static_cast<float>(regs.render_area.width),
static_cast<float>(regs.render_area.height)};
render_area.words = {static_cast<float>(regs.surface_clip.width),
static_cast<float>(regs.surface_clip.height)};
}
}};
if constexpr (Spec::enabled_stages[0]) {

View file

@ -683,11 +683,11 @@ void RasterizerVulkan::UpdateViewportsState(Tegra::Engines::Maxwell3D::Regs& reg
if (!state_tracker.TouchViewports()) {
return;
}
if (!regs.viewport_transform_enabled) {
const auto x = static_cast<float>(regs.render_area.x);
const auto y = static_cast<float>(regs.render_area.y);
const auto width = static_cast<float>(regs.render_area.width);
const auto height = static_cast<float>(regs.render_area.height);
if (!regs.viewport_scale_offset_enbled) {
const auto x = static_cast<float>(regs.surface_clip.x);
const auto y = static_cast<float>(regs.surface_clip.y);
const auto width = static_cast<float>(regs.surface_clip.width);
const auto height = static_cast<float>(regs.surface_clip.height);
VkViewport viewport{
.x = x,
.y = y,