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
0629585c
Commit
0629585c
authored
May 07, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Work around an ARBFP vs GLSL bug in Mac OS.
parent
64926223
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
context.c
dlls/wined3d/context.c
+21
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/context.c
View file @
0629585c
...
...
@@ -946,6 +946,24 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar
checkGLcall
(
"glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, ...
\n
"
);
}
}
if
(
GL_SUPPORT
(
ARB_FRAGMENT_PROGRAM
))
{
/* MacOS(radeon X1600 at least, but most likely others too) refuses to draw if GLSL and ARBFP are
* enabled, but the currently bound arbfp program is 0. Enabling ARBFP with prog 0 is invalid, but
* GLSL should bypass this. This causes problems in programs that never use the fixed function pipeline,
* because the ARBFP extension is enabled by the ARBFP pipeline at context creation, but no program
* is ever assigned.
*
* So make sure a program is assigned to each context. The first real ARBFP use will set a different
* program and the dummy program is destroyed when the context is destroyed.
*/
const
char
*
dummy_program
=
"!!ARBfp1.0
\n
"
"MOV result.color, fragment.color.primary;
\n
"
"END
\n
"
;
GL_EXTCALL
(
glGenProgramsARB
(
1
,
&
ret
->
dummy_arbfp_prog
));
GL_EXTCALL
(
glBindProgramARB
(
GL_FRAGMENT_PROGRAM_ARB
,
ret
->
dummy_arbfp_prog
));
GL_EXTCALL
(
glProgramStringARB
(
GL_FRAGMENT_PROGRAM_ARB
,
GL_PROGRAM_FORMAT_ASCII_ARB
,
strlen
(
dummy_program
),
dummy_program
));
}
for
(
s
=
0
;
s
<
GL_LIMITS
(
point_sprite_units
);
s
++
)
{
GL_EXTCALL
(
glActiveTextureARB
(
GL_TEXTURE0_ARB
+
s
));
...
...
@@ -1065,6 +1083,9 @@ void DestroyContext(IWineD3DDeviceImpl *This, WineD3DContext *context) {
TRACE
(
"Destroy dst FBO %d
\n
"
,
context
->
dst_fbo
);
context_destroy_fbo
(
This
,
&
context
->
dst_fbo
);
}
if
(
context
->
dummy_arbfp_prog
)
{
GL_EXTCALL
(
glDeleteProgramsARB
(
1
,
&
context
->
dummy_arbfp_prog
));
}
LEAVE_GL
();
...
...
dlls/wined3d/wined3d_private.h
View file @
0629585c
...
...
@@ -1234,6 +1234,7 @@ struct WineD3DContext {
GLint
gl_fog_source
;
GLfloat
fog_coord_value
;
GLfloat
color
[
4
],
fogstart
,
fogend
,
fogcolor
[
4
];
GLuint
dummy_arbfp_prog
;
};
typedef
enum
ContextUsage
{
...
...
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