fix(linux/cuda-gl): gl:[00000501] error regression (#5310)

This commit is contained in:
Sheynar
2026-06-24 20:26:11 +03:00
committed by GitHub
parent 2c59b2e641
commit 338afe6709
4 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -504,7 +504,7 @@ namespace cuda {
* @brief Configures shader parameters for the specified colorspace.
*/
void apply_colorspace() override {
sws.apply_colorspace(colorspace);
sws.apply_colorspace(colorspace, is_yuv444);
}
file_t file;
+6 -4
View File
@@ -856,7 +856,7 @@ namespace egl {
return yuv444;
}
void sws_t::apply_colorspace(const video::sunshine_colorspace_t &colorspace) {
void sws_t::apply_colorspace(const video::sunshine_colorspace_t &colorspace, bool is_yuv444) {
auto color_p = video::color_vectors_from_colorspace(colorspace, true);
std::string_view members[] {
@@ -869,9 +869,11 @@ namespace egl {
color_matrix.update(members, sizeof(members) / sizeof(decltype(members[0])));
program[0].bind(color_matrix);
program[1].bind(color_matrix);
program[2].bind(color_matrix);
int planesCount = is_yuv444 ? 3 : 2;
for (int i = 0; i < planesCount; i++) {
program[i].bind(color_matrix);
}
}
int configure_sws_pipeline(sws_t &sws, const video::color_t *color_p, gl::tex_t &&tex, bool is_yuv444) {
+1 -1
View File
@@ -375,7 +375,7 @@ namespace egl {
void load_ram(platf::img_t &img);
void load_vram(img_descriptor_t &img, int offset_x, int offset_y, int texture, bool is_yuv444);
void apply_colorspace(const video::sunshine_colorspace_t &colorspace);
void apply_colorspace(const video::sunshine_colorspace_t &colorspace, bool is_yuv444);
// The first texture is the monitor image.
// The second texture is the cursor image
+1 -1
View File
@@ -381,7 +381,7 @@ namespace va {
}
void apply_colorspace() override {
sws.apply_colorspace(colorspace);
sws.apply_colorspace(colorspace, false);
}
va::display_t::pointer va_display;