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
cc447eac
Commit
cc447eac
authored
Jan 08, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move position_transformed out of u.s in struct WineDirect3DVertexStridedData.
parent
1a1f5ec6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
19 deletions
+19
-19
device.c
dlls/ddraw/device.c
+4
-4
drawprim.c
dlls/wined3d/drawprim.c
+6
-6
pixelshader.c
dlls/wined3d/pixelshader.c
+3
-2
state.c
dlls/wined3d/state.c
+3
-5
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
wined3d.idl
include/wine/wined3d.idl
+2
-1
No files found.
dlls/ddraw/device.c
View file @
cc447eac
...
...
@@ -4003,9 +4003,9 @@ IDirect3DDeviceImpl_7_DrawPrimitiveStrided(IDirect3DDevice7 *iface,
if
(
VertexType
&
D3DFVF_XYZRHW
)
{
WineD3DStrided
.
u
.
s
.
position
.
dwType
=
WINED3DDECLTYPE_FLOAT4
;
WineD3DStrided
.
u
.
s
.
position_transformed
=
TRUE
;
WineD3DStrided
.
position_transformed
=
TRUE
;
}
else
WineD3DStrided
.
u
.
s
.
position_transformed
=
FALSE
;
WineD3DStrided
.
position_transformed
=
FALSE
;
}
if
(
VertexType
&
D3DFVF_NORMAL
)
...
...
@@ -4181,9 +4181,9 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveStrided(IDirect3DDevice7 *iface,
if
(
VertexType
&
D3DFVF_XYZRHW
)
{
WineD3DStrided
.
u
.
s
.
position
.
dwType
=
WINED3DDECLTYPE_FLOAT4
;
WineD3DStrided
.
u
.
s
.
position_transformed
=
TRUE
;
WineD3DStrided
.
position_transformed
=
TRUE
;
}
else
WineD3DStrided
.
u
.
s
.
position_transformed
=
FALSE
;
WineD3DStrided
.
position_transformed
=
FALSE
;
}
if
(
VertexType
&
D3DFVF_NORMAL
)
...
...
dlls/wined3d/drawprim.c
View file @
cc447eac
...
...
@@ -152,7 +152,7 @@ void primitiveDeclarationConvertToStridedData(
const
DWORD
*
streams
=
vertexDeclaration
->
streams
;
/* Check for transformed vertices, disable vertex shader if present */
strided
->
u
.
s
.
position_transformed
=
vertexDeclaration
->
position_transformed
;
strided
->
position_transformed
=
vertexDeclaration
->
position_transformed
;
if
(
vertexDeclaration
->
position_transformed
)
{
useVertexShaderFunction
=
FALSE
;
}
...
...
@@ -861,8 +861,9 @@ void drawPrimitive(IWineD3DDevice *iface, int PrimitiveType, long NumPrimitives,
if
(
!
use_vs
(
This
->
stateBlock
))
{
if
(
!
This
->
strided_streams
.
u
.
s
.
position_transformed
&&
This
->
activeContext
->
num_untracked_materials
&&
This
->
stateBlock
->
renderState
[
WINED3DRS_LIGHTING
])
{
if
(
!
This
->
strided_streams
.
position_transformed
&&
This
->
activeContext
->
num_untracked_materials
&&
This
->
stateBlock
->
renderState
[
WINED3DRS_LIGHTING
])
{
static
BOOL
warned
;
if
(
!
warned
)
{
FIXME
(
"Using software emulation because not all material properties could be tracked
\n
"
);
...
...
@@ -1027,9 +1028,8 @@ HRESULT tesselate_rectpatch(IWineD3DDeviceImpl *This,
vtxStride
*
info
->
StartVertexOffsetWidth
;
/* Not entirely sure about what happens with transformed vertices */
if
(
strided
.
u
.
s
.
position_transformed
)
{
FIXME
(
"Transformed position in rectpatch generation
\n
"
);
}
if
(
strided
.
position_transformed
)
FIXME
(
"Transformed position in rectpatch generation
\n
"
);
if
(
vtxStride
%
sizeof
(
GLfloat
))
{
/* glMap2f reads vertex sizes in GLfloats, the d3d stride is in bytes.
* I don't see how the stride could not be a multiple of 4, but make sure
...
...
dlls/wined3d/pixelshader.c
View file @
cc447eac
...
...
@@ -477,7 +477,8 @@ void find_ps_compile_args(IWineD3DPixelShaderImpl *shader, IWineD3DStateBlockImp
}
if
(
shader
->
baseShader
.
reg_maps
.
shader_version
>=
WINED3DPS_VERSION
(
3
,
0
))
{
if
(((
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
)
->
strided_streams
.
u
.
s
.
position_transformed
)
{
if
(((
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
)
->
strided_streams
.
position_transformed
)
{
args
->
vp_mode
=
pretransformed
;
}
else
if
(
use_vs
(
stateblock
))
...
...
@@ -492,7 +493,7 @@ void find_ps_compile_args(IWineD3DPixelShaderImpl *shader, IWineD3DStateBlockImp
if
(
stateblock
->
renderState
[
WINED3DRS_FOGENABLE
])
{
switch
(
stateblock
->
renderState
[
WINED3DRS_FOGTABLEMODE
])
{
case
WINED3DFOG_NONE
:
if
(((
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
)
->
strided_streams
.
u
.
s
.
position_transformed
if
(((
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
)
->
strided_streams
.
position_transformed
||
use_vs
(
stateblock
))
{
args
->
fog
=
FOG_LINEAR
;
...
...
dlls/wined3d/state.c
View file @
cc447eac
...
...
@@ -95,7 +95,7 @@ static void state_lighting(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
transformed
=
((
stateblock
->
wineD3DDevice
->
strided_streams
.
u
.
s
.
position
.
lpData
!=
NULL
||
stateblock
->
wineD3DDevice
->
strided_streams
.
u
.
s
.
position
.
VBO
!=
0
)
&&
stateblock
->
wineD3DDevice
->
strided_streams
.
u
.
s
.
position_transformed
)
?
TRUE
:
FALSE
;
stateblock
->
wineD3DDevice
->
strided_streams
.
position_transformed
)
?
TRUE
:
FALSE
;
if
(
stateblock
->
renderState
[
WINED3DRS_LIGHTING
]
&&
!
transformed
)
{
glEnable
(
GL_LIGHTING
);
...
...
@@ -4321,9 +4321,7 @@ static void streamsrc(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo
useVertexShaderFunction
,
dataLocations
,
&
fixup
);
}
if
(
dataLocations
->
u
.
s
.
position_transformed
)
{
useVertexShaderFunction
=
FALSE
;
}
if
(
dataLocations
->
position_transformed
)
useVertexShaderFunction
=
FALSE
;
if
(
useVertexShaderFunction
)
{
if
(((
IWineD3DVertexDeclarationImpl
*
)
stateblock
->
vertexDecl
)
->
half_float_conv_needed
&&
!
fixup
)
{
...
...
@@ -4403,7 +4401,7 @@ static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, W
updateFog
=
TRUE
;
}
transformed
=
device
->
strided_streams
.
u
.
s
.
position_transformed
;
transformed
=
device
->
strided_streams
.
position_transformed
;
if
(
transformed
!=
context
->
last_was_rhw
&&
!
useVertexShaderFunction
)
{
updateFog
=
TRUE
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
cc447eac
...
...
@@ -2454,7 +2454,7 @@ const StaticPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt,
static
inline
BOOL
use_vs
(
IWineD3DStateBlockImpl
*
stateblock
)
{
return
(
stateblock
->
vertexShader
&&
!
stateblock
->
wineD3DDevice
->
strided_streams
.
u
.
s
.
position_transformed
&&
!
stateblock
->
wineD3DDevice
->
strided_streams
.
position_transformed
&&
stateblock
->
wineD3DDevice
->
vs_selected_mode
!=
SHADER_NONE
);
}
...
...
include/wine/wined3d.idl
View file @
cc447eac
...
...
@@ -1879,10 +1879,11 @@ typedef struct WineDirect3DVertexStridedData
WineDirect3DStridedData
sample
;
/*
Add
fields
here
*/
BOOL
position_transformed
;
}
s
;
WineDirect3DStridedData
input
[
16
]
; /* Indexed by constants in D3DVSDE_REGISTER */
}
u
;
BOOL
position_transformed
;
}
WineDirect3DVertexStridedData
;
typedef
struct
_WINED3DVSHADERCAPS2_0
...
...
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