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
a7b605af
Commit
a7b605af
authored
May 28, 2009
by
Stefan Doesinger
Committed by
Alexandre Julliard
Jun 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement D3DSPDM_PARTIALPRECISION support.
parent
dfd338de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
15 deletions
+29
-15
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+29
-15
No files found.
dlls/wined3d/arb_program_shader.c
View file @
a7b605af
...
...
@@ -913,30 +913,38 @@ static void gen_color_correction(SHADER_BUFFER *buffer, const char *reg, DWORD d
static
const
char
*
shader_arb_get_modifier
(
const
struct
wined3d_shader_instruction
*
ins
)
{
DWORD
mod
;
const
char
*
ret
=
""
;
struct
shader_arb_ctx_priv
*
priv
=
ins
->
ctx
->
backend_data
;
if
(
!
ins
->
dst_count
)
return
""
;
mod
=
ins
->
dst
[
0
].
modifiers
;
if
(
mod
&
WINED3DSPDM_SATURATE
)
{
ret
=
"_SAT"
;
mod
&=
~
WINED3DSPDM_SATURATE
;
}
if
(
mod
&
WINED3DSPDM_PARTIALPRECISION
)
{
FIXME
(
"Unhandled modifier WINED3DSPDM_PARTIALPRECISION
\n
"
);
mod
&=
~
WINED3DSPDM_PARTIALPRECISION
;
}
/* Silently ignore PARTIALPRECISION if its not supported */
if
(
priv
->
target_version
==
ARB
)
mod
&=
~
WINED3DSPDM_PARTIALPRECISION
;
if
(
mod
&
WINED3DSPDM_MSAMPCENTROID
)
{
FIXME
(
"Unhandled modifier WINED3DSPDM_MSAMPCENTROID
\n
"
);
mod
&=
~
WINED3DSPDM_MSAMPCENTROID
;
}
if
(
mod
)
switch
(
mod
)
{
FIXME
(
"Unknown modifiers 0x%08x
\n
"
,
mod
);
case
WINED3DSPDM_SATURATE
|
WINED3DSPDM_PARTIALPRECISION
:
return
"H_SAT"
;
case
WINED3DSPDM_SATURATE
:
return
"_SAT"
;
case
WINED3DSPDM_PARTIALPRECISION
:
return
"H"
;
case
0
:
return
""
;
default:
FIXME
(
"Unknown modifiers 0x%08x
\n
"
,
mod
);
return
""
;
}
return
ret
;
}
#define TEX_PROJ 0x1
...
...
@@ -953,7 +961,7 @@ static void shader_hw_sample(const struct wined3d_shader_instruction *ins, DWORD
IWineD3DBaseShaderImpl
*
This
=
(
IWineD3DBaseShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
struct
shader_arb_ctx_priv
*
priv
=
ins
->
ctx
->
backend_data
;
const
char
*
mod
=
shader_arb_get_modifier
(
ins
)
;
const
char
*
mod
;
switch
(
sampler_type
)
{
case
WINED3DSTT_1D
:
...
...
@@ -989,6 +997,12 @@ static void shader_hw_sample(const struct wined3d_shader_instruction *ins, DWORD
tex_type
=
""
;
}
/* TEX, TXL, TXD and TXP do not support the "H" modifier,
* so don't use shader_arb_get_modifier
*/
if
(
ins
->
dst
[
0
].
modifiers
&
WINED3DSPDM_SATURATE
)
mod
=
"_SAT"
;
else
mod
=
""
;
if
(
flags
&
TEX_DERIV
)
{
if
(
flags
&
TEX_PROJ
)
FIXME
(
"Projected texture sampling with custom derivates
\n
"
);
...
...
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