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
3faa9e92
Commit
3faa9e92
authored
Jun 07, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_context_gl structure to context_bind_bo().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0781596c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
12 deletions
+18
-12
buffer.c
dlls/wined3d/buffer.c
+3
-1
context.c
dlls/wined3d/context.c
+12
-9
view.c
dlls/wined3d/view.c
+2
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/buffer.c
View file @
3faa9e92
...
...
@@ -135,7 +135,9 @@ void wined3d_buffer_invalidate_location(struct wined3d_buffer *buffer, DWORD loc
/* Context activation is done by the caller. */
static
void
wined3d_buffer_gl_bind
(
struct
wined3d_buffer_gl
*
buffer_gl
,
struct
wined3d_context
*
context
)
{
context_bind_bo
(
context
,
buffer_gl
->
buffer_type_hint
,
buffer_gl
->
buffer_object
);
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
wined3d_context_gl_bind_bo
(
context_gl
,
buffer_gl
->
buffer_type_hint
,
buffer_gl
->
buffer_object
);
}
/* Context activation is done by the caller. */
...
...
dlls/wined3d/context.c
View file @
3faa9e92
...
...
@@ -2514,12 +2514,12 @@ void wined3d_context_gl_active_texture(struct wined3d_context_gl *context_gl,
context_gl
->
active_texture
=
unit
;
}
void
context_bind_bo
(
struct
wined3d_context
*
context
,
GLenum
binding
,
GLuint
name
)
void
wined3d_context_gl_bind_bo
(
struct
wined3d_context_gl
*
context_gl
,
GLenum
binding
,
GLuint
name
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
const
struct
wined3d_gl_info
*
gl_info
=
context
_gl
->
c
.
gl_info
;
if
(
binding
==
GL_ELEMENT_ARRAY_BUFFER
)
context_invalidate_state
(
context
,
STATE_INDEXBUFFER
);
context_invalidate_state
(
&
context_gl
->
c
,
STATE_INDEXBUFFER
);
GL_EXTCALL
(
glBindBuffer
(
binding
,
name
));
}
...
...
@@ -2591,6 +2591,7 @@ void wined3d_context_gl_bind_texture(struct wined3d_context_gl *context_gl, GLen
void
*
context_map_bo_address
(
struct
wined3d_context
*
context
,
const
struct
wined3d_bo_address
*
data
,
size_t
size
,
GLenum
binding
,
DWORD
flags
)
{
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
const
struct
wined3d_gl_info
*
gl_info
;
BYTE
*
memory
;
...
...
@@ -2598,7 +2599,7 @@ void *context_map_bo_address(struct wined3d_context *context,
return
data
->
addr
;
gl_info
=
context
->
gl_info
;
context_bind_bo
(
context
,
binding
,
data
->
buffer_object
);
wined3d_context_gl_bind_bo
(
context_gl
,
binding
,
data
->
buffer_object
);
if
(
gl_info
->
supported
[
ARB_MAP_BUFFER_RANGE
])
{
...
...
@@ -2611,7 +2612,7 @@ void *context_map_bo_address(struct wined3d_context *context,
memory
+=
(
INT_PTR
)
data
->
addr
;
}
context_bind_bo
(
context
,
binding
,
0
);
wined3d_context_gl_bind_bo
(
context_gl
,
binding
,
0
);
checkGLcall
(
"Map buffer object"
);
return
memory
;
...
...
@@ -2620,15 +2621,16 @@ void *context_map_bo_address(struct wined3d_context *context,
void
context_unmap_bo_address
(
struct
wined3d_context
*
context
,
const
struct
wined3d_bo_address
*
data
,
GLenum
binding
)
{
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
const
struct
wined3d_gl_info
*
gl_info
;
if
(
!
data
->
buffer_object
)
return
;
gl_info
=
context
->
gl_info
;
context_bind_bo
(
context
,
binding
,
data
->
buffer_object
);
wined3d_context_gl_bind_bo
(
context_gl
,
binding
,
data
->
buffer_object
);
GL_EXTCALL
(
glUnmapBuffer
(
binding
));
context_bind_bo
(
context
,
binding
,
0
);
wined3d_context_gl_bind_bo
(
context_gl
,
binding
,
0
);
checkGLcall
(
"Unmap buffer object"
);
}
...
...
@@ -2636,6 +2638,7 @@ void context_copy_bo_address(struct wined3d_context *context,
const
struct
wined3d_bo_address
*
dst
,
GLenum
dst_binding
,
const
struct
wined3d_bo_address
*
src
,
GLenum
src_binding
,
size_t
size
)
{
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
const
struct
wined3d_gl_info
*
gl_info
;
BYTE
*
dst_ptr
,
*
src_ptr
;
...
...
@@ -2664,13 +2667,13 @@ void context_copy_bo_address(struct wined3d_context *context,
}
else
if
(
!
dst
->
buffer_object
&&
src
->
buffer_object
)
{
context_bind_bo
(
context
,
src_binding
,
src
->
buffer_object
);
wined3d_context_gl_bind_bo
(
context_gl
,
src_binding
,
src
->
buffer_object
);
GL_EXTCALL
(
glGetBufferSubData
(
src_binding
,
(
GLintptr
)
src
->
addr
,
size
,
dst
->
addr
));
checkGLcall
(
"buffer download"
);
}
else
if
(
dst
->
buffer_object
&&
!
src
->
buffer_object
)
{
context_bind_bo
(
context
,
dst_binding
,
dst
->
buffer_object
);
wined3d_context_gl_bind_bo
(
context_gl
,
dst_binding
,
dst
->
buffer_object
);
GL_EXTCALL
(
glBufferSubData
(
dst_binding
,
(
GLintptr
)
dst
->
addr
,
size
,
src
->
addr
));
checkGLcall
(
"buffer upload"
);
}
...
...
dlls/wined3d/view.c
View file @
3faa9e92
...
...
@@ -1034,6 +1034,7 @@ void wined3d_unordered_access_view_invalidate_location(struct wined3d_unordered_
void
wined3d_unordered_access_view_clear_uint
(
struct
wined3d_unordered_access_view
*
view
,
const
struct
wined3d_uvec4
*
clear_value
,
struct
wined3d_context
*
context
)
{
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
const
struct
wined3d_format_gl
*
format
;
struct
wined3d_buffer_gl
*
buffer_gl
;
...
...
@@ -1067,7 +1068,7 @@ void wined3d_unordered_access_view_clear_uint(struct wined3d_unordered_access_vi
wined3d_unordered_access_view_invalidate_location
(
view
,
~
WINED3D_LOCATION_BUFFER
);
get_buffer_view_range
(
&
buffer_gl
->
b
,
&
view
->
desc
,
&
format
->
f
,
&
offset
,
&
size
);
context_bind_bo
(
context
,
buffer_gl
->
buffer_type_hint
,
buffer_gl
->
buffer_object
);
wined3d_context_gl_bind_bo
(
context_gl
,
buffer_gl
->
buffer_type_hint
,
buffer_gl
->
buffer_object
);
GL_EXTCALL
(
glClearBufferSubData
(
buffer_gl
->
buffer_type_hint
,
format
->
internal
,
offset
,
size
,
format
->
format
,
format
->
type
,
clear_value
));
checkGLcall
(
"clear unordered access view"
);
...
...
dlls/wined3d/wined3d_private.h
View file @
3faa9e92
...
...
@@ -2081,6 +2081,7 @@ void wined3d_context_gl_apply_fbo_state_blit(struct wined3d_context_gl *context_
struct
wined3d_resource
*
ds
,
unsigned
int
ds_sub_resource_idx
,
DWORD
location
)
DECLSPEC_HIDDEN
;
void
wined3d_context_gl_apply_ffp_blit_state
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_device
*
device
)
DECLSPEC_HIDDEN
;
void
wined3d_context_gl_bind_bo
(
struct
wined3d_context_gl
*
context_gl
,
GLenum
binding
,
GLuint
name
)
DECLSPEC_HIDDEN
;
void
wined3d_context_gl_bind_texture
(
struct
wined3d_context_gl
*
context_gl
,
GLenum
target
,
GLuint
name
)
DECLSPEC_HIDDEN
;
void
wined3d_context_gl_check_fbo_status
(
const
struct
wined3d_context_gl
*
context_gl
,
GLenum
target
)
DECLSPEC_HIDDEN
;
...
...
@@ -2237,7 +2238,6 @@ void wined3d_raw_blitter_create(struct wined3d_blitter **next,
BOOL
wined3d_clip_blit
(
const
RECT
*
clip_rect
,
RECT
*
clipped
,
RECT
*
other
)
DECLSPEC_HIDDEN
;
void
context_bind_bo
(
struct
wined3d_context
*
context
,
GLenum
binding
,
GLuint
name
)
DECLSPEC_HIDDEN
;
void
context_bind_dummy_textures
(
const
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
void
context_copy_bo_address
(
struct
wined3d_context
*
context
,
const
struct
wined3d_bo_address
*
dst
,
GLenum
dst_binding
,
...
...
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