From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_gl.h | 102 ++++++++++++++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 104 +-------------------------------- 2 files changed, 103 insertions(+), 103 deletions(-)
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 6f0996fe39f..4654be41bec 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -32,6 +32,8 @@ #include "wine/wgl.h" #include "wine/wgl_driver.h"
+struct wined3d_texture_gl; + #define GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI 0x8837 /* not in the gl spec */
/* OpenGL extensions. */ @@ -890,4 +892,104 @@ void wined3d_device_gl_delete_opengl_contexts_cs(void *object); HDC wined3d_device_gl_get_backup_dc(struct wined3d_device_gl *device_gl); GLbitfield wined3d_device_gl_get_memory_type_flags(unsigned int memory_type_idx);
+GLbitfield wined3d_resource_gl_map_flags(const struct wined3d_bo_gl *bo, DWORD d3d_flags); +GLenum wined3d_resource_gl_legacy_map_flags(DWORD d3d_flags); +GLbitfield wined3d_resource_gl_storage_flags(const struct wined3d_resource *resource); + +struct gl_texture +{ + struct wined3d_sampler_desc sampler_desc; + unsigned int base_level; + GLuint name; +}; + +struct wined3d_renderbuffer_entry +{ + struct list entry; + GLuint id; + unsigned int width, height; +}; + +struct wined3d_texture_gl +{ + struct wined3d_texture t; + + struct gl_texture texture_rgb, texture_srgb; + + GLenum target; + + GLuint rb_multisample; + GLuint rb_resolved; + + struct list renderbuffers; + const struct wined3d_renderbuffer_entry *current_renderbuffer; +}; + +static inline struct wined3d_texture_gl *wined3d_texture_gl(struct wined3d_texture *texture) +{ + return CONTAINING_RECORD(texture, struct wined3d_texture_gl, t); +} + +static inline struct gl_texture *wined3d_texture_gl_get_gl_texture(struct wined3d_texture_gl *texture_gl, bool srgb) +{ + return srgb ? &texture_gl->texture_srgb : &texture_gl->texture_rgb; +} + +static inline GLenum wined3d_texture_gl_get_sub_resource_target(const struct wined3d_texture_gl *texture_gl, + unsigned int sub_resource_idx) +{ + static const GLenum cube_targets[] = + { + GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, + GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, + GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, + GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, + }; + + if (texture_gl->t.resource.usage & WINED3DUSAGE_LEGACY_CUBEMAP) + return cube_targets[sub_resource_idx / texture_gl->t.level_count]; + return texture_gl->target; +} + +static inline bool wined3d_texture_gl_is_multisample_location(const struct wined3d_texture_gl *texture_gl, + uint32_t location) +{ + if (location == WINED3D_LOCATION_RB_MULTISAMPLE) + return true; + if (location != WINED3D_LOCATION_TEXTURE_RGB && location != WINED3D_LOCATION_TEXTURE_SRGB) + return false; + return texture_gl->target == GL_TEXTURE_2D_MULTISAMPLE || texture_gl->target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY; +} + +struct wined3d_blt_info +{ + GLenum bind_target; + struct wined3d_vec3 texcoords[4]; +}; + +void texture2d_get_blt_info(const struct wined3d_texture_gl *texture_gl, unsigned int sub_resource_idx, + const RECT *rect, struct wined3d_blt_info *info); +void texture2d_load_fb_texture(struct wined3d_texture_gl *texture_gl, unsigned int sub_resource_idx, + BOOL srgb, struct wined3d_context *context); +void texture2d_read_from_framebuffer(struct wined3d_texture *texture, unsigned int sub_resource_idx, + struct wined3d_context *context, DWORD src_location, DWORD dst_location); + +void wined3d_gl_texture_swizzle_from_color_fixup(GLint swizzle[4], struct color_fixup_desc fixup); +GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture); + +void wined3d_texture_gl_apply_sampler_desc(struct wined3d_texture_gl *texture_gl, + const struct wined3d_sampler_desc *sampler_desc, const struct wined3d_context_gl *context_gl); +void wined3d_texture_gl_bind(struct wined3d_texture_gl *texture_gl, struct wined3d_context_gl *context_gl, BOOL srgb); +void wined3d_texture_gl_bind_and_dirtify(struct wined3d_texture_gl *texture_gl, + struct wined3d_context_gl *context_gl, BOOL srgb); +HRESULT wined3d_texture_gl_init(struct wined3d_texture_gl *texture_gl, struct wined3d_device *device, + const struct wined3d_resource_desc *desc, unsigned int layer_count, unsigned int level_count, + uint32_t flags, void *parent, const struct wined3d_parent_ops *parent_ops); +void wined3d_texture_gl_prepare_texture(struct wined3d_texture_gl *texture_gl, + struct wined3d_context_gl *context_gl, BOOL srgb); +void wined3d_texture_gl_set_compatible_renderbuffer(struct wined3d_texture_gl *texture_gl, + struct wined3d_context_gl *context_gl, unsigned int level, const struct wined3d_rendertarget_info *rt); + #endif /* __WINE_WINED3D_GL */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d9611f11ad7..f643de4561e 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -98,7 +98,6 @@ struct wined3d_context; struct wined3d_gl_info; struct wined3d_state; struct wined3d_swapchain_gl; -struct wined3d_texture_gl; struct wined3d_vertex_pipe_ops;
enum wined3d_ffp_idx @@ -3122,8 +3121,6 @@ void wined3d_allocator_cleanup(struct wined3d_allocator *allocator) DECLSPEC_HID bool wined3d_allocator_init(struct wined3d_allocator *allocator, size_t pool_count, const struct wined3d_allocator_ops *allocator_ops) DECLSPEC_HIDDEN;
-#include "wined3d_gl.h" - static inline float wined3d_alpha_ref(const struct wined3d_state *state) { return (state->render_states[WINED3D_RS_ALPHAREF] & 0xff) / 255.0f; @@ -3265,9 +3262,6 @@ void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HI const struct wined3d_format *wined3d_resource_get_decompress_format( const struct wined3d_resource *resource) DECLSPEC_HIDDEN; unsigned int wined3d_resource_get_sample_count(const struct wined3d_resource *resource) DECLSPEC_HIDDEN; -GLbitfield wined3d_resource_gl_map_flags(const struct wined3d_bo_gl *bo, DWORD d3d_flags) DECLSPEC_HIDDEN; -GLenum wined3d_resource_gl_legacy_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN; -GLbitfield wined3d_resource_gl_storage_flags(const struct wined3d_resource *resource) DECLSPEC_HIDDEN; BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_HIDDEN; BOOL wined3d_resource_prepare_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN; void wined3d_resource_update_draw_binding(struct wined3d_resource *resource) DECLSPEC_HIDDEN; @@ -3291,12 +3285,6 @@ void wined3d_resource_memory_colour_fill(struct wined3d_resource *resource,
const char *wined3d_debug_location(uint32_t location) DECLSPEC_HIDDEN;
-struct wined3d_blt_info -{ - GLenum bind_target; - struct wined3d_vec3 texcoords[4]; -}; - struct wined3d_texture_ops { BOOL (*texture_prepare_location)(struct wined3d_texture *texture, unsigned int sub_resource_idx, @@ -3490,19 +3478,12 @@ HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_ const struct wined3d_box *dst_box, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx, const struct wined3d_box *src_box, uint32_t flags, const struct wined3d_blt_fx *blt_fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; -void texture2d_get_blt_info(const struct wined3d_texture_gl *texture_gl, unsigned int sub_resource_idx, - const RECT *rect, struct wined3d_blt_info *info) DECLSPEC_HIDDEN; -void texture2d_load_fb_texture(struct wined3d_texture_gl *texture_gl, unsigned int sub_resource_idx, - BOOL srgb, struct wined3d_context *context) DECLSPEC_HIDDEN; -void texture2d_read_from_framebuffer(struct wined3d_texture *texture, unsigned int sub_resource_idx, - struct wined3d_context *context, DWORD src_location, DWORD dst_location) DECLSPEC_HIDDEN;
void wined3d_texture_cleanup(struct wined3d_texture *texture) DECLSPEC_HIDDEN; void wined3d_texture_download_from_texture(struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx) DECLSPEC_HIDDEN; void wined3d_texture_get_bo_address(const struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_bo_address *data, uint32_t location) DECLSPEC_HIDDEN; -GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN; void wined3d_texture_invalidate_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, uint32_t location) DECLSPEC_HIDDEN; void wined3d_texture_load(struct wined3d_texture *texture, @@ -3534,90 +3515,7 @@ HRESULT wined3d_texture_no3d_init(struct wined3d_texture *texture_no3d, struct w const struct wined3d_resource_desc *desc, unsigned int layer_count, unsigned int level_count, uint32_t flags, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
-void wined3d_gl_texture_swizzle_from_color_fixup(GLint swizzle[4], struct color_fixup_desc fixup) DECLSPEC_HIDDEN; - -struct gl_texture -{ - struct wined3d_sampler_desc sampler_desc; - unsigned int base_level; - GLuint name; -}; - -struct wined3d_texture_gl -{ - struct wined3d_texture t; - - struct gl_texture texture_rgb, texture_srgb; - - GLenum target; - - GLuint rb_multisample; - GLuint rb_resolved; - - struct list renderbuffers; - const struct wined3d_renderbuffer_entry *current_renderbuffer; -}; - -static inline struct wined3d_texture_gl *wined3d_texture_gl(struct wined3d_texture *texture) -{ - return CONTAINING_RECORD(texture, struct wined3d_texture_gl, t); -} - -static inline struct gl_texture *wined3d_texture_gl_get_gl_texture(struct wined3d_texture_gl *texture_gl, - BOOL srgb) -{ - return srgb ? &texture_gl->texture_srgb : &texture_gl->texture_rgb; -} - -static inline GLenum wined3d_texture_gl_get_sub_resource_target(const struct wined3d_texture_gl *texture_gl, - unsigned int sub_resource_idx) -{ - static const GLenum cube_targets[] = - { - GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, - GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, - GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, - }; - - return texture_gl->t.resource.usage & WINED3DUSAGE_LEGACY_CUBEMAP - ? cube_targets[sub_resource_idx / texture_gl->t.level_count] : texture_gl->target; -} - -static inline BOOL wined3d_texture_gl_is_multisample_location(const struct wined3d_texture_gl *texture_gl, - uint32_t location) -{ - if (location == WINED3D_LOCATION_RB_MULTISAMPLE) - return TRUE; - if (location != WINED3D_LOCATION_TEXTURE_RGB && location != WINED3D_LOCATION_TEXTURE_SRGB) - return FALSE; - return texture_gl->target == GL_TEXTURE_2D_MULTISAMPLE || texture_gl->target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY; -} - -void wined3d_texture_gl_apply_sampler_desc(struct wined3d_texture_gl *texture_gl, - const struct wined3d_sampler_desc *sampler_desc, const struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN; -void wined3d_texture_gl_bind(struct wined3d_texture_gl *texture_gl, - struct wined3d_context_gl *context_gl, BOOL srgb) DECLSPEC_HIDDEN; -void wined3d_texture_gl_bind_and_dirtify(struct wined3d_texture_gl *texture_gl, - struct wined3d_context_gl *context_gl, BOOL srgb) DECLSPEC_HIDDEN; -HRESULT wined3d_texture_gl_init(struct wined3d_texture_gl *texture_gl, struct wined3d_device *device, - const struct wined3d_resource_desc *desc, unsigned int layer_count, unsigned int level_count, - uint32_t flags, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; -void wined3d_texture_gl_prepare_texture(struct wined3d_texture_gl *texture_gl, - struct wined3d_context_gl *context_gl, BOOL srgb) DECLSPEC_HIDDEN; -void wined3d_texture_gl_set_compatible_renderbuffer(struct wined3d_texture_gl *texture_gl, - struct wined3d_context_gl *context_gl, unsigned int level, - const struct wined3d_rendertarget_info *rt) DECLSPEC_HIDDEN; - -struct wined3d_renderbuffer_entry -{ - struct list entry; - GLuint id; - UINT width; - UINT height; -}; +#include "wined3d_gl.h"
struct wined3d_fbo_resource {
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_gl.h | 24 ++++++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 24 ------------------------ 2 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 4654be41bec..b21a38c2e95 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -574,6 +574,30 @@ struct wined3d_command_fence_gl
#define MAX_GL_FRAGMENT_SAMPLERS 32
+struct wined3d_fbo_resource +{ + GLuint object; + GLenum target; + GLuint level, layer; +}; + +#define WINED3D_FBO_ENTRY_FLAG_ATTACHED 0x1 +#define WINED3D_FBO_ENTRY_FLAG_DEPTH 0x2 +#define WINED3D_FBO_ENTRY_FLAG_STENCIL 0x4 + +struct fbo_entry +{ + struct list entry; + uint32_t flags; + uint32_t rt_mask; + GLuint id; + struct wined3d_fbo_entry_key + { + uint32_t rb_namespace; + struct wined3d_fbo_resource objects[WINED3D_MAX_RENDER_TARGETS + 1]; + } key; +}; + struct wined3d_context_gl { struct wined3d_context c; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index f643de4561e..e167df6db17 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3517,30 +3517,6 @@ HRESULT wined3d_texture_no3d_init(struct wined3d_texture *texture_no3d, struct w
#include "wined3d_gl.h"
-struct wined3d_fbo_resource -{ - GLuint object; - GLenum target; - GLuint level, layer; -}; - -#define WINED3D_FBO_ENTRY_FLAG_ATTACHED 0x1 -#define WINED3D_FBO_ENTRY_FLAG_DEPTH 0x2 -#define WINED3D_FBO_ENTRY_FLAG_STENCIL 0x4 - -struct fbo_entry -{ - struct list entry; - uint32_t flags; - uint32_t rt_mask; - GLuint id; - struct wined3d_fbo_entry_key - { - DWORD rb_namespace; - struct wined3d_fbo_resource objects[WINED3D_MAX_RENDER_TARGETS + 1]; - } key; -}; - struct wined3d_sampler { struct wine_rb_entry entry;
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_gl.h | 17 +++++++++++++++++ dlls/wined3d/wined3d_private.h | 20 +------------------- 2 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index b21a38c2e95..50222b34360 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -1016,4 +1016,21 @@ void wined3d_texture_gl_prepare_texture(struct wined3d_texture_gl *texture_gl, void wined3d_texture_gl_set_compatible_renderbuffer(struct wined3d_texture_gl *texture_gl, struct wined3d_context_gl *context_gl, unsigned int level, const struct wined3d_rendertarget_info *rt);
+struct wined3d_sampler_gl +{ + struct wined3d_sampler s; + + GLuint name; +}; + +static inline struct wined3d_sampler_gl *wined3d_sampler_gl(struct wined3d_sampler *sampler) +{ + return CONTAINING_RECORD(sampler, struct wined3d_sampler_gl, s); +} + +void wined3d_sampler_gl_bind(struct wined3d_sampler_gl *sampler_gl, unsigned int unit, + struct wined3d_texture_gl *texture_gl, const struct wined3d_context_gl *context_gl); +void wined3d_sampler_gl_init(struct wined3d_sampler_gl *sampler_gl, struct wined3d_device *device, + const struct wined3d_sampler_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops); + #endif /* __WINE_WINED3D_GL */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index e167df6db17..f353377a836 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3515,8 +3515,6 @@ HRESULT wined3d_texture_no3d_init(struct wined3d_texture *texture_no3d, struct w const struct wined3d_resource_desc *desc, unsigned int layer_count, unsigned int level_count, uint32_t flags, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
-#include "wined3d_gl.h" - struct wined3d_sampler { struct wine_rb_entry entry; @@ -3527,23 +3525,7 @@ struct wined3d_sampler struct wined3d_sampler_desc desc; };
-struct wined3d_sampler_gl -{ - struct wined3d_sampler s; - - GLuint name; -}; - -static inline struct wined3d_sampler_gl *wined3d_sampler_gl(struct wined3d_sampler *sampler) -{ - return CONTAINING_RECORD(sampler, struct wined3d_sampler_gl, s); -} - -void wined3d_sampler_gl_bind(struct wined3d_sampler_gl *sampler_gl, unsigned int unit, - struct wined3d_texture_gl *texture_gl, const struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN; -void wined3d_sampler_gl_init(struct wined3d_sampler_gl *sampler_gl, - struct wined3d_device *device, const struct wined3d_sampler_desc *desc, - void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; +#include "wined3d_gl.h"
struct wined3d_vertex_declaration_element {
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_gl.h | 19 +++++++++++++++++++ dlls/wined3d/wined3d_private.h | 21 +-------------------- 2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 50222b34360..8221c2362e9 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -1033,4 +1033,23 @@ void wined3d_sampler_gl_bind(struct wined3d_sampler_gl *sampler_gl, unsigned int void wined3d_sampler_gl_init(struct wined3d_sampler_gl *sampler_gl, struct wined3d_device *device, const struct wined3d_sampler_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops);
+struct wined3d_buffer_gl +{ + struct wined3d_buffer b; +}; + +static inline struct wined3d_buffer_gl *wined3d_buffer_gl(struct wined3d_buffer *buffer) +{ + return CONTAINING_RECORD(buffer, struct wined3d_buffer_gl, b); +} + +static inline const struct wined3d_buffer_gl *wined3d_buffer_gl_const(const struct wined3d_buffer *buffer) +{ + return CONTAINING_RECORD(buffer, struct wined3d_buffer_gl, b); +} + +HRESULT wined3d_buffer_gl_init(struct wined3d_buffer_gl *buffer_gl, struct wined3d_device *device, + const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data, + void *parent, const struct wined3d_parent_ops *parent_ops); + #endif /* __WINE_WINED3D_GL */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index f353377a836..b4b94510d2b 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3525,8 +3525,6 @@ struct wined3d_sampler struct wined3d_sampler_desc desc; };
-#include "wined3d_gl.h" - struct wined3d_vertex_declaration_element { const struct wined3d_format *format; @@ -3953,24 +3951,7 @@ HRESULT wined3d_buffer_no3d_init(struct wined3d_buffer *buffer_no3d, struct wine const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
-struct wined3d_buffer_gl -{ - struct wined3d_buffer b; -}; - -static inline struct wined3d_buffer_gl *wined3d_buffer_gl(struct wined3d_buffer *buffer) -{ - return CONTAINING_RECORD(buffer, struct wined3d_buffer_gl, b); -} - -static inline const struct wined3d_buffer_gl *wined3d_buffer_gl_const(const struct wined3d_buffer *buffer) -{ - return CONTAINING_RECORD(buffer, struct wined3d_buffer_gl, b); -} - -HRESULT wined3d_buffer_gl_init(struct wined3d_buffer_gl *buffer_gl, struct wined3d_device *device, - const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data, - void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; +#include "wined3d_gl.h"
struct wined3d_rendertarget_view {
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_gl.h | 16 ++++++++++++++++ dlls/wined3d/wined3d_private.h | 18 +----------------- 2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 8221c2362e9..c6cfd3606e4 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -1052,4 +1052,20 @@ HRESULT wined3d_buffer_gl_init(struct wined3d_buffer_gl *buffer_gl, struct wined const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops);
+struct wined3d_rendertarget_view_gl +{ + struct wined3d_rendertarget_view v; + struct wined3d_gl_view gl_view; +}; + +static inline struct wined3d_rendertarget_view_gl *wined3d_rendertarget_view_gl( + struct wined3d_rendertarget_view *view) +{ + return CONTAINING_RECORD(view, struct wined3d_rendertarget_view_gl, v); +} + +HRESULT wined3d_rendertarget_view_gl_init(struct wined3d_rendertarget_view_gl *view_gl, + const struct wined3d_view_desc *desc, struct wined3d_resource *resource, + void *parent, const struct wined3d_parent_ops *parent_ops); + #endif /* __WINE_WINED3D_GL */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index b4b94510d2b..699dbe585d6 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3951,8 +3951,6 @@ HRESULT wined3d_buffer_no3d_init(struct wined3d_buffer *buffer_no3d, struct wine const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
-#include "wined3d_gl.h" - struct wined3d_rendertarget_view { LONG refcount; @@ -3993,21 +3991,7 @@ HRESULT wined3d_rendertarget_view_no3d_init(struct wined3d_rendertarget_view *vi const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
-struct wined3d_rendertarget_view_gl -{ - struct wined3d_rendertarget_view v; - struct wined3d_gl_view gl_view; -}; - -static inline struct wined3d_rendertarget_view_gl *wined3d_rendertarget_view_gl( - struct wined3d_rendertarget_view *view) -{ - return CONTAINING_RECORD(view, struct wined3d_rendertarget_view_gl, v); -} - -HRESULT wined3d_rendertarget_view_gl_init(struct wined3d_rendertarget_view_gl *view_gl, - const struct wined3d_view_desc *desc, struct wined3d_resource *resource, - void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; +#include "wined3d_gl.h"
struct wined3d_shader_resource_view {
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_gl.h | 23 +++++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 25 +------------------------ 2 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index c6cfd3606e4..40abd36f3b7 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -1068,4 +1068,27 @@ HRESULT wined3d_rendertarget_view_gl_init(struct wined3d_rendertarget_view_gl *v const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops);
+struct wined3d_shader_resource_view_gl +{ + struct wined3d_shader_resource_view v; + struct wined3d_bo_user bo_user; + struct wined3d_gl_view gl_view; +}; + +static inline struct wined3d_shader_resource_view_gl *wined3d_shader_resource_view_gl( + struct wined3d_shader_resource_view *view) +{ + return CONTAINING_RECORD(view, struct wined3d_shader_resource_view_gl, v); +} + +void wined3d_shader_resource_view_gl_bind(struct wined3d_shader_resource_view_gl *view_gl, unsigned int unit, + struct wined3d_sampler_gl *sampler_gl, struct wined3d_context_gl *context_gl); +void wined3d_shader_resource_view_gl_generate_mipmap(struct wined3d_shader_resource_view_gl *srv_gl, + struct wined3d_context_gl *context_gl); +HRESULT wined3d_shader_resource_view_gl_init(struct wined3d_shader_resource_view_gl *view_gl, + const struct wined3d_view_desc *desc, struct wined3d_resource *resource, + void *parent, const struct wined3d_parent_ops *parent_ops); +void wined3d_shader_resource_view_gl_update(struct wined3d_shader_resource_view_gl *srv_gl, + struct wined3d_context_gl *context_gl); + #endif /* __WINE_WINED3D_GL */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 699dbe585d6..7a4766b5736 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3991,8 +3991,6 @@ HRESULT wined3d_rendertarget_view_no3d_init(struct wined3d_rendertarget_view *vi const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
-#include "wined3d_gl.h" - struct wined3d_shader_resource_view { LONG refcount; @@ -4008,28 +4006,7 @@ struct wined3d_shader_resource_view
void wined3d_shader_resource_view_cleanup(struct wined3d_shader_resource_view *view) DECLSPEC_HIDDEN;
-struct wined3d_shader_resource_view_gl -{ - struct wined3d_shader_resource_view v; - struct wined3d_bo_user bo_user; - struct wined3d_gl_view gl_view; -}; - -static inline struct wined3d_shader_resource_view_gl *wined3d_shader_resource_view_gl( - struct wined3d_shader_resource_view *view) -{ - return CONTAINING_RECORD(view, struct wined3d_shader_resource_view_gl, v); -} - -void wined3d_shader_resource_view_gl_bind(struct wined3d_shader_resource_view_gl *view_gl, unsigned int unit, - struct wined3d_sampler_gl *sampler_gl, struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN; -void wined3d_shader_resource_view_gl_generate_mipmap(struct wined3d_shader_resource_view_gl *srv_gl, - struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN; -HRESULT wined3d_shader_resource_view_gl_init(struct wined3d_shader_resource_view_gl *view_gl, - const struct wined3d_view_desc *desc, struct wined3d_resource *resource, - void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; -void wined3d_shader_resource_view_gl_update(struct wined3d_shader_resource_view_gl *srv_gl, - struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN; +#include "wined3d_gl.h"
struct wined3d_unordered_access_view {
This merge request was approved by Jan Sikorski.