Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
3d3369a7
Commit
3d3369a7
authored
17 years ago
by
Stefan Dösinger
Committed by
Alexandre Julliard
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
wined3d: d3d ignores the sign of the input value in the log instruction.
parent
6dc11616
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/wined3d/glsl_shader.c
+21
-0
21 additions, 0 deletions
dlls/wined3d/glsl_shader.c
dlls/wined3d/pixelshader.c
+1
-1
1 addition, 1 deletion
dlls/wined3d/pixelshader.c
dlls/wined3d/wined3d_private.h
+1
-0
1 addition, 0 deletions
dlls/wined3d/wined3d_private.h
with
23 additions
and
1 deletion
dlls/wined3d/glsl_shader.c
+
21
−
0
View file @
3d3369a7
...
...
@@ -1346,6 +1346,27 @@ void shader_glsl_pow(SHADER_OPCODE_ARG *arg) {
}
}
/* Process the WINED3DSIO_LOG instruction in GLSL (dst = log2(|src0|))
* Src0 is a scalar. Note that D3D uses the absolute of src0, while
* GLSL uses the value as-is. */
void
shader_glsl_log
(
SHADER_OPCODE_ARG
*
arg
)
{
SHADER_BUFFER
*
buffer
=
arg
->
buffer
;
glsl_src_param_t
src0_param
;
DWORD
dst_write_mask
;
size_t
dst_size
;
dst_write_mask
=
shader_glsl_append_dst
(
buffer
,
arg
);
dst_size
=
shader_glsl_get_write_mask_size
(
dst_write_mask
);
shader_glsl_add_src_param
(
arg
,
arg
->
src
[
0
],
arg
->
src_addr
[
0
],
WINED3DSP_WRITEMASK_0
,
&
src0_param
);
if
(
dst_size
>
1
)
{
shader_addline
(
buffer
,
"vec%d(log2(abs(%s))));
\n
"
,
dst_size
,
src0_param
.
param_str
);
}
else
{
shader_addline
(
buffer
,
"log2(abs(%s)));
\n
"
,
src0_param
.
param_str
);
}
}
/* Map the opcode 1-to-1 to the GL code (arg->dst = instruction(src0, src1, ...) */
void
shader_glsl_map2gl
(
SHADER_OPCODE_ARG
*
arg
)
{
CONST
SHADER_OPCODE
*
curOpcode
=
arg
->
opcode
;
...
...
This diff is collapsed.
Click to expand it.
dlls/wined3d/pixelshader.c
+
1
−
1
View file @
3d3369a7
...
...
@@ -167,7 +167,7 @@ CONST SHADER_OPCODE IWineD3DPixelShaderImpl_shader_ins[] = {
{
WINED3DSIO_SGE
,
"sge"
,
"SGE"
,
1
,
3
,
pshader_hw_map2gl
,
shader_glsl_compare
,
0
,
0
},
{
WINED3DSIO_ABS
,
"abs"
,
"ABS"
,
1
,
2
,
pshader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_EXP
,
"exp"
,
"EX2"
,
1
,
2
,
pshader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_LOG
,
"log"
,
"LG2"
,
1
,
2
,
pshader_hw_map2gl
,
shader_glsl_
map2gl
,
0
,
0
},
{
WINED3DSIO_LOG
,
"log"
,
"LG2"
,
1
,
2
,
pshader_hw_map2gl
,
shader_glsl_
log
,
0
,
0
},
{
WINED3DSIO_EXPP
,
"expp"
,
"EXP"
,
1
,
2
,
pshader_hw_map2gl
,
shader_glsl_expp
,
0
,
0
},
{
WINED3DSIO_LOGP
,
"logp"
,
"LOG"
,
1
,
2
,
pshader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_DST
,
"dst"
,
"DST"
,
1
,
3
,
pshader_hw_map2gl
,
shader_glsl_dst
,
0
,
0
},
...
...
This diff is collapsed.
Click to expand it.
dlls/wined3d/wined3d_private.h
+
1
−
0
View file @
3d3369a7
...
...
@@ -1839,6 +1839,7 @@ extern void shader_glsl_call(SHADER_OPCODE_ARG* arg);
extern
void
shader_glsl_callnz
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
shader_glsl_label
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
shader_glsl_pow
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
shader_glsl_log
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
shader_glsl_texldl
(
SHADER_OPCODE_ARG
*
arg
);
/** GLSL Pixel Shader Prototypes */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment