Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b8eb171b
Commit
b8eb171b
authored
Sep 12, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 12, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Explicitly pass the state information to buffer_internal_preload.
parent
d8c43aab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
buffer.c
dlls/wined3d/buffer.c
+7
-5
context.c
dlls/wined3d/context.c
+2
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-2
No files found.
dlls/wined3d/buffer.c
View file @
b8eb171b
...
...
@@ -728,7 +728,8 @@ static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined
}
/* Context activation is done by the caller. */
void
buffer_internal_preload
(
struct
wined3d_buffer
*
buffer
,
struct
wined3d_context
*
context
)
void
buffer_internal_preload
(
struct
wined3d_buffer
*
buffer
,
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
)
{
DWORD
flags
=
buffer
->
flags
&
(
WINED3D_BUFFER_NOSYNC
|
WINED3D_BUFFER_DISCARD
);
struct
wined3d_device
*
device
=
buffer
->
resource
.
device
;
...
...
@@ -763,12 +764,13 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
}
}
/* Reading the declaration makes only sense if the stateblock is finalized and the buffer bound to a stream */
if
(
device
->
isInDraw
&&
buffer
->
resource
.
bind_count
>
0
)
/* Reading the declaration makes only sense if we have valid state information
* (i.e., if this function is called during draws). */
if
(
state
)
{
DWORD
fixup_flags
=
0
;
if
(
!
use_vs
(
&
device
->
state
))
if
(
!
use_vs
(
state
))
{
if
(
!
context
->
gl_info
->
supported
[
ARB_VERTEX_ARRAY_BGRA
])
fixup_flags
|=
WINED3D_BUFFER_FIXUP_D3DCOLOR
;
...
...
@@ -935,7 +937,7 @@ 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
);
buffer_internal_preload
(
buffer
,
context
,
NULL
);
context_release
(
context
);
}
...
...
dlls/wined3d/context.c
View file @
b8eb171b
...
...
@@ -2498,7 +2498,7 @@ void context_stream_info_from_declaration(struct wined3d_context *context,
element
=
&
stream_info
->
elements
[
i
];
buffer
=
state
->
streams
[
element
->
stream_idx
].
buffer
;
buffer_internal_preload
(
buffer
,
context
);
buffer_internal_preload
(
buffer
,
context
,
state
);
/* If the preload dropped the buffer object, update the stream info. */
if
(
buffer
->
buffer_object
!=
element
->
data
.
buffer_object
)
...
...
@@ -2583,7 +2583,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
if
(
state
->
index_buffer
)
{
if
(
context
->
stream_info
.
all_vbo
)
buffer_internal_preload
(
state
->
index_buffer
,
context
);
buffer_internal_preload
(
state
->
index_buffer
,
context
,
state
);
else
buffer_get_sysmem
(
state
->
index_buffer
,
context
);
}
...
...
dlls/wined3d/wined3d_private.h
View file @
b8eb171b
...
...
@@ -2525,8 +2525,8 @@ static inline struct wined3d_buffer *buffer_from_resource(struct wined3d_resourc
void
buffer_get_memory
(
struct
wined3d_buffer
*
buffer
,
struct
wined3d_context
*
context
,
struct
wined3d_bo_address
*
data
)
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
;
void
buffer_internal_preload
(
struct
wined3d_buffer
*
buffer
,
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
)
DECLSPEC_HIDDEN
;
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