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
7b049245
Commit
7b049245
authored
May 13, 2014
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Always provide P8 GL texture information.
parent
bfb5be0f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
22 deletions
+3
-22
surface.c
dlls/wined3d/surface.c
+2
-21
utils.c
dlls/wined3d/utils.c
+1
-1
No files found.
dlls/wined3d/surface.c
View file @
7b049245
...
...
@@ -1457,12 +1457,6 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
int
src_pitch
=
0
;
int
dst_pitch
=
0
;
if
(
format
->
id
==
WINED3DFMT_P8_UINT
)
{
gl_format
=
GL_ALPHA
;
gl_type
=
GL_UNSIGNED_BYTE
;
}
if
(
surface
->
flags
&
SFLAG_NONPOW2
)
{
unsigned
char
alignment
=
surface
->
resource
.
device
->
surface_alignment
;
...
...
@@ -3211,8 +3205,6 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
const
struct
wined3d_gl_info
*
gl_info
;
struct
wined3d_context
*
context
;
BYTE
*
mem
;
GLint
fmt
;
GLint
type
;
BYTE
*
row
,
*
top
,
*
bottom
;
int
i
;
BOOL
srcIsUpsideDown
;
...
...
@@ -3246,18 +3238,6 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
srcIsUpsideDown
=
FALSE
;
}
switch
(
surface
->
resource
.
format
->
id
)
{
case
WINED3DFMT_P8_UINT
:
fmt
=
GL_ALPHA
;
type
=
GL_UNSIGNED_BYTE
;
break
;
default:
fmt
=
surface
->
resource
.
format
->
glFormat
;
type
=
surface
->
resource
.
format
->
glType
;
}
if
(
data
.
buffer_object
)
{
GL_EXTCALL
(
glBindBufferARB
(
GL_PIXEL_PACK_BUFFER_ARB
,
data
.
buffer_object
));
...
...
@@ -3270,7 +3250,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
gl_info
->
gl_ops
.
gl
.
p_glReadPixels
(
0
,
0
,
surface
->
resource
.
width
,
surface
->
resource
.
height
,
fmt
,
type
,
data
.
addr
);
surface
->
resource
.
format
->
glFormat
,
surface
->
resource
.
format
->
glType
,
data
.
addr
);
checkGLcall
(
"glReadPixels"
);
/* Reset previous pixel store pack state */
...
...
dlls/wined3d/utils.c
View file @
7b049245
...
...
@@ -743,7 +743,7 @@ static const struct wined3d_format_texture_info format_texture_info[] =
{
WINED3DFMT_P8_UINT
,
GL_RGBA
,
GL_RGBA
,
0
,
GL_ALPHA
,
GL_UNSIGNED_BYTE
,
0
,
0
,
ARB_FRAGMENT_PROGRAM
,
NULL
},
0
,
NULL
},
/* Standard ARGB formats */
{
WINED3DFMT_B8G8R8_UNORM
,
GL_RGB8
,
GL_RGB8
,
0
,
GL_BGR
,
GL_UNSIGNED_BYTE
,
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