Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2767543b
Commit
2767543b
authored
Jun 08, 2005
by
Felix Nawothnig
Committed by
Alexandre Julliard
Jun 08, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Output a FIXME when a surface with dimensions not being a power of
two is requested. - Fail gracefully when IWineD3DImpl_CreateDevice fails to create the front- or backbuffer.
parent
fe42f46c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
device.c
dlls/wined3d/device.c
+1
-2
directx.c
dlls/wined3d/directx.c
+9
-5
No files found.
dlls/wined3d/device.c
View file @
2767543b
...
@@ -412,9 +412,8 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid
...
@@ -412,9 +412,8 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid
while
(
pow2Width
<
Width
)
pow2Width
<<=
1
;
while
(
pow2Width
<
Width
)
pow2Width
<<=
1
;
while
(
pow2Height
<
Height
)
pow2Height
<<=
1
;
while
(
pow2Height
<
Height
)
pow2Height
<<=
1
;
/* TODO: support for non-power 2 textures */
if
(
pow2Width
>
Width
||
pow2Height
>
Height
){
if
(
pow2Width
>
Width
||
pow2Height
>
Height
){
/** TODO: add support for non power two compressed textures (OpenGL provices support for * non-power-two textures gratis) *
*/
FIXME
(
"non-power-two textures unsupported
\n
"
);
/* OpenGL provides support for these gratis
*/
return
D3DERR_NOTAVAILABLE
;
return
D3DERR_NOTAVAILABLE
;
}
}
...
...
dlls/wined3d/directx.c
View file @
2767543b
...
@@ -1496,6 +1496,7 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, D3DDEV
...
@@ -1496,6 +1496,7 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, D3DDEV
IWineD3DImpl
*
This
=
(
IWineD3DImpl
*
)
iface
;
IWineD3DImpl
*
This
=
(
IWineD3DImpl
*
)
iface
;
int
num
;
int
num
;
XVisualInfo
template
;
XVisualInfo
template
;
HRESULT
res
;
/* Validate the adapter number */
/* Validate the adapter number */
if
(
Adapter
>=
IWineD3D_GetAdapterCount
(
iface
))
{
if
(
Adapter
>=
IWineD3D_GetAdapterCount
(
iface
))
{
...
@@ -1659,7 +1660,7 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, D3DDEV
...
@@ -1659,7 +1660,7 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, D3DDEV
parms. Fix this by passing in a function to call which takes identical parms
parms. Fix this by passing in a function to call which takes identical parms
and handles the differences at the d3dx layer, and returns the IWineD3DSurface
and handles the differences at the d3dx layer, and returns the IWineD3DSurface
pointer rather than the created D3D8/9 one */
pointer rather than the created D3D8/9 one */
D3DCB_CreateRenderTarget
((
IUnknown
*
)
parent
,
if
((
res
=
D3DCB_CreateRenderTarget
((
IUnknown
*
)
parent
,
*
(
pPresentationParameters
->
BackBufferWidth
),
*
(
pPresentationParameters
->
BackBufferWidth
),
*
(
pPresentationParameters
->
BackBufferHeight
),
*
(
pPresentationParameters
->
BackBufferHeight
),
*
(
pPresentationParameters
->
BackBufferFormat
),
*
(
pPresentationParameters
->
BackBufferFormat
),
...
@@ -1667,9 +1668,8 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, D3DDEV
...
@@ -1667,9 +1668,8 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, D3DDEV
*
(
pPresentationParameters
->
MultiSampleQuality
),
*
(
pPresentationParameters
->
MultiSampleQuality
),
TRUE
,
TRUE
,
(
IWineD3DSurface
**
)
&
object
->
frontBuffer
,
(
IWineD3DSurface
**
)
&
object
->
frontBuffer
,
NULL
);
NULL
)
!=
D3D_OK
)
||
(
res
=
D3DCB_CreateRenderTarget
((
IUnknown
*
)
parent
,
D3DCB_CreateRenderTarget
((
IUnknown
*
)
parent
,
*
(
pPresentationParameters
->
BackBufferWidth
),
*
(
pPresentationParameters
->
BackBufferWidth
),
*
(
pPresentationParameters
->
BackBufferHeight
),
*
(
pPresentationParameters
->
BackBufferHeight
),
*
(
pPresentationParameters
->
BackBufferFormat
),
*
(
pPresentationParameters
->
BackBufferFormat
),
...
@@ -1677,7 +1677,11 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, D3DDEV
...
@@ -1677,7 +1677,11 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, D3DDEV
*
(
pPresentationParameters
->
MultiSampleQuality
),
*
(
pPresentationParameters
->
MultiSampleQuality
),
TRUE
,
TRUE
,
(
IWineD3DSurface
**
)
&
object
->
backBuffer
,
(
IWineD3DSurface
**
)
&
object
->
backBuffer
,
NULL
);
NULL
)
!=
D3D_OK
))
{
ERR
(
"D3DCB_CreateRenderTarget() failed
\n
"
);
return
res
;
}
/* TODO:
/* TODO:
if (*(pPresentationParameters->EnableAutoDepthStencil)) {
if (*(pPresentationParameters->EnableAutoDepthStencil)) {
...
...
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