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
3dfdfbfa
Commit
3dfdfbfa
authored
Jun 23, 2003
by
Lionel Ulmer
Committed by
Alexandre Julliard
Jun 23, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- some TRACEing fixes
- faster Blt to the framebuffer using texture engine
parent
2faead17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
11 deletions
+40
-11
mesa.c
dlls/ddraw/d3ddevice/mesa.c
+0
-0
dib.c
dlls/ddraw/dsurface/dib.c
+4
-4
mesa.c
dlls/ddraw/mesa.c
+36
-7
No files found.
dlls/ddraw/d3ddevice/mesa.c
View file @
3dfdfbfa
This diff is collapsed.
Click to expand it.
dlls/ddraw/dsurface/dib.c
View file @
3dfdfbfa
...
...
@@ -819,16 +819,16 @@ DIB_DirectDrawSurface_BltFast(LPDIRECTDRAWSURFACE7 iface, DWORD dstx,
if
(
TRACE_ON
(
ddraw
))
{
FIXM
E
(
"(%p)->(%ld,%ld,%p,%p,%08lx)
\n
"
,
TRAC
E
(
"(%p)->(%ld,%ld,%p,%p,%08lx)
\n
"
,
This
,
dstx
,
dsty
,
src
,
rsrc
,
trans
);
FIXM
E
(
"
\t
trans:"
);
TRAC
E
(
"
\t
trans:"
);
if
(
FIXME_ON
(
ddraw
))
DDRAW_dump_DDBLTFAST
(
trans
);
if
(
rsrc
)
FIXM
E
(
"
\t
srcrect: %ldx%ld-%ldx%ld
\n
"
,
rsrc
->
left
,
rsrc
->
top
,
rsrc
->
right
,
rsrc
->
bottom
);
TRAC
E
(
"
\t
srcrect: %ldx%ld-%ldx%ld
\n
"
,
rsrc
->
left
,
rsrc
->
top
,
rsrc
->
right
,
rsrc
->
bottom
);
else
FIXM
E
(
" srcrect: NULL
\n
"
);
TRAC
E
(
" srcrect: NULL
\n
"
);
}
/* First, check if the possible override function handles this case */
...
...
dlls/ddraw/mesa.c
View file @
3dfdfbfa
...
...
@@ -617,6 +617,8 @@ static IDirectDrawSurfaceImpl *current_surface;
static
GLuint
current_level
;
static
DWORD
current_tex_width
;
static
DWORD
current_tex_height
;
static
BOOLEAN
need_alignement_restore
;
static
int
current_storage_width
;
HRESULT
upload_surface_to_tex_memory_init
(
IDirectDrawSurfaceImpl
*
surf_ptr
,
GLuint
level
,
GLenum
*
current_internal_format
,
BOOLEAN
need_to_alloc
,
BOOLEAN
need_alpha_ck
,
DWORD
tex_width
,
DWORD
tex_height
)
...
...
@@ -627,6 +629,8 @@ HRESULT upload_surface_to_tex_memory_init(IDirectDrawSurfaceImpl *surf_ptr, GLui
GLenum
internal_format
=
GL_LUMINANCE
;
/* A bogus value to be sure to have a nice Mesa warning :-) */
BYTE
bpp
=
GET_BPP
(
surf_ptr
->
surface_desc
);
BOOL
sub_texture
=
TRUE
;
need_alignement_restore
=
FALSE
;
current_surface
=
surf_ptr
;
current_level
=
level
;
...
...
@@ -868,16 +872,16 @@ HRESULT upload_surface_to_tex_memory_init(IDirectDrawSurfaceImpl *surf_ptr, GLui
}
if
((
sub_texture
==
TRUE
)
&&
(
convert_type
==
NO_CONVERSION
))
{
glPixelStorei
(
GL_UNPACK_ROW_LENGTH
,
surf_ptr
->
surface_desc
.
u1
.
lPitch
/
bpp
)
;
current_storage_width
=
surf_ptr
->
surface_desc
.
u1
.
lPitch
/
bpp
;
}
else
{
if
(
surf_ptr
->
surface_desc
.
u1
.
lPitch
==
(
surf_ptr
->
surface_desc
.
dwWidth
*
bpp
))
{
glPixelStorei
(
GL_UNPACK_ROW_LENGTH
,
0
)
;
current_storage_width
=
0
;
}
else
{
glPixelStorei
(
GL_UNPACK_ROW_LENGTH
,
surf_ptr
->
surface_desc
.
u1
.
lPitch
/
bpp
);
}
current_storage_width
=
surf_ptr
->
surface_desc
.
u1
.
lPitch
/
bpp
;
}
}
glPixelStorei
(
GL_UNPACK_ROW_LENGTH
,
current_storage_width
);
return
DD_OK
;
}
...
...
@@ -1217,10 +1221,31 @@ HRESULT upload_surface_to_tex_memory(RECT *rect, DWORD xoffset, DWORD yoffset, v
}
if
(
convert_type
!=
NO_CONVERSION
)
{
int
storage_width
;
surf_buffer
=
*
temp_buffer
;
if
(
width
!=
current_tex_width
)
{
/* Overide the default PixelStore parameter if only using part of the actual texture */
glPixelStorei
(
GL_UNPACK_ROW_LENGTH
,
width
);
storage_width
=
width
;
/* This is needed when locking with a rectangle with 'odd' width */
if
(
need_alignement_restore
==
FALSE
)
{
glPixelStorei
(
GL_UNPACK_ALIGNMENT
,
1
);
need_alignement_restore
=
TRUE
;
}
}
else
{
if
(
current_surface
->
surface_desc
.
u1
.
lPitch
==
(
current_surface
->
surface_desc
.
dwWidth
*
bpp
))
{
storage_width
=
0
;
}
else
{
storage_width
=
current_surface
->
surface_desc
.
u1
.
lPitch
/
bpp
;
}
if
(
need_alignement_restore
==
TRUE
)
{
glPixelStorei
(
GL_UNPACK_ALIGNMENT
,
0
);
need_alignement_restore
=
FALSE
;
}
}
if
(
storage_width
!=
current_storage_width
)
{
glPixelStorei
(
GL_UNPACK_ROW_LENGTH
,
storage_width
);
current_storage_width
=
storage_width
;
}
}
...
...
@@ -1239,5 +1264,9 @@ HRESULT upload_surface_to_tex_memory_release(void)
{
current_surface
=
NULL
;
if
(
need_alignement_restore
==
TRUE
)
{
glPixelStorei
(
GL_UNPACK_ALIGNMENT
,
4
);
}
return
DD_OK
;
}
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