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
4d6cfb63
Commit
4d6cfb63
authored
Aug 08, 2006
by
Jan Zerebecki
Committed by
Alexandre Julliard
Aug 08, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Registry setting for the amount of simulated texture memory.
Set VideoMemorySize under HKCU\Software\Wine\Direct3D to amount in MB as string.
parent
f1adb69c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
10 deletions
+26
-10
device.c
dlls/wined3d/device.c
+10
-10
wined3d_main.c
dlls/wined3d/wined3d_main.c
+14
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
No files found.
dlls/wined3d/device.c
View file @
4d6cfb63
...
...
@@ -70,9 +70,6 @@ inline static Display *get_display( HDC hdc )
return
display
;
}
/* Memory tracking and object counting */
static
unsigned
int
emulated_textureram
=
64
*
1024
*
1024
;
/* TODO: setup some flags in the regestry to enable, disable pbuffer support */
/* enable pbuffer support for offscreen textures */
BOOL
pbuffer_support
=
FALSE
;
...
...
@@ -2264,19 +2261,22 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetDirect3D(IWineD3DDevice *iface, IWin
static
UINT
WINAPI
IWineD3DDeviceImpl_GetAvailableTextureMem
(
IWineD3DDevice
*
iface
)
{
/** NOTE: There's a probably a hack-around for this one by putting as many pbuffers, VBO's (or whatever)
* Into the video ram as possible and seeing how many fit
* you can also get the correct initial value from via X and ATI's driver
* you can also get the correct initial value from nvidia and ATI's driver via X
* texture memory is video memory + AGP memory
*******************/
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
static
BOOL
showfixmes
=
TRUE
;
if
(
showfixmes
)
{
FIXME
(
"(%p) : stub, emulating %dMB for now, returning %dMB
\n
"
,
This
,
(
emulated_textureram
/
(
1024
*
1024
)),
((
emulated_textureram
-
wineD3DGlobalStatistics
->
glsurfaceram
)
/
(
1024
*
1024
)));
FIXME
(
"(%p) : stub, simulating %dMB for now, returning %dMB left
\n
"
,
This
,
(
wined3d_settings
.
emulated_textureram
/
(
1024
*
1024
)),
((
wined3d_settings
.
emulated_textureram
-
wineD3DGlobalStatistics
->
glsurfaceram
)
/
(
1024
*
1024
)));
showfixmes
=
FALSE
;
}
TRACE
(
"(%p) : emulating %dMB for now, returning %dMB
\n
"
,
This
,
(
emulated_textureram
/
(
1024
*
1024
)),
((
emulated_textureram
-
wineD3DGlobalStatistics
->
glsurfaceram
)
/
(
1024
*
1024
)));
/* videomemory is simulated videomemory + AGP memory left */
return
(
emulated_textureram
-
wineD3DGlobalStatistics
->
glsurfaceram
);
TRACE
(
"(%p) : simulating %dMB, returning %dMB left
\n
"
,
This
,
(
wined3d_settings
.
emulated_textureram
/
(
1024
*
1024
)),
((
wined3d_settings
.
emulated_textureram
-
wineD3DGlobalStatistics
->
glsurfaceram
)
/
(
1024
*
1024
)));
/* return simulated texture memory left */
return
(
wined3d_settings
.
emulated_textureram
-
wineD3DGlobalStatistics
->
glsurfaceram
);
}
...
...
dlls/wined3d/wined3d_main.c
View file @
4d6cfb63
...
...
@@ -100,6 +100,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
HKEY
hkey
=
0
;
HKEY
appkey
=
0
;
DWORD
len
;
wined3d_settings
.
emulated_textureram
=
64
*
1024
*
1024
;
DisableThreadLibraryCalls
(
hInstDLL
);
...
...
@@ -225,6 +226,19 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
wined3d_settings
.
rendertargetlock_mode
=
RTL_TEXTEX
;
}
}
if
(
!
get_config_key
(
hkey
,
appkey
,
"VideoMemorySize"
,
buffer
,
size
)
)
{
int
TmpVideoMemorySize
=
atoi
(
buffer
);
if
(
TmpVideoMemorySize
>
0
)
{
wined3d_settings
.
emulated_textureram
=
TmpVideoMemorySize
*
1024
*
1024
;
TRACE
(
"Use %iMB = %d byte for emulated_textureram
\n
"
,
TmpVideoMemorySize
,
wined3d_settings
.
emulated_textureram
);
}
else
ERR
(
"VideoMemorySize is %i but must be >0
\n
"
,
TmpVideoMemorySize
);
}
}
if
(
wined3d_settings
.
vs_mode
==
VS_HW
)
TRACE
(
"Allow HW vertex shaders
\n
"
);
...
...
dlls/wined3d/wined3d_private.h
View file @
4d6cfb63
...
...
@@ -159,6 +159,8 @@ typedef struct wined3d_settings_s {
/* nonpower 2 function */
int
nonpower2_mode
;
int
rendertargetlock_mode
;
/* Memory tracking and object counting */
unsigned
int
emulated_textureram
;
}
wined3d_settings_t
;
extern
wined3d_settings_t
wined3d_settings
;
...
...
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