summaryrefslogtreecommitdiff
path: root/src/video_core/host1x/vic.cpp
diff options
context:
space:
mode:
authorGravatar Fernando S2022-12-24 20:26:06 -0500
committerGravatar GitHub2022-12-24 20:26:06 -0500
commit3e6850f00bdd541202a8369438bda7988c8001f5 (patch)
tree34691ecb826bc402f68a075de07f4f6aaebf8c44 /src/video_core/host1x/vic.cpp
parentqt: fix 'Pause' menu item (#9497) (diff)
parentscratch_buffer: Explicitly defing resize and resize_destructive functions (diff)
downloadyuzu-3e6850f00bdd541202a8369438bda7988c8001f5.tar.gz
yuzu-3e6850f00bdd541202a8369438bda7988c8001f5.tar.xz
yuzu-3e6850f00bdd541202a8369438bda7988c8001f5.zip
Merge pull request #9453 from ameerj/scratch-vector
common: Add ScratchBuffer Class
Diffstat (limited to 'src/video_core/host1x/vic.cpp')
-rw-r--r--src/video_core/host1x/vic.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/host1x/vic.cpp b/src/video_core/host1x/vic.cpp
index ac0b7d20e..36a04e4e0 100644
--- a/src/video_core/host1x/vic.cpp
+++ b/src/video_core/host1x/vic.cpp
@@ -155,7 +155,7 @@ void Vic::WriteRGBFrame(const AVFrame* frame, const VicConfig& config) {
155 // swizzle pitch linear to block linear 155 // swizzle pitch linear to block linear
156 const u32 block_height = static_cast<u32>(config.block_linear_height_log2); 156 const u32 block_height = static_cast<u32>(config.block_linear_height_log2);
157 const auto size = Texture::CalculateSize(true, 4, width, height, 1, block_height, 0); 157 const auto size = Texture::CalculateSize(true, 4, width, height, 1, block_height, 0);
158 luma_buffer.resize(size); 158 luma_buffer.resize_destructive(size);
159 std::span<const u8> frame_buff(converted_frame_buf_addr, 4 * width * height); 159 std::span<const u8> frame_buff(converted_frame_buf_addr, 4 * width * height);
160 Texture::SwizzleSubrect(luma_buffer, frame_buff, 4, width, height, 1, 0, 0, width, height, 160 Texture::SwizzleSubrect(luma_buffer, frame_buff, 4, width, height, 1, 0, 0, width, height,
161 block_height, 0, width * 4); 161 block_height, 0, width * 4);
@@ -181,8 +181,8 @@ void Vic::WriteYUVFrame(const AVFrame* frame, const VicConfig& config) {
181 181
182 const auto stride = static_cast<size_t>(frame->linesize[0]); 182 const auto stride = static_cast<size_t>(frame->linesize[0]);
183 183
184 luma_buffer.resize(aligned_width * surface_height); 184 luma_buffer.resize_destructive(aligned_width * surface_height);
185 chroma_buffer.resize(aligned_width * surface_height / 2); 185 chroma_buffer.resize_destructive(aligned_width * surface_height / 2);
186 186
187 // Populate luma buffer 187 // Populate luma buffer
188 const u8* luma_src = frame->data[0]; 188 const u8* luma_src = frame->data[0];