Commit 9a73d1d6 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Move struct wined3d_format_gl to wined3d_gl.h.

parent 3581fb19
......@@ -1134,4 +1134,36 @@ HRESULT wined3d_swapchain_gl_init(struct wined3d_swapchain_gl *swapchain_gl, str
const struct wined3d_swapchain_desc *desc, struct wined3d_swapchain_state_parent *state_parent,
void *parent, const struct wined3d_parent_ops *parent_ops);
struct wined3d_format_gl
{
struct wined3d_format f;
GLenum vtx_type;
GLint vtx_format;
GLint internal;
GLint srgb_internal;
GLint rt_internal;
GLint format;
GLint type;
GLenum view_class;
};
static inline const struct wined3d_format_gl *wined3d_format_gl(const struct wined3d_format *format)
{
return CONTAINING_RECORD(format, struct wined3d_format_gl, f);
}
static inline GLuint wined3d_gl_get_internal_format(struct wined3d_resource *resource,
const struct wined3d_format_gl *format_gl, bool srgb)
{
if (srgb)
return format_gl->srgb_internal;
else if ((resource->bind_flags & WINED3D_BIND_RENDER_TARGET) && wined3d_resource_is_offscreen(resource))
return format_gl->rt_internal;
else
return format_gl->internal;
}
#endif /* __WINE_WINED3D_GL */
......@@ -4625,27 +4625,6 @@ BOOL wined3d_formats_are_srgb_variants(enum wined3d_format_id format1,
#include "wined3d_gl.h"
struct wined3d_format_gl
{
struct wined3d_format f;
GLenum vtx_type;
GLint vtx_format;
GLint internal;
GLint srgb_internal;
GLint rt_internal;
GLint format;
GLint type;
GLenum view_class;
};
static inline const struct wined3d_format_gl *wined3d_format_gl(const struct wined3d_format *format)
{
return CONTAINING_RECORD(format, struct wined3d_format_gl, f);
}
BOOL wined3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size) DECLSPEC_HIDDEN;
static inline BOOL wined3d_format_is_typeless(const struct wined3d_format *format)
......@@ -4729,17 +4708,6 @@ static inline GLuint wined3d_texture_gl_get_texture_name(const struct wined3d_te
? texture_gl->texture_srgb.name : texture_gl->texture_rgb.name;
}
static inline GLuint wined3d_gl_get_internal_format(struct wined3d_resource *resource,
const struct wined3d_format_gl *format_gl, bool srgb)
{
if (srgb)
return format_gl->srgb_internal;
else if (resource->bind_flags & WINED3D_BIND_RENDER_TARGET && wined3d_resource_is_offscreen(resource))
return format_gl->rt_internal;
else
return format_gl->internal;
}
static inline BOOL can_use_texture_swizzle(const struct wined3d_d3d_info *d3d_info, const struct wined3d_format *format)
{
return d3d_info->texture_swizzle && !is_complex_fixup(format->color_fixup) && !is_scaling_fixup(format->color_fixup);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment