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
6e9acca1
Commit
6e9acca1
authored
Dec 11, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix the source swizzle for WINED3DSIH_EXP.
parent
b5742fb9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
visual.c
dlls/d3d8/tests/visual.c
+1
-1
glsl_shader.c
dlls/wined3d/glsl_shader.c
+19
-2
No files found.
dlls/d3d8/tests/visual.c
View file @
6e9acca1
...
...
@@ -1780,7 +1780,7 @@ static void test_scalar_instructions(IDirect3DDevice8 *device)
{
{
"rcp_test"
,
rcp_test
,
D3DCOLOR_ARGB
(
0x00
,
0x80
,
0x80
,
0x80
),
FALSE
},
{
"rsq_test"
,
rsq_test
,
D3DCOLOR_ARGB
(
0x00
,
0xb4
,
0xb4
,
0xb4
),
FALSE
},
{
"exp_test"
,
exp_test
,
D3DCOLOR_ARGB
(
0x00
,
0x40
,
0x40
,
0x40
),
TRU
E
},
{
"exp_test"
,
exp_test
,
D3DCOLOR_ARGB
(
0x00
,
0x40
,
0x40
,
0x40
),
FALS
E
},
{
"expp_test"
,
expp_test
,
D3DCOLOR_ARGB
(
0x00
,
0x40
,
0x40
,
0x40
),
TRUE
},
{
"log_test"
,
log_test
,
D3DCOLOR_ARGB
(
0x00
,
0xff
,
0xff
,
0xff
),
TRUE
},
{
"logp_test"
,
logp_test
,
D3DCOLOR_ARGB
(
0x00
,
0xff
,
0xff
,
0xff
),
TRUE
},
...
...
dlls/wined3d/glsl_shader.c
View file @
6e9acca1
...
...
@@ -2632,7 +2632,6 @@ static void shader_glsl_map2gl(const struct wined3d_shader_instruction *ins)
case
WINED3DSIH_MAX
:
instruction
=
"max"
;
break
;
case
WINED3DSIH_ABS
:
instruction
=
"abs"
;
break
;
case
WINED3DSIH_FRC
:
instruction
=
"fract"
;
break
;
case
WINED3DSIH_EXP
:
instruction
=
"exp2"
;
break
;
case
WINED3DSIH_DSX
:
instruction
=
"dFdx"
;
break
;
case
WINED3DSIH_DSY
:
instruction
=
"ycorrection.y * dFdy"
;
break
;
case
WINED3DSIH_ROUND_NI
:
instruction
=
"floor"
;
break
;
...
...
@@ -2689,6 +2688,24 @@ static void shader_glsl_nrm(const struct wined3d_shader_instruction *ins)
}
}
static
void
shader_glsl_exp
(
const
struct
wined3d_shader_instruction
*
ins
)
{
struct
wined3d_shader_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
struct
glsl_src_param
src0_param
;
DWORD
dst_write_mask
;
unsigned
int
dst_size
;
dst_write_mask
=
shader_glsl_append_dst
(
buffer
,
ins
);
dst_size
=
shader_glsl_get_write_mask_size
(
dst_write_mask
);
shader_glsl_add_src_param
(
ins
,
&
ins
->
src
[
0
],
WINED3DSP_WRITEMASK_3
,
&
src0_param
);
if
(
dst_size
>
1
)
shader_addline
(
buffer
,
"vec%u(exp2(%s)));
\n
"
,
dst_size
,
src0_param
.
param_str
);
else
shader_addline
(
buffer
,
"exp2(%s));
\n
"
,
src0_param
.
param_str
);
}
/** Process the WINED3DSIO_EXPP instruction in GLSL:
* For shader model 1.x, do the following (and honor the writemask, so use a temporary variable):
* dst.x = 2^(floor(src))
...
...
@@ -6671,7 +6688,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_ENDLOOP */
shader_glsl_end
,
/* WINED3DSIH_ENDREP */
shader_glsl_end
,
/* WINED3DSIH_EQ */
shader_glsl_relop
,
/* WINED3DSIH_EXP */
shader_glsl_
map2gl
,
/* WINED3DSIH_EXP */
shader_glsl_
exp
,
/* WINED3DSIH_EXPP */
shader_glsl_expp
,
/* WINED3DSIH_FRC */
shader_glsl_map2gl
,
/* WINED3DSIH_FTOI */
shader_glsl_to_int
,
...
...
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