Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
5261f031
Commit
5261f031
authored
22 years ago
by
Lionel Ulmer
Committed by
Alexandre Julliard
22 years ago
Browse files
Options
Downloads
Patches
Plain Diff
- only handle memory allocation for non-already loaded textures
- implement GetCaps for D3DDevice7
parent
d77294a8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/ddraw/d3ddevice/mesa.c
+15
-2
15 additions, 2 deletions
dlls/ddraw/d3ddevice/mesa.c
dlls/ddraw/d3dtexture.c
+9
-6
9 additions, 6 deletions
dlls/ddraw/d3dtexture.c
with
24 additions
and
8 deletions
dlls/ddraw/d3ddevice/mesa.c
+
15
−
2
View file @
5261f031
...
...
@@ -180,7 +180,7 @@ static void fill_opengl_caps(D3DDEVICEDESC *d1)
d1
->
dlcLightingCaps
.
dwNumLights
=
16
;
/* glGetIntegerv(GL_MAX_LIGHTS, &maxlight); d1->dlcLightingCaps.dwNumLights = maxlight; */
fill_opengl_primcaps
(
&
(
d1
->
dpcLineCaps
));
fill_opengl_primcaps
(
&
(
d1
->
dpcTriCaps
));
d1
->
dwDeviceRenderBitDepth
=
DDBD_16
|
DDBD_24
;
d1
->
dwDeviceRenderBitDepth
=
DDBD_16
|
DDBD_24
|
DDBD_32
;
d1
->
dwDeviceZBufferBitDepth
=
DDBD_16
;
d1
->
dwMaxBufferSize
=
0
;
d1
->
dwMaxVertexCount
=
65536
;
...
...
@@ -1188,6 +1188,19 @@ GL_IDirect3DDeviceImpl_3_SetTexture(LPDIRECT3DDEVICE3 iface,
return
DD_OK
;
}
HRESULT
WINAPI
GL_IDirect3DDeviceImpl_7_GetCaps
(
LPDIRECT3DDEVICE7
iface
,
LPD3DDEVICEDESC7
lpD3DHELDevDesc
)
{
ICOM_THIS_FROM
(
IDirect3DDeviceImpl
,
IDirect3DDevice7
,
iface
);
TRACE
(
"(%p/%p)->(%p)
\n
"
,
This
,
iface
,
lpD3DHELDevDesc
);
fill_opengl_caps_7
(
lpD3DHELDevDesc
);
TRACE
(
" returning caps : no dump function yet.
\n
"
);
return
DD_OK
;
}
#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
# define XCAST(fun) (typeof(VTABLE_IDirect3DDevice7.fun))
...
...
@@ -1201,7 +1214,7 @@ ICOM_VTABLE(IDirect3DDevice7) VTABLE_IDirect3DDevice7 =
XCAST
(
QueryInterface
)
Main_IDirect3DDeviceImpl_7_3T_2T_1T_QueryInterface
,
XCAST
(
AddRef
)
Main_IDirect3DDeviceImpl_7_3T_2T_1T_AddRef
,
XCAST
(
Release
)
GL_IDirect3DDeviceImpl_7_3T_2T_1T_Release
,
XCAST
(
GetCaps
)
Main
_IDirect3DDeviceImpl_7_GetCaps
,
XCAST
(
GetCaps
)
GL
_IDirect3DDeviceImpl_7_GetCaps
,
XCAST
(
EnumTextureFormats
)
GL_IDirect3DDeviceImpl_7_3T_EnumTextureFormats
,
XCAST
(
BeginScene
)
Main_IDirect3DDeviceImpl_7_3T_2T_1T_BeginScene
,
XCAST
(
EndScene
)
Main_IDirect3DDeviceImpl_7_3T_2T_1T_EndScene
,
...
...
This diff is collapsed.
Click to expand it.
dlls/ddraw/d3dtexture.c
+
9
−
6
View file @
5261f031
...
...
@@ -407,12 +407,15 @@ GL_IDirect3DTextureImpl_2_1T_Load(LPDIRECT3DTEXTURE2 iface,
TRACE
(
"(%p/%p)->(%p)
\n
"
,
This
,
iface
,
lpD3DTexture2
);
mem_used
=
This
->
surface
->
surface_desc
.
dwHeight
*
This
->
surface
->
surface_desc
.
dwHeight
*
This
->
surface
->
surface_desc
.
u4
.
ddpfPixelFormat
.
u1
.
dwRGBBitCount
;
if
(
This
->
surface
->
ddraw_owner
->
allocate_memory
(
This
->
surface
->
ddraw_owner
,
mem_used
)
<
0
)
{
TRACE
(
" out of virtual memory... Warning application.
\n
"
);
return
D3DERR_TEXTURE_LOAD_FAILED
;
if
(
This
->
loaded
==
FALSE
)
{
/* Only check memory for not already loaded texture... */
mem_used
=
This
->
surface
->
surface_desc
.
dwHeight
*
This
->
surface
->
surface_desc
.
dwHeight
*
This
->
surface
->
surface_desc
.
u4
.
ddpfPixelFormat
.
u1
.
dwRGBBitCount
;
if
(
This
->
surface
->
ddraw_owner
->
allocate_memory
(
This
->
surface
->
ddraw_owner
,
mem_used
)
<
0
)
{
TRACE
(
" out of virtual memory... Warning application.
\n
"
);
return
D3DERR_TEXTURE_LOAD_FAILED
;
}
}
This
->
loaded
=
TRUE
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment