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
692aa004
Commit
692aa004
authored
Mar 30, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Rename "numContexts" to "context_count".
parent
8fe80e18
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
12 deletions
+14
-12
context.c
dlls/wined3d/context.c
+2
-2
device.c
dlls/wined3d/device.c
+10
-8
surface.c
dlls/wined3d/surface.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/context.c
View file @
692aa004
...
@@ -659,7 +659,7 @@ static void context_enum_surface_fbo_entries(IWineD3DDeviceImpl *device,
...
@@ -659,7 +659,7 @@ static void context_enum_surface_fbo_entries(IWineD3DDeviceImpl *device,
{
{
UINT
i
;
UINT
i
;
for
(
i
=
0
;
i
<
device
->
numContexts
;
++
i
)
for
(
i
=
0
;
i
<
device
->
context_count
;
++
i
)
{
{
struct
wined3d_context
*
context
=
device
->
contexts
[
i
];
struct
wined3d_context
*
context
=
device
->
contexts
[
i
];
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
...
@@ -1370,7 +1370,7 @@ struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain,
...
@@ -1370,7 +1370,7 @@ struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain,
}
}
ctx
=
pwglCreateContext
(
hdc
);
ctx
=
pwglCreateContext
(
hdc
);
if
(
device
->
numContexts
)
if
(
device
->
context_count
)
{
{
if
(
!
pwglShareLists
(
device
->
contexts
[
0
]
->
glCtx
,
ctx
))
if
(
!
pwglShareLists
(
device
->
contexts
[
0
]
->
glCtx
,
ctx
))
{
{
...
...
dlls/wined3d/device.c
View file @
692aa004
...
@@ -504,7 +504,8 @@ BOOL device_context_add(IWineD3DDeviceImpl *device, struct wined3d_context *cont
...
@@ -504,7 +504,8 @@ BOOL device_context_add(IWineD3DDeviceImpl *device, struct wined3d_context *cont
TRACE
(
"Adding context %p.
\n
"
,
context
);
TRACE
(
"Adding context %p.
\n
"
,
context
);
if
(
!
device
->
contexts
)
new_array
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
new_array
));
if
(
!
device
->
contexts
)
new_array
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
new_array
));
else
new_array
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
device
->
contexts
,
sizeof
(
*
new_array
)
*
(
device
->
numContexts
+
1
));
else
new_array
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
device
->
contexts
,
sizeof
(
*
new_array
)
*
(
device
->
context_count
+
1
));
if
(
!
new_array
)
if
(
!
new_array
)
{
{
...
@@ -512,7 +513,7 @@ BOOL device_context_add(IWineD3DDeviceImpl *device, struct wined3d_context *cont
...
@@ -512,7 +513,7 @@ BOOL device_context_add(IWineD3DDeviceImpl *device, struct wined3d_context *cont
return
FALSE
;
return
FALSE
;
}
}
new_array
[
device
->
numContexts
++
]
=
context
;
new_array
[
device
->
context_count
++
]
=
context
;
device
->
contexts
=
new_array
;
device
->
contexts
=
new_array
;
return
TRUE
;
return
TRUE
;
}
}
...
@@ -525,7 +526,7 @@ void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *c
...
@@ -525,7 +526,7 @@ void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *c
TRACE
(
"Removing context %p.
\n
"
,
context
);
TRACE
(
"Removing context %p.
\n
"
,
context
);
for
(
i
=
0
;
i
<
device
->
numContexts
;
++
i
)
for
(
i
=
0
;
i
<
device
->
context_count
;
++
i
)
{
{
if
(
device
->
contexts
[
i
]
==
context
)
if
(
device
->
contexts
[
i
]
==
context
)
{
{
...
@@ -540,15 +541,15 @@ void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *c
...
@@ -540,15 +541,15 @@ void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *c
return
;
return
;
}
}
if
(
!--
device
->
numContexts
)
if
(
!--
device
->
context_count
)
{
{
HeapFree
(
GetProcessHeap
(),
0
,
device
->
contexts
);
HeapFree
(
GetProcessHeap
(),
0
,
device
->
contexts
);
device
->
contexts
=
NULL
;
device
->
contexts
=
NULL
;
return
;
return
;
}
}
memmove
(
&
device
->
contexts
[
i
],
&
device
->
contexts
[
i
+
1
],
(
device
->
numContexts
-
i
)
*
sizeof
(
*
device
->
contexts
));
memmove
(
&
device
->
contexts
[
i
],
&
device
->
contexts
[
i
+
1
],
(
device
->
context_count
-
i
)
*
sizeof
(
*
device
->
contexts
));
new_array
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
device
->
contexts
,
device
->
numContexts
*
sizeof
(
*
device
->
contexts
));
new_array
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
device
->
contexts
,
device
->
context_count
*
sizeof
(
*
device
->
contexts
));
if
(
!
new_array
)
if
(
!
new_array
)
{
{
ERR
(
"Failed to shrink context array. Oh well.
\n
"
);
ERR
(
"Failed to shrink context array. Oh well.
\n
"
);
...
@@ -6283,7 +6284,7 @@ static void delete_opengl_contexts(IWineD3DDeviceImpl *device, IWineD3DSwapChain
...
@@ -6283,7 +6284,7 @@ static void delete_opengl_contexts(IWineD3DDeviceImpl *device, IWineD3DSwapChain
context_release
(
context
);
context_release
(
context
);
while
(
device
->
numContexts
)
while
(
device
->
context_count
)
{
{
context_destroy
(
device
,
device
->
contexts
[
0
]);
context_destroy
(
device
,
device
->
contexts
[
0
]);
}
}
...
@@ -7065,7 +7066,8 @@ void IWineD3DDeviceImpl_MarkStateDirty(IWineD3DDeviceImpl *This, DWORD state) {
...
@@ -7065,7 +7066,8 @@ void IWineD3DDeviceImpl_MarkStateDirty(IWineD3DDeviceImpl *This, DWORD state) {
BYTE
shift
;
BYTE
shift
;
UINT
i
;
UINT
i
;
for
(
i
=
0
;
i
<
This
->
numContexts
;
i
++
)
{
for
(
i
=
0
;
i
<
This
->
context_count
;
++
i
)
{
context
=
This
->
contexts
[
i
];
context
=
This
->
contexts
[
i
];
if
(
isStateDirty
(
context
,
rep
))
continue
;
if
(
isStateDirty
(
context
,
rep
))
continue
;
...
...
dlls/wined3d/surface.c
View file @
692aa004
...
@@ -1013,7 +1013,7 @@ static void surface_upload_data(IWineD3DSurfaceImpl *This, const struct wined3d_
...
@@ -1013,7 +1013,7 @@ static void surface_upload_data(IWineD3DSurfaceImpl *This, const struct wined3d_
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
device
;
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
device
;
unsigned
int
i
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
device
->
numContexts
;
++
i
)
for
(
i
=
0
;
i
<
device
->
context_count
;
++
i
)
{
{
context_surface_update
(
device
->
contexts
[
i
],
This
);
context_surface_update
(
device
->
contexts
[
i
],
This
);
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
692aa004
...
@@ -1759,7 +1759,7 @@ struct IWineD3DDeviceImpl
...
@@ -1759,7 +1759,7 @@ struct IWineD3DDeviceImpl
/* Context management */
/* Context management */
struct
wined3d_context
**
contexts
;
struct
wined3d_context
**
contexts
;
UINT
numContexts
;
UINT
context_count
;
/* High level patch management */
/* High level patch management */
#define PATCHMAP_SIZE 43
#define PATCHMAP_SIZE 43
...
...
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