From bd7294e6728dfbac57b6155a73ba196af5e64cbd Mon Sep 17 00:00:00 2001 From: loki-47-6F-64 Date: Wed, 22 Sep 2021 19:12:20 +0200 Subject: [PATCH] Fix cuda kernel launch when encoding in 4K --- sunshine/platform/linux/cuda.cu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sunshine/platform/linux/cuda.cu b/sunshine/platform/linux/cuda.cu index 68368095..74f99c09 100644 --- a/sunshine/platform/linux/cuda.cu +++ b/sunshine/platform/linux/cuda.cu @@ -264,10 +264,10 @@ int sws_t::convert(std::uint8_t *Y, std::uint8_t *UV, std::uint32_t pitchY, std: int threadsX = viewport.width / 2; int threadsY = viewport.height; - dim3 block(threadsPerBlock, threadsPerBlock); - dim3 grid(div_align(threadsX, threadsPerBlock), div_align(threadsY, threadsPerBlock)); + dim3 block(threadsPerBlock); + dim3 grid(div_align(threadsX, threadsPerBlock), threadsY); - RGBA_to_NV12<<>>(texture, Y, UV, pitchY, pitchUV, viewport, (video::color_t *)color_matrix.get()); + RGBA_to_NV12<<>>(texture, Y, UV, pitchY, pitchUV, viewport, (video::color_t *)color_matrix.get()); return CU_CHECK_IGNORE(cudaGetLastError(), "RGBA_to_NV12 failed"); }