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
f4df53c4
Commit
f4df53c4
authored
Sep 21, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move the primitive type to wined3d_state.
parent
32089dc6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
12 deletions
+10
-12
device.c
dlls/wined3d/device.c
+5
-5
drawprim.c
dlls/wined3d/drawprim.c
+2
-2
stateblock.c
dlls/wined3d/stateblock.c
+2
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-3
No files found.
dlls/wined3d/device.c
View file @
f4df53c4
...
...
@@ -4655,7 +4655,7 @@ static void WINAPI IWineD3DDeviceImpl_SetPrimitiveType(IWineD3DDevice *iface,
TRACE
(
"iface %p, primitive_type %s
\n
"
,
iface
,
debug_d3dprimitivetype
(
primitive_type
));
This
->
updateStateBlock
->
changed
.
primitive_type
=
TRUE
;
This
->
updateStateBlock
->
gl_primitive_type
=
gl_primitive_type_from_d3d
(
primitive_type
);
This
->
updateStateBlock
->
state
.
gl_primitive_type
=
gl_primitive_type_from_d3d
(
primitive_type
);
}
static
void
WINAPI
IWineD3DDeviceImpl_GetPrimitiveType
(
IWineD3DDevice
*
iface
,
...
...
@@ -4665,7 +4665,7 @@ static void WINAPI IWineD3DDeviceImpl_GetPrimitiveType(IWineD3DDevice *iface,
TRACE
(
"iface %p, primitive_type %p
\n
"
,
iface
,
primitive_type
);
*
primitive_type
=
d3d_primitive_type_from_gl
(
This
->
stateBlock
->
gl_primitive_type
);
*
primitive_type
=
d3d_primitive_type_from_gl
(
This
->
stateBlock
->
state
.
gl_primitive_type
);
TRACE
(
"Returning %s
\n
"
,
debug_d3dprimitivetype
(
*
primitive_type
));
}
...
...
@@ -5513,10 +5513,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawRectPatch(IWineD3DDevice *iface, UI
}
This
->
currentPatch
=
patch
;
old_primitive_type
=
This
->
stateBlock
->
gl_primitive_type
;
This
->
stateBlock
->
gl_primitive_type
=
GL_TRIANGLES
;
old_primitive_type
=
This
->
stateBlock
->
state
.
gl_primitive_type
;
This
->
stateBlock
->
state
.
gl_primitive_type
=
GL_TRIANGLES
;
IWineD3DDevice_DrawPrimitiveStrided
(
iface
,
patch
->
numSegs
[
0
]
*
patch
->
numSegs
[
1
]
*
2
*
3
,
&
patch
->
strided
);
This
->
stateBlock
->
gl_primitive_type
=
old_primitive_type
;
This
->
stateBlock
->
state
.
gl_primitive_type
=
old_primitive_type
;
This
->
currentPatch
=
NULL
;
/* Destroy uncached patches */
...
...
dlls/wined3d/drawprim.c
View file @
f4df53c4
...
...
@@ -651,7 +651,7 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT
||
(
!
glPointParameteri
&&
!
context
->
gl_info
->
supported
[
NV_POINT_SPRITE
]))
&&
context
->
render_offscreen
&&
This
->
stateBlock
->
state
.
render_states
[
WINED3DRS_POINTSPRITEENABLE
]
&&
This
->
stateBlock
->
gl_primitive_type
==
GL_POINTS
)
&&
This
->
stateBlock
->
state
.
gl_primitive_type
==
GL_POINTS
)
{
FIXME
(
"Point sprite coordinate origin switching not supported.
\n
"
);
}
...
...
@@ -659,7 +659,7 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT
/* Ok, we will be updating the screen from here onwards so grab the lock */
ENTER_GL
();
{
GLenum
glPrimType
=
This
->
stateBlock
->
gl_primitive_type
;
GLenum
glPrimType
=
This
->
stateBlock
->
state
.
gl_primitive_type
;
BOOL
emulation
=
FALSE
;
const
struct
wined3d_stream_info
*
stream_info
=
&
This
->
strided_streams
;
struct
wined3d_stream_info
stridedlcl
;
...
...
dlls/wined3d/stateblock.c
View file @
f4df53c4
...
...
@@ -718,7 +718,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
This
->
state
.
transforms
[
transform
]
=
targetStateBlock
->
state
.
transforms
[
transform
];
}
if
(
This
->
changed
.
primitive_type
)
This
->
gl_primitive_type
=
targetStateBlock
->
gl_primitive_type
;
if
(
This
->
changed
.
primitive_type
)
This
->
state
.
gl_primitive_type
=
targetStateBlock
->
state
.
gl_primitive_type
;
if
(
This
->
changed
.
indices
&&
((
This
->
state
.
index_buffer
!=
targetStateBlock
->
state
.
index_buffer
)
...
...
@@ -995,7 +995,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
if
(
This
->
changed
.
primitive_type
)
{
This
->
device
->
updateStateBlock
->
changed
.
primitive_type
=
TRUE
;
This
->
device
->
updateStateBlock
->
gl_primitive_type
=
This
->
gl_primitive_type
;
This
->
device
->
updateStateBlock
->
state
.
gl_primitive_type
=
This
->
state
.
gl_primitive_type
;
}
if
(
This
->
changed
.
indices
)
...
...
dlls/wined3d/wined3d_private.h
View file @
f4df53c4
...
...
@@ -2356,6 +2356,7 @@ struct wined3d_state
enum
wined3d_format_id
index_format
;
INT
base_vertex_index
;
INT
load_base_vertex_index
;
/* Non-indexed drawing needs 0 here, indexed needs base_vertex_index. */
GLenum
gl_primitive_type
;
struct
IWineD3DVertexShaderImpl
*
vertex_shader
;
BOOL
vs_consts_b
[
MAX_CONST_B
];
...
...
@@ -2394,9 +2395,6 @@ struct IWineD3DStateBlockImpl
SAVEDSTATES
changed
;
struct
wined3d_state
state
;
/* primitive type */
GLenum
gl_primitive_type
;
/* Light hashmap . Collisions are handled using standard wine double linked lists */
#define LIGHTMAP_SIZE 43
/* Use of a prime number recommended. Set to 1 for a linked list! */
#define LIGHTMAP_HASHFUNC(x) ((x) % LIGHTMAP_SIZE)
/* Primitive and simple function */
...
...
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