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
7253fae3
Commit
7253fae3
authored
Feb 12, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Feb 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make the context array dynamic.
parent
e5343404
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
6 deletions
+17
-6
context.c
dlls/wined3d/context.c
+1
-1
device.c
dlls/wined3d/device.c
+9
-4
directx.c
dlls/wined3d/directx.c
+6
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/context.c
View file @
7253fae3
...
@@ -207,7 +207,7 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU
...
@@ -207,7 +207,7 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU
/* TODO: Thread selection */
/* TODO: Thread selection */
/* TODO: Activate the opengl context */
/* TODO: Activate the opengl context */
context
=
&
This
->
contexts
[
This
->
activeContext
];
context
=
This
->
contexts
[
This
->
activeContext
];
switch
(
usage
)
{
switch
(
usage
)
{
case
CTXUSAGE_RESOURCELOAD
:
case
CTXUSAGE_RESOURCELOAD
:
...
...
dlls/wined3d/device.c
View file @
7253fae3
...
@@ -350,10 +350,16 @@ static ULONG WINAPI IWineD3DDeviceImpl_Release(IWineD3DDevice *iface) {
...
@@ -350,10 +350,16 @@ static ULONG WINAPI IWineD3DDeviceImpl_Release(IWineD3DDevice *iface) {
TRACE
(
"(%p) : Releasing from %d
\n
"
,
This
,
refCount
+
1
);
TRACE
(
"(%p) : Releasing from %d
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
if
(
!
refCount
)
{
UINT
i
;
if
(
This
->
fbo
)
{
if
(
This
->
fbo
)
{
GL_EXTCALL
(
glDeleteFramebuffersEXT
(
1
,
&
This
->
fbo
));
GL_EXTCALL
(
glDeleteFramebuffersEXT
(
1
,
&
This
->
fbo
));
}
}
for
(
i
=
0
;
i
<
This
->
numContexts
;
i
++
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
contexts
[
i
]);
}
HeapFree
(
GetProcessHeap
(),
0
,
This
->
contexts
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
render_targets
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
render_targets
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
draw_buffers
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
draw_buffers
);
...
@@ -2007,8 +2013,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR
...
@@ -2007,8 +2013,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR
/* Initialize the current view state */
/* Initialize the current view state */
This
->
view_ident
=
1
;
This
->
view_ident
=
1
;
This
->
numContexts
=
1
;
This
->
contexts
[
0
]
->
last_was_rhw
=
0
;
This
->
contexts
[
0
].
last_was_rhw
=
0
;
glGetIntegerv
(
GL_MAX_LIGHTS
,
&
This
->
maxConcurrentLights
);
glGetIntegerv
(
GL_MAX_LIGHTS
,
&
This
->
maxConcurrentLights
);
TRACE
(
"(%p) All defaults now set up, leaving Init3D with %p
\n
"
,
This
,
This
);
TRACE
(
"(%p) All defaults now set up, leaving Init3D with %p
\n
"
,
This
,
This
);
...
@@ -5948,7 +5953,7 @@ static void device_render_to_texture(IWineD3DDeviceImpl* This, BOOL isTexture) {
...
@@ -5948,7 +5953,7 @@ static void device_render_to_texture(IWineD3DDeviceImpl* This, BOOL isTexture) {
if
(
This
->
depth_copy_state
!=
WINED3D_DCS_NO_COPY
)
{
if
(
This
->
depth_copy_state
!=
WINED3D_DCS_NO_COPY
)
{
This
->
depth_copy_state
=
WINED3D_DCS_COPY
;
This
->
depth_copy_state
=
WINED3D_DCS_COPY
;
}
}
This
->
contexts
[
0
]
.
last_was_rhw
=
FALSE
;
This
->
contexts
[
0
]
->
last_was_rhw
=
FALSE
;
/* Viewport state will reapply the projection matrix for now */
/* Viewport state will reapply the projection matrix for now */
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
WINED3DRS_CULLMODE
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
WINED3DRS_CULLMODE
);
...
@@ -6985,7 +6990,7 @@ void IWineD3DDeviceImpl_MarkStateDirty(IWineD3DDeviceImpl *This, DWORD state) {
...
@@ -6985,7 +6990,7 @@ void IWineD3DDeviceImpl_MarkStateDirty(IWineD3DDeviceImpl *This, DWORD state) {
if
(
!
rep
)
return
;
if
(
!
rep
)
return
;
for
(
i
=
0
;
i
<
This
->
numContexts
;
i
++
)
{
for
(
i
=
0
;
i
<
This
->
numContexts
;
i
++
)
{
context
=
&
This
->
contexts
[
i
];
context
=
This
->
contexts
[
i
];
if
(
isStateDirty
(
context
,
rep
))
continue
;
if
(
isStateDirty
(
context
,
rep
))
continue
;
context
->
dirtyArray
[
context
->
numDirtyEntries
++
]
=
rep
;
context
->
dirtyArray
[
context
->
numDirtyEntries
++
]
=
rep
;
...
...
dlls/wined3d/directx.c
View file @
7253fae3
...
@@ -2444,6 +2444,12 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
...
@@ -2444,6 +2444,12 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
object
->
ddraw_format
=
pixelformat_for_depth
(
GetDeviceCaps
(
hDC
,
BITSPIXEL
)
*
GetDeviceCaps
(
hDC
,
PLANES
));
object
->
ddraw_format
=
pixelformat_for_depth
(
GetDeviceCaps
(
hDC
,
BITSPIXEL
)
*
GetDeviceCaps
(
hDC
,
PLANES
));
ReleaseDC
(
0
,
hDC
);
ReleaseDC
(
0
,
hDC
);
/* Allocate one context for now */
object
->
contexts
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WineD3DContext
*
));
object
->
contexts
[
0
]
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
WineD3DContext
));
object
->
numContexts
=
1
;
object
->
activeContext
=
0
;
return
WINED3D_OK
;
return
WINED3D_OK
;
create_device_error:
create_device_error:
...
...
dlls/wined3d/wined3d_private.h
View file @
7253fae3
...
@@ -695,7 +695,7 @@ struct IWineD3DDeviceImpl
...
@@ -695,7 +695,7 @@ struct IWineD3DDeviceImpl
BOOL
useDrawStridedSlow
;
BOOL
useDrawStridedSlow
;
/* Context management */
/* Context management */
WineD3DContext
contexts
[
1
];
/* Dynamic array later
*/
WineD3DContext
**
contexts
;
/* Dynamic array containing pointers to context structures
*/
UINT
activeContext
;
/* Only 0 for now */
UINT
activeContext
;
/* Only 0 for now */
UINT
numContexts
;
/* Always 1 for now */
UINT
numContexts
;
/* Always 1 for now */
};
};
...
...
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