From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_gl.h | 32 ++++++++++++++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 32 -------------------------------- 2 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 9d1827cd608..0e744fe5023 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -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 */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 3198c36c37d..e353c7d18de 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -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);