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
849149d5
Commit
849149d5
authored
Feb 13, 2015
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add support for appending vertex declaration elements.
parent
a11c8758
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
6 deletions
+19
-6
inputlayout.c
dlls/d3d10core/inputlayout.c
+0
-2
vertexdeclaration.c
dlls/wined3d/vertexdeclaration.c
+13
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-2
wined3d.h
include/wine/wined3d.h
+4
-2
No files found.
dlls/d3d10core/inputlayout.c
View file @
849149d5
...
...
@@ -83,8 +83,6 @@ static HRESULT d3d10_input_layout_to_wined3d_declaration(const D3D10_INPUT_ELEME
e
->
usage
=
0
;
e
->
usage_idx
=
0
;
if
(
f
->
AlignedByteOffset
==
D3D10_APPEND_ALIGNED_ELEMENT
)
FIXME
(
"D3D10_APPEND_ALIGNED_ELEMENT not supported
\n
"
);
if
(
f
->
InputSlotClass
!=
D3D10_INPUT_PER_VERTEX_DATA
)
FIXME
(
"Ignoring input slot class (%#x)
\n
"
,
f
->
InputSlotClass
);
if
(
f
->
InstanceDataStepRate
)
...
...
dlls/wined3d/vertexdeclaration.c
View file @
849149d5
...
...
@@ -216,6 +216,19 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara
return
E_FAIL
;
}
if
(
e
->
offset
==
WINED3D_APPEND_ALIGNED_ELEMENT
)
{
if
(
!
i
)
{
e
->
offset
=
0
;
}
else
{
struct
wined3d_vertex_declaration_element
*
prev
=
&
declaration
->
elements
[
i
-
1
];
e
->
offset
=
(
prev
->
offset
+
prev
->
format
->
byte_count
+
3
)
&
~
3
;
}
}
if
(
e
->
offset
&
0x3
)
{
WARN
(
"Declaration element %u is not 4 byte aligned(%u), returning E_FAIL.
\n
"
,
i
,
e
->
offset
);
...
...
dlls/wined3d/wined3d_private.h
View file @
849149d5
...
...
@@ -2422,8 +2422,8 @@ struct wined3d_vertex_declaration_element
{
const
struct
wined3d_format
*
format
;
BOOL
ffp_valid
;
WORD
input_slot
;
WORD
offset
;
unsigned
int
input_slot
;
unsigned
int
offset
;
UINT
output_slot
;
BYTE
method
;
BYTE
usage
;
...
...
include/wine/wined3d.h
View file @
849149d5
...
...
@@ -1494,6 +1494,8 @@ enum wined3d_display_rotation
#define WINED3D_SURFACE_DISCARD 0x00000002
#define WINED3D_SURFACE_PIN_SYSMEM 0x00000004
#define WINED3D_APPEND_ALIGNED_ELEMENT 0xffffffff
struct
wined3d_display_mode
{
UINT
width
;
...
...
@@ -1670,8 +1672,8 @@ struct wined3d_clip_status
struct
wined3d_vertex_element
{
enum
wined3d_format_id
format
;
WORD
input_slot
;
WORD
offset
;
unsigned
int
input_slot
;
unsigned
int
offset
;
UINT
output_slot
;
/* D3D 8 & 10 */
BYTE
method
;
BYTE
usage
;
...
...
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