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
95788401
Commit
95788401
authored
Jun 18, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: GLSL 1.20 includes gl_FragData[] syntax.
This means we don't have to enable ARB_draw_buffers explicitly.
parent
3845b37a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
17 deletions
+3
-17
glsl_shader.c
dlls/wined3d/glsl_shader.c
+3
-17
No files found.
dlls/wined3d/glsl_shader.c
View file @
95788401
...
...
@@ -189,10 +189,8 @@ static void print_glsl_info_log(const WineD3D_GL_Info *gl_info, GLhandleARB obj)
"Vertex shader(s) linked, no fragment shader(s) defined.
\n
"
,
/* fglrx, with \n */
"Vertex shader(s) linked, no fragment shader(s) defined."
,
/* fglrx, no \n */
"Fragment shader was successfully compiled to run on hardware.
\n
"
"WARNING: 0:2: extension 'GL_ARB_draw_buffers' is not supported"
,
"Fragment shader(s) linked, no vertex shader(s) defined."
,
/* fglrx, no \n */
"Fragment shader(s) linked, no vertex shader(s) defined.
\n
"
,
/* fglrx, with \n */
"WARNING: 0:2: extension 'GL_ARB_draw_buffers' is not supported
\n
"
/* MacOS ati */
};
if
(
!
TRACE_ON
(
d3d_shader
)
&&
!
FIXME_ON
(
d3d_shader
))
return
;
...
...
@@ -1258,9 +1256,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
if
(
reg
->
idx
>=
GL_LIMITS
(
buffers
))
WARN
(
"Write to render target %u, only %d supported
\n
"
,
reg
->
idx
,
GL_LIMITS
(
buffers
));
if
(
GL_SUPPORT
(
ARB_DRAW_BUFFERS
))
sprintf
(
register_name
,
"gl_FragData[%u]"
,
reg
->
idx
);
/* On older cards with GLSL support like the GeforceFX there's only one buffer. */
else
sprintf
(
register_name
,
"gl_FragColor"
);
sprintf
(
register_name
,
"gl_FragData[%u]"
,
reg
->
idx
);
break
;
case
WINED3DSPR_RASTOUT
:
...
...
@@ -3647,9 +3643,6 @@ static GLuint shader_glsl_generate_pshader(IWineD3DPixelShaderImpl *This,
shader_addline
(
buffer
,
"#version 120
\n
"
);
if
(
GL_SUPPORT
(
ARB_DRAW_BUFFERS
))
{
shader_addline
(
buffer
,
"#extension GL_ARB_draw_buffers : enable
\n
"
);
}
if
(
GL_SUPPORT
(
ARB_SHADER_TEXTURE_LOD
)
&&
reg_maps
->
usestexldd
)
{
shader_addline
(
buffer
,
"#extension GL_ARB_shader_texture_lod : enable
\n
"
);
}
...
...
@@ -3676,17 +3669,10 @@ static GLuint shader_glsl_generate_pshader(IWineD3DPixelShaderImpl *This,
if
(
reg_maps
->
shader_version
.
major
<
2
)
{
/* Some older cards like GeforceFX ones don't support multiple buffers, so also not gl_FragData */
if
(
GL_SUPPORT
(
ARB_DRAW_BUFFERS
))
shader_addline
(
buffer
,
"gl_FragData[0] = R0;
\n
"
);
else
shader_addline
(
buffer
,
"gl_FragColor = R0;
\n
"
);
shader_addline
(
buffer
,
"gl_FragData[0] = R0;
\n
"
);
}
if
(
GL_SUPPORT
(
ARB_DRAW_BUFFERS
))
{
fragcolor
=
"gl_FragData[0]"
;
}
else
{
fragcolor
=
"gl_FragColor"
;
}
fragcolor
=
"gl_FragData[0]"
;
if
(
args
->
srgb_correction
)
{
shader_addline
(
buffer
,
"tmp0.xyz = pow(%s.xyz, vec3(%f, %f, %f)) * vec3(%f, %f, %f) - vec3(%f, %f, %f);
\n
"
,
fragcolor
,
srgb_pow
,
srgb_pow
,
srgb_pow
,
srgb_mul_high
,
srgb_mul_high
,
srgb_mul_high
,
...
...
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