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
3046a2cb
Commit
3046a2cb
authored
Jan 03, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of some useless braces in draw_primitive().
parent
85d12b32
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
42 deletions
+37
-42
drawprim.c
dlls/wined3d/drawprim.c
+37
-42
No files found.
dlls/wined3d/drawprim.c
View file @
3046a2cb
...
...
@@ -580,9 +580,13 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
UINT
start_instance
,
UINT
instance_count
,
BOOL
indexed
,
const
void
*
idx_data
)
{
const
struct
wined3d_state
*
state
=
&
device
->
stateBlock
->
state
;
const
struct
wined3d_stream_info
*
stream_info
;
struct
wined3d_event_query
*
ib_query
=
NULL
;
struct
wined3d_stream_info
si_emulated
;
const
struct
wined3d_gl_info
*
gl_info
;
struct
wined3d_context
*
context
;
BOOL
emulation
=
FALSE
;
UINT
idx_size
=
0
;
unsigned
int
i
;
if
(
!
index_count
)
return
;
...
...
@@ -666,14 +670,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
FIXME
(
"Point sprite coordinate origin switching not supported.
\n
"
);
}
{
GLenum
glPrimType
=
state
->
gl_primitive_type
;
INT
base_vertex_index
=
state
->
base_vertex_index
;
BOOL
emulation
=
FALSE
;
const
struct
wined3d_stream_info
*
stream_info
=
&
device
->
strided_streams
;
struct
wined3d_stream_info
stridedlcl
;
UINT
idx_size
=
0
;
stream_info
=
&
device
->
strided_streams
;
if
(
device
->
instance_count
)
instance_count
=
device
->
instance_count
;
...
...
@@ -703,68 +700,66 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
&&
state
->
render_states
[
WINED3D_RS_LIGHTING
])
{
static
BOOL
warned
;
if
(
!
warned
)
{
FIXME
(
"Using software emulation because not all material properties could be tracked
\n
"
);
warned
=
TRUE
;
}
else
{
TRACE
(
"Using software emulation because not all material properties could be tracked
\n
"
);
}
if
(
!
warned
++
)
FIXME
(
"Using software emulation because not all material properties could be tracked.
\n
"
);
else
WARN
(
"Using software emulation because not all material properties could be tracked.
\n
"
);
emulation
=
TRUE
;
}
else
if
(
context
->
fog_coord
&&
state
->
render_states
[
WINED3D_RS_FOGENABLE
])
{
/* Either write a pipeline replacement shader or convert the specular alpha from unsigned byte
* to a float in the vertex buffer
*/
static
BOOL
warned
;
if
(
!
warned
)
{
FIXME
(
"Using software emulation because manual fog coordinates are provided
\n
"
);
warned
=
TRUE
;
}
else
{
TRACE
(
"Using software emulation because manual fog coordinates are provided
\n
"
);
}
/* Either write a pipeline replacement shader or convert the
* specular alpha from unsigned byte to a float in the vertex
* buffer. */
if
(
!
warned
++
)
FIXME
(
"Using software emulation because manual fog coordinates are provided.
\n
"
);
else
WARN
(
"Using software emulation because manual fog coordinates are provided.
\n
"
);
emulation
=
TRUE
;
}
if
(
emulation
)
{
stream_info
=
&
stridedlcl
;
memcpy
(
&
stridedlcl
,
&
device
->
strided_streams
,
sizeof
(
stridedlcl
));
remove_vbos
(
gl_info
,
state
,
&
stridedlcl
);
if
(
emulation
)
{
si_emulated
=
device
->
strided_streams
;
remove_vbos
(
gl_info
,
state
,
&
si_emulated
);
stream_info
=
&
si_emulated
;
}
}
if
(
device
->
useDrawStridedSlow
||
emulation
)
{
/* Immediate mode drawing
*/
/* Immediate mode drawing.
*/
if
(
use_vs
(
state
))
{
static
BOOL
warned
;
if
(
!
warned
)
{
FIXME
(
"Using immediate mode with vertex shaders for half float emulation
\n
"
);
warned
=
TRUE
;
}
else
{
TRACE
(
"Using immediate mode with vertex shaders for half float emulation
\n
"
);
}
if
(
!
warned
++
)
FIXME
(
"Using immediate mode with vertex shaders for half float emulation.
\n
"
)
;
else
WARN
(
"Using immediate mode with vertex shaders for half float emulation.
\n
"
);
drawStridedSlowVs
(
gl_info
,
state
,
stream_info
,
index_count
,
glPrimT
ype
,
idx_data
,
idx_size
,
start_idx
);
state
->
gl_primitive_t
ype
,
idx_data
,
idx_size
,
start_idx
);
}
else
{
drawStridedSlow
(
device
,
context
,
stream_info
,
index_count
,
glPrimT
ype
,
idx_data
,
idx_size
,
start_idx
);
state
->
gl_primitive_t
ype
,
idx_data
,
idx_size
,
start_idx
);
}
}
else
if
(
!
gl_info
->
supported
[
ARB_INSTANCED_ARRAYS
]
&&
instance_count
)
{
/* Instancing emulation with mixing immediate mode and arrays
*/
drawStridedInstanced
(
gl_info
,
state
,
stream_info
,
index_count
,
glPrimT
ype
,
idx_data
,
idx_size
,
start_idx
,
base_vertex_index
,
instance_count
);
/* Instancing emulation by mixing immediate mode and arrays.
*/
drawStridedInstanced
(
gl_info
,
state
,
stream_info
,
index_count
,
state
->
gl_primitive_t
ype
,
idx_data
,
idx_size
,
start_idx
,
state
->
base_vertex_index
,
instance_count
);
}
else
{
drawStridedFast
(
gl_info
,
glPrimType
,
index_count
,
idx_size
,
idx_data
,
start_idx
,
base_vertex_index
,
start_instance
,
instance_count
);
}
drawStridedFast
(
gl_info
,
state
->
gl_primitive_type
,
index_count
,
idx_size
,
idx_data
,
start_idx
,
state
->
base_vertex_index
,
start_instance
,
instance_count
);
}
if
(
ib_query
)
...
...
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