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
4aec7f0c
Commit
4aec7f0c
authored
Feb 26, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass the primitive type to wined3d_cs_emit_draw().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e8e4fac9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
14 deletions
+21
-14
cs.c
dlls/wined3d/cs.c
+10
-1
device.c
dlls/wined3d/device.c
+8
-11
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-2
No files found.
dlls/wined3d/cs.c
View file @
4aec7f0c
...
...
@@ -97,6 +97,7 @@ struct wined3d_cs_dispatch
struct
wined3d_cs_draw
{
enum
wined3d_cs_op
opcode
;
GLenum
primitive_type
;
int
base_vertex_idx
;
unsigned
int
start_idx
;
unsigned
int
index_count
;
...
...
@@ -592,6 +593,13 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
device_invalidate_state
(
cs
->
device
,
STATE_BASEVERTEXINDEX
);
}
if
(
cs
->
state
.
gl_primitive_type
!=
op
->
primitive_type
)
{
if
(
cs
->
state
.
gl_primitive_type
==
GL_POINTS
||
op
->
primitive_type
==
GL_POINTS
)
device_invalidate_state
(
cs
->
device
,
STATE_POINT_ENABLE
);
cs
->
state
.
gl_primitive_type
=
op
->
primitive_type
;
}
draw_primitive
(
cs
->
device
,
state
,
op
->
base_vertex_idx
,
op
->
start_idx
,
op
->
index_count
,
op
->
start_instance
,
op
->
instance_count
,
op
->
indexed
);
...
...
@@ -619,7 +627,7 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
state
->
unordered_access_view
[
WINED3D_PIPELINE_GRAPHICS
]);
}
void
wined3d_cs_emit_draw
(
struct
wined3d_cs
*
cs
,
int
base_vertex_idx
,
unsigned
int
start_idx
,
void
wined3d_cs_emit_draw
(
struct
wined3d_cs
*
cs
,
GLenum
primitive_type
,
int
base_vertex_idx
,
unsigned
int
start_idx
,
unsigned
int
index_count
,
unsigned
int
start_instance
,
unsigned
int
instance_count
,
BOOL
indexed
)
{
const
struct
wined3d_state
*
state
=
&
cs
->
device
->
state
;
...
...
@@ -628,6 +636,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
op
=
cs
->
ops
->
require_space
(
cs
,
sizeof
(
*
op
));
op
->
opcode
=
WINED3D_CS_OP_DRAW
;
op
->
primitive_type
=
primitive_type
;
op
->
base_vertex_idx
=
base_vertex_idx
;
op
->
start_idx
=
start_idx
;
op
->
index_count
=
index_count
;
...
...
dlls/wined3d/device.c
View file @
4aec7f0c
...
...
@@ -3444,15 +3444,9 @@ void CDECL wined3d_device_dispatch_compute(struct wined3d_device *device,
void
CDECL
wined3d_device_set_primitive_type
(
struct
wined3d_device
*
device
,
enum
wined3d_primitive_type
primitive_type
)
{
GLenum
gl_primitive_type
,
prev
;
TRACE
(
"device %p, primitive_type %s
\n
"
,
device
,
debug_d3dprimitivetype
(
primitive_type
));
gl_primitive_type
=
gl_primitive_type_from_d3d
(
primitive_type
);
prev
=
device
->
state
.
gl_primitive_type
;
device
->
state
.
gl_primitive_type
=
gl_primitive_type
;
if
(
gl_primitive_type
!=
prev
&&
(
gl_primitive_type
==
GL_POINTS
||
prev
==
GL_POINTS
))
device_invalidate_state
(
device
,
STATE_POINT_ENABLE
);
device
->
state
.
gl_primitive_type
=
gl_primitive_type_from_d3d
(
primitive_type
);
}
void
CDECL
wined3d_device_get_primitive_type
(
const
struct
wined3d_device
*
device
,
...
...
@@ -3469,7 +3463,8 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
{
TRACE
(
"device %p, start_vertex %u, vertex_count %u.
\n
"
,
device
,
start_vertex
,
vertex_count
);
wined3d_cs_emit_draw
(
device
->
cs
,
0
,
start_vertex
,
vertex_count
,
0
,
0
,
FALSE
);
wined3d_cs_emit_draw
(
device
->
cs
,
device
->
state
.
gl_primitive_type
,
0
,
start_vertex
,
vertex_count
,
0
,
0
,
FALSE
);
return
WINED3D_OK
;
}
...
...
@@ -3480,7 +3475,8 @@ void CDECL wined3d_device_draw_primitive_instanced(struct wined3d_device *device
TRACE
(
"device %p, start_vertex %u, vertex_count %u, start_instance %u, instance_count %u.
\n
"
,
device
,
start_vertex
,
vertex_count
,
start_instance
,
instance_count
);
wined3d_cs_emit_draw
(
device
->
cs
,
0
,
start_vertex
,
vertex_count
,
start_instance
,
instance_count
,
FALSE
);
wined3d_cs_emit_draw
(
device
->
cs
,
device
->
state
.
gl_primitive_type
,
0
,
start_vertex
,
vertex_count
,
start_instance
,
instance_count
,
FALSE
);
}
HRESULT
CDECL
wined3d_device_draw_indexed_primitive
(
struct
wined3d_device
*
device
,
UINT
start_idx
,
UINT
index_count
)
...
...
@@ -3497,7 +3493,8 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
return
WINED3DERR_INVALIDCALL
;
}
wined3d_cs_emit_draw
(
device
->
cs
,
device
->
state
.
base_vertex_index
,
start_idx
,
index_count
,
0
,
0
,
TRUE
);
wined3d_cs_emit_draw
(
device
->
cs
,
device
->
state
.
gl_primitive_type
,
device
->
state
.
base_vertex_index
,
start_idx
,
index_count
,
0
,
0
,
TRUE
);
return
WINED3D_OK
;
}
...
...
@@ -3508,7 +3505,7 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
TRACE
(
"device %p, start_idx %u, index_count %u, start_instance %u, instance_count %u.
\n
"
,
device
,
start_idx
,
index_count
,
start_instance
,
instance_count
);
wined3d_cs_emit_draw
(
device
->
cs
,
device
->
state
.
base_vertex_index
,
wined3d_cs_emit_draw
(
device
->
cs
,
device
->
state
.
gl_primitive_type
,
device
->
state
.
base_vertex_index
,
start_idx
,
index_count
,
start_instance
,
instance_count
,
TRUE
);
}
...
...
dlls/wined3d/wined3d_private.h
View file @
4aec7f0c
...
...
@@ -3197,8 +3197,9 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
DWORD
flags
,
const
struct
wined3d_color
*
color
,
float
depth
,
DWORD
stencil
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_dispatch
(
struct
wined3d_cs
*
cs
,
unsigned
int
group_count_x
,
unsigned
int
group_count_y
,
unsigned
int
group_count_z
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_draw
(
struct
wined3d_cs
*
cs
,
int
base_vertex_idx
,
unsigned
int
start_idx
,
unsigned
int
index_count
,
unsigned
int
start_instance
,
unsigned
int
instance_count
,
BOOL
indexed
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_draw
(
struct
wined3d_cs
*
cs
,
GLenum
primitive_type
,
int
base_vertex_idx
,
unsigned
int
start_idx
,
unsigned
int
index_count
,
unsigned
int
start_instance
,
unsigned
int
instance_count
,
BOOL
indexed
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_preload_resource
(
struct
wined3d_cs
*
cs
,
struct
wined3d_resource
*
resource
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_present
(
struct
wined3d_cs
*
cs
,
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
HWND
dst_window_override
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
...
...
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