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
cd203b38
Commit
cd203b38
authored
Sep 09, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 09, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass the context to the main buffer preload function.
parent
87f931dc
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
9 deletions
+13
-9
buffer.c
dlls/wined3d/buffer.c
+9
-7
context.c
dlls/wined3d/context.c
+1
-1
device.c
dlls/wined3d/device.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
No files found.
dlls/wined3d/buffer.c
View file @
cd203b38
...
@@ -730,13 +730,13 @@ static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined
...
@@ -730,13 +730,13 @@ static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined
checkGLcall
(
"glUnmapBufferARB"
);
checkGLcall
(
"glUnmapBufferARB"
);
}
}
void
CDECL
wined3d_buffer_preload
(
struct
wined3d_buffer
*
buffer
)
/* Context activation is done by the caller. */
void
buffer_internal_preload
(
struct
wined3d_buffer
*
buffer
,
struct
wined3d_context
*
context
)
{
{
DWORD
flags
=
buffer
->
flags
&
(
WINED3D_BUFFER_NOSYNC
|
WINED3D_BUFFER_DISCARD
);
DWORD
flags
=
buffer
->
flags
&
(
WINED3D_BUFFER_NOSYNC
|
WINED3D_BUFFER_DISCARD
);
struct
wined3d_device
*
device
=
buffer
->
resource
.
device
;
struct
wined3d_device
*
device
=
buffer
->
resource
.
device
;
UINT
start
=
0
,
end
=
0
,
len
=
0
,
vertices
;
UINT
start
=
0
,
end
=
0
,
len
=
0
,
vertices
;
const
struct
wined3d_gl_info
*
gl_info
;
const
struct
wined3d_gl_info
*
gl_info
;
struct
wined3d_context
*
context
;
BOOL
decl_changed
=
FALSE
;
BOOL
decl_changed
=
FALSE
;
unsigned
int
i
,
j
;
unsigned
int
i
,
j
;
BYTE
*
data
;
BYTE
*
data
;
...
@@ -756,9 +756,7 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
...
@@ -756,9 +756,7 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
/* TODO: Make converting independent from VBOs */
/* TODO: Make converting independent from VBOs */
if
(
buffer
->
flags
&
WINED3D_BUFFER_CREATEBO
)
if
(
buffer
->
flags
&
WINED3D_BUFFER_CREATEBO
)
{
{
context
=
context_acquire
(
device
,
NULL
);
buffer_create_buffer_object
(
buffer
,
context
);
buffer_create_buffer_object
(
buffer
,
context
);
context_release
(
context
);
buffer
->
flags
&=
~
WINED3D_BUFFER_CREATEBO
;
buffer
->
flags
&=
~
WINED3D_BUFFER_CREATEBO
;
}
}
else
else
...
@@ -867,14 +865,11 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
...
@@ -867,14 +865,11 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
return
;
return
;
}
}
context
=
context_acquire
(
device
,
NULL
);
buffer_direct_upload
(
buffer
,
context
->
gl_info
,
flags
);
buffer_direct_upload
(
buffer
,
context
->
gl_info
,
flags
);
context_release
(
context
);
return
;
return
;
}
}
context
=
context_acquire
(
device
,
NULL
);
gl_info
=
context
->
gl_info
;
gl_info
=
context
->
gl_info
;
if
(
!
(
buffer
->
flags
&
WINED3D_BUFFER_DOUBLEBUFFER
))
if
(
!
(
buffer
->
flags
&
WINED3D_BUFFER_DOUBLEBUFFER
))
...
@@ -927,6 +922,13 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
...
@@ -927,6 +922,13 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
}
}
HeapFree
(
GetProcessHeap
(),
0
,
data
);
HeapFree
(
GetProcessHeap
(),
0
,
data
);
}
void
CDECL
wined3d_buffer_preload
(
struct
wined3d_buffer
*
buffer
)
{
struct
wined3d_context
*
context
;
context
=
context_acquire
(
buffer
->
resource
.
device
,
NULL
);
buffer_internal_preload
(
buffer
,
context
);
context_release
(
context
);
context_release
(
context
);
}
}
...
...
dlls/wined3d/context.c
View file @
cd203b38
...
@@ -2372,7 +2372,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
...
@@ -2372,7 +2372,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
if
(
state
->
index_buffer
)
if
(
state
->
index_buffer
)
{
{
if
(
device
->
stream_info
.
all_vbo
)
if
(
device
->
stream_info
.
all_vbo
)
wined3d_buffer_preload
(
state
->
index_buffer
);
buffer_internal_preload
(
state
->
index_buffer
,
context
);
else
else
buffer_get_sysmem
(
state
->
index_buffer
,
context
);
buffer_get_sysmem
(
state
->
index_buffer
,
context
);
}
}
...
...
dlls/wined3d/device.c
View file @
cd203b38
...
@@ -288,7 +288,7 @@ static void device_stream_info_from_declaration(struct wined3d_device *device, s
...
@@ -288,7 +288,7 @@ static void device_stream_info_from_declaration(struct wined3d_device *device, s
element
=
&
stream_info
->
elements
[
i
];
element
=
&
stream_info
->
elements
[
i
];
buffer
=
state
->
streams
[
element
->
stream_idx
].
buffer
;
buffer
=
state
->
streams
[
element
->
stream_idx
].
buffer
;
wined3d_buffer_preload
(
buffer
);
buffer_internal_preload
(
buffer
,
context
);
/* If the preload dropped the buffer object, update the stream info. */
/* If the preload dropped the buffer object, update the stream info. */
if
(
buffer
->
buffer_object
!=
element
->
data
.
buffer_object
)
if
(
buffer
->
buffer_object
!=
element
->
data
.
buffer_object
)
...
...
dlls/wined3d/wined3d_private.h
View file @
cd203b38
...
@@ -2523,6 +2523,8 @@ static inline struct wined3d_buffer *buffer_from_resource(struct wined3d_resourc
...
@@ -2523,6 +2523,8 @@ static inline struct wined3d_buffer *buffer_from_resource(struct wined3d_resourc
void
buffer_get_memory
(
struct
wined3d_buffer
*
buffer
,
struct
wined3d_context
*
context
,
void
buffer_get_memory
(
struct
wined3d_buffer
*
buffer
,
struct
wined3d_context
*
context
,
struct
wined3d_bo_address
*
data
)
DECLSPEC_HIDDEN
;
struct
wined3d_bo_address
*
data
)
DECLSPEC_HIDDEN
;
BYTE
*
buffer_get_sysmem
(
struct
wined3d_buffer
*
This
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
BYTE
*
buffer_get_sysmem
(
struct
wined3d_buffer
*
This
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
void
buffer_internal_preload
(
struct
wined3d_buffer
*
buffer
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
struct
wined3d_rendertarget_view
struct
wined3d_rendertarget_view
{
{
...
...
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