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
e4413f20
Commit
e4413f20
authored
Jun 02, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Give local constants a shader type prefix.
parent
35bdc004
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
glsl_shader.c
dlls/wined3d/glsl_shader.c
+8
-8
No files found.
dlls/wined3d/glsl_shader.c
View file @
e4413f20
...
...
@@ -703,7 +703,7 @@ void shader_generate_glsl_declarations(
if
(
!
This
->
baseShader
.
load_local_constsF
)
{
LIST_FOR_EACH_ENTRY
(
lconst
,
&
This
->
baseShader
.
constantsF
,
local_constant
,
entry
)
{
float
*
value
=
(
float
*
)
lconst
->
value
;
shader_addline
(
buffer
,
"const vec4
LC%u = vec4(%f, %f, %f, %f);
\n
"
,
lconst
->
idx
,
shader_addline
(
buffer
,
"const vec4
%cLC%u = vec4(%f, %f, %f, %f);
\n
"
,
prefix
,
lconst
->
idx
,
value
[
0
],
value
[
1
],
value
[
2
],
value
[
3
]);
}
}
...
...
@@ -878,7 +878,7 @@ static void shader_glsl_get_register_name(
break
;
case
WINED3DSPR_CONST
:
{
const
char
*
prefix
=
pshader
?
"PC"
:
"VC"
;
const
char
prefix
=
pshader
?
'P'
:
'V'
;
/* Relative addressing */
if
(
param
&
WINED3DSHADER_ADDRMODE_RELATIVE
)
{
...
...
@@ -889,23 +889,23 @@ static void shader_glsl_get_register_name(
glsl_src_param_t
rel_param
;
shader_glsl_add_src_param
(
arg
,
addr_token
,
0
,
WINED3DSP_WRITEMASK_0
,
&
rel_param
);
if
(
reg
)
{
sprintf
(
tmpStr
,
"%
s
[%s + %u]"
,
prefix
,
rel_param
.
param_str
,
reg
);
sprintf
(
tmpStr
,
"%
cC
[%s + %u]"
,
prefix
,
rel_param
.
param_str
,
reg
);
}
else
{
sprintf
(
tmpStr
,
"%
s
[%s]"
,
prefix
,
rel_param
.
param_str
);
sprintf
(
tmpStr
,
"%
cC
[%s]"
,
prefix
,
rel_param
.
param_str
);
}
}
else
{
if
(
reg
)
{
sprintf
(
tmpStr
,
"%
s
[A0.x + %u]"
,
prefix
,
reg
);
sprintf
(
tmpStr
,
"%
cC
[A0.x + %u]"
,
prefix
,
reg
);
}
else
{
sprintf
(
tmpStr
,
"%
s
[A0.x]"
,
prefix
);
sprintf
(
tmpStr
,
"%
cC
[A0.x]"
,
prefix
);
}
}
}
else
{
if
(
shader_constant_is_local
(
This
,
reg
))
{
sprintf
(
tmpStr
,
"
LC%u"
,
reg
);
sprintf
(
tmpStr
,
"
%cLC%u"
,
prefix
,
reg
);
}
else
{
sprintf
(
tmpStr
,
"%
s
[%u]"
,
prefix
,
reg
);
sprintf
(
tmpStr
,
"%
cC
[%u]"
,
prefix
,
reg
);
}
}
...
...
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