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
63c1093f
Commit
63c1093f
authored
Nov 11, 2003
by
Raphael Junqueira
Committed by
Alexandre Julliard
Nov 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- stupid typos fixes on software vertex shader operands
- CopyRects fix (problem in error paths) based on Carlos Lozano patch
parent
b330df56
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
44 deletions
+41
-44
device.c
dlls/d3d8/device.c
+38
-41
shader.c
dlls/d3d8/shader.c
+3
-3
No files found.
dlls/d3d8/device.c
View file @
63c1093f
...
...
@@ -990,8 +990,8 @@ HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(LPDIRECT3DDEVICE8 iface,
dst
->
myDesc
.
Format
=
src
->
myDesc
.
Format
;
/* Convert container as well */
IDirect3DSurface8Impl_GetContainer
((
LPDIRECT3DSURFACE8
)
dst
,
&
IID_IDirect3DBaseTexture8
,
(
void
**
)
&
texture
);
/* FIXME: Which refid? */
if
(
texture
!=
NULL
)
{
rc
=
IDirect3DSurface8Impl_GetContainer
((
LPDIRECT3DSURFACE8
)
dst
,
&
IID_IDirect3DBaseTexture8
,
(
void
**
)
&
texture
);
/* FIXME: Which refid? */
if
(
SUCCEEDED
(
rc
)
&&
NULL
!=
texture
)
{
((
IDirect3DBaseTexture8Impl
*
)
texture
)
->
format
=
src
->
myDesc
.
Format
;
/** Releasing texture after GetContainer */
IDirect3DBaseTexture8_Release
(
texture
);
...
...
@@ -1000,38 +1000,39 @@ HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(LPDIRECT3DDEVICE8 iface,
}
/* Quick if complete copy ... */
if
(
rc
==
D3D_OK
&&
cRects
==
0
&&
pSourceRectsArray
==
NULL
&&
pDestPointsArray
==
NULL
)
{
if
(
src
->
myDesc
.
Width
==
dst
->
myDesc
.
Width
&&
src
->
myDesc
.
Height
==
dst
->
myDesc
.
Height
)
{
D3DLOCKED_RECT
lrSrc
;
D3DLOCKED_RECT
lrDst
;
IDirect3DSurface8Impl_LockRect
((
LPDIRECT3DSURFACE8
)
src
,
&
lrSrc
,
NULL
,
D3DLOCK_READONLY
);
IDirect3DSurface8Impl_LockRect
((
LPDIRECT3DSURFACE8
)
dst
,
&
lrDst
,
NULL
,
0L
);
TRACE
(
"Locked src and dst, Direct copy as surfaces are equal, w=%d, h=%d
\n
"
,
dst
->
myDesc
.
Width
,
dst
->
myDesc
.
Height
);
memcpy
(
lrDst
.
pBits
,
lrSrc
.
pBits
,
src
->
myDesc
.
Size
);
IDirect3DSurface8Impl_UnlockRect
((
LPDIRECT3DSURFACE8
)
src
);
rc
=
IDirect3DSurface8Impl_UnlockRect
((
LPDIRECT3DSURFACE8
)
dst
);
TRACE
(
"Unlocked src and dst
\n
"
);
if
(
SUCCEEDED
(
rc
))
{
if
(
cRects
==
0
&&
pSourceRectsArray
==
NULL
&&
pDestPointsArray
==
NULL
)
{
if
(
src
->
myDesc
.
Width
==
dst
->
myDesc
.
Width
&&
src
->
myDesc
.
Height
==
dst
->
myDesc
.
Height
)
{
D3DLOCKED_RECT
lrSrc
;
D3DLOCKED_RECT
lrDst
;
IDirect3DSurface8Impl_LockRect
((
LPDIRECT3DSURFACE8
)
src
,
&
lrSrc
,
NULL
,
D3DLOCK_READONLY
);
IDirect3DSurface8Impl_LockRect
((
LPDIRECT3DSURFACE8
)
dst
,
&
lrDst
,
NULL
,
0L
);
TRACE
(
"Locked src and dst, Direct copy as surfaces are equal, w=%d, h=%d
\n
"
,
dst
->
myDesc
.
Width
,
dst
->
myDesc
.
Height
);
memcpy
(
lrDst
.
pBits
,
lrSrc
.
pBits
,
src
->
myDesc
.
Size
);
IDirect3DSurface8Impl_UnlockRect
((
LPDIRECT3DSURFACE8
)
src
);
rc
=
IDirect3DSurface8Impl_UnlockRect
((
LPDIRECT3DSURFACE8
)
dst
);
TRACE
(
"Unlocked src and dst
\n
"
);
}
else
{
FIXME
(
"Wanted to copy all surfaces but size not compatible
\n
"
);
rc
=
D3DERR_INVALIDCALL
;
}
}
else
{
if
(
NULL
!=
pSourceRectsArray
&&
NULL
!=
pDestPointsArray
)
{
FIXME
(
"Wanted to copy all surfaces but size not compatible
\n
"
);
rc
=
D3DERR_INVALIDCALL
;
}
}
else
{
if
(
NULL
!=
pSourceRectsArray
&&
NULL
!=
pDestPointsArray
)
{
int
bytesPerPixel
=
((
IDirect3DSurface8Impl
*
)
pSourceSurface
)
->
bytesPerPixel
;
int
i
;
int
bytesPerPixel
=
((
IDirect3DSurface8Impl
*
)
pSourceSurface
)
->
bytesPerPixel
;
int
i
;
/* Copy rect by rect */
for
(
i
=
0
;
i
<
cRects
;
i
++
)
{
/* Copy rect by rect */
for
(
i
=
0
;
i
<
cRects
;
i
++
)
{
CONST
RECT
*
r
=
&
pSourceRectsArray
[
i
];
CONST
POINT
*
p
=
&
pDestPointsArray
[
i
];
int
copyperline
;
...
...
@@ -1040,10 +1041,9 @@ HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(LPDIRECT3DDEVICE8 iface,
D3DLOCKED_RECT
lrDst
;
RECT
dest_rect
;
TRACE
(
"Copying rect %d (%ld,%ld),(%ld,%ld) -> (%ld,%ld)
\n
"
,
i
,
r
->
left
,
r
->
top
,
r
->
right
,
r
->
bottom
,
p
->
x
,
p
->
y
);
if
(
src
->
myDesc
.
Format
==
D3DFMT_DXT1
)
{
copyperline
=
((
r
->
right
-
r
->
left
)
*
bytesPerPixel
)
/
2
;
/* DXT1 is half byte per pixel */
copyperline
=
((
r
->
right
-
r
->
left
)
*
bytesPerPixel
)
/
2
;
/* DXT1 is half byte per pixel */
}
else
{
copyperline
=
((
r
->
right
-
r
->
left
)
*
bytesPerPixel
);
}
...
...
@@ -1057,19 +1057,16 @@ HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(LPDIRECT3DDEVICE8 iface,
/* Find where to start */
for
(
j
=
0
;
j
<
(
r
->
bottom
-
r
->
top
-
1
);
j
++
)
{
memcpy
((
char
*
)
lrDst
.
pBits
+
(
j
*
lrDst
.
Pitch
),
(
char
*
)
lrSrc
.
pBits
+
(
j
*
lrSrc
.
Pitch
),
copyperline
);
memcpy
((
char
*
)
lrDst
.
pBits
+
(
j
*
lrDst
.
Pitch
),
(
char
*
)
lrSrc
.
pBits
+
(
j
*
lrSrc
.
Pitch
),
copyperline
);
}
IDirect3DSurface8Impl_UnlockRect
((
LPDIRECT3DSURFACE8
)
src
);
rc
=
IDirect3DSurface8Impl_UnlockRect
((
LPDIRECT3DSURFACE8
)
dst
);
TRACE
(
"Unlocked src and dst
\n
"
);
}
}
else
{
FIXME
(
"Wanted to copy partial surfaces not implemented
\n
"
);
rc
=
D3DERR_INVALIDCALL
;
}
}
else
{
FIXME
(
"Wanted to copy partial surfaces not implemented
\n
"
);
rc
=
D3DERR_INVALIDCALL
;
}
}
}
...
...
dlls/d3d8/shader.c
View file @
63c1093f
...
...
@@ -306,7 +306,7 @@ void vshader_m4x3(D3DSHADERVECTOR* d, D3DSHADERVECTOR* s0, D3DMATRIX43 mat) {
void
vshader_m3x4
(
D3DSHADERVECTOR
*
d
,
D3DSHADERVECTOR
*
s0
,
D3DMATRIX34
mat
)
{
d
->
x
=
mat
[
0
][
0
]
*
s0
->
x
+
mat
[
0
][
1
]
*
s0
->
y
+
mat
[
0
][
2
]
*
s0
->
z
;
d
->
y
=
mat
[
2
][
0
]
*
s0
->
x
+
mat
[
1
][
1
]
*
s0
->
y
+
mat
[
1
][
2
]
*
s0
->
z
;
d
->
y
=
mat
[
1
][
0
]
*
s0
->
x
+
mat
[
1
][
1
]
*
s0
->
y
+
mat
[
1
][
2
]
*
s0
->
z
;
d
->
z
=
mat
[
2
][
0
]
*
s0
->
x
+
mat
[
2
][
1
]
*
s0
->
y
+
mat
[
2
][
2
]
*
s0
->
z
;
d
->
w
=
mat
[
3
][
0
]
*
s0
->
x
+
mat
[
3
][
1
]
*
s0
->
y
+
mat
[
3
][
2
]
*
s0
->
z
;
VSTRACE
((
"executing m3x4(1): mat=(%f, %f, %f) s0=(%f) d=(%f)
\n
"
,
mat
[
0
][
0
],
mat
[
0
][
1
],
mat
[
0
][
2
],
s0
->
x
,
d
->
x
));
...
...
@@ -316,8 +316,8 @@ void vshader_m3x4(D3DSHADERVECTOR* d, D3DSHADERVECTOR* s0, D3DMATRIX34 mat) {
}
void
vshader_m3x3
(
D3DSHADERVECTOR
*
d
,
D3DSHADERVECTOR
*
s0
,
D3DMATRIX33
mat
)
{
d
->
x
=
mat
[
0
][
0
]
*
s0
->
x
+
mat
[
0
][
1
]
*
s0
->
y
+
mat
[
2
][
2
]
*
s0
->
z
;
d
->
y
=
mat
[
1
][
0
]
*
s0
->
x
+
mat
[
1
][
1
]
*
s0
->
y
+
mat
[
2
][
2
]
*
s0
->
z
;
d
->
x
=
mat
[
0
][
0
]
*
s0
->
x
+
mat
[
0
][
1
]
*
s0
->
y
+
mat
[
0
][
2
]
*
s0
->
z
;
d
->
y
=
mat
[
1
][
0
]
*
s0
->
x
+
mat
[
1
][
1
]
*
s0
->
y
+
mat
[
1
][
2
]
*
s0
->
z
;
d
->
z
=
mat
[
2
][
0
]
*
s0
->
x
+
mat
[
2
][
1
]
*
s0
->
y
+
mat
[
2
][
2
]
*
s0
->
z
;
d
->
w
=
1
.
0
f
;
VSTRACE
((
"executing m3x3(1): mat=(%f, %f, %f) s0=(%f) d=(%f)
\n
"
,
mat
[
0
][
0
],
mat
[
0
][
1
],
mat
[
0
][
2
],
s0
->
x
,
d
->
x
));
...
...
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