Explorar o código

libobs-opengl: Relax texture format copy check

SRGB and non-SRGB formats are compatible for copy.
tytan652 hai 1 ano
pai
achega
26d275223a
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      libobs-opengl/gl-subsystem.c

+ 2 - 1
libobs-opengl/gl-subsystem.c

@@ -978,7 +978,8 @@ void device_copy_texture_region(gs_device_t *device, gs_texture_t *dst,
 		goto fail;
 	}
 
-	if (dst->format != src->format) {
+	if (gs_generalize_format(dst->format) !=
+	    gs_generalize_format(src->format)) {
 		blog(LOG_ERROR, "Source and destination formats do not match");
 		goto fail;
 	}