diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-03-30 18:11:25 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-03-30 18:11:25 +0200 |
commit | 3e3d8a179f270a01705491851ad1f4a5da642090 (patch) | |
tree | bd249351f3f22c05036a33a4dd3a3bf662d6a1c9 | |
parent | 9599834d9cc1c9575792bb5b85de083db3cde6a3 (diff) |
Fix incorrect region for region capture after compute shader change5.3.4
-rw-r--r-- | include/utils.h | 2 | ||||
-rw-r--r-- | src/color_conversion.c | 4 | ||||
-rw-r--r-- | src/utils.c | 8 |
3 files changed, 2 insertions, 12 deletions
diff --git a/include/utils.h b/include/utils.h index 873e6e4..b6f51c1 100644 --- a/include/utils.h +++ b/include/utils.h @@ -50,8 +50,6 @@ drm_connector_type_count* drm_connector_types_get_index(drm_connector_type_count uint32_t monitor_identifier_from_type_and_count(int monitor_type_index, int monitor_type_count); bool gl_get_gpu_info(gsr_egl *egl, gsr_gpu_info *info); -bool version_greater_than(int major, int minor, int patch, int other_major, int other_minor, int other_patch); -bool gl_driver_version_greater_than(const gsr_gpu_info *gpu_info, int major, int minor, int patch); bool try_card_has_valid_plane(const char *card_path); /* |output| should be at least 128 bytes in size */ diff --git a/src/color_conversion.c b/src/color_conversion.c index 9cbfc17..a856b50 100644 --- a/src/color_conversion.c +++ b/src/color_conversion.c @@ -468,8 +468,8 @@ void gsr_color_conversion_draw(gsr_color_conversion *self, unsigned int texture_ float rotation_matrix[2][2] = {{0, 0}, {0, 0}}; gsr_color_conversion_apply_rotation(rotation, rotation_matrix, &source_position, texture_size, scale); - source_position.x += texture_pos.x; - source_position.y += texture_pos.y; + source_position.x -= (texture_pos.x * scale.x + 0.5); + source_position.y -= (texture_pos.y * scale.y + 0.5); const int texture_target = external_texture ? GL_TEXTURE_EXTERNAL_OES : GL_TEXTURE_2D; self->params.egl->glBindTexture(texture_target, texture_id); diff --git a/src/utils.c b/src/utils.c index 24f5a6d..d3b7e59 100644 --- a/src/utils.c +++ b/src/utils.c @@ -427,14 +427,6 @@ bool gl_get_gpu_info(gsr_egl *egl, gsr_gpu_info *info) { return supported; } -bool version_greater_than(int major, int minor, int patch, int other_major, int other_minor, int other_patch) { - return (major > other_major) || (major == other_major && minor > other_minor) || (major == other_major && minor == other_minor && patch > other_patch); -} - -bool gl_driver_version_greater_than(const gsr_gpu_info *gpu_info, int major, int minor, int patch) { - return version_greater_than(gpu_info->driver_major, gpu_info->driver_minor, gpu_info->driver_patch, major, minor, patch); -} - bool try_card_has_valid_plane(const char *card_path) { drmVersion *ver = NULL; drmModePlaneResPtr planes = NULL; |