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
bbfca486
Commit
bbfca486
authored
Sep 16, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Store the instance count in the context structure.
parent
59e0b841
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
11 deletions
+9
-11
drawprim.c
dlls/wined3d/drawprim.c
+2
-2
state.c
dlls/wined3d/state.c
+5
-7
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-2
No files found.
dlls/wined3d/drawprim.c
View file @
bbfca486
...
...
@@ -676,8 +676,8 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
}
stream_info
=
&
context
->
stream_info
;
if
(
device
->
instance_count
)
instance_count
=
device
->
instance_count
;
if
(
context
->
instance_count
)
instance_count
=
context
->
instance_count
;
if
(
indexed
)
{
...
...
dlls/wined3d/state.c
View file @
bbfca486
...
...
@@ -4060,13 +4060,12 @@ static void unload_numbered_arrays(struct wined3d_context *context)
static
void
load_numbered_arrays
(
struct
wined3d_context
*
context
,
const
struct
wined3d_stream_info
*
stream_info
,
const
struct
wined3d_state
*
state
)
{
struct
wined3d_device
*
device
=
context
->
swapchain
->
device
;
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
GLuint
curVBO
=
gl_info
->
supported
[
ARB_VERTEX_BUFFER_OBJECT
]
?
~
0U
:
0
;
int
i
;
/* Default to no instancing */
device
->
instance_count
=
0
;
context
->
instance_count
=
0
;
for
(
i
=
0
;
i
<
MAX_ATTRIBS
;
i
++
)
{
...
...
@@ -4085,8 +4084,8 @@ static void load_numbered_arrays(struct wined3d_context *context,
if
(
stream
->
flags
&
WINED3DSTREAMSOURCE_INSTANCEDATA
)
{
if
(
!
device
->
instance_count
)
device
->
instance_count
=
state
->
streams
[
0
].
frequency
?
state
->
streams
[
0
].
frequency
:
1
;
if
(
!
context
->
instance_count
)
context
->
instance_count
=
state
->
streams
[
0
].
frequency
?
state
->
streams
[
0
].
frequency
:
1
;
if
(
!
gl_info
->
supported
[
ARB_INSTANCED_ARRAYS
])
{
...
...
@@ -4232,10 +4231,9 @@ static void load_numbered_arrays(struct wined3d_context *context,
checkGLcall
(
"Loading numbered arrays"
);
}
static
void
load_vertex_data
(
const
struct
wined3d_context
*
context
,
static
void
load_vertex_data
(
struct
wined3d_context
*
context
,
const
struct
wined3d_stream_info
*
si
,
const
struct
wined3d_state
*
state
)
{
struct
wined3d_device
*
device
=
context
->
swapchain
->
device
;
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
GLuint
curVBO
=
gl_info
->
supported
[
ARB_VERTEX_BUFFER_OBJECT
]
?
~
0U
:
0
;
const
struct
wined3d_stream_info_element
*
e
;
...
...
@@ -4243,7 +4241,7 @@ static void load_vertex_data(const struct wined3d_context *context,
TRACE
(
"Using fast vertex array code
\n
"
);
/* This is fixed function pipeline only, and the fixed function pipeline doesn't do instancing */
device
->
instance_count
=
0
;
context
->
instance_count
=
0
;
/* Blend Data ---------------------------------------------- */
if
((
si
->
use_map
&
(
1
<<
WINED3D_FFP_BLENDWEIGHT
))
...
...
dlls/wined3d/wined3d_private.h
View file @
bbfca486
...
...
@@ -1098,6 +1098,8 @@ struct wined3d_context
DWORD
active_texture
;
DWORD
texture_type
[
MAX_COMBINED_SAMPLERS
];
UINT
instance_count
;
/* The actual opengl context */
UINT
level
;
HGLRC
restore_ctx
;
...
...
@@ -1885,8 +1887,6 @@ struct wined3d_device
APPLYSTATEFUNC
*
multistate_funcs
[
STATE_HIGHEST
+
1
];
const
struct
blit_shader
*
blitter
;
UINT
instance_count
;
BYTE
vertexBlendUsed
:
1
;
/* To avoid needless setting of the blend matrices */
BYTE
bCursorVisible
:
1
;
BYTE
d3d_initialized
:
1
;
...
...
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