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
c4eae160
Commit
c4eae160
authored
Jul 01, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jul 02, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: RENDERTARGET | AUTOGENMIPMAP are compatible.
The test used D3DPOOL_MANAGED which is mutually exclusive with RENDERTARGET usage, thus the call failed.
parent
b312d420
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
19 deletions
+7
-19
texture.c
dlls/d3d9/tests/texture.c
+6
-6
device.c
dlls/wined3d/device.c
+1
-13
No files found.
dlls/d3d9/tests/texture.c
View file @
c4eae160
...
@@ -136,9 +136,9 @@ static void test_cube_texture_mipmap_gen(IDirect3DDevice9 *device_ptr)
...
@@ -136,9 +136,9 @@ static void test_cube_texture_mipmap_gen(IDirect3DDevice9 *device_ptr)
/* testing shows that autogenmipmap and rendertarget are mutually exclusive options */
/* testing shows that autogenmipmap and rendertarget are mutually exclusive options */
hr
=
IDirect3DDevice9_CreateCubeTexture
(
device_ptr
,
64
,
0
,
(
D3DUSAGE_RENDERTARGET
|
hr
=
IDirect3DDevice9_CreateCubeTexture
(
device_ptr
,
64
,
0
,
(
D3DUSAGE_RENDERTARGET
|
D3DUSAGE_AUTOGENMIPMAP
),
D3DFMT_X8R8G8B8
,
D3DUSAGE_AUTOGENMIPMAP
),
D3DFMT_X8R8G8B8
,
D3DPOOL_
MANAGED
,
&
texture_ptr
,
0
);
D3DPOOL_
DEFAULT
,
&
texture_ptr
,
0
);
ok
(
hr
==
D3D
ERR_INVALIDCALL
,
"IDirect3DDevice9_CreateTexture returned 0x%08x, expected 0x%08x
\n
"
,
ok
(
hr
==
D3D
_OK
,
"IDirect3DDevice9_CreateTexture returned 0x%08x, expected 0x%08x
\n
"
,
hr
,
D3D
ERR_INVALIDCALL
);
hr
,
D3D
_OK
);
if
(
texture_ptr
)
IDirect3DCubeTexture9_Release
(
texture_ptr
);
if
(
texture_ptr
)
IDirect3DCubeTexture9_Release
(
texture_ptr
);
texture_ptr
=
NULL
;
texture_ptr
=
NULL
;
...
@@ -185,9 +185,9 @@ static void test_mipmap_gen(IDirect3DDevice9 *device)
...
@@ -185,9 +185,9 @@ static void test_mipmap_gen(IDirect3DDevice9 *device)
/* testing shows that autogenmipmap and rendertarget are mutually exclusive options */
/* testing shows that autogenmipmap and rendertarget are mutually exclusive options */
hr
=
IDirect3DDevice9_CreateTexture
(
device
,
64
,
64
,
0
,
(
D3DUSAGE_RENDERTARGET
|
hr
=
IDirect3DDevice9_CreateTexture
(
device
,
64
,
64
,
0
,
(
D3DUSAGE_RENDERTARGET
|
D3DUSAGE_AUTOGENMIPMAP
),
D3DFMT_X8R8G8B8
,
D3DUSAGE_AUTOGENMIPMAP
),
D3DFMT_X8R8G8B8
,
D3DPOOL_
MANAGED
,
&
texture
,
0
);
D3DPOOL_
DEFAULT
,
&
texture
,
0
);
ok
(
hr
==
D3D
ERR_INVALIDCALL
,
"IDirect3DDevice9_CreateTexture returned 0x%08x, expected 0x%08x
\n
"
,
ok
(
hr
==
D3D
_OK
,
"IDirect3DDevice9_CreateTexture returned 0x%08x, expected 0x%08x
\n
"
,
hr
,
D3D
ERR_INVALIDCALL
);
hr
,
D3D
_OK
);
if
(
texture
)
IDirect3DTexture9_Release
(
texture
);
if
(
texture
)
IDirect3DTexture9_Release
(
texture
);
texture
=
NULL
;
texture
=
NULL
;
...
...
dlls/wined3d/device.c
View file @
c4eae160
...
@@ -772,13 +772,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U
...
@@ -772,13 +772,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U
TRACE
(
"Format %#x (%s), Pool %#x, ppTexture %p, pSharedHandle %p, parent %p
\n
"
,
TRACE
(
"Format %#x (%s), Pool %#x, ppTexture %p, pSharedHandle %p, parent %p
\n
"
,
Format
,
debug_d3dformat
(
Format
),
Pool
,
ppTexture
,
pSharedHandle
,
parent
);
Format
,
debug_d3dformat
(
Format
),
Pool
,
ppTexture
,
pSharedHandle
,
parent
);
if
((
Usage
&
(
WINED3DUSAGE_AUTOGENMIPMAP
|
WINED3DUSAGE_RENDERTARGET
))
==
/* TODO: It should only be possible to create textures for formats
(
WINED3DUSAGE_AUTOGENMIPMAP
|
WINED3DUSAGE_RENDERTARGET
))
{
WARN
(
"Application requests both D3DUSAGE_AUTOGENMIPMAP and D3DUSAGE_RENDERTARGET, which are mutually exclusive
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
/* TODO: It should only be possible to create textures for formats
that are reported as supported */
that are reported as supported */
if
(
WINED3DFMT_UNKNOWN
>=
Format
)
{
if
(
WINED3DFMT_UNKNOWN
>=
Format
)
{
WARN
(
"(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN
\n
"
,
This
);
WARN
(
"(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN
\n
"
,
This
);
...
@@ -1060,12 +1054,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
...
@@ -1060,12 +1054,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
const
GlPixelFormatDesc
*
glDesc
;
const
GlPixelFormatDesc
*
glDesc
;
getFormatDescEntry
(
Format
,
&
GLINFO_LOCATION
,
&
glDesc
);
getFormatDescEntry
(
Format
,
&
GLINFO_LOCATION
,
&
glDesc
);
if
((
Usage
&
(
WINED3DUSAGE_AUTOGENMIPMAP
|
WINED3DUSAGE_RENDERTARGET
))
==
(
WINED3DUSAGE_AUTOGENMIPMAP
|
WINED3DUSAGE_RENDERTARGET
))
{
WARN
(
"Application requests both D3DUSAGE_AUTOGENMIPMAP and D3DUSAGE_RENDERTARGET, which are mutually exclusive
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
/* TODO: It should only be possible to create textures for formats
/* TODO: It should only be possible to create textures for formats
that are reported as supported */
that are reported as supported */
if
(
WINED3DFMT_UNKNOWN
>=
Format
)
{
if
(
WINED3DFMT_UNKNOWN
>=
Format
)
{
...
...
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