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
d76de4ee
Commit
d76de4ee
authored
Jun 30, 2008
by
H. Verbeet
Committed by
Alexandre Julliard
Jul 01, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Specify the GLSL language version our shaders are written to.
This prevents some driver warnings when using language features from 1.20, like "first class arrays".
parent
d5cbb837
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
glsl_shader.c
dlls/wined3d/glsl_shader.c
+8
-0
No files found.
dlls/wined3d/glsl_shader.c
View file @
d76de4ee
...
@@ -2988,6 +2988,8 @@ static GLhandleARB generate_param_reorder_function(IWineD3DVertexShader *vertexs
...
@@ -2988,6 +2988,8 @@ static GLhandleARB generate_param_reorder_function(IWineD3DVertexShader *vertexs
buffer
.
lineNo
=
0
;
buffer
.
lineNo
=
0
;
buffer
.
newline
=
TRUE
;
buffer
.
newline
=
TRUE
;
shader_addline
(
&
buffer
,
"#version 120
\n
"
);
if
(
vs_major
<
3
&&
ps_major
<
3
)
{
if
(
vs_major
<
3
&&
ps_major
<
3
)
{
/* That one is easy: The vertex shader writes to the builtin varyings, the pixel shader reads from them.
/* That one is easy: The vertex shader writes to the builtin varyings, the pixel shader reads from them.
* Take care about the texcoord .w fixup though if we're using the fixed function fragment pipeline
* Take care about the texcoord .w fixup though if we're using the fixed function fragment pipeline
...
@@ -3310,6 +3312,7 @@ static GLhandleARB create_glsl_blt_shader(WineD3D_GL_Info *gl_info) {
...
@@ -3310,6 +3312,7 @@ static GLhandleARB create_glsl_blt_shader(WineD3D_GL_Info *gl_info) {
GLhandleARB
program_id
;
GLhandleARB
program_id
;
GLhandleARB
vshader_id
,
pshader_id
;
GLhandleARB
vshader_id
,
pshader_id
;
const
char
*
blt_vshader
[]
=
{
const
char
*
blt_vshader
[]
=
{
"#version 120
\n
"
"void main(void)
\n
"
"void main(void)
\n
"
"{
\n
"
"{
\n
"
" gl_Position = gl_Vertex;
\n
"
" gl_Position = gl_Vertex;
\n
"
...
@@ -3320,6 +3323,7 @@ static GLhandleARB create_glsl_blt_shader(WineD3D_GL_Info *gl_info) {
...
@@ -3320,6 +3323,7 @@ static GLhandleARB create_glsl_blt_shader(WineD3D_GL_Info *gl_info) {
};
};
const
char
*
blt_pshader
[]
=
{
const
char
*
blt_pshader
[]
=
{
"#version 120
\n
"
"uniform sampler2D sampler;
\n
"
"uniform sampler2D sampler;
\n
"
"void main(void)
\n
"
"void main(void)
\n
"
"{
\n
"
"{
\n
"
...
@@ -3494,6 +3498,8 @@ static void shader_glsl_generate_pshader(IWineD3DPixelShader *iface, SHADER_BUFF
...
@@ -3494,6 +3498,8 @@ static void shader_glsl_generate_pshader(IWineD3DPixelShader *iface, SHADER_BUFF
/* Create the hw GLSL shader object and assign it as the baseShader.prgId */
/* Create the hw GLSL shader object and assign it as the baseShader.prgId */
GLhandleARB
shader_obj
=
GL_EXTCALL
(
glCreateShaderObjectARB
(
GL_FRAGMENT_SHADER_ARB
));
GLhandleARB
shader_obj
=
GL_EXTCALL
(
glCreateShaderObjectARB
(
GL_FRAGMENT_SHADER_ARB
));
shader_addline
(
buffer
,
"#version 120
\n
"
);
if
(
GL_SUPPORT
(
ARB_DRAW_BUFFERS
))
{
if
(
GL_SUPPORT
(
ARB_DRAW_BUFFERS
))
{
shader_addline
(
buffer
,
"#extension GL_ARB_draw_buffers : enable
\n
"
);
shader_addline
(
buffer
,
"#extension GL_ARB_draw_buffers : enable
\n
"
);
}
}
...
@@ -3579,6 +3585,8 @@ static void shader_glsl_generate_vshader(IWineD3DVertexShader *iface, SHADER_BUF
...
@@ -3579,6 +3585,8 @@ static void shader_glsl_generate_vshader(IWineD3DVertexShader *iface, SHADER_BUF
/* Create the hw GLSL shader program and assign it as the baseShader.prgId */
/* Create the hw GLSL shader program and assign it as the baseShader.prgId */
GLhandleARB
shader_obj
=
GL_EXTCALL
(
glCreateShaderObjectARB
(
GL_VERTEX_SHADER_ARB
));
GLhandleARB
shader_obj
=
GL_EXTCALL
(
glCreateShaderObjectARB
(
GL_VERTEX_SHADER_ARB
));
shader_addline
(
buffer
,
"#version 120
\n
"
);
/* Base Declarations */
/* Base Declarations */
shader_generate_glsl_declarations
(
(
IWineD3DBaseShader
*
)
This
,
reg_maps
,
buffer
,
&
GLINFO_LOCATION
);
shader_generate_glsl_declarations
(
(
IWineD3DBaseShader
*
)
This
,
reg_maps
,
buffer
,
&
GLINFO_LOCATION
);
...
...
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