[GPU] Fix uninitialized viewport_top when drawing without a viewport

This commit is contained in:
Triang3l 2020-12-06 15:55:28 +03:00 committed by GitHub
parent ff5c5f01e0
commit cadc31c93f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -227,6 +227,7 @@ void GetHostViewportInfo(const RegisterFile& regs, float pixel_size_x,
ndc_offset_y = 0.0f;
}
} else {
viewport_top = 0.0f;
viewport_height = std::min(
float(xenos::kTexture2DCubeMaxWidthHeight) * pixel_size_y, y_max);
ndc_scale_y = (2.0f * pixel_size_y) / viewport_height;