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
a488e574
Commit
a488e574
authored
Aug 15, 2012
by
Matteo Bruni
Committed by
Alexandre Julliard
Aug 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Improve post-pixelshader blending test.
parent
902049c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
utils.c
dlls/wined3d/utils.c
+12
-12
No files found.
dlls/wined3d/utils.c
View file @
a488e574
...
@@ -1067,10 +1067,11 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
...
@@ -1067,10 +1067,11 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
if
(
status
==
GL_FRAMEBUFFER_COMPLETE
&&
((
format
->
flags
&
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
)
if
(
status
==
GL_FRAMEBUFFER_COMPLETE
&&
((
format
->
flags
&
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
)
||
!
(
gl_info
->
quirks
&
WINED3D_QUIRK_LIMITED_TEX_FILTERING
))
||
!
(
gl_info
->
quirks
&
WINED3D_QUIRK_LIMITED_TEX_FILTERING
))
&&
format
->
id
!=
WINED3DFMT_NULL
&&
format
->
id
!=
WINED3DFMT_P8_UINT
&&
format
->
id
!=
WINED3DFMT_NULL
&&
format
->
id
!=
WINED3DFMT_P8_UINT
&&
format
->
glFormat
!=
GL_LUMINANCE
&&
format
->
glFormat
!=
GL_LUMINANCE_ALPHA
)
&&
format
->
glFormat
!=
GL_LUMINANCE
&&
format
->
glFormat
!=
GL_LUMINANCE_ALPHA
&&
(
format
->
red_size
||
format
->
alpha_size
))
{
{
GLuint
rb
,
tex2
;
GLuint
rb
,
tex2
;
DWORD
readback
[
16
*
16
],
color
;
DWORD
readback
[
16
*
16
],
color
,
r_range
,
a_range
;
BYTE
r
,
a
;
BYTE
r
,
a
;
BOOL
match
=
TRUE
;
BOOL
match
=
TRUE
;
...
@@ -1096,6 +1097,7 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
...
@@ -1096,6 +1097,7 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
}
}
else
else
{
{
gl_info
->
gl_ops
.
gl
.
p_glDisable
(
GL_BLEND
);
gl_info
->
gl_ops
.
gl
.
p_glViewport
(
0
,
0
,
16
,
16
);
gl_info
->
gl_ops
.
gl
.
p_glViewport
(
0
,
0
,
16
,
16
);
gl_info
->
gl_ops
.
gl
.
p_glDisable
(
GL_LIGHTING
);
gl_info
->
gl_ops
.
gl
.
p_glDisable
(
GL_LIGHTING
);
gl_info
->
gl_ops
.
gl
.
p_glMatrixMode
(
GL_MODELVIEW
);
gl_info
->
gl_ops
.
gl
.
p_glMatrixMode
(
GL_MODELVIEW
);
...
@@ -1107,28 +1109,24 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
...
@@ -1107,28 +1109,24 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
/* Draw a full-black quad */
/* Draw a full-black quad */
gl_info
->
gl_ops
.
gl
.
p_glBegin
(
GL_TRIANGLE_STRIP
);
gl_info
->
gl_ops
.
gl
.
p_glBegin
(
GL_TRIANGLE_STRIP
);
gl_info
->
gl_ops
.
gl
.
p_glColor4
ub
(
0x00
,
0x00
,
0x00
,
0xf
f
);
gl_info
->
gl_ops
.
gl
.
p_glColor4
f
(
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glVertex3f
(
-
1
.
0
f
,
-
1
.
0
f
,
0
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glVertex3f
(
-
1
.
0
f
,
-
1
.
0
f
,
0
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glColor4ub
(
0x00
,
0x00
,
0x00
,
0xff
);
gl_info
->
gl_ops
.
gl
.
p_glVertex3f
(
1
.
0
f
,
-
1
.
0
f
,
0
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glVertex3f
(
1
.
0
f
,
-
1
.
0
f
,
0
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glColor4ub
(
0x00
,
0x00
,
0x00
,
0xff
);
gl_info
->
gl_ops
.
gl
.
p_glVertex3f
(
-
1
.
0
f
,
1
.
0
f
,
0
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glVertex3f
(
-
1
.
0
f
,
1
.
0
f
,
0
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glColor4ub
(
0x00
,
0x00
,
0x00
,
0xff
);
gl_info
->
gl_ops
.
gl
.
p_glVertex3f
(
1
.
0
f
,
1
.
0
f
,
0
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glVertex3f
(
1
.
0
f
,
1
.
0
f
,
0
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glEnd
();
gl_info
->
gl_ops
.
gl
.
p_glEnd
();
gl_info
->
gl_ops
.
gl
.
p_glEnable
(
GL_BLEND
);
/* Draw a half-transparent red quad */
/* Draw a half-transparent red quad */
gl_info
->
gl_ops
.
gl
.
p_glBegin
(
GL_TRIANGLE_STRIP
);
gl_info
->
gl_ops
.
gl
.
p_glBegin
(
GL_TRIANGLE_STRIP
);
gl_info
->
gl_ops
.
gl
.
p_glColor4
ub
(
0xff
,
0x00
,
0x00
,
0x80
);
gl_info
->
gl_ops
.
gl
.
p_glColor4
f
(
1
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
5
f
);
gl_info
->
gl_ops
.
gl
.
p_glVertex3f
(
-
1
.
0
f
,
-
1
.
0
f
,
0
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glVertex3f
(
-
1
.
0
f
,
-
1
.
0
f
,
0
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glColor4ub
(
0xff
,
0x00
,
0x00
,
0x80
);
gl_info
->
gl_ops
.
gl
.
p_glVertex3f
(
1
.
0
f
,
-
1
.
0
f
,
0
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glVertex3f
(
1
.
0
f
,
-
1
.
0
f
,
0
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glColor4ub
(
0xff
,
0x00
,
0x00
,
0x80
);
gl_info
->
gl_ops
.
gl
.
p_glVertex3f
(
-
1
.
0
f
,
1
.
0
f
,
0
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glVertex3f
(
-
1
.
0
f
,
1
.
0
f
,
0
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glColor4ub
(
0xff
,
0x00
,
0x00
,
0x80
);
gl_info
->
gl_ops
.
gl
.
p_glVertex3f
(
1
.
0
f
,
1
.
0
f
,
0
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glVertex3f
(
1
.
0
f
,
1
.
0
f
,
0
.
0
f
);
gl_info
->
gl_ops
.
gl
.
p_glEnd
();
gl_info
->
gl_ops
.
gl
.
p_glEnd
();
gl_info
->
gl_ops
.
gl
.
p_glDisable
(
GL_BLEND
);
gl_info
->
gl_ops
.
gl
.
p_glGenTextures
(
1
,
&
tex2
);
gl_info
->
gl_ops
.
gl
.
p_glGenTextures
(
1
,
&
tex2
);
gl_info
->
gl_ops
.
gl
.
p_glBindTexture
(
GL_TEXTURE_2D
,
tex2
);
gl_info
->
gl_ops
.
gl
.
p_glBindTexture
(
GL_TEXTURE_2D
,
tex2
);
...
@@ -1140,9 +1138,11 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
...
@@ -1140,9 +1138,11 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
a
=
color
>>
24
;
a
=
color
>>
24
;
r
=
(
color
&
0x00ff0000
)
>>
16
;
r
=
(
color
&
0x00ff0000
)
>>
16
;
if
(
format
->
red_size
&&
(
r
<
0x7b
||
r
>
0x84
))
r_range
=
format
->
red_size
<
8
?
1
<<
(
8
-
format
->
red_size
-
1
)
:
1
;
a_range
=
format
->
alpha_size
<
8
?
1
<<
(
8
-
format
->
alpha_size
-
1
)
:
1
;
if
(
format
->
red_size
&&
(
r
<
0x80
-
r_range
||
r
>
0x80
+
r_range
))
match
=
FALSE
;
match
=
FALSE
;
else
if
(
format
->
alpha_size
>
1
&&
(
a
<
0x
9f
||
a
>
0xdf
))
else
if
(
format
->
alpha_size
>
1
&&
(
a
<
0x
bf
-
a_range
||
a
>
0xbf
+
a_range
))
match
=
FALSE
;
match
=
FALSE
;
if
(
!
match
)
if
(
!
match
)
{
{
...
...
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