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
e536f998
Commit
e536f998
authored
May 21, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
May 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Set the buffer.c GLINFO_LOCATION to *gl_info.
parent
db0784e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
buffer.c
dlls/wined3d/buffer.c
+10
-6
No files found.
dlls/wined3d/buffer.c
View file @
e536f998
...
...
@@ -29,7 +29,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d
);
#define GLINFO_LOCATION
This->resource.device->adapter->gl_info
#define GLINFO_LOCATION
(*gl_info)
#define VB_MAXDECLCHANGES 100
/* After that number of decl changes we stop converting */
#define VB_RESETDECLCHANGE 1000
/* Reset the decl changecount after that number of draws */
...
...
@@ -98,7 +98,7 @@ static inline BOOL buffer_is_fully_dirty(struct wined3d_buffer *This)
}
/* Context activation is done by the caller */
static
void
delete_gl_buffer
(
struct
wined3d_buffer
*
This
)
static
void
delete_gl_buffer
(
struct
wined3d_buffer
*
This
,
const
struct
wined3d_gl_info
*
gl_info
)
{
if
(
!
This
->
buffer_object
)
return
;
...
...
@@ -226,7 +226,7 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This)
fail:
/* Clean up all vbo init, but continue because we can work without a vbo :-) */
ERR
(
"Failed to create a vertex buffer object. Continuing, but performance issues may occur
\n
"
);
delete_gl_buffer
(
This
);
delete_gl_buffer
(
This
,
gl_info
);
buffer_clear_dirty_areas
(
This
);
}
...
...
@@ -552,7 +552,7 @@ static BOOL buffer_find_decl(struct wined3d_buffer *This)
}
/* Context activation is done by the caller. */
static
void
buffer_check_buffer_object_size
(
struct
wined3d_buffer
*
This
)
static
void
buffer_check_buffer_object_size
(
struct
wined3d_buffer
*
This
,
const
struct
wined3d_gl_info
*
gl_info
)
{
UINT
size
=
This
->
conversion_stride
?
This
->
conversion_stride
*
(
This
->
resource
.
size
/
This
->
stride
)
:
This
->
resource
.
size
;
...
...
@@ -675,6 +675,8 @@ static ULONG STDMETHODCALLTYPE buffer_AddRef(IWineD3DBuffer *iface)
/* Context activation is done by the caller. */
BYTE
*
buffer_get_sysmem
(
struct
wined3d_buffer
*
This
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
This
->
resource
.
device
->
adapter
->
gl_info
;
/* AllocatedMemory exists if the buffer is double buffered or has no buffer object at all */
if
(
This
->
resource
.
allocatedMemory
)
return
This
->
resource
.
allocatedMemory
;
...
...
@@ -709,7 +711,7 @@ static void STDMETHODCALLTYPE buffer_UnLoad(IWineD3DBuffer *iface)
This
->
flags
&=
~
WINED3D_BUFFER_DOUBLEBUFFER
;
}
delete_gl_buffer
(
This
);
delete_gl_buffer
(
This
,
context
->
gl_info
);
This
->
flags
|=
WINED3D_BUFFER_CREATEBO
;
/* Recreate the buffer object next load */
buffer_clear_dirty_areas
(
This
);
...
...
@@ -926,6 +928,7 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface)
struct
wined3d_buffer
*
This
=
(
struct
wined3d_buffer
*
)
iface
;
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
device
;
UINT
start
=
0
,
end
=
0
,
len
=
0
,
vertices
;
const
struct
wined3d_gl_info
*
gl_info
;
struct
wined3d_context
*
context
;
BOOL
decl_changed
=
FALSE
;
unsigned
int
i
,
j
;
...
...
@@ -936,6 +939,7 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface)
This
->
flags
&=
~
(
WINED3D_BUFFER_NOSYNC
|
WINED3D_BUFFER_DISCARD
);
context
=
context_acquire
(
device
,
NULL
);
gl_info
=
context
->
gl_info
;
if
(
!
This
->
buffer_object
)
{
...
...
@@ -993,7 +997,7 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface)
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_STREAMSRC
);
goto
end
;
}
buffer_check_buffer_object_size
(
This
);
buffer_check_buffer_object_size
(
This
,
gl_info
);
/* The declaration changed, reload the whole buffer */
WARN
(
"Reloading buffer because of decl change
\n
"
);
...
...
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