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
7d92b54a
Commit
7d92b54a
authored
Dec 15, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use the ps_compile_args struct in glsl.
parent
20189eb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
glsl_shader.c
dlls/wined3d/glsl_shader.c
+7
-11
No files found.
dlls/wined3d/glsl_shader.c
View file @
7d92b54a
...
...
@@ -544,7 +544,8 @@ static void shader_glsl_update_float_pixel_constants(IWineD3DDevice *iface, UINT
/** Generate the variable & register declarations for the GLSL output target */
static
void
shader_generate_glsl_declarations
(
IWineD3DBaseShader
*
iface
,
const
shader_reg_maps
*
reg_maps
,
SHADER_BUFFER
*
buffer
,
const
WineD3D_GL_Info
*
gl_info
)
SHADER_BUFFER
*
buffer
,
const
WineD3D_GL_Info
*
gl_info
,
const
struct
ps_compile_args
*
ps_args
)
{
IWineD3DBaseShaderImpl
*
This
=
(
IWineD3DBaseShaderImpl
*
)
iface
;
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
...
...
@@ -618,7 +619,7 @@ static void shader_generate_glsl_declarations(IWineD3DBaseShader *iface, const s
ps_impl
->
numbumpenvmatconsts
++
;
}
if
(
device
->
stateBlock
->
renderState
[
WINED3DRS_SRGBWRITEENABLE
]
)
{
if
(
ps_args
->
srgb_correction
)
{
shader_addline
(
buffer
,
"const vec4 srgb_mul_low = vec4(%f, %f, %f, %f);
\n
"
,
srgb_mul_low
,
srgb_mul_low
,
srgb_mul_low
,
srgb_mul_low
);
shader_addline
(
buffer
,
"const vec4 srgb_comparison = vec4(%f, %f, %f, %f);
\n
"
,
...
...
@@ -3633,16 +3634,11 @@ static GLuint shader_glsl_generate_pshader(IWineD3DPixelShader *iface, SHADER_BU
}
/* Base Declarations */
shader_generate_glsl_declarations
(
(
IWineD3DBaseShader
*
)
This
,
reg_maps
,
buffer
,
&
GLINFO_LOCATION
);
shader_generate_glsl_declarations
(
(
IWineD3DBaseShader
*
)
This
,
reg_maps
,
buffer
,
&
GLINFO_LOCATION
,
args
);
/* Pack 3.0 inputs */
if
(
reg_maps
->
shader_version
>=
WINED3DPS_VERSION
(
3
,
0
))
{
if
(((
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
)
->
strided_streams
.
u
.
s
.
position_transformed
)
{
pshader_glsl_input_pack
(
buffer
,
This
->
semantics_in
,
iface
,
pretransformed
);
}
else
if
(
!
use_vs
((
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
))
{
pshader_glsl_input_pack
(
buffer
,
This
->
semantics_in
,
iface
,
fixedfunction
);
}
if
(
reg_maps
->
shader_version
>=
WINED3DPS_VERSION
(
3
,
0
)
&&
args
->
vp_mode
!=
vertexshader
)
{
pshader_glsl_input_pack
(
buffer
,
This
->
semantics_in
,
iface
,
args
->
vp_mode
);
}
/* Base Shader Body */
...
...
@@ -3708,7 +3704,7 @@ static void shader_glsl_generate_vshader(IWineD3DVertexShader *iface, SHADER_BUF
shader_addline
(
buffer
,
"#version 120
\n
"
);
/* Base Declarations */
shader_generate_glsl_declarations
(
(
IWineD3DBaseShader
*
)
This
,
reg_maps
,
buffer
,
&
GLINFO_LOCATION
);
shader_generate_glsl_declarations
(
(
IWineD3DBaseShader
*
)
This
,
reg_maps
,
buffer
,
&
GLINFO_LOCATION
,
NULL
);
/* Base Shader Body */
shader_generate_main
(
(
IWineD3DBaseShader
*
)
This
,
buffer
,
reg_maps
,
function
);
...
...
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