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
17769497
Commit
17769497
authored
Jul 09, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jul 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Drop the color0 mov optimization if the src is overwritten.
parent
8a6553da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
baseshader.c
dlls/wined3d/baseshader.c
+17
-7
No files found.
dlls/wined3d/baseshader.c
View file @
17769497
...
@@ -632,9 +632,12 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3
...
@@ -632,9 +632,12 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3
reg_maps
->
texcoord_mask
[
dst_param
.
reg
.
idx
]
|=
dst_param
.
write_mask
;
reg_maps
->
texcoord_mask
[
dst_param
.
reg
.
idx
]
|=
dst_param
.
write_mask
;
}
}
if
(
shader_version
.
type
==
WINED3D_SHADER_TYPE_PIXEL
if
(
shader_version
.
type
==
WINED3D_SHADER_TYPE_PIXEL
)
&&
dst_param
.
reg
.
type
==
WINED3DSPR_COLOROUT
&&
dst_param
.
reg
.
idx
==
0
)
{
{
IWineD3DPixelShaderImpl
*
ps
=
(
IWineD3DPixelShaderImpl
*
)
This
;
if
(
dst_param
.
reg
.
type
==
WINED3DSPR_COLOROUT
&&
dst_param
.
reg
.
idx
==
0
)
{
/* Many 2.0 and 3.0 pixel shaders end with a MOV from a temp register to
/* Many 2.0 and 3.0 pixel shaders end with a MOV from a temp register to
* COLOROUT 0. If we know this in advance, the ARB shader backend can skip
* COLOROUT 0. If we know this in advance, the ARB shader backend can skip
* the mov and perform the sRGB write correction from the source register.
* the mov and perform the sRGB write correction from the source register.
...
@@ -642,13 +645,20 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3
...
@@ -642,13 +645,20 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3
* However, if the mov is only partial, we can't do this, and if the write
* However, if the mov is only partial, we can't do this, and if the write
* comes from an instruction other than MOV it is hard to do as well. If
* comes from an instruction other than MOV it is hard to do as well. If
* COLOROUT 0 is overwritten partially later, the marker is dropped again. */
* COLOROUT 0 is overwritten partially later, the marker is dropped again. */
IWineD3DPixelShaderImpl
*
ps
=
(
IWineD3DPixelShaderImpl
*
)
This
;
ps
->
color0_mov
=
FALSE
;
ps
->
color0_mov
=
FALSE
;
if
(
ins
.
handler_idx
==
WINED3DSIH_MOV
)
if
(
ins
.
handler_idx
==
WINED3DSIH_MOV
)
{
/* Used later when the source register is read. */
color0_mov
=
TRUE
;
}
}
/* Also drop the MOV marker if the source register is overwritten prior to the shader
* end
*/
else
if
(
dst_param
.
reg
.
type
==
WINED3DSPR_TEMP
&&
dst_param
.
reg
.
idx
==
ps
->
color0_reg
)
{
{
/* Used later when the source register is read. */
ps
->
color0_mov
=
FALSE
;
color0_mov
=
TRUE
;
}
}
}
}
...
...
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