From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_gl.h | 26 ++++++++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 28 +--------------------------- 2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index f4130c72d30..390e3164ea5 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -410,4 +410,30 @@ static inline bool wined3d_fence_supported(const struct wined3d_gl_info *gl_info #define checkGLcall(A) do {} while(0) #endif
+struct wined3d_bo_gl +{ + struct wined3d_bo b; + + GLuint id; + + struct wined3d_allocator_block *memory; + + GLsizeiptr size; + GLenum binding; + GLenum usage; + + GLbitfield flags; + uint64_t command_fence_id; +}; + +static inline struct wined3d_bo_gl *wined3d_bo_gl(struct wined3d_bo *bo) +{ + return CONTAINING_RECORD(bo, struct wined3d_bo_gl, b); +} + +static inline GLuint wined3d_bo_gl_id(struct wined3d_bo *bo) +{ + return bo ? wined3d_bo_gl(bo)->id : 0; +} + #endif /* __WINE_WINED3D_GL */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index c2c8f4035bd..acec4044f01 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -144,8 +144,6 @@ enum wined3d_ffp_emit_idx WINED3D_FFP_EMIT_COUNT, };
-#include "wined3d_gl.h" - /* Texture format fixups */
enum fixup_channel_source @@ -1613,31 +1611,7 @@ struct wined3d_bo bool coherent; };
-struct wined3d_bo_gl -{ - struct wined3d_bo b; - - GLuint id; - - struct wined3d_allocator_block *memory; - - GLsizeiptr size; - GLenum binding; - GLenum usage; - - GLbitfield flags; - uint64_t command_fence_id; -}; - -static inline struct wined3d_bo_gl *wined3d_bo_gl(struct wined3d_bo *bo) -{ - return CONTAINING_RECORD(bo, struct wined3d_bo_gl, b); -} - -static inline GLuint wined3d_bo_gl_id(struct wined3d_bo *bo) -{ - return bo ? wined3d_bo_gl(bo)->id : 0; -} +#include "wined3d_gl.h"
struct wined3d_bo_user {
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index acec4044f01..1a3bccb569b 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1640,7 +1640,7 @@ struct wined3d_stream_info_element { const struct wined3d_format *format; struct wined3d_bo_address data; - GLsizei stride; + unsigned int stride; unsigned int stream_idx; unsigned int divisor; bool instanced;
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_gl.h | 29 +++++++++++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 32 +------------------------------- 2 files changed, 30 insertions(+), 31 deletions(-)
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 390e3164ea5..8bc3e9eb6a3 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -436,4 +436,33 @@ static inline GLuint wined3d_bo_gl_id(struct wined3d_bo *bo) return bo ? wined3d_bo_gl(bo)->id : 0; }
+union wined3d_gl_fence_object +{ + GLuint id; + GLsync sync; +}; + +enum wined3d_fence_result +{ + WINED3D_FENCE_OK, + WINED3D_FENCE_WAITING, + WINED3D_FENCE_NOT_STARTED, + WINED3D_FENCE_WRONG_THREAD, + WINED3D_FENCE_ERROR, +}; + +struct wined3d_fence +{ + struct list entry; + union wined3d_gl_fence_object object; + struct wined3d_context_gl *context_gl; +}; + +HRESULT wined3d_fence_create(struct wined3d_device *device, struct wined3d_fence **fence); +void wined3d_fence_destroy(struct wined3d_fence *fence); +void wined3d_fence_issue(struct wined3d_fence *fence, struct wined3d_device *device); +enum wined3d_fence_result wined3d_fence_wait(const struct wined3d_fence *fence, struct wined3d_device *device); +enum wined3d_fence_result wined3d_fence_test(const struct wined3d_fence *fence, + struct wined3d_device *device, uint32_t flags); + #endif /* __WINE_WINED3D_GL */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 1a3bccb569b..7596db2a2a5 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1611,8 +1611,6 @@ struct wined3d_bo bool coherent; };
-#include "wined3d_gl.h" - struct wined3d_bo_user { struct list entry; @@ -1845,35 +1843,7 @@ enum fogsource { FOGSOURCE_COORD, };
-union wined3d_gl_fence_object -{ - GLuint id; - GLsync sync; -}; - -enum wined3d_fence_result -{ - WINED3D_FENCE_OK, - WINED3D_FENCE_WAITING, - WINED3D_FENCE_NOT_STARTED, - WINED3D_FENCE_WRONG_THREAD, - WINED3D_FENCE_ERROR, -}; - -struct wined3d_fence -{ - struct list entry; - union wined3d_gl_fence_object object; - struct wined3d_context_gl *context_gl; -}; - -HRESULT wined3d_fence_create(struct wined3d_device *device, struct wined3d_fence **fence) DECLSPEC_HIDDEN; -void wined3d_fence_destroy(struct wined3d_fence *fence) DECLSPEC_HIDDEN; -void wined3d_fence_issue(struct wined3d_fence *fence, struct wined3d_device *device) DECLSPEC_HIDDEN; -enum wined3d_fence_result wined3d_fence_wait(const struct wined3d_fence *fence, - struct wined3d_device *device) DECLSPEC_HIDDEN; -enum wined3d_fence_result wined3d_fence_test(const struct wined3d_fence *fence, - struct wined3d_device *device, uint32_t flags) DECLSPEC_HIDDEN; +#include "wined3d_gl.h"
/* Direct3D terminology with little modifications. We do not have an issued * state because only the driver knows about it, but we have a created state
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_gl.h | 85 +++++++++++++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 91 ++-------------------------------- 2 files changed, 88 insertions(+), 88 deletions(-)
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 8bc3e9eb6a3..fcd9e73b2ad 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -465,4 +465,89 @@ enum wined3d_fence_result wined3d_fence_wait(const struct wined3d_fence *fence, enum wined3d_fence_result wined3d_fence_test(const struct wined3d_fence *fence, struct wined3d_device *device, uint32_t flags);
+HRESULT wined3d_query_gl_create(struct wined3d_device *device, enum wined3d_query_type type, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_query **query); +void wined3d_query_gl_destroy_buffer_object(struct wined3d_context_gl *context_gl, struct wined3d_query *query); + +struct wined3d_event_query +{ + struct wined3d_query query; + + struct wined3d_fence fence; + BOOL signalled; +}; + +struct wined3d_occlusion_query +{ + struct wined3d_query query; + + struct list entry; + GLuint id; + struct wined3d_context_gl *context_gl; + uint64_t samples; + BOOL started; +}; + +struct wined3d_timestamp_query +{ + struct wined3d_query query; + + struct list entry; + GLuint id; + struct wined3d_context_gl *context_gl; + uint64_t timestamp; +}; + +union wined3d_gl_so_statistics_query +{ + GLuint id[2]; + struct + { + GLuint written; + GLuint generated; + } query; +}; + +struct wined3d_so_statistics_query +{ + struct wined3d_query query; + + struct list entry; + union wined3d_gl_so_statistics_query u; + struct wined3d_context_gl *context_gl; + unsigned int stream_idx; + struct wined3d_query_data_so_statistics statistics; + BOOL started; +}; + +union wined3d_gl_pipeline_statistics_query +{ + GLuint id[11]; + struct + { + GLuint vertices; + GLuint primitives; + GLuint vertex_shader; + GLuint tess_control_shader; + GLuint tess_eval_shader; + GLuint geometry_shader; + GLuint geometry_primitives; + GLuint fragment_shader; + GLuint compute_shader; + GLuint clipping_input; + GLuint clipping_output; + } query; +}; + +struct wined3d_pipeline_statistics_query +{ + struct wined3d_query query; + + struct list entry; + union wined3d_gl_pipeline_statistics_query u; + struct wined3d_context_gl *context_gl; + struct wined3d_query_data_pipeline_statistics statistics; + BOOL started; +}; + #endif /* __WINE_WINED3D_GL */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 7596db2a2a5..f5dc9b4ec11 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1843,8 +1843,6 @@ enum fogsource { FOGSOURCE_COORD, };
-#include "wined3d_gl.h" - /* Direct3D terminology with little modifications. We do not have an issued * state because only the driver knows about it, but we have a created state * because D3D allows GetData() on a created query, but OpenGL doesn't. */ @@ -1878,96 +1876,13 @@ struct wined3d_query LONG counter_main, counter_retrieved; struct list poll_list_entry;
- GLuint buffer_object; + /* FIXME: This is GL-specific. */ + unsigned int buffer_object; UINT64 *map_ptr; bool poll_in_cs; };
-HRESULT wined3d_query_gl_create(struct wined3d_device *device, enum wined3d_query_type type, void *parent, - const struct wined3d_parent_ops *parent_ops, struct wined3d_query **query) DECLSPEC_HIDDEN; -void wined3d_query_gl_destroy_buffer_object(struct wined3d_context_gl *context_gl, - struct wined3d_query *query) DECLSPEC_HIDDEN; - -struct wined3d_event_query -{ - struct wined3d_query query; - - struct wined3d_fence fence; - BOOL signalled; -}; - -struct wined3d_occlusion_query -{ - struct wined3d_query query; - - struct list entry; - GLuint id; - struct wined3d_context_gl *context_gl; - UINT64 samples; - BOOL started; -}; - -struct wined3d_timestamp_query -{ - struct wined3d_query query; - - struct list entry; - GLuint id; - struct wined3d_context_gl *context_gl; - UINT64 timestamp; -}; - -union wined3d_gl_so_statistics_query -{ - GLuint id[2]; - struct - { - GLuint written; - GLuint generated; - } query; -}; - -struct wined3d_so_statistics_query -{ - struct wined3d_query query; - - struct list entry; - union wined3d_gl_so_statistics_query u; - struct wined3d_context_gl *context_gl; - unsigned int stream_idx; - struct wined3d_query_data_so_statistics statistics; - BOOL started; -}; - -union wined3d_gl_pipeline_statistics_query -{ - GLuint id[11]; - struct - { - GLuint vertices; - GLuint primitives; - GLuint vertex_shader; - GLuint tess_control_shader; - GLuint tess_eval_shader; - GLuint geometry_shader; - GLuint geometry_primitives; - GLuint fragment_shader; - GLuint compute_shader; - GLuint clipping_input; - GLuint clipping_output; - } query; -}; - -struct wined3d_pipeline_statistics_query -{ - struct wined3d_query query; - - struct list entry; - union wined3d_gl_pipeline_statistics_query u; - struct wined3d_context_gl *context_gl; - struct wined3d_query_data_pipeline_statistics statistics; - BOOL started; -}; +#include "wined3d_gl.h"
#define WINED3D_QUERY_POOL_SIZE 256
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_gl.h | 14 ++++++++++++++ dlls/wined3d/wined3d_private.h | 16 +--------------- 2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index fcd9e73b2ad..ba8dc68aaad 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -550,4 +550,18 @@ struct wined3d_pipeline_statistics_query BOOL started; };
+struct wined3d_gl_view +{ + GLenum target; + GLuint name; +}; + +struct wined3d_rendertarget_info +{ + struct wined3d_gl_view gl_view; + struct wined3d_resource *resource; + unsigned int sub_resource_idx; + unsigned int layer_count; +}; + #endif /* __WINE_WINED3D_GL */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index f5dc9b4ec11..d5b2cc0e020 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1882,29 +1882,15 @@ struct wined3d_query bool poll_in_cs; };
-#include "wined3d_gl.h" - #define WINED3D_QUERY_POOL_SIZE 256
-struct wined3d_gl_view -{ - GLenum target; - GLuint name; -}; - struct wined3d_range { unsigned int offset; unsigned int size; };
-struct wined3d_rendertarget_info -{ - struct wined3d_gl_view gl_view; - struct wined3d_resource *resource; - unsigned int sub_resource_idx; - unsigned int layer_count; -}; +#include "wined3d_gl.h"
struct wined3d_fb_state {
This merge request was approved by Jan Sikorski.