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
a8497a55
Commit
a8497a55
authored
Nov 03, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix the num blend values -> type match.
parent
123a3f44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
vertexdeclaration.c
dlls/d3d9/vertexdeclaration.c
+10
-2
device.c
dlls/wined3d/device.c
+10
-2
No files found.
dlls/d3d9/vertexdeclaration.c
View file @
a8497a55
...
...
@@ -106,8 +106,16 @@ HRESULT vdecl_convert_fvf(
if
(
has_blend
&&
(
num_blends
>
0
))
{
if
(((
fvf
&
D3DFVF_XYZB5
)
==
D3DFVF_XYZB2
)
&&
(
fvf
&
D3DFVF_LASTBETA_D3DCOLOR
))
elements
[
idx
].
Type
=
D3DDECLTYPE_D3DCOLOR
;
else
elements
[
idx
].
Type
=
D3DDECLTYPE_FLOAT1
+
num_blends
-
1
;
else
{
switch
(
num_blends
)
{
case
1
:
elements
[
idx
].
Type
=
D3DDECLTYPE_FLOAT1
;
break
;
case
2
:
elements
[
idx
].
Type
=
D3DDECLTYPE_FLOAT2
;
break
;
case
3
:
elements
[
idx
].
Type
=
D3DDECLTYPE_FLOAT3
;
break
;
case
4
:
elements
[
idx
].
Type
=
D3DDECLTYPE_FLOAT4
;
break
;
default:
ERR
(
"Unexpected amount of blend values: %u
\n
"
,
num_blends
);
}
}
elements
[
idx
].
Usage
=
D3DDECLUSAGE_BLENDWEIGHT
;
elements
[
idx
].
UsageIndex
=
0
;
idx
++
;
...
...
dlls/wined3d/device.c
View file @
a8497a55
...
...
@@ -1792,8 +1792,16 @@ static unsigned int ConvertFvfToDeclaration(IWineD3DDeviceImpl *This, /* For the
if
(
has_blend
&&
(
num_blends
>
0
))
{
if
(((
fvf
&
WINED3DFVF_XYZB5
)
==
WINED3DFVF_XYZB2
)
&&
(
fvf
&
WINED3DFVF_LASTBETA_D3DCOLOR
))
elements
[
idx
].
Type
=
WINED3DDECLTYPE_D3DCOLOR
;
else
elements
[
idx
].
Type
=
WINED3DDECLTYPE_FLOAT1
+
num_blends
-
1
;
else
{
switch
(
num_blends
)
{
case
1
:
elements
[
idx
].
Type
=
WINED3DDECLTYPE_FLOAT1
;
break
;
case
2
:
elements
[
idx
].
Type
=
WINED3DDECLTYPE_FLOAT2
;
break
;
case
3
:
elements
[
idx
].
Type
=
WINED3DDECLTYPE_FLOAT3
;
break
;
case
4
:
elements
[
idx
].
Type
=
WINED3DDECLTYPE_FLOAT4
;
break
;
default:
ERR
(
"Unexpected amount of blend values: %u
\n
"
,
num_blends
);
}
}
elements
[
idx
].
Usage
=
WINED3DDECLUSAGE_BLENDWEIGHT
;
elements
[
idx
].
UsageIndex
=
0
;
idx
++
;
...
...
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