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
8665ee59
Commit
8665ee59
authored
May 26, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use Rx registers for sRGB correction if possible.
This removes another reason to declare TA, TB and TC.
parent
6f74b45a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+34
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
8665ee59
...
@@ -2046,6 +2046,39 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This,
...
@@ -2046,6 +2046,39 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This,
char
fragcolor
[
16
];
char
fragcolor
[
16
];
DWORD
*
lconst_map
=
local_const_mapping
((
IWineD3DBaseShaderImpl
*
)
This
);
DWORD
*
lconst_map
=
local_const_mapping
((
IWineD3DBaseShaderImpl
*
)
This
);
struct
shader_arb_ctx_priv
priv_ctx
;
struct
shader_arb_ctx_priv
priv_ctx
;
BOOL
dcl_tmp
=
args
->
super
.
srgb_correction
;
char
srgbtmp
[
3
][
4
];
unsigned
int
i
,
found
=
0
;
for
(
i
=
0
;
i
<
This
->
baseShader
.
limits
.
temporary
;
i
++
)
{
/* Don't overwrite the color source */
if
(
This
->
color0_mov
&&
i
==
This
->
color0_reg
)
continue
;
else
if
(
reg_maps
->
shader_version
.
major
<
2
&&
i
==
0
)
continue
;
if
(
reg_maps
->
temporary
[
i
])
{
sprintf
(
srgbtmp
[
found
],
"R%u"
,
i
);
found
++
;
if
(
found
==
3
)
break
;
}
}
switch
(
found
)
{
case
3
:
dcl_tmp
=
FALSE
;
break
;
case
0
:
sprintf
(
srgbtmp
[
0
],
"TA"
);
sprintf
(
srgbtmp
[
1
],
"TB"
);
sprintf
(
srgbtmp
[
2
],
"TC"
);
break
;
case
1
:
sprintf
(
srgbtmp
[
1
],
"TA"
);
sprintf
(
srgbtmp
[
2
],
"TB"
);
break
;
case
2
:
sprintf
(
srgbtmp
[
2
],
"TA"
);
break
;
}
/* Create the hw ARB shader */
/* Create the hw ARB shader */
memset
(
&
priv_ctx
,
0
,
sizeof
(
priv_ctx
));
memset
(
&
priv_ctx
,
0
,
sizeof
(
priv_ctx
));
...
@@ -2117,7 +2150,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This,
...
@@ -2117,7 +2150,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This,
shader_generate_main
((
IWineD3DBaseShader
*
)
This
,
buffer
,
reg_maps
,
function
,
&
priv_ctx
);
shader_generate_main
((
IWineD3DBaseShader
*
)
This
,
buffer
,
reg_maps
,
function
,
&
priv_ctx
);
if
(
args
->
super
.
srgb_correction
)
{
if
(
args
->
super
.
srgb_correction
)
{
arbfp_add_sRGB_correction
(
buffer
,
fragcolor
,
"TA"
,
"TB"
,
"TC"
);
arbfp_add_sRGB_correction
(
buffer
,
fragcolor
,
srgbtmp
[
0
],
srgbtmp
[
1
],
srgbtmp
[
2
]
);
shader_addline
(
buffer
,
"MOV result.color.a, %s;
\n
"
,
fragcolor
);
shader_addline
(
buffer
,
"MOV result.color.a, %s;
\n
"
,
fragcolor
);
}
else
if
(
reg_maps
->
shader_version
.
major
<
2
)
{
}
else
if
(
reg_maps
->
shader_version
.
major
<
2
)
{
shader_addline
(
buffer
,
"MOV result.color, %s;
\n
"
,
fragcolor
);
shader_addline
(
buffer
,
"MOV result.color, %s;
\n
"
,
fragcolor
);
...
...
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