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
0fc6381b
Commit
0fc6381b
authored
Mar 11, 2011
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Check the framebuffer setup in ValidateDevice.
parent
38c213ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
7 deletions
+22
-7
device.c
dlls/wined3d/device.c
+22
-7
No files found.
dlls/wined3d/device.c
View file @
0fc6381b
...
...
@@ -5222,43 +5222,58 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ValidateDevice(IWineD3DDevice *iface,
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DBaseTextureImpl
*
texture
;
DWORD
i
;
const
struct
wined3d_state
*
state
=
&
This
->
stateBlock
->
state
;
TRACE
(
"(%p) : %p
\n
"
,
This
,
pNumPasses
);
for
(
i
=
0
;
i
<
MAX_COMBINED_SAMPLERS
;
++
i
)
{
if
(
This
->
stateBlock
->
state
.
sampler_states
[
i
][
WINED3DSAMP_MINFILTER
]
==
WINED3DTEXF_NONE
)
if
(
state
->
sampler_states
[
i
][
WINED3DSAMP_MINFILTER
]
==
WINED3DTEXF_NONE
)
{
WARN
(
"Sampler state %u has minfilter D3DTEXF_NONE, returning D3DERR_UNSUPPORTEDTEXTUREFILTER
\n
"
,
i
);
return
WINED3DERR_UNSUPPORTEDTEXTUREFILTER
;
}
if
(
This
->
stateBlock
->
state
.
sampler_states
[
i
][
WINED3DSAMP_MAGFILTER
]
==
WINED3DTEXF_NONE
)
if
(
state
->
sampler_states
[
i
][
WINED3DSAMP_MAGFILTER
]
==
WINED3DTEXF_NONE
)
{
WARN
(
"Sampler state %u has magfilter D3DTEXF_NONE, returning D3DERR_UNSUPPORTEDTEXTUREFILTER
\n
"
,
i
);
return
WINED3DERR_UNSUPPORTEDTEXTUREFILTER
;
}
texture
=
This
->
stateBlock
->
state
.
textures
[
i
];
texture
=
state
->
textures
[
i
];
if
(
!
texture
||
texture
->
resource
.
format
->
flags
&
WINED3DFMT_FLAG_FILTERING
)
continue
;
if
(
This
->
stateBlock
->
state
.
sampler_states
[
i
][
WINED3DSAMP_MAGFILTER
]
!=
WINED3DTEXF_POINT
)
if
(
state
->
sampler_states
[
i
][
WINED3DSAMP_MAGFILTER
]
!=
WINED3DTEXF_POINT
)
{
WARN
(
"Non-filterable texture and mag filter enabled on samper %u, returning E_FAIL
\n
"
,
i
);
return
E_FAIL
;
}
if
(
This
->
stateBlock
->
state
.
sampler_states
[
i
][
WINED3DSAMP_MINFILTER
]
!=
WINED3DTEXF_POINT
)
if
(
state
->
sampler_states
[
i
][
WINED3DSAMP_MINFILTER
]
!=
WINED3DTEXF_POINT
)
{
WARN
(
"Non-filterable texture and min filter enabled on samper %u, returning E_FAIL
\n
"
,
i
);
return
E_FAIL
;
}
if
(
This
->
stateBlock
->
state
.
sampler_states
[
i
][
WINED3DSAMP_MIPFILTER
]
!=
WINED3DTEXF_NONE
&&
This
->
stateBlock
->
state
.
sampler_states
[
i
][
WINED3DSAMP_MIPFILTER
]
!=
WINED3DTEXF_POINT
)
if
(
state
->
sampler_states
[
i
][
WINED3DSAMP_MIPFILTER
]
!=
WINED3DTEXF_NONE
&&
state
->
sampler_states
[
i
][
WINED3DSAMP_MIPFILTER
]
!=
WINED3DTEXF_POINT
)
{
WARN
(
"Non-filterable texture and mip filter enabled on samper %u, returning E_FAIL
\n
"
,
i
);
return
E_FAIL
;
}
}
if
(
state
->
render_states
[
WINED3DRS_ZENABLE
]
||
state
->
render_states
[
WINED3DRS_ZWRITEENABLE
]
||
state
->
render_states
[
WINED3DRS_STENCILENABLE
])
{
IWineD3DSurfaceImpl
*
ds
=
This
->
depth_stencil
;
IWineD3DSurfaceImpl
*
target
=
This
->
render_targets
[
0
];
if
(
ds
&&
target
&&
(
ds
->
resource
.
width
<
target
->
resource
.
width
||
ds
->
resource
.
height
<
target
->
resource
.
height
))
{
WARN
(
"Depth stencil is smaller than the color buffer, returning D3DERR_CONFLICTINGRENDERSTATE
\n
"
);
return
WINED3DERR_CONFLICTINGRENDERSTATE
;
}
}
/* return a sensible default */
*
pNumPasses
=
1
;
...
...
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