Since the GLSL blitter can do everything the ARBfp one can.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/wined3d/device.c | 4 ++-- dlls/wined3d/glsl_shader.c | 11 +++++++---- dlls/wined3d/wined3d_private.h | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index c853b43440b..8257efdf0ef 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1042,8 +1042,8 @@ static void wined3d_device_create_primary_opengl_context_cs(void *object) return; } wined3d_ffp_blitter_create(&device->blitter, &device->adapter->gl_info); - wined3d_arbfp_blitter_create(&device->blitter, device); - wined3d_glsl_blitter_create(&device->blitter, device); + if (!wined3d_glsl_blitter_create(&device->blitter, device)) + wined3d_arbfp_blitter_create(&device->blitter, device); wined3d_fbo_blitter_create(&device->blitter, &device->adapter->gl_info); wined3d_raw_blitter_create(&device->blitter, &device->adapter->gl_info);
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index e4339064e28..0d0e25a4775 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -13157,21 +13157,22 @@ static const struct wined3d_blitter_ops glsl_blitter_ops = glsl_blitter_blit, };
-void wined3d_glsl_blitter_create(struct wined3d_blitter **next, const struct wined3d_device *device) +struct wined3d_blitter *wined3d_glsl_blitter_create(struct wined3d_blitter **next, + const struct wined3d_device *device) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; struct wined3d_glsl_blitter *blitter;
if (device->shader_backend != &glsl_shader_backend) - return; + return NULL;
if (!gl_info->supported[ARB_VERTEX_SHADER] || !gl_info->supported[ARB_FRAGMENT_SHADER]) - return; + return NULL;
if (!(blitter = heap_alloc(sizeof(*blitter)))) { ERR("Failed to allocate blitter.\n"); - return; + return NULL; }
TRACE("Created blitter %p.\n", blitter); @@ -13182,4 +13183,6 @@ void wined3d_glsl_blitter_create(struct wined3d_blitter **next, const struct win wine_rb_init(&blitter->programs, glsl_blitter_args_compare); blitter->palette_texture = 0; *next = &blitter->blitter; + + return *next; } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 26979b3226e..f2c4cd669cf 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2143,7 +2143,7 @@ void wined3d_fbo_blitter_create(struct wined3d_blitter **next, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; void wined3d_ffp_blitter_create(struct wined3d_blitter **next, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; -void wined3d_glsl_blitter_create(struct wined3d_blitter **next, +struct wined3d_blitter *wined3d_glsl_blitter_create(struct wined3d_blitter **next, const struct wined3d_device *device) DECLSPEC_HIDDEN; void wined3d_raw_blitter_create(struct wined3d_blitter **next, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;