* 8-bit blits need to be handled by the blit_shader.
* TODO: get rid of this #if 0. */
#if 0
- blit_supported = device->blitter->blit_supported(&device->adapter->gl_info, BLIT_OP_BLIT,
+ blit_supported = device->blitter->blit_supported(&device->adapter->gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
&rect, This->resource.usage, This->resource.pool, This->resource.format,
&rect, This->resource.usage, This->resource.pool, This->resource.format);
#endif
}
/* Until the blit_shader is ready, define some prototypes here. */
-static BOOL fbo_blit_supported(const struct wined3d_gl_info *gl_info, enum blit_operation blit_op,
+static BOOL fbo_blit_supported(const struct wined3d_gl_info *gl_info, enum wined3d_blit_op blit_op,
const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format,
const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format);
IWineD3DDeviceImpl *device = s->resource.device;
const struct blit_shader *blitter;
- blitter = wined3d_select_blitter(&device->adapter->gl_info, BLIT_OP_COLOR_FILL,
+ blitter = wined3d_select_blitter(&device->adapter->gl_info, WINED3D_BLIT_OP_COLOR_FILL,
NULL, 0, 0, NULL, rect, s->resource.usage, s->resource.pool, s->resource.format);
if (!blitter)
{
*
* If EXT_framebuffer_blit is supported that can be used instead. Note that EXT_framebuffer_blit implies
* FBO support, so it doesn't really make sense to try and make it work with different offscreen rendering
- * backends.
- */
- if (fbo_blit_supported(gl_info, BLIT_OP_BLIT,
+ * backends. */
+ if (fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
&src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format,
&dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format))
{
TRACE("Blt from surface %p to rendertarget %p\n", src_surface, dst_surface);
if (!(flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE))
- && fbo_blit_supported(gl_info, BLIT_OP_BLIT,
+ && fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
&src_rect, src_surface->resource.usage, src_surface->resource.pool,
src_surface->resource.format,
&dst_rect, dst_surface->resource.usage, dst_surface->resource.pool,
}
if (!(flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE))
- && arbfp_blit.blit_supported(gl_info, BLIT_OP_BLIT,
+ && arbfp_blit.blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
&src_rect, src_surface->resource.usage, src_surface->resource.pool,
src_surface->resource.format,
&dst_rect, dst_surface->resource.usage, dst_surface->resource.pool,
dst_surface->resource.format))
{
- return arbfp_blit_surface(device, src_surface, &src_rect, dst_surface, &dst_rect, BLIT_OP_BLIT, Filter);
+ return arbfp_blit_surface(device, src_surface, &src_rect, dst_surface, &dst_rect,
+ WINED3D_BLIT_OP_COLOR_BLIT, Filter);
}
- if (!device->blitter->blit_supported(gl_info, BLIT_OP_BLIT,
+ if (!device->blitter->blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
&src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format,
&dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format))
{
}
else if (surface->flags & (SFLAG_INSRGBTEX | SFLAG_INTEXTURE)
&& (surface->resource.format->flags & attach_flags) == attach_flags
- && fbo_blit_supported(gl_info, BLIT_OP_BLIT,
+ && fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format,
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format))
{
LEAVE_GL();
}
-static BOOL ffp_blit_supported(const struct wined3d_gl_info *gl_info, enum blit_operation blit_op,
+static BOOL ffp_blit_supported(const struct wined3d_gl_info *gl_info, enum wined3d_blit_op blit_op,
const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format,
const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format)
{
enum complex_fixup src_fixup;
- if (blit_op == BLIT_OP_COLOR_FILL)
+ if (blit_op == WINED3D_BLIT_OP_COLOR_FILL)
{
if (!(dst_usage & WINED3DUSAGE_RENDERTARGET))
{
dump_color_fixup_desc(src_format->color_fixup);
}
- if (blit_op != BLIT_OP_BLIT)
+ if (blit_op != WINED3D_BLIT_OP_COLOR_BLIT)
{
TRACE("Unsupported blit_op=%d\n", blit_op);
return FALSE;
{
}
-static BOOL cpu_blit_supported(const struct wined3d_gl_info *gl_info, enum blit_operation blit_op,
+static BOOL cpu_blit_supported(const struct wined3d_gl_info *gl_info, enum wined3d_blit_op blit_op,
const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format,
const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format)
{
- if (blit_op == BLIT_OP_COLOR_FILL)
+ if (blit_op == WINED3D_BLIT_OP_COLOR_FILL)
{
return TRUE;
}
cpu_blit_color_fill
};
-static BOOL fbo_blit_supported(const struct wined3d_gl_info *gl_info, enum blit_operation blit_op,
+static BOOL fbo_blit_supported(const struct wined3d_gl_info *gl_info, enum wined3d_blit_op blit_op,
const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format,
const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format)
{
/* We only support blitting. Things like color keying / color fill should
* be handled by other blitters.
*/
- if (blit_op != BLIT_OP_BLIT)
+ if (blit_op != WINED3D_BLIT_OP_COLOR_BLIT)
return FALSE;
/* Source and/or destination need to be on the GL side */
const struct wined3d_gl_info *gl_info, const struct StateEntryTemplate *vertex,
const struct fragment_pipeline *fragment, const struct StateEntryTemplate *misc) DECLSPEC_HIDDEN;
-enum blit_operation
+enum wined3d_blit_op
{
- BLIT_OP_BLIT,
- BLIT_OP_COLOR_FILL
+ WINED3D_BLIT_OP_COLOR_BLIT,
+ WINED3D_BLIT_OP_COLOR_FILL,
};
/* Shaders for color conversions in blits. Do not do blit operations while
void (*free_private)(IWineD3DDeviceImpl *device);
HRESULT (*set_shader)(void *blit_priv, const struct wined3d_gl_info *gl_info, IWineD3DSurfaceImpl *surface);
void (*unset_shader)(const struct wined3d_gl_info *gl_info);
- BOOL (*blit_supported)(const struct wined3d_gl_info *gl_info, enum blit_operation blit_op,
+ BOOL (*blit_supported)(const struct wined3d_gl_info *gl_info, enum wined3d_blit_op blit_op,
const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format,
const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format);
HRESULT (*color_fill)(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *dst_surface,
extern const struct blit_shader arbfp_blit DECLSPEC_HIDDEN;
extern const struct blit_shader cpu_blit DECLSPEC_HIDDEN;
-const struct blit_shader *wined3d_select_blitter(const struct wined3d_gl_info *gl_info, enum blit_operation blit_op,
+const struct blit_shader *wined3d_select_blitter(const struct wined3d_gl_info *gl_info, enum wined3d_blit_op blit_op,
const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format,
const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format)
DECLSPEC_HIDDEN;
/* Temporary blit_shader helper functions */
HRESULT arbfp_blit_surface(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *src_surface, const RECT *src_rect,
- IWineD3DSurfaceImpl *dst_surface, const RECT *dst_rect_in, enum blit_operation blit_op,
+ IWineD3DSurfaceImpl *dst_surface, const RECT *dst_rect_in, enum wined3d_blit_op blit_op,
DWORD Filter) DECLSPEC_HIDDEN;
struct wined3d_context *context_acquire(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target) DECLSPEC_HIDDEN;