summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-10-08 07:22:38 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-10-08 07:22:38 +0200
commit403fc86c1138821fac375a2ac850ac787969e2c8 (patch)
tree5ac804c64f72bb16dd8c1477db71cf35419e18a7 /src/video_core
parentvic: Refactor frame writing methods (diff)
downloadyuzu-403fc86c1138821fac375a2ac850ac787969e2c8.tar
yuzu-403fc86c1138821fac375a2ac850ac787969e2c8.tar.gz
yuzu-403fc86c1138821fac375a2ac850ac787969e2c8.tar.bz2
yuzu-403fc86c1138821fac375a2ac850ac787969e2c8.tar.lz
yuzu-403fc86c1138821fac375a2ac850ac787969e2c8.tar.xz
yuzu-403fc86c1138821fac375a2ac850ac787969e2c8.tar.zst
yuzu-403fc86c1138821fac375a2ac850ac787969e2c8.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/command_classes/vic.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/command_classes/vic.cpp b/src/video_core/command_classes/vic.cpp
index 3f2712a8d..51f739801 100644
--- a/src/video_core/command_classes/vic.cpp
+++ b/src/video_core/command_classes/vic.cpp
@@ -85,6 +85,15 @@ void Vic::Execute() {
if (!frame) {
return;
}
+ const u64 surface_width = config.surface_width_minus1 + 1;
+ const u64 surface_height = config.surface_height_minus1 + 1;
+ if (static_cast<u64>(frame->width) != surface_width ||
+ static_cast<u64>(frame->height) != surface_height) {
+ // TODO: Properly support multiple video streams with differing frame dimensions
+ LOG_WARNING(Debug, "Frame dimensions {}x{} do not match expected surface dimensions {}x{}",
+ frame->width, frame->height, surface_width, surface_height);
+ return;
+ }
switch (config.pixel_format) {
case VideoPixelFormat::RGBA8:
case VideoPixelFormat::BGRA8: