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
a8a201cf
Commit
a8a201cf
authored
May 01, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
May 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Figure out the index data pointer inside drawPrimitive().
We want to do this after context_apply_draw_state(), when resource locations are all setup.
parent
64e41dae
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
device.c
dlls/wined3d/device.c
+2
-7
drawprim.c
dlls/wined3d/drawprim.c
+14
-4
No files found.
dlls/wined3d/device.c
View file @
a8a201cf
...
...
@@ -4008,14 +4008,11 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
HRESULT
CDECL
wined3d_device_draw_indexed_primitive
(
struct
wined3d_device
*
device
,
UINT
start_idx
,
UINT
index_count
)
{
struct
wined3d_buffer
*
index_buffer
;
GLuint
vbo
;
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
TRACE
(
"device %p, start_idx %u, index_count %u.
\n
"
,
device
,
start_idx
,
index_count
);
index_buffer
=
device
->
stateBlock
->
state
.
index_buffer
;
if
(
!
index_buffer
)
if
(
!
device
->
stateBlock
->
state
.
index_buffer
)
{
/* D3D9 returns D3DERR_INVALIDCALL when DrawIndexedPrimitive is called
* without an index buffer set. (The first time at least...)
...
...
@@ -4036,7 +4033,6 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
device_invalidate_state
(
device
,
STATE_INDEXBUFFER
);
device
->
stateBlock
->
state
.
user_stream
=
FALSE
;
}
vbo
=
index_buffer
->
buffer_object
;
if
(
!
gl_info
->
supported
[
ARB_DRAW_ELEMENTS_BASE_VERTEX
]
&&
device
->
stateBlock
->
state
.
load_base_vertex_index
!=
device
->
stateBlock
->
state
.
base_vertex_index
)
...
...
@@ -4045,8 +4041,7 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
device_invalidate_state
(
device
,
STATE_BASEVERTEXINDEX
);
}
drawPrimitive
(
device
,
index_count
,
start_idx
,
TRUE
,
vbo
?
NULL
:
index_buffer
->
resource
.
allocatedMemory
);
drawPrimitive
(
device
,
index_count
,
start_idx
,
TRUE
,
NULL
);
return
WINED3D_OK
;
}
...
...
dlls/wined3d/drawprim.c
View file @
a8a201cf
...
...
@@ -669,14 +669,24 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId
BOOL
emulation
=
FALSE
;
const
struct
wined3d_stream_info
*
stream_info
=
&
device
->
strided_streams
;
struct
wined3d_stream_info
stridedlcl
;
UINT
idx_size
;
UINT
idx_size
=
0
;
if
(
!
indexed
)
idx_size
=
0
;
else
if
(
state
->
index_format
==
WINED3DFMT_R16_UINT
)
if
(
indexed
)
{
if
(
!
state
->
user_stream
)
{
struct
wined3d_buffer
*
index_buffer
=
state
->
index_buffer
;
if
(
!
index_buffer
->
buffer_object
)
idxData
=
index_buffer
->
resource
.
allocatedMemory
;
else
idxData
=
NULL
;
}
if
(
state
->
index_format
==
WINED3DFMT_R16_UINT
)
idx_size
=
2
;
else
idx_size
=
4
;
}
if
(
!
use_vs
(
state
))
{
...
...
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