Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
35b8bcf7
Commit
35b8bcf7
authored
Jan 06, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
Aug 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move struct wined3d_context_gl to wined3d_gl.h.
parent
c4248e97
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
189 additions
and
0 deletions
+189
-0
wined3d_gl.h
dlls/wined3d/wined3d_gl.h
+189
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-0
No files found.
dlls/wined3d/wined3d_gl.h
View file @
35b8bcf7
...
...
@@ -564,4 +564,193 @@ struct wined3d_rendertarget_info
unsigned
int
layer_count
;
};
struct
wined3d_command_fence_gl
{
uint64_t
id
;
struct
wined3d_fence
*
fence
;
};
#define MAX_GL_FRAGMENT_SAMPLERS 32
struct
wined3d_context_gl
{
struct
wined3d_context
c
;
const
struct
wined3d_gl_info
*
gl_info
;
DWORD
tid
;
/* Thread ID which owns this context at the moment. */
uint32_t
dc_is_private
:
1
;
uint32_t
dc_has_format
:
1
;
/* Only meaningful for private DCs. */
uint32_t
fog_enabled
:
1
;
uint32_t
diffuse_attrib_to_1
:
1
;
uint32_t
rebind_fbo
:
1
;
uint32_t
untracked_material_count
:
2
;
/* Max value 2 */
uint32_t
needs_set
:
1
;
uint32_t
internal_format_set
:
1
;
uint32_t
valid
:
1
;
uint32_t
padding
:
22
;
uint32_t
default_attrib_value_set
;
GLenum
tracking_parm
;
/* Which source is tracking current colour. */
GLenum
untracked_materials
[
2
];
SIZE
blit_size
;
unsigned
int
active_texture
;
GLenum
*
texture_type
;
/* The WGL context. */
unsigned
int
level
;
HGLRC
restore_ctx
;
HDC
restore_dc
;
int
restore_pf
;
HWND
restore_pf_win
;
HGLRC
gl_ctx
;
HDC
dc
;
int
pixel_format
;
HWND
window
;
GLint
aux_buffers
;
/* FBOs. */
unsigned
int
fbo_entry_count
;
struct
list
fbo_list
;
struct
list
fbo_destroy_list
;
struct
fbo_entry
*
current_fbo
;
GLuint
fbo_read_binding
;
GLuint
fbo_draw_binding
;
struct
wined3d_rendertarget_info
blit_targets
[
WINED3D_MAX_RENDER_TARGETS
];
uint32_t
draw_buffers_mask
;
/* Enabled draw buffers, 31 max. */
/* Queries. */
struct
list
occlusion_queries
;
struct
list
fences
;
struct
list
timestamp_queries
;
struct
list
so_statistics_queries
;
struct
list
pipeline_statistics_queries
;
GLuint
*
free_occlusion_queries
;
SIZE_T
free_occlusion_query_size
;
unsigned
int
free_occlusion_query_count
;
union
wined3d_gl_fence_object
*
free_fences
;
SIZE_T
free_fence_size
;
unsigned
int
free_fence_count
;
GLuint
*
free_timestamp_queries
;
SIZE_T
free_timestamp_query_size
;
unsigned
int
free_timestamp_query_count
;
union
wined3d_gl_so_statistics_query
*
free_so_statistics_queries
;
SIZE_T
free_so_statistics_query_size
;
unsigned
int
free_so_statistics_query_count
;
union
wined3d_gl_pipeline_statistics_query
*
free_pipeline_statistics_queries
;
SIZE_T
free_pipeline_statistics_query_size
;
unsigned
int
free_pipeline_statistics_query_count
;
GLuint
blit_vbo
;
unsigned
int
tex_unit_map
[
WINED3D_MAX_COMBINED_SAMPLERS
];
unsigned
int
rev_tex_unit_map
[
MAX_GL_FRAGMENT_SAMPLERS
+
WINED3D_MAX_VERTEX_SAMPLERS
];
/* Extension emulation. */
GLint
gl_fog_source
;
GLfloat
fog_coord_value
;
GLfloat
colour
[
4
],
fog_start
,
fog_end
,
fog_colour
[
4
];
GLuint
dummy_arbfp_prog
;
struct
{
struct
wined3d_command_fence_gl
*
fences
;
SIZE_T
fences_size
;
SIZE_T
fence_count
;
}
submitted
;
};
static
inline
struct
wined3d_context_gl
*
wined3d_context_gl
(
struct
wined3d_context
*
context
)
{
return
CONTAINING_RECORD
(
context
,
struct
wined3d_context_gl
,
c
);
}
static
inline
const
struct
wined3d_context_gl
*
wined3d_context_gl_const
(
const
struct
wined3d_context
*
context
)
{
return
CONTAINING_RECORD
(
context
,
struct
wined3d_context_gl
,
c
);
}
HGLRC
context_create_wgl_attribs
(
const
struct
wined3d_gl_info
*
gl_info
,
HDC
hdc
,
HGLRC
share_ctx
);
DWORD
context_get_tls_idx
(
void
);
void
context_gl_apply_texture_draw_state
(
struct
wined3d_context_gl
*
context_gl
,
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
unsigned
int
location
);
void
context_gl_resource_released
(
struct
wined3d_device
*
device
,
GLuint
name
,
BOOL
rb_namespace
);
struct
wined3d_context
*
wined3d_context_gl_acquire
(
const
struct
wined3d_device
*
device
,
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
);
void
wined3d_context_gl_active_texture
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_gl_info
*
gl_info
,
unsigned
int
unit
);
void
wined3d_context_gl_alloc_fence
(
struct
wined3d_context_gl
*
context_gl
,
struct
wined3d_fence
*
fence
);
void
wined3d_context_gl_alloc_occlusion_query
(
struct
wined3d_context_gl
*
context_gl
,
struct
wined3d_occlusion_query
*
query
);
void
wined3d_context_gl_alloc_pipeline_statistics_query
(
struct
wined3d_context_gl
*
context_gl
,
struct
wined3d_pipeline_statistics_query
*
query
);
void
wined3d_context_gl_alloc_so_statistics_query
(
struct
wined3d_context_gl
*
context_gl
,
struct
wined3d_so_statistics_query
*
query
);
void
wined3d_context_gl_alloc_timestamp_query
(
struct
wined3d_context_gl
*
context_gl
,
struct
wined3d_timestamp_query
*
query
);
GLuint
wined3d_context_gl_allocate_vram_chunk_buffer
(
struct
wined3d_context_gl
*
context_gl
,
unsigned
int
pool
,
size_t
size
);
void
wined3d_context_gl_apply_blit_state
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_device
*
device
);
BOOL
wined3d_context_gl_apply_clear_state
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_state
*
state
,
unsigned
int
rt_count
,
const
struct
wined3d_fb_state
*
fb
);
void
wined3d_context_gl_apply_fbo_state_blit
(
struct
wined3d_context_gl
*
context_gl
,
GLenum
target
,
struct
wined3d_resource
*
rt
,
unsigned
int
rt_sub_resource_idx
,
struct
wined3d_resource
*
ds
,
unsigned
int
ds_sub_resource_idx
,
uint32_t
location
);
void
wined3d_context_gl_apply_ffp_blit_state
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_device
*
device
);
void
wined3d_context_gl_bind_bo
(
struct
wined3d_context_gl
*
context_gl
,
GLenum
binding
,
GLuint
name
);
void
wined3d_context_gl_bind_dummy_textures
(
const
struct
wined3d_context_gl
*
context_gl
);
void
wined3d_context_gl_bind_texture
(
struct
wined3d_context_gl
*
context_gl
,
GLenum
target
,
GLuint
name
);
void
wined3d_context_gl_check_fbo_status
(
const
struct
wined3d_context_gl
*
context_gl
,
GLenum
target
);
void
wined3d_context_gl_copy_bo_address
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_bo_address
*
dst
,
const
struct
wined3d_bo_address
*
src
,
unsigned
int
range_count
,
const
struct
wined3d_range
*
ranges
,
uint32_t
map_flags
);
void
wined3d_context_gl_destroy
(
struct
wined3d_context_gl
*
context_gl
);
void
wined3d_context_gl_destroy_bo
(
struct
wined3d_context_gl
*
context_gl
,
struct
wined3d_bo_gl
*
bo
);
void
wined3d_context_gl_draw_shaded_quad
(
struct
wined3d_context_gl
*
context_gl
,
struct
wined3d_texture_gl
*
texture_gl
,
unsigned
int
sub_resource_idx
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
enum
wined3d_texture_filter_type
filter
);
void
wined3d_context_gl_draw_textured_quad
(
struct
wined3d_context_gl
*
context_gl
,
struct
wined3d_texture_gl
*
texture_gl
,
unsigned
int
sub_resource_idx
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
enum
wined3d_texture_filter_type
filter
);
void
wined3d_context_gl_enable_clip_distances
(
struct
wined3d_context_gl
*
context_gl
,
uint32_t
mask
);
void
wined3d_context_gl_end_transform_feedback
(
struct
wined3d_context_gl
*
context_gl
);
void
wined3d_context_gl_flush_bo_address
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_const_bo_address
*
data
,
size_t
size
);
void
wined3d_context_gl_free_fence
(
struct
wined3d_fence
*
fence
);
void
wined3d_context_gl_free_occlusion_query
(
struct
wined3d_occlusion_query
*
query
);
void
wined3d_context_gl_free_pipeline_statistics_query
(
struct
wined3d_pipeline_statistics_query
*
query
);
void
wined3d_context_gl_free_so_statistics_query
(
struct
wined3d_so_statistics_query
*
query
);
void
wined3d_context_gl_free_timestamp_query
(
struct
wined3d_timestamp_query
*
query
);
struct
wined3d_context_gl
*
wined3d_context_gl_get_current
(
void
);
GLenum
wined3d_context_gl_get_offscreen_gl_buffer
(
const
struct
wined3d_context_gl
*
context_gl
);
const
unsigned
int
*
wined3d_context_gl_get_tex_unit_mapping
(
const
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_shader_version
*
shader_version
,
unsigned
int
*
base
,
unsigned
int
*
count
);
HRESULT
wined3d_context_gl_init
(
struct
wined3d_context_gl
*
context_gl
,
struct
wined3d_swapchain_gl
*
swapchain_gl
);
void
wined3d_context_gl_load_tex_coords
(
const
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_stream_info
*
si
,
GLuint
*
current_bo
,
const
struct
wined3d_state
*
state
);
void
*
wined3d_context_gl_map_bo_address
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_bo_address
*
data
,
size_t
size
,
uint32_t
flags
);
struct
wined3d_context_gl
*
wined3d_context_gl_reacquire
(
struct
wined3d_context_gl
*
context_gl
);
void
wined3d_context_gl_release
(
struct
wined3d_context_gl
*
context_gl
);
BOOL
wined3d_context_gl_set_current
(
struct
wined3d_context_gl
*
context_gl
);
void
wined3d_context_gl_submit_command_fence
(
struct
wined3d_context_gl
*
context_gl
);
void
wined3d_context_gl_texture_update
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_texture_gl
*
texture_gl
);
void
wined3d_context_gl_unload_tex_coords
(
const
struct
wined3d_context_gl
*
context_gl
);
void
wined3d_context_gl_unmap_bo_address
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_bo_address
*
data
,
unsigned
int
range_count
,
const
struct
wined3d_range
*
ranges
);
void
wined3d_context_gl_update_stream_sources
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_state
*
state
);
void
wined3d_context_gl_wait_command_fence
(
struct
wined3d_context_gl
*
context_gl
,
uint64_t
id
);
#endif
/* __WINE_WINED3D_GL */
dlls/wined3d/wined3d_private.h
View file @
35b8bcf7
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment