From cb671920779b70c79bfa98072709bd5f23579219 Mon Sep 17 00:00:00 2001 From: James Park Date: Tue, 19 Mar 2019 01:26:28 -0700 Subject: [PATCH 1/2] libobs: Fix invalid max_anisotropy value max_anisotropy is initialized to zero, but the minimum value is 1. --- libobs/graphics/shader-parser.c | 2 ++ libobs/obs.c | 1 + 2 files changed, 3 insertions(+) diff --git a/libobs/graphics/shader-parser.c b/libobs/graphics/shader-parser.c index 5464101d1..a9b354ed3 100644 --- a/libobs/graphics/shader-parser.c +++ b/libobs/graphics/shader-parser.c @@ -104,6 +104,8 @@ void shader_sampler_convert(struct shader_sampler *ss, size_t i; memset(info, 0, sizeof(struct gs_sampler_info)); + info->max_anisotropy = 1; + for (i = 0; i < ss->states.num; i++) { const char *state = ss->states.array[i]; const char *value = ss->values.array[i]; diff --git a/libobs/obs.c b/libobs/obs.c index 7cdcaafaa..6d98ebb61 100644 --- a/libobs/obs.c +++ b/libobs/obs.c @@ -344,6 +344,7 @@ static int obs_init_graphics(struct obs_video_info *ovi) NULL); bfree(filename); + point_sampler.max_anisotropy = 1; video->point_sampler = gs_samplerstate_create(&point_sampler); obs->video.transparent_texture = gs_texture_create(2, 2, GS_RGBA, 1, From 5fe128a0477e10dddfe1b20f14a64c1b3d418aed Mon Sep 17 00:00:00 2001 From: James Park Date: Tue, 19 Mar 2019 09:17:15 -0700 Subject: [PATCH 2/2] libobs-opengl: Fix bad log string --- libobs-opengl/gl-windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libobs-opengl/gl-windows.c b/libobs-opengl/gl-windows.c index a26693081..c6c84991b 100644 --- a/libobs-opengl/gl-windows.c +++ b/libobs-opengl/gl-windows.c @@ -532,7 +532,7 @@ void device_enter_context(gs_device_t *device) hdc = device->cur_swap->wi->hdc; if (!wgl_make_current(hdc, device->plat->hrc)) - blog(LOG_ERROR, "device_load_swapchain (GL) failed"); + blog(LOG_ERROR, "device_enter_context (GL) failed"); } void device_leave_context(gs_device_t *device)