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
b299395f
Commit
b299395f
authored
Feb 27, 2007
by
H. Verbeet
Committed by
Alexandre Julliard
Feb 28, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix matching WINED3DDECLUSAGE_POSITION against WINED3DDECLUSAGE_POSITIONT.
parent
8b2a86a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
vertexshader.c
dlls/wined3d/vertexshader.c
+11
-2
No files found.
dlls/wined3d/vertexshader.c
View file @
b299395f
...
@@ -634,6 +634,15 @@ static void vshader_set_input(
...
@@ -634,6 +634,15 @@ static void vshader_set_input(
This
->
semantics_in
[
regnum
].
reg
=
reg_token
;
This
->
semantics_in
[
regnum
].
reg
=
reg_token
;
}
}
static
BOOL
match_usage
(
BYTE
usage1
,
BYTE
usage_idx1
,
BYTE
usage2
,
BYTE
usage_idx2
)
{
if
(
usage_idx1
!=
usage_idx2
)
return
FALSE
;
if
(
usage1
==
usage2
)
return
TRUE
;
if
(
usage1
==
WINED3DDECLUSAGE_POSITION
&&
usage2
==
WINED3DDECLUSAGE_POSITIONT
)
return
TRUE
;
if
(
usage2
==
WINED3DDECLUSAGE_POSITION
&&
usage1
==
WINED3DDECLUSAGE_POSITIONT
)
return
TRUE
;
return
FALSE
;
}
BOOL
vshader_get_input
(
BOOL
vshader_get_input
(
IWineD3DVertexShader
*
iface
,
IWineD3DVertexShader
*
iface
,
BYTE
usage_req
,
BYTE
usage_idx_req
,
BYTE
usage_req
,
BYTE
usage_idx_req
,
...
@@ -647,7 +656,7 @@ BOOL vshader_get_input(
...
@@ -647,7 +656,7 @@ BOOL vshader_get_input(
DWORD
usage
=
(
usage_token
&
WINED3DSP_DCL_USAGE_MASK
)
>>
WINED3DSP_DCL_USAGE_SHIFT
;
DWORD
usage
=
(
usage_token
&
WINED3DSP_DCL_USAGE_MASK
)
>>
WINED3DSP_DCL_USAGE_SHIFT
;
DWORD
usage_idx
=
(
usage_token
&
WINED3DSP_DCL_USAGEINDEX_MASK
)
>>
WINED3DSP_DCL_USAGEINDEX_SHIFT
;
DWORD
usage_idx
=
(
usage_token
&
WINED3DSP_DCL_USAGEINDEX_MASK
)
>>
WINED3DSP_DCL_USAGEINDEX_SHIFT
;
if
(
usage_token
&&
(
usage
==
usage_req
&&
usage_idx
==
usage_idx_req
))
{
if
(
usage_token
&&
match_usage
(
usage
,
usage_idx
,
usage_req
,
usage_idx_req
))
{
*
regnum
=
i
;
*
regnum
=
i
;
return
TRUE
;
return
TRUE
;
}
}
...
@@ -673,7 +682,7 @@ BOOL vshader_input_is_color(
...
@@ -673,7 +682,7 @@ BOOL vshader_input_is_color(
* if it has D3DCOLOR as it's type. This works for both d3d8 and d3d9. */
* if it has D3DCOLOR as it's type. This works for both d3d8 and d3d9. */
for
(
i
=
0
;
i
<
vertexDeclaration
->
declarationWNumElements
-
1
;
++
i
)
{
for
(
i
=
0
;
i
<
vertexDeclaration
->
declarationWNumElements
-
1
;
++
i
)
{
WINED3DVERTEXELEMENT
*
element
=
vertexDeclaration
->
pDeclarationWine
+
i
;
WINED3DVERTEXELEMENT
*
element
=
vertexDeclaration
->
pDeclarationWine
+
i
;
if
(
(
element
->
Usage
==
usage
&&
element
->
UsageIndex
==
usage_idx
))
{
if
(
match_usage
(
element
->
Usage
,
element
->
UsageIndex
,
usage
,
usage_idx
))
{
return
element
->
Type
==
WINED3DDECLTYPE_D3DCOLOR
;
return
element
->
Type
==
WINED3DDECLTYPE_D3DCOLOR
;
}
}
}
}
...
...
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